Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcvs2git2008-06-02 07:07:32 +0000
committercvs2git2008-06-02 07:07:32 +0000
commitd5b07000930f25fe9ad9cff6c06143f435c30ee4 (patch)
treeaa6b0ae35403398ec5a95baa4c72d5d6b6ccd932
parent4f09805312a9a1932b684ec8c18ce71e3074d1e0 (diff)
downloadorg.eclipse.mylyn.tasks-d5b07000930f25fe9ad9cff6c06143f435c30ee4.tar.gz
org.eclipse.mylyn.tasks-d5b07000930f25fe9ad9cff6c06143f435c30ee4.tar.xz
org.eclipse.mylyn.tasks-d5b07000930f25fe9ad9cff6c06143f435c30ee4.zip
This commit was manufactured by cvs2svn to create branch 'e_3_3_m_3_x'.
Sprout from master 2008-06-02 07:07:31 UTC spingel 'NEW - bug 220436: generalize implementation for generating incoming/outgoing change messages for tooltips and popups' Delete: org.eclipse.mylyn.bugzilla.core/.classpath org.eclipse.mylyn.bugzilla.core/.cvsignore org.eclipse.mylyn.bugzilla.core/.project org.eclipse.mylyn.bugzilla.core/.settings/org.eclipse.jdt.core.prefs org.eclipse.mylyn.bugzilla.core/.settings/org.eclipse.jdt.ui.prefs org.eclipse.mylyn.bugzilla.core/.settings/org.eclipse.ltk.core.refactoring.prefs org.eclipse.mylyn.bugzilla.core/.settings/org.eclipse.mylyn.tasklist.prefs org.eclipse.mylyn.bugzilla.core/.settings/org.eclipse.mylyn.tasks.ui.prefs org.eclipse.mylyn.bugzilla.core/.settings/org.eclipse.pde.prefs org.eclipse.mylyn.bugzilla.core/META-INF/MANIFEST.MF org.eclipse.mylyn.bugzilla.core/about.html org.eclipse.mylyn.bugzilla.core/build-user.xml org.eclipse.mylyn.bugzilla.core/build.properties org.eclipse.mylyn.bugzilla.core/plugin.xml org.eclipse.mylyn.bugzilla.core/schema/languages.exsd org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/AbstractReportFactory.java org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/AttachmentPartSource.java org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttribute.java org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttributeFactory.java org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttributeMapper.java org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClientFactory.java org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClientManager.java org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaComment.java org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaCorePlugin.java org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaCustomField.java org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaFlag.java org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaLanguageSettings.java org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaMessages.java org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaMessages.properties org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaOperation.java org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryConnector.java org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryQuery.java org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaStackTraceDuplicateDetector.java org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaStatus.java org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTask.java org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskAttachmentHandler.java org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/GzipGetMethod.java org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/GzipPostMethod.java org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/IBugzillaConstants.java org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/KeywordParser.java org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/MultiBugReportFactory.java org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/RepositoryConfiguration.java org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/RepositoryConfigurationFactory.java org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/RepositoryQueryResultsFactory.java org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxBugzillaQueryContentHandler.java org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxConfigurationContentHandler.java org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxMultiBugReportContentHandler.java org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/UnrecognizedReponseException.java org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/XmlCleaner.java org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AssignmentEvent.java org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AttachmentEvent.java org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AttachmentFlag.java org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AttachmentFlagState.java org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AttachmentFlagStatus.java org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/BugzillaTaskHistoryParser.java org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/ResolutionEvent.java org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/ResolutionType.java org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/StatusEvent.java org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/StatusType.java org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/TaskHistory.java org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/TaskRevision.java org.eclipse.mylyn.bugzilla.tests/.classpath org.eclipse.mylyn.bugzilla.tests/.cvsignore org.eclipse.mylyn.bugzilla.tests/.project org.eclipse.mylyn.bugzilla.tests/.settings/org.eclipse.jdt.core.prefs org.eclipse.mylyn.bugzilla.tests/.settings/org.eclipse.jdt.ui.prefs org.eclipse.mylyn.bugzilla.tests/.settings/org.eclipse.ltk.core.refactoring.prefs org.eclipse.mylyn.bugzilla.tests/.settings/org.eclipse.mylyn.tasklist.prefs org.eclipse.mylyn.bugzilla.tests/.settings/org.eclipse.mylyn.tasks.ui.prefs org.eclipse.mylyn.bugzilla.tests/.settings/org.eclipse.pde.api.tools.prefs org.eclipse.mylyn.bugzilla.tests/.settings/org.eclipse.pde.prefs org.eclipse.mylyn.bugzilla.tests/META-INF/MANIFEST.MF org.eclipse.mylyn.bugzilla.tests/about.html org.eclipse.mylyn.bugzilla.tests/build.properties org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AbstractBugzillaTest.java org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AllBugzillaTests.java org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaConfigurationTest.java org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaProductParserTest.java org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaRepositoryConnectorTest.java org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaRepositoryConnectorTest2.java org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaSearchDialogTest.java org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaSearchEngineTest.java org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskDataHandlerTest.java org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskHyperlinkDetectorTest.java org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskListManagerTest.java org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskTest.java org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTestPlugin.java org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTestUtil.java org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/DuplicateDetetionTest.java org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/EncodingTest.java org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/NewBugWizardTest.java org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryEditorWizardTest.java org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryReportFactoryTest.java org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryTaskHandleTest.java org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskEditorTest.java org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskListNotificationManagerTest.java org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskListStandaloneTest.java org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/headless/BugzillaQueryTest.java org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/headless/BugzillaTaskHistoryTest.java org.eclipse.mylyn.bugzilla.tests/testdata/configuration/rdfconfig218.txt org.eclipse.mylyn.bugzilla.tests/testdata/contexts/.cvsignore org.eclipse.mylyn.bugzilla.tests/testdata/contexts/empty.txt org.eclipse.mylyn.bugzilla.tests/testdata/pages/bug-1-full.html org.eclipse.mylyn.bugzilla.tests/testdata/pages/bug-not-found-eclipse.html org.eclipse.mylyn.bugzilla.tests/testdata/pages/bug-not-found-hipikat.html org.eclipse.mylyn.bugzilla.tests/testdata/pages/cdt-page.html org.eclipse.mylyn.bugzilla.tests/testdata/pages/enter-bug220.html org.eclipse.mylyn.bugzilla.tests/testdata/pages/enter-bug2201.html org.eclipse.mylyn.bugzilla.tests/testdata/pages/equinox-page.html org.eclipse.mylyn.bugzilla.tests/testdata/pages/gmt-page.html org.eclipse.mylyn.bugzilla.tests/testdata/pages/hipikat-copy-bug-1-full.html org.eclipse.mylyn.bugzilla.tests/testdata/pages/platform-page.html org.eclipse.mylyn.bugzilla.tests/testdata/pages/product-page-1-product-hipikat.html org.eclipse.mylyn.bugzilla.tests/testdata/pages/test-report-220.html org.eclipse.mylyn.bugzilla.tests/testdata/pages/test-report-2201.html org.eclipse.mylyn.bugzilla.tests/testdata/pages/test-report-222attachment.html org.eclipse.mylyn.bugzilla.tests/testdata/pages/ve-page.html org.eclipse.mylyn.bugzilla.tests/testdata/reports-stacktrace/1.html org.eclipse.mylyn.bugzilla.tests/testdata/reports-stacktrace/2.html org.eclipse.mylyn.bugzilla.tests/testdata/reports-stacktrace/40152.html org.eclipse.mylyn.bugzilla.tests/testdata/reports-stacktrace/4548.html org.eclipse.mylyn.bugzilla.tests/testdata/reports-stacktrace/4862.html org.eclipse.mylyn.bugzilla.tests/testdata/reports-stacktrace/67395.html org.eclipse.mylyn.bugzilla.tests/testdata/reports-stacktrace/76146.html org.eclipse.mylyn.bugzilla.tests/testdata/reports-stacktrace/76388.html org.eclipse.mylyn.bugzilla.ui/.classpath org.eclipse.mylyn.bugzilla.ui/.cvsignore org.eclipse.mylyn.bugzilla.ui/.project org.eclipse.mylyn.bugzilla.ui/.settings/org.eclipse.jdt.core.prefs org.eclipse.mylyn.bugzilla.ui/.settings/org.eclipse.jdt.ui.prefs org.eclipse.mylyn.bugzilla.ui/.settings/org.eclipse.ltk.core.refactoring.prefs org.eclipse.mylyn.bugzilla.ui/.settings/org.eclipse.mylyn.tasklist.prefs org.eclipse.mylyn.bugzilla.ui/.settings/org.eclipse.mylyn.tasks.ui.prefs org.eclipse.mylyn.bugzilla.ui/.settings/org.eclipse.pde.prefs org.eclipse.mylyn.bugzilla.ui/META-INF/MANIFEST.MF org.eclipse.mylyn.bugzilla.ui/about.html org.eclipse.mylyn.bugzilla.ui/build-user.xml org.eclipse.mylyn.bugzilla.ui/build.properties org.eclipse.mylyn.bugzilla.ui/icons/elcl16/bug-comment.gif org.eclipse.mylyn.bugzilla.ui/icons/elcl16/bug-dirty.gif org.eclipse.mylyn.bugzilla.ui/icons/elcl16/bug-favorite.gif org.eclipse.mylyn.bugzilla.ui/icons/elcl16/bug-new.gif org.eclipse.mylyn.bugzilla.ui/icons/elcl16/bug-search-new.gif org.eclipse.mylyn.bugzilla.ui/icons/elcl16/bug-search.gif org.eclipse.mylyn.bugzilla.ui/icons/elcl16/bug-small.gif org.eclipse.mylyn.bugzilla.ui/icons/elcl16/bug.gif org.eclipse.mylyn.bugzilla.ui/icons/elcl16/overlay-conflicting.gif org.eclipse.mylyn.bugzilla.ui/icons/elcl16/overlay-incoming.gif org.eclipse.mylyn.bugzilla.ui/icons/elcl16/overlay-outgoing.gif org.eclipse.mylyn.bugzilla.ui/icons/etool16/task-bug-new.gif org.eclipse.mylyn.bugzilla.ui/icons/etool16/task-bug-refresh.gif org.eclipse.mylyn.bugzilla.ui/icons/etool16/task-bug.gif org.eclipse.mylyn.bugzilla.ui/icons/etool16/task-remote.gif org.eclipse.mylyn.bugzilla.ui/icons/etool16/task-repository-new.gif org.eclipse.mylyn.bugzilla.ui/icons/etool16/task-repository.gif org.eclipse.mylyn.bugzilla.ui/icons/eview16/bugzilla-logo.gif org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-bug.gif org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-bugzilla.gif org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-critical.gif org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-enhancement.gif org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-feature.gif org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-major.gif org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-minor.gif org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-normal.gif org.eclipse.mylyn.bugzilla.ui/icons/find.gif org.eclipse.mylyn.bugzilla.ui/icons/wizban/bug-wizard.gif org.eclipse.mylyn.bugzilla.ui/plugin.xml org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaCompareInput.java org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaCompareNode.java org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaCompareStructureCreator.java org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaImages.java org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiExtensionReader.java org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiPlugin.java org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaCcAttributeEditor.java org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaKeywordAttributeEditor.java org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaPeoplePart.java org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditor.java org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPage.java org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPageFactory.java org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/DummySearchHitProvider.java org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/KeywordsDialog.java org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/NewBugzillaTaskEditor.java org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSeveritySearchSorter.java org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaStateSearchSorter.java org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaConnectorUi.java org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaCustomQueryDialog.java org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaCustomQueryWizardPage.java org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaQueryTypeWizardPage.java org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositorySettingsPage.java org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskEditorFactory.java org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskEditorInput.java org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskListFactory.java org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskListMigrator.java org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/StackTrace.java org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/BugzillaProductPage.java org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/NewBugzillaTaskWizard.java org.eclipse.mylyn.help.ui/.classpath org.eclipse.mylyn.help.ui/.cvsignore org.eclipse.mylyn.help.ui/.externalToolBuilders/org.eclipse.jdt.core.javabuilder.launch org.eclipse.mylyn.help.ui/.project org.eclipse.mylyn.help.ui/.settings/org.eclipse.jdt.core.prefs org.eclipse.mylyn.help.ui/.settings/org.eclipse.jdt.ui.prefs org.eclipse.mylyn.help.ui/.settings/org.eclipse.ltk.core.refactoring.prefs org.eclipse.mylyn.help.ui/.settings/org.eclipse.mylyn.tasklist.prefs org.eclipse.mylyn.help.ui/.settings/org.eclipse.mylyn.tasks.ui.prefs org.eclipse.mylyn.help.ui/.settings/org.eclipse.pde.prefs org.eclipse.mylyn.help.ui/META-INF/MANIFEST.MF org.eclipse.mylyn.help.ui/about.html org.eclipse.mylyn.help.ui/build-user.xml org.eclipse.mylyn.help.ui/build.properties org.eclipse.mylyn.help.ui/cheatsheets/Query.xml org.eclipse.mylyn.help.ui/cheatsheets/TaskFocus.xml org.eclipse.mylyn.help.ui/doc/book.css org.eclipse.mylyn.help.ui/doc/images/2.0/ui-legend.gif org.eclipse.mylyn.help.ui/doc/images/2.0/welcome.gif org.eclipse.mylyn.help.ui/doc/images/2.0/working-sets-edit.gif org.eclipse.mylyn.help.ui/doc/images/2.0/working-sets-switch.gif org.eclipse.mylyn.help.ui/doc/images/2.0M1/bugzilla-local-users.gif org.eclipse.mylyn.help.ui/doc/images/2.0M1/bugzilla-time-tracking.gif org.eclipse.mylyn.help.ui/doc/images/2.0M1/java-editor-hyperlink.gif org.eclipse.mylyn.help.ui/doc/images/2.0M1/jira-editor-hyperlink.gif org.eclipse.mylyn.help.ui/doc/images/2.0M1/task-context-editor.gif org.eclipse.mylyn.help.ui/doc/images/2.0M1/task-editor-progress.gif org.eclipse.mylyn.help.ui/doc/images/2.0M2/bugzilla-due-dates.gif org.eclipse.mylyn.help.ui/doc/images/2.0M2/context-apply-attachments.gif org.eclipse.mylyn.help.ui/doc/images/2.0M2/context-quick-view.gif org.eclipse.mylyn.help.ui/doc/images/2.0M2/hyperlinks-text.gif org.eclipse.mylyn.help.ui/doc/images/2.0M2/jira-java-hyperlinks.gif org.eclipse.mylyn.help.ui/doc/images/2.0M2/repository-settings-proxy.gif org.eclipse.mylyn.help.ui/doc/images/2.0M2/synchronize-view-add.gif org.eclipse.mylyn.help.ui/doc/images/2.0M2/task-editor-warning.gif org.eclipse.mylyn.help.ui/doc/images/2.0M2/tasklist-schedule.gif org.eclipse.mylyn.help.ui/doc/images/2.0M2/trac-hyperlinks.gif org.eclipse.mylyn.help.ui/doc/images/2.0M3/annotation-hyperlinks.gif org.eclipse.mylyn.help.ui/doc/images/2.0M3/bugzilla-subtasks.gif org.eclipse.mylyn.help.ui/doc/images/2.0M3/jira-attachments.gif org.eclipse.mylyn.help.ui/doc/images/2.0M3/task-editor-error.gif org.eclipse.mylyn.help.ui/doc/images/2.0M3/task-tooltip-incoming.gif org.eclipse.mylyn.help.ui/doc/images/2.0M3/tasklist-tree.gif org.eclipse.mylyn.help.ui/doc/images/2.0M3/tasks-content-assist.gif org.eclipse.mylyn.help.ui/doc/images/2.0M3/tasks-working-sets.gif org.eclipse.mylyn.help.ui/doc/images/2.0M3/team-hyperlinks-annotations.gif org.eclipse.mylyn.help.ui/doc/images/2.0M3/team-hyperlinks-history.gif org.eclipse.mylyn.help.ui/doc/images/2.0M3/ui-legend-connectors.gif org.eclipse.mylyn.help.ui/doc/images/2.0M3/ui-usage-report.gif org.eclipse.mylyn.help.ui/doc/images/2.1M1/bugzilla-cached-config.png org.eclipse.mylyn.help.ui/doc/images/2.1M1/bugzilla-custom-resolutions.png org.eclipse.mylyn.help.ui/doc/images/2.1M1/bugzilla-search-keywords.png org.eclipse.mylyn.help.ui/doc/images/2.1M1/screenshot-capture.png org.eclipse.mylyn.help.ui/doc/images/2.1M1/spelling-corrections.png org.eclipse.mylyn.help.ui/doc/images/2.1M1/task-editor-hyperlinks.png org.eclipse.mylyn.help.ui/doc/images/2.1M1/tasklist-search.png org.eclipse.mylyn.help.ui/doc/images/mylyn-2.0.png org.eclipse.mylyn.help.ui/doc/new.html org.eclipse.mylyn.help.ui/doc/overview.html org.eclipse.mylyn.help.ui/doc/toc.xml org.eclipse.mylyn.help.ui/icons/etool16/icons-legend.gif org.eclipse.mylyn.help.ui/images/mylyn-overview-small.gif org.eclipse.mylyn.help.ui/images/mylyn-overview.gif org.eclipse.mylyn.help.ui/images/topiclabel/ov_legend48.gif org.eclipse.mylyn.help.ui/images/topiclabel/ov_legend48_hov.gif org.eclipse.mylyn.help.ui/images/topiclabel/ov_mylyn48.gif org.eclipse.mylyn.help.ui/images/topiclabel/ov_mylyn48_hov.gif org.eclipse.mylyn.help.ui/images/topiclabel/tu_query48.gif org.eclipse.mylyn.help.ui/images/topiclabel/tu_query48_hov.gif org.eclipse.mylyn.help.ui/images/topiclabel/tu_task48.gif org.eclipse.mylyn.help.ui/images/topiclabel/tu_task48_hov.gif org.eclipse.mylyn.help.ui/images/topiclabel/wn_mylyn48.gif org.eclipse.mylyn.help.ui/images/topiclabel/wn_mylyn48_hov.gif org.eclipse.mylyn.help.ui/intro/css/overview.css org.eclipse.mylyn.help.ui/intro/css/tutorials.css org.eclipse.mylyn.help.ui/intro/css/whatsnew.css org.eclipse.mylyn.help.ui/intro/overviewExtensionContent.xml org.eclipse.mylyn.help.ui/intro/tutorialsExtensionContent.xml org.eclipse.mylyn.help.ui/intro/whatsnewExtensionContent.xml org.eclipse.mylyn.help.ui/plugin.xml org.eclipse.mylyn.help.ui/src/org/eclipse/mylyn/internal/help/ui/actions/ShowMylynLegendAction.java org.eclipse.mylyn.help.ui/src/org/eclipse/mylyn/internal/help/ui/dialogs/UiLegendDialog.java org.eclipse.mylyn.sdk-feature/build.properties org.eclipse.mylyn.sdk-feature/feature.xml org.eclipse.mylyn.tasks.core/.settings/org.eclipse.jdt.core.prefs org.eclipse.mylyn.tasks.core/.settings/org.eclipse.jdt.ui.prefs org.eclipse.mylyn.tasks.core/.settings/org.eclipse.mylyn.tasklist.prefs org.eclipse.mylyn.tasks.core/META-INF/MANIFEST.MF org.eclipse.mylyn.tasks.core/about.html org.eclipse.mylyn.tasks.core/build.properties org.eclipse.mylyn.tasks.core/plugin.xml org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/AbstractSearchHandler.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/AbstractTask.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/AbstractTaskCategory.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/AbstractTaskContainer.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/CommentQuoter.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/DateRange.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/IRepositoryConstants.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/IRepositoryModelListener.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ITaskDataStorage.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ITaskJobFactory.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ITaskList.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ITaskListChangeListener.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ITaskListRunnable.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ITaskRepositoryFilter.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ITasksCoreConstants.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/IdentityAttributeFactory.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/LocalAttachment.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/LocalRepositoryConnector.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/LocalTask.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/LocalTaskListFactory.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/OfflineDataStore.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/Person.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/RepositoryExternalizationParticipant.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/RepositoryPerson.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/RepositoryQuery.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/RepositoryTaskHandleUtil.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/RepositoryTemplateManager.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/SaxRepositoriesContentHandler.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/SaxRepositoriesWriter.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ScheduledTaskContainer.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskActivationHistory.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskActivityManager.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskActivityUtil.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskAttachment.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskCategory.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskComment.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskContainerDelta.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskDataState.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskDataStorageManager.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskExternalizationException.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskGroup.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskList.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskRepositoriesExternalizer.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskRepositoryAdapter.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskRepositoryLocation.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskRepositoryManager.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskTask.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TasksModel.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/UncategorizedTaskContainer.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/UnmatchedTaskContainer.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/WeekDateRange.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/ElementHandler.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/FileTaskAttachmentSource.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/ITaskDataConstants.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/ITaskDataManagerListener.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataExternalizer.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataManager.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataManagerEvent.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataState.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataStateReader.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataStateWriter.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataStore.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TextTaskAttachmentSource.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/AbstractAttachmentHandler.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/AbstractAttributeFactory.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/AbstractLegacyDuplicateDetector.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/AbstractLegacyRepositoryConnector.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/AbstractTaskDataHandler.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/AbstractTaskListFactory.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/AttributeContainer.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/DefaultTaskSchema.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/FileAttachment.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/ITaskAttachment.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/ITaskCollector.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/ITaskFactory.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/LegacyTaskDataCollector.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/QueryHitCollector.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/RepositoryAttachment.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/RepositoryOperation.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/RepositoryTaskAttribute.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/RepositoryTaskData.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/TaskComment.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/TaskFactory.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/TaskSelection.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/AbstractExternalizationParticipant.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/DelegatingTaskExternalizer.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/ExternalizationManager.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/IExternalizationContext.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/IExternalizationParticipant.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/TaskListExternalizationParticipant.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/TaskListExternalizer.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SubmitTaskAttachmentJob.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SubmitTaskJob.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizationSession.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeQueriesJob.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeRepositoriesJob.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeTasksJob.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractDuplicateDetector.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractRepositoryConnector.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskListMigrator.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/IAttributeContainer.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/IRepositoryElement.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/IRepositoryListener.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/IRepositoryManager.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/IRepositoryModel.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/IRepositoryPerson.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/IRepositoryQuery.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITask.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskActivationListener.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskActivityListener.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskActivityManager.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskAttachment.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskComment.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskContainer.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskMapping.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/RepositoryResponse.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/RepositoryStatus.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/RepositoryTemplate.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskActivationAdapter.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskActivityAdapter.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskMapping.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepository.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepositoryLocationFactory.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/AbstractTaskAttachmentHandler.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/AbstractTaskAttachmentSource.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/AbstractTaskDataHandler.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/ITaskDataManager.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/ITaskDataWorkingCopy.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttachmentMapper.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttachmentModel.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttribute.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttributeMapper.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttributeMetaData.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskCommentMapper.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskData.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskDataCollector.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskDataModel.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskDataModelEvent.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskDataModelListener.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskMapper.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskOperation.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskRelation.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/sync/ISynchronizationSession.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/sync/SubmitJob.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/sync/SubmitJobEvent.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/sync/SubmitJobListener.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/sync/SynchronizationJob.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/sync/TaskJob.java org.eclipse.mylyn.tasks.tests/.classpath org.eclipse.mylyn.tasks.tests/.cvsignore org.eclipse.mylyn.tasks.tests/.project org.eclipse.mylyn.tasks.tests/.settings/org.eclipse.jdt.core.prefs org.eclipse.mylyn.tasks.tests/.settings/org.eclipse.jdt.ui.prefs org.eclipse.mylyn.tasks.tests/.settings/org.eclipse.ltk.core.refactoring.prefs org.eclipse.mylyn.tasks.tests/.settings/org.eclipse.mylyn.tasklist.prefs org.eclipse.mylyn.tasks.tests/.settings/org.eclipse.mylyn.tasks.ui.prefs org.eclipse.mylyn.tasks.tests/.settings/org.eclipse.pde.api.tools.prefs org.eclipse.mylyn.tasks.tests/.settings/org.eclipse.pde.prefs org.eclipse.mylyn.tasks.tests/META-INF/MANIFEST.MF org.eclipse.mylyn.tasks.tests/about.html org.eclipse.mylyn.tasks.tests/build.properties org.eclipse.mylyn.tasks.tests/plugin.xml org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AbstractTaskContainerTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AbstractTaskDataHandlerTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AllTasksPerformanceTests.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AllTasksTests.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AttachmentJobTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AttachmentSizeFormatterTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/BackgroundSaveTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/CommentQuoterTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/CopyDetailsActionTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/DateRangeTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/LinkProviderTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/NewTaskFromSelectionActionTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/NewTaskWizardRepositorySelectionTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/OfflineCachingStorageTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/OfflineStorageTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/OrphanedTasksTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/PersonProposalProviderTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ProjectRepositoryAssociationTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/QueryExportImportTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/RepositorySettingsPageTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/RepositoryTaskSynchronizationTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ScheduledPresentationTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TableSorterTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivationActionTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivationHistoryTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivityListenerTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivityTimingTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskDataExportTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskDataImportTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskDataStorageManagerTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskDiffUtilTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskExportImportTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskHistoryTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskKeyComparatorTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskList06DataMigrationTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListBackupManagerTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListContentProviderTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListDnDTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListManagerTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListPresentationTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListSaveManagerTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListUiTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskPlanningEditorTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositoriesExternalizerTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositoryFilterTests.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositoryLocationTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositoryManagerTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositorySorterTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositoryTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskTestUtil.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskWorkingSetTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TasksTestsPlugin.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TasksUiUtilTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockAttachmentHandler.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockAttributeFactory.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockRepositoryConnector.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockRepositoryConnectorUi.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockRepositoryQuery.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockTask.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockTaskListFactory.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/data/TaskDataExternalizerTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/performance/TaskContainerTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/performance/TaskListPerformanceTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/web/HtmlDecodeEntityTest.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/web/NamedPatternTest.java org.eclipse.mylyn.tasks.tests/testdata/legacy/tasklist_0_4_8.xml org.eclipse.mylyn.tasks.tests/testdata/performance/tasklist-4000.xml.zip org.eclipse.mylyn.tasks.tests/testdata/taskdata-1.0-bug-219897.zip org.eclipse.mylyn.tasks.tests/testdata/taskdataimporttest/context-history.xml org.eclipse.mylyn.tasks.tests/testdata/taskdataimporttest/local-69.xml org.eclipse.mylyn.tasks.tests/testdata/taskdataimporttest/local-70.xml org.eclipse.mylyn.tasks.tests/testdata/taskdataimporttest/mylardata-2006-02-16.zip org.eclipse.mylyn.tasks.tests/testdata/taskdataimporttest/mylardata-2007-01-19.zip org.eclipse.mylyn.tasks.tests/testdata/taskdataimporttest/repositories.xml org.eclipse.mylyn.tasks.tests/testdata/taskdataimporttest/tasklist.xml org.eclipse.mylyn.tasks.tests/testdata/tasklistdatamigrationtest/empty.txt org.eclipse.mylyn.tasks.ui/.classpath org.eclipse.mylyn.tasks.ui/.cvsignore org.eclipse.mylyn.tasks.ui/.options org.eclipse.mylyn.tasks.ui/.project org.eclipse.mylyn.tasks.ui/.settings/.api_filters org.eclipse.mylyn.tasks.ui/.settings/org.eclipse.jdt.core.prefs org.eclipse.mylyn.tasks.ui/.settings/org.eclipse.jdt.ui.prefs org.eclipse.mylyn.tasks.ui/.settings/org.eclipse.ltk.core.refactoring.prefs org.eclipse.mylyn.tasks.ui/.settings/org.eclipse.mylyn.tasklist.prefs org.eclipse.mylyn.tasks.ui/.settings/org.eclipse.mylyn.tasks.ui.prefs org.eclipse.mylyn.tasks.ui/.settings/org.eclipse.pde.prefs org.eclipse.mylyn.tasks.ui/META-INF/MANIFEST.MF org.eclipse.mylyn.tasks.ui/about.html org.eclipse.mylyn.tasks.ui/build.properties org.eclipse.mylyn.tasks.ui/doc/book.css org.eclipse.mylyn.tasks.ui/doc/bugzilla.html org.eclipse.mylyn.tasks.ui/doc/images/tasklist-overview.gif org.eclipse.mylyn.tasks.ui/doc/planning.html org.eclipse.mylyn.tasks.ui/doc/tasklist.html org.eclipse.mylyn.tasks.ui/doc/toc.xml org.eclipse.mylyn.tasks.ui/icons/archive/bug-search.gif org.eclipse.mylyn.tasks.ui/icons/archive/filter-archive.gif org.eclipse.mylyn.tasks.ui/icons/archive/find.gif org.eclipse.mylyn.tasks.ui/icons/archive/overlay-due.gif org.eclipse.mylyn.tasks.ui/icons/archive/overlay-offline.gif org.eclipse.mylyn.tasks.ui/icons/archive/overlay-repository-context.gif org.eclipse.mylyn.tasks.ui/icons/archive/overlay-repository.gif org.eclipse.mylyn.tasks.ui/icons/archive/overlay-web.gif org.eclipse.mylyn.tasks.ui/icons/archive/task-activity.gif org.eclipse.mylyn.tasks.ui/icons/archive/task-bug.gif org.eclipse.mylyn.tasks.ui/icons/archive/task-items.gif org.eclipse.mylyn.tasks.ui/icons/archive/task-repository-completed.gif org.eclipse.mylyn.tasks.ui/icons/archive/task-repository-notes.gif org.eclipse.mylyn.tasks.ui/icons/archive/task-server.gif org.eclipse.mylyn.tasks.ui/icons/elcl16/bug-search.gif org.eclipse.mylyn.tasks.ui/icons/etool16/bug-report.gif org.eclipse.mylyn.tasks.ui/icons/etool16/calendar.gif org.eclipse.mylyn.tasks.ui/icons/etool16/capture-pause.gif org.eclipse.mylyn.tasks.ui/icons/etool16/category-archive.gif org.eclipse.mylyn.tasks.ui/icons/etool16/category-new.gif org.eclipse.mylyn.tasks.ui/icons/etool16/category.gif org.eclipse.mylyn.tasks.ui/icons/etool16/comment.gif org.eclipse.mylyn.tasks.ui/icons/etool16/compare.png org.eclipse.mylyn.tasks.ui/icons/etool16/context-add.gif org.eclipse.mylyn.tasks.ui/icons/etool16/context-attach.gif org.eclipse.mylyn.tasks.ui/icons/etool16/context-clear.gif org.eclipse.mylyn.tasks.ui/icons/etool16/context-retrieve.gif org.eclipse.mylyn.tasks.ui/icons/etool16/context-transfer.gif org.eclipse.mylyn.tasks.ui/icons/etool16/export.gif org.eclipse.mylyn.tasks.ui/icons/etool16/import.gif org.eclipse.mylyn.tasks.ui/icons/etool16/navigate-next.gif org.eclipse.mylyn.tasks.ui/icons/etool16/navigate-previous-active.gif org.eclipse.mylyn.tasks.ui/icons/etool16/navigate-previous-pause.gif org.eclipse.mylyn.tasks.ui/icons/etool16/navigate-previous.gif org.eclipse.mylyn.tasks.ui/icons/etool16/open-repository-task.gif org.eclipse.mylyn.tasks.ui/icons/etool16/open-task.gif org.eclipse.mylyn.tasks.ui/icons/etool16/person.gif org.eclipse.mylyn.tasks.ui/icons/etool16/query-new.gif org.eclipse.mylyn.tasks.ui/icons/etool16/query-unmatched.png org.eclipse.mylyn.tasks.ui/icons/etool16/query.gif org.eclipse.mylyn.tasks.ui/icons/etool16/reply.gif org.eclipse.mylyn.tasks.ui/icons/etool16/repository-new.gif org.eclipse.mylyn.tasks.ui/icons/etool16/repository-submit.gif org.eclipse.mylyn.tasks.ui/icons/etool16/repository-synchronize.gif org.eclipse.mylyn.tasks.ui/icons/etool16/sub-task-new.gif org.eclipse.mylyn.tasks.ui/icons/etool16/task-active-centered.gif org.eclipse.mylyn.tasks.ui/icons/etool16/task-active.gif org.eclipse.mylyn.tasks.ui/icons/etool16/task-complete.gif org.eclipse.mylyn.tasks.ui/icons/etool16/task-completed.gif org.eclipse.mylyn.tasks.ui/icons/etool16/task-context.gif org.eclipse.mylyn.tasks.ui/icons/etool16/task-inactive-centered.gif org.eclipse.mylyn.tasks.ui/icons/etool16/task-inactive.gif org.eclipse.mylyn.tasks.ui/icons/etool16/task-incomplete.gif org.eclipse.mylyn.tasks.ui/icons/etool16/task-narrow.gif org.eclipse.mylyn.tasks.ui/icons/etool16/task-new.gif org.eclipse.mylyn.tasks.ui/icons/etool16/task-notes.gif org.eclipse.mylyn.tasks.ui/icons/etool16/task-remote.gif org.eclipse.mylyn.tasks.ui/icons/etool16/task-repository-history.gif org.eclipse.mylyn.tasks.ui/icons/etool16/task-repository-new.gif org.eclipse.mylyn.tasks.ui/icons/etool16/task-repository.gif org.eclipse.mylyn.tasks.ui/icons/etool16/task-retrieve.gif org.eclipse.mylyn.tasks.ui/icons/etool16/task.gif org.eclipse.mylyn.tasks.ui/icons/etool16/tasklist-export.png org.eclipse.mylyn.tasks.ui/icons/etool16/tasklist-import.png org.eclipse.mylyn.tasks.ui/icons/eview16/focus.gif org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-due.gif org.eclipse.mylyn.tasks.ui/icons/eview16/perspective-planning.png org.eclipse.mylyn.tasks.ui/icons/eview16/repositories-blue.gif org.eclipse.mylyn.tasks.ui/icons/eview16/repositories.gif org.eclipse.mylyn.tasks.ui/icons/eview16/repository-middle.gif org.eclipse.mylyn.tasks.ui/icons/eview16/repository.gif org.eclipse.mylyn.tasks.ui/icons/eview16/task-list.gif org.eclipse.mylyn.tasks.ui/icons/eview16/task-search.gif org.eclipse.mylyn.tasks.ui/icons/obj16/attachment-patch.gif org.eclipse.mylyn.tasks.ui/icons/obj16/repository-small.gif org.eclipse.mylyn.tasks.ui/icons/obj16/workingSet.gif org.eclipse.mylyn.tasks.ui/icons/ovr16/overlay-local.gif org.eclipse.mylyn.tasks.ui/icons/wizban/banner-repository-context.gif org.eclipse.mylyn.tasks.ui/icons/wizban/banner-repository-settings.gif org.eclipse.mylyn.tasks.ui/icons/wizban/banner-repository.gif org.eclipse.mylyn.tasks.ui/icons/wizban/secur_role_wiz.gif org.eclipse.mylyn.tasks.ui/icons/wizban/workset_wiz.png org.eclipse.mylyn.tasks.ui/plugin.xml org.eclipse.mylyn.tasks.ui/schema/actions.exsd org.eclipse.mylyn.tasks.ui/schema/duplicateDetectors.exsd org.eclipse.mylyn.tasks.ui/schema/editors.exsd org.eclipse.mylyn.tasks.ui/schema/presentations.exsd org.eclipse.mylyn.tasks.ui/schema/projectLinkProviders.exsd org.eclipse.mylyn.tasks.ui/schema/repositories.exsd org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/AbstractTaskListFilter.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ActivityExternalizationParticipant.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/AddExistingTaskJob.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/AttachmentUtil.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/CategorizedPresentation.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ComboSelectionDialog.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/IDynamicSubMenuContributor.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ITaskCommandIds.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ITaskHighlighter.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ITaskListNotificationProvider.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ITasksUiPreferenceConstants.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/LegacyChangeManager.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/LocalRepositoryConnectorUi.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/MoveToCategoryMenuContributor.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/OfflineCachingStorage.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/OfflineFileStorage.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/OpenRepositoryTaskJob.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/PersonContentProposal.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/PersonProposalLabelProvider.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/PersonProposalProvider.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/PlanningPerspectiveFactory.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/RefactorRepositoryUrlOperation.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/RepositoryAwareStatusHandler.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/RepositoryReport.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ScheduleDatePicker.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ScheduleTaskMenuContributor.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ScheduledPresentation.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskActivityMonitor.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskArchiveFilter.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskCompletionFilter.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskEditorBloatMonitor.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskHistoryDropDown.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskHistoryHandler.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskJobFactory.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskLabelDecorator.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListBackupManager.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListHyperlink.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListManager.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListModifyOperation.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListSynchronizationScheduler.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskPriorityFilter.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskRepositoryAdapterFactory.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskRepositoryLocationUi.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskRepositoryUtil.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskSearchPage.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskTransfer.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskTrimWidget.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskWorkingSetFilter.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksAdapterFactory.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksReminderDialog.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksUiMessages.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksUiPlugin.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AbstractChangeCompletionAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AbstractTaskAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AbstractTaskEditorAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AbstractTaskRepositoryAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ActivateTaskDialogAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ActivateTaskHistoryDropDownAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AddRepositoryAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AddRepositoryTaskAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AttachAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AttachScreenshotAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ClearOutgoingAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CloneTaskAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CollapseAllAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CompareAttachmentsAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CopyAttachmentToClipboardJob.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CopyTaskDetailsAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DeactivateAllTasksAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DeleteAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DeleteTaskRepositoryAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DownloadAttachmentJob.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/EditRepositoryPropertiesAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ExpandAllAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/FilterArchiveContainerAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/FilterCompletedTasksAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/GoIntoAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/GoUpAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/GroupSubTasksAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/LinkWithEditorAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ManageEditorsAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/MarkTaskCompleteAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/MarkTaskIncompleteAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/MoveTaskToRootAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewCategoryAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewQueryAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewSubTaskAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewTaskAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewTaskFromSelectionAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenRepositoryTask.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTaskAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTaskListElementAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTaskSearchAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTasksUiPreferencesAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenWithBrowserAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/PresentationDropDownSelectionAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/QueryCloneAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/QueryExportAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/QueryImportAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RefreshRepositoryTasksAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RemoveFromCategoryAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RenameAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RestoreTaskListAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/SearchForRepositoryTask.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ShowInTaskListAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ShowTaskRepositoriesViewAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/SynchronizeAllAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/SynchronizeAutomaticallyAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/SynchronizeEditorAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/SynchronizeSelectedAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskActivateAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskDeactivateAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskEditorCopyAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskExportAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskImportAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskListSortAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskSelectionDialog.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskWorkingSetAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ToggleAllWorkingSetsAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ToggleTaskActivationAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ToggleWorkingSetAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/AbstractTaskHandler.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/AbstractTaskListViewHandler.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/AddTaskRepositoryHandler.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/GoToUnreadTaskHandler.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/MarkTaskHandler.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/NewLocalTaskHandler.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/NewSubTaskHandler.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/OpenSelectedTaskHandler.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/OpenTaskAttachmentInBrowserHandler.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/OpenTaskAttachmentInDefaultEditorHandler.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/OpenTaskListElementPropertiesHandler.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/RemoteTaskSelectionDialog.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/TaskListToolTipHandler.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/TaskRepositoryParameterValues.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/deprecated/AbstractNewRepositoryTaskEditor.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/deprecated/AbstractRepositoryQueryWizard.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/deprecated/AbstractRepositoryTaskEditor.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/deprecated/AbstractRepositoryTaskEditorInput.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/deprecated/AbstractTaskEditorFactory.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/deprecated/NewTaskEditorInput.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/deprecated/RepositoryTaskEditorInput.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/deprecated/TaskFactory.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/deprecated/TaskFormPage.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/AbstractWorkingSetDialogCOPY.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/TaskListSortDialog.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/TaskRepositoryCredentialsDialog.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AbstractReplyToCommentAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AttachmentSizeFormatter.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AttachmentTableLabelProvider.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AttachmentTableLabelProvider2.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AttachmentsTableContentProvider.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AttachmentsTableContentProvider2.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/BooleanAttributeEditor.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/CategoryEditor.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/CategoryEditorInput.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/ContentOutlineTools.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/ControlSelectionService.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/DateAttributeEditor.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/EditorBusyIndicator.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/EditorUtil.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/IBusyEditor.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/IRepositoryTaskAttributeListener.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/IRepositoryTaskSelection.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/LongTextAttributeEditor.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/MultiSelectionAttributeEditor.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/PersonAttributeEditor.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/PlanningPageFactory.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/PreviewAttributeEditor.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryAttachmentEditorInput.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryCompletionProcessor.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTaskEditorDropListener.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTaskOutlineComparer.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTaskOutlineNode.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTaskOutlinePage.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTaskSelection.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTextViewer.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTextViewerConfiguration.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RichTextAttributeEditor.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/SingleSelectionAttributeEditor.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/SpellingDialog.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskAttachmentEditorInput.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorActionContributor.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorActionPart.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorAttachmentPart.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorAttributePart.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorDescriptionPart.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorInputFactory.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorNewCommentPart.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorOutlineNode.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorOutlinePage.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorPeoplePart.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorPlanningPart.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorRichTextPart.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorSummaryPart.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskHyperlinkDetector.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskListChangeAdapter.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskPlanningEditor.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskRelationHyperlinkDetector.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskSpellingReconcileStrategy.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskUrlHyperlink.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskUrlHyperlinkDetector.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TextAttributeEditor.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskAttributeDiff.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskDataDiff.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskDiffUtil.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskListNotification.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskListNotificationPopup.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskListNotificationQueryIncoming.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskListNotificationReminder.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskListNotifier.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/preferences/TaskFocusedUiPreferencePage.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/preferences/TasksUiPreferencePage.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/properties/ProjectPropertiesLinkProvider.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/properties/ProjectTaskRepositoryPage.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/AbstractRepositorySearchQuery.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/CreateQueryFromSearchAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/OpenSearchResultAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/RepositorySearchResult.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/RepositorySearchResultView.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchHitCollector.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultContentProvider.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultSortAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultSorterDescription.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultSorterId.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultSorterPriority.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultTreeContentProvider.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultsLabelProvider.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchScoreComputerAdapterFactory.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/StackTraceDuplicateDetector.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/BackgroundSaveTimer.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/IBackgroundSaveListener.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/SelectionProviderAdapter.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskDataExportOperation.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskDragSourceListener.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskListElementImporter.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskPropertyTester.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TasksUiExtensionReader.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TasksUiInternal.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/WebBrowserDialog.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/AbstractTaskListContentProvider.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/AbstractTaskListPresentation.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/CopyOfTaskListView.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/CustomTaskListDecorationDrawer.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/DisconnectRepositoryAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/PriorityDropDownAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/SortyByDropDownAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TableDecoratingLabelProvider.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskDetailLabelProvider.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskInputDialog.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskKeyComparator.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListCellModifier.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListContentProvider.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListDropAdapter.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListFilteredTree.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListInterestFilter.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListInterestSorter.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListTableSorter.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListToolTip.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoriesSorter.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoriesView.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoryLabelProvider.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskScheduleContentProvider.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskTableLabelProvider.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/UpdateRepositoryConfigurationAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/WorkweekProgressBar.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/AddExistingTaskWizard.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/CommonAddExistingTaskWizard.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/EditRepositoryWizard.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ExistingTaskWizardPage.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ImageAttachment.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/InputAttachmentSourcePage.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/InputAttachmentSourcePage2.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/MultiRepositoryAwareWizard.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewAttachmentPage.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewAttachmentWizard.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewAttachmentWizardDialog.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewLocalCategoryWizard.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewLocalTaskWizard.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewQueryWizard.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewRepositoryWizard.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewTaskPage.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewTaskWizard.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewWebTaskPage.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/PreviewAttachmentPage.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/PreviewAttachmentPage2.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ScreenshotAttachmentPage.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/SelectRepositoryConnectorPage.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/SelectRepositoryPage.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskAttachmentWizard.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataExportWizard.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataExportWizardPage.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataImportWizard.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataImportWizardPage.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/workingsets/TaskWorkingSetAdapterFactory.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/workingsets/TaskWorkingSetElementAdapter.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/workingsets/TaskWorkingSetElementFactory.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/workingsets/TaskWorkingSetPage.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/workingsets/TaskWorkingSetUpdater.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/workingsets/WorkingSetLabelComparator.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/AbstractRepositoryConnectorUi.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/AbstractTaskRepositoryLinkProvider.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/ITasksUiConstants.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/LegendElement.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskElementLabelProvider.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskHyperlink.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskRepositoryLocationUiFactory.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUi.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiImages.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiUtil.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractAttributeEditor.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRenderingEngine.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPageFactory.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPart.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AttributeEditorFactory.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AttributeEditorToolkit.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/BrowserFormPage.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/LayoutHint.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditor.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditorInput.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditorPartDescriptor.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositoryQueryPage.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositorySettingsPage.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/ITaskRepositoryPage.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/ITaskSearchPage.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/ITaskSearchPageContainer.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/NewTaskWizard.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/NewWebTaskWizard.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/RepositoryQueryWizard.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/TaskAttachmentPage.java org.eclipse.mylyn.test-feature/.project org.eclipse.mylyn.test-feature/.settings/org.eclipse.mylyn.tasks.ui.prefs org.eclipse.mylyn.test-feature/about.html org.eclipse.mylyn.test-feature/build.properties org.eclipse.mylyn.test-feature/epl-v10.html org.eclipse.mylyn.test-feature/feature.xml org.eclipse.mylyn.test-feature/license.html org.eclipse.mylyn.trac-feature/.project org.eclipse.mylyn.trac-feature/.settings/org.eclipse.jdt.core.prefs org.eclipse.mylyn.trac-feature/.settings/org.eclipse.jdt.ui.prefs org.eclipse.mylyn.trac-feature/.settings/org.eclipse.mylyn.tasklist.prefs org.eclipse.mylyn.trac-feature/.settings/org.eclipse.mylyn.tasks.ui.prefs org.eclipse.mylyn.trac-feature/about.html org.eclipse.mylyn.trac-feature/build.properties org.eclipse.mylyn.trac-feature/epl-v10.html org.eclipse.mylyn.trac-feature/feature.xml org.eclipse.mylyn.trac-feature/license.html org.eclipse.mylyn.trac.core/.classpath org.eclipse.mylyn.trac.core/.cvsignore org.eclipse.mylyn.trac.core/.project org.eclipse.mylyn.trac.core/.settings/org.eclipse.jdt.core.prefs org.eclipse.mylyn.trac.core/.settings/org.eclipse.jdt.ui.prefs org.eclipse.mylyn.trac.core/.settings/org.eclipse.ltk.core.refactoring.prefs org.eclipse.mylyn.trac.core/.settings/org.eclipse.mylyn.tasklist.prefs org.eclipse.mylyn.trac.core/.settings/org.eclipse.mylyn.tasks.ui.prefs org.eclipse.mylyn.trac.core/.settings/org.eclipse.pde.prefs org.eclipse.mylyn.trac.core/META-INF/MANIFEST.MF org.eclipse.mylyn.trac.core/about.html org.eclipse.mylyn.trac.core/build.properties org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/AbstractTracClient.java org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/AbstractWikiHandler.java org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/ITracClient.java org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/ITracWikiClient.java org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/InvalidTicketException.java org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/InvalidWikiPageException.java org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracAttachmentHandler.java org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracAttributeFactory.java org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracClientData.java org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracClientFactory.java org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracClientManager.java org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracCorePlugin.java org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracException.java org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracLoginException.java org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracNoSuchMethodException.java org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracPermissionDeniedException.java org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracProxyAuthenticationException.java org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracRemoteException.java org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracRepositoryConnector.java org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracRepositoryQuery.java org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracStatus.java org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracTask.java org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracTaskDataHandler.java org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracWebClient.java org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracWikiHandler.java org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracXmlRpcClient.java org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracAttachment.java org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracAttribute.java org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracComment.java org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracComponent.java org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracMilestone.java org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracPriority.java org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracSearch.java org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracSearchFilter.java org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracSeverity.java org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracTicket.java org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracTicketAttribute.java org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracTicketField.java org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracTicketResolution.java org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracTicketStatus.java org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracTicketType.java org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracVersion.java org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracWikiPage.java org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracWikiPageInfo.java org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/util/TracHttpClientTransportFactory.java org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/util/TracUtils.java org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/util/TracXmlRpcClientRequest.java org.eclipse.mylyn.trac.tests/.classpath org.eclipse.mylyn.trac.tests/.cvsignore org.eclipse.mylyn.trac.tests/.project org.eclipse.mylyn.trac.tests/.settings/org.eclipse.jdt.core.prefs org.eclipse.mylyn.trac.tests/.settings/org.eclipse.jdt.ui.prefs org.eclipse.mylyn.trac.tests/.settings/org.eclipse.ltk.core.refactoring.prefs org.eclipse.mylyn.trac.tests/.settings/org.eclipse.mylyn.tasklist.prefs org.eclipse.mylyn.trac.tests/.settings/org.eclipse.mylyn.tasks.ui.prefs org.eclipse.mylyn.trac.tests/.settings/org.eclipse.pde.prefs org.eclipse.mylyn.trac.tests/META-INF/MANIFEST.MF org.eclipse.mylyn.trac.tests/about.html org.eclipse.mylyn.trac.tests/build.properties org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtilTest.java org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AbstractTracClientRepositoryTest.java org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AbstractTracClientSearchTest.java org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AbstractTracClientTest.java org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracTests.java org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/MockAttachment.java org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/RepositorySearchQueryTest.java org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TestProxy.java org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracAttachmentHandlerTest.java org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientFactoryTest.java org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientManagerTest.java org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientProxyTest.java org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracQueryTest.java org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryConnectorTest.java org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryQueryTest.java org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositorySettingsPageTest.java org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracSearchTest.java org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTaskDataHandlerTest.java org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTaskEditorTest.java org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTaskTest.java org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTestConstants.java org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTicketTest.java org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracWebClientSearchTest.java org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracWebClientTest.java org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracXmlRpcClientSearchTest.java org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracXmlRpcClientTest.java org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracXmlRpcTest.java org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TestFixture.java org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracTestCleanupUtil.java org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracTestUtil.java org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/XmlRpcServer.java org.eclipse.mylyn.trac.ui/.classpath org.eclipse.mylyn.trac.ui/.cvsignore org.eclipse.mylyn.trac.ui/.project org.eclipse.mylyn.trac.ui/.settings/org.eclipse.jdt.core.prefs org.eclipse.mylyn.trac.ui/.settings/org.eclipse.jdt.ui.prefs org.eclipse.mylyn.trac.ui/.settings/org.eclipse.ltk.core.refactoring.prefs org.eclipse.mylyn.trac.ui/.settings/org.eclipse.mylyn.tasklist.prefs org.eclipse.mylyn.trac.ui/.settings/org.eclipse.mylyn.tasks.ui.prefs org.eclipse.mylyn.trac.ui/.settings/org.eclipse.pde.prefs org.eclipse.mylyn.trac.ui/META-INF/MANIFEST.MF org.eclipse.mylyn.trac.ui/about.html org.eclipse.mylyn.trac.ui/build.properties org.eclipse.mylyn.trac.ui/icons/etool16/task-repository.gif org.eclipse.mylyn.trac.ui/icons/eview16/overlay-critical.gif org.eclipse.mylyn.trac.ui/icons/eview16/overlay-enhancement.gif org.eclipse.mylyn.trac.ui/icons/eview16/overlay-trac.gif org.eclipse.mylyn.trac.ui/icons/eview16/trac-icon.gif org.eclipse.mylyn.trac.ui/plugin.xml org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracConnectorUi.java org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkDetector.java org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtil.java org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracImages.java org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracTaskListFactory.java org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracUiPlugin.java org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/WebHyperlink.java org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/NewTracTaskEditor.java org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracDuplicateDetector.java org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracRenderingEngine.java org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracTaskEditor.java org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracTaskEditorFactory.java org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/EditTracQueryWizard.java org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/NewTracQueryWizard.java org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/NewTracTaskPage.java org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracCustomQueryPage.java org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracQueryWizardPage.java org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracRepositorySettingsPage.java
-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.prefs340
-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.tasklist.prefs4
-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.MF17
-rw-r--r--org.eclipse.mylyn.bugzilla.core/about.html27
-rw-r--r--org.eclipse.mylyn.bugzilla.core/build-user.xml3
-rw-r--r--org.eclipse.mylyn.bugzilla.core/build.properties14
-rw-r--r--org.eclipse.mylyn.bugzilla.core/plugin.xml13
-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.java130
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/AttachmentPartSource.java40
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttribute.java212
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttributeFactory.java158
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttributeMapper.java198
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java1408
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClientFactory.java36
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClientManager.java64
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaComment.java23
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaCorePlugin.java387
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaCustomField.java57
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaFlag.java72
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaLanguageSettings.java98
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaMessages.java46
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaMessages.properties21
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaOperation.java64
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryConnector.java546
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryQuery.java39
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaStackTraceDuplicateDetector.java59
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaStatus.java108
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTask.java69
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskAttachmentHandler.java153
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java284
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/GzipGetMethod.java67
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/GzipPostMethod.java66
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/IBugzillaConstants.java280
-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/MultiBugReportFactory.java57
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/RepositoryConfiguration.java592
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/RepositoryConfigurationFactory.java54
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/RepositoryQueryResultsFactory.java39
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxBugzillaQueryContentHandler.java93
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxConfigurationContentHandler.java505
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxMultiBugReportContentHandler.java460
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/UnrecognizedReponseException.java23
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/XmlCleaner.java61
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AssignmentEvent.java34
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AttachmentEvent.java156
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AttachmentFlag.java44
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AttachmentFlagState.java15
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AttachmentFlagStatus.java15
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/BugzillaTaskHistoryParser.java232
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/ResolutionEvent.java38
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/ResolutionType.java92
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/StatusEvent.java33
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/StatusType.java95
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/TaskHistory.java114
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/TaskRevision.java114
-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.prefs340
-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.tasklist.prefs4
-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.MF33
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/about.html27
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/build.properties16
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AbstractBugzillaTest.java163
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AllBugzillaTests.java57
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaConfigurationTest.java248
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaProductParserTest.java97
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaRepositoryConnectorTest.java1001
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaRepositoryConnectorTest2.java340
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaSearchDialogTest.java68
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaSearchEngineTest.java121
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskDataHandlerTest.java145
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskHyperlinkDetectorTest.java247
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskListManagerTest.java187
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskTest.java81
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTestPlugin.java97
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTestUtil.java51
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/DuplicateDetetionTest.java264
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/EncodingTest.java99
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/NewBugWizardTest.java89
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryEditorWizardTest.java188
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryReportFactoryTest.java464
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryTaskHandleTest.java79
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskEditorTest.java106
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskListNotificationManagerTest.java132
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskListStandaloneTest.java217
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/headless/BugzillaQueryTest.java183
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/headless/BugzillaTaskHistoryTest.java159
-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.prefs340
-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.tasklist.prefs4
-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.MF29
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/about.html27
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/build-user.xml3
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/build.properties16
-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.gifbin1039 -> 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.gifbin277 -> 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.xml69
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaCompareInput.java118
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaCompareNode.java280
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaCompareStructureCreator.java71
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaImages.java96
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiExtensionReader.java96
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiPlugin.java232
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaCcAttributeEditor.java92
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaKeywordAttributeEditor.java112
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaPeoplePart.java198
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditor.java820
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPage.java101
-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/DummySearchHitProvider.java31
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/KeywordsDialog.java153
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/NewBugzillaTaskEditor.java248
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java1925
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSeveritySearchSorter.java76
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaStateSearchSorter.java93
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaConnectorUi.java210
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaCustomQueryDialog.java112
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaCustomQueryWizardPage.java120
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaQueryTypeWizardPage.java83
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositorySettingsPage.java541
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskEditorFactory.java85
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskEditorInput.java84
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskListFactory.java103
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskListMigrator.java75
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/StackTrace.java370
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/BugzillaProductPage.java442
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/NewBugzillaTaskWizard.java139
-rw-r--r--org.eclipse.mylyn.help.ui/.classpath8
-rw-r--r--org.eclipse.mylyn.help.ui/.cvsignore1
-rw-r--r--org.eclipse.mylyn.help.ui/.externalToolBuilders/org.eclipse.jdt.core.javabuilder.launch7
-rw-r--r--org.eclipse.mylyn.help.ui/.project34
-rw-r--r--org.eclipse.mylyn.help.ui/.settings/org.eclipse.jdt.core.prefs340
-rw-r--r--org.eclipse.mylyn.help.ui/.settings/org.eclipse.jdt.ui.prefs63
-rw-r--r--org.eclipse.mylyn.help.ui/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--org.eclipse.mylyn.help.ui/.settings/org.eclipse.mylyn.tasklist.prefs4
-rw-r--r--org.eclipse.mylyn.help.ui/.settings/org.eclipse.mylyn.tasks.ui.prefs4
-rw-r--r--org.eclipse.mylyn.help.ui/.settings/org.eclipse.pde.prefs18
-rw-r--r--org.eclipse.mylyn.help.ui/META-INF/MANIFEST.MF16
-rw-r--r--org.eclipse.mylyn.help.ui/about.html27
-rw-r--r--org.eclipse.mylyn.help.ui/build-user.xml3
-rw-r--r--org.eclipse.mylyn.help.ui/build.properties21
-rw-r--r--org.eclipse.mylyn.help.ui/cheatsheets/Query.xml44
-rw-r--r--org.eclipse.mylyn.help.ui/cheatsheets/TaskFocus.xml86
-rw-r--r--org.eclipse.mylyn.help.ui/doc/book.css1
-rw-r--r--org.eclipse.mylyn.help.ui/doc/images/2.0/ui-legend.gifbin7738 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/doc/images/2.0/welcome.gifbin17920 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/doc/images/2.0/working-sets-edit.gifbin15823 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/doc/images/2.0/working-sets-switch.gifbin30522 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/doc/images/2.0M1/bugzilla-local-users.gifbin3279 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/doc/images/2.0M1/bugzilla-time-tracking.gifbin1896 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/doc/images/2.0M1/java-editor-hyperlink.gifbin5524 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/doc/images/2.0M1/jira-editor-hyperlink.gifbin10720 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/doc/images/2.0M1/task-context-editor.gifbin12677 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/doc/images/2.0M1/task-editor-progress.gifbin9620 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/doc/images/2.0M2/bugzilla-due-dates.gifbin8738 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/doc/images/2.0M2/context-apply-attachments.gifbin12514 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/doc/images/2.0M2/context-quick-view.gifbin7497 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/doc/images/2.0M2/hyperlinks-text.gifbin6654 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/doc/images/2.0M2/jira-java-hyperlinks.gifbin4832 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/doc/images/2.0M2/repository-settings-proxy.gifbin15317 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/doc/images/2.0M2/synchronize-view-add.gifbin14914 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/doc/images/2.0M2/task-editor-warning.gifbin17173 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/doc/images/2.0M2/tasklist-schedule.gifbin14850 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/doc/images/2.0M2/trac-hyperlinks.gifbin8249 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/doc/images/2.0M3/annotation-hyperlinks.gifbin11069 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/doc/images/2.0M3/bugzilla-subtasks.gifbin4984 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/doc/images/2.0M3/jira-attachments.gifbin15929 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/doc/images/2.0M3/task-editor-error.gifbin12088 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/doc/images/2.0M3/task-tooltip-incoming.gifbin4985 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/doc/images/2.0M3/tasklist-tree.gifbin33885 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/doc/images/2.0M3/tasks-content-assist.gifbin10482 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/doc/images/2.0M3/tasks-working-sets.gifbin5930 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/doc/images/2.0M3/team-hyperlinks-annotations.gifbin9012 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/doc/images/2.0M3/team-hyperlinks-history.gifbin15470 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/doc/images/2.0M3/ui-legend-connectors.gifbin8274 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/doc/images/2.0M3/ui-usage-report.gifbin23692 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/doc/images/2.1M1/bugzilla-cached-config.pngbin7777 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/doc/images/2.1M1/bugzilla-custom-resolutions.pngbin11383 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/doc/images/2.1M1/bugzilla-search-keywords.pngbin14166 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/doc/images/2.1M1/screenshot-capture.pngbin61453 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/doc/images/2.1M1/spelling-corrections.pngbin16739 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/doc/images/2.1M1/task-editor-hyperlinks.pngbin5562 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/doc/images/2.1M1/tasklist-search.pngbin26440 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/doc/images/mylyn-2.0.pngbin166436 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/doc/new.html916
-rw-r--r--org.eclipse.mylyn.help.ui/doc/overview.html63
-rw-r--r--org.eclipse.mylyn.help.ui/doc/toc.xml11
-rw-r--r--org.eclipse.mylyn.help.ui/icons/etool16/icons-legend.gifbin200 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/images/mylyn-overview-small.gifbin84098 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/images/mylyn-overview.gifbin60126 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/images/topiclabel/ov_legend48.gifbin2362 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/images/topiclabel/ov_legend48_hov.gifbin2362 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/images/topiclabel/ov_mylyn48.gifbin2362 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/images/topiclabel/ov_mylyn48_hov.gifbin2362 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/images/topiclabel/tu_query48.gifbin2245 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/images/topiclabel/tu_query48_hov.gifbin2245 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/images/topiclabel/tu_task48.gifbin2362 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/images/topiclabel/tu_task48_hov.gifbin2362 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/images/topiclabel/wn_mylyn48.gifbin2362 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/images/topiclabel/wn_mylyn48_hov.gifbin2362 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/intro/css/overview.css15
-rw-r--r--org.eclipse.mylyn.help.ui/intro/css/tutorials.css15
-rw-r--r--org.eclipse.mylyn.help.ui/intro/css/whatsnew.css7
-rw-r--r--org.eclipse.mylyn.help.ui/intro/overviewExtensionContent.xml20
-rw-r--r--org.eclipse.mylyn.help.ui/intro/tutorialsExtensionContent.xml18
-rw-r--r--org.eclipse.mylyn.help.ui/intro/whatsnewExtensionContent.xml15
-rw-r--r--org.eclipse.mylyn.help.ui/plugin.xml93
-rw-r--r--org.eclipse.mylyn.help.ui/src/org/eclipse/mylyn/internal/help/ui/actions/ShowMylynLegendAction.java60
-rw-r--r--org.eclipse.mylyn.help.ui/src/org/eclipse/mylyn/internal/help/ui/dialogs/UiLegendDialog.java543
-rw-r--r--org.eclipse.mylyn.sdk-feature/build.properties54
-rw-r--r--org.eclipse.mylyn.sdk-feature/feature.xml256
-rw-r--r--org.eclipse.mylyn.tasks.core/.settings/org.eclipse.jdt.core.prefs340
-rw-r--r--org.eclipse.mylyn.tasks.core/.settings/org.eclipse.jdt.ui.prefs63
-rw-r--r--org.eclipse.mylyn.tasks.core/.settings/org.eclipse.mylyn.tasklist.prefs4
-rw-r--r--org.eclipse.mylyn.tasks.core/META-INF/MANIFEST.MF19
-rw-r--r--org.eclipse.mylyn.tasks.core/about.html27
-rw-r--r--org.eclipse.mylyn.tasks.core/build.properties15
-rw-r--r--org.eclipse.mylyn.tasks.core/plugin.xml31
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/AbstractSearchHandler.java25
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/AbstractTask.java530
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/AbstractTaskCategory.java23
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/AbstractTaskContainer.java179
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/CommentQuoter.java95
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/DateRange.java235
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/IRepositoryConstants.java37
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/IRepositoryModelListener.java20
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ITaskDataStorage.java51
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ITaskJobFactory.java47
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ITaskList.java82
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ITaskListChangeListener.java24
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ITaskListRunnable.java20
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ITaskRepositoryFilter.java55
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ITasksCoreConstants.java80
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/IdentityAttributeFactory.java58
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/LocalAttachment.java125
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/LocalRepositoryConnector.java115
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/LocalTask.java53
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/LocalTaskListFactory.java36
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/OfflineDataStore.java68
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/Person.java34
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/RepositoryExternalizationParticipant.java115
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/RepositoryPerson.java63
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/RepositoryQuery.java141
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/RepositoryTaskHandleUtil.java54
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/RepositoryTemplateManager.java57
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/SaxRepositoriesContentHandler.java55
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/SaxRepositoriesWriter.java190
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ScheduledTaskContainer.java209
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskActivationHistory.java112
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskActivityManager.java796
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskActivityUtil.java257
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskAttachment.java160
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskCategory.java52
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskComment.java112
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskContainerDelta.java108
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskDataState.java127
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskDataStorageManager.java354
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskExternalizationException.java25
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskGroup.java43
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskList.java653
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskRepositoriesExternalizer.java130
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskRepositoryAdapter.java36
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskRepositoryLocation.java75
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskRepositoryManager.java389
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskTask.java39
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TasksModel.java121
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/UncategorizedTaskContainer.java48
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/UnmatchedTaskContainer.java65
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/WeekDateRange.java100
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/ElementHandler.java120
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/FileTaskAttachmentSource.java89
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/ITaskDataConstants.java99
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/ITaskDataManagerListener.java18
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataExternalizer.java124
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataManager.java684
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataManagerEvent.java64
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataState.java181
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataStateReader.java614
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataStateWriter.java121
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataStore.java157
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TextTaskAttachmentSource.java56
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/AbstractAttachmentHandler.java94
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/AbstractAttributeFactory.java47
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/AbstractLegacyDuplicateDetector.java92
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/AbstractLegacyRepositoryConnector.java435
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/AbstractTaskDataHandler.java177
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/AbstractTaskListFactory.java187
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/AttributeContainer.java180
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/DefaultTaskSchema.java232
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/FileAttachment.java89
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/ITaskAttachment.java38
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/ITaskCollector.java33
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/ITaskFactory.java34
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/LegacyTaskDataCollector.java28
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/QueryHitCollector.java75
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/RepositoryAttachment.java134
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/RepositoryOperation.java221
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/RepositoryTaskAttribute.java396
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/RepositoryTaskData.java406
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/TaskComment.java108
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/TaskFactory.java193
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/TaskSelection.java236
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/AbstractExternalizationParticipant.java118
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/DelegatingTaskExternalizer.java752
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/ExternalizationManager.java263
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/IExternalizationContext.java23
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/IExternalizationParticipant.java28
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/TaskListExternalizationParticipant.java129
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/TaskListExternalizer.java417
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SubmitTaskAttachmentJob.java102
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SubmitTaskJob.java128
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizationSession.java129
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeQueriesJob.java346
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeRepositoriesJob.java138
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeTasksJob.java402
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractDuplicateDetector.java51
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractRepositoryConnector.java249
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskListMigrator.java37
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/IAttributeContainer.java26
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/IRepositoryElement.java38
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/IRepositoryListener.java47
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/IRepositoryManager.java37
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/IRepositoryModel.java32
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/IRepositoryPerson.java29
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/IRepositoryQuery.java31
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITask.java331
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskActivationListener.java37
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskActivityListener.java34
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskActivityManager.java79
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskAttachment.java138
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskComment.java51
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskContainer.java29
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskMapping.java64
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/RepositoryResponse.java42
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/RepositoryStatus.java195
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/RepositoryTemplate.java71
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskActivationAdapter.java29
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskActivityAdapter.java23
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskMapping.java122
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepository.java836
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepositoryLocationFactory.java27
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/AbstractTaskAttachmentHandler.java36
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/AbstractTaskAttachmentSource.java34
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/AbstractTaskDataHandler.java93
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/ITaskDataManager.java34
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/ITaskDataWorkingCopy.java44
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttachmentMapper.java268
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttachmentModel.java87
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttribute.java531
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttributeMapper.java270
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttributeMetaData.java138
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskCommentMapper.java180
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskData.java88
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskDataCollector.java26
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskDataModel.java162
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskDataModelEvent.java45
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskDataModelListener.java19
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskMapper.java402
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskOperation.java129
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskRelation.java66
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/sync/ISynchronizationSession.java49
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/sync/SubmitJob.java90
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/sync/SubmitJobEvent.java27
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/sync/SubmitJobListener.java26
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/sync/SynchronizationJob.java43
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/sync/TaskJob.java26
-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/org.eclipse.jdt.core.prefs340
-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.tasklist.prefs4
-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.MF38
-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.xml25
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AbstractTaskContainerTest.java33
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AbstractTaskDataHandlerTest.java223
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AllTasksPerformanceTests.java26
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AllTasksTests.java81
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AttachmentJobTest.java100
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AttachmentSizeFormatterTest.java71
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/BackgroundSaveTest.java45
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/CommentQuoterTest.java70
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/CopyDetailsActionTest.java27
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/DateRangeTest.java69
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/LinkProviderTest.java52
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/NewTaskFromSelectionActionTest.java98
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/NewTaskWizardRepositorySelectionTest.java90
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/OfflineCachingStorageTest.java170
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/OfflineStorageTest.java309
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/OrphanedTasksTest.java352
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/PersonProposalProviderTest.java187
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ProjectRepositoryAssociationTest.java74
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/QueryExportImportTest.java337
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/RepositorySettingsPageTest.java279
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/RepositoryTaskSynchronizationTest.java475
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ScheduledPresentationTest.java177
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TableSorterTest.java115
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivationActionTest.java43
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivationHistoryTest.java121
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivityListenerTest.java98
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivityTimingTest.java1232
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskDataExportTest.java134
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskDataImportTest.java121
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskDataStorageManagerTest.java258
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskDiffUtilTest.java43
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskExportImportTest.java148
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskHistoryTest.java234
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskKeyComparatorTest.java65
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskList06DataMigrationTest.java304
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListBackupManagerTest.java98
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListContentProviderTest.java67
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListDnDTest.java76
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListManagerTest.java1003
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListPresentationTest.java30
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListSaveManagerTest.java106
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListTest.java309
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListUiTest.java376
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskPlanningEditorTest.java111
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositoriesExternalizerTest.java108
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositoryFilterTests.java78
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositoryLocationTest.java83
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositoryManagerTest.java238
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositorySorterTest.java72
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositoryTest.java145
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskTest.java75
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskTestUtil.java62
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskWorkingSetTest.java152
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TasksTestsPlugin.java46
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TasksUiUtilTest.java113
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockAttachmentHandler.java81
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockAttributeFactory.java51
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockRepositoryConnector.java209
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockRepositoryConnectorUi.java50
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockRepositoryQuery.java36
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockTask.java62
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockTaskListFactory.java113
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/data/TaskDataExternalizerTest.java99
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/performance/TaskContainerTest.java46
-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/web/HtmlDecodeEntityTest.java75
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/web/NamedPatternTest.java61
-rw-r--r--org.eclipse.mylyn.tasks.tests/testdata/legacy/tasklist_0_4_8.xml1
-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.xml1
-rw-r--r--org.eclipse.mylyn.tasks.tests/testdata/taskdataimporttest/local-69.xml1
-rw-r--r--org.eclipse.mylyn.tasks.tests/testdata/taskdataimporttest/local-70.xml1
-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.xml4
-rw-r--r--org.eclipse.mylyn.tasks.tests/testdata/taskdataimporttest/tasklist.xml1
-rw-r--r--org.eclipse.mylyn.tasks.tests/testdata/tasklistdatamigrationtest/empty.txt0
-rw-r--r--org.eclipse.mylyn.tasks.ui/.classpath17
-rw-r--r--org.eclipse.mylyn.tasks.ui/.cvsignore2
-rw-r--r--org.eclipse.mylyn.tasks.ui/.options1
-rw-r--r--org.eclipse.mylyn.tasks.ui/.project34
-rw-r--r--org.eclipse.mylyn.tasks.ui/.settings/.api_filters11
-rw-r--r--org.eclipse.mylyn.tasks.ui/.settings/org.eclipse.jdt.core.prefs340
-rw-r--r--org.eclipse.mylyn.tasks.ui/.settings/org.eclipse.jdt.ui.prefs63
-rw-r--r--org.eclipse.mylyn.tasks.ui/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--org.eclipse.mylyn.tasks.ui/.settings/org.eclipse.mylyn.tasklist.prefs4
-rw-r--r--org.eclipse.mylyn.tasks.ui/.settings/org.eclipse.mylyn.tasks.ui.prefs4
-rw-r--r--org.eclipse.mylyn.tasks.ui/.settings/org.eclipse.pde.prefs18
-rw-r--r--org.eclipse.mylyn.tasks.ui/META-INF/MANIFEST.MF48
-rw-r--r--org.eclipse.mylyn.tasks.ui/about.html27
-rw-r--r--org.eclipse.mylyn.tasks.ui/build.properties17
-rw-r--r--org.eclipse.mylyn.tasks.ui/doc/book.css1
-rw-r--r--org.eclipse.mylyn.tasks.ui/doc/bugzilla.html46
-rw-r--r--org.eclipse.mylyn.tasks.ui/doc/images/tasklist-overview.gifbin9719 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/doc/planning.html21
-rw-r--r--org.eclipse.mylyn.tasks.ui/doc/tasklist.html141
-rw-r--r--org.eclipse.mylyn.tasks.ui/doc/toc.xml13
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/archive/bug-search.gifbin583 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/archive/filter-archive.gifbin350 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/archive/find.gifbin157 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/archive/overlay-due.gifbin108 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/archive/overlay-offline.gifbin895 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/archive/overlay-repository-context.gifbin166 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/archive/overlay-repository.gifbin79 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/archive/overlay-web.gifbin167 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/archive/task-activity.gifbin581 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/archive/task-bug.gifbin341 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/archive/task-items.gifbin218 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/archive/task-repository-completed.gifbin343 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/archive/task-repository-notes.gifbin337 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/archive/task-server.gifbin339 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/elcl16/bug-search.gifbin583 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/bug-report.gifbin159 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/calendar.gifbin594 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/capture-pause.gifbin212 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/category-archive.gifbin354 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/category-new.gifbin343 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/category.gifbin213 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/comment.gifbin309 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/compare.pngbin410 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/context-add.gifbin331 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/context-attach.gifbin355 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/context-clear.gifbin316 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/context-retrieve.gifbin361 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/context-transfer.gifbin325 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/export.gifbin329 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/import.gifbin327 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/navigate-next.gifbin319 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/navigate-previous-active.gifbin333 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/navigate-previous-pause.gifbin325 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/navigate-previous.gifbin317 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/open-repository-task.gifbin227 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/open-task.gifbin343 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/person.gifbin308 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/query-new.gifbin349 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/query-unmatched.pngbin485 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/query.gifbin332 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/reply.gifbin185 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/repository-new.gifbin342 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/repository-submit.gifbin577 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/repository-synchronize.gifbin362 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/sub-task-new.gifbin381 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/task-active-centered.gifbin896 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/task-active.gifbin199 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/task-complete.gifbin343 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/task-completed.gifbin333 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/task-context.gifbin197 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/task-inactive-centered.gifbin132 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/task-inactive.gifbin132 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/task-incomplete.gifbin148 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/task-narrow.gifbin209 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/task-new.gifbin334 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/task-notes.gifbin220 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/task-remote.gifbin90 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/task-repository-history.gifbin561 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/task-repository-new.gifbin339 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/task-repository.gifbin224 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/task-retrieve.gifbin343 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/task.gifbin216 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/tasklist-export.pngbin430 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/tasklist-import.pngbin410 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/focus.gifbin357 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-due.gifbin108 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/perspective-planning.pngbin782 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/repositories-blue.gifbin367 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/repositories.gifbin587 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/repository-middle.gifbin325 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/repository.gifbin328 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/task-list.gifbin337 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/task-search.gifbin587 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/obj16/attachment-patch.gifbin342 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/obj16/repository-small.gifbin310 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/obj16/workingSet.gifbin363 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/ovr16/overlay-local.gifbin169 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/wizban/banner-repository-context.gifbin2866 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/wizban/banner-repository-settings.gifbin3345 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/wizban/banner-repository.gifbin2749 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/wizban/secur_role_wiz.gifbin3153 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/wizban/workset_wiz.pngbin6602 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/plugin.xml1629
-rw-r--r--org.eclipse.mylyn.tasks.ui/schema/actions.exsd94
-rw-r--r--org.eclipse.mylyn.tasks.ui/schema/duplicateDetectors.exsd119
-rw-r--r--org.eclipse.mylyn.tasks.ui/schema/editors.exsd149
-rw-r--r--org.eclipse.mylyn.tasks.ui/schema/presentations.exsd133
-rw-r--r--org.eclipse.mylyn.tasks.ui/schema/projectLinkProviders.exsd126
-rw-r--r--org.eclipse.mylyn.tasks.ui/schema/repositories.exsd244
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/AbstractTaskListFilter.java79
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ActivityExternalizationParticipant.java119
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/AddExistingTaskJob.java107
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/AttachmentUtil.java392
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/CategorizedPresentation.java32
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ComboSelectionDialog.java109
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/IDynamicSubMenuContributor.java22
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ITaskCommandIds.java27
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ITaskHighlighter.java20
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ITaskListNotificationProvider.java22
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ITasksUiPreferenceConstants.java59
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/LegacyChangeManager.java252
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/LocalRepositoryConnectorUi.java58
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/MoveToCategoryMenuContributor.java119
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/OfflineCachingStorage.java326
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/OfflineFileStorage.java721
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/OpenRepositoryTaskJob.java74
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/PersonContentProposal.java75
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/PersonProposalLabelProvider.java34
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/PersonProposalProvider.java213
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/PlanningPerspectiveFactory.java66
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/RefactorRepositoryUrlOperation.java158
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/RepositoryAwareStatusHandler.java77
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/RepositoryReport.java9
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ScheduleDatePicker.java175
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ScheduleTaskMenuContributor.java255
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ScheduledPresentation.java32
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskActivityMonitor.java136
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskArchiveFilter.java34
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskCompletionFilter.java25
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskEditorBloatMonitor.java73
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskHistoryDropDown.java221
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskHistoryHandler.java88
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskJobFactory.java169
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskLabelDecorator.java106
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListBackupManager.java290
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListHyperlink.java133
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListManager.java155
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListModifyOperation.java75
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager.java168
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListSynchronizationScheduler.java91
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskPriorityFilter.java48
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskRepositoryAdapterFactory.java60
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskRepositoryLocationUi.java150
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskRepositoryUtil.java69
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskSearchPage.java615
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskTransfer.java110
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskTrimWidget.java366
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskWorkingSetFilter.java95
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksAdapterFactory.java49
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksReminderDialog.java267
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksUiMessages.java18
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksUiPlugin.java1204
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AbstractChangeCompletionAction.java55
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AbstractTaskAction.java58
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AbstractTaskEditorAction.java53
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AbstractTaskRepositoryAction.java65
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ActivateTaskDialogAction.java54
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ActivateTaskHistoryDropDownAction.java101
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AddRepositoryAction.java111
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AddRepositoryTaskAction.java59
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AttachAction.java95
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AttachScreenshotAction.java67
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ClearOutgoingAction.java80
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CloneTaskAction.java110
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CollapseAllAction.java41
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CompareAttachmentsAction.java181
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CopyAttachmentToClipboardJob.java85
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CopyTaskDetailsAction.java113
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DeactivateAllTasksAction.java31
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DeleteAction.java143
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DeleteTaskRepositoryAction.java97
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DownloadAttachmentJob.java108
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/EditRepositoryPropertiesAction.java58
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ExpandAllAction.java41
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/FilterArchiveContainerAction.java51
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/FilterCompletedTasksAction.java49
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/GoIntoAction.java59
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/GoUpAction.java32
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/GroupSubTasksAction.java58
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/LinkWithEditorAction.java34
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ManageEditorsAction.java45
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/MarkTaskCompleteAction.java78
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/MarkTaskIncompleteAction.java76
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/MoveTaskToRootAction.java33
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewCategoryAction.java87
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewQueryAction.java106
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewSubTaskAction.java279
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewTaskAction.java72
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewTaskFromSelectionAction.java118
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenRepositoryTask.java115
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTaskAction.java56
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTaskListElementAction.java62
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTaskSearchAction.java50
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTasksUiPreferencesAction.java39
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenWithBrowserAction.java62
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/PresentationDropDownSelectionAction.java128
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/QueryCloneAction.java101
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/QueryExportAction.java110
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/QueryImportAction.java193
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RefreshRepositoryTasksAction.java72
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RemoveFromCategoryAction.java55
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RenameAction.java59
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RestoreTaskListAction.java68
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/SearchForRepositoryTask.java43
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ShowInTaskListAction.java39
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ShowTaskRepositoriesViewAction.java33
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/SynchronizeAllAction.java35
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/SynchronizeAutomaticallyAction.java37
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/SynchronizeEditorAction.java89
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/SynchronizeSelectedAction.java160
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskActivateAction.java56
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskDeactivateAction.java49
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskEditorCopyAction.java30
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskExportAction.java136
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskImportAction.java78
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskListSortAction.java31
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskSelectionDialog.java722
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskWorkingSetAction.java366
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ToggleAllWorkingSetsAction.java57
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ToggleTaskActivationAction.java100
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ToggleWorkingSetAction.java87
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/AbstractTaskHandler.java40
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/AbstractTaskListViewHandler.java56
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/AddTaskRepositoryHandler.java47
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/GoToUnreadTaskHandler.java111
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/MarkTaskHandler.java85
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/NewLocalTaskHandler.java49
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/NewSubTaskHandler.java44
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/OpenSelectedTaskHandler.java30
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/OpenTaskAttachmentInBrowserHandler.java40
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/OpenTaskAttachmentInDefaultEditorHandler.java72
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/OpenTaskListElementPropertiesHandler.java30
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/RemoteTaskSelectionDialog.java329
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/TaskListToolTipHandler.java39
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/TaskRepositoryParameterValues.java35
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/deprecated/AbstractNewRepositoryTaskEditor.java535
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/deprecated/AbstractRepositoryQueryWizard.java75
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/deprecated/AbstractRepositoryTaskEditor.java4060
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/deprecated/AbstractRepositoryTaskEditorInput.java137
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/deprecated/AbstractTaskEditorFactory.java55
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/deprecated/NewTaskEditorInput.java56
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/deprecated/RepositoryTaskEditorInput.java111
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/deprecated/TaskFactory.java185
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/deprecated/TaskFormPage.java750
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/AbstractWorkingSetDialogCOPY.java410
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/TaskListSortDialog.java264
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/TaskRepositoryCredentialsDialog.java292
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AbstractReplyToCommentAction.java56
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AttachmentSizeFormatter.java99
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AttachmentTableLabelProvider.java186
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AttachmentTableLabelProvider2.java179
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AttachmentsTableContentProvider.java41
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AttachmentsTableContentProvider2.java41
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/BooleanAttributeEditor.java58
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/CategoryEditor.java127
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/CategoryEditorInput.java71
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/ContentOutlineTools.java65
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/ControlSelectionService.java145
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/DateAttributeEditor.java118
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/EditorBusyIndicator.java125
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/EditorUtil.java304
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/IBusyEditor.java22
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/IRepositoryTaskAttributeListener.java16
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/IRepositoryTaskSelection.java82
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/LongTextAttributeEditor.java72
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/MultiSelectionAttributeEditor.java110
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/PersonAttributeEditor.java28
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/PlanningPageFactory.java45
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/PreviewAttributeEditor.java262
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryAttachmentEditorInput.java127
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryCompletionProcessor.java322
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTaskEditorDropListener.java166
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTaskOutlineComparer.java45
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTaskOutlineNode.java336
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTaskOutlinePage.java204
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTaskSelection.java159
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTextViewer.java79
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTextViewerConfiguration.java289
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RichTextAttributeEditor.java198
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/SingleSelectionAttributeEditor.java107
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/SpellingDialog.java103
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskAttachmentEditorInput.java151
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorActionContributor.java418
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorActionPart.java313
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorAttachmentPart.java502
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorAttributePart.java249
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart.java335
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorDescriptionPart.java187
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorInputFactory.java56
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorNewCommentPart.java32
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorOutlineNode.java176
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorOutlinePage.java152
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorPeoplePart.java63
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorPlanningPart.java182
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorRichTextPart.java191
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorSummaryPart.java140
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskHyperlinkDetector.java131
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskListChangeAdapter.java21
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskPlanningEditor.java934
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskRelationHyperlinkDetector.java97
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskSpellingReconcileStrategy.java186
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskUrlHyperlink.java29
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskUrlHyperlinkDetector.java122
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TextAttributeEditor.java64
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskAttributeDiff.java124
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskDataDiff.java150
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskDiffUtil.java185
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskListNotification.java163
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskListNotificationPopup.java145
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskListNotificationQueryIncoming.java44
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskListNotificationReminder.java47
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskListNotifier.java107
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/preferences/TaskFocusedUiPreferencePage.java41
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/preferences/TasksUiPreferencePage.java756
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/properties/ProjectPropertiesLinkProvider.java84
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/properties/ProjectTaskRepositoryPage.java196
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/AbstractRepositorySearchQuery.java41
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/CreateQueryFromSearchAction.java84
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/OpenSearchResultAction.java61
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/RepositorySearchResult.java93
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/RepositorySearchResultView.java438
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchHitCollector.java149
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultContentProvider.java60
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultSortAction.java56
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultSorterDescription.java74
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultSorterId.java70
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultSorterPriority.java62
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultTreeContentProvider.java142
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultsLabelProvider.java58
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchScoreComputerAdapterFactory.java52
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/StackTraceDuplicateDetector.java108
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/BackgroundSaveTimer.java100
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/IBackgroundSaveListener.java21
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/SelectionProviderAdapter.java36
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskDataExportOperation.java272
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskDragSourceListener.java160
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskListElementImporter.java742
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskPropertyTester.java66
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TasksUiExtensionReader.java499
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TasksUiInternal.java816
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/WebBrowserDialog.java62
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/AbstractTaskListContentProvider.java24
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/AbstractTaskListPresentation.java79
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/CopyOfTaskListView.java1719
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/CustomTaskListDecorationDrawer.java268
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/DisconnectRepositoryAction.java68
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/PriorityDropDownAction.java193
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/SortyByDropDownAction.java143
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TableDecoratingLabelProvider.java69
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskDetailLabelProvider.java58
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskInputDialog.java290
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskKeyComparator.java118
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListCellModifier.java133
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListContentProvider.java207
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListDropAdapter.java399
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListFilteredTree.java571
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListInterestFilter.java172
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListInterestSorter.java244
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListTableSorter.java319
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListToolTip.java643
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java1814
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoriesSorter.java54
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoriesView.java297
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoryLabelProvider.java90
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskScheduleContentProvider.java187
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskTableLabelProvider.java91
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/UpdateRepositoryConfigurationAction.java86
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/WorkweekProgressBar.java171
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/AddExistingTaskWizard.java44
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/CommonAddExistingTaskWizard.java68
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/EditRepositoryWizard.java111
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ExistingTaskWizardPage.java79
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ImageAttachment.java91
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/InputAttachmentSourcePage.java712
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/InputAttachmentSourcePage2.java648
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/MultiRepositoryAwareWizard.java51
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewAttachmentPage.java301
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewAttachmentWizard.java354
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewAttachmentWizardDialog.java48
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewLocalCategoryWizard.java37
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewLocalTaskWizard.java70
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewQueryWizard.java41
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewRepositoryWizard.java115
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewTaskPage.java37
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewTaskWizard.java38
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewWebTaskPage.java43
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/PreviewAttachmentPage.java237
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/PreviewAttachmentPage2.java282
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ScreenshotAttachmentPage.java37
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/SelectRepositoryConnectorPage.java109
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/SelectRepositoryPage.java279
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskAttachmentWizard.java399
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataExportWizard.java192
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataExportWizardPage.java298
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataImportWizard.java246
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataImportWizardPage.java395
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/workingsets/TaskWorkingSetAdapterFactory.java61
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/workingsets/TaskWorkingSetElementAdapter.java50
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/workingsets/TaskWorkingSetElementFactory.java61
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/workingsets/TaskWorkingSetPage.java550
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/workingsets/TaskWorkingSetUpdater.java308
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/workingsets/WorkingSetLabelComparator.java25
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/AbstractRepositoryConnectorUi.java245
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/AbstractTaskRepositoryLinkProvider.java69
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/ITasksUiConstants.java28
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/LegendElement.java45
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskElementLabelProvider.java299
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskHyperlink.java67
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskRepositoryLocationUiFactory.java30
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUi.java49
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiImages.java207
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiUtil.java506
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractAttributeEditor.java155
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRenderingEngine.java29
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage.java1165
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPageFactory.java55
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPart.java161
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AttributeEditorFactory.java77
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AttributeEditorToolkit.java297
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/BrowserFormPage.java87
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/LayoutHint.java52
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditor.java648
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditorInput.java212
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditorPartDescriptor.java92
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositoryQueryPage.java170
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositorySettingsPage.java1489
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/ITaskRepositoryPage.java26
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/ITaskSearchPage.java23
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/ITaskSearchPageContainer.java23
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/NewTaskWizard.java208
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/NewWebTaskWizard.java98
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/RepositoryQueryWizard.java90
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/TaskAttachmentPage.java326
-rw-r--r--org.eclipse.mylyn.test-feature/.project17
-rw-r--r--org.eclipse.mylyn.test-feature/.settings/org.eclipse.mylyn.tasks.ui.prefs4
-rw-r--r--org.eclipse.mylyn.test-feature/about.html27
-rw-r--r--org.eclipse.mylyn.test-feature/build.properties5
-rw-r--r--org.eclipse.mylyn.test-feature/epl-v10.html328
-rw-r--r--org.eclipse.mylyn.test-feature/feature.xml227
-rw-r--r--org.eclipse.mylyn.test-feature/license.html79
-rw-r--r--org.eclipse.mylyn.trac-feature/.project17
-rw-r--r--org.eclipse.mylyn.trac-feature/.settings/org.eclipse.jdt.core.prefs340
-rw-r--r--org.eclipse.mylyn.trac-feature/.settings/org.eclipse.jdt.ui.prefs63
-rw-r--r--org.eclipse.mylyn.trac-feature/.settings/org.eclipse.mylyn.tasklist.prefs4
-rw-r--r--org.eclipse.mylyn.trac-feature/.settings/org.eclipse.mylyn.tasks.ui.prefs4
-rw-r--r--org.eclipse.mylyn.trac-feature/about.html27
-rw-r--r--org.eclipse.mylyn.trac-feature/build.properties5
-rw-r--r--org.eclipse.mylyn.trac-feature/epl-v10.html328
-rw-r--r--org.eclipse.mylyn.trac-feature/feature.xml120
-rw-r--r--org.eclipse.mylyn.trac-feature/license.html79
-rw-r--r--org.eclipse.mylyn.trac.core/.classpath7
-rw-r--r--org.eclipse.mylyn.trac.core/.cvsignore1
-rw-r--r--org.eclipse.mylyn.trac.core/.project34
-rw-r--r--org.eclipse.mylyn.trac.core/.settings/org.eclipse.jdt.core.prefs340
-rw-r--r--org.eclipse.mylyn.trac.core/.settings/org.eclipse.jdt.ui.prefs63
-rw-r--r--org.eclipse.mylyn.trac.core/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--org.eclipse.mylyn.trac.core/.settings/org.eclipse.mylyn.tasklist.prefs4
-rw-r--r--org.eclipse.mylyn.trac.core/.settings/org.eclipse.mylyn.tasks.ui.prefs4
-rw-r--r--org.eclipse.mylyn.trac.core/.settings/org.eclipse.pde.prefs18
-rw-r--r--org.eclipse.mylyn.trac.core/META-INF/MANIFEST.MF18
-rw-r--r--org.eclipse.mylyn.trac.core/about.html27
-rw-r--r--org.eclipse.mylyn.trac.core/build.properties13
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/AbstractTracClient.java195
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/AbstractWikiHandler.java35
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/ITracClient.java193
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/ITracWikiClient.java244
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/InvalidTicketException.java27
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/InvalidWikiPageException.java35
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracAttachmentHandler.java108
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracAttributeFactory.java173
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracClientData.java48
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracClientFactory.java58
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracClientManager.java159
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracCorePlugin.java105
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracException.java35
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracLoginException.java27
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracNoSuchMethodException.java21
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracPermissionDeniedException.java27
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracProxyAuthenticationException.java22
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracRemoteException.java35
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracRepositoryConnector.java442
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracRepositoryQuery.java54
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracStatus.java24
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracTask.java244
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracTaskDataHandler.java467
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracWebClient.java793
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracWikiHandler.java110
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracXmlRpcClient.java940
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracAttachment.java77
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracAttribute.java39
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracComment.java86
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracComponent.java42
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracMilestone.java55
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracPriority.java22
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracSearch.java180
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracSearchFilter.java105
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracSeverity.java22
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracTicket.java222
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracTicketAttribute.java46
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracTicketField.java152
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracTicketResolution.java22
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracTicketStatus.java22
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracTicketType.java22
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracVersion.java44
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracWikiPage.java64
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracWikiPageInfo.java78
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/util/TracHttpClientTransportFactory.java284
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/util/TracUtils.java36
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/util/TracXmlRpcClientRequest.java32
-rw-r--r--org.eclipse.mylyn.trac.tests/.classpath11
-rw-r--r--org.eclipse.mylyn.trac.tests/.cvsignore3
-rw-r--r--org.eclipse.mylyn.trac.tests/.project34
-rw-r--r--org.eclipse.mylyn.trac.tests/.settings/org.eclipse.jdt.core.prefs340
-rw-r--r--org.eclipse.mylyn.trac.tests/.settings/org.eclipse.jdt.ui.prefs63
-rw-r--r--org.eclipse.mylyn.trac.tests/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--org.eclipse.mylyn.trac.tests/.settings/org.eclipse.mylyn.tasklist.prefs4
-rw-r--r--org.eclipse.mylyn.trac.tests/.settings/org.eclipse.mylyn.tasks.ui.prefs4
-rw-r--r--org.eclipse.mylyn.trac.tests/.settings/org.eclipse.pde.prefs18
-rw-r--r--org.eclipse.mylyn.trac.tests/META-INF/MANIFEST.MF23
-rw-r--r--org.eclipse.mylyn.trac.tests/about.html27
-rw-r--r--org.eclipse.mylyn.trac.tests/build.properties13
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtilTest.java203
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AbstractTracClientRepositoryTest.java92
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AbstractTracClientSearchTest.java249
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AbstractTracClientTest.java109
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracTests.java47
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/MockAttachment.java49
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/RepositorySearchQueryTest.java88
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TestProxy.java234
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracAttachmentHandlerTest.java206
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientFactoryTest.java98
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientManagerTest.java79
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientProxyTest.java76
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracQueryTest.java35
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryConnectorTest.java311
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryQueryTest.java79
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositorySettingsPageTest.java106
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracSearchTest.java133
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTaskDataHandlerTest.java435
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTaskEditorTest.java90
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTaskTest.java75
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTestConstants.java32
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTicketTest.java67
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracWebClientSearchTest.java48
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracWebClientTest.java81
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracXmlRpcClientSearchTest.java53
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracXmlRpcClientTest.java338
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracXmlRpcTest.java505
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TestFixture.java92
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracTestCleanupUtil.java58
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracTestUtil.java28
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/XmlRpcServer.java364
-rw-r--r--org.eclipse.mylyn.trac.ui/.classpath7
-rw-r--r--org.eclipse.mylyn.trac.ui/.cvsignore1
-rw-r--r--org.eclipse.mylyn.trac.ui/.project34
-rw-r--r--org.eclipse.mylyn.trac.ui/.settings/org.eclipse.jdt.core.prefs340
-rw-r--r--org.eclipse.mylyn.trac.ui/.settings/org.eclipse.jdt.ui.prefs63
-rw-r--r--org.eclipse.mylyn.trac.ui/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--org.eclipse.mylyn.trac.ui/.settings/org.eclipse.mylyn.tasklist.prefs4
-rw-r--r--org.eclipse.mylyn.trac.ui/.settings/org.eclipse.mylyn.tasks.ui.prefs4
-rw-r--r--org.eclipse.mylyn.trac.ui/.settings/org.eclipse.pde.prefs18
-rw-r--r--org.eclipse.mylyn.trac.ui/META-INF/MANIFEST.MF22
-rw-r--r--org.eclipse.mylyn.trac.ui/about.html27
-rw-r--r--org.eclipse.mylyn.trac.ui/build.properties15
-rw-r--r--org.eclipse.mylyn.trac.ui/icons/etool16/task-repository.gifbin216 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.trac.ui/icons/eview16/overlay-critical.gifbin105 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.trac.ui/icons/eview16/overlay-enhancement.gifbin81 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.trac.ui/icons/eview16/overlay-trac.gifbin277 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.trac.ui/icons/eview16/trac-icon.gifbin138 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.trac.ui/plugin.xml46
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracConnectorUi.java125
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkDetector.java51
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtil.java307
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracImages.java51
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracTaskListFactory.java80
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracUiPlugin.java56
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/WebHyperlink.java51
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/NewTracTaskEditor.java77
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracDuplicateDetector.java46
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracRenderingEngine.java71
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracTaskEditor.java54
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracTaskEditorFactory.java101
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/EditTracQueryWizard.java58
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/NewTracQueryWizard.java64
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/NewTracTaskPage.java139
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracCustomQueryPage.java770
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracQueryWizardPage.java447
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracRepositorySettingsPage.java245
1128 files changed, 0 insertions, 147731 deletions
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 8b08f1b8b..000000000
--- a/org.eclipse.mylyn.bugzilla.core/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,340 +0,0 @@
-#Thu Apr 24 21:03:23 PDT 2008
-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=ignore
-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,NORMAL
-org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,API
-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=false
-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.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 5e70d0848..000000000
--- a/org.eclipse.mylyn.bugzilla.core/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,63 +0,0 @@
-#Sat Mar 01 03:38:47 PST 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">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*******************************************************************************\n * Copyright (c) 2004, 2007 Mylyn project committers and others.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *******************************************************************************/\n\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ignore\n${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ignore</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created JavaScript files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for vars" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Jsdoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created function stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated function stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_methods=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=true
-sp_cleanup.correct_indentation=true
-sp_cleanup.format_source_code=true
-sp_cleanup.format_source_code_changes_only=false
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=true
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=true
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=true
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=true
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=true
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/org.eclipse.mylyn.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.tasklist.prefs b/org.eclipse.mylyn.bugzilla.core/.settings/org.eclipse.mylyn.tasklist.prefs
deleted file mode 100644
index 0a2cc0b30..000000000
--- a/org.eclipse.mylyn.bugzilla.core/.settings/org.eclipse.mylyn.tasklist.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Mon Jun 18 17:14:59 PDT 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.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 2f2fe7f82..000000000
--- a/org.eclipse.mylyn.bugzilla.core/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,17 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Mylyn Bugzilla Connector Core
-Bundle-SymbolicName: org.eclipse.mylyn.bugzilla.core;singleton:=true
-Bundle-Version: 3.0.0.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: Eclipse.org
-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
diff --git a/org.eclipse.mylyn.bugzilla.core/about.html b/org.eclipse.mylyn.bugzilla.core/about.html
deleted file mode 100644
index 0dd939c09..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 7, 2007</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 6097713f2..000000000
--- a/org.eclipse.mylyn.bugzilla.core/build-user.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-<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 14a4db4e5..000000000
--- a/org.eclipse.mylyn.bugzilla.core/build.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2006 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 = META-INF/,\
- about.html,\
- .,\
- plugin.xml
-src.includes = about.html
-jre.compilation.profile = J2SE-1.5
-source.. = src/
diff --git a/org.eclipse.mylyn.bugzilla.core/plugin.xml b/org.eclipse.mylyn.bugzilla.core/plugin.xml
deleted file mode 100644
index 1a54ec7a2..000000000
--- a/org.eclipse.mylyn.bugzilla.core/plugin.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<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 520c61da6..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/AbstractReportFactory.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.core;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedReader;
-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 {
-
- if (inStream == null) {
- return;
- }
-
- final BufferedInputStream is = new BufferedInputStream(inStream, 1024);
-
- InputStream iis = new InputStream() {
- @SuppressWarnings( { "deprecation", "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) {
- StringBuffer result = XmlCleaner.clean(in);
- StringReader strReader = new StringReader(result.toString());
- in = new BufferedReader(strReader);
- }
-
- try {
- final XMLReader reader = XMLReaderFactory.createXMLReader();
- 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(""));
- 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) {
- // if
- // (e.getMessage().equals(IBugzillaConstants.ERROR_INVALID_USERNAME_OR_PASSWORD))
- // {
- // throw new LoginException(e.getMessage());
- // } else {
- throw new IOException(e.getMessage());
- // }
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/AttachmentPartSource.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/AttachmentPartSource.java
deleted file mode 100644
index 3eaeba88d..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/AttachmentPartSource.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.core;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import org.apache.commons.httpclient.methods.multipart.PartSource;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.ITaskAttachment;
-
-/**
- * @author Steffen Pingel
- */
-public class AttachmentPartSource implements PartSource {
-
- private final ITaskAttachment attachment;
-
- public AttachmentPartSource(ITaskAttachment attachment) {
- this.attachment = attachment;
- }
-
- public InputStream createInputStream() throws IOException {
- return attachment.createInputStream();
- }
-
- public String getFileName() {
- return attachment.getFilename();
- }
-
- public long getLength() {
- return attachment.getLength();
- }
-
-}
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 739f9864a..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttribute.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.core;
-
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-
-/**
- * @author Rob Elves
- */
-public enum BugzillaAttribute {
-
- STATUS_WHITEBOARD("Status Whiteboard:", "status_whiteboard", TaskAttribute.TYPE_LONG_RICH_TEXT, false, false),
-
- ACTUAL_TIME("Hours Worked:", "actual_time", TaskAttribute.TYPE_SHORT_TEXT, true, false),
-
- ADD_COMMENT("Additional Comments:", "comment", TaskAttribute.TYPE_LONG_TEXT, true, false),
-
- ASSIGNED_TO("Assigned to:", "assigned_to", TaskAttribute.TYPE_PERSON, true, true),
-
- ASSIGNED_TO_NAME("Assigned to:", "assigned_to_name", TaskAttribute.TYPE_PERSON, true, true),
-
- ATTACHID("attachid", "attachid", TaskAttribute.TYPE_SHORT_TEXT, false, false),
-
- ATTACHMENT("attachment", "attachment", TaskAttribute.TYPE_ATTACHMENT, false, false),
-
- BLOCKED("Blocks:", "blocked", TaskAttribute.TYPE_TASK_DEPENDENCY, false, false),
-
- BUG("bug", "bug", TaskAttribute.TYPE_SHORT_TEXT, true, false),
-
- BUG_FILE_LOC("URL:", "bug_file_loc", TaskAttribute.TYPE_URL, false, false),
-
- BUG_ID("Bug:", "bug_id", TaskAttribute.TYPE_SHORT_TEXT, true, false),
-
- BUG_SEVERITY("Severity:", "bug_severity", TaskAttribute.TYPE_SINGLE_SELECT, false, false),
-
- BUG_STATUS("Status:", "bug_status", TaskAttribute.TYPE_SHORT_TEXT, true, true),
-
- BUG_WHEN("bug_when", "bug_when", TaskAttribute.TYPE_DATE, true, true),
-
- BUGZILLA("bugzilla", "bugzilla", TaskAttribute.TYPE_SHORT_TEXT, true, false),
-
- CC("CC:", "cc", IBugzillaConstants.EDITOR_TYPE_REMOVECC, true, true),
-
- REMOVECC("Remove CC", "removecc", IBugzillaConstants.EDITOR_TYPE_REMOVECC, true, true),
-
- CCLIST_ACCESSIBLE("CC List", "cclist_accessible", TaskAttribute.TYPE_BOOLEAN, true, false),
-
- CLASSIFICATION("Classification:", "classification", TaskAttribute.TYPE_SHORT_TEXT, true, false),
-
- CLASSIFICATION_ID("Classification ID:", "classification_id", TaskAttribute.TYPE_SHORT_TEXT, true, false),
-
- COMPONENT("Component:", "component", TaskAttribute.TYPE_SINGLE_SELECT, false, false),
-
- CREATION_TS("Opened:", "creation_ts", TaskAttribute.TYPE_DATE, true, false),
-
- CTYPE("Content Type", "ctype", TaskAttribute.TYPE_SHORT_TEXT, false, false),
-
- DATA("data", "data", TaskAttribute.TYPE_SHORT_TEXT, false, false),
-
- DATE("Date", "date", TaskAttribute.TYPE_DATE, false, false),
-
- DEADLINE("Deadline:", "deadline", TaskAttribute.TYPE_SHORT_TEXT, true, true),
-
- DELTA_TS("Modified:", "delta_ts", TaskAttribute.TYPE_DATE, true, false),
-
- DEPENDSON("Depends on (Subtasks):", "dependson", TaskAttribute.TYPE_TASK_DEPENDENCY, false, false),
-
- DESC("desc", "desc", TaskAttribute.TYPE_LONG_TEXT, true, true),
-
- EVERCONFIRMED("everconfirmed", "everconfirmed", TaskAttribute.TYPE_BOOLEAN, true, false),
-
- ESTIMATED_TIME("Estimated Time:", "estimated_time", TaskAttribute.TYPE_SHORT_TEXT, true, false),
-
- FILENAME("filename", "filename", TaskAttribute.TYPE_SHORT_TEXT, false, false),
-
- GROUP("Group", "group", TaskAttribute.TYPE_BOOLEAN, true, true),
-
- IS_OBSOLETE("Obsolete", "isobsolete", TaskAttribute.TYPE_BOOLEAN, true, false),
-
- IS_PATCH("Patch", "ispatch", TaskAttribute.TYPE_BOOLEAN, true, false),
-
- KEYWORDS("Keywords:", "keywords", IBugzillaConstants.EDITOR_TYPE_KEYWORDS, false, false),
-
- LONG_DESC("Description:", "long_desc", TaskAttribute.TYPE_LONG_RICH_TEXT, true, true),
-
- LONGDESCLENGTH("Number of comments", "longdesclength", TaskAttribute.TYPE_SHORT_TEXT, true, false),
-
- NEWCC("Add CC:", "newcc", TaskAttribute.TYPE_PERSON, true, false),
-
- OP_SYS("OS:", "op_sys", TaskAttribute.TYPE_SINGLE_SELECT, false, false),
-
- PRIORITY("Priority:", "priority", TaskAttribute.TYPE_SINGLE_SELECT, false, false),
-
- PRODUCT("Product:", "product", TaskAttribute.TYPE_SHORT_TEXT, false, true),
-
- REP_PLATFORM("Platform:", "rep_platform", TaskAttribute.TYPE_SINGLE_SELECT, false, false),
-
- REPORTER("Reporter:", "reporter", TaskAttribute.TYPE_PERSON, true, true),
-
- REPORTER_NAME("Reporter:", "reporter_name", TaskAttribute.TYPE_PERSON, true, true),
-
- REPORTER_ACCESSIBLE("Reporter", "reporter_accessible", TaskAttribute.TYPE_BOOLEAN, true, false),
-
- RESOLUTION("Resolution:", "resolution", TaskAttribute.TYPE_SHORT_TEXT, false, true),
-
- REMAINING_TIME("Hours Left:", "remaining_time", TaskAttribute.TYPE_SHORT_TEXT, true, false),
-
- SET_DEFAULT_ASSIGNEE("Reassign to default assignee", "set_default_assignee", TaskAttribute.TYPE_OPERATION, false,
- false),
-
- SHORT_DESC("Summary:", "short_desc", TaskAttribute.TYPE_SHORT_TEXT, true, false),
-
- SIZE("Size:", "size", TaskAttribute.TYPE_SHORT_TEXT, false, false),
-
- TARGET_MILESTONE("Target milestone:", "target_milestone", TaskAttribute.TYPE_SINGLE_SELECT, false, false),
-
- THETEXT("thetext", "thetext", TaskAttribute.TYPE_SHORT_TEXT, false, true),
-
- TYPE("type", "type", TaskAttribute.TYPE_SHORT_TEXT, false, false),
-
- UNKNOWN("UNKNOWN", "UNKNOWN", TaskAttribute.TYPE_SHORT_TEXT, false, false),
-
- VERSION("Version:", "version", TaskAttribute.TYPE_SINGLE_SELECT, false, false),
-
- INSTALL_VERSION("version of bugzilla installed", "install_version", null, true, false),
-
- VOTES("Votes:", "votes", TaskAttribute.TYPE_SHORT_TEXT, false, true),
-
- WORK_TIME("Add Time:", "work_time", TaskAttribute.TYPE_SHORT_TEXT, true, false),
-
- WHO("who", "who", TaskAttribute.TYPE_PERSON, false, false),
-
- WHO_NAME("who_name", "who_name", TaskAttribute.TYPE_SHORT_TEXT, true, true),
-
- QA_CONTACT("QA Contact", "qa_contact", TaskAttribute.TYPE_PERSON, true, false),
-
- QA_CONTACT_NAME("QA Contact", "qa_contact_name", TaskAttribute.TYPE_SHORT_TEXT, true, true),
-
- ADDSELFCC("Add self to CC", "addselfcc", TaskAttribute.TYPE_BOOLEAN, false, false),
-
- STATUS_OPEN("open status values", "status_open", null, true, true),
-
- NEW_COMMENT("new comment", "new_comment", TaskAttribute.TYPE_LONG_RICH_TEXT, true, false),
-
- // Used by search engine
- LI("used by search engine", "li", null, true, false),
-
- ID("used by search engine", "id", null, true, false),
-
- SHORT_SHORT_DESC("used by search engine", "short_short_desc", null, false, false),
-
- SEQ("used by search engine", "seq", null, false, false),
-
- RESULT("used by search engine", "result", null, false, false),
-
- RDF("used by search engine", "rdf", null, false, false),
-
- INSTALLATION("used by search engine", "installation", null, false, false),
-
- BUGS("used by search engine", "bugs", null, false, false);
-
- 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;
- }
-
- 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/BugzillaAttributeFactory.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttributeFactory.java
deleted file mode 100644
index 47a1ba30d..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttributeFactory.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.core;
-
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.Locale;
-
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractAttributeFactory;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskAttribute;
-
-/**
- * @author Rob Elves
- * @author Mik Kersten
- * @deprecated
- */
-@Deprecated
-public class BugzillaAttributeFactory extends AbstractAttributeFactory {
-
- private static final String DATE_FORMAT_1 = "yyyy-MM-dd HH:mm";
-
- private static final String DATE_FORMAT_2 = "yyyy-MM-dd HH:mm:ss";
-
- private static final String delta_ts_format = DATE_FORMAT_2;
-
- private static final String creation_ts_format = DATE_FORMAT_1;
-
- /**
- * public for testing Bugzilla 2.18 uses DATE_FORMAT_1 but later versions use DATE_FORMAT_2 Using lowest common
- * denominator DATE_FORMAT_1
- */
- public static final String comment_creation_ts_format = DATE_FORMAT_1;
-
- private static final String attachment_creation_ts_format = DATE_FORMAT_1;
-
- private static final long serialVersionUID = 5087501781682994759L;
-
- @Override
- public String mapCommonAttributeKey(String key) {
- if (key.equals(RepositoryTaskAttribute.NEW_CC)) {
- return BugzillaAttribute.NEWCC.getKey();
- } else if (key.equals(RepositoryTaskAttribute.COMMENT_DATE)) {
- return BugzillaAttribute.BUG_WHEN.getKey();
- } else if (key.equals(RepositoryTaskAttribute.COMMENT_AUTHOR)) {
- return BugzillaAttribute.WHO.getKey();
- } else if (key.equals(RepositoryTaskAttribute.COMMENT_AUTHOR_NAME)) {
- return BugzillaAttribute.WHO_NAME.getKey();
- } else if (key.equals(RepositoryTaskAttribute.USER_CC)) {
- return BugzillaAttribute.CC.getKey();
- } else if (key.equals(RepositoryTaskAttribute.COMMENT_TEXT)) {
- return BugzillaAttribute.THETEXT.getKey();
- } else if (key.equals(RepositoryTaskAttribute.DATE_CREATION)) {
- return BugzillaAttribute.CREATION_TS.getKey();
- } else if (key.equals(RepositoryTaskAttribute.DESCRIPTION)) {
- return BugzillaAttribute.DESC.getKey();
- } else if (key.equals(RepositoryTaskAttribute.ATTACHMENT_ID)) {
- return BugzillaAttribute.ATTACHID.getKey();
- } else if (key.equals(RepositoryTaskAttribute.ATTACHMENT_TYPE)) {
- return BugzillaAttribute.TYPE.getKey();
- } else if (key.equals(RepositoryTaskAttribute.ATTACHMENT_CTYPE)) {
- return BugzillaAttribute.CTYPE.getKey();
- } else if (key.equals(RepositoryTaskAttribute.USER_ASSIGNED)) {
- return BugzillaAttribute.ASSIGNED_TO.getKey();
- } else if (key.equals(RepositoryTaskAttribute.USER_ASSIGNED_NAME)) {
- return BugzillaAttribute.ASSIGNED_TO_NAME.getKey();
- } else if (key.equals(RepositoryTaskAttribute.RESOLUTION)) {
- return BugzillaAttribute.RESOLUTION.getKey();
- } else if (key.equals(RepositoryTaskAttribute.STATUS)) {
- return BugzillaAttribute.BUG_STATUS.getKey();
- } else if (key.equals(RepositoryTaskAttribute.DATE_MODIFIED)) {
- return BugzillaAttribute.DELTA_TS.getKey();
- } else if (key.equals(RepositoryTaskAttribute.USER_REPORTER)) {
- return BugzillaAttribute.REPORTER.getKey();
- } else if (key.equals(RepositoryTaskAttribute.USER_REPORTER_NAME)) {
- return BugzillaAttribute.REPORTER_NAME.getKey();
- } else if (key.equals(RepositoryTaskAttribute.SUMMARY)) {
- return BugzillaAttribute.SHORT_DESC.getKey();
- } else if (key.equals(RepositoryTaskAttribute.PRODUCT)) {
- return BugzillaAttribute.PRODUCT.getKey();
- } else if (key.equals(RepositoryTaskAttribute.KEYWORDS)) {
- return BugzillaAttribute.KEYWORDS.getKey();
- } else if (key.equals(RepositoryTaskAttribute.ATTACHMENT_DATE)) {
- return BugzillaAttribute.DATE.getKey();
- } else if (key.equals(RepositoryTaskAttribute.ATTACHMENT_SIZE)) {
- return BugzillaAttribute.SIZE.getKey();
- } else if (key.equals(RepositoryTaskAttribute.ADD_SELF_CC)) {
- return BugzillaAttribute.ADDSELFCC.getKey();
- } else if (key.equals(RepositoryTaskAttribute.PRIORITY)) {
- return BugzillaAttribute.PRIORITY.getKey();
- } else if (key.equals(RepositoryTaskAttribute.COMMENT_NEW)) {
- return BugzillaAttribute.NEW_COMMENT.getKey();
- } else if (key.equals(RepositoryTaskAttribute.COMPONENT)) {
- return BugzillaAttribute.COMPONENT.getKey();
- } else {
- return key;
- }
- }
-
- @Override
- public boolean isHidden(String key) {
- try {
- return BugzillaAttribute.valueOf(key.trim().toUpperCase(Locale.ENGLISH)).isHidden();
- } catch (IllegalArgumentException e) {
- return false;
- }
- }
-
- @Override
- public String getName(String key) {
- try {
- return BugzillaAttribute.valueOf(key.trim().toUpperCase(Locale.ENGLISH)).toString();
- } catch (IllegalArgumentException e) {
- return "<unknown>";
- }
- }
-
- @Override
- public boolean isReadOnly(String key) {
- try {
- return BugzillaAttribute.valueOf(key.trim().toUpperCase(Locale.ENGLISH)).isReadOnly();
- } catch (IllegalArgumentException e) {
- return true;
- }
- }
-
- @Override
- public Date getDateForAttributeType(String attributeKey, String dateString) {
- if (dateString == null || dateString.equals("")) {
- return null;
- }
- try {
- String mappedKey = mapCommonAttributeKey(attributeKey);
- Date parsedDate = null;
- if (mappedKey.equals(BugzillaAttribute.DELTA_TS.getKey())) {
- parsedDate = new SimpleDateFormat(delta_ts_format).parse(dateString);
- } else if (mappedKey.equals(BugzillaAttribute.CREATION_TS.getKey())) {
- parsedDate = new SimpleDateFormat(creation_ts_format).parse(dateString);
- } else if (mappedKey.equals(BugzillaAttribute.BUG_WHEN.getKey())) {
- parsedDate = new SimpleDateFormat(comment_creation_ts_format).parse(dateString);
- } else if (mappedKey.equals(BugzillaAttribute.DATE.getKey())) {
- parsedDate = new SimpleDateFormat(attachment_creation_ts_format).parse(dateString);
- }
- return parsedDate;
- } catch (Exception e) {
- return null;
- // throw new CoreException(new Status(IStatus.ERROR,
- // BugzillaPlugin.PLUGIN_ID, 0,
- // "Error parsing date string: " + dateString, e));
- }
- }
-
-}
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 3ac8ce005..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttributeMapper.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.core;
-
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.mylyn.tasks.core.data.TaskAttributeMapper;
-
-/**
- * @author Rob Elves
- */
-public class BugzillaAttributeMapper extends TaskAttributeMapper {
-
- private static final String DATE_FORMAT_1 = "yyyy-MM-dd HH:mm";
-
- private static final String DATE_FORMAT_2 = "yyyy-MM-dd HH:mm:ss";
-
- private static final String delta_ts_format = DATE_FORMAT_2;
-
- private static final String creation_ts_format = DATE_FORMAT_1;
-
- /**
- * public for testing Bugzilla 2.18 uses DATE_FORMAT_1 but later versions use DATE_FORMAT_2 Using lowest common
- * denominator DATE_FORMAT_1
- */
- public static final String comment_creation_ts_format = DATE_FORMAT_1;
-
- private static final String attachment_creation_ts_format = DATE_FORMAT_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")) {
- return true;
- } else {
- return false;
- }
- }
-
- @Override
- public void setBooleanValue(TaskAttribute attribute, Boolean value) {
- if (value == null) {
- attribute.setValue("0");
- } else if (value) {
- attribute.setValue("1");
- } else {
- attribute.setValue("0");
- }
- }
-
- private Date getDate(String attributeId, String dateString) {
- Date parsedDate = null;
- try {
- 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);
- }
- } catch (ParseException e) {
- return null;
- } catch (NumberFormatException e) {
- return null;
- }
- return parsedDate;
- }
-
- @Override
- public void setDateValue(TaskAttribute attribute, Date date) {
- if (date != null) {
- String dateString = null;
- String attributeId = attribute.getId();
-
- if (attributeId.equals(BugzillaAttribute.DELTA_TS.getKey())) {
- dateString = new SimpleDateFormat(delta_ts_format).format(date);
- } else if (attributeId.equals(BugzillaAttribute.CREATION_TS.getKey())) {
- dateString = new SimpleDateFormat(creation_ts_format).format(date);
- } else if (attributeId.equals(BugzillaAttribute.BUG_WHEN.getKey())) {
- dateString = new SimpleDateFormat(comment_creation_ts_format).format(date);
- } else if (attributeId.equals(BugzillaAttribute.DATE.getKey())) {
- dateString = new SimpleDateFormat(attachment_creation_ts_format).format(date);
- }
-
- if (dateString == null) {
- super.setDateValue(attribute, date);
- } else {
- attribute.setValue(dateString);
- }
-
- } else {
- attribute.clearValues();
- }
- }
-
- @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();
- }
- 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().getAttribute(id);
- }
- return taskAttribute.getAttribute(id);
- }
- return null;
- }
-}
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 c70be1bc9..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java
+++ /dev/null
@@ -1,1408 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- *******************************************************************************/
-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.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.MultiThreadedHttpConnectionManager;
-import org.apache.commons.httpclient.NameValuePair;
-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.PartSource;
-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.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.WebClientUtil;
-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.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 {
-
- protected static final String USER_AGENT = "BugzillaConnector";
-
- private static final int MAX_RETRIEVED_PER_QUERY = 100;
-
- private static final String QUERY_DELIMITER = "?";
-
- private static final String KEY_ID = "id";
-
- private static final String VAL_TRUE = "true";
-
- private static final String KEY_CC = "cc";
-
- private static final String POST_BUG_CGI = "/post_bug.cgi";
-
- private static final String PROCESS_BUG_CGI = "/process_bug.cgi";
-
- public static final int WRAP_LENGTH = 90;
-
- private static final String VAL_PROCESS_BUG = "process_bug";
-
- private static final String KEY_FORM_NAME = "form_name";
-
- private static final String VAL_NONE = "none";
-
- private static final String KEY_KNOB = "knob";
-
- // TODO change to BugzillaReportElement.ADD_COMMENT
- private static final String KEY_COMMENT = "comment";
-
- private static final String KEY_SHORT_DESC = "short_desc";
-
- // Pages with this string in the html occur when login is required
- private static final String LOGIN_REQUIRED = "goaheadandlogin=1";
-
- private static final String VALUE_CONTENTTYPEMETHOD_MANUAL = "manual";
-
- private static final String VALUE_ISPATCH = "1";
-
- private static final String VALUE_ACTION_INSERT = "insert";
-
- private static final String ATTRIBUTE_CONTENTTYPEENTRY = "contenttypeentry";
-
- private static final String ATTRIBUTE_CONTENTTYPEMETHOD = "contenttypemethod";
-
- private static final String ATTRIBUTE_ISPATCH = "ispatch";
-
- // private static final String CONTENT_TYPE_TEXT_HTML = "text/html";
-
- // private static final String CONTENT_TYPE_APP_XCGI = "application/x-cgi";
-
- private static final String CONTENT_TYPE_APP_RDF_XML = "application/rdf+xml";
-
- private static final String CONTENT_TYPE_APP_XML = "application/xml";
-
- private static final String CONTENT_TYPE_TEXT_XML = "text/xml";
-
- 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";
-
- protected Proxy proxy = Proxy.NO_PROXY;
-
- protected String username;
-
- protected String password;
-
- protected URL repositoryUrl;
-
- protected String characterEncoding;
-
- private boolean authenticated;
-
- private final Map<String, String> configParameters;
-
- private final HttpClient httpClient = new HttpClient(new MultiThreadedHttpConnectionManager());
-
- 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 {
- AuthenticationCredentials credentials = location.getCredentials(AuthenticationType.REPOSITORY);
- if (credentials != null) {
- this.username = credentials.getUserName();
- this.password = credentials.getPassword();
- }
- 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);
- } finally {
- if (method != null) {
- method.releaseConnection();
- }
- }
- }
-
- protected boolean hasAuthenticationCredentials() {
- return username != null && username.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
- */
- private 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
- if (!authenticated && hasAuthenticationCredentials()) {
- 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="
- + characterEncoding);
-
- // Resolves bug#195113
- httpClient.getParams().setParameter("http.protocol.single-cookie-header", true);
-
- // WARNING!! Setting browser compatability 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.PLUGIN_ID,
- 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();
- authenticated = false;
- authenticate(monitor);
- } else if (code == HttpURLConnection.HTTP_PROXY_AUTH) {
- // throw new LoginException("Proxy Authentication Required");
- authenticated = false;
- getMethod.getResponseBodyNoop();
- getMethod.releaseConnection();
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_REPOSITORY_LOGIN, repositoryUrl.toString(),
- "Proxy authentication required"));
- } else {
- getMethod.getResponseBodyNoop();
- getMethod.releaseConnection();
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_NETWORK, "Http error: " + HttpStatus.getStatusText(code)));
- // throw new IOException("HttpClient connection error response
- // code: " + code);
- }
- }
-
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_INTERNAL, "All connection attempts to " + repositoryUrl.toString()
- + " failed. Please verify connection and authentication information."));
- }
-
- public void logout(IProgressMonitor monitor) throws IOException, CoreException {
- monitor = Policy.monitorFor(monitor);
- authenticated = true;
- String loginUrl = repositoryUrl + "/relogin.cgi";
- GzipGetMethod method = null;
- try {
- method = getConnect(loginUrl, monitor);
- InputStream in = getResponseStream(method, monitor);
- try {
- BufferedReader responseReader = new BufferedReader(new InputStreamReader(in, characterEncoding));
-
- HtmlStreamTokenizer tokenizer = new HtmlStreamTokenizer(responseReader, null);
- for (Token token = tokenizer.nextToken(); token.getType() != Token.EOF; token = tokenizer.nextToken()) {
-
- if (token.getType() == Token.TAG) {
- HtmlTag tag = (HtmlTag) token.getValue();
- if (tag.getTagType() == Tag.A) {
- if (tag.hasAttribute("href")) {
- String id = tag.getAttribute("href");
- if (id != null && id.toLowerCase(Locale.ENGLISH).contains(LOGIN_REQUIRED)) {
- authenticated = false;
- return;
- }
- }
- }
- }
- }
-
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_NETWORK, repositoryUrl.toString(), "Logout unsuccessful."));
- } finally {
- in.close();
- }
- } catch (ParseException e) {
- authenticated = false;
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_INTERNAL, "Unable to parse response from " + repositoryUrl.toString() + "."));
- } finally {
- if (method != null) {
- method.releaseConnection();
- }
- }
- }
-
- private 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(
- "Content-encoding").getValue().equals(WebClientUtil.CONTENT_ENCODING_GZIP))
- ||
- // 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")
- .getValue()
- .equals("application/x-gzip"));
- return zipped;
- }
-
- public void authenticate(IProgressMonitor monitor) throws CoreException {
- monitor = Policy.monitorFor(monitor);
- if (!hasAuthenticationCredentials()) {
- authenticated = false;
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_REPOSITORY_LOGIN, repositoryUrl.toString(),
- "Authentication credentials missing."));
- }
-
- GzipPostMethod postMethod = null;
-
- try {
-
- hostConfiguration = WebUtil.createHostConfiguration(httpClient, location, monitor);
-
- NameValuePair[] formData = new NameValuePair[2];
- formData[0] = new NameValuePair(IBugzillaConstants.POST_INPUT_BUGZILLA_LOGIN, username);
- formData[1] = new NameValuePair(IBugzillaConstants.POST_INPUT_BUGZILLA_PASSWORD, password);
-
- postMethod = new GzipPostMethod(WebUtil.getRequestPath(repositoryUrl.toString()
- + IBugzillaConstants.URL_POST_LOGIN), true);
-
- postMethod.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset="
- + characterEncoding);
- postMethod.setRequestBody(formData);
- postMethod.setDoAuthentication(true);
- postMethod.setFollowRedirects(false);
-
- httpClient.getParams().setAuthenticationPreemptive(true);
- int code = WebUtil.execute(httpClient, hostConfiguration, postMethod, monitor);
- if (code == HttpURLConnection.HTTP_UNAUTHORIZED || code == HttpURLConnection.HTTP_FORBIDDEN) {
- authenticated = false;
- postMethod.getResponseBodyNoop();
- postMethod.releaseConnection();
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_REPOSITORY_LOGIN, repositoryUrl.toString(),
- "HTTP authentication failed."));
-
- } else if (code == HttpURLConnection.HTTP_PROXY_AUTH) {
- authenticated = false;
- postMethod.getResponseBodyNoop();
- postMethod.releaseConnection();
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_REPOSITORY_LOGIN, repositoryUrl.toString(),
- "Proxy authentication required"));
-
- } else if (code != HttpURLConnection.HTTP_OK) {
- authenticated = false;
- postMethod.getResponseBodyNoop();
- postMethod.releaseConnection();
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_NETWORK, "Http error: " + HttpStatus.getStatusText(code)));
- }
-
- if (hasAuthenticationCredentials()) {
-
- InputStream input = getResponseStream(postMethod, monitor);
- try {
- BufferedReader responseReader = new BufferedReader(new InputStreamReader(input, characterEncoding));
- HtmlStreamTokenizer tokenizer = new HtmlStreamTokenizer(responseReader, null);
- for (Token token = tokenizer.nextToken(); token.getType() != Token.EOF; token = tokenizer.nextToken()) {
- if (token.getType() == Token.TAG) {
- HtmlTag tag = (HtmlTag) token.getValue();
- if (tag.getTagType() == Tag.A) {
- String id = tag.getAttribute("href");
- if (id != null && id.toLowerCase(Locale.ENGLISH).contains(LOGIN_REQUIRED)) {
- responseReader.close();
- authenticated = false;
- throw new CoreException(new BugzillaStatus(IStatus.ERROR,
- BugzillaCorePlugin.PLUGIN_ID, RepositoryStatus.ERROR_REPOSITORY_LOGIN,
- repositoryUrl.toString(), IBugzillaConstants.INVALID_CREDENTIALS));
- }
- }
- }
- }
- } finally {
- input.close();
- }
- }
- authenticated = true;
- } catch (ParseException e) {
- authenticated = false;
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_INTERNAL, "Unable to parse response from " + repositoryUrl.toString() + "."));
-
- } catch (IOException e) {
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_IO, repositoryUrl.toString(), e));
- } finally {
- if (postMethod != null) {
- postMethod.releaseConnection();
- }
- httpClient.getParams().setAuthenticationPreemptive(false);
- }
- }
-
- public TaskData getTaskData(int id, TaskAttributeMapper mapper, IProgressMonitor monitor) throws IOException,
- CoreException {
- final String idString = String.valueOf(id);
- Set<String> data = new HashSet<String>();
- data.add(idString);
-
- TaskDataCollector collector = new TaskDataCollector() {
- @Override
- public void accept(TaskData taskData) {
- getRepositoryConfiguration().configureTaskData(taskData);
- }
- };
-
- Map<String, TaskData> returnedData = getTaskData(data, collector, mapper, monitor);
-
- return returnedData.get(idString);
-
- }
-
- public boolean getSearchHits(IRepositoryQuery query, TaskDataCollector collector, TaskAttributeMapper mapper,
- IProgressMonitor monitor) throws IOException, CoreException {
- GzipPostMethod postMethod = null;
-
- try {
-
- 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("&");
- if (result.length > 0) {
- for (String string : result) {
- String[] nameValue = string.split("=");
- if (nameValue.length == 1) {
- pairs.add(new NameValuePair(nameValue[0].trim(), ""));
- } else if (nameValue.length == 2 && nameValue[0] != null && nameValue[1] != null) {
- pairs.add(new NameValuePair(nameValue[0].trim(), URLDecoder.decode(nameValue[1].trim(),
- characterEncoding)));
- }
- }
- }
- }
-
- NameValuePair ctypePair = new NameValuePair("ctype", "rdf");
- // Test that we don't specify content type twice.
- if (!pairs.contains(ctypePair)) {
- pairs.add(ctypePair);
- }
-
- postMethod = postFormData(IBugzillaConstants.URL_BUGLIST, pairs.toArray(new NameValuePair[pairs.size()]),
- monitor);
- if (postMethod.getResponseHeader("Content-Type") != null) {
- Header responseTypeHeader = postMethod.getResponseHeader("Content-Type");
- for (String type : VALID_CONFIG_CONTENT_TYPES) {
- if (responseTypeHeader.getValue().toLowerCase(Locale.ENGLISH).contains(type)) {
- InputStream stream = getResponseStream(postMethod, monitor);
- try {
- RepositoryQueryResultsFactory queryFactory = new RepositoryQueryResultsFactory(stream,
- characterEncoding);
- 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;
- }
-
- 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, BugzillaAttribute.DEADLINE };
-
- 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:
- // 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;
- 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.");
- }
-
- InputStream stream = getResponseStream(method, monitor);
- try {
- if (method.getResponseHeader("Content-Type") != null) {
- Header responseTypeHeader = method.getResponseHeader("Content-Type");
- for (String type : VALID_CONFIG_CONTENT_TYPES) {
- if (responseTypeHeader.getValue().toLowerCase(Locale.ENGLISH).contains(type)) {
- RepositoryConfigurationFactory configFactory = new RepositoryConfigurationFactory(stream,
- characterEncoding);
-
- repositoryConfiguration = configFactory.getConfiguration();
- if (repositoryConfiguration != null) {
- repositoryConfiguration.setRepositoryUrl(repositoryUrl.toString());
- return repositoryConfiguration;
- }
- }
- }
-
- }
- parseHtmlError(stream);
- } finally {
- stream.close();
- }
- return null;
- } finally {
- if (method != null) {
- method.releaseConnection();
- }
- }
- }
-
- 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();
- }
- }
-
- public void postAttachment(String bugReportID, String comment, String description, String contentType,
- boolean isPatch, PartSource source, IProgressMonitor monitor) throws HttpException, IOException,
- CoreException {
- monitor = Policy.monitorFor(monitor);
- Assert.isNotNull(bugReportID);
- Assert.isNotNull(source);
- Assert.isNotNull(contentType);
-
- hostConfiguration = WebUtil.createHostConfiguration(httpClient, location, monitor);
- if (!authenticated && hasAuthenticationCredentials()) {
- 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, characterEncoding));
- if (username != null && password != null) {
- parts.add(new StringPart(IBugzillaConstants.POST_INPUT_BUGZILLA_LOGIN, username, characterEncoding));
- parts.add(new StringPart(IBugzillaConstants.POST_INPUT_BUGZILLA_PASSWORD, password, characterEncoding));
- }
- parts.add(new StringPart(IBugzillaConstants.POST_INPUT_BUGID, bugReportID, characterEncoding));
- if (description != null) {
- parts.add(new StringPart(IBugzillaConstants.POST_INPUT_DESCRIPTION, description, characterEncoding));
- }
- if (comment != null) {
- parts.add(new StringPart(IBugzillaConstants.POST_INPUT_COMMENT, comment, characterEncoding));
- }
- parts.add(new FilePart(IBugzillaConstants.POST_INPUT_DATA, source));
-
- 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));
- }
-
- 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.PLUGIN_ID,
- RepositoryStatus.ERROR_NETWORK, repositoryUrl.toString(), "Http error: "
- + 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);
- if (!authenticated && hasAuthenticationCredentials()) {
- authenticate(monitor);
- }
-
- postMethod = new GzipPostMethod(WebUtil.getRequestPath(repositoryUrl.toString() + formUrl), true);
- postMethod.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=" + characterEncoding);
-
- httpClient.getHttpConnectionManager().getParams().setSoTimeout(WebUtil.getConnectionTimeout());
-
-// postMethod.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, new BugzillaRetryHandler());
- postMethod.setRequestBody(formData);
- postMethod.setDoAuthentication(true);
- // httpClient.getHttpConnectionManager().getParams().setConnectionTimeout(CONNECT_TIMEOUT);
- int status = WebUtil.execute(httpClient, hostConfiguration, postMethod, monitor);
- if (status == HttpStatus.SC_OK) {
- return postMethod;
- } else {
- postMethod.getResponseBodyNoop();
- postMethod.releaseConnection();
- //StatusManager.log("Post failed: " + HttpStatus.getStatusText(status), this);
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_IO, repositoryUrl.toString(), new IOException(
- "Communication error occurred during upload. \n\n" + HttpStatus.getStatusText(status))));
-// throw new IOException("Communication error occurred during upload. \n\n" + HttpStatus.getStatusText(status));
- }
-
- }
-
- public RepositoryResponse postTaskData(TaskData taskData, IProgressMonitor monitor) throws IOException,
- CoreException {
- NameValuePair[] formData = null;
- String prefix = null;
- String prefix2 = null;
- String postfix = null;
- String postfix2 = null;
- monitor = Policy.monitorFor(monitor);
- if (taskData == null) {
- return null;
- } else if (taskData.isNew()) {
- formData = getPairsForNew(taskData);
- prefix = IBugzillaConstants.FORM_PREFIX_BUG_218;
- prefix2 = IBugzillaConstants.FORM_PREFIX_BUG_220;
- postfix = IBugzillaConstants.FORM_POSTFIX_216;
- postfix2 = IBugzillaConstants.FORM_POSTFIX_218;
- } else {
- formData = getPairsForExisting(taskData);
- }
-
- 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.");
- }
-
- 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 = "";
-
- 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) + " ";
- 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() && prefix != null && prefix2 != null && postfix != null
- && postfix2 != null) {
- int startIndex = -1;
- int startIndexPrefix = title.toLowerCase(Locale.ENGLISH).indexOf(
- prefix.toLowerCase(Locale.ENGLISH));
- int startIndexPrefix2 = title.toLowerCase(Locale.ENGLISH).indexOf(
- prefix2.toLowerCase(Locale.ENGLISH));
-
- if (startIndexPrefix != -1 || startIndexPrefix2 != -1) {
- if (startIndexPrefix != -1) {
- startIndex = startIndexPrefix + prefix.length();
- } else {
- startIndex = startIndexPrefix2 + prefix2.length();
- }
- int stopIndex = title.toLowerCase(Locale.ENGLISH).indexOf(
- postfix.toLowerCase(Locale.ENGLISH), startIndex);
- if (stopIndex == -1) {
- stopIndex = title.toLowerCase(Locale.ENGLISH).indexOf(
- postfix2.toLowerCase(Locale.ENGLISH), startIndex);
- }
- if (stopIndex > -1) {
- result = (title.substring(startIndex, stopIndex)).trim();
- }
- }
- }
- break;
- }
- }
- }
-
- if ((!taskData.isNew() && existingBugPosted != true) || (taskData.isNew() && result == null)) {
- try {
- if (in.markSupported()) {
- in.reset();
- }
- } catch (IOException e) {
- // ignore
- }
- parseHtmlError(in);
- }
-
- if (taskData.isNew()) {
- return new RepositoryResponse(ResponseKind.TASK_CREATED, result);
- } else {
- return new RepositoryResponse(ResponseKind.TASK_UPDATED, taskData.getTaskId());
- }
- } catch (ParseException e) {
- authenticated = false;
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_INTERNAL, "Unable to parse response from " + repositoryUrl.toString() + "."));
- } 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) {
- String value = null;
- value = a.getValue();
- if (value == null) {
- continue;
- }
- if (a.getId().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);
- }
- fields.put(a.getId(), new NameValuePair(a.getId(), value));
- }
- }
-
- TaskAttribute descAttribute = taskData.getRoot().getMappedAttribute(TaskAttribute.DESCRIPTION);
- if (descAttribute != null && !descAttribute.getValue().equals("")) {
- 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))) {
- if (a.getValue() != null && a.getValue().length() > 0) {
- int atIndex = a.getValue().indexOf("@");
- if (atIndex != -1) {
- String newValue = a.getValue().substring(0, atIndex);
- a.setValue(newValue);
- }
- }
- }
- }
-
- private NameValuePair[] getPairsForExisting(TaskData model) {
-
- 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();
- while (itr.hasNext()) {
- TaskAttribute a = itr.next();
-
- if (a == null) {
- continue;
- } else if (a.getId().equals(BugzillaAttribute.QA_CONTACT.getKey())
- || a.getId().equals(BugzillaAttribute.ASSIGNED_TO.getKey())) {
- cleanIfShortLogin(a);
- } else if (a.getId().equals(BugzillaAttribute.REPORTER.getKey())
- || a.getId().equals(BugzillaAttribute.CC.getKey())
- || a.getId().equals(BugzillaAttribute.REMOVECC.getKey())
- || a.getId().equals(BugzillaAttribute.CREATION_TS.getKey())) {
- continue;
- }
-
- if (a.getId() != null && a.getId().compareTo("") != 0) {
- String value = a.getValue();
- if (a.getId().equals(BugzillaAttribute.DELTA_TS.getKey())) {
- value = stripTimeZone(value);
- }
- fields.put(a.getId(), new NameValuePair(a.getId(), value != null ? value : ""));
- }
- }
-
- // 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
- 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());
- String inputAttributeId = originalOperation.getMetaData().getValue(
- TaskAttribute.META_ASSOCIATED_ATTRIBUTE_ID);
- if (originalOperation == null) {
- fields.put(KEY_KNOB, new NameValuePair(KEY_KNOB, VAL_NONE));
- } else if (inputAttributeId == null || inputAttributeId.equals("")) {
- 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(BugzillaAttribute.SHORT_DESC.getKey()) != null) {
- fields.put(KEY_SHORT_DESC, new NameValuePair(KEY_SHORT_DESC, model.getRoot().getMappedAttribute(
- BugzillaAttribute.SHORT_DESC.getKey()).getValue()));
- }
-
- 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, ""));
- }
-
- 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));
- }
- }
-
- return fields.values().toArray(new NameValuePair[fields.size()]);
-
- }
-
- public static String stripTimeZone(String longTime) {
- String result = longTime;
- if (longTime != null) {
- String[] values = longTime.split(" ");
- if (values != null && values.length > 2) {
- result = values[0] + " " + values[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(",");
- }
- }
- 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, characterEncoding));
- parseHtmlError(in);
- }
-
- private void parseHtmlError(BufferedReader in) throws IOException, CoreException {
-
- HtmlStreamTokenizer tokenizer = new HtmlStreamTokenizer(in, null);
-
- boolean isTitle = false;
- String title = "";
- String body = "";
-
- 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) + " ";
- 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) {
- authenticated = false;
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- 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.PLUGIN_ID,
- 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.PLUGIN_ID,
- RepositoryStatus.REPOSITORY_COMMENT_REQUIRED));
- }
- 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) {
- authenticated = false;
- // throw new
- // BugzillaException(IBugzillaConstants.LOGGED_OUT);
- throw new CoreException(new BugzillaStatus(IStatus.INFO, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.REPOSITORY_LOGGED_OUT,
- "You have been logged out. Please retry operation."));
- }
- 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.PLUGIN_ID, RepositoryStatus.ERROR_REPOSITORY,
- "A repository error has occurred.", body));
-
- } catch (ParseException e) {
- authenticated = false;
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_INTERNAL, "Unable to parse response from " + repositoryUrl.toString() + "."));
- } finally {
- in.close();
- }
- }
-
- public TaskHistory getHistory(String taskId, IProgressMonitor monitor) throws IOException, CoreException {
- hostConfiguration = WebUtil.createHostConfiguration(httpClient, location, monitor);
- if (!authenticated && hasAuthenticationCredentials()) {
- 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, characterEncoding);
- try {
- return parser.retrieveHistory(bugzillaLanguageSettings);
- } catch (LoginException e) {
- authenticated = false;
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_REPOSITORY_LOGIN, repositoryUrl.toString(),
- IBugzillaConstants.INVALID_CREDENTIALS));
- } catch (ParseException e) {
- authenticated = false;
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_INTERNAL, "Unable to parse response from "
- + repositoryUrl.toString() + "."));
- }
- } finally {
- in.close();
- }
- }
-
- } finally {
- if (method != null) {
- method.releaseConnection();
- }
- }
- return null;
- }
-
- public Map<String, TaskData> getTaskData(Set<String> taskIds, final TaskDataCollector collector,
- final TaskAttributeMapper mapper, final IProgressMonitor monitor) throws IOException, CoreException {
- GzipPostMethod method = null;
- HashMap<String, TaskData> taskDataMap = new HashMap<String, TaskData>();
- // make a copy to modify set
- taskIds = new HashSet<String>(taskIds);
- 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 taskDataMap;
- }
-
- itr = idsToRetrieve.iterator();
- int x = 0;
- for (; itr.hasNext(); x++) {
- String taskId = itr.next();
- formData[x] = new NameValuePair("id", taskId);
- TaskData taskData = new TaskData(mapper, BugzillaCorePlugin.CONNECTOR_KIND,
- repositoryUrl.toString(), taskId);
- setupExistingBugAttributes(repositoryUrl.toString(), taskData);
- taskDataMap.put(taskId, taskData);
- }
- formData[x++] = new NameValuePair("ctype", "xml");
- formData[x] = new NameValuePair("excludefield", "attachmentdata");
- method = postFormData(IBugzillaConstants.URL_POST_SHOW_BUG, formData, monitor);
- if (method == null) {
- throw new IOException("Could not post form, client returned null method.");
- }
-
- boolean parseable = false;
- List<BugzillaCustomField> customFields = repositoryConfiguration.getCustomFields();
- if (method.getResponseHeader("Content-Type") != null) {
- Header responseTypeHeader = method.getResponseHeader("Content-Type");
- 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, characterEncoding);
-
- TaskDataCollector collector2 = new TaskDataCollector() {
-
- @Override
- public void accept(TaskData taskData) {
- getRepositoryConfiguration().configureTaskData(taskData);
- ((TaskDataCollector) collector).accept(taskData);
- monitor.worked(1);
- }
- };
-
- factory.populateReport(taskDataMap, collector2, mapper, customFields);
- taskIds.removeAll(idsToRetrieve);
- parseable = true;
- break;
- } finally {
- input.close();
- }
- }
- }
- }
-
- if (!parseable) {
- parseHtmlError(getResponseStream(method, monitor));
- break;
- }
-
- } finally {
- if (method != null) {
- method.releaseConnection();
- }
- }
- }
-
- return taskDataMap;
- }
-
- 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");
- 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.PLUGIN_ID,
- "Error retrieving configuration timestamp", e));
- } 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
- if (!authenticated && hasAuthenticationCredentials()) {
- 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="
- + characterEncoding);
-
- // 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.PLUGIN_ID,
- 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();
- authenticated = false;
- authenticate(monitor);
- } else if (code == HttpURLConnection.HTTP_PROXY_AUTH) {
- authenticated = false;
- headMethod.getResponseBody();
- headMethod.releaseConnection();
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_REPOSITORY_LOGIN, repositoryUrl.toString(),
- "Proxy authentication required"));
- } else {
- headMethod.getResponseBody();
- headMethod.releaseConnection();
- throw new CoreException(new BugzillaStatus(Status.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_NETWORK, "Http error: " + HttpStatus.getStatusText(code)));
- // throw new IOException("HttpClient connection error response
- // code: " + code);
- }
- }
-
- throw new CoreException(new BugzillaStatus(Status.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_INTERNAL, "All connection attempts to " + repositoryUrl.toString()
- + " failed. Please verify connection and authentication information."));
- }
-
- public void setRepositoryConfiguration(RepositoryConfiguration repositoryConfiguration) {
- this.repositoryConfiguration = repositoryConfiguration;
- }
-
- public RepositoryConfiguration getRepositoryConfiguration() {
- return repositoryConfiguration;
- }
-
-}
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 b4702d1a8..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClientFactory.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- *******************************************************************************/
-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 {
-
- private 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("")) {
- language = IBugzillaConstants.DEFAULT_LANG;
- }
- BugzillaLanguageSettings languageSettings = BugzillaCorePlugin.getDefault().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 24213419e..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClientManager.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-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.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 synchronized BugzillaClient getClient(TaskRepository taskRepository, IProgressMonitor monitor)
- throws MalformedURLException, CoreException {
- BugzillaClient client = clientByUrl.get(taskRepository.getRepositoryUrl());
- if (client == null) {
-
- String language = taskRepository.getProperty(IBugzillaConstants.BUGZILLA_LANGUAGE_SETTING);
- if (language == null || language.equals("")) {
- language = IBugzillaConstants.DEFAULT_LANG;
- }
- client = BugzillaClientFactory.createClient(taskRepository);
- clientByUrl.put(taskRepository.getRepositoryUrl(), client);
- client.setRepositoryConfiguration(BugzillaCorePlugin.getRepositoryConfiguration(taskRepository, false,
- monitor));
- }
- return client;
- }
-
- public synchronized void repositoryAdded(TaskRepository repository) {
- // make sure there is no stale client still in the cache, bug #149939
- clientByUrl.remove(repository.getRepositoryUrl());
- }
-
- public synchronized void repositoryRemoved(TaskRepository repository) {
- clientByUrl.remove(repository.getRepositoryUrl());
- }
-
- public synchronized void repositorySettingsChanged(TaskRepository repository) {
- clientByUrl.remove(repository.getRepositoryUrl());
- }
-
- public void repositoryUrlChanged(TaskRepository repository, String oldUrl) {
- // ignore
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaComment.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaComment.java
deleted file mode 100644
index 6e340454e..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaComment.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.core;
-
-public class BugzillaComment {
-
- /** Comment's number */
- private final int number;
-
- private boolean hasAttachment;
-
- private String attachmentId;
-
- public BugzillaComment(int commentNumber) {
- this.number = commentNumber;
- }
-}
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 83e533c92..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaCorePlugin.java
+++ /dev/null
@@ -1,387 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- *******************************************************************************/
-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.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.internal.tasks.core.deprecated.RepositoryTaskAttribute;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-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.";
-
- private static final String ERROR_INCOMPATIBLE_CONFIGURATION = "Incompatible repository configuration file.";
-
- public static final String CONNECTOR_KIND = "bugzilla";
-
- public static final String PLUGIN_ID = "org.eclipse.mylyn.bugzilla";
-
- 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";
-
- // 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!
- java2buzillaPlatformMap.put("x86_64", "PC");
- java2buzillaPlatformMap.put("ia64", "PC");
- java2buzillaPlatformMap.put("ia64_32", "PC");
- java2buzillaPlatformMap.put("sparc", "Sun");
- java2buzillaPlatformMap.put("ppc", "Power PC"); // not Power!
-
- }
-
- 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 {
- if (!repositoryConfigurations.isEmpty()) {
- writeRepositoryConfigFile();
- }
-
- INSTANCE = null;
- super.stop(context);
- }
-
- static void setConnector(BugzillaRepositoryConnector theConnector) {
- connector = theConnector;
- }
-
- public static Map<String, RepositoryConfiguration> getConfigurations() {
- if (!cacheFileRead) {
- readRepositoryConfigurationFile();
- cacheFileRead = true;
- }
- 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) {
- if (!cacheFileRead) {
- readRepositoryConfigurationFile();
- cacheFileRead = true;
- }
- 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 {
- if (!cacheFileRead) {
- readRepositoryConfigurationFile();
- cacheFileRead = true;
- }
- if (repositoryConfigurations.get(repository.getRepositoryUrl()) == null || forceRefresh) {
- BugzillaClient client = connector.getClientManager().getClient(repository, monitor);
- RepositoryConfiguration config = client.getRepositoryConfiguration(monitor);
- if (config != null) {
- addRepositoryConfiguration(config);
- }
-
- }
- return repositoryConfigurations.get(repository.getRepositoryUrl());
- } catch (IOException e) {
- throw new CoreException(new Status(IStatus.ERROR, BugzillaCorePlugin.PLUGIN_ID, 1,
- "Error updating attributes.\n\n" + e.getMessage(), e));
- }
- }
-
- /** public for testing */
- public static void addRepositoryConfiguration(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) {
- repositoryConfigurations.remove(config.getRepositoryUrl());
- }
-
- /** public for testing */
- public static void readRepositoryConfigurationFile() {
- // IPath configFile = getProductConfigurationCachePath();
- if (repositoryConfigurationFile == null || !repositoryConfigurationFile.exists()) {
- return;
- }
- 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.PLUGIN_ID, 0, ERROR_INCOMPATIBLE_CONFIGURATION, e));
- try {
- if (in != null) {
- in.close();
- }
- if (repositoryConfigurationFile != null && repositoryConfigurationFile.exists()) {
- if (repositoryConfigurationFile.delete()) {
- // successfully deleted
- } else {
- log(new Status(IStatus.ERROR, BugzillaCorePlugin.PLUGIN_ID, 0, ERROR_DELETING_CONFIGURATION, e));
- }
- }
-
- } catch (Exception ex) {
- log(new Status(IStatus.ERROR, BugzillaCorePlugin.PLUGIN_ID, 0, ERROR_DELETING_CONFIGURATION, e));
- }
- } finally {
- if (in != null) {
- try {
- in.close();
- } catch (IOException e) {
- // ignore
- }
- }
- }
- }
-
- /** public for testing */
- public static void writeRepositoryConfigFile() {
- // IPath configFile = getProductConfigurationCachePath();
- if (repositoryConfigurationFile != null) {
- ObjectOutputStream out = null;
- try {
- out = new ObjectOutputStream(new FileOutputStream(repositoryConfigurationFile));
- out.writeInt(repositoryConfigurations.size());
- for (String key : repositoryConfigurations.keySet()) {
- RepositoryConfiguration item = repositoryConfigurations.get(key);
- if (item != null) {
- out.writeObject(item);
- }
- }
- } 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.PLUGIN_ID, 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");
- return bugFile;
- }
-
- public void setPlatformDefaultsOrGuess(TaskRepository repository, RepositoryTaskData 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) {
- RepositoryTaskAttribute opSysAttribute = newBugModel.getAttribute(BugzillaAttribute.OP_SYS.getKey());
- RepositoryTaskAttribute platformAttribute = newBugModel.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(RepositoryTaskData 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
- RepositoryTaskAttribute opSysAttribute = newBugModel.getAttribute(BugzillaAttribute.OP_SYS.getKey());
- RepositoryTaskAttribute platformAttribute = newBugModel.getAttribute(BugzillaAttribute.REP_PLATFORM.getKey());
-
- String OS = Platform.getOS();
- String platform = Platform.getOSArch();
-
- String bugzillaOS = null; // Bugzilla String for OS
- String bugzillaPlatform = null; // Bugzilla String for Platform
-/*
- AIX -> AIX
- Linux -> Linux
- HP-UX -> HP-UX
- Solaris -> Solaris
- MacOS X -> Mac OS X
- */
-
- bugzillaOS = System.getProperty("os.name") + " " + System.getProperty("os.version");
- // 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) {
- while (bugzillaOS != null && opSysAttribute.getOptionParameter(bugzillaOS) == null) {
- int dotindex = bugzillaOS.lastIndexOf('.');
- if (dotindex > 0) {
- bugzillaOS = bugzillaOS.substring(0, dotindex);
- } else {
- int spaceindex = bugzillaOS.lastIndexOf(' ');
- if (spaceindex > 0) {
- bugzillaOS = bugzillaOS.substring(0, spaceindex);
- } else {
- bugzillaOS = null;
- }
- }
- }
- } 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)
- && OS != null && OS.compareTo("macosx") == 0) {
- // TODO: this may not even be a legal value in another repository!
- bugzillaPlatform = "Macintosh";
- } else if (platformAttribute != null && platformAttribute.getOptionParameter(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.getOptionParameter(OPTION_ALL) != null) {
- opSysAttribute.setValue(OPTION_ALL);
- }
-
- if (bugzillaPlatform != null && platformAttribute != null) {
- platformAttribute.setValue(bugzillaPlatform);
- } else if (opSysAttribute != null && platformAttribute != null
- && platformAttribute.getOptionParameter(OPTION_ALL) != null) {
- opSysAttribute.setValue(OPTION_ALL);
- }
-
- } catch (Exception e) {
- StatusHandler.log(new Status(IStatus.ERROR, BugzillaCorePlugin.PLUGIN_ID, "could not set platform options",
- e));
- }
- }
-
- public Set<BugzillaLanguageSettings> getLanguageSettings() {
- return connector.getLanguageSettings();
- }
-
- public BugzillaLanguageSettings getLanguageSetting(String language) {
- return connector.getLanguageSetting(language);
- }
-}
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 cfe2bdebb..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaCustomField.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-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 {
-
- private static final long serialVersionUID = 5703683576871326128L;
-
- public static final String CUSTOM_FIELD_PREFIX = "cf_";
-
- private final String name;
-
- private final String description;
-
- private List<String> options = new ArrayList<String>();
-
- public BugzillaCustomField(String description, String name) {
- this.description = description;
- this.name = name;
- }
-
- 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);
- }
-}
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 9960bc097..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaFlag.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.core;
-
-import java.io.Serializable;
-
-/**
- * @author Frank Becker
- */
-public class BugzillaFlag implements Serializable {
-
- private final String name;
-
- private final String description;
-
- private final String type;
-
- private boolean requestable;
-
- private boolean specifically_requestable;
-
- private boolean multiplicable;
-
- public BugzillaFlag(String name, String description, String type, String requestable,
- String specifically_requestable, String multiplicable) {
- this.description = description;
- this.name = name;
- this.type = type;
-
- if (multiplicable != null && !multiplicable.equals("")) {
- this.multiplicable = multiplicable.equals("1");
- }
-
- if (requestable != null && !requestable.equals("")) {
- this.requestable = requestable.equals("1");
- }
-
- if (specifically_requestable != null && !specifically_requestable.equals("")) {
- this.specifically_requestable = specifically_requestable.equals("1");
- }
- }
-
- 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;
- }
-}
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 0f3e4f12a..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaLanguageSettings.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-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>";
-
- public static final String COMMAND_ERROR_LOGIN = "error_login";
-
- public static final String COMMAND_ERROR_COLLISION = "error_collision";
-
- public static final String COMMAND_ERROR_COMMENT_REQUIRED = "error_comment_required";
-
- public static final String COMMAND_ERROR_LOGGED_OUT = "error_logged_out";
-
- public static final String COMMAND_BAD_LOGIN = "bad_login";
-
- public static final String COMMAND_PROCESSED = "processed";
-
- public static final String COMMAND_CHANGES_SUBMITTED = "changes_submitted";
-
- 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/BugzillaMessages.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaMessages.java
deleted file mode 100644
index e8fa7eff9..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaMessages.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.core;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * @author Rob Elves
- */
-public final class BugzillaMessages extends NLS {
-
- private static final String BUNDLE_NAME = "org.eclipse.mylyn.internal.bugzilla.core.BugzillaMessages";//$NON-NLS-1$
-
- static {
- NLS.initializeMessages(BUNDLE_NAME, BugzillaMessages.class);
- }
-
- private BugzillaMessages() {
- // Do not instantiate
- }
-
- public static String repositoryLoginFailure;
-
- public static String repositoryNotFound;
-
- public static String repositoryCommentRequired;
-
- public static String repositoryCollision;
-
- public static String operationCancelled;
-
- public static String errorNetwork;
-
- public static String errorIo;
-
- public static String errorInternal;
-
- public static String errorRepository;
-
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaMessages.properties b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaMessages.properties
deleted file mode 100644
index f43666ea7..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaMessages.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2007 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
-###############################################################################
-### repository
-### {0} generally is the repository url
-errorRepository = Repository error from {0}:\n\n{1}
-repositoryLoginFailure = Unable to login to {0}.\n\n{1}\n\nPlease validate credentials via Task Repositories view.
-repositoryNotFound = Repository {0} could not be found.
-repositoryCommentRequired = You have to specify a new comment when making this change. Please comment on the reason for this change.
-repositoryCollision = Mid-air collision occurred while submitting to {0}.\n\nSynchronize task and re-submit changes.
-### repositoryUrl, class.simpleName, class.getMessage
-errorIo = I/O Error occurred while communicating with {0}.\n\n{1}: {2}
-errorNetwork = A network error occurred connecting to {0}.\n\n{1}
-errorInternal = An internal error has occurred: {0}
-operationCancelled = {0} was canceled by the user.
-
-
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 68ba9324e..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaOperation.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-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("Leave as %s %s"),
-
- accept("Accept (change status to ASSIGNED)"),
-
- resolve("Resolve as", "resolutionInput", TaskAttribute.TYPE_SINGLE_SELECT),
-
- duplicate("Mark as duplicate of #", "dup_id", TaskAttribute.TYPE_TASK_DEPENDENCY),
-
- reassign("Reassign to", "reassignInput", TaskAttribute.TYPE_PERSON),
-
- reassignbycomponent("Reassign to default assignee"),
-
- reopen("Reopen bug"),
-
- verify("Mark as VERIFIED"),
-
- close("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;
- }
-} \ No newline at end of file
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 5d8290e63..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryConnector.java
+++ /dev/null
@@ -1,546 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.core;
-
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.MalformedURLException;
-import java.net.URLEncoder;
-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.NullProgressMonitor;
-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.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=";
-
- private static final String CHANGED_BUGS_CGI_ENDDATE = "&chfieldto=Now";
-
- private static final String CHANGED_BUGS_CGI_QUERY = "/buglist.cgi?query_format=advanced&chfieldfrom=";
-
- private static final String CLIENT_LABEL = "Bugzilla (supports uncustomized 2.18-3.0)";
-
- private static final String COMMENT_FORMAT = "yyyy-MM-dd HH:mm";
-
- private static final String DEADLINE_FORMAT = "yyyy-MM-dd";
-
- private final BugzillaTaskAttachmentHandler attachmentHandler = new BugzillaTaskAttachmentHandler(this);
-
- private final BugzillaTaskDataHandler taskDataHandler = new BugzillaTaskDataHandler(this);
-
- private BugzillaClientManager clientManager;
-
- private 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) {
- if (taskData.isPartial()) {
- TaskMapper scheme = new TaskMapper(taskData);
- task.setSummary(scheme.getSummary());
- task.setPriority(scheme.getPriority().toString());
- task.setOwner(scheme.getOwner());
- task.setUrl(getTaskUrl(repository.getRepositoryUrl(), task.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 (isComplete) {
- task.setCompletionDate(new Date());
- }
-
- } else {
- TaskMapper scheme = new TaskMapper(taskData);
- scheme.applyTo(task);
-
- task.setUrl(BugzillaClient.getBugUrlWithoutLogin(repository.getRepositoryUrl(), taskData.getTaskId()));
-
- boolean isComplete = false;
- // TODO: use repository configuration to determine what -completed- states are
- 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);
- }
-
- // 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);
- }
-
- // Task Web Url
- String url = getTaskUrl(repository.getRepositoryUrl(), taskData.getTaskId());
- if (url != null) {
- task.setUrl(url);
- }
-
- // 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("")) {
- task.setAttribute(BugzillaAttribute.BUG_SEVERITY.getKey(), attrSeverity.getValue());
- }
-
- // Due Date
- if (taskData.getRoot().getMappedAttribute(BugzillaAttribute.ESTIMATED_TIME.getKey()) != null) {
- Date dueDate = null;
- // HACK: if estimated_time field exists, time tracking is
- // enabled
- try {
- TaskAttribute attributeDeadline = taskData.getRoot().getMappedAttribute(
- BugzillaAttribute.DEADLINE.getKey());
- if (attributeDeadline != null) {
- dueDate = new SimpleDateFormat(DEADLINE_FORMAT).parse(attributeDeadline.getValue());
- }
- } catch (Exception e) {
- // ignore
- }
- task.setDueDate(dueDate);
- }
- }
-
- 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("Checking for changed tasks", IProgressMonitor.UNKNOWN);
-
- if (repository.getSynchronizationTimeStamp() == null) {
- for (ITask task : session.getTasks()) {
- session.markStale(task);
- }
- return;
- }
-
- String dateString = repository.getSynchronizationTimeStamp();
- if (dateString == null) {
- dateString = "";
- }
-
- String urlQueryBase = repository.getRepositoryUrl() + CHANGED_BUGS_CGI_QUERY
- + URLEncoder.encode(dateString, repository.getCharacterEncoding()) + CHANGED_BUGS_CGI_ENDDATE;
-
- String urlQueryString = 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++;
- String newurlQueryString = URLEncoder.encode(task.getTaskId() + ",", repository.getCharacterEncoding());
- urlQueryString += newurlQueryString;
- if (queryCounter >= 1000) {
- queryForChanged(repository, changedTasks, urlQueryString, session);
-
- queryCounter = 0;
- urlQueryString = urlQueryBase + BUG_ID;
- newurlQueryString = "";
- }
-
- if (!itr.hasNext() && queryCounter != 0) {
- queryForChanged(repository, changedTasks, urlQueryString, session);
- }
- }
-
- for (ITask task : session.getTasks()) {
- if (changedTasks.contains(task)) {
- session.markStale(task);
- }
- }
-
- return;
- } catch (UnsupportedEncodingException e) {
- throw new CoreException(new Status(IStatus.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- "Repository configured with unsupported encoding: " + repository.getCharacterEncoding()
- + "\n\n Unable to determine changed tasks.", e));
- } finally {
- monitor.done();
- }
- }
-
- /**
- * TODO: clean up use of BugzillaTaskDataCollector
- */
- private void queryForChanged(final TaskRepository repository, Set<ITask> changedTasks, String urlQueryString,
- ISynchronizationSession context) 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);
- }
- };
-
- BugzillaRepositoryQuery query = new BugzillaRepositoryQuery(repository.getRepositoryUrl(), urlQueryString, "");
- performQuery(repository, query, collector, context, new NullProgressMonitor());
-
- 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) {
- try {
- monitor.beginTask("Running query", IProgressMonitor.UNKNOWN);
- BugzillaClient client = getClientManager().getClient(repository, monitor);
- 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.PLUGIN_ID, IStatus.INFO,
- "Unrecognized response from server", e);
- } catch (IOException e) {
- return new Status(IStatus.ERROR, BugzillaCorePlugin.PLUGIN_ID, IStatus.ERROR,
- "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("#");
- 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.PLUGIN_ID,
- "Error constructing task url for " + repositoryUrl + " id:" + taskId, e));
- }
- return null;
- }
-
- @Override
- public String getTaskIdPrefix() {
- return "bug";
- }
-
- public BugzillaClientManager getClientManager() {
- if (clientManager == null) {
- clientManager = new BugzillaClientManager();
- // TODO: Move this initialization elsewhere
- BugzillaCorePlugin.setConnector(this);
- BugzillaLanguageSettings enSetting = new BugzillaLanguageSettings(IBugzillaConstants.DEFAULT_LANG);
- enSetting.addLanguageAttribute("error_login", "Login");
- enSetting.addLanguageAttribute("error_login", "log in");
- enSetting.addLanguageAttribute("error_login", "check e-mail");
- enSetting.addLanguageAttribute("error_login", "Invalid Username Or Password");
- enSetting.addLanguageAttribute("error_collision", "Mid-air collision!");
- enSetting.addLanguageAttribute("error_comment_required", "Comment Required");
- enSetting.addLanguageAttribute("error_logged_out", "logged out");
- enSetting.addLanguageAttribute("bad_login", "Login");
- enSetting.addLanguageAttribute("bad_login", "log in");
- enSetting.addLanguageAttribute("bad_login", "check e-mail");
- enSetting.addLanguageAttribute("bad_login", "Invalid Username Or Password");
- enSetting.addLanguageAttribute("bad_login", "error");
- enSetting.addLanguageAttribute("processed", "processed");
- enSetting.addLanguageAttribute("changes_submitted", "Changes submitted");
- 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;
- try {
- 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);
- }
- }
- } catch (MalformedURLException e) {
- StatusHandler.log(new Status(IStatus.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- "Error retrieving configuration timestamp for " + repository.getRepositoryUrl(), e));
- }
- return result;
- }
- return false;
- }
-
- public static int getBugId(String taskId) throws CoreException {
- try {
- return Integer.parseInt(taskId);
- } catch (NumberFormatException e) {
- throw new CoreException(new Status(IStatus.ERROR, BugzillaCorePlugin.PLUGIN_ID, 0, "Invalid bug id: "
- + taskId, e));
- }
- }
-
- public void addLanguageSetting(BugzillaLanguageSettings language) {
- if (!languages.contains(language)) {
- this.languages.add(language);
- }
- }
-
- public Set<BugzillaLanguageSettings> getLanguageSettings() {
- return languages;
- }
-
- /** returns default language if language not found */
- public BugzillaLanguageSettings getLanguageSetting(String label) {
- for (BugzillaLanguageSettings language : getLanguageSettings()) {
- if (language.getLanguageName().equals(label)) {
- return language;
- }
- }
- return BugzillaCorePlugin.getDefault().getLanguageSetting(IBugzillaConstants.DEFAULT_LANG);
- }
-
- @Override
- public void postSynchronization(ISynchronizationSession event, IProgressMonitor monitor) throws CoreException {
- try {
- monitor.beginTask("", 1);
- if (event.isFullSynchronization()) {
- 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()) {
- return false;
- }
- String lastKnownMod = task.getAttribute(BugzillaAttribute.DELTA_TS.getKey());
- if (lastKnownMod != null) {
- TaskAttribute attrModification = taskData.getRoot().getMappedAttribute(TaskAttribute.DATE_MODIFICATION);
- if (attrModification != null) {
- return !lastKnownMod.equals(attrModification.getValue());
- }
-
- }
- return true;
- }
-
- @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(",")) {
- 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;
- }
-
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryQuery.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryQuery.java
deleted file mode 100644
index b7633e284..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryQuery.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.core;
-
-import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
-
-/**
- * @author Shawn Minto
- * @author Mik Kersten
- */
-public class BugzillaRepositoryQuery extends RepositoryQuery {
-
- private boolean customQuery = false;
-
- public BugzillaRepositoryQuery(String repositoryUrl, String queryUrl, String description) {
- super(description);
- setUrl(queryUrl);
- this.repositoryUrl = repositoryUrl;
- }
-
- @Override
- public String getConnectorKind() {
- return BugzillaCorePlugin.CONNECTOR_KIND;
- }
-
- public boolean isCustomQuery() {
- return customQuery;
- }
-
- public void setCustomQuery(boolean customQuery) {
- this.customQuery = customQuery;
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaStackTraceDuplicateDetector.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaStackTraceDuplicateDetector.java
deleted file mode 100644
index 92a8e1d66..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaStackTraceDuplicateDetector.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.bugzilla.core;
-
-import java.io.UnsupportedEncodingException;
-import java.net.URLEncoder;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractLegacyDuplicateDetector;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-/**
- * @author Meghan Allen
- */
-public class BugzillaStackTraceDuplicateDetector extends AbstractLegacyDuplicateDetector {
-
- private static final int DESCRIPTION_MAX_CHARS = 6000;
-
- //private static final String NO_STACK_MESSAGE = "Unable to locate a stack trace in the description text.";
-
- @Override
- public RepositoryQuery getDuplicatesQuery(TaskRepository repository, RepositoryTaskData taskData) {
- String queryUrl = "";
- String searchString = AbstractLegacyDuplicateDetector.getStackTraceFromDescription(taskData.getDescription());
- if (searchString != null && searchString.length() > DESCRIPTION_MAX_CHARS) {
- searchString = searchString.substring(0, DESCRIPTION_MAX_CHARS);
- }
-
- if (searchString == null) {
- //MessageDialog.openWarning(null, "No Stack Trace Found", NO_STACK_MESSAGE);
- return null;
- }
-
- try {
- queryUrl = repository.getRepositoryUrl() + "/buglist.cgi?long_desc_type=allwordssubstr&long_desc="
- + URLEncoder.encode(searchString, repository.getCharacterEncoding());
- } catch (UnsupportedEncodingException e) {
- StatusHandler.log(new Status(IStatus.WARNING, BugzillaCorePlugin.PLUGIN_ID,
- "Error during duplicate detection", e));
- return null;
- }
-
- queryUrl += "&product=" + taskData.getProduct();
-
- BugzillaRepositoryQuery bugzillaQuery = new BugzillaRepositoryQuery(repository.getRepositoryUrl(), queryUrl,
- "search");
- return bugzillaQuery;
- }
-
-}
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 9d1e86494..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaStatus.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-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 = "";
-
- public BugzillaStatus(int severity, String pluginId, int code) {
- super(severity, pluginId, code, "MylynStatus", null);
- this.errorMessage = null;
- }
-
- public BugzillaStatus(int severity, String pluginId, int code, String errorMessage) {
- super(severity, pluginId, code, "MylynStatus", null);
- this.errorMessage = errorMessage;
- }
-
- public BugzillaStatus(int severity, String pluginId, int code, String repositoryUrl, Throwable e) {
- super(severity, pluginId, code, "MylynStatus", e);
- 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);
- 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);
- 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(BugzillaMessages.repositoryLoginFailure, this.getRepositoryUrl(), this.errorMessage);
- case RepositoryStatus.ERROR_REPOSITORY_NOT_FOUND:
- return NLS.bind(BugzillaMessages.repositoryNotFound, this.errorMessage);
- case RepositoryStatus.ERROR_REPOSITORY:
- return NLS.bind(BugzillaMessages.errorRepository, this.getRepositoryUrl(), this.errorMessage);
- case RepositoryStatus.ERROR_IO:
- String string1 = "Unknown IO error occurred";
- String string2 = "No message provided";
- if (getException() != null) {
- string1 = getException().getClass().getSimpleName();
- string2 = getException().getMessage();
- }
- Object[] strings = { getRepositoryUrl(), string1, string2 };
- return NLS.bind(BugzillaMessages.errorIo, strings);
- case RepositoryStatus.ERROR_INTERNAL:
- return NLS.bind(BugzillaMessages.errorInternal, this.errorMessage);
- case RepositoryStatus.OPERATION_CANCELLED:
- return NLS.bind(BugzillaMessages.operationCancelled, this.errorMessage);
- case RepositoryStatus.REPOSITORY_COLLISION:
- return NLS.bind(BugzillaMessages.repositoryCollision, this.errorMessage);
- case RepositoryStatus.REPOSITORY_COMMENT_REQUIRED:
- if (errorMessage == null) {
- return BugzillaMessages.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";
- }
-
- 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/BugzillaTask.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTask.java
deleted file mode 100644
index 4a37e9fa4..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTask.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-/*
- * Created on 14-Jan-2005
- */
-package org.eclipse.mylyn.internal.bugzilla.core;
-
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-
-/**
- * @author Mik Kersten
- * @author Rob Elves
- * @deprecated
- */
-@Deprecated
-public class BugzillaTask extends AbstractTask {
-
- private String severity;
-
- private String product;
-
- public BugzillaTask(String repositoryUrl, String id, String label) {
- super(repositoryUrl, id, label);
- setUrl(BugzillaClient.getBugUrlWithoutLogin(repositoryUrl, id));
- }
-
- @Override
- public String getTaskKind() {
- return IBugzillaConstants.BUGZILLA_TASK_KIND;
- }
-
- @Override
- public String toString() {
- return "Bugzilla task: " + getHandleIdentifier();
- }
-
- @Override
- public String getConnectorKind() {
- return BugzillaCorePlugin.CONNECTOR_KIND;
- }
-
- public String getSeverity() {
- return severity;
- }
-
- public void setSeverity(String severity) {
- this.severity = severity;
- }
-
- public String getProduct() {
- return product;
- }
-
- public void setProduct(String product) {
- this.product = product;
- }
-
- @Override
- public boolean isLocal() {
- // ignore
- return false;
- }
-
-}
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 ed16059d1..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskAttachmentHandler.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-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.apache.commons.httpclient.methods.multipart.PartSource;
-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.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("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("Sending attachment", IProgressMonitor.UNKNOWN);
- BugzillaClient client = connector.getClientManager().getClient(repository,
- new SubProgressMonitor(monitor, IProgressMonitor.UNKNOWN));
- String description = source.getDescription();
- String contentType = source.getContentType();
-
- 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.isPatch() != null) {
- isPatch = mapper.isPatch();
- }
- }
-
- if (description == null) {
- throw new CoreException(new Status(IStatus.WARNING, BugzillaCorePlugin.PLUGIN_ID,
- "A description is required when submitting attachments."));
- }
-
- client.postAttachment(task.getTaskId(), comment, description, contentType, isPatch,
- new AttachmentPartSource(source), monitor);
- } catch (IOException e) {
- throw new CoreException(new Status(IStatus.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- "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.PLUGIN_ID,
- "Unable to retrieve attachment", e));
- }
- }
-
- public static class AttachmentPartSource implements PartSource {
-
- private final AbstractTaskAttachmentSource attachment;
-
- public AttachmentPartSource(AbstractTaskAttachmentSource attachment) {
- this.attachment = attachment;
- }
-
- public InputStream createInputStream() throws IOException {
- try {
- return attachment.createInputStream(null);
- } catch (CoreException e) {
- StatusHandler.log(new Status(IStatus.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- "Error submitting attachment", e));
- throw new IOException("Failed to create source stream");
- }
- }
-
- public String getFileName() {
- return attachment.getName();
- }
-
- public long getLength() {
- return attachment.getLength();
- }
-
- }
-}
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 ab39fd4b0..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java
+++ /dev/null
@@ -1,284 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.core;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-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.SubProgressMonitor;
-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;
-
-/**
- * @author Mik Kersten
- * @author Rob Elves
- */
-public class BugzillaTaskDataHandler extends AbstractTaskDataHandler {
-
- private static final String TASK_DATA_VERSION_CURRENT = "2.0";
-
- private final BugzillaRepositoryConnector connector;
-
- public BugzillaTaskDataHandler(BugzillaRepositoryConnector connector) {
- this.connector = connector;
- }
-
- public TaskData getTaskData(TaskRepository repository, String taskId, IProgressMonitor monitor)
- throws CoreException {
- try {
- BugzillaClient client = connector.getClientManager().getClient(repository,
- new SubProgressMonitor(monitor, IProgressMonitor.UNKNOWN));
- int bugId = BugzillaRepositoryConnector.getBugId(taskId);
- TaskData taskData;
- taskData = client.getTaskData(bugId, getAttributeMapper(repository), monitor);
- return taskData;
-
- } catch (IOException e) {
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_IO, repository.getRepositoryUrl(), e));
- }
- }
-
- @Override
- public void getMultiTaskData(TaskRepository repository, Set<String> taskIds, TaskDataCollector collector,
- IProgressMonitor monitor) throws CoreException {
- try {
- monitor.beginTask("Receiving tasks", taskIds.size());
- BugzillaClient client = connector.getClientManager().getClient(repository,
- new SubProgressMonitor(monitor, IProgressMonitor.UNKNOWN));
-
- client.getTaskData(taskIds, collector, getAttributeMapper(repository), monitor);
- } catch (IOException e) {
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_IO, repository.getRepositoryUrl(), e));
- } finally {
- monitor.done();
- }
- }
-
- @Override
- public void migrateTaskData(TaskRepository taskRepository, TaskData taskData) {
- if (taskData.getVersion() == null) {
- for (TaskAttribute attribute : new ArrayList<TaskAttribute>(taskData.getRoot().getAttributes().values())) {
- if (attribute.getId().equals(BugzillaAttribute.DESC.getKey())) {
- TaskAttribute attrLongDesc = createAttribute(taskData, BugzillaAttribute.LONG_DESC);
- attrLongDesc.setValue(attribute.getValue());
- taskData.getRoot().removeAttribute(BugzillaAttribute.DESC.getKey());
- }
- }
-
- RepositoryConfiguration configuration = BugzillaCorePlugin.getRepositoryConfiguration(taskRepository.getRepositoryUrl());
- if (configuration != null) {
- configuration.addValidOperations(taskData);
- }
- taskData.setVersion(TASK_DATA_VERSION_CURRENT);
- }
- }
-
- @Override
- public RepositoryResponse postTaskData(TaskRepository repository, TaskData taskData,
- Set<TaskAttribute> changedAttributes, IProgressMonitor monitor) throws CoreException {
- try {
- BugzillaClient client = connector.getClientManager().getClient(repository,
- new SubProgressMonitor(monitor, IProgressMonitor.UNKNOWN));
- 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 {
- throw e;
- }
-
- }
-
- } catch (IOException e) {
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_IO, repository.getRepositoryUrl(), e));
- }
- }
-
- @Override
- public boolean initializeTaskData(TaskRepository repository, TaskData data, ITaskMapping initializationData,
- IProgressMonitor monitor) throws CoreException {
- if (initializationData == null) {
- return false;
- }
- String product = initializationData.getProduct();
- if (product == null) {
- return false;
- }
- return initializeTaskData(repository, data, product, monitor);
- }
-
- public boolean initializeTaskData(TaskRepository repository, TaskData data, String product, IProgressMonitor monitor)
- throws CoreException {
- data.setVersion(TASK_DATA_VERSION_CURRENT);
-
- RepositoryConfiguration repositoryConfiguration = BugzillaCorePlugin.getRepositoryConfiguration(repository,
- false, monitor);
-
- TaskAttribute productAttribute = createAttribute(data, BugzillaAttribute.PRODUCT);
- productAttribute.setValue(product);
-
- List<String> optionValues = repositoryConfiguration.getProducts();
- Collections.sort(optionValues);
- for (String optionValue : optionValues) {
- productAttribute.putOption(optionValue, optionValue);
- }
-
- TaskAttribute attributeStatus = createAttribute(data, BugzillaAttribute.BUG_STATUS);
- optionValues = repositoryConfiguration.getStatusValues();
- for (String option : optionValues) {
- attributeStatus.putOption(option, option);
- }
-
- attributeStatus.setValue(IBugzillaConstants.VALUE_STATUS_NEW);
-
- createAttribute(data, BugzillaAttribute.SHORT_DESC);
-
- TaskAttribute attributeVersion = createAttribute(data, 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(data, 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));
- }
-
- TaskAttribute attributePlatform = createAttribute(data, 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(data, 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(data, 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(data, 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(data, BugzillaAttribute.ASSIGNED_TO);
- attributeAssignedTo.setValue("");
-
- TaskAttribute attributeBugFileLoc = createAttribute(data, BugzillaAttribute.BUG_FILE_LOC);
- attributeBugFileLoc.setValue("http://");
-
- createAttribute(data, BugzillaAttribute.DEPENDSON);
- createAttribute(data, BugzillaAttribute.BLOCKED);
- createAttribute(data, BugzillaAttribute.NEWCC);
- createAttribute(data, BugzillaAttribute.LONG_DESC);
-
- return true;
- }
-
- 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;
- }
-
- @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 {
- TaskAttribute attributeProject = parentTaskData.getRoot().getMappedAttribute(TaskAttribute.PRODUCT);
- String product = attributeProject.getValue();
- initializeTaskData(repository, subTaskData, product, monitor);
- // TODO:
- //cloneTaskData(parentTaskData, subTaskData);
- TaskAttribute attributeBlocked = createAttribute(subTaskData, BugzillaAttribute.BLOCKED);
- attributeBlocked.setValue(parentTaskData.getTaskId());
-
- TaskAttribute parentAttributeAssigned = parentTaskData.getRoot()
- .getMappedAttribute(TaskAttribute.USER_ASSIGNED);
- TaskAttribute attributeAssigned = createAttribute(subTaskData, BugzillaAttribute.ASSIGNED_TO);
- attributeAssigned.setValue(parentAttributeAssigned.getValue());
-
- return true;
- }
-
- @Override
- public TaskAttributeMapper getAttributeMapper(TaskRepository taskRepository) {
- return new BugzillaAttributeMapper(taskRepository);
- }
-
-}
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 80b6b2ae3..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/GzipGetMethod.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-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;
-import org.eclipse.mylyn.commons.net.WebClientUtil;
-
-/**
- * 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", WebClientUtil.CONTENT_ENCODING_GZIP);
- }
- 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 665787a8e..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/GzipPostMethod.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-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;
-import org.eclipse.mylyn.commons.net.WebClientUtil;
-
-/**
- * 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", WebClientUtil.CONTENT_ENCODING_GZIP);
- }
- 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 c086d0340..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/IBugzillaConstants.java
+++ /dev/null
@@ -1,280 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- *******************************************************************************/
-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";
-
- static final String ERROR_MIDAIR_COLLISION = "collision";
-
- static final String ERROR_MSG_MIDAIR_COLLISION = "A mid-air collision has occurred. Please synchronize by selecting Synchronize in the task's context menu.";
-
- static final String ERROR_COMMENT_REQUIRED = "comment required";
-
- 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.";
-
- static final String ERROR_INVALID_USERNAME_OR_PASSWORD = "Invalid Username or Password";
-
- static final String LOGGED_OUT = "logged out";
-
- static final String MOST_RECENT_QUERY = "org.eclipse.mylyn.bugzilla.query.last";
-
- static final String SERVER_VERSION = "org.eclipse.mylyn.bugzilla.server.version";
-
- public static final int RETURN_ALL_HITS = -1;
-
- public static final String CONTENT_TYPE_RDF = "&ctype=rdf";
-
- public static final String POST_INPUT_BUGZILLA_PASSWORD = "Bugzilla_password";
-
- public static final String POST_INPUT_BUGZILLA_LOGIN = "Bugzilla_login";
-
- public static final String POST_INPUT_BUGID = "bugid";
-
- public static final String POST_INPUT_ACTION = "action";
-
- public static final String POST_INPUT_COMMENT = "comment";
-
- public static final String POST_INPUT_DESCRIPTION = "description";
-
- public static final String POST_INPUT_DATA = "data";
-
- public static final String URL_POST_LOGIN = "/index.cgi";
-
- public static final String URL_POST_ATTACHMENT_UPLOAD = "/attachment.cgi";
-
- public static final String URL_BUGLIST = "/buglist.cgi";
-
- public static final String URL_GET_ATTACHMENT_DOWNLOAD = "/attachment.cgi?id=";
-
- public static final String URL_GET_ATTACHMENT_SUFFIX = "/attachment.cgi?id=";
-
- public static final String URL_BUG_ACTIVITY = "/show_activity.cgi?id=";
-
- public static final String URL_SHOW_VOTES = "/votes.cgi?action=show_bug&bug_id=";
-
- public static final String URL_VOTE = "/votes.cgi?action=show_user&bug_id=";
-
- public static final String URL_DEPENDENCY_TREE = "/showdependencytree.cgi?id=";
-
- public static final String URL_DEPENDENCY_GRAPH = "/showdependencygraph.cgi?id=";
-
- public static final String URL_GET_SHOW_BUG = "/show_bug.cgi?id=";
-
- public static final String URL_GET_CONFIG_RDF = "/config.cgi?ctype=rdf";
-
- //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=";
-
- public static final String URL_GET_SHOW_BUG_XML_NOID = "/show_bug.cgi?ctype=xml&excludefield=attachmentdata";
-
- public static final String URL_POST_SHOW_BUG = "/show_bug.cgi";
-
- public static final String XML_ERROR_INVALIDBUGID = "invalidbugid";
-
- public static final String XML_ERROR_NOTFOUND = "notfound";
-
- public static final String XML_ERROR_NOTPERMITTED = "notpermitted";
-
- public static final String ENCODING_UTF_8 = "UTF-8";
-
- /** 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";
- case SERVER_222:
- return "2.22";
- case SERVER_220:
- return "2.20";
- case SERVER_218:
- return "2.18";
- default:
- return "null";
- }
- }
-
- /** 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";
-
- static final String MAX_RESULTS = "org.eclipse.mylyn.bugzilla.search.results.max";
-
- // names for the resources used to hold the different attributes of a bug
- static final String VALUES_STATUS = "org.eclipse.mylyn.bugzilla.values.status";
-
- static final String VALUES_RESOLUTION = "org.eclipse.mylyn.bugzilla.values.resolution";
-
- static final String VALUES_COMPONENT = "org.eclipse.mylyn.bugzilla.values.component";
-
- static final String VALUES_VERSION = "org.eclipse.mylyn.bugzilla.values.version";
-
- static final String VALUES_TARGET = "org.eclipse.mylyn.bugzilla.values.target";
-
- static final String ECLIPSE_BUGZILLA_URL = "https://bugs.eclipse.org/bugs";
-
- static final String TEST_BUGZILLA_218_URL = "http://mylyn.eclipse.org/bugs218";
-
- static final String TEST_BUGZILLA_220_URL = "http://mylyn.eclipse.org/bugs220";
-
- static final String TEST_BUGZILLA_2201_URL = "http://mylyn.eclipse.org/bugs2201";
-
- static final String TEST_BUGZILLA_222_URL = "http://mylyn.eclipse.org/bugs222";
-
- static final String TEST_BUGZILLA_30_URL = "http://mylyn.eclipse.org/bugs30";
-
- static final String TEST_BUGZILLA_303_URL = "http://mylyn.eclipse.org/bugs303";
-
- static final String TEST_BUGZILLA_31_URL = "http://mylyn.eclipse.org/bugs31";
-
- // Default values for keys
-
- static final String[] DEFAULT_STATUS_VALUES = { "Unconfirmed", "New", "Assigned", "Reopened", "Resolved",
- "Verified", "Closed" };
-
- static final String[] DEFAULT_PRESELECTED_STATUS_VALUES = { "New", "Assigned", "Reopened" };
-
- // 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",
- "enhancement" };
-
- static final String[] DEFAULT_PRIORITY_VALUES = { "P1", "P2", "P3", "P4", "P5" };
-
- static final String[] DEFAULT_HARDWARE_VALUES = { "All", "Macintosh", "PC", "Power PC", "Sun", "Other" };
-
- static final String[] DEFAULT_OS_VALUES = { "All", "AIX Motif", "Windows 95", "Windows 98", "Windows CE",
- "Windows ME", "Windows 2000", "Windows NT", "Windows XP", "Windows All", "MacOS X", "Linux", "Linux-GTK",
- "Linux-Motif", "HP-UX", "Neutrino", "QNX-Photon", "Solaris", "Unix All", "other" };
-
- 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 = "Mylyn Bugzilla Connector";
-
- public static final String TITLE_NEW_BUG = "New Bugzilla Report";
-
- public static final String MESSAGE_LOGIN_FAILURE = "Bugzilla login information or repository version incorrect";
-
- public static final String INVALID_2201_ATTRIBUTE_IGNORED = "EclipsebugsBugzilla2.20.1";
-
- public static final String VALUE_STATUS_RESOLVED = "RESOLVED";
-
- public static final String VALUE_STATUS_NEW = "NEW";
-
- public static final String VALUE_STATUS_CLOSED = "CLOSED";
-
- public static final String VALUE_STATUS_ASSIGNED = "ASSIGNED";
-
- public static final String VALUE_STATUS_VERIFIED = "VERIFIED";
-
- public static final String VALUE_RESOLUTION_LATER = "LATER";
-
- 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 = "The requested operation is not permitted.";
-
- public static final String ERROR_MSG_INVALID_BUG_ID = "Invalid bug id. The requested bug id does not exist.";
-
- public static final String FORM_PREFIX_BUG_218 = "Bug ";
-
- public static final String FORM_PREFIX_BUG_220 = "Issue ";
-
- public static final String FORM_POSTFIX_216 = " posted";
-
- public static final String FORM_POSTFIX_218 = " Submitted";
-
- public static final String INVALID_CREDENTIALS = "Invalid repository credentials.";
-
- public static final String SHOW_ACTIVITY = "/show_activity.cgi?id=";
-
- public static final String REPOSITORY_SETTING_SHORT_LOGIN = "bugzilla.shortLoginEnabled";
-
- public static final String BUGZILLA_TASK_KIND = "Bug";
-
- static final int MAX_URL_LENGTH = 2000;
-
- public static final String TIMESTAMP_NOT_AVAILABLE = "n/a";
-
- public static final String BUGZILLA_DEF_OS = "bugzilla.default.os";
-
- public static final String BUGZILLA_DEF_PLATFORM = "bugzilla.default.platform";
-
- public static final String BUGZILLA_LANGUAGE_SETTING = "bugzilla.languageSetting";
-
- public static final String DEFAULT_LANG = "en (default)";
-
- // Bugzilla Task Attribute Editor Types
-
- public static final String EDITOR_TYPE_KEYWORDS = "bugzilla.editor.keywords";
-
- public static final String EDITOR_TYPE_REMOVECC = "bugzilla.editor.removecc";
-
- public static final String ATTRIBUTE_BUGZILLA_QUERY_CUSTOM = "bugzilla.query.custom";
-
- // Old Tags used for migration
- public static final String TAG_BUGZILLA_QUERY = "BugzillaQuery";
-
- public static final String TAG_BUGZILLA_CUSTOM_QUERY = "BugzillaCustomQuery";
-}
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 ee88d4c4e..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, 2007 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/MultiBugReportFactory.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/MultiBugReportFactory.java
deleted file mode 100644
index cf5648f11..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/MultiBugReportFactory.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-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.PLUGIN_ID,
- RepositoryStatus.ERROR_REPOSITORY, "", IBugzillaConstants.ERROR_MSG_INVALID_BUG_ID));
- } else if (errorResponse.equals(IBugzillaConstants.XML_ERROR_NOTPERMITTED)) {
- throw new CoreException(new BugzillaStatus(IStatus.WARNING, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_REPOSITORY, "", IBugzillaConstants.ERROR_MSG_OP_NOT_PERMITTED));
- } else {
- throw new CoreException(new BugzillaStatus(IStatus.WARNING, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_REPOSITORY, "", "Unexpected error occurred: " + errorResponse));
- }
- }
- }
-}
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 7928e0c01..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/RepositoryConfiguration.java
+++ /dev/null
@@ -1,592 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-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.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-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 = 575019225495659016L;
-
- private static final String VERSION_UNKNOWN = "unknown";
-
- private String repositoryUrl = "<unknown>";
-
- 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 String version = VERSION_UNKNOWN;
-
- public RepositoryConfiguration() {
- super();
- // ignore
- }
-
- 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);
- }
-
- // /**
- // * Adds a list of components to the given product.
- // */
- // public void addComponents(String product, List<String> components) {
- // ProductEntry entry = products.get(product);
- // if (entry == null) {
- // entry = new ProductEntry(product);
- // products.put(product, entry);
- // }
- // for (String component : components) {
- // entry.addComponent(component);
- // }
- // }
- // /**
- // * Adds a list of components to the given product.
- // */
- // public void addComponents(String product, List<String> components) {
- // ProductEntry entry = products.get(product);
- // if (entry == null) {
- // entry = new ProductEntry(product);
- // products.put(product, entry);
- // }
- // for (String component : components) {
- // 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);
- }
-
- // /**
- // * Adds a list of components to the given product.
- // */
- // public void addVersions(String product, List<String> versions) {
- // ProductEntry entry = products.get(product);
- // if (entry == null) {
- // entry = new ProductEntry(product);
- // products.put(product, entry);
- // }
- // for (String version : versions) {
- // 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 = version;
- }
-
- public String 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;
-
- 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();
- return getTargetMilestones(product);
- case BUG_STATUS:
- return getStatusValues();
- case VERSION:
- // return getVersions();
- return getVersions(product);
- case COMPONENT:
- // return getComponents();
- 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 new ArrayList<String>();
- }
- }
-
- /**
- * 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) {
- updateAttributeOptions(taskData);
- addValidOperations(taskData);
- }
-
- 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())) {
- if (attribute.getId().startsWith(BugzillaCustomField.CUSTOM_FIELD_PREFIX)) {
- attribute.clearOptions();
- List<BugzillaCustomField> customFields = getCustomFields();
-
- for (BugzillaCustomField bugzillaCustomField : customFields) {
- if (bugzillaCustomField.getName().equals(attribute.getId())) {
- List<String> optionList = bugzillaCustomField.getOptions();
- for (String option : optionList) {
- attribute.putOption(option, option);
- }
- }
- }
- } else {
-
- BugzillaAttribute element;
- try {
- element = BugzillaAttribute.valueOf(attribute.getId().trim().toUpperCase(Locale.ENGLISH));
- } catch (RuntimeException e) {
- if (e instanceof IllegalArgumentException) {
- // ignore unrecognized tags
- continue;
- }
- throw e;
- }
- attribute.clearOptions();
- List<String> optionValues = getOptionValues(element, product);
- if (element != BugzillaAttribute.OP_SYS && element != BugzillaAttribute.BUG_SEVERITY
- && element != BugzillaAttribute.PRIORITY && element != BugzillaAttribute.BUG_STATUS) {
- Collections.sort(optionValues);
- }
- if (element == BugzillaAttribute.TARGET_MILESTONE && optionValues.isEmpty()) {
-
- existingReport.getRoot().removeAttribute(BugzillaAttribute.TARGET_MILESTONE.getKey());
- continue;
- }
- attribute.clearOptions();
- for (String option : optionValues) {
- attribute.putOption(option, option);
- }
-
- // TODO: bug#162428, bug#150680 - something along the lines of...
- // but must think about the case of multiple values selected etc.
- // if(attribute.hasOptions()) {
- // if(!attribute.getOptionValues().containsKey(attribute.getValue()))
- // {
- // // updateAttributes()
- // }
- // }
- }
- }
-
- }
-
- public void addValidOperations(TaskData bugReport) {
- TaskAttribute attributeStatus = bugReport.getRoot().getMappedAttribute(TaskAttribute.STATUS);
-
- BUGZILLA_REPORT_STATUS status = BUGZILLA_REPORT_STATUS.NEW;
- if (attributeStatus == null) {
- StatusHandler.log(new Status(IStatus.WARNING, BugzillaCorePlugin.PLUGIN_ID,
- "Status not found for task. Synchronize task to correct."));
- } else {
- 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;
- }
- }
- 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);
- break;
- case CLOSED:
- addOperation(bugReport, BugzillaOperation.none);
- addOperation(bugReport, BugzillaOperation.reopen);
- break;
- case VERIFIED:
- addOperation(bugReport, BugzillaOperation.none);
- addOperation(bugReport, BugzillaOperation.reopen);
- addOperation(bugReport, BugzillaOperation.close);
- }
- String bugzillaVersion = getInstallVersion();
- if (bugzillaVersion == null) {
- bugzillaVersion = "2.18";
- }
- if (bugzillaVersion.compareTo("3.1") < 0
- && (status == BUGZILLA_REPORT_STATUS.NEW || status == BUGZILLA_REPORT_STATUS.ASSIGNED
- || status == BUGZILLA_REPORT_STATUS.REOPENED || status == BUGZILLA_REPORT_STATUS.UNCONFIRMED)) {
- // old bugzilla workflow is used
- addOperation(bugReport, BugzillaOperation.reassign);
- addOperation(bugReport, BugzillaOperation.reassignbycomponent);
- }
- }
-
- 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());
-
- TaskAttribute attributeStatus = bugReport.getRoot().getMappedAttribute(TaskAttribute.STATUS);
- TaskAttribute attributeResolution = bugReport.getRoot().getMappedAttribute(TaskAttribute.RESOLUTION);
-
- String 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) {
- attrResolvedInput.putOption(resolution, resolution);
- }
- }
- 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;
- }
-}
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 63f874892..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/RepositoryConfigurationFactory.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-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 0ae70f5d4..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/RepositoryQueryResultsFactory.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-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 42645bd48..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxBugzillaQueryContentHandler.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-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, BugzillaCorePlugin.CONNECTOR_KIND, repositoryUrl, parsedText);
- taskData.setPartial(true);
- 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;
- }
-
- }
-
- 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 24f71a7af..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxConfigurationContentHandler.java
+++ /dev/null
@@ -1,505 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-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";
-
- private static final String ELEMENT_STATUS_OPEN = "status_open";
-
- private static final String ELEMENT_TARGET_MILESTONE = "target_milestone";
-
- private static final String ELEMENT_TARGET_MILESTONES = "target_milestones";
-
- private static final String ELEMENT_INSTALL_VERSION = "install_version";
-
- private static final String ATTRIBUTE_RDF_ABOUT = "rdf:about";
-
- private static final String ATTRIBUTE_RESOURCE = "resource";
-
- private static final String ELEMENT_VERSION = "version";
-
- private static final String ELEMENT_VERSIONS = "versions";
-
- private static final String ELEMENT_COMPONENT = "component";
-
- private static final String ELEMENT_COMPONENTS = "components";
-
- private static final String ELEMENT_NAME = "name";
-
- private static final String ELEMENT_PRODUCTS = "products";
-
- private static final String ELEMENT_DESCRIPTION = "description";
-
- private static final String ELEMENT_FIELDS = "fields";
-
- private static final String ELEMENT_FIELD = "field";
-
- private static final String ELEMENT_FLAG_TYPES = "flag_types";
-
- private static final String ELEMENT_FLAG_TYPE = "flag_type";
-
- private static final String ELEMENT_SEVERITY = "severity";
-
- private static final String ELEMENT_PRIORITY = "priority";
-
- private static final String ELEMENT_KEYWORD = "keyword";
-
- private static final String ELEMENT_OP_SYS = "op_sys";
-
- private static final String ELEMENT_PLATFORM = "platform";
-
- private static final String ELEMENT_LI = "li";
-
- private static final String ELEMENT_STATUS = "status";
-
- private static final String ELEMENT_TYPE = "type";
-
- private static final String ELEMENT_REQUESTABLE = "requestable";
-
- private static final String ELEMENT_SPECIFICALLY_REQUESTABLE = "specifically_requestable";
-
- private static final String ELEMENT_MULTIPLICABLE = "multiplicable";
-
- 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 int state = EXPECTING_ROOT;
-
- private String currentProduct = "";
-
- private String currentName = "";
-
- private String currentDescription = "";
-
- private String currentType;
-
- private String currentRequestable;
-
- private String currentSpecifically_requestable;
-
- private String currentMultiplicable;
-
- 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 String currentCustomOptionName = "";
-
- 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_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);
- } 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
- if (about != null && !componentNames.containsValue(about)) {
- if (characters.length() > 0) {
- componentNames.put(about, characters.toString());
- }
- }
- } 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_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);
- 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_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)) {
- BugzillaFlag newFlag = new BugzillaFlag(currentName, currentDescription, currentType, currentRequestable,
- currentSpecifically_requestable, currentMultiplicable);
- configuration.addFlag(newFlag);
- state = state & ~IN_FLAG_TYPE;
- } else if (localName.startsWith(BugzillaCustomField.CUSTOM_FIELD_PREFIX)) {
- state = state & ~IN_CUSTOM_OPTION;
- currentCustomOptionName = "";
- }
- }
-
- 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:
- if (attributes != null) {
- about = attributes.getValue(ATTRIBUTE_RDF_ABOUT);
- }
- 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_TYPE | 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);
- }
- }
-
- }
- 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 c40b52c68..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxMultiBugReportContentHandler.java
+++ /dev/null
@@ -1,460 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-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
- */
-public class SaxMultiBugReportContentHandler extends DefaultHandler {
-
- private static final String ATTRIBUTE_NAME = "name";
-
- private static final String COMMENT_ATTACHMENT_STRING = "Created an attachment (id=";
-
- private StringBuffer characters;
-
- private TaskComment taskComment;
-
- private Map<String, TaskCommentMapper> attachIdToComment = new HashMap<String, TaskCommentMapper>();
-
- private int commentNum = 0;
-
- private TaskAttachmentMapper 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 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)) {
- errorMessage = attributes.getValue("error");
- }
- attachIdToComment = new HashMap<String, TaskCommentMapper>();
- commentNum = 0;
- taskComment = null;
- longDescs = new ArrayList<TaskComment>();
- 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 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()));
- isPatch = "1".equals(attributes.getValue(BugzillaAttribute.IS_PATCH.getKey()));
- }
- break;
- }
-
- }
-
- @Override
- public void endElement(String uri, String localName, String qName) throws SAXException {
-
- String parsedText = characters.toString();
-
- if (localName.startsWith(BugzillaCustomField.CUSTOM_FIELD_PREFIX)) {
- TaskAttribute endAttribute = repositoryTaskData.getRoot().getAttribute(localName);
- if (endAttribute == null) {
- String desc = "???";
- for (BugzillaCustomField bugzillaCustomField : customFields) {
- if (localName.equals(bugzillaCustomField.getName())) {
- desc = bugzillaCustomField.getDescription();
- }
- }
- TaskAttribute atr = repositoryTaskData.getRoot().createAttribute(localName);
- atr.getMetaData().defaults().setLabel(desc).setReadOnly(true);
- 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 + " id not found.";
- }
- } catch (Exception e) {
- errorMessage = "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 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 = TaskAttachmentMapper.createFrom(attachmentAttribute);
- attachment.setAttachmentId(parsedText);
- attachment.setPatch(isPatch);
- attachment.setDeprecated(isDeprecated);
- 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);
-
- updateAttachmentMetaData();
- 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("")) {
- blockOrDepends.setValue(parsedText);
- } else {
- blockOrDepends.setValue(blockOrDepends.getValue() + ", " + parsedText);
- }
- }
- break;
- case UNKNOWN:
- //ignore
- 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 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 + "");
- 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));
- taskComment.setText(comment.commentText);
- taskComment.applyTo(attribute);
- commentNum++;
-
- parseAttachment(taskComment);
-
- }
-
- /** determines attachment id from comment */
- private void parseAttachment(TaskCommentMapper comment) {
-
- String attachmentID = "";
- String commentText = comment.getText();
- if (commentText.startsWith(COMMENT_ATTACHMENT_STRING)) {
- int endIndex = commentText.indexOf(")");
- if (endIndex > 0 && endIndex < commentText.length()) {
- attachmentID = commentText.substring(COMMENT_ATTACHMENT_STRING.length(), endIndex);
- if (!attachmentID.equals("")) {
- attachIdToComment.put(attachmentID, comment);
- }
- }
- }
- }
-
- private static class TaskComment {
-
- public int number;
-
- public String author;
-
- public String authorName;
-
- public String createdTimeStamp;
-
- public String commentText;
-
- 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 94877537c..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/UnrecognizedReponseException.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-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 90668238a..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/XmlCleaner.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.core;
-
-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 StringBuffer clean(Reader in) {
-
- HtmlStreamTokenizer tokenizer = new HtmlStreamTokenizer(in, null);
- StringBuffer content = new StringBuffer();
-
- // Hack since HtmlStreamTokenizer not familiar with xml tag.
- content.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
- try {
- 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) {
- String resourceID = tag.getAttribute("resource");
- tag.setAttribute("resource", resourceID.replace("&", "&amp;"));
- }
- if (tag.getAttribute("rdf:about") != null) {
- String resourceID = tag.getAttribute("rdf:about");
- tag.setAttribute("rdf:about", resourceID.replace("&", "&amp;"));
- }
- }
- if (!token.toString().startsWith("<?xml")) {
- content.append(token.toString());
- }
- }
- } catch (IOException e) {
-
- } catch (ParseException e) {
-
- }
- return content;
- }
-
-}
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 be051ae5b..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AssignmentEvent.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- *******************************************************************************/
-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() + " | "
- + 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 f544e8fa0..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AttachmentEvent.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- *******************************************************************************/
-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+");
-
- 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 = "";
- for (AttachmentFlag flag : this.flags) {
- flagString += flag + " ";
- }
- 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);
- 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(", ");
- for (String token : flagToken) {
- if (token.indexOf("(") != -1) {
- int end = token.indexOf("(");
- String substr = token.substring(0, end);
- token = substr;
- }
-
- /* Handle the case of the obsolete status 'needs-work' */
- if (token.startsWith("needs-work")) {
- /*
- * 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-"));
- /*
- * 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")
- || 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) {
- System.err.println("WARNING: Attachment flag status unknown: " + token);
- }
-
- 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) {
- System.err.println("WARNING: Attachment flag state unknown: " + token);
- }
-
- flags.add(new AttachmentFlag(flagStatus, flagState));
- }
- }
- return flags;
- }
-
- @Override
- public String toString() {
- return this.getName() + " | " + this.getDate() + " | " + this.getWhat() + " | " + this.attachmentId + " | "
- + 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 56920b359..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AttachmentFlag.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- *******************************************************************************/
-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())
- + "]";
- }
-}
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 c106e320d..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AttachmentFlagState.java
+++ /dev/null
@@ -1,15 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- *******************************************************************************/
-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 a6e3a1336..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AttachmentFlagStatus.java
+++ /dev/null
@@ -1,15 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- *******************************************************************************/
-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 a147556cd..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/BugzillaTaskHistoryParser.java
+++ /dev/null
@@ -1,232 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- *******************************************************************************/
-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 = "";
-
- 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() + " ";
- 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 = "";
- }
- 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");
- }
- 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")) {
- numChanges = tag.getIntAttribute("rowspan");
- 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)) {
- data = ""; // empty field
- }
- 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/ResolutionEvent.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/ResolutionEvent.java
deleted file mode 100644
index fc95dbb51..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/ResolutionEvent.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- *******************************************************************************/
-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() + " | "
- + (this.getType().equals(ResolutionType.UNKNOWN) ? "" : this.getType());
- }
-
-}
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 4364e0b3f..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/ResolutionType.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.bugzilla.core.history;
-
-/**
- * @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")) {
- return ResolutionType.FIXED;
- }
- if (change.contains("DUPLICATE")) {
- return ResolutionType.DUPLICATE;
- }
- if (change.equals("INVALID")) {
- return ResolutionType.INVALID;
- }
- if (change.equals("LATER")) {
- return ResolutionType.LATER;
- }
- if (change.equals("WORKSFORME")) {
- return ResolutionType.WORKSFORME;
- }
- if (change.equals("REOPENED")) {
- return ResolutionType.REOPENED;
- }
- if (change.equals("WONTFIX")) {
- return ResolutionType.WONTFIX;
- }
- if (change.equals("REMIND")) {
- return ResolutionType.REMIND;
- }
- if (change.equals("MOVED")) {
- return ResolutionType.MOVED;
- }
- if (change.equals("EXPIRED")) {
- return ResolutionType.EXPIRED;
- }
- if (change.equals("NOTABUG")) { // Gnome
- return ResolutionType.NOTABUG;
- }
- if (change.equals("NOTGNOME")) { // Gnome
- return ResolutionType.NOTGNOME;
- }
- if (change.equals("INCOMPLETE")) { // Gnome
- return ResolutionType.INCOMPLETE;
- }
- if (change.equals("OBSOLETE")) { // Gnome
- return ResolutionType.OBSOLETE;
- }
- if (change.equals("NOTXIMIAN")) { // Gnome
- return ResolutionType.NOTXIMIAN;
- }
- if (change.equals("NEXTRELEASE")) { // Redhat
- return ResolutionType.NEXTRELEASE;
- }
- if (change.equals("ERRATA")) {// Redhat
- return ResolutionType.ERRATA;
- }
- if (change.equals("RAWHIDE")) {// Redhat
- return ResolutionType.RAWHIDE;
- }
- if (change.equals("UPSTREAM")) {// Redhat
- return ResolutionType.UPSTREAM;
- }
- if (change.equals("CANTFIX")) {// Redhat
- return ResolutionType.CANTFIX;
- }
- if (change.equals("CURRENTRELEASE")) {// Redhat
- return ResolutionType.CURRENTRELEASE;
- }
- if (change.equals("INSUFFICIENT_DATA")) {// Redhat
- return ResolutionType.INSUFFICIENT_DATA;
- }
- if (change.equals("DEFERRED")) {// Redhat
- return ResolutionType.DEFERRED;
- }
- if (change.equals("") == false) {
- System.err.println("Unknown resolution type: " + 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 bd6cae5d8..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/StatusEvent.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- *******************************************************************************/
-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() + " | "
- + 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 348e26ff0..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/StatusType.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.bugzilla.core.history;
-
-/**
- * @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")) {
- return RESOLVED;
- }
- if (change.equals("ASSIGNED")) {
- return ASSIGNED;
- }
- if (change.equals("NEW")) {
- return NEW;
- }
- if (change.equals("REOPENED")) {
- return REOPENED;
- }
- if (change.equals("CLOSED")) {
- return CLOSED;
- }
- if (change.equals("VERIFIED")) {
- return VERIFIED;
- }
- if (change.equals("UNCONFIRMED")) {
- return UNCONFIRMED;
- }
- if (change.startsWith("NEEDINFO")) {
- return NEEDINFO;
- }
- if (change.equals("WAITING")) {
- return WAITING;
- }
- if (change.equals("SUSPENDED")) {
- return SUSPENDED;
- }
- if (change.equals("MODIFIED")) {
- return MODIFIED;
- }
- if (change.equals("POST")) {
- return POST;
- }
- if (change.equals("INVESTIGATE")) {
- return INVESTIGATE;
- }
- if (change.equals("PASSES_QA")) {
- return PASSES_QA;
- }
- if (change.equals("PROD_READY")) {
- return PROD_READY;
- }
- if (change.equals("RELEASE_PENDING")) {
- return RELEASE_PENDING;
- }
- if (change.equals("ON_QA")) {
- return ON_QA;
- }
- if (change.equals("QA_READY")) {
- return QA_READY;
- }
- if (change.equals("FAILS_QA")) {
- return FAILS_QA;
- }
- if (change.equals("SPEC")) {
- return SPEC;
- }
- if (change.equals("") == false) {
- System.err.println("Unknown status type: " + 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 af6de2c1b..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/TaskHistory.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- *******************************************************************************/
-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");
- }
- 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 d0b600323..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/TaskRevision.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- *******************************************************************************/
-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";
-
- protected final static String RESOLUTION = "Resolution";
-
- protected final static String ASSIGNMENT = "AssignedTo";
-
- protected final static String ATTACHMENT = "Attachment";
-
- protected String name;
-
- protected String date;
-
- protected String what;
-
- protected String removed;
-
- protected String added;
-
- protected TaskRevision() {
- this.added = "";
- }
-
- 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")) {
- 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;
- }
-
- public int compareTo(TaskRevision o) {
- return this.date.compareTo(o.getDate());
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.tests/.classpath b/org.eclipse.mylyn.bugzilla.tests/.classpath
deleted file mode 100644
index c0275fa5b..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/.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="accessible" pattern="org/eclipse/mylyn/**"/>
- </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.tests/.cvsignore b/org.eclipse.mylyn.bugzilla.tests/.cvsignore
deleted file mode 100644
index 0a2b58025..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-bin
-credentials.properties
diff --git a/org.eclipse.mylyn.bugzilla.tests/.project b/org.eclipse.mylyn.bugzilla.tests/.project
deleted file mode 100644
index eb0931c1a..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.mylyn.bugzilla.tests</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/org.eclipse.mylyn.bugzilla.tests/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.mylyn.bugzilla.tests/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 22f3eace7..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,340 +0,0 @@
-#Tue May 20 10:48:00 PDT 2008
-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=ignore
-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=ignore
-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,NORMAL
-org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,API
-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=false
-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.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.tests/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.mylyn.bugzilla.tests/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 5e70d0848..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,63 +0,0 @@
-#Sat Mar 01 03:38:47 PST 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">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*******************************************************************************\n * Copyright (c) 2004, 2007 Mylyn project committers and others.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *******************************************************************************/\n\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ignore\n${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ignore</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created JavaScript files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for vars" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Jsdoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created function stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated function stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_methods=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=true
-sp_cleanup.correct_indentation=true
-sp_cleanup.format_source_code=true
-sp_cleanup.format_source_code_changes_only=false
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=true
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=true
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=true
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=true
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=true
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/org.eclipse.mylyn.bugzilla.tests/.settings/org.eclipse.ltk.core.refactoring.prefs b/org.eclipse.mylyn.bugzilla.tests/.settings/org.eclipse.ltk.core.refactoring.prefs
deleted file mode 100644
index 7ab03bdac..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/.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.tests/.settings/org.eclipse.mylyn.tasklist.prefs b/org.eclipse.mylyn.bugzilla.tests/.settings/org.eclipse.mylyn.tasklist.prefs
deleted file mode 100644
index 0a2cc0b30..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/.settings/org.eclipse.mylyn.tasklist.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Mon Jun 18 17:14:59 PDT 2007
-eclipse.preferences.version=1
-project.repository.kind=bugzilla
-project.repository.url=https\://bugs.eclipse.org/bugs
diff --git a/org.eclipse.mylyn.bugzilla.tests/.settings/org.eclipse.mylyn.tasks.ui.prefs b/org.eclipse.mylyn.bugzilla.tests/.settings/org.eclipse.mylyn.tasks.ui.prefs
deleted file mode 100644
index d8c6d26af..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/.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.tests/.settings/org.eclipse.pde.api.tools.prefs b/org.eclipse.mylyn.bugzilla.tests/.settings/org.eclipse.pde.api.tools.prefs
deleted file mode 100644
index f5987fcb4..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/.settings/org.eclipse.pde.api.tools.prefs
+++ /dev/null
@@ -1,145 +0,0 @@
-#Tue Apr 08 17:49:50 PDT 2008
-ANNOTATION_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
-ANNOTATION_ELEMENT_TYPE_ADDED_FIELD=Error
-ANNOTATION_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
-ANNOTATION_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error
-ANNOTATION_ELEMENT_TYPE_ADDED_METHOD=Error
-ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
-ANNOTATION_ELEMENT_TYPE_ADDED_TYPE_MEMBER=Error
-ANNOTATION_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-ANNOTATION_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
-ANNOTATION_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
-ANNOTATION_ELEMENT_TYPE_CHANGED_INTERFACE_BOUNDS=Error
-ANNOTATION_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Error
-ANNOTATION_ELEMENT_TYPE_CHANGED_TO_CLASS=Error
-ANNOTATION_ELEMENT_TYPE_CHANGED_TO_ENUM=Error
-ANNOTATION_ELEMENT_TYPE_CHANGED_TO_INTERFACE=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD_WITHOUT_DEFAULT_VALUE=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD_WITH_DEFAULT_VALUE=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
-API_LEAK=Ignore
-API_PROFILE_ELEMENT_TYPE_REMOVED_API_COMPONENT=Error
-CLASS_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
-CLASS_ELEMENT_TYPE_ADDED_FIELD=Error
-CLASS_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
-CLASS_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error
-CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
-CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CLASS_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
-CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERCLASS_SET=Error
-CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CLASS_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-CLASS_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Error
-CLASS_ELEMENT_TYPE_CHANGED_SUPERCLASS=Error
-CLASS_ELEMENT_TYPE_CHANGED_TO_ANNOTATION=Error
-CLASS_ELEMENT_TYPE_CHANGED_TO_ENUM=Error
-CLASS_ELEMENT_TYPE_CHANGED_TO_INTERFACE=Error
-CLASS_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
-CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
-CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
-CLASS_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
-CLASS_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Error
-CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Error
-CONSTRUCTOR_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
-CONSTRUCTOR_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
-CONSTRUCTOR_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error
-CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-CONSTRUCTOR_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
-CONSTRUCTOR_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
-CONSTRUCTOR_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
-CONSTRUCTOR_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Error
-CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Error
-ENUM_ELEMENT_TYPE_ADDED_FIELD=Error
-ENUM_ELEMENT_TYPE_ADDED_METHOD=Error
-ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-ENUM_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Error
-ENUM_ELEMENT_TYPE_CHANGED_TO_ANNOTATION=Error
-ENUM_ELEMENT_TYPE_CHANGED_TO_CLASS=Error
-ENUM_ELEMENT_TYPE_CHANGED_TO_INTERFACE=Error
-ENUM_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
-ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
-ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
-ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
-ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
-FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
-FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
-FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENTS=Error
-FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
-ILLEGAL_EXTEND=Ignore
-ILLEGAL_IMPLEMENT=Ignore
-ILLEGAL_INSTANTIATE=Ignore
-ILLEGAL_OVERRIDE=Ignore
-ILLEGAL_REFERENCE=Ignore
-INTERFACE_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
-INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
-INTERFACE_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_TYPE_MEMBER=Error
-INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETERS=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_INTERFACE_BOUNDS=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_TO_ANNOTATION=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_TO_CLASS=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_TO_ENUM=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-METHOD_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
-METHOD_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
-METHOD_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error
-METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-METHOD_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
-METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-METHOD_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_TYPE_PARAMETER=Error
-METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
-METHOD_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
-METHOD_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
-METHOD_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Error
-METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Error
-eclipse.preferences.version=1
-incompatible_api_component_version=Error
-invalid_since_tag_version=Error
-malformed_since_tag=Error
-missing_since_tag=Error
diff --git a/org.eclipse.mylyn.bugzilla.tests/.settings/org.eclipse.pde.prefs b/org.eclipse.mylyn.bugzilla.tests/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index e8f2d5620..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/.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.tests/META-INF/MANIFEST.MF b/org.eclipse.mylyn.bugzilla.tests/META-INF/MANIFEST.MF
deleted file mode 100644
index bd34cfd36..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,33 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Mylyn Bugzilla Connector Tests
-Bundle-SymbolicName: org.eclipse.mylyn.bugzilla.tests
-Bundle-Version: 0.0.0
-Bundle-Activator: org.eclipse.mylyn.bugzilla.tests.BugzillaTestPlugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.junit,
- org.eclipse.jface.text,
- org.eclipse.ui.ide,
- org.eclipse.ui.views,
- org.eclipse.ui.editors,
- org.eclipse.ui.workbench.texteditor,
- org.eclipse.mylyn.bugzilla.core,
- org.eclipse.mylyn.bugzilla.ui,
- org.eclipse.mylyn.tasks.ui,
- org.eclipse.mylyn.context.tests,
- org.eclipse.mylyn.tasks.tests,
- org.eclipse.mylyn.context.core,
- org.eclipse.mylyn.tasks.core,
- org.eclipse.ui.forms,
- org.eclipse.mylyn,
- org.eclipse.search,
- org.eclipse.mylyn.commons.net,
- org.eclipse.mylyn.bugzilla.ide;bundle-version="2.3.0",
- org.eclipse.mylyn.commons.ui;bundle-version="[3.0.0,4.0.0)"
-Bundle-ActivationPolicy: lazy
-Bundle-Vendor: Eclipse.org
-Bundle-ClassPath: bugzilla-test.jar
-Export-Package: org.eclipse.mylyn.bugzilla.tests;x-internal:=true,
- org.eclipse.mylyn.bugzilla.tests.headless;x-internal:=true
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/org.eclipse.mylyn.bugzilla.tests/about.html b/org.eclipse.mylyn.bugzilla.tests/about.html
deleted file mode 100644
index 0dd939c09..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/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 7, 2007</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.tests/build.properties b/org.eclipse.mylyn.bugzilla.tests/build.properties
deleted file mode 100644
index 5b0756771..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/build.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-###############################################################################
-# Copyright (c) 2004, 2007 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 = bugzilla-test.jar,\
- META-INF/,\
- about.html,\
- testdata/
-jars.compile.order = bugzilla-test.jar
-source.bugzilla-test.jar = src/
-output.bugzilla-test.jar = bin/
-src.includes = about.html
-jre.compilation.profile = J2SE-1.5
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AbstractBugzillaTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AbstractBugzillaTest.java
deleted file mode 100644
index 408a71959..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AbstractBugzillaTest.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.bugzilla.tests;
-
-import java.util.Set;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.mylyn.commons.net.AuthenticationCredentials;
-import org.eclipse.mylyn.commons.net.AuthenticationType;
-import org.eclipse.mylyn.context.tests.support.TestUtil;
-import org.eclipse.mylyn.context.tests.support.TestUtil.Credentials;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaRepositoryConnector;
-import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.TaskList;
-import org.eclipse.mylyn.internal.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.internal.tasks.ui.ITasksUiPreferenceConstants;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.ITask.SynchronizationState;
-import org.eclipse.mylyn.tasks.core.data.ITaskDataWorkingCopy;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.mylyn.tasks.core.data.TaskData;
-import org.eclipse.mylyn.tasks.core.data.TaskDataModel;
-import org.eclipse.mylyn.tasks.core.sync.SubmitJob;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-
-/**
- * @author Mik Kersten
- * @author Rob Elves
- * @author Nathan Hapke
- */
-public abstract class AbstractBugzillaTest extends TestCase {
-
- static final String DEFAULT_KIND = BugzillaCorePlugin.CONNECTOR_KIND;
-
- protected BugzillaRepositoryConnector connector;
-
- protected TaskRepositoryManager manager;
-
- protected TaskRepository repository;
-
- protected TaskList taskList;
-
- public AbstractBugzillaTest() {
- super();
- }
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- TasksUiPlugin.getDefault().getPreferenceStore().setValue(
- ITasksUiPreferenceConstants.REPOSITORY_SYNCH_SCHEDULE_ENABLED, false);
- manager = TasksUiPlugin.getRepositoryManager();
- TasksUiPlugin.getDefault().reloadDataDirectory();
- manager.clearRepositories(TasksUiPlugin.getDefault().getRepositoriesFilePath());
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
- TasksUiPlugin.getTaskListManager().resetTaskList();
- manager.clearRepositories(TasksUiPlugin.getDefault().getRepositoriesFilePath());
- }
-
- protected void init31() {
- init(IBugzillaConstants.TEST_BUGZILLA_31_URL);
- }
-
- protected void init30() {
- init(IBugzillaConstants.TEST_BUGZILLA_30_URL);
- }
-
- protected void init222() {
- init(IBugzillaConstants.TEST_BUGZILLA_222_URL);
- }
-
- protected void init2201() {
- init(IBugzillaConstants.TEST_BUGZILLA_2201_URL);
- }
-
- protected void init220() {
- init(IBugzillaConstants.TEST_BUGZILLA_220_URL);
- }
-
- protected void init218() {
- init(IBugzillaConstants.TEST_BUGZILLA_218_URL);
- }
-
- @SuppressWarnings("deprecation")
- protected void init(String url) {
- repository = new TaskRepository(DEFAULT_KIND, url);
- Credentials credentials = TestUtil.readCredentials();
- repository.setCredentials(AuthenticationType.REPOSITORY, new AuthenticationCredentials(credentials.username,
- credentials.password), false);
-
- repository.setTimeZoneId("Canada/Eastern");
- assertNotNull(manager);
- manager.addRepository(repository);
-
- taskList = TasksUiPlugin.getTaskList();
-
- AbstractRepositoryConnector abstractRepositoryClient = manager.getRepositoryConnector(DEFAULT_KIND);
-
- assertEquals(abstractRepositoryClient.getConnectorKind(), DEFAULT_KIND);
-
- connector = (BugzillaRepositoryConnector) abstractRepositoryClient;
- }
-
- protected ITask generateLocalTaskAndDownload(String taskNumber) throws CoreException {
- ITask task = TasksUi.getRepositoryModel().createTask(repository, taskNumber);
- // FIXME task.setStale(true);
- TasksUiPlugin.getTaskList().addTask(task);
- TasksUiInternal.synchronizeTask(connector, task, true, null);
- TasksUiPlugin.getTaskDataManager().setTaskRead(task, true);
- return task;
- }
-
- protected TaskDataModel createModel(ITask task) throws CoreException {
- ITaskDataWorkingCopy taskDataState = getWorkingCopy(task);
- return new TaskDataModel(repository, task, taskDataState);
- }
-
- protected ITaskDataWorkingCopy getWorkingCopy(ITask task) throws CoreException {
- return TasksUiPlugin.getTaskDataManager().getWorkingCopy(task);
- }
-
- protected void submit(TaskDataModel model) {
- SubmitJob submitJob = TasksUiInternal.getJobFactory().createSubmitTaskJob(connector, model.getTaskRepository(),
- model.getTask(), model.getTaskData(), model.getChangedOldAttributes());
- submitJob.schedule();
- try {
- submitJob.join();
- } catch (InterruptedException e) {
- fail(e.getMessage());
- }
- }
-
- protected void submit(ITask task, TaskData taskData, Set<TaskAttribute> changedAttributes) throws CoreException {
- connector.getTaskDataHandler().postTaskData(repository, taskData, changedAttributes, new NullProgressMonitor());
- ((AbstractTask) task).setSubmitting(true);
- }
-
- protected void synchAndAssertState(Set<AbstractTask> tasks, SynchronizationState state) {
- for (AbstractTask task : tasks) {
- TasksUiInternal.synchronizeTask(connector, task, true, null);
- assertEquals(task.getSynchronizationState(), state);
- }
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AllBugzillaTests.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AllBugzillaTests.java
deleted file mode 100644
index 96c690087..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AllBugzillaTests.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.bugzilla.tests;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.mylyn.bugzilla.tests.headless.BugzillaQueryTest;
-import org.eclipse.mylyn.bugzilla.tests.headless.BugzillaTaskHistoryTest;
-
-/**
- * @author Mik Kersten
- */
-public class AllBugzillaTests {
-
- public static Test suite() {
- TestSuite suite = new TestSuite("Test for org.eclipse.mylyn.bugzilla.tests");
- // $JUnit-BEGIN$
- suite.addTestSuite(RepositoryTaskHandleTest.class);
- suite.addTestSuite(TaskListNotificationManagerTest.class);
- suite.addTestSuite(BugzillaTaskTest.class);
- suite.addTestSuite(BugzillaTaskDataHandlerTest.class);
- suite.addTestSuite(TaskListStandaloneTest.class);
- suite.addTestSuite(BugzillaTaskListManagerTest.class);
- suite.addTestSuite(TaskEditorTest.class);
- suite.addTestSuite(BugzillaQueryTest.class);
- suite.addTestSuite(RepositoryEditorWizardTest.class);
- suite.addTestSuite(RepositoryReportFactoryTest.class);
- suite.addTestSuite(BugzillaConfigurationTest.class);
- suite.addTestSuite(BugzillaTaskHyperlinkDetectorTest.class);
- suite.addTestSuite(BugzillaSearchEngineTest.class);
- // suite.addTestSuite(Bugzilla220ParserTest.class);
- suite.addTestSuite(BugzillaRepositoryConnectorTest.class);
- suite.addTestSuite(EncodingTest.class);
- // suite.addTestSuite(NewBugWizardTest.class);
- // suite.addTestSuite(RegularExpressionMatchTest.class);
- // suite.addTestSuite(BugzillaNewBugParserTestCDT.class);
- // suite.addTestSuite(BugzillaNewBugParserTestEquinox.class);
- // suite.addTestSuite(BugzillaNewBugParserTestGMT.class);
- // suite.addTestSuite(BugzillaNewBugParserTestPlatform.class);
- // suite.addTestSuite(BugzillaNewBugParserTestVE.class);
- // suite.addTestSuite(BugzillaParserTestNoBug.class);
- suite.addTestSuite(BugzillaProductParserTest.class);
- // TODO: enable
- // suite.addTest(new TestSuite(BugzillaParserTest.class));
- suite.addTestSuite(BugzillaSearchDialogTest.class);
- suite.addTestSuite(DuplicateDetetionTest.class);
- suite.addTestSuite(BugzillaTaskHistoryTest.class);
- // $JUnit-END$
- return suite;
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaConfigurationTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaConfigurationTest.java
deleted file mode 100644
index 5c39d298c..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaConfigurationTest.java
+++ /dev/null
@@ -1,248 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.bugzilla.tests;
-
-import java.io.BufferedReader;
-import java.io.FileInputStream;
-import java.io.InputStreamReader;
-import java.io.StringReader;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.mylyn.commons.net.AuthenticationCredentials;
-import org.eclipse.mylyn.commons.net.AuthenticationType;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaClient;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaClientManager;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin;
-import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants;
-import org.eclipse.mylyn.internal.bugzilla.core.RepositoryConfiguration;
-import org.eclipse.mylyn.internal.bugzilla.core.SaxConfigurationContentHandler;
-import org.eclipse.mylyn.internal.bugzilla.core.XmlCleaner;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-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.XMLReaderFactory;
-
-public class BugzillaConfigurationTest extends TestCase {
-
- BugzillaClientManager bugzillaClientManager = new BugzillaClientManager();
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- private BugzillaClient createClient(String hostUrl, String username, String password, String htAuthUser,
- String htAuthPass, String encoding) throws MalformedURLException, CoreException {
- TaskRepository taskRepository = new TaskRepository(BugzillaCorePlugin.CONNECTOR_KIND, hostUrl);
-
- AuthenticationCredentials credentials = new AuthenticationCredentials(username, password);
- taskRepository.setCredentials(AuthenticationType.REPOSITORY, credentials, false);
-
- AuthenticationCredentials webCredentials = new AuthenticationCredentials(htAuthUser, htAuthPass);
- taskRepository.setCredentials(AuthenticationType.HTTP, webCredentials, false);
- taskRepository.setCharacterEncoding(encoding);
- return bugzillaClientManager.getClient(taskRepository, null);
- }
-
- public void test222RDFProductConfig() throws Exception {
-
- BugzillaClient client = createClient(IBugzillaConstants.TEST_BUGZILLA_222_URL, "", "", "", "", "UTF-8");
- RepositoryConfiguration config = client.getRepositoryConfiguration();
- assertNotNull(config);
- assertEquals("2.22.1", config.getInstallVersion());
- assertEquals(7, config.getStatusValues().size());
- assertEquals(8, config.getResolutions().size());
- assertEquals(4, config.getPlatforms().size());
- assertEquals(6, config.getOSs().size());
- assertEquals(5, config.getPriorities().size());
- assertEquals(7, config.getSeverities().size());
- assertEquals(3, config.getProducts().size());
- assertEquals(4, config.getOpenStatusValues().size());
- assertEquals(1, config.getComponents("TestProduct").size());
- assertEquals(1, config.getVersions("TestProduct").size());
- assertEquals(0, config.getTargetMilestones("TestProduct").size());
- }
-
- public void test2201RDFProductConfig() throws Exception {
- BugzillaClient client = createClient(IBugzillaConstants.TEST_BUGZILLA_2201_URL, "", "", "", "", "UTF-8");
- RepositoryConfiguration config = client.getRepositoryConfiguration();
- assertNotNull(config);
- assertEquals("2.20.1", config.getInstallVersion());
- assertEquals(7, config.getStatusValues().size());
- assertEquals(8, config.getResolutions().size());
- assertEquals(4, config.getPlatforms().size());
- assertEquals(5, config.getOSs().size());
- assertEquals(5, config.getPriorities().size());
- assertEquals(7, config.getSeverities().size());
- assertEquals(1, config.getProducts().size());
- assertEquals(4, config.getOpenStatusValues().size());
- assertEquals(2, config.getComponents("TestProduct").size());
- assertEquals(1, config.getVersions("TestProduct").size());
- // assertEquals(1, config.getTargetMilestones("TestProduct").size());
- }
-
- public void test220RDFProductConfig() throws Exception {
- BugzillaClient client = createClient(IBugzillaConstants.TEST_BUGZILLA_220_URL, "", "", "", "", "UTF-8");
- RepositoryConfiguration config = client.getRepositoryConfiguration();
- assertNotNull(config);
- assertEquals("2.20.3", config.getInstallVersion());
- assertEquals(7, config.getStatusValues().size());
- assertEquals(8, config.getResolutions().size());
- assertEquals(4, config.getPlatforms().size());
- assertEquals(5, config.getOSs().size());
- assertEquals(5, config.getPriorities().size());
- assertEquals(7, config.getSeverities().size());
- assertEquals(2, config.getProducts().size());
- assertEquals(4, config.getOpenStatusValues().size());
- assertEquals(2, config.getComponents("TestProduct").size());
- assertEquals(1, config.getVersions("TestProduct").size());
- // assertEquals(1, config.getTargetMilestones("TestProduct").size());
- }
-
- public void test218RDFProductConfig() throws Exception {
- BugzillaClient client = createClient(IBugzillaConstants.TEST_BUGZILLA_218_URL, "", "", "", "", "UTF-8");
- RepositoryConfiguration config = client.getRepositoryConfiguration();
- assertNotNull(config);
- assertEquals("2.18.6", config.getInstallVersion());
- assertEquals(7, config.getStatusValues().size());
- assertEquals(8, config.getResolutions().size());
- assertEquals(8, config.getPlatforms().size());
- assertEquals(36, config.getOSs().size());
- assertEquals(5, config.getPriorities().size());
- assertEquals(7, config.getSeverities().size());
- assertEquals(1, config.getProducts().size());
- assertEquals(4, config.getOpenStatusValues().size());
- assertEquals(1, config.getComponents("TestProduct").size());
- assertEquals(1, config.getVersions("TestProduct").size());
- // assertEquals(1, config.getTargetMilestones("TestProduct").size());
- }
-
- public void testEclipseRDFProductConfig() throws Exception {
- BugzillaClient client = createClient(IBugzillaConstants.ECLIPSE_BUGZILLA_URL, "", "", "", "", "UTF-8");
- RepositoryConfiguration config = client.getRepositoryConfiguration();
- assertNotNull(config);
- assertEquals("3.0.1", config.getInstallVersion());
- assertEquals(7, config.getStatusValues().size());
- assertEquals(9, config.getResolutions().size());
- assertEquals(6, config.getPlatforms().size());
- assertEquals(30, config.getOSs().size());
- assertEquals(5, config.getPriorities().size());
- assertEquals(7, config.getSeverities().size());
- assertTrue(config.getProducts().size() > 50);
- assertEquals(4, config.getOpenStatusValues().size());
- assertEquals(13, config.getComponents("Mylyn").size());
- assertEquals(27, config.getKeywords().size());
- // assertEquals(10, config.getComponents("Hyades").size());
- // assertEquals(1, config.getTargetMilestones("TestProduct").size());
- }
-
- public void testRepositoryConfigurationCachePersistance() throws Exception {
- RepositoryConfiguration configuration1 = new RepositoryConfiguration();
- configuration1.setRepositoryUrl("url1");
- configuration1.addProduct("Test Product 1");
- assertEquals(1, configuration1.getProducts().size());
-
- RepositoryConfiguration configuration2 = new RepositoryConfiguration();
- configuration1.setRepositoryUrl("url2");
- configuration2.addProduct("Test Product 2");
- assertEquals(1, configuration2.getProducts().size());
-
- BugzillaCorePlugin.addRepositoryConfiguration(configuration1);
- BugzillaCorePlugin.addRepositoryConfiguration(configuration2);
- BugzillaCorePlugin.writeRepositoryConfigFile();
- BugzillaCorePlugin.removeConfiguration(configuration1);
- BugzillaCorePlugin.removeConfiguration(configuration2);
- assertNull(BugzillaCorePlugin.getRepositoryConfiguration(configuration1.getRepositoryUrl()));
- assertNull(BugzillaCorePlugin.getRepositoryConfiguration(configuration2.getRepositoryUrl()));
- BugzillaCorePlugin.readRepositoryConfigurationFile();
- assertNotNull(BugzillaCorePlugin.getRepositoryConfiguration(configuration1.getRepositoryUrl()));
- assertNotNull(BugzillaCorePlugin.getRepositoryConfiguration(configuration2.getRepositoryUrl()));
- RepositoryConfiguration testLoadedConfig = BugzillaCorePlugin.getRepositoryConfiguration(configuration1.getRepositoryUrl());
- assertEquals(1, testLoadedConfig.getProducts().size());
- assertEquals(configuration1.getProducts().get(0), testLoadedConfig.getProducts().get(0));
- }
-
-// @SuppressWarnings("deprecation")
-// public void testHtmlCleaner() throws IOException, BugzillaException, GeneralSecurityException {
-// StringBuffer incoming = new StringBuffer();
-// incoming.append("<RDF xmlns=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#");
-// incoming.append("xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#");
-// incoming.append("xmlns:bz=\"http://www.bugzilla.org/rdf#\">");
-// incoming.append("<li>");
-// incoming.append("<bz:product
-// incoming.append("</bz:product>");
-// incoming.append("</li>");
-// incoming.append("</RDF>");
-//
-// StringBuffer result = XmlCleaner.clean(new StringReader(incoming.toString()));
-// System.err.println(result);
-// }
-
- /**
- * Can use this to test config data submitted by users. Be sure not to commit user's config file though. The file
- * included (rdfconfig218.txt) is from mylyn.eclipse.org/bugs218
- */
- public void testRepositoryConfigurationFromFile() throws Exception {
-
- URL entryURL = BugzillaTestPlugin.getDefault().getBundle().getEntry("testdata/configuration/rdfconfig218.txt");
- assertNotNull(entryURL);
- URL fileURL = FileLocator.toFileURL(entryURL);
- assertNotNull(fileURL);
-
- BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(fileURL.getFile())));
-
- if (true) {
- StringBuffer result = XmlCleaner.clean(in);
- StringReader strReader = new StringReader(result.toString());
- in = new BufferedReader(strReader);
- }
-
- SaxConfigurationContentHandler contentHandler = new SaxConfigurationContentHandler();
- final XMLReader reader = XMLReaderFactory.createXMLReader();
- reader.setContentHandler(contentHandler);
- 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));
-
- RepositoryConfiguration config = contentHandler.getConfiguration();
- assertNotNull(config);
-
- assertTrue(config.getProducts().contains(
- "Test-Long-Named-Product-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"));
-
- // Add your additional checking for valid data here if necessary
-
- }
-
-}
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaProductParserTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaProductParserTest.java
deleted file mode 100644
index c72c346bc..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaProductParserTest.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.bugzilla.tests;
-
-import java.util.Iterator;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.context.tests.support.TestUtil;
-import org.eclipse.mylyn.context.tests.support.TestUtil.Credentials;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin;
-import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-/**
- * Tests for parsing Product Page for new Bugzilla reports
- *
- * @author Mik Kersten
- * @author Rob Elves
- */
-public class BugzillaProductParserTest extends TestCase {
-
- private TaskRepository repository;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- public BugzillaProductParserTest(String arg0) {
- super(arg0);
- }
-
- private TaskRepository setRepository(String url) {
- repository = new TaskRepository(BugzillaCorePlugin.CONNECTOR_KIND, url);
- Credentials credentials = TestUtil.readCredentials();
- repository.setAuthenticationCredentials(credentials.username, credentials.password);
- return repository;
- }
-
- public void test222Products() throws Exception {
- setRepository(IBugzillaConstants.TEST_BUGZILLA_222_URL);
- List<String> productList = BugzillaCorePlugin.getRepositoryConfiguration(repository, false, null).getProducts();
- Iterator<String> itr = productList.iterator();
- assertTrue(itr.hasNext());
- assertEquals("Read Only Test Cases", itr.next());
- }
-
- public void test2201Products() throws Exception {
- setRepository(IBugzillaConstants.TEST_BUGZILLA_2201_URL);
- List<String> productList = BugzillaCorePlugin.getRepositoryConfiguration(repository, false, null).getProducts();
- Iterator<String> itr = productList.iterator();
- assertTrue(itr.hasNext());
- assertEquals("TestProduct", "TestProduct", itr.next());
-
- }
-
- public void test220Products() throws Exception {
- setRepository(IBugzillaConstants.TEST_BUGZILLA_220_URL);
- List<String> productList = BugzillaCorePlugin.getRepositoryConfiguration(repository, false, null).getProducts();
- assertEquals(2, productList.size());
- assertTrue(productList.contains("TestProduct"));
- assertTrue(productList.contains("Widget"));
-
- }
-
- public void test218Products() throws Exception {
- setRepository(IBugzillaConstants.TEST_BUGZILLA_218_URL);
- List<String> productList = BugzillaCorePlugin.getRepositoryConfiguration(repository, false, null).getProducts();
- assertEquals(1, productList.size());
- assertTrue(productList.contains("TestProduct"));
- }
-
-// No longer supporting 216
-// public void test216Products() throws Exception {
-//
-// repository = new TaskRepository(BugzillaPlugin.REPOSITORY_KIND, IBugzillaConstants.TEST_BUGZILLA_216_URL,
-// IBugzillaConstants.BugzillaServerVersion.SERVER_216.toString());
-//
-// List<String> productList = BugzillaRepositoryUtil.getProductList(repository);
-// Iterator<String> itr = productList.iterator();
-// assertTrue(itr.hasNext());
-// assertEquals("TestProduct", "TestProduct", itr.next());
-// }
-
-}
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaRepositoryConnectorTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaRepositoryConnectorTest.java
deleted file mode 100644
index 635c67d54..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaRepositoryConnectorTest.java
+++ /dev/null
@@ -1,1001 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.bugzilla.tests;
-
-/**
- * @author Mik Kersten
- * @author Rob Elves
- * @author Nathan Hapke
- * @author Frank Becker (bug 206510)
- */
-public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
- // TODO: refactor
-//
-// int counter = 0;
-//
-//// public void testMissingHits() throws Exception {
-//// // query for all mylyn bugzilla tasks.
-//// // reset sync date
-//// // mark stale tasks should equal number of tasks
-//// TasksUiPlugin.getSynchronizationManager().setForceSyncExec(true);
-//// init(IBugzillaConstants.ECLIPSE_BUGZILLA_URL);
-//// repository.setAuthenticationCredentials("username", "password");
-//// String queryString = "https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&classification=Tools&product=Mylyn&component=Bugzilla&long_desc_type=allwordssubstr&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&status_whiteboard_type=allwordssubstr&status_whiteboard=&keywords_type=allwords&keywords=&bug_status=NEW&priority=P1&priority=P2&emailtype1=substring&email1=&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=noop&type0-0-0=noop&value0-0-0=";
-//// //String queryString = "https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&classification=Tools&product=Mylyn&component=Bugzilla&long_desc_type=allwordssubstr&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&status_whiteboard_type=allwordssubstr&status_whiteboard=&keywords_type=allwords&keywords=&priority=P1&emailtype1=substring&email1=&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=noop&type0-0-0=noop&value0-0-0=";
-//// //String queryString = "https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&classification=Tools&product=Mylyn&component=Bugzilla&component=Tasks&long_desc_type=allwordssubstr&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&status_whiteboard_type=allwordssubstr&status_whiteboard=&keywords_type=allwords&keywords=&emailtype1=substring&email1=&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=noop&type0-0-0=noop&value0-0-0=";
-//// BugzillaRepositoryQuery query = new BugzillaRepositoryQuery(IBugzillaConstants.ECLIPSE_BUGZILLA_URL, queryString, "test" );
-//// //TasksUiPlugin.getTaskList().addQuery(query);
-//// AbstractRepositoryConnector connector = TasksUiPlugin.getRepositoryManager().getRepositoryConnector(BugzillaCorePlugin.REPOSITORY_KIND);
-////// QueryHitCollector collector = new QueryHitCollector(new TaskFactory(repository, false, false));
-////// connector.performQuery(query, repository, new NullProgressMonitor(), collector);
-////// for (AbstractTask task : collector.getTasks()) {
-////// TasksUiPlugin.getTaskList().addTask(task);
-////// }
-////
-//// TasksUiPlugin.getSynchronizationManager().synchronize(connector, query, null, true);
-//// for (AbstractTask task : query.getChildren()) {
-//// assertTrue(task.getSynchronizationState() == SynchronizationState.INCOMING);
-//// TasksUiPlugin.getSynchronizationManager().setTaskRead(task, true);
-//// task.setLastReadTimeStamp("1970-01-01");
-//// assertTrue(task.getSynchronizationState() == SynchronizationState.SYNCHRONIZED);
-//// }
-////
-//// for (AbstractTask task : query.getChildren()) {
-//// assertTrue(task.getSynchronizationState() == SynchronizationState.SYNCHRONIZED);
-//// }
-////
-//// repository.setSynchronizationTimeStamp("1970-01-01");//getSynchronizationTimeStamp();
-//// //connector.markStaleTasks(repository, query.getChildren(), new NullProgressMonitor());
-//// TasksUiPlugin.getSynchronizationManager().synchronize(connector, query, null, true);
-//// for (AbstractTask task : query.getChildren()) {
-//// assertTrue(task.getSynchronizationState() == SynchronizationState.INCOMING);
-//// }
-//// }
-//
-// ITask fruitTask;
-//
-// TaskData fruitTaskData;
-//
-// private void setFruitValueTo(String newValue) throws CoreException {
-// Set<TaskAttribute> changed = new HashSet<TaskAttribute>();
-// TaskAttribute att = fruitTaskData.getRoot().createAttribute("cf_fruit");
-// att.setValue(newValue);
-// assertEquals(newValue, fruitTaskData.getRoot().getAttribute("cf_fruit").getValue());
-// changed.add(fruitTaskData.getRoot().getAttribute("cf_fruit"));
-// submit(fruitTask, fruitTaskData, changed);
-// TasksUiInternal.synchronizeTask(connector, fruitTask, true, null);
-// fruitTaskData = TasksUiPlugin.getTaskDataManager().getTaskData(repository, fruitTask.getTaskId());
-// assertEquals(newValue, fruitTaskData.getRoot().getAttribute("cf_fruit").getValue());
-//
-// }
-//
-// public void testCustomFields() throws Exception {
-// init(IBugzillaConstants.TEST_BUGZILLA_303_URL);
-//
-// String taskNumber = "1";
-// TasksUiPlugin.getTaskDataStorageManager().clear();
-//
-// // Get the task
-// fruitTask = generateLocalTaskAndDownload(taskNumber);
-//
-// ITaskDataWorkingCopy working = TasksUiPlugin.getTaskDataManager().getWorkingCopy(fruitTask);
-// assertNotNull(working);
-//
-// if (fruitTaskData.getRoot().getAttribute("cf_fruit").getValue().equals("---")) {
-// setFruitValueTo("apple");
-// setFruitValueTo("orange");
-// setFruitValueTo("---");
-// } else if (fruitTaskData.getRoot().getAttribute("cf_fruit").getValue().equals("apple")) {
-// setFruitValueTo("orange");
-// setFruitValueTo("apple");
-// setFruitValueTo("---");
-// } else if (fruitTaskData.getRoot().getAttribute("cf_fruit").getValue().equals("orange")) {
-// setFruitValueTo("apple");
-// setFruitValueTo("orange");
-// setFruitValueTo("---");
-// }
-// if (fruitTask != null) {
-// fruitTask = null;
-// }
-// if (fruitTaskData != null) {
-// fruitTaskData = null;
-// }
-// }
-//
-//// public void testMidAirCollision() throws Exception {
-//// init30();
-//// String taskNumber = "5";
-////
-//// TasksUiPlugin.getTaskDataStorageManager().clear();
-////
-//// // Get the task
-//// ITask task = generateLocalTaskAndDownload(taskNumber);
-////
-//// TaskData taskData = TasksUiPlugin.getTaskDataManager().getTaskData(task);
-//// assertNotNull(taskData);
-////
-//// TasksUiPlugin.getTaskList().addTask(task);
-////
-//// String newCommentText = "BugzillaRepositoryClientTest.testMidAirCollision(): test " + (new Date()).toString();
-//// taskData.setNewComment(newCommentText);
-//// Set<TaskAttribute> changed = new HashSet<TaskAttribute>();
-//// changed.add(taskData.getAttribute(TaskAttribute.COMMENT_NEW));
-//// taskData.setAttributeValue("delta_ts", "2007-01-01 00:00:00");
-//// changed.add(taskData.getAttribute("delta_ts"));
-////
-//// TasksUiPlugin.getTaskDataStorageManager().saveEdits(task.getRepositoryUrl(), task.getTaskId(), changed);
-////
-//// try {
-//// // Submit changes
-//// submit(task, taskData, changed);
-//// fail("Mid-air collision expected");
-//// } catch (CoreException e) {
-//// assertTrue(e.getStatus().getMessage().indexOf("Mid-air collision occurred while submitting") != -1);
-//// }
-//// }
-//
-//// public void testAuthenticationCredentials() throws Exception {
-//// init218();
-//// BugzillaTask task = this.generateLocalTaskAndDownload("3");
-//// assertNotNull(task);
-//// assertNotNull(TasksUiPlugin.getTaskDataStorageManager().getNewTaskData(task.getRepositoryUrl(),
-//// task.getTaskId()));
-//// TasksUiPlugin.getTaskListManager().activateTask(task);
-//// File sourceContextFile = ContextCorePlugin.getContextStore().getFileForContext(task.getHandleIdentifier());
-//// assertEquals(SynchronizationState.SYNCHRONIZED, task.getSynchronizationState());
-//// sourceContextFile.createNewFile();
-//// sourceContextFile.deleteOnExit();
-////
-//// repository.setAuthenticationCredentials("wrong", "wrong");
-//// TasksUiPlugin.getRepositoryManager().notifyRepositorySettingsChanged(repository);
-//// try {
-//// AttachmentUtil.attachContext(connector.getAttachmentHandler(), repository, task, "",
-//// new NullProgressMonitor());
-//// } catch (CoreException e) {
-//// assertEquals(SynchronizationState.SYNCHRONIZED, task.getSynchronizationState());
-//// assertTrue(e.getStatus().getMessage().indexOf("Invalid repository credentials.") != -1);
-//// return;
-//// }
-//// fail("Should have failed due to invalid userid and password.");
-//// }
-//
-//// testReassign Bugs
-//// Version BugNr assigned reporter
-//// 2.22 92 user@mylar.eclipse.org tests@mylar.eclipse.org
-//// 3.0 5 tests@mylar.eclipse.org tests2@mylar.eclipse.org
-//// 3.1 1 rob.elves@eclipse.org tests@mylar.eclipse.org
-//
-//// XXX: restore
-//// public void testReassign222() throws CoreException {
-//// init222();
-//// String taskNumber = "92";
-//// doReassignOld(taskNumber, "user@mylar.eclipse.org");
-//// }
-////
-//// public void testReassign30() throws CoreException {
-//// init30();
-//// String taskNumber = "5";
-//// doReassignOld(taskNumber, "tests@mylyn.eclipse.org");
-//// }
-////
-//// public void testReassign31() throws CoreException {
-//// init31();
-//// String taskNumber = "1";
-////
-//// TasksUiPlugin.getTaskDataStorageManager().clear();
-////
-//// // Get the task
-//// ITask task = generateLocalTaskAndDownload(taskNumber);
-////
-//// ITaskDataWorkingCopy workingCopy = TasksUiPlugin.getTaskDataManager().getWorkingCopy(task,
-//// task.getConnectorKind());
-////
-//// TaskData taskData = workingCopy.getLocalData();
-//// assertNotNull(taskData);
-////
-//// TaskMapper mapper = new TaskMapper(taskData);
-////
-//// TasksUiPlugin.getTaskList().addTask(task);
-//// if (taskData.getAssignedTo().equals("rob.elves@eclipse.org")) {
-//// assertEquals("rob.elves@eclipse.org", taskData.getAssignedTo());
-//// reassingToUser31(task, taskData);
-//// TasksUiInternal.synchronizeTask(connector, task, true, null);
-//// taskData = TasksUiPlugin.getTaskDataStorageManager().getNewTaskData(task.getRepositoryUrl(),
-//// task.getTaskId());
-//// assertEquals("tests2@mylyn.eclipse.org", taskData.getAssignedTo());
-////
-//// reassignToDefault31(task, taskData);
-//// TasksUiInternal.synchronizeTask(connector, task, true, null);
-//// taskData = TasksUiPlugin.getTaskDataStorageManager().getNewTaskData(task.getRepositoryUrl(),
-//// task.getTaskId());
-//// assertEquals("rob.elves@eclipse.org", taskData.getAssignedTo());
-//// } else if (taskData.getAssignedTo().equals("tests2@mylyn.eclipse.org")) {
-//// assertEquals("tests2@mylyn.eclipse.org", taskData.getAssignedTo());
-//// reassignToDefault31(task, taskData);
-//// TasksUiInternal.synchronizeTask(connector, task, true, null);
-//// taskData = TasksUiPlugin.getTaskDataStorageManager().getNewTaskData(task.getRepositoryUrl(),
-//// task.getTaskId());
-//// assertEquals("rob.elves@eclipse.org", taskData.getAssignedTo());
-////
-//// reassingToUser31(task, taskData);
-//// TasksUiInternal.synchronizeTask(connector, task, true, null);
-//// taskData = TasksUiPlugin.getTaskDataStorageManager().getNewTaskData(task.getRepositoryUrl(),
-//// task.getTaskId());
-//// assertEquals("tests2@mylyn.eclipse.org", taskData.getAssignedTo());
-//// } else {
-//// fail("Bug with unexpected user assigned");
-//// }
-////
-//// }
-////
-//// private void reassignToDefault31(BugzillaTask task, RepositoryTaskData taskData) throws CoreException {
-//// // Modify it (reassignbycomponent)
-//// String newCommentText = "BugzillaRepositoryClientTest.testReassign31(): reassignbycomponent "
-//// + (new Date()).toString();
-//// taskData.setNewComment(newCommentText);
-//// Set<TaskAttribute> changed = new HashSet<TaskAttribute>();
-//// changed.add(taskData.getAttribute(TaskAttribute.COMMENT_NEW));
-////
-//// taskData.setAttributeValue(BugzillaReportElement.SET_DEFAULT_ASSIGNEE.getKey(), "1");
-//// changed.add(taskData.getAttribute(BugzillaReportElement.SET_DEFAULT_ASSIGNEE.getKey()));
-////
-//// TasksUiPlugin.getTaskDataStorageManager().saveEdits(task.getRepositoryUrl(), task.getTaskId(), changed);
-////
-//// // Submit changes
-//// submit(task, taskData, changed);
-//// }
-////
-//// private void reassingToUser31(BugzillaTask task, RepositoryTaskData taskData) throws CoreException {
-//// // Modify it (reassign to tests2@mylyn.eclipse.org)
-//// String newCommentText = "BugzillaRepositoryClientTest.testReassign31(): reassign " + (new Date()).toString();
-//// taskData.setNewComment(newCommentText);
-//// Set<TaskAttribute> changed = new HashSet<TaskAttribute>();
-//// changed.add(taskData.getAttribute(TaskAttribute.COMMENT_NEW));
-////
-//// taskData.setAttributeValue(TaskAttribute.USER_ASSIGNED, "tests2@mylyn.eclipse.org");
-//// changed.add(taskData.getAttribute(TaskAttribute.USER_ASSIGNED));
-//// TasksUiPlugin.getTaskDataStorageManager().saveEdits(task.getRepositoryUrl(), task.getTaskId(), changed);
-////
-//// // Submit changes
-//// submit(task, taskData, null);
-//// }
-////
-//// private void doReassignOld(String taskNumber, String defaultAssignee) throws CoreException {
-//// TasksUiPlugin.getTaskDataStorageManager().clear();
-////
-//// // Get the task
-//// BugzillaTask task = generateLocalTaskAndDownload(taskNumber);
-////
-//// RepositoryTaskData taskData = TasksUiPlugin.getTaskDataStorageManager().getEditableCopy(
-//// task.getRepositoryUrl(), task.getTaskId());
-//// assertNotNull(taskData);
-////
-//// TasksUiPlugin.getTaskList().addTask(task, TasksUiPlugin.getTaskList().getDefaultCategory());
-////
-//// if (taskData.getAssignedTo().equals(defaultAssignee)) {
-//// assertEquals(defaultAssignee, taskData.getAssignedTo());
-//// reassingToUserOld(task, taskData);
-//// TasksUiInternal.synchronizeTask(connector, task, true, null);
-//// taskData = TasksUiPlugin.getTaskDataStorageManager().getNewTaskData(task.getRepositoryUrl(),
-//// task.getTaskId());
-//// assertEquals("tests2@mylyn.eclipse.org", taskData.getAssignedTo());
-////
-//// reassignToDefaultOld(task, taskData);
-//// TasksUiInternal.synchronizeTask(connector, task, true, null);
-//// taskData = TasksUiPlugin.getTaskDataStorageManager().getNewTaskData(task.getRepositoryUrl(),
-//// task.getTaskId());
-//// assertEquals(defaultAssignee, taskData.getAssignedTo());
-//// } else if (taskData.getAssignedTo().equals("tests2@mylyn.eclipse.org")) {
-//// assertEquals("tests2@mylyn.eclipse.org", taskData.getAssignedTo());
-//// reassignToDefaultOld(task, taskData);
-//// TasksUiInternal.synchronizeTask(connector, task, true, null);
-//// taskData = TasksUiPlugin.getTaskDataStorageManager().getNewTaskData(task.getRepositoryUrl(),
-//// task.getTaskId());
-//// assertEquals(defaultAssignee, taskData.getAssignedTo());
-////
-//// reassingToUserOld(task, taskData);
-//// TasksUiInternal.synchronizeTask(connector, task, true, null);
-//// taskData = TasksUiPlugin.getTaskDataStorageManager().getNewTaskData(task.getRepositoryUrl(),
-//// task.getTaskId());
-//// assertEquals("tests2@mylyn.eclipse.org", taskData.getAssignedTo());
-//// } else {
-//// fail("Bug with unexpected user assigned");
-//// }
-//// }
-////
-//// private void reassignToDefaultOld(BugzillaTask task, RepositoryTaskData taskData) throws CoreException {
-//// // Modify it (reassignbycomponent)
-//// String newCommentText = "BugzillaRepositoryClientTest.testReassignOld(): reassignbycomponent "
-//// + (new Date()).toString();
-//// taskData.setNewComment(newCommentText);
-//// Set<TaskAttribute> changed = new HashSet<TaskAttribute>();
-//// changed.add(taskData.getAttribute(TaskAttribute.COMMENT_NEW));
-//// for (RepositoryOperation o : taskData.getOperations()) {
-//// if (o.isChecked()) {
-//// o.setChecked(false);
-//// }
-//// if (o.getKnobName().compareTo("reassignbycomponent") == 0) {
-//// o.setChecked(true);
-//// taskData.setSelectedOperation(o);
-//// }
-//// }
-//// TasksUiPlugin.getTaskDataStorageManager().saveEdits(task.getRepositoryUrl(), task.getTaskId(), changed);
-////
-//// // Submit changes
-//// submit(task, taskData, null);
-//// }
-////
-//// private void reassingToUserOld(BugzillaTask task, RepositoryTaskData taskData) throws CoreException {
-//// // Modify it (reassign to tests2@mylyn.eclipse.org)
-//// String newCommentText = "BugzillaRepositoryClientTest.testReassignOld(): reassign " + (new Date()).toString();
-//// taskData.setNewComment(newCommentText);
-//// Set<TaskAttribute> changed = new HashSet<TaskAttribute>();
-//// changed.add(taskData.getAttribute(TaskAttribute.COMMENT_NEW));
-//// for (RepositoryOperation o : taskData.getOperations()) {
-//// if (o.isChecked()) {
-//// o.setChecked(false);
-//// }
-//// if (o.getKnobName().compareTo("reassign") == 0) {
-//// o.setInputValue("tests2@mylyn.eclipse.org");
-//// o.setChecked(true);
-//// taskData.setSelectedOperation(o);
-//// }
-//// }
-//// TasksUiPlugin.getTaskDataStorageManager().saveEdits(task.getRepositoryUrl(), task.getTaskId(), changed);
-////
-//// // Submit changes
-//// submit(task, taskData, null);
-////
-//// }
-//
-// public void testSubTaskHasIncoming() throws CoreException {
-// init30();
-// String taskNumber = "6";
-// ITask task = generateLocalTaskAndDownload(taskNumber);
-// assertNotNull(task);
-// assertEquals(2, task.getChildren().size());
-// ITask child = task.getChildren().iterator().next();
-// assertEquals(SynchronizationState.INCOMING, child.getSynchronizationState());
-// }
-//
-// public void testFocedQuerySynchronization() throws CoreException {
-// init222();
-// TasksUiPlugin.getTaskDataStorageManager().clear();
-// assertEquals(0, taskList.getAllTasks().size());
-// BugzillaRepositoryQuery bugQuery = new BugzillaRepositoryQuery(
-// IBugzillaConstants.TEST_BUGZILLA_222_URL,
-// "http://mylyn.eclipse.org/bugs222/buglist.cgi?short_desc_type=allwordssubstr&short_desc=&product=Read+Only+Test+Cases&long_desc_type=allwordssubstr&long_desc=&bug_status=NEW&order=Importance",
-// "testFocedQuerySynchronization");
-//
-// taskList.addQuery(bugQuery);
-//
-// TasksUiInternal.synchronizeQuery(connector, bugQuery, null, false);
-//
-// assertEquals(1, bugQuery.getChildren().size());
-// ITask hit = (ITask) bugQuery.getChildren().toArray()[0];
-// assertTrue(TasksUiPlugin.getTaskDataStorageManager().getNewTaskData(hit.getRepositoryUrl(), hit.getTaskId()) != null);
-// TasksUiPlugin.getTaskDataStorageManager().remove(hit.getRepositoryUrl(), hit.getTaskId());
-//
-// TasksUiInternal.synchronizeQuery(connector, bugQuery, null, true);
-// assertEquals(1, bugQuery.getChildren().size());
-// hit = (ITask) bugQuery.getChildren().toArray()[0];
-// assertTrue(TasksUiPlugin.getTaskDataStorageManager().getNewTaskData(hit.getRepositoryUrl(), hit.getTaskId()) != null);
-//
-// }
-//
-// public void testCreateTaskFromExistingId() throws Exception {
-// init222();
-// try {
-// TasksUiInternal.createTask(repository, "9999", new NullProgressMonitor());
-// fail();
-// } catch (CoreException ce) {
-//
-// }
-//
-// ITask task = generateLocalTaskAndDownload("1");
-// assertNotNull(task);
-// assertNotNull(TasksUiPlugin.getTaskDataStorageManager().getNewTaskData(task.getRepositoryUrl(),
-// task.getTaskId()));
-// assertEquals(SynchronizationState.SYNCHRONIZED, task.getSynchronizationState());
-//
-// ITask retrievedTask = taskList.getTask(task.getHandleIdentifier());
-// assertNotNull(retrievedTask);
-// assertEquals(task.getHandleIdentifier(), retrievedTask.getHandleIdentifier());
-// }
-//
-// public void testAnonymousRepositoryAccess() throws Exception {
-// init218();
-// assertNotNull(repository);
-// repository.setAuthenticationCredentials("", "");
-// // test anonymous task retrieval
-// ITask task = this.generateLocalTaskAndDownload("2");
-// assertNotNull(task);
-//
-// // // test anonymous query (note that this demonstrates query via
-// // eclipse search (ui)
-// // SearchHitCollector collector = new SearchHitCollector(taskList);
-// // collector.setProgressMonitor(new NullProgressMonitor());
-// // BugzillaSearchOperation operation = new BugzillaSearchOperation(
-// // repository,
-// // "http://mylyn.eclipse.org/bugs218/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=search-match-test&product=TestProduct&long_desc_type=substring&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&deadlinefrom=&deadlineto=&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=noop&type0-0-0=noop&value0-0-0=",
-// // null, collector, "-1");
-// //
-// String queryUrl = "http://mylyn.eclipse.org/bugs218/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=search-match-test&product=TestProduct&long_desc_type=substring&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&deadlinefrom=&deadlineto=&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=noop&type0-0-0=noop&value0-0-0=";
-// BugzillaRepositoryQuery bugzillaQuery = new BugzillaRepositoryQuery(repository.getRepositoryUrl(), queryUrl,
-// "search");
-//
-// SearchHitCollector collector = new SearchHitCollector(taskList, repository, bugzillaQuery);
-// RepositorySearchResult result = (RepositorySearchResult) collector.getSearchResult();
-//
-// // operation.run(new NullProgressMonitor());
-// // BugzillaSearchQuery searchQuery = new BugzillaSearchQuery(collector);
-// collector.run(new NullProgressMonitor());
-// assertEquals(2, result.getElements().length);
-//
-// for (ITask hit : collector.getTasks()) {
-// assertTrue(hit.getSummary().contains("search-match-test"));
-// }
-//
-// // test anonymous update of configuration
-// RepositoryConfiguration config = BugzillaCorePlugin.getRepositoryConfiguration(repository, false, null);
-// assertNotNull(config);
-// assertTrue(config.getComponents().size() > 0);
-// }
-//
-// public void testUpdate() throws Exception {
-// init222();
-// String taskNumber = "3";
-// TasksUiPlugin.getTaskDataStorageManager().clear();
-// assertEquals(0, TasksUiPlugin.getTaskList().getAllTasks().size());
-// ITask task = this.generateLocalTaskAndDownload(taskNumber);
-// assertEquals("search-match-test 2", task.getSummary());
-// assertEquals("TestProduct", task.getAttribute(TaskAttribute.PRODUCT));
-// assertEquals("P1", task.getPriority());
-// assertEquals("blocker", task.getAttribute(BugzillaReportElement.BUG_SEVERITY.getKey()));
-// assertEquals("nhapke@cs.ubc.ca", task.getOwner());
-// // assertEquals("2007-04-18 14:21:40",
-// // task.getCompletionDate().toString());
-// assertFalse(task.isCompleted());
-// assertEquals("http://mylyn.eclipse.org/bugs222/show_bug.cgi?id=3", task.getUrl());
-// }
-//
-// public void testUpdateWithSubTasks() throws Exception {
-// init222();
-// String taskNumber = "23";
-// TasksUiPlugin.getTaskDataStorageManager().clear();
-// assertEquals(0, TasksUiPlugin.getTaskList().getAllTasks().size());
-// BugzillaTask task = this.generateLocalTaskAndDownload(taskNumber);
-// assertNotNull(task.getChildren());
-// assertEquals(2, task.getChildren().size());
-// }
-//
-// public void testContextAttachFailure() throws Exception {
-// init218();
-// BugzillaTask task = this.generateLocalTaskAndDownload("3");
-// assertNotNull(task);
-// assertNotNull(TasksUiPlugin.getTaskDataStorageManager().getNewTaskData(task.getRepositoryUrl(),
-// task.getTaskId()));
-// TasksUiPlugin.getTaskListManager().activateTask(task);
-// File sourceContextFile = ContextCorePlugin.getContextStore().getFileForContext(task.getHandleIdentifier());
-// assertEquals(SynchronizationState.SYNCHRONIZED, task.getSynchronizationState());
-// sourceContextFile.createNewFile();
-// sourceContextFile.deleteOnExit();
-// repository.setAuthenticationCredentials("wrong", "wrong");
-// try {
-// AttachmentUtil.attachContext(connector.getAttachmentHandler(), repository, task, "",
-// new NullProgressMonitor());
-// } catch (CoreException e) {
-// assertEquals(SynchronizationState.SYNCHRONIZED, task.getSynchronizationState());
-// return;
-// }
-// fail("Should have failed due to invalid userid and password.");
-// }
-//
-// public void testSynchronize() throws CoreException {
-// init222();
-//
-// TasksUiPlugin.getTaskDataStorageManager().clear();
-//
-// // Get the task
-// BugzillaTask task = generateLocalTaskAndDownload("3");
-//
-// RepositoryTaskData taskData = TasksUiPlugin.getTaskDataStorageManager().getEditableCopy(
-// task.getRepositoryUrl(), task.getTaskId());
-// assertNotNull(taskData);
-//
-// TasksUiPlugin.getTaskList().addTask(task);
-// int numComments = taskData.getComments().size();
-//
-// // Modify it
-// String newCommentText = "BugzillaRepositoryClientTest.testSynchronize(): " + (new Date()).toString();
-// taskData.setNewComment(newCommentText);
-// Set<TaskAttribute> changed = new HashSet<TaskAttribute>();
-// changed.add(taskData.getAttribute(TaskAttribute.COMMENT_NEW));
-// TasksUiPlugin.getTaskDataStorageManager().saveEdits(task.getRepositoryUrl(), task.getTaskId(), changed);
-//
-// // Submit changes
-// submit(task, taskData);
-//
-// TasksUiInternal.synchronizeTask(connector, task, true, null);
-// // After submit task should be in SYNCHRONIZED state
-// assertEquals(SynchronizationState.SYNCHRONIZED, task.getSynchronizationState());
-// RepositoryTaskData taskData2 = TasksUiPlugin.getTaskDataStorageManager().getNewTaskData(
-// task.getRepositoryUrl(), task.getTaskId());
-// assertFalse(taskData2.getLastModified().equals(taskData.getLastModified()));
-// // Still not read
-// assertFalse(taskData2.getLastModified().equals(task.getLastReadTimeStamp()));
-// TasksUiPlugin.getTaskDataManager().setTaskRead(task, true);
-// assertEquals(taskData2.getLastModified(), task.getLastReadTimeStamp());
-// assertTrue(taskData2.getComments().size() > numComments);
-//
-// // Has no outgoing changes or conflicts yet needs synch
-// // because task doesn't have bug report (new query hit)
-// // Result: retrieved with no incoming status
-// // task.setSyncState(SynchronizationState.SYNCHRONIZED);
-// TasksUiPlugin.getTaskDataStorageManager().remove(task.getRepositoryUrl(), task.getTaskId());
-// TasksUiInternal.synchronizeTask(connector, task, false, null);
-// assertEquals(SynchronizationState.SYNCHRONIZED, task.getSynchronizationState());
-// RepositoryTaskData bugReport2 = null;
-// bugReport2 = TasksUiPlugin.getTaskDataStorageManager()
-// .getNewTaskData(task.getRepositoryUrl(), task.getTaskId());
-// assertNotNull(bugReport2);
-// assertEquals(task.getTaskId(), bugReport2.getTaskId());
-//
-// assertEquals(newCommentText, bugReport2.getComments().get(numComments).getText());
-// // TODO: Test that comment was appended
-// // ArrayList<Comment> comments = task.getTaskData().getComments();
-// // assertNotNull(comments);
-// // assertTrue(comments.size() > 0);
-// // Comment lastComment = comments.get(comments.size() - 1);
-// // assertEquals(newCommentText, lastComment.getText());
-//
-// }
-//
-// public void testUniqueQueryHitObjects() {
-// init222();
-// BugzillaRepositoryQuery query1 = new BugzillaRepositoryQuery(IBugzillaConstants.TEST_BUGZILLA_222_URL,
-// "queryurl", "description1");
-// BugzillaTask query1Hit = new BugzillaTask(IBugzillaConstants.TEST_BUGZILLA_222_URL, "1", "description1");
-// taskList.addQuery(query1);
-// taskList.addTask(query1Hit, query1);
-//
-// BugzillaRepositoryQuery query2 = new BugzillaRepositoryQuery(IBugzillaConstants.TEST_BUGZILLA_222_URL,
-// "queryurl2", "description2");
-// BugzillaTask query2Hit = new BugzillaTask(IBugzillaConstants.TEST_BUGZILLA_222_URL, "1", "description2");
-// taskList.addQuery(query2);
-// taskList.addTask(query2Hit, query1);
-//
-// assertEquals(2, taskList.getQueries().size());
-// assertEquals(1, taskList.getAllTasks().size());
-// for (ITask hit : query1.getChildren()) {
-// for (ITask hit2 : query2.getChildren()) {
-// assertTrue(hit.getClass().equals(hit2.getClass()));
-// }
-// }
-//
-// taskList.deleteQuery(query1);
-// taskList.deleteQuery(query2);
-// assertEquals(1, taskList.getAllTasks().size());
-// }
-//
-// public void testAttachToExistingReport() throws Exception {
-// init222();
-// String taskNumber = "33";
-// BugzillaTask task = generateLocalTaskAndDownload(taskNumber);
-// RepositoryTaskData taskData = TasksUiPlugin.getTaskDataStorageManager().getNewTaskData(task.getRepositoryUrl(),
-// task.getTaskId());
-//
-// assertNotNull(task);
-// assertNotNull(taskData);
-// TasksUiPlugin.getTaskDataManager().setTaskRead(task, true);
-// assertEquals(SynchronizationState.SYNCHRONIZED, task.getSynchronizationState());
-// assertEquals(taskNumber, taskData.getTaskId());
-// int numAttached = taskData.getAttachments().size();
-// String fileName = "test-attach-" + System.currentTimeMillis() + ".txt";
-//
-// assertNotNull(repository.getUserName());
-// assertNotNull(repository.getPassword());
-//
-// /* Initialize a local attachment */
-// LocalAttachment attachment = new LocalAttachment();
-// attachment.setDescription("Test attachment " + new Date());
-// attachment.setContentType("text/plain");
-// attachment.setPatch(false);
-// attachment.setReport(taskData);
-// attachment.setComment("Automated JUnit attachment test"); // optional
-//
-// /* Test attempt to upload a non-existent file */
-// attachment.setFilePath("/this/is/not/a/real-file");
-// attachment.setFile(new File(attachment.getFilePath()));
-// attachment.setFilename("real-file");
-// // IAttachmentHandler attachmentHandler =
-// // connector.getAttachmentHandler();
-// BugzillaClient client = connector.getClientManager().getClient(repository, new NullProgressMonitor());
-// try {
-// client.postAttachment(attachment.getReport().getTaskId(), attachment.getComment(), attachment, null);
-// fail();
-// } catch (Exception e) {
-// }
-// // attachmentHandler.uploadAttachment(repository, task, comment,
-// // summary, file, contentType, isPatch, proxySettings)
-// // assertFalse(attachmentHandler.uploadAttachment(attachment,
-// // repository.getUserName(), repository.getPassword(),
-// // Proxy.NO_PROXY));
-// assertEquals(SynchronizationState.SYNCHRONIZED, task.getSynchronizationState());
-// task = (BugzillaTask) TasksUiInternal.createTask(repository, taskNumber, new NullProgressMonitor());
-// TasksUiInternal.synchronizeTask(connector, task, true, null);
-//
-// assertEquals(numAttached, taskData.getAttachments().size());
-//
-// /* Test attempt to upload an empty file */
-// File attachFile = new File(fileName);
-// attachment.setFilePath(attachFile.getAbsolutePath());
-// BufferedWriter write = new BufferedWriter(new FileWriter(attachFile));
-// attachFile = new File(attachment.getFilePath());
-// attachment.setFile(attachFile);
-// attachment.setFilename(attachFile.getName());
-// // assertFalse(attachmentHandler.uploadAttachment(attachment,
-// // repository.getUserName(), repository.getPassword(),
-// // Proxy.NO_PROXY));
-// try {
-// client.postAttachment(attachment.getReport().getTaskId(), attachment.getComment(), attachment, null);
-// fail();
-// } catch (Exception e) {
-// }
-// task = (BugzillaTask) TasksUiInternal.createTask(repository, taskNumber, new NullProgressMonitor());
-// TasksUiInternal.synchronizeTask(connector, task, true, null);
-// taskData = TasksUiPlugin.getTaskDataStorageManager().getNewTaskData(task.getRepositoryUrl(), task.getTaskId());
-// assertEquals(numAttached, taskData.getAttachments().size());
-//
-// /* Test uploading a proper file */
-// write.write("test file");
-// write.close();
-// attachment.setFilePath(attachFile.getAbsolutePath());
-// // assertTrue(attachmentHandler.uploadAttachment(attachment,
-// // repository.getUserName(), repository.getPassword(),
-// // Proxy.NO_PROXY));
-// File fileToAttach = new File(attachment.getFilePath());
-// assertTrue(fileToAttach.exists());
-// attachment.setFile(fileToAttach);
-// attachment.setFilename(fileToAttach.getName());
-// client.postAttachment(attachment.getReport().getTaskId(), attachment.getComment(), attachment, null);
-//
-// task = (BugzillaTask) TasksUiInternal.createTask(repository, taskNumber, new NullProgressMonitor());
-// TasksUiInternal.synchronizeTask(connector, task, true, null);
-// taskData = TasksUiPlugin.getTaskDataStorageManager().getNewTaskData(task.getRepositoryUrl(), task.getTaskId());
-// assertEquals(numAttached + 1, taskData.getAttachments().size());
-//
-// // use assertion to track clean-up
-// assertTrue(attachFile.delete());
-// }
-//
-// public void testSynchChangedReports() throws Exception {
-//
-// init222();
-// String taskID = "4";
-// BugzillaTask task4 = generateLocalTaskAndDownload(taskID);
-// RepositoryTaskData taskData4 = TasksUiPlugin.getTaskDataStorageManager().getEditableCopy(
-// task4.getRepositoryUrl(), task4.getTaskId());
-// assertNotNull(task4);
-// assertNotNull(taskData4);
-// assertEquals(SynchronizationState.SYNCHRONIZED, task4.getSynchronizationState());
-// assertEquals(taskID, taskData4.getTaskId());
-//
-// BugzillaTask task5 = generateLocalTaskAndDownload("5");
-// RepositoryTaskData taskData5 = TasksUiPlugin.getTaskDataStorageManager().getEditableCopy(
-// task5.getRepositoryUrl(), task5.getTaskId());
-// assertNotNull(task5);
-// assertNotNull(taskData5);
-// assertEquals(SynchronizationState.SYNCHRONIZED, task5.getSynchronizationState());
-// assertEquals("5", taskData5.getTaskId());
-//
-// Set<ITask> tasks = new HashSet<ITask>();
-// tasks.add(task4);
-// tasks.add(task5);
-//
-// // Precondition for test passing is that task5's modification data is
-// // AFTER
-// // task4's
-//
-// TasksUiPlugin.getRepositoryManager().setSynchronizationTime(repository, task5.getLastReadTimeStamp(),
-// TasksUiPlugin.getDefault().getRepositoriesFilePath());
-//
-// SynchronizationContext event = new SynchronizationContext();
-// event.setTasks(tasks);
-// event.setNeedsPerformQueries(true);
-// event.setTaskRepository(repository);
-// event.setFullSynchronization(true);
-// connector.preSynchronization(event, null);
-// assertTrue(event.needsPerformQueries());
-// // Always last known changed returned
-// assertFalse(task4.isStale());
-// assertTrue(task5.isStale());
-//
-// String priority4 = null;
-// if (task4.getPriority().equals("P1")) {
-// priority4 = "P2";
-// taskData4.setAttributeValue(BugzillaReportElement.PRIORITY.getKeyString(), priority4);
-// } else {
-// priority4 = "P1";
-// taskData4.setAttributeValue(BugzillaReportElement.PRIORITY.getKeyString(), priority4);
-// }
-//
-// String priority5 = null;
-// if (task5.getPriority().equals("P1")) {
-// priority5 = "P2";
-// taskData5.setAttributeValue(BugzillaReportElement.PRIORITY.getKeyString(), priority5);
-// } else {
-// priority5 = "P1";
-// taskData5.setAttributeValue(BugzillaReportElement.PRIORITY.getKeyString(), priority5);
-// }
-//
-// assertNotNull(repository.getUserName());
-// assertNotNull(repository.getPassword());
-//
-// submit(task4, taskData4);
-// submit(task5, taskData5);
-//
-// event = new SynchronizationContext();
-// event.setTasks(tasks);
-// event.setNeedsPerformQueries(true);
-// event.setTaskRepository(repository);
-// event.setFullSynchronization(true);
-// connector.preSynchronization(event, null);
-//
-// assertTrue(task4.isStale());
-// assertTrue(task5.isStale());
-//
-// TasksUiInternal.synchronizeTasks(connector, tasks, true, null);
-//
-// for (ITask task : tasks) {
-// if (task.getTaskId() == "4") {
-// assertEquals(priority4, task4.getPriority());
-// }
-// if (task.getTaskId() == "5") {
-// assertEquals(priority5, task5.getPriority());
-// }
-// }
-// }
-//
-// public void testIncomingWhenOfflineDeleted() throws Exception {
-//
-// init222();
-// BugzillaTask task7 = generateLocalTaskAndDownload("7");
-// RepositoryTaskData recentTaskData = TasksUiPlugin.getTaskDataStorageManager().getNewTaskData(
-// task7.getRepositoryUrl(), task7.getTaskId());
-// assertNotNull(recentTaskData);
-// TasksUiPlugin.getTaskDataManager().setTaskRead(task7, true);
-// assertEquals(SynchronizationState.SYNCHRONIZED, task7.getSynchronizationState());
-// assertEquals("7", recentTaskData.getTaskId());
-//
-// Set<AbstractTask> tasks = new HashSet<AbstractTask>();
-// tasks.add(task7);
-//
-// TasksUiPlugin.getRepositoryManager().setSynchronizationTime(repository, task7.getLastReadTimeStamp(),
-// TasksUiPlugin.getDefault().getRepositoriesFilePath());
-//
-// assertNotNull(TasksUiPlugin.getTaskDataStorageManager().getNewTaskData(
-// IBugzillaConstants.TEST_BUGZILLA_222_URL, "7"));
-// TasksUiPlugin.getTaskDataStorageManager().remove(task7.getRepositoryUrl(), task7.getTaskId());
-//
-// assertNull(TasksUiPlugin.getTaskDataStorageManager().getNewTaskData(IBugzillaConstants.TEST_BUGZILLA_222_URL,
-// "7"));
-//
-// assertEquals(SynchronizationState.SYNCHRONIZED, task7.getSynchronizationState());
-// assertNotNull(task7.getLastReadTimeStamp());
-// // Task no longer stored offline
-// // make an external change
-// assertNotNull(repository.getUserName());
-// assertNotNull(repository.getPassword());
-//
-// String priority = null;
-// if (task7.getPriority().equals("P1")) {
-// priority = "P2";
-// recentTaskData.setAttributeValue(BugzillaReportElement.PRIORITY.getKeyString(), priority);
-// } else {
-// priority = "P1";
-// recentTaskData.setAttributeValue(BugzillaReportElement.PRIORITY.getKeyString(), priority);
-// }
-//
-// // disabled due to TasksUi.synchronizeChanged(connector, repository) being removed
-// // REMOVE ALL TASK DATA
-//// TasksUiPlugin.getTaskDataManager().clear();
-//// connector.getTaskDataHandler().postTaskData(repository, recentTaskData, new NullProgressMonitor());
-//// TasksUi.synchronizeChanged(connector, repository);
-//// assertEquals(SynchronizationState.INCOMING, task7.getSynchronizationState());
-// }
-//
-// public void testTimeTracker222() throws Exception {
-// init222();
-// timeTracker(15, true);
-// }
-//
-// // We'll skip these two for now and just test 222 and 218 since
-// // they are the most common. If problems arise we can re-enable.
-// // public void testTimeTracker2201() throws Exception {
-// // init2201();
-// // timeTracker(22, true);
-// // }
-// //
-// // public void testTimeTracker220() throws Exception {
-// // init220();
-// // timeTracker(8, true);
-// // }
-//
-// public void testTimeTracker218() throws Exception {
-// init218();
-// timeTracker(20, false);
-// }
-//
-// /**
-// * @param enableDeadline
-// * bugzilla 218 doesn't support deadlines
-// */
-// protected void timeTracker(int taskid, boolean enableDeadline) throws Exception {
-// BugzillaTask bugtask = generateLocalTaskAndDownload("" + taskid);
-// RepositoryTaskData bugtaskdata = TasksUiPlugin.getTaskDataStorageManager().getNewTaskData(
-// bugtask.getRepositoryUrl(), bugtask.getTaskId());
-// assertNotNull(bugtaskdata);
-// assertEquals(taskid + "", bugtaskdata.getTaskId());
-// assertEquals(SynchronizationState.SYNCHRONIZED, bugtask.getSynchronizationState());
-//
-// Set<AbstractTask> tasks = new HashSet<AbstractTask>();
-// tasks.add(bugtask);
-//
-// // synchAndAssertState(tasks, SynchronizationState.SYNCHRONIZED);
-//
-// TasksUiPlugin.getRepositoryManager().setSynchronizationTime(repository, bugtask.getLastReadTimeStamp(),
-// TasksUiPlugin.getDefault().getRepositoriesFilePath());
-// // connector.synchronizeChanged(repository);
-//
-// // Set<AbstractTask> changedTasks =
-// // connector.getOfflineTaskHandler().getChangedSinceLastSync(repository,
-// // tasks);
-// // assertEquals(1, changedTasks.size());
-//
-// assertNotNull(repository.getUserName());
-// assertNotNull(repository.getPassword());
-//
-// float estimatedTime, remainingTime, actualTime, addTime;
-// String deadline = null;
-//
-// estimatedTime = Float.parseFloat(bugtaskdata.getAttributeValue(BugzillaReportElement.ESTIMATED_TIME.getKeyString()));
-// remainingTime = Float.parseFloat(bugtaskdata.getAttributeValue(BugzillaReportElement.REMAINING_TIME.getKeyString()));
-// actualTime = Float.parseFloat(bugtaskdata.getAttributeValue(BugzillaReportElement.ACTUAL_TIME.getKeyString()));
-// if (enableDeadline) {
-// deadline = bugtaskdata.getAttributeValue(BugzillaReportElement.DEADLINE.getKeyString());
-// }
-//
-// estimatedTime += 2;
-// remainingTime += 1.5;
-// addTime = 0.75f;
-// if (enableDeadline) {
-// deadline = generateNewDay();
-// }
-//
-// bugtaskdata.setAttributeValue(BugzillaReportElement.ESTIMATED_TIME.getKeyString(), "" + estimatedTime);
-// bugtaskdata.setAttributeValue(BugzillaReportElement.REMAINING_TIME.getKeyString(), "" + remainingTime);
-// bugtaskdata.setAttributeValue(BugzillaReportElement.WORK_TIME.getKeyString(), "" + addTime);
-// if (enableDeadline) {
-// bugtaskdata.setAttributeValue(BugzillaReportElement.DEADLINE.getKeyString(), deadline);
-// }
-//
-//// for (AbstractTask task : tasks) {
-//// RepositoryTaskData taskData = TasksUiPlugin.getTaskDataManager().getNewTaskData(
-//// task.getHandleIdentifier());
-// bugtaskdata.setAttributeValue(BugzillaReportElement.ADD_COMMENT.getKeyString(), "New Estimate: "
-// + estimatedTime + "\nNew Remaining: " + remainingTime + "\nAdd: " + addTime);
-// submit(bugtask, bugtaskdata);
-//// }
-//
-// synchAndAssertState(tasks, SynchronizationState.SYNCHRONIZED);
-//
-// bugtaskdata = TasksUiPlugin.getTaskDataStorageManager().getNewTaskData(bugtask.getRepositoryUrl(),
-// bugtask.getTaskId());
-//
-// assertEquals(estimatedTime,
-// Float.parseFloat(bugtaskdata.getAttributeValue(BugzillaReportElement.ESTIMATED_TIME.getKeyString())));
-// assertEquals(remainingTime,
-// Float.parseFloat(bugtaskdata.getAttributeValue(BugzillaReportElement.REMAINING_TIME.getKeyString())));
-// assertEquals(actualTime + addTime,
-// Float.parseFloat(bugtaskdata.getAttributeValue(BugzillaReportElement.ACTUAL_TIME.getKeyString())));
-// if (enableDeadline) {
-// assertEquals(deadline, bugtaskdata.getAttributeValue(BugzillaReportElement.DEADLINE.getKeyString()));
-// }
-//
-// }
-//
-// private String generateNewDay() {
-// int year = 2006;
-// int month = (int) (Math.random() * 12 + 1);
-// int day = (int) (Math.random() * 28 + 1);
-// return "" + year + "-" + ((month <= 9) ? "0" : "") + month + "-" + ((day <= 9) ? "0" : "") + day;
-// }
-//
-// /**
-// * Ensure obsoletes and patches are marked as such by the parser.
-// */
-// public void testAttachmentAttributes() throws Exception {
-// init222();
-// int bugId = 19;
-// String taskNumber = "" + bugId;
-// BugzillaTask task = generateLocalTaskAndDownload(taskNumber);
-//
-// // TasksUiPlugin.getSynchronizationManager().synchronize(connector,
-// // task, true, null);
-//
-// assertNotNull(task);
-//
-// boolean isPatch[] = { false, true, false, false, false, false, false, true, false, false };
-// boolean isObsolete[] = { false, true, false, true, false, false, false, false, false, false };
-//
-// RepositoryTaskData taskData = TasksUiPlugin.getTaskDataStorageManager().getNewTaskData(task.getRepositoryUrl(),
-// task.getTaskId());
-//
-// Iterator<RepositoryAttachment> iter = taskData.getAttachments().iterator();
-//
-// int index = 0;
-// while (iter.hasNext()) {
-// assertTrue(validateAttachmentAttributes(iter.next(), isPatch[index], isObsolete[index]));
-// index++;
-// }
-// }
-//
-// private boolean validateAttachmentAttributes(RepositoryAttachment att, boolean isPatch, boolean isObsolete) {
-// return (att.isPatch() == isPatch) && (att.isObsolete() == isObsolete);
-// }
-//
-//// public void testSimpleLoad() throws Exception {
-//// repository = new TaskRepository(DEFAULT_KIND,
-//// IBugzillaConstants.ECLIPSE_BUGZILLA_URL);
-//// //Credentials credentials = MylynTestUtils.readCredentials();
-//// //repository.setAuthenticationCredentials(credentials.username,
-//// credentials.password);
-////
-//// //repository.setTimeZoneId("Canada/Eastern");
-//// assertNotNull(manager);
-//// manager.addRepository(repository,
-//// TasksUiPlugin.getDefault().getRepositoriesFilePath());
-////
-//// taskList = TasksUiPlugin.getTaskList();
-////
-//// AbstractRepositoryConnector abstractRepositoryConnector =
-//// manager.getRepositoryConnector(DEFAULT_KIND);
-////
-//// assertEquals(abstractRepositoryConnector.getRepositoryType(), DEFAULT_KIND);
-////
-//// connector = (BugzillaRepositoryConnector) abstractRepositoryConnector;
-////
-//// long start = System.currentTimeMillis();
-//// BugzillaTask task = null;
-//// for(int x = 1; x < 5; x++) {
-//// if(task != null)
-//// taskList.deleteTask(task);
-////
-//// task = this.generateLocalTaskAndDownload("154100");
-//// assertNotNull(task);
-//// }
-//// System.err.println("Total: "+((System.currentTimeMillis() - start)/1000));
-//// }
-//
-// // class MockBugzillaReportSubmitForm extends BugzillaReportSubmitForm {
-// //
-// // public MockBugzillaReportSubmitForm(String encoding_utf_8) {
-// // super(encoding_utf_8);
-// // }
-// //
-// // @Override
-// // public String submitReportToRepository() throws BugzillaException,
-// // LoginException,
-// // PossibleBugzillaFailureException {
-// // return "test-submit";
-// // }
-// //
-// // }
-}
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaRepositoryConnectorTest2.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaRepositoryConnectorTest2.java
deleted file mode 100644
index 23cff9b79..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaRepositoryConnectorTest2.java
+++ /dev/null
@@ -1,340 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.bugzilla.tests;
-
-import java.io.File;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.mylyn.commons.net.AuthenticationCredentials;
-import org.eclipse.mylyn.commons.net.AuthenticationType;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaAttribute;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaClient;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaTaskAttachmentHandler;
-import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants;
-import org.eclipse.mylyn.internal.context.core.ContextCorePlugin;
-import org.eclipse.mylyn.internal.tasks.core.data.FileTaskAttachmentSource;
-import org.eclipse.mylyn.internal.tasks.ui.AttachmentUtil;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
-import org.eclipse.mylyn.tasks.core.ITask.SynchronizationState;
-import org.eclipse.mylyn.tasks.core.data.ITaskDataWorkingCopy;
-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.TaskDataModel;
-import org.eclipse.mylyn.tasks.core.data.TaskMapper;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-
-public class BugzillaRepositoryConnectorTest2 extends AbstractBugzillaTest {
-
- public void testAttachToExistingReport() throws Exception {
- init222();
- String taskNumber = "33";
- ITask task = generateLocalTaskAndDownload(taskNumber);
- assertNotNull(task);
- TaskDataModel model = createModel(task);
- TaskData taskData = model.getTaskData();
- assertNotNull(taskData);
- assertEquals(SynchronizationState.SYNCHRONIZED, task.getSynchronizationState());
- assertEquals(taskNumber, taskData.getTaskId());
- int numAttached = taskData.getAttributeMapper()
- .getAttributesByType(taskData, TaskAttribute.TYPE_ATTACHMENT)
- .size();
- String fileName = "test-attach-" + System.currentTimeMillis() + ".txt";
-
- assertNotNull(repository.getUserName());
- assertNotNull(repository.getPassword());
-
- TaskAttribute attrAttachment = taskData.getAttributeMapper().createTaskAttachment(taskData);
- TaskAttachmentMapper attachmentMapper = TaskAttachmentMapper.createFrom(attrAttachment);
-
- /* Initialize a local attachment */
- attachmentMapper.setDescription("Test attachment " + new Date());
- attachmentMapper.setContentType("text/plain");
- attachmentMapper.setPatch(false);
- attachmentMapper.setComment("Automated JUnit attachment test");
-
- /* Test attempt to upload a non-existent file */
- String filePath = "/this/is/not/a/real-file";
- BugzillaTaskAttachmentHandler.AttachmentPartSource source = new BugzillaTaskAttachmentHandler.AttachmentPartSource(
- new FileTaskAttachmentSource(new File(filePath)));
- BugzillaClient client = connector.getClientManager().getClient(repository, new NullProgressMonitor());
- try {
- client.postAttachment(taskNumber, attachmentMapper.getComment(), attachmentMapper.getDescription(),
- "application/octet-stream", false, source, new NullProgressMonitor());
- fail();
- } catch (Exception e) {
- }
-// // attachmentHandler.uploadAttachment(repository, task, comment,
-// // summary, file, contentType, isPatch, proxySettings)
-// // assertFalse(attachmentHandler.uploadAttachment(attachment,
-// // repository.getUserName(), repository.getPassword(),
-// // Proxy.NO_PROXY));
-// assertEquals(SynchronizationState.SYNCHRONIZED, task.getSynchronizationState());
-// task = TasksUiInternal.createTask(repository, taskNumber, new NullProgressMonitor());
-// TasksUiInternal.synchronizeTask(connector, task, true, null);
-//
-// assertEquals(numAttached, taskData.getAttachments().size());
-//
-// /* Test attempt to upload an empty file */
-// File attachFile = new File(fileName);
-// attachment.setFilePath(attachFile.getAbsolutePath());
-// BufferedWriter write = new BufferedWriter(new FileWriter(attachFile));
-// attachFile = new File(attachment.getFilePath());
-// attachment.setFile(attachFile);
-// attachment.setFilename(attachFile.getName());
-// // assertFalse(attachmentHandler.uploadAttachment(attachment,
-// // repository.getUserName(), repository.getPassword(),
-// // Proxy.NO_PROXY));
-// try {
-// client.postAttachment(attachment.getReport().getTaskId(), attachment.getComment(), attachment, null);
-// fail();
-// } catch (Exception e) {
-// }
-// task = TasksUiInternal.createTask(repository, taskNumber, new NullProgressMonitor());
-// TasksUiInternal.synchronizeTask(connector, task, true, null);
-// taskData = TasksUiPlugin.getTaskDataStorageManager().getNewTaskData(task.getRepositoryUrl(), task.getTaskId());
-// assertEquals(numAttached, taskData.getAttachments().size());
-//
-// /* Test uploading a proper file */
-// write.write("test file");
-// write.close();
-// attachment.setFilePath(attachFile.getAbsolutePath());
-// // assertTrue(attachmentHandler.uploadAttachment(attachment,
-// // repository.getUserName(), repository.getPassword(),
-// // Proxy.NO_PROXY));
-// File fileToAttach = new File(attachment.getFilePath());
-// assertTrue(fileToAttach.exists());
-// attachment.setFile(fileToAttach);
-// attachment.setFilename(fileToAttach.getName());
-// client.postAttachment(attachment.getReport().getTaskId(), attachment.getComment(), attachment, null);
-//
-// task = TasksUiInternal.createTask(repository, taskNumber, new NullProgressMonitor());
-// TasksUiInternal.synchronizeTask(connector, task, true, null);
-// taskData = TasksUiPlugin.getTaskDataStorageManager().getNewTaskData(task.getRepositoryUrl(), task.getTaskId());
-// assertEquals(numAttached + 1, taskData.getAttachments().size());
-//
-// // use assertion to track clean-up
-// assertTrue(attachFile.delete());
- }
-
- public void testDataRetrieval() throws CoreException, ParseException {
- init(IBugzillaConstants.TEST_BUGZILLA_30_URL);
- TaskData data = connector.getTaskData(repository, "2", new NullProgressMonitor());
- assertNotNull(data);
- TaskMapper mapper = new TaskMapper(data);
- assertEquals("2", data.getTaskId());
- assertEquals("New bug submit", mapper.getSummary());
- assertEquals("Test new bug submission", mapper.getDescription());
- assertEquals(PriorityLevel.P2, mapper.getPriority());
- assertEquals("TestComponent", mapper.getComponent());
- assertEquals("nhapke@cs.ubc.ca", mapper.getOwner());
- assertEquals("TestProduct", mapper.getProduct());
- assertEquals("PC", mapper.getTaskData()
- .getRoot()
- .getMappedAttribute(BugzillaAttribute.REP_PLATFORM.getKey())
- .getValue());
- assertEquals("Windows", mapper.getTaskData()
- .getRoot()
- .getMappedAttribute(BugzillaAttribute.OP_SYS.getKey())
- .getValue());
- assertEquals("ASSIGNED", mapper.getTaskData().getRoot().getMappedAttribute(
- BugzillaAttribute.BUG_STATUS.getKey()).getValue());
- SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd HH:mm");
- SimpleDateFormat format2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
- assertEquals(format1.parse("2007-03-20 16:37"), mapper.getCreationDate());
- assertEquals(format2.parse("2007-12-06 20:50:00"), mapper.getModificationDate());
-
- //assertEquals("", mapper.getTaskUrl());
- //assertEquals("bugzilla", mapper.getTaskKind());
- //assertEquals("", mapper.getTaskKey());
-
- // test comments
- List<TaskAttribute> comments = data.getAttributeMapper().getAttributesByType(data, TaskAttribute.TYPE_COMMENT);
- assertEquals(11, comments.size());
- TaskCommentMapper commentMap = TaskCommentMapper.createFrom(comments.get(0));
- assertEquals("Rob Elves", commentMap.getAuthor().getName());
- assertEquals("Created an attachment (id=1)\ntest\n\ntest attachments", commentMap.getText());
- commentMap = TaskCommentMapper.createFrom(comments.get(10));
- assertEquals("Tests", commentMap.getAuthor().getName());
- assertEquals("test", commentMap.getText());
- }
-
- public void testMidAirCollision() throws Exception {
- init30();
- String taskNumber = "5";
-
- TasksUiPlugin.getTaskDataStorageManager().clear();
-
- // Get the task
- ITask task = generateLocalTaskAndDownload(taskNumber);
-
- ITaskDataWorkingCopy workingCopy = TasksUiPlugin.getTaskDataManager().getWorkingCopy(task);
- TaskData taskData = workingCopy.getLocalData();
- assertNotNull(taskData);
-
-// TasksUiPlugin.getTaskList().addTask(task);
-
- String newCommentText = "BugzillaRepositoryClientTest.testMidAirCollision(): test " + (new Date()).toString();
- TaskAttribute attrNewComment = taskData.getRoot().getMappedAttribute(TaskAttribute.COMMENT_NEW);
- attrNewComment.setValue(newCommentText);
- Set<TaskAttribute> changed = new HashSet<TaskAttribute>();
- changed.add(attrNewComment);
- TaskAttribute attrDeltaTs = taskData.getRoot().getMappedAttribute(TaskAttribute.DATE_MODIFICATION);
- attrDeltaTs.setValue("2007-01-01 00:00:00");
- changed.add(attrDeltaTs);
-
- workingCopy.save(changed, new NullProgressMonitor());
-
- try {
- // Submit changes
- submit(task, taskData, changed);
- fail("Mid-air collision expected");
- } catch (CoreException e) {
- assertTrue(e.getStatus().getMessage().indexOf("Mid-air collision occurred while submitting") != -1);
- return;
- }
- fail("Mid-air collision expected");
- }
-
- public void testAuthenticationCredentials() throws Exception {
- init218();
- ITask task = generateLocalTaskAndDownload("3");
- assertNotNull(task);
- TasksUiPlugin.getTaskActivityManager().activateTask(task);
- File sourceContextFile = ContextCorePlugin.getContextStore().getFileForContext(task.getHandleIdentifier());
- assertEquals(SynchronizationState.SYNCHRONIZED, task.getSynchronizationState());
- sourceContextFile.createNewFile();
- sourceContextFile.deleteOnExit();
- AuthenticationCredentials oldCreds = repository.getCredentials(AuthenticationType.REPOSITORY);
- AuthenticationCredentials wrongCreds = new AuthenticationCredentials("wrong", "wrong");
- repository.setCredentials(AuthenticationType.REPOSITORY, wrongCreds, false);
- TasksUiPlugin.getRepositoryManager().notifyRepositorySettingsChanged(repository);
- TaskData taskData = TasksUiPlugin.getTaskDataManager().getTaskData(task);
- TaskAttributeMapper mapper = taskData.getAttributeMapper();
- TaskAttribute attribute = mapper.createTaskAttachment(taskData);
- try {
- AttachmentUtil.postContext(connector, repository, task, "test", attribute, new NullProgressMonitor());
- } catch (CoreException e) {
- assertEquals(SynchronizationState.SYNCHRONIZED, task.getSynchronizationState());
- assertTrue(e.getStatus().getMessage().indexOf("Invalid repository credentials.") != -1);
- return;
- } finally {
- repository.setCredentials(AuthenticationType.REPOSITORY, oldCreds, false);
- TasksUiPlugin.getRepositoryManager().notifyRepositorySettingsChanged(repository);
- }
- fail("Should have failed due to invalid userid and password.");
- }
-
- public void testSynchronize() throws CoreException, Exception {
- init222();
-
- // Get the task
- ITask task = generateLocalTaskAndDownload("3");
- TasksUi.getTaskDataManager().discardEdits(task);
- TaskDataModel model = createModel(task);
- TaskData taskData = model.getTaskData();
- assertNotNull(taskData);
-
- int numComments = taskData.getAttributeMapper()
- .getAttributesByType(taskData, TaskAttribute.TYPE_ATTACHMENT)
- .size();
-
- // Modify it
- String newCommentText = "BugzillaRepositoryClientTest.testSynchronize(): " + (new Date()).toString();
- TaskAttribute attrNewComment = taskData.getRoot().getMappedAttribute(TaskAttribute.COMMENT_NEW);
- attrNewComment.setValue(newCommentText);
- model.attributeChanged(attrNewComment);
- model.save(new NullProgressMonitor());
- assertEquals(SynchronizationState.OUTGOING, task.getSynchronizationState());
- submit(model);
- assertEquals(SynchronizationState.SYNCHRONIZED, task.getSynchronizationState());
-
-// TaskData taskData2 = workingCopy.getRepositoryData();
-// TaskMapper taskData2Mapper = new TaskMapper(taskData2);
-// TaskMapper taskData1Mapper = new TaskMapper(taskData);
-// assertFalse(taskData2Mapper.getModificationDate().equals(taskData1Mapper.getModificationDate()));
-// // Still not read
-// assertFalse(taskData2.getLastModified().equals(task.getLastReadTimeStamp()));
-// TasksUiPlugin.getTaskDataManager().setTaskRead(task, true);
-// assertEquals(taskData2.getLastModified(), task.getLastReadTimeStamp());
-// assertTrue(taskData2.getComments().size() > numComments);
-//
-// // Has no outgoing changes or conflicts yet needs synch
-// // because task doesn't have bug report (new query hit)
-// // Result: retrieved with no incoming status
-// // task.setSyncState(SynchronizationState.SYNCHRONIZED);
-// TasksUiPlugin.getTaskDataStorageManager().remove(task.getRepositoryUrl(), task.getTaskId());
-// TasksUiInternal.synchronizeTask(connector, task, false, null);
-// assertEquals(SynchronizationState.SYNCHRONIZED, task.getSynchronizationState());
-// RepositoryTaskData bugReport2 = null;
-// bugReport2 = TasksUiPlugin.getTaskDataStorageManager()
-// .getNewTaskData(task.getRepositoryUrl(), task.getTaskId());
-// assertNotNull(bugReport2);
-// assertEquals(task.getTaskId(), bugReport2.getTaskId());
-//
-// assertEquals(newCommentText, bugReport2.getComments().get(numComments).getText());
-// // TODO: Test that comment was appended
-// // ArrayList<Comment> comments = task.getTaskData().getComments();
-// // assertNotNull(comments);
-// // assertTrue(comments.size() > 0);
-// // Comment lastComment = comments.get(comments.size() - 1);
-// // assertEquals(newCommentText, lastComment.getText());
-
- }
-
-// public void testMissingHits() throws Exception {
-// // query for all mylyn bugzilla tasks.
-// // reset sync date
-// // mark stale tasks should equal number of tasks
-// TasksUiPlugin.getSynchronizationManager().setForceSyncExec(true);
-// init(IBugzillaConstants.ECLIPSE_BUGZILLA_URL);
-// repository.setAuthenticationCredentials("username", "password");
-// String queryString = "https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&classification=Tools&product=Mylyn&component=Bugzilla&long_desc_type=allwordssubstr&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&status_whiteboard_type=allwordssubstr&status_whiteboard=&keywords_type=allwords&keywords=&bug_status=NEW&priority=P1&priority=P2&emailtype1=substring&email1=&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=noop&type0-0-0=noop&value0-0-0=";
-// //String queryString = "https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&classification=Tools&product=Mylyn&component=Bugzilla&long_desc_type=allwordssubstr&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&status_whiteboard_type=allwordssubstr&status_whiteboard=&keywords_type=allwords&keywords=&priority=P1&emailtype1=substring&email1=&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=noop&type0-0-0=noop&value0-0-0=";
-// //String queryString = "https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&classification=Tools&product=Mylyn&component=Bugzilla&component=Tasks&long_desc_type=allwordssubstr&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&status_whiteboard_type=allwordssubstr&status_whiteboard=&keywords_type=allwords&keywords=&emailtype1=substring&email1=&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=noop&type0-0-0=noop&value0-0-0=";
-// BugzillaRepositoryQuery query = new BugzillaRepositoryQuery(IBugzillaConstants.ECLIPSE_BUGZILLA_URL, queryString, "test" );
-// //TasksUiPlugin.getTaskList().addQuery(query);
-// AbstractRepositoryConnector connector = TasksUiPlugin.getRepositoryManager().getRepositoryConnector(BugzillaCorePlugin.REPOSITORY_KIND);
-//// QueryHitCollector collector = new QueryHitCollector(new TaskFactory(repository, false, false));
-//// connector.performQuery(query, repository, new NullProgressMonitor(), collector);
-//// for (AbstractTask task : collector.getTasks()) {
-//// TasksUiPlugin.getTaskList().addTask(task);
-//// }
-//
-// TasksUiPlugin.getSynchronizationManager().synchronize(connector, query, null, true);
-// for (AbstractTask task : query.getChildren()) {
-// assertTrue(task.getSynchronizationState() == SynchronizationState.INCOMING);
-// TasksUiPlugin.getSynchronizationManager().setTaskRead(task, true);
-// task.setLastReadTimeStamp("1970-01-01");
-// assertTrue(task.getSynchronizationState() == SynchronizationState.SYNCHRONIZED);
-// }
-//
-// for (AbstractTask task : query.getChildren()) {
-// assertTrue(task.getSynchronizationState() == SynchronizationState.SYNCHRONIZED);
-// }
-//
-// repository.setSynchronizationTimeStamp("1970-01-01");//getSynchronizationTimeStamp();
-// //connector.markStaleTasks(repository, query.getChildren(), new NullProgressMonitor());
-// TasksUiPlugin.getSynchronizationManager().synchronize(connector, query, null, true);
-// for (AbstractTask task : query.getChildren()) {
-// assertTrue(task.getSynchronizationState() == SynchronizationState.INCOMING);
-// }
-//}
-}
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaSearchDialogTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaSearchDialogTest.java
deleted file mode 100644
index ef9227720..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaSearchDialogTest.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.bugzilla.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin;
-import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants;
-import org.eclipse.mylyn.internal.bugzilla.ui.search.BugzillaSearchPage;
-import org.eclipse.mylyn.internal.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Test the bugzilla search dialog.
- *
- * @author Jeff Pound
- */
-public class BugzillaSearchDialogTest extends TestCase {
-
- private TaskRepositoryManager manager;
-
- @Override
- public void setUp() throws Exception {
- super.setUp();
- manager = TasksUiPlugin.getRepositoryManager();
- assertNotNull(manager);
- manager.clearRepositories(TasksUiPlugin.getDefault().getRepositoriesFilePath());
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
- if (manager != null) {
- manager.clearRepositories(TasksUiPlugin.getDefault().getRepositoriesFilePath());
- }
- }
-
- /**
- * Test that the search dialog is initialized properly with the given repository.
- *
- * @throws Exception
- */
- public void testSearchDialogInit() throws Exception {
- TaskRepository repo = new TaskRepository(BugzillaCorePlugin.CONNECTOR_KIND,
- IBugzillaConstants.TEST_BUGZILLA_222_URL);
- repo.setVersion(IBugzillaConstants.BugzillaServerVersion.SERVER_222.toString());
- manager.addRepository(repo);
- BugzillaSearchPage page = new BugzillaSearchPage(repo);
- Shell shell = BugzillaTestPlugin.getDefault().getWorkbench().getDisplay().getShells()[0];
- page.createControl(shell);
- page.setVisible(true);
-
- /*
- * This assertion will fail with a 0 product count if the options are
- * not retrieved properly, throw an exception if the page is not
- * initialized properly, or pass otherwise.
- */
- assertFalse(page.getProductCount() == 0);
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaSearchEngineTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaSearchEngineTest.java
deleted file mode 100644
index 4dc4e2a90..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaSearchEngineTest.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.bugzilla.tests;
-
-import java.util.Set;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaRepositoryQuery;
-import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.QueryHitCollector;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.deprecated.TaskFactory;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-/**
- * @author Rob Elves
- */
-public class BugzillaSearchEngineTest extends TestCase {
-
- private static final String QUERY_NAME = "Query Page Name";
-
- private static final String BUG_DESC_SUBSTRING_SEARCH = "/buglist.cgi?short_desc_type=allwordssubstr&short_desc=";// search-match-test&amp";
-
- private static final String SEARCH_DESCRIPTION = "search-match-test";
-
- private static final int NUM_EXPECTED_HITS = 2;
-
- private static final int NUM_REPOSITORIES = 0;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- TasksUiPlugin.getRepositoryManager().clearRepositories(TasksUiPlugin.getDefault().getRepositoriesFilePath());
- assertEquals(NUM_REPOSITORIES, TasksUiPlugin.getRepositoryManager().getRepositories(
- BugzillaCorePlugin.CONNECTOR_KIND).size());
- }
-
- @Override
- protected void tearDown() throws Exception {
- TasksUiPlugin.getRepositoryManager().clearRepositories(TasksUiPlugin.getDefault().getRepositoriesFilePath());
- super.tearDown();
- }
-
-// public void testSearching216() throws Exception {
-// TaskRepository repository = new
-// TaskRepository(BugzillaPlugin.REPOSITORY_KIND,
-// IBugzillaConstants.TEST_BUGZILLA_216_URL,
-// IBugzillaConstants.BugzillaServerVersion.SERVER_216.toString());
-// MylynTaskListPlugin.getRepositoryManager().addRepository(repository);
-// List<AbstractQueryHit> hits =
-// runQuery(IBugzillaConstants.TEST_BUGZILLA_216_URL, SEARCH_DESCRIPTION);
-// assertEquals(NUM_EXPECTED_HITS, hits.size());
-// }
-
- public void testSearching218() throws Exception {
- TaskRepository repository = new TaskRepository(BugzillaCorePlugin.CONNECTOR_KIND,
- IBugzillaConstants.TEST_BUGZILLA_218_URL);
- repository.setVersion(IBugzillaConstants.BugzillaServerVersion.SERVER_218.toString());
- TasksUiPlugin.getRepositoryManager().addRepository(repository);
- assertEquals(NUM_EXPECTED_HITS, runQuery(IBugzillaConstants.TEST_BUGZILLA_218_URL, SEARCH_DESCRIPTION).size());
- }
-
- public void testSearching220() throws Exception {
- TaskRepository repository = new TaskRepository(BugzillaCorePlugin.CONNECTOR_KIND,
- IBugzillaConstants.TEST_BUGZILLA_220_URL);
- repository.setVersion(IBugzillaConstants.BugzillaServerVersion.SERVER_220.toString());
- TasksUiPlugin.getRepositoryManager().addRepository(repository);
- assertEquals(NUM_EXPECTED_HITS, runQuery(IBugzillaConstants.TEST_BUGZILLA_220_URL, SEARCH_DESCRIPTION).size());
- }
-
- public void testSearching2201() throws Exception {
- TaskRepository repository = new TaskRepository(BugzillaCorePlugin.CONNECTOR_KIND,
- IBugzillaConstants.TEST_BUGZILLA_2201_URL);
- repository.setVersion(IBugzillaConstants.BugzillaServerVersion.SERVER_220.toString());
- TasksUiPlugin.getRepositoryManager().addRepository(repository);
- assertEquals(NUM_EXPECTED_HITS, runQuery(IBugzillaConstants.TEST_BUGZILLA_2201_URL, SEARCH_DESCRIPTION).size());
- }
-
- public void testSearching222() throws Exception {
- TaskRepository repository = new TaskRepository(BugzillaCorePlugin.CONNECTOR_KIND,
- IBugzillaConstants.TEST_BUGZILLA_222_URL);
- repository.setVersion(IBugzillaConstants.BugzillaServerVersion.SERVER_222.toString());
- TasksUiPlugin.getRepositoryManager().addRepository(repository);
- Set<AbstractTask> hits = runQuery(IBugzillaConstants.TEST_BUGZILLA_222_URL, SEARCH_DESCRIPTION);
- assertEquals(NUM_EXPECTED_HITS, hits.size());
- }
-
- @SuppressWarnings("deprecation")
- private Set<AbstractTask> runQuery(String repositoryURL, String SearchString) throws Exception {
- TaskRepository repository = TasksUiPlugin.getRepositoryManager().getRepository(
- BugzillaCorePlugin.CONNECTOR_KIND, repositoryURL);
- assertNotNull(repository);
-
- final BugzillaRepositoryQuery repositoryQuery = new BugzillaRepositoryQuery(repository.getRepositoryUrl(),
- repository.getRepositoryUrl() + BUG_DESC_SUBSTRING_SEARCH + SearchString, QUERY_NAME);
-
- AbstractRepositoryConnector connector = TasksUiPlugin.getRepositoryManager().getRepositoryConnector(
- BugzillaCorePlugin.CONNECTOR_KIND);
-// TaskList taskList = TasksUiPlugin.getTaskList();
- QueryHitCollector collector = new QueryHitCollector(new TaskFactory(repository));
-
- connector.performQuery(repository, repositoryQuery, collector, null, new NullProgressMonitor());
-
- // results.addAll(connector.performQuery(repositoryQuery, new
- // NullProgressMonitor(), new MultiStatus(TasksUiPlugin.PLUGIN_ID,
- // IStatus.OK, "Query result", null)));
- return collector.getTasks();
- }
-
-}
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskDataHandlerTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskDataHandlerTest.java
deleted file mode 100644
index 6851945a8..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskDataHandlerTest.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.bugzilla.tests;
-
-import junit.framework.TestCase;
-
-/**
- * @author Frank Becker
- */
-public class BugzillaTaskDataHandlerTest extends TestCase {
- // XXX: refactor
-/*
- BugzillaAttributeFactory attributeFactory = new BugzillaAttributeFactory();
-
- TaskRepository repository;
-
- BugzillaRepositoryConnector connector;
-
- private RepositoryTaskData init(String taskId) throws CoreException {
- org.eclipse.mylyn.tasks.core.data.AbstractTaskDataHandler handler = connector.getTaskDataHandler();
- TaskData taskData = handler.getTaskData(repository, taskId, new NullProgressMonitor());
- return taskData;
- }
-
- private TaskRepository setRepository(String kind, String url) {
- connector = (BugzillaRepositoryConnector) TasksUiPlugin.getRepositoryManager().getRepositoryConnector(
- BugzillaCorePlugin.CONNECTOR_KIND);
- repository = new TaskRepository(kind, url);
- Credentials credentials = TestUtil.readCredentials();
- repository.setAuthenticationCredentials(credentials.username, credentials.password);
- return repository;
- }
-
- private void testAttributesFromCloneBug(RepositoryTaskData repositoryTaskData, boolean valueFromBug9) {
- assertEquals("Clone Bug 1", repositoryTaskData.getAttribute(BugzillaReportElement.SHORT_DESC.getKey())
- .getValue());
- assertEquals("Clone Bug 1", repositoryTaskData.getSummary());
- assertEquals("This Bug is used to test the cloneTaskData", repositoryTaskData.getDescription());
- assertEquals("TestProduct", repositoryTaskData.getAttribute(BugzillaReportElement.PRODUCT.getKey()).getValue());
- assertEquals("TestProduct", repositoryTaskData.getProduct());
- assertEquals("TestComponent", repositoryTaskData.getAttribute(BugzillaReportElement.COMPONENT.getKey())
- .getValue());
- assertEquals("PC", repositoryTaskData.getAttribute(BugzillaReportElement.REP_PLATFORM.getKey()).getValue());
- assertEquals("Windows", repositoryTaskData.getAttribute(BugzillaReportElement.OP_SYS.getKey()).getValue());
- assertEquals("unspecified", repositoryTaskData.getAttribute(BugzillaReportElement.VERSION.getKey()).getValue());
- assertEquals("P3", repositoryTaskData.getAttribute(BugzillaReportElement.PRIORITY.getKey()).getValue());
- assertEquals("enhancement", repositoryTaskData.getAttribute(BugzillaReportElement.BUG_SEVERITY.getKey())
- .getValue());
- assertEquals("---", repositoryTaskData.getAttribute(BugzillaReportElement.TARGET_MILESTONE.getKey()).getValue());
- assertEquals("Unclassified", repositoryTaskData.getAttribute(BugzillaReportElement.CLASSIFICATION.getKey())
- .getValue());
- if (valueFromBug9) {
- assertEquals("9", repositoryTaskData.getAttribute(BugzillaReportElement.BUG_ID.getKey()).getValue());
- assertEquals("1.00", repositoryTaskData.getAttribute(BugzillaReportElement.REMAINING_TIME.getKey())
- .getValue());
- assertEquals("1.00", repositoryTaskData.getAttribute(BugzillaReportElement.ESTIMATED_TIME.getKey())
- .getValue());
- assertEquals("2007-12-12", repositoryTaskData.getAttribute(BugzillaReportElement.DEADLINE.getKey())
- .getValue());
- assertEquals("NEW", repositoryTaskData.getAttribute(BugzillaReportElement.BUG_STATUS.getKey()).getValue());
- assertEquals("2007-11-14 15:12",
- repositoryTaskData.getAttribute(BugzillaReportElement.CREATION_TS.getKey()).getValue());
- assertEquals("2007-11-14 15:14:46",
- repositoryTaskData.getAttribute(BugzillaReportElement.DELTA_TS.getKey()).getValue());
- assertEquals("tests@mylyn.eclipse.org", repositoryTaskData.getAttribute(
- BugzillaReportElement.REPORTER.getKey()).getValue());
- assertEquals("tests2@mylyn.eclipse.org", repositoryTaskData.getAttribute(
- BugzillaReportElement.ASSIGNED_TO.getKey()).getValue());
- } else {
- assertEquals("2.00", repositoryTaskData.getAttribute(BugzillaReportElement.REMAINING_TIME.getKey())
- .getValue());
- assertEquals("2.00", repositoryTaskData.getAttribute(BugzillaReportElement.ESTIMATED_TIME.getKey())
- .getValue());
- assertEquals("2008-01-01", repositoryTaskData.getAttribute(BugzillaReportElement.DEADLINE.getKey())
- .getValue());
- assertEquals("2007-11-14 15:30",
- repositoryTaskData.getAttribute(BugzillaReportElement.CREATION_TS.getKey()).getValue());
- assertEquals("2007-11-14 15:30:38",
- repositoryTaskData.getAttribute(BugzillaReportElement.DELTA_TS.getKey()).getValue());
- assertEquals("tests2@mylyn.eclipse.org", repositoryTaskData.getAttribute(
- BugzillaReportElement.REPORTER.getKey()).getValue());
- assertEquals("tests@mylyn.eclipse.org", repositoryTaskData.getAttribute(
- BugzillaReportElement.ASSIGNED_TO.getKey()).getValue());
- }
- }
-
- public void testCloneTaskData() throws Exception {
- String bugid = "9";
- setRepository(BugzillaCorePlugin.CONNECTOR_KIND, IBugzillaConstants.TEST_BUGZILLA_30_URL);
- RepositoryTaskData report1 = init(bugid);
-
- assertNotNull(report1);
-
- testAttributesFromCloneBug(report1, true);
-
- bugid = "10";
- setRepository(BugzillaCorePlugin.CONNECTOR_KIND, IBugzillaConstants.TEST_BUGZILLA_30_URL);
- RepositoryTaskData report2 = init(bugid);
-
- assertNotNull(report2);
- assertEquals("" + bugid, report2.getAttribute(BugzillaReportElement.BUG_ID.getKey()).getValue());
- assertEquals("2.00", report2.getAttribute(BugzillaReportElement.REMAINING_TIME.getKey()).getValue());
- assertEquals("2.00", report2.getAttribute(BugzillaReportElement.ESTIMATED_TIME.getKey()).getValue());
- assertEquals("2008-01-01", report2.getAttribute(BugzillaReportElement.DEADLINE.getKey()).getValue());
-
- assertEquals("Clone Bug 2", report2.getAttribute(BugzillaReportElement.SHORT_DESC.getKey()).getValue());
- assertEquals("Clone Bug 2", report2.getSummary());
- assertEquals("other Bug for cloneTaskData", report2.getDescription());
- assertEquals("TestProduct", report2.getAttribute(BugzillaReportElement.PRODUCT.getKey()).getValue());
- assertEquals("TestProduct", report2.getProduct());
- assertEquals("TestComponent", report2.getAttribute(BugzillaReportElement.COMPONENT.getKey()).getValue());
- assertEquals("PC", report2.getAttribute(BugzillaReportElement.REP_PLATFORM.getKey()).getValue());
- assertEquals("Mac OS", report2.getAttribute(BugzillaReportElement.OP_SYS.getKey()).getValue());
- assertEquals("unspecified", report2.getAttribute(BugzillaReportElement.VERSION.getKey()).getValue());
- assertEquals("P2", report2.getAttribute(BugzillaReportElement.PRIORITY.getKey()).getValue());
- assertEquals("critical", report2.getAttribute(BugzillaReportElement.BUG_SEVERITY.getKey()).getValue());
- assertEquals("ASSIGNED", report2.getAttribute(BugzillaReportElement.BUG_STATUS.getKey()).getValue());
- assertEquals("2007-11-14 15:30", report2.getAttribute(BugzillaReportElement.CREATION_TS.getKey()).getValue());
- assertEquals("2007-11-14 15:30:38", report2.getAttribute(BugzillaReportElement.DELTA_TS.getKey()).getValue());
- assertEquals("---", report2.getAttribute(BugzillaReportElement.TARGET_MILESTONE.getKey()).getValue());
- assertEquals("tests2@mylyn.eclipse.org", report2.getAttribute(BugzillaReportElement.REPORTER.getKey())
- .getValue());
- assertEquals("tests@mylyn.eclipse.org", report2.getAttribute(BugzillaReportElement.ASSIGNED_TO.getKey())
- .getValue());
-
- AbstractTaskDataHandler handler = connector.getLegacyTaskDataHandler();
- handler.cloneTaskData(report1, report2);
- testAttributesFromCloneBug(report2, false);
-
- }
-
- public void testCharacterEscaping() throws CoreException {
- String bugid = "17";
- setRepository(BugzillaCorePlugin.CONNECTOR_KIND, IBugzillaConstants.TEST_BUGZILLA_30_URL);
- RepositoryTaskData report1 = init(bugid);
- assertEquals("Testing! \"&@ $\" &amp;", report1.getSummary());
- }
-*/
-}
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskHyperlinkDetectorTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskHyperlinkDetectorTest.java
deleted file mode 100644
index 649fe8fdb..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskHyperlinkDetectorTest.java
+++ /dev/null
@@ -1,247 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.bugzilla.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jface.text.Document;
-import org.eclipse.jface.text.Region;
-import org.eclipse.jface.text.hyperlink.IHyperlink;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin;
-import org.eclipse.mylyn.internal.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.editors.RepositoryTextViewer;
-import org.eclipse.mylyn.internal.tasks.ui.editors.TaskHyperlinkDetector;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TaskHyperlink;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * @author Rob Elves
- * @author Terry Hon
- */
-public class BugzillaTaskHyperlinkDetectorTest extends TestCase {
-
- private static final String DUPLICATE_NUMBER = "112233";
-
- private static final String DUPLICATE = "duplicate of " + DUPLICATE_NUMBER;
-
- private final String TASK_FORMAT_1 = "task#1";
-
- private final String TASK_FORMAT_2 = "task# 1";
-
- private final String TASK_FORMAT_3 = "task1";
-
- private final String TASK_FORMAT_4 = "task #1";
-
- private final String BUG_FORMAT_1 = "bug# 1";
-
- private final String BUG_FORMAT_2 = "bug # 1";
-
- private final String BUG_FORMAT_3 = "bug1";
-
- private final String BUG_FORMAT_4 = "bug #1";
-
- private final String BUG_FORMAT_1_2 = "bug# 2";
-
- //private BugzillaTaskHyperlinkDetector detector = new BugzillaTaskHyperlinkDetector();
- private TaskHyperlinkDetector detector;
-
- private TaskRepository repository1;
-
- private TaskRepository repository2;
-
- private RepositoryTextViewer viewer;
-
- private String[] formats;
-
- private TaskRepositoryManager repositoryManager;
-
- private Shell shell;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
-
- detector = new TaskHyperlinkDetector();
-
- repository1 = new TaskRepository(BugzillaCorePlugin.CONNECTOR_KIND, "repository_url1");
- repository2 = new TaskRepository(BugzillaCorePlugin.CONNECTOR_KIND, "repository_url2");
-
- shell = new Shell();
- viewer = new RepositoryTextViewer(repository1, shell, SWT.NONE);
-
- repositoryManager = TasksUiPlugin.getRepositoryManager();
- repositoryManager.clearRepositories(TasksUiPlugin.getDefault().getRepositoriesFilePath());
-
- formats = new String[] { TASK_FORMAT_1, TASK_FORMAT_2, TASK_FORMAT_3, TASK_FORMAT_4, BUG_FORMAT_1,
- BUG_FORMAT_2, BUG_FORMAT_3, BUG_FORMAT_4 };
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
-
- detector.dispose();
- repositoryManager.clearRepositories(TasksUiPlugin.getDefault().getRepositoriesFilePath());
-
- shell.dispose();
- }
-
- public void testBeginning() {
- for (String format : formats) {
- String testString = format + " is at the beginning";
- viewer.setDocument(new Document(testString));
- Region region = new Region(0, testString.length());
- IHyperlink[] links = detector.detectHyperlinks(viewer, region, false);
- assertNotNull(links);
- assertEquals(1, links.length);
- assertEquals(testString.indexOf(format), links[0].getHyperlinkRegion().getOffset());
- }
- }
-
- public void testEnd() {
- for (String format : formats) {
- String testString = "is ends with " + format;
- viewer.setDocument(new Document(testString));
- Region region = new Region(testString.indexOf(format), testString.length());
- IHyperlink[] links = detector.detectHyperlinks(viewer, region, false);
- assertNotNull(links);
- assertEquals(1, links.length);
- assertEquals(testString.indexOf(format), links[0].getHyperlinkRegion().getOffset());
- }
- }
-
- public void testMiddle() {
- for (String format : formats) {
- String testString = "is a " + format + " in the middle";
- viewer.setDocument(new Document(testString));
- Region region = new Region(testString.indexOf(format), testString.length());
- IHyperlink[] links = detector.detectHyperlinks(viewer, region, false);
- assertNotNull(links);
- assertEquals(1, links.length);
- assertEquals(testString.indexOf(format), links[0].getHyperlinkRegion().getOffset());
- }
- }
-
- public void testTwoOnSingleLine() {
- String testString = "is a " + BUG_FORMAT_1 + " in the middle and at the end " + BUG_FORMAT_1_2;
- viewer.setDocument(new Document(testString));
- Region region = new Region(testString.indexOf(BUG_FORMAT_1_2), testString.length());
- IHyperlink[] links = detector.detectHyperlinks(viewer, region, false);
- assertNotNull(links);
- assertEquals(1, links.length);
- assertEquals(testString.indexOf(BUG_FORMAT_1_2), links[0].getHyperlinkRegion().getOffset());
- }
-
- public void testMultiLine() {
- String testString = "is a the first line\n this is the second which ends with a bug, " + BUG_FORMAT_1_2;
- viewer.setDocument(new Document(testString));
- Region region = new Region(testString.indexOf(BUG_FORMAT_1_2), testString.length());
- IHyperlink[] links = detector.detectHyperlinks(viewer, region, false);
- assertNotNull(links);
- assertEquals(1, links.length);
- assertEquals(testString.indexOf(BUG_FORMAT_1_2), links[0].getHyperlinkRegion().getOffset());
- }
-
- public void testDuplicate() {
- String testString = "*** This bug has been marked as a " + DUPLICATE + " ***";
- viewer.setDocument(new Document(testString));
- Region region = new Region(testString.indexOf(DUPLICATE), testString.length());
- IHyperlink[] links = detector.detectHyperlinks(viewer, region, false);
- assertNotNull(links);
- assertEquals(1, links.length);
- assertEquals(testString.indexOf(DUPLICATE_NUMBER), links[0].getHyperlinkRegion().getOffset());
- }
-
- public void testNoRepositoryInViewNoRepositoryInManager() {
- String testString = "bug 123";
- viewer.setDocument(new Document(testString));
- Region region = new Region(0, testString.length());
- viewer.setRepository(null);
-
- IHyperlink[] links = detector.detectHyperlinks(viewer, region, true);
- assertNull(links);
- }
-
- public void testRepositoryInViewNoRepositoryInManager() {
- String testString = "bug 123";
- viewer.setDocument(new Document(testString));
- Region region = new Region(0, testString.length());
- viewer.setRepository(repository1);
-
- IHyperlink[] links = detector.detectHyperlinks(viewer, region, true);
- assertNotNull(links);
- assertEquals(1, links.length);
- assertTrue(links[0] instanceof TaskHyperlink);
- assertEquals(((TaskHyperlink) links[0]).getRepository(), repository1);
- }
-
- public void testNoRepositoryInViewOneRepositoryInManager() {
- String testString = "bug 123";
- viewer.setDocument(new Document(testString));
- Region region = new Region(0, testString.length());
- viewer.setRepository(null);
-
- repositoryManager.addRepository(repository1);
- IHyperlink[] links = detector.detectHyperlinks(viewer, region, true);
- assertNotNull(links);
- assertEquals(1, links.length);
- assertTrue(links[0] instanceof TaskHyperlink);
- assertEquals(((TaskHyperlink) links[0]).getRepository(), repository1);
- }
-
- public void testRepositoryInViewOneRepositoryInManager() {
- String testString = "bug 123";
- viewer.setDocument(new Document(testString));
- Region region = new Region(0, testString.length());
- viewer.setRepository(repository1);
- repositoryManager.addRepository(repository1);
-
- IHyperlink[] links = detector.detectHyperlinks(viewer, region, true);
- assertNotNull(links);
- assertEquals(1, links.length);
- assertTrue(links[0] instanceof TaskHyperlink);
- assertEquals(((TaskHyperlink) links[0]).getRepository(), repository1);
- }
-
- public void testNoRepositoryInViewTwoRepositoryInManager() {
- String testString = "bug 123";
- viewer.setDocument(new Document(testString));
- Region region = new Region(0, testString.length());
- viewer.setRepository(null);
- repositoryManager.addRepository(repository1);
- repositoryManager.addRepository(repository2);
-
- IHyperlink[] links = detector.detectHyperlinks(viewer, region, true);
- assertNotNull(links);
- assertEquals(2, links.length);
- assertTrue(links[0] instanceof TaskHyperlink);
- assertEquals(((TaskHyperlink) links[0]).getRepository(), repository1);
- assertTrue(links[1] instanceof TaskHyperlink);
- assertEquals(((TaskHyperlink) links[1]).getRepository(), repository2);
- }
-
- public void testRepositoryInViewTwoRepositoryInManager() {
- String testString = "bug 123";
- viewer.setDocument(new Document(testString));
- Region region = new Region(0, testString.length());
- viewer.setRepository(repository1);
- repositoryManager.addRepository(repository1);
- repositoryManager.addRepository(repository2);
-
- IHyperlink[] links = detector.detectHyperlinks(viewer, region, true);
- assertNotNull(links);
- assertEquals(1, links.length);
- assertTrue(links[0] instanceof TaskHyperlink);
- assertEquals(((TaskHyperlink) links[0]).getRepository(), repository1);
- }
-
-}
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskListManagerTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskListManagerTest.java
deleted file mode 100644
index 5efdbf1a6..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskListManagerTest.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.bugzilla.tests;
-
-import java.util.Set;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaRepositoryQuery;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaTask;
-import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
-import org.eclipse.mylyn.internal.tasks.core.TaskList;
-import org.eclipse.mylyn.internal.tasks.ui.TaskListManager;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-/**
- * @author Mik Kersten
- */
-public class BugzillaTaskListManagerTest extends TestCase {
-
- private TaskListManager manager;
-
- private TaskRepository repository;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- manager = TasksUiPlugin.getTaskListManager();
- manager.readExistingOrCreateNewList();
- manager.resetTaskList();
- manager.saveTaskList();
- repository = new TaskRepository(BugzillaCorePlugin.CONNECTOR_KIND, IBugzillaConstants.ECLIPSE_BUGZILLA_URL);
- TasksUiPlugin.getRepositoryManager().addRepository(repository);
- assertEquals(0, manager.getTaskList().getAllTasks().size());
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
- manager.resetTaskList();
- TasksUiPlugin.getTaskListManager().saveTaskList();
-// TasksUiPlugin.getDefault().getTaskListSaveManager().saveTaskList(true);
- TasksUiPlugin.getRepositoryManager().removeRepository(repository,
- TasksUiPlugin.getDefault().getRepositoriesFilePath());
- }
-
- // TODO: move
- public void testRemindedPersistance() {
-
- String repositoryUrl = "https://bugs.eclipse.org/bugs";
-
- String bugNumber = "106939";
-
- BugzillaTask task1 = new BugzillaTask(repositoryUrl, bugNumber, "label");
- manager.getTaskList().addTask(task1);
-
- task1.setReminded(true);
-
- TasksUiPlugin.getTaskListManager().saveTaskList();
- TasksUiPlugin.getTaskListManager().resetTaskList();
- TasksUiPlugin.getTaskListManager().readExistingOrCreateNewList();
-
- TaskList taskList = manager.getTaskList();
- assertEquals(1, taskList.getAllTasks().size());
- Set<ITask> tasksReturned = taskList.getTasks(repositoryUrl);
- assertNotNull(tasksReturned);
- assertEquals(1, tasksReturned.size());
- for (ITask task : tasksReturned) {
- assertTrue(((AbstractTask) task).isReminded());
- }
- }
-
- public void testRepositoryTaskExternalization() {
- BugzillaTask repositoryTask = new BugzillaTask(IBugzillaConstants.ECLIPSE_BUGZILLA_URL, "1", "label");
- repositoryTask.setTaskKind("kind");
- manager.getTaskList().addTask(repositoryTask);
- manager.saveTaskList();
-
- manager.resetTaskList();
- // manager.getTaskList().clear();
- // TaskList list = new TaskList();
- // manager.setTaskList(list);
- manager.readExistingOrCreateNewList();
- assertEquals(1, manager.getTaskList()
- .getUnmatchedContainer(IBugzillaConstants.ECLIPSE_BUGZILLA_URL)
- .getChildren()
- .size());
- ITask readTask = manager.getTaskList()
- .getUnmatchedContainer(IBugzillaConstants.ECLIPSE_BUGZILLA_URL)
- .getChildren()
- .iterator()
- .next();
-
- assertEquals(repositoryTask.getHandleIdentifier(), readTask.getHandleIdentifier());
- assertEquals(repositoryTask.getSummary(), readTask.getSummary());
- assertEquals(repositoryTask.getTaskKind(), readTask.getTaskKind());
- }
-
- public void testQueryExternalization() {
- RepositoryQuery query = new BugzillaRepositoryQuery("repositoryUrl", "queryUrl", "label");
- // long time = 1234;
- // Date oldDate = new Date(time);
- // query.setLastRefresh(oldDate);
- assertEquals("repositoryUrl", query.getRepositoryUrl());
- assertEquals("queryUrl", query.getUrl());
- assertEquals("<never>", query.getLastSynchronizedTimeStamp());
- query.setLastSynchronizedStamp("today");
- // assertEquals(time, query.getLastSynchronized().getTime());
- manager.getTaskList().addQuery(query);
- manager.saveTaskList();
- assertNotNull(manager.getTaskList());
-
- manager.resetTaskList();
- manager.readExistingOrCreateNewList();
- assertEquals(1, manager.getTaskList().getQueries().size());
- IRepositoryQuery readQuery = manager.getTaskList().getQueries().iterator().next();
- assertEquals(query.getUrl(), readQuery.getUrl());
- assertEquals(query.getRepositoryUrl(), readQuery.getRepositoryUrl());
- assertEquals("today", query.getLastSynchronizedTimeStamp());
- assertEquals("repositoryUrl", readQuery.getRepositoryUrl());
- // assertEquals(time, readQuery.getLastSynchronized().getTime());
- }
-
- public void testBugzillaCustomQueryExternalization() {
- BugzillaRepositoryQuery query = new BugzillaRepositoryQuery("repositoryUrl", "queryUrl", "label");
- query.setCustomQuery(true);
- manager.getTaskList().addQuery(query);
- manager.saveTaskList();
-
- manager.resetTaskList();
- // manager.getTaskList().clear();
- // TaskList list = new TaskList();
- // manager.setTaskList(list);
- manager.readExistingOrCreateNewList();
- assertEquals(1, manager.getTaskList().getQueries().size());
- BugzillaRepositoryQuery readQuery = (BugzillaRepositoryQuery) manager.getTaskList()
- .getQueries()
- .iterator()
- .next();
- assertTrue(readQuery.isCustomQuery());
- }
-
- public void testDeleteQuery() {
- RepositoryQuery query = new BugzillaRepositoryQuery("repositoryUrl", "queryUrl", "label");
- manager.getTaskList().addQuery(query);
-
- IRepositoryQuery readQuery = manager.getTaskList().getQueries().iterator().next();
- assertEquals(query, readQuery);
-
- manager.getTaskList().deleteQuery(query);
- assertEquals(0, manager.getTaskList().getQueries().size());
- }
-
- public void testDeleteQueryAfterRename() {
- RepositoryQuery query = new BugzillaRepositoryQuery("repositoryUrl", "queryUrl", "label");
- manager.getTaskList().addQuery(query);
-
- IRepositoryQuery readQuery = manager.getTaskList().getQueries().iterator().next();
- assertEquals(query, readQuery);
- manager.getTaskList().renameContainer(query, "newName");
- manager.getTaskList().deleteQuery(query);
- assertEquals(0, manager.getTaskList().getQueries().size());
- }
-
- public void testCreateQueryWithSameName() {
- RepositoryQuery query = new BugzillaRepositoryQuery("repositoryUrl", "queryUrl", "label");
- manager.getTaskList().addQuery(query);
- assertEquals(1, manager.getTaskList().getQueries().size());
- IRepositoryQuery readQuery = manager.getTaskList().getQueries().iterator().next();
- assertEquals(query, readQuery);
-
- manager.getTaskList().addQuery(new BugzillaRepositoryQuery("repositoryUrl", "queryUrl", "label"));
- assertEquals(1, manager.getTaskList().getQueries().size());
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskTest.java
deleted file mode 100644
index 5cae19127..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskTest.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.bugzilla.tests;
-
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaAttributeFactory;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaAttribute;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaRepositoryConnector;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaTask;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaTaskDataHandler;
-import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractLegacyRepositoryConnector;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskAttribute;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.TaskComment;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-/**
- * @author Mik Kersten
- */
-public class BugzillaTaskTest extends TestCase {
-
- private final BugzillaAttributeFactory attributeFactory = new BugzillaAttributeFactory();
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- new BugzillaTaskDataHandler((BugzillaRepositoryConnector) TasksUiPlugin.getRepositoryManager()
- .getRepositoryConnector(BugzillaCorePlugin.CONNECTOR_KIND));
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- public void testCompletionDate() throws Exception {
- BugzillaTask task = new BugzillaTask("repo", "1", "summary");
- RepositoryTaskData taskData = new RepositoryTaskData(new BugzillaAttributeFactory(),
- BugzillaCorePlugin.CONNECTOR_KIND, IBugzillaConstants.ECLIPSE_BUGZILLA_URL, "1");
-
- //XXX rewrite test
-
- assertNull(task.getCompletionDate());
-
- Date now = new Date();
- String nowTimeStamp = new SimpleDateFormat(BugzillaAttributeFactory.comment_creation_ts_format).format(now);
-
- TaskComment taskComment = new TaskComment(new BugzillaAttributeFactory(), 1);
- RepositoryTaskAttribute attribute = attributeFactory.createAttribute(BugzillaAttribute.BUG_WHEN.getKey());
- attribute.setValue(nowTimeStamp);
- taskComment.addAttribute(BugzillaAttribute.BUG_WHEN.getKey(), attribute);
- taskData.addComment(taskComment);
- assertNull(task.getCompletionDate());
-
- RepositoryTaskAttribute resolvedAttribute = attributeFactory.createAttribute(BugzillaAttribute.BUG_STATUS.getKey());
- resolvedAttribute.setValue(IBugzillaConstants.VALUE_STATUS_RESOLVED);
- taskData.addAttribute(BugzillaAttribute.BUG_STATUS.getKey(), resolvedAttribute);
- AbstractLegacyRepositoryConnector connector = (AbstractLegacyRepositoryConnector) TasksUiPlugin.getRepositoryManager()
- .getRepositoryConnector(BugzillaCorePlugin.CONNECTOR_KIND);
- connector.updateTaskFromTaskData(new TaskRepository(BugzillaCorePlugin.CONNECTOR_KIND, "http://eclipse.org"),
- task, taskData);
- assertNotNull(task.getCompletionDate());
- assertEquals(taskData.getAttributeFactory().getDateForAttributeType(
- BugzillaAttribute.BUG_WHEN.getKey(), nowTimeStamp), task.getCompletionDate());
-
- }
-
-}
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTestPlugin.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTestPlugin.java
deleted file mode 100644
index c691bdd89..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTestPlugin.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.bugzilla.tests;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class BugzillaTestPlugin extends AbstractUIPlugin {
- // The shared instance.
- private static BugzillaTestPlugin plugin;
-
- // Resource bundle.
- private ResourceBundle resourceBundle;
-
- /**
- * The constructor.
- */
- public BugzillaTestPlugin() {
- super();
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /**
- * This method is called when the plug-in is stopped
- */
- @Override
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- plugin = null;
- resourceBundle = null;
- }
-
- /**
- * Returns the shared instance.
- */
- public static BugzillaTestPlugin getDefault() {
- return plugin;
- }
-
- /**
- * Returns the string from the plugin's resource bundle, or 'key' if not found.
- */
- public static String getResourceString(String key) {
- ResourceBundle bundle = BugzillaTestPlugin.getDefault().getResourceBundle();
- try {
- return (bundle != null) ? bundle.getString(key) : key;
- } catch (MissingResourceException e) {
- return key;
- }
- }
-
- /**
- * Returns the plugin's resource bundle,
- */
- public ResourceBundle getResourceBundle() {
- try {
- if (resourceBundle == null) {
- resourceBundle = ResourceBundle.getBundle("org.eclipse.mylyn.bugzilla.tests.TestsPluginResources");
- }
- } catch (MissingResourceException x) {
- resourceBundle = null;
- }
- return resourceBundle;
- }
-
- /**
- * Returns an image descriptor for the image file at the given plug-in relative path.
- *
- * @param path
- * the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.mylyn.bugzilla.tests", path);
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTestUtil.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTestUtil.java
deleted file mode 100644
index 10ddf2f31..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTestUtil.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.bugzilla.tests;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.URL;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.mylyn.tasks.tests.TasksTestsPlugin;
-
-/**
- * @author Mik Kersten
- */
-public class BugzillaTestUtil {
-
- public static File getLocalFile(String path) {
- try {
- URL installURL = TasksTestsPlugin.getDefault().getBundle().getEntry(path);
- URL localURL = FileLocator.toFileURL(installURL);
- return new File(localURL.getFile());
- } catch (IOException e) {
- return null;
- }
- }
-
- /**
- * Adapted from Java Developers' almanac
- */
- public static void copy(File source, File dest) throws IOException {
- InputStream in = new FileInputStream(source);
- OutputStream out = new FileOutputStream(dest);
- byte[] buf = new byte[1024];
- int len;
- while ((len = in.read(buf)) > 0) {
- out.write(buf, 0, len);
- }
- in.close();
- out.close();
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/DuplicateDetetionTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/DuplicateDetetionTest.java
deleted file mode 100644
index 6c0d8c88b..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/DuplicateDetetionTest.java
+++ /dev/null
@@ -1,264 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.bugzilla.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaAttributeFactory;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin;
-import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants;
-import org.eclipse.mylyn.internal.bugzilla.ui.editor.NewBugzillaTaskEditor;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractLegacyDuplicateDetector;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.deprecated.NewTaskEditorInput;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Jeff Pound
- */
-public class DuplicateDetetionTest extends TestCase {
-
- private TaskRepository repository;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- repository = new TaskRepository(BugzillaCorePlugin.CONNECTOR_KIND, IBugzillaConstants.TEST_BUGZILLA_222_URL);
-
- }
-
- public void testDuplicateDetection() throws Exception {
-
- String stackTrace = "java.lang.NullPointerException\nat jeff.testing.stack.trace.functionality(jeff.java:481)";
-
- RepositoryTaskData model = new RepositoryTaskData(new BugzillaAttributeFactory(),
- BugzillaCorePlugin.CONNECTOR_KIND, repository.getRepositoryUrl(),
- TasksUiPlugin.getTaskDataStorageManager().getNewRepositoryTaskId());
- model.setDescription(stackTrace);
- model.setNew(true);
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- NewTaskEditorInput input = new NewTaskEditorInput(repository, model);
- TasksUiUtil.openEditor(input, TaskEditor.ID_EDITOR, page);
-
- TaskEditor taskEditor = (TaskEditor) page.getActiveEditor();
- NewBugzillaTaskEditor editor = (NewBugzillaTaskEditor) taskEditor.getActivePageInstance();
- assertTrue(editor.searchForDuplicates());
-
- editor.markDirty(false);
- editor.close();
- }
-
- public void testNoStackTrace() throws Exception {
- String fakeStackTrace = "this is not really a stacktrace";
- RepositoryTaskData model = new RepositoryTaskData(new BugzillaAttributeFactory(),
- BugzillaCorePlugin.CONNECTOR_KIND, repository.getRepositoryUrl(),
- TasksUiPlugin.getTaskDataStorageManager().getNewRepositoryTaskId());
- model.setDescription(fakeStackTrace);
- model.setNew(true);
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- NewTaskEditorInput input = new NewTaskEditorInput(repository, model);
- TasksUiUtil.openEditor(input, TaskEditor.ID_EDITOR, page);
-
- TaskEditor taskEditor = (TaskEditor) page.getActiveEditor();
- NewBugzillaTaskEditor editor = (NewBugzillaTaskEditor) taskEditor.getActivePageInstance();
- assertNull(AbstractLegacyDuplicateDetector.getStackTraceFromDescription(model.getDescription()));
-
- editor.markDirty(false);
- editor.close();
- }
-
- public void testStackTraceWithAppendedText() throws Exception {
-
- String stackTrace = "java.lang.NullPointerException\nat jeff.testing.stack.trace.functionality(jeff.java:481)";
- String extraText = "\nExtra text that isnt' part of the stack trace java:";
-
- RepositoryTaskData model = new RepositoryTaskData(new BugzillaAttributeFactory(),
- BugzillaCorePlugin.CONNECTOR_KIND, repository.getRepositoryUrl(),
- TasksUiPlugin.getTaskDataStorageManager().getNewRepositoryTaskId());
-
- model.setDescription(extraText + "\n" + stackTrace + "\n");
- model.setNew(true);
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- NewTaskEditorInput input = new NewTaskEditorInput(repository, model);
- TasksUiUtil.openEditor(input, TaskEditor.ID_EDITOR, page);
-
- TaskEditor taskEditor = (TaskEditor) page.getActiveEditor();
- NewBugzillaTaskEditor editor = (NewBugzillaTaskEditor) taskEditor.getActivePageInstance();
- assertEquals(stackTrace, AbstractLegacyDuplicateDetector.getStackTraceFromDescription(model.getDescription()).trim());
-
- editor.markDirty(false);
- editor.close();
- }
-
- public void testStackTraceMisaligned() throws Exception {
-
- String stackTrace = "java.lang.IllegalStateException: zip file closed\n"
- + " at java.util.zip.ZipFile.ensureOpen (ZipFile.java:518)\n"
- + "at java.util.zip.ZipFile.getEntry (ZipFile.java:251)\n"
- + " at java.util.jar.JarFile.getEntry(JarFile.java:200)\n"
- + "at sun.net.www.protocol.jar.URLJarFile.getEntry\n" + " (URLJarFile.java:90)\n"
- + "at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:112)\n"
- + "at sun.net.www.protocol.jar.JarURLConnection.getInputStream\n" + "(JarURLConnection.java:124)\n"
- + "at org.eclipse.jdt.internal.core.JavaElement\n.getURLContents(JavaElement.java:734)";
-
- RepositoryTaskData model = new RepositoryTaskData(new BugzillaAttributeFactory(),
- BugzillaCorePlugin.CONNECTOR_KIND, repository.getRepositoryUrl(),
- TasksUiPlugin.getTaskDataStorageManager().getNewRepositoryTaskId());
-
- model.setDescription(stackTrace);
- model.setNew(true);
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- NewTaskEditorInput input = new NewTaskEditorInput(repository, model);
- TasksUiUtil.openEditor(input, TaskEditor.ID_EDITOR, page);
-
- TaskEditor taskEditor = (TaskEditor) page.getActiveEditor();
- NewBugzillaTaskEditor editor = (NewBugzillaTaskEditor) taskEditor.getActivePageInstance();
- assertEquals(stackTrace, AbstractLegacyDuplicateDetector.getStackTraceFromDescription(model.getDescription()).trim());
-
- editor.markDirty(false);
- editor.close();
- }
-
- public void testStackTraceSUN() throws Exception {
-
- // SUN, IBM (no space before brackets, one set of brackets)
- String stackTrace = "java.lang.IllegalStateException: zip file closed\n"
- + " at java.util.zip.ZipFile.ensureOpen(ZipFile.java:518)\n"
- + " at java.util.zip.ZipFile.getEntry(ZipFile.java:251)\n"
- + " at java.util.jar.JarFile.getEntry(JarFile.java:200)\n"
- + " at sun.net.www.protocol.jar.URLJarFile.getEntry(URLJarFile.java:90)\n"
- + " at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:112)\n"
- + " at sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:124)\n"
- + " at org.eclipse.jdt.internal.core.JavaElement.getURLContents(JavaElement.java:734)";
-
- RepositoryTaskData model = new RepositoryTaskData(new BugzillaAttributeFactory(),
- BugzillaCorePlugin.CONNECTOR_KIND, repository.getRepositoryUrl(),
- TasksUiPlugin.getTaskDataStorageManager().getNewRepositoryTaskId());
-
- model.setDescription(stackTrace);
- model.setNew(true);
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- NewTaskEditorInput input = new NewTaskEditorInput(repository, model);
- TasksUiUtil.openEditor(input, TaskEditor.ID_EDITOR, page);
-
- TaskEditor taskEditor = (TaskEditor) page.getActiveEditor();
- NewBugzillaTaskEditor editor = (NewBugzillaTaskEditor) taskEditor.getActivePageInstance();
- assertEquals(stackTrace, AbstractLegacyDuplicateDetector.getStackTraceFromDescription(model.getDescription()).trim());
-
- editor.markDirty(false);
- editor.close();
- }
-
- public void testStackTraceGCJ() throws Exception {
-
- // gcj/gij (path and lib names in additional brackets)
- String stackTrace = "java.lang.Error: Something bad happened\n"
- + " at testcase.main(java.lang.String[]) (Unknown Source)\n"
- + " at gnu.java.lang.MainThread.call_main() (/usr/lib/libgcj.so.6.0.0)\n"
- + " at gnu.java.lang.MainThread.run() (/usr/lib/libgcj.so.6.0.0)";
-
- RepositoryTaskData model = new RepositoryTaskData(new BugzillaAttributeFactory(),
- BugzillaCorePlugin.CONNECTOR_KIND, repository.getRepositoryUrl(),
- TasksUiPlugin.getTaskDataStorageManager().getNewRepositoryTaskId());
-
- model.setDescription(stackTrace);
- model.setNew(true);
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- NewTaskEditorInput input = new NewTaskEditorInput(repository, model);
- TasksUiUtil.openEditor(input, TaskEditor.ID_EDITOR, page);
-
- TaskEditor taskEditor = (TaskEditor) page.getActiveEditor();
- NewBugzillaTaskEditor editor = (NewBugzillaTaskEditor) taskEditor.getActivePageInstance();
- assertEquals(stackTrace, AbstractLegacyDuplicateDetector.getStackTraceFromDescription(model.getDescription()).trim());
-
- editor.markDirty(false);
- editor.close();
- }
-
- public void testStackTraceNoLineNums() throws Exception {
-
- // ikvm (no line numbers)
- String stackTrace = "java.lang.Error: Something bad happened\n" + " at testcase.main (testcase.java)\n"
- + " at java.lang.reflect.Method.Invoke (Method.java)";
-
- RepositoryTaskData model = new RepositoryTaskData(new BugzillaAttributeFactory(),
- BugzillaCorePlugin.CONNECTOR_KIND, repository.getRepositoryUrl(),
- TasksUiPlugin.getTaskDataStorageManager().getNewRepositoryTaskId());
-
- model.setDescription(stackTrace);
- model.setNew(true);
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- NewTaskEditorInput input = new NewTaskEditorInput(repository, model);
- TasksUiUtil.openEditor(input, TaskEditor.ID_EDITOR, page);
-
- TaskEditor taskEditor = (TaskEditor) page.getActiveEditor();
- NewBugzillaTaskEditor editor = (NewBugzillaTaskEditor) taskEditor.getActivePageInstance();
- assertEquals(stackTrace, AbstractLegacyDuplicateDetector.getStackTraceFromDescription(model.getDescription()).trim());
-
- editor.markDirty(false);
- editor.close();
- }
-
- public void testStackTraceJRockit() throws Exception {
-
- // jrockit (slash delimiters)
- String stackTrace = "java.lang.Error: Something bad happened\n"
- + " at java/io/BufferedReader.readLine(BufferedReader.java:331)\n"
- + " at java/io/BufferedReader.readLine(BufferedReader.java:362)\n"
- + " at java/util/Properties.load(Properties.java:192)\n"
- + " at java/util/logging/LogManager.readConfiguration(L:555)";
-
- RepositoryTaskData model = new RepositoryTaskData(new BugzillaAttributeFactory(),
- BugzillaCorePlugin.CONNECTOR_KIND, repository.getRepositoryUrl(),
- TasksUiPlugin.getTaskDataStorageManager().getNewRepositoryTaskId());
-
- model.setDescription(stackTrace);
- model.setNew(true);
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- NewTaskEditorInput input = new NewTaskEditorInput(repository, model);
- TasksUiUtil.openEditor(input, TaskEditor.ID_EDITOR, page);
-
- TaskEditor taskEditor = (TaskEditor) page.getActiveEditor();
- NewBugzillaTaskEditor editor = (NewBugzillaTaskEditor) taskEditor.getActivePageInstance();
- assertEquals(stackTrace, AbstractLegacyDuplicateDetector.getStackTraceFromDescription(model.getDescription()).trim());
-
- editor.markDirty(false);
- editor.close();
- }
-
- public void testStackTraceOther() throws Exception {
-
- // jamvm, sablevm, kaffe, cacao (space before brackets, one set of brackets)
- String stackTrace = "java.lang.Error: Something bad happened\n" + " at testcase.main (testcase.java:3)\n"
- + " at java.lang.VirtualMachine.invokeMain (VirtualMachine.java)\n"
- + " at java.lang.VirtualMachine.main (VirtualMachine.java:108)";
-
- RepositoryTaskData model = new RepositoryTaskData(new BugzillaAttributeFactory(),
- BugzillaCorePlugin.CONNECTOR_KIND, repository.getRepositoryUrl(),
- TasksUiPlugin.getTaskDataStorageManager().getNewRepositoryTaskId());
-
- model.setDescription(stackTrace);
- model.setNew(true);
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- NewTaskEditorInput input = new NewTaskEditorInput(repository, model);
- TasksUiUtil.openEditor(input, TaskEditor.ID_EDITOR, page);
-
- TaskEditor taskEditor = (TaskEditor) page.getActiveEditor();
- NewBugzillaTaskEditor editor = (NewBugzillaTaskEditor) taskEditor.getActivePageInstance();
- assertEquals(stackTrace, AbstractLegacyDuplicateDetector.getStackTraceFromDescription(model.getDescription()).trim());
-
- editor.markDirty(false);
- editor.close();
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/EncodingTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/EncodingTest.java
deleted file mode 100644
index 10a53929d..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/EncodingTest.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.bugzilla.tests;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaClient;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaAttribute;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaTask;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.mylyn.tasks.core.data.TaskDataModel;
-
-/**
- * @author Mik Kersten
- */
-public class EncodingTest extends AbstractBugzillaTest {
-
- public void testEncodingSetting() {
-
- String charset = BugzillaClient.getCharsetFromString("text/html; charset=UTF-8");
- assertEquals("UTF-8", charset);
-
- charset = BugzillaClient.getCharsetFromString("text/html");
- assertEquals(null, charset);
-
- charset = BugzillaClient.getCharsetFromString("<<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-2\">>");
- assertEquals("iso-8859-2", charset);
-
- charset = BugzillaClient.getCharsetFromString("<<meta http-equiv=\"Content-Type\" content=\"text/html\">>");
- assertEquals(null, charset);
- }
-
- /**
- * This test just shows that when the encoding is changed on the repository synchronization does in fact return in a
- * different encoding (though it may not be legible)
- */
- public void testDifferentReportEncoding() throws CoreException {
- init222();
- repository.setCharacterEncoding("UTF-8");
- BugzillaTask task = (BugzillaTask) TasksUiInternal.createTask(repository, "57", new NullProgressMonitor());
- assertNotNull(task);
- //TasksUiPlugin.getSynchronizationManager().synchronize(connector, task, true, null);
- assertTrue(task.getSummary().equals("\u00E6"));//"\u05D0"));
- taskList.deleteTask(task);
- connector.getClientManager().repositoryRemoved(repository);
- repository.setCharacterEncoding("ISO-8859-1");
- task = (BugzillaTask) TasksUiInternal.createTask(repository, "57", new NullProgressMonitor());
- assertNotNull(task);
- //TasksUiPlugin.getSynchronizationManager().synchronize(connector, task, true, null);
- // iso-8859-1 'incorrect' interpretation
- assertFalse(task.getSummary().equals("\u00E6"));//"\u05D0"));
- }
-
- public void testProperEncodingUponPost() throws CoreException {
- init222();
- repository.setCharacterEncoding("UTF-8");
- ITask task = generateLocalTaskAndDownload("57");
- assertNotNull(task);
- assertTrue(task.getSummary().equals("\u00E6"));//"\u05D0"));
- String priority = null;
- TaskDataModel model = createModel(task);
- if (task.getPriority().equals("P1")) {
- priority = "P2";
- TaskAttribute attrPriority = model.getTaskData().getRoot().getAttribute(
- BugzillaAttribute.PRIORITY.getKey());
- if (attrPriority != null) {
- attrPriority.setValue(priority);
- model.attributeChanged(attrPriority);
- } else {
- fail();
- }
- } else {
- priority = "P1";
- TaskAttribute attrPriority = model.getTaskData().getRoot().getAttribute(
- BugzillaAttribute.PRIORITY.getKey());
- if (attrPriority != null) {
- attrPriority.setValue(priority);
- model.attributeChanged(attrPriority);
- } else {
- fail();
- }
- }
- model.save(new NullProgressMonitor());
-
- submit(model);
- taskList.deleteTask(task);
- task = TasksUiInternal.createTask(repository, "57", new NullProgressMonitor());
- assertNotNull(task);
- assertTrue(task.getSummary().equals("\u00E6"));//"\u05D0"));
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/NewBugWizardTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/NewBugWizardTest.java
deleted file mode 100644
index 0d6ff248c..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/NewBugWizardTest.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.bugzilla.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaAttributeFactory;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaAttribute;
-import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractLegacyRepositoryConnector;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractTaskDataHandler;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-/**
- * @author Mik Kersten
- * @author Ian Bull
- */
-public class NewBugWizardTest extends TestCase {
-
- public void testPlatformOptions() throws Exception {
-
- RepositoryTaskData newReport = new RepositoryTaskData(new BugzillaAttributeFactory(),
- BugzillaCorePlugin.CONNECTOR_KIND, IBugzillaConstants.TEST_BUGZILLA_220_URL, "1");
-
- TaskRepository repository = new TaskRepository(BugzillaCorePlugin.CONNECTOR_KIND,
- IBugzillaConstants.TEST_BUGZILLA_220_URL);
- AbstractLegacyRepositoryConnector connector = (AbstractLegacyRepositoryConnector) TasksUiPlugin.getRepositoryManager()
- .getRepositoryConnector(repository.getConnectorKind());
- assertNotNull(connector);
- AbstractTaskDataHandler taskDataHandler = connector.getLegacyTaskDataHandler();
- assertNotNull(taskDataHandler);
- taskDataHandler.initializeTaskData(repository, newReport, null);
- BugzillaCorePlugin.getDefault().setPlatformOptions(newReport);
-
- String os = Platform.getOS();
- if (os.equals("win32")) {
- assertEquals("Windows", newReport.getAttribute(BugzillaAttribute.OP_SYS.getKey()).getValue());
- } else if (os.equals("solaris")) {
- assertEquals("Solaris", newReport.getAttribute(BugzillaAttribute.OP_SYS.getKey()).getValue());
- } else if (os.equals("qnx")) {
- assertEquals("QNX-Photon", newReport.getAttribute(BugzillaAttribute.OP_SYS.getKey()).getValue());
- } else if (os.equals("macosx")) {
- assertEquals("Mac OS", newReport.getAttribute(BugzillaAttribute.OP_SYS.getKey()).getValue());
- } else if (os.equals("linux")) {
- assertEquals("Linux", newReport.getAttribute(BugzillaAttribute.OP_SYS.getKey()).getValue());
- } else if (os.equals("hpux")) {
- assertEquals("HP-UX", newReport.getAttribute(BugzillaAttribute.OP_SYS.getKey()).getValue());
- } else if (os.equals("aix")) {
- assertEquals("AIX", newReport.getAttribute(BugzillaAttribute.OP_SYS.getKey()).getValue());
- }
-
- String platform = Platform.getOSArch();
- if (platform.equals("x86")) {
- if (os.equals("macosx")) {
- assertEquals("Macintosh", newReport.getAttribute(BugzillaAttribute.REP_PLATFORM.getKey())
- .getValue());
- } else {
- assertEquals("PC", newReport.getAttribute(BugzillaAttribute.REP_PLATFORM.getKey()).getValue());
- }
- } else if (platform.equals("x86_64")) {
- assertEquals("PC", newReport.getAttribute(BugzillaAttribute.REP_PLATFORM.getKey()).getValue());
- } else if (platform.equals("ia64")) {
- assertEquals("PC", newReport.getAttribute(BugzillaAttribute.REP_PLATFORM.getKey()).getValue());
- } else if (platform.equals("ia64_32")) {
- assertEquals("PC", newReport.getAttribute(BugzillaAttribute.REP_PLATFORM.getKey()).getValue());
- } else if (platform.equals("sparc")) {
- assertEquals("Sun", newReport.getAttribute(BugzillaAttribute.REP_PLATFORM.getKey()).getValue());
- } else if (platform.equals("ppc")) {
- if (os.equals("macosx")) {
- assertEquals("Macintosh", newReport.getAttribute(BugzillaAttribute.REP_PLATFORM.getKey())
- .getValue());
- } else {
- assertEquals("Power", newReport.getAttribute(BugzillaAttribute.REP_PLATFORM.getKey())
- .getValue());
- }
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryEditorWizardTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryEditorWizardTest.java
deleted file mode 100644
index 8d63c45a7..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryEditorWizardTest.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.bugzilla.tests;
-
-import java.net.MalformedURLException;
-import java.net.UnknownHostException;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.mylyn.commons.net.AuthenticationCredentials;
-import org.eclipse.mylyn.commons.net.AuthenticationType;
-import org.eclipse.mylyn.context.tests.support.TestUtil;
-import org.eclipse.mylyn.context.tests.support.TestUtil.Credentials;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaClient;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaClientFactory;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin;
-import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants;
-import org.eclipse.mylyn.internal.bugzilla.ui.tasklist.BugzillaRepositorySettingsPage;
-import org.eclipse.mylyn.internal.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.EditRepositoryWizard;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Rob Elves
- */
-public class RepositoryEditorWizardTest extends TestCase {
-
- private TaskRepositoryManager manager;
-
- private TaskRepository repository;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- manager = TasksUiPlugin.getRepositoryManager();
- manager.clearRepositories(TasksUiPlugin.getDefault().getRepositoriesFilePath());
- repository = new TaskRepository(BugzillaCorePlugin.CONNECTOR_KIND, IBugzillaConstants.TEST_BUGZILLA_222_URL);
- Credentials credentials = TestUtil.readCredentials();
- repository.setAuthenticationCredentials(credentials.username, credentials.password);
- repository.setAnonymous(false);
- TasksUiPlugin.getRepositoryManager().addRepository(repository);
- }
-
- private BugzillaClient createClient(String hostUrl, String username, String password, String htAuthUser,
- String htAuthPass, String encoding) throws MalformedURLException {
- TaskRepository taskRepository = new TaskRepository(BugzillaCorePlugin.CONNECTOR_KIND, hostUrl);
-
- AuthenticationCredentials credentials = new AuthenticationCredentials(username, password);
- taskRepository.setCredentials(AuthenticationType.REPOSITORY, credentials, false);
-
- AuthenticationCredentials webCredentials = new AuthenticationCredentials(htAuthUser, htAuthPass);
- taskRepository.setCredentials(AuthenticationType.HTTP, webCredentials, false);
- taskRepository.setCharacterEncoding(encoding);
- return BugzillaClientFactory.createClient(taskRepository);
- }
-
- public void testValidationInvalidPassword() throws Exception {
-
- EditRepositoryWizard wizard = new EditRepositoryWizard(repository);
- WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench().getDisplay().getActiveShell(), wizard);
- dialog.create();
- BugzillaRepositorySettingsPage page = (BugzillaRepositorySettingsPage) wizard.getSettingsPage();
- // BugzillaClient client =
- // BugzillaClientFactory.createClient(page.getServerUrl(),
- // page.getUserName(), page.getPassword(), page.getHttpAuthUserId(),
- // page.getHttpAuthPassword(), page.getCharacterEncoding());
- page.setPassword("bogus");
- try {
- BugzillaClient client = createClient(page.getRepositoryUrl(), page.getUserName(), page.getPassword(),
- page.getHttpAuthUserId(), page.getHttpAuthPassword(), page.getCharacterEncoding());
- client.validate(null);
- } catch (CoreException e) {
- return;
- }
- fail("LoginException didn't occur!");
- }
-
- public void testValidationInvalidUserid() throws Exception {
- EditRepositoryWizard wizard = new EditRepositoryWizard(repository);
- WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench().getDisplay().getActiveShell(), wizard);
- dialog.create();
- BugzillaRepositorySettingsPage page = (BugzillaRepositorySettingsPage) wizard.getSettingsPage();
- page.setUserId("bogus");
- try {
- BugzillaClient client = createClient(page.getRepositoryUrl(), page.getUserName(), page.getPassword(),
- page.getHttpAuthUserId(), page.getHttpAuthPassword(), page.getCharacterEncoding());
- client.validate(null);
- } catch (CoreException e) {
- return;
- }
- fail("LoginException didn't occur!");
- }
-
- public void testValidationInvalidUrl() throws Exception {
- EditRepositoryWizard wizard = new EditRepositoryWizard(repository);
- WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench().getDisplay().getActiveShell(), wizard);
- dialog.create();
- BugzillaRepositorySettingsPage page = (BugzillaRepositorySettingsPage) wizard.getSettingsPage();
- page.setUrl("http://mylar.eclipse.org");
- try {
- BugzillaClient client = createClient(page.getRepositoryUrl(), page.getUserName(), page.getPassword(),
- page.getHttpAuthUserId(), page.getHttpAuthPassword(), page.getCharacterEncoding());
- client.validate(null);
- } catch (CoreException e) {
- assertTrue(e.getStatus().getException() instanceof UnknownHostException);
- return;
- }
- fail("UnknownHostException didn't occur!");
- }
-
- // TODO: Test locking up?
- // public void testAutoVersion() throws Exception {
- // repository.setVersion(BugzillaRepositorySettingsPage.LABEL_AUTOMATIC_VERSION);
- // EditRepositoryWizard wizard = new EditRepositoryWizard(repository);
- // WizardDialog dialog = new
- // WizardDialog(PlatformUI.getWorkbench().getDisplay().getActiveShell(),
- // wizard);
- // dialog.create();
- // BugzillaRepositorySettingsPage page = (BugzillaRepositorySettingsPage)
- // wizard.getSettingsPage();
- // page.setTesting(true);
- // assertEquals(BugzillaRepositorySettingsPage.LABEL_AUTOMATIC_VERSION,
- // page.getVersion());
- // page.validateSettings();
- // assertEquals("2.22", page.getVersion());
- // }
-
- public void testPersistChangeOfUrl() throws Exception {
- assertEquals(1, manager.getAllRepositories().size());
- String tempUid = repository.getUserName();
- String tempPass = repository.getPassword();
- EditRepositoryWizard wizard = new EditRepositoryWizard(repository);
- WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench().getDisplay().getActiveShell(), wizard);
- dialog.create();
- BugzillaRepositorySettingsPage page = (BugzillaRepositorySettingsPage) wizard.getSettingsPage();
- BugzillaClient client = createClient(page.getRepositoryUrl(), page.getUserName(), page.getPassword(),
- page.getHttpAuthUserId(), page.getHttpAuthPassword(), page.getCharacterEncoding());
- client.validate(null);
- page.setUrl(IBugzillaConstants.TEST_BUGZILLA_218_URL);
- wizard.performFinish();
- assertEquals(1, manager.getAllRepositories().size());
- TaskRepository repositoryTest = manager.getRepository(BugzillaCorePlugin.CONNECTOR_KIND,
- IBugzillaConstants.TEST_BUGZILLA_218_URL);
- assertNotNull(repositoryTest);
- assertEquals(tempUid, repositoryTest.getUserName());
- assertEquals(tempPass, repositoryTest.getPassword());
- }
-
- public void testPersistChangeUserId() throws Exception {
- assertEquals(1, manager.getAllRepositories().size());
- EditRepositoryWizard wizard = new EditRepositoryWizard(repository);
- WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench().getDisplay().getActiveShell(), wizard);
- dialog.create();
- BugzillaRepositorySettingsPage page = (BugzillaRepositorySettingsPage) wizard.getSettingsPage();
- BugzillaClient client = createClient(page.getRepositoryUrl(), page.getUserName(), page.getPassword(),
- page.getHttpAuthUserId(), page.getHttpAuthPassword(), page.getCharacterEncoding());
- client.validate(null);
- page.setUserId("bogus");
- wizard.performFinish();
- assertEquals(1, manager.getAllRepositories().size());
- TaskRepository repositoryTest = manager.getRepository(BugzillaCorePlugin.CONNECTOR_KIND,
- IBugzillaConstants.TEST_BUGZILLA_222_URL);
- assertNotNull(repositoryTest);
- wizard = new EditRepositoryWizard(repositoryTest);
- dialog = new WizardDialog(PlatformUI.getWorkbench().getDisplay().getActiveShell(), wizard);
- dialog.create();
- page = (BugzillaRepositorySettingsPage) wizard.getSettingsPage();
- try {
- client = createClient(page.getRepositoryUrl(), page.getUserName(), page.getPassword(),
- page.getHttpAuthUserId(), page.getHttpAuthPassword(), page.getCharacterEncoding());
- client.validate(null);
- } catch (CoreException e) {
- return;
- }
- fail("LoginException didn't occur!");
- }
-
-}
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryReportFactoryTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryReportFactoryTest.java
deleted file mode 100644
index 5ea04d2e3..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryReportFactoryTest.java
+++ /dev/null
@@ -1,464 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.bugzilla.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.mylyn.context.tests.support.TestUtil;
-import org.eclipse.mylyn.context.tests.support.TestUtil.Credentials;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaAttribute;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaAttributeFactory;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaClient;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaRepositoryConnector;
-import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-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.eclipse.mylyn.tasks.core.data.TaskMapper;
-
-/**
- * @author Rob Elves
- * @author Mik Kersten
- */
-public class RepositoryReportFactoryTest extends TestCase {
-
- BugzillaAttributeFactory attributeFactory = new BugzillaAttributeFactory();
-
- TaskRepository repository;
-
- BugzillaRepositoryConnector connector;
-
- private TaskData init(String taskId) throws CoreException {
- return connector.getTaskData(repository, taskId, new NullProgressMonitor());
- }
-
- private TaskRepository setRepository(String kind, String url) {
- connector = (BugzillaRepositoryConnector) TasksUiPlugin.getRepositoryManager().getRepositoryConnector(
- BugzillaCorePlugin.CONNECTOR_KIND);
- repository = new TaskRepository(kind, url);
- Credentials credentials = TestUtil.readCredentials();
- repository.setAuthenticationCredentials(credentials.username, credentials.password);
- return repository;
- }
-
- public void testInvalidCredentials222() throws Exception {
- String bugid = "1";
- String errorMessage = "";
- try {
- setRepository(BugzillaCorePlugin.CONNECTOR_KIND, IBugzillaConstants.TEST_BUGZILLA_222_URL);
- repository.setAuthenticationCredentials("invalid", "invalid");
- init(bugid);
- } catch (CoreException e) {
- errorMessage = e.getStatus().getMessage();
- }
- assertTrue(errorMessage.startsWith("Unable to login"));
- repository.flushAuthenticationCredentials();
- }
-
- public void testBugNotFound222() {
-
- String bugid = "-1";
- String errorMessage = "";
- try {
- setRepository(BugzillaCorePlugin.CONNECTOR_KIND, IBugzillaConstants.TEST_BUGZILLA_222_URL);
- // If this isn't called the BugzillaClient will be reused (with old
- // credentials) so
- // force drop of old client connection.
- // Note that this is usually called by notification
- connector.getClientManager().repositoryAdded(repository);
- init(bugid);
- } catch (CoreException e) {
- errorMessage = e.getStatus().getMessage();
- }
- assertTrue(errorMessage.startsWith("Repository error from"));
- }
-
- // public void testReadingReport() throws Exception {
- // String bugid = "2";
- // setRepository(BugzillaCorePlugin.REPOSITORY_KIND,
- // IBugzillaConstants.TEST_BUGZILLA_222_URL);
- // RepositoryTaskData report = init(bugid);
- //
- // assertNotNull(report);
- // assertEquals("search-match-test 1",
- // report.getAttribute(BugzillaReportElement.SHORT_DESC.getKeyString())
- // .getValue());
- // assertEquals("TestProduct",
- // report.getAttribute(BugzillaReportElement.PRODUCT.getKeyString()).getValue());
- // assertEquals("PC",
- // report.getAttribute(BugzillaReportElement.REP_PLATFORM.getKeyString()).getValue());
- // assertEquals("Windows",
- // report.getAttribute(BugzillaReportElement.OP_SYS.getKeyString()).getValue());
- // // first comment (#0) is the summary so this value is always 1
- // // greater
- // // than what is shown on the report ui
- // assertEquals(3, report.getComments().size());
- // assertEquals("search-match-test 1",
- // report.getComments().get(0).getAttribute(
- // BugzillaReportElement.THETEXT.getKeyString()).getValue());
- // // assertEquals(15, report.getAttachments().size());
- // // assertEquals("1",
- // //
- // report.getAttachments().get(0).getAttribute(BugzillaReportElement.ATTACHID).getValue());
- // // assertEquals("2006-03-10 14:11",
- // //
- // report.getAttachments().get(0).getAttribute(BugzillaReportElement.DATE)
- // // .getValue());
- // // assertEquals("Testing upload",
- // //
- // report.getAttachments().get(0).getAttribute(BugzillaReportElement.DESC)
- // // .getValue());
- // // assertEquals("patch130217.txt",
- // //
- // report.getAttachments().get(0).getAttribute(BugzillaReportElement.FILENAME)
- // // .getValue());
- // // assertEquals("text/plain",
- // //
- // report.getAttachments().get(0).getAttribute(BugzillaReportElement.TYPE).getValue());
- // }
-
- public void testReadingReport222() throws Exception {
- String bugid = "2";
- setRepository(BugzillaCorePlugin.CONNECTOR_KIND, IBugzillaConstants.TEST_BUGZILLA_222_URL);
- TaskData report = init(bugid);
-
- assertNotNull(report);
- assertEquals("search-match-test 1", report.getRoot()
- .getAttribute(BugzillaAttribute.SHORT_DESC.getKey())
- .getValue());
-// assertEquals("search-match-test 1", report.getSummary());
-// assertEquals("search-match-test 1", report.getDescription());
- assertEquals("TestProduct", report.getRoot().getAttribute(BugzillaAttribute.PRODUCT.getKey()).getValue());
-// assertEquals("TestProduct", report.getProduct());
- assertEquals("TestComponent", report.getRoot().getAttribute(BugzillaAttribute.COMPONENT.getKey()).getValue());
- assertEquals("PC", report.getRoot().getAttribute(BugzillaAttribute.REP_PLATFORM.getKey()).getValue());
- assertEquals("Windows", report.getRoot().getAttribute(BugzillaAttribute.OP_SYS.getKey()).getValue());
- assertEquals("other", report.getRoot().getAttribute(BugzillaAttribute.VERSION.getKey()).getValue());
- assertEquals("P1", report.getRoot().getAttribute(BugzillaAttribute.PRIORITY.getKey()).getValue());
- assertEquals("normal", report.getRoot().getAttribute(BugzillaAttribute.BUG_SEVERITY.getKey()).getValue());
- assertEquals("" + bugid, report.getRoot().getAttribute(BugzillaAttribute.BUG_ID.getKey()).getValue());
- assertEquals("NEW", report.getRoot().getAttribute(BugzillaAttribute.BUG_STATUS.getKey()).getValue());
- assertEquals("2006-05-23 17:46", report.getRoot()
- .getAttribute(BugzillaAttribute.CREATION_TS.getKey())
- .getValue());
- assertEquals("2008-02-15 12:55:32", report.getRoot()
- .getAttribute(BugzillaAttribute.DELTA_TS.getKey())
- .getValue());
- assertEquals("---", report.getRoot().getAttribute(BugzillaAttribute.TARGET_MILESTONE.getKey()).getValue());
- assertEquals("relves@cs.ubc.ca", report.getRoot().getAttribute(BugzillaAttribute.REPORTER.getKey()).getValue());
- assertEquals("nhapke@cs.ubc.ca", report.getRoot()
- .getAttribute(BugzillaAttribute.ASSIGNED_TO.getKey())
- .getValue());
- assertEquals(5, report.getAttributeMapper().getAttributesByType(report, TaskAttribute.TYPE_ATTACHMENT).size());
- // assertEquals("relves@cs.ubc.ca",
- // report.getComments().get(0).getAttribute(
- // BugzillaReportElement.WHO.getKeyString()).getValue());
- // assertEquals("2006-05-23 17:46:24",
- // report.getComments().get(0).getAttribute(
- // BugzillaReportElement.BUG_WHEN.getKeyString()).getValue());
- // assertEquals("search-match-test 1",
- // report.getComments().get(0).getAttribute(
- // BugzillaReportElement.THETEXT.getKeyString()).getValue());
- // assertEquals(0, report.getAttachments().size());
- }
-
- public void testReadingReport2201() throws Exception {
- String bugid = "1";
- setRepository(BugzillaCorePlugin.CONNECTOR_KIND, IBugzillaConstants.TEST_BUGZILLA_2201_URL);
- TaskData report = init(bugid);
-
- assertNotNull(report);
- assertEquals("1", report.getRoot().getAttribute(BugzillaAttribute.BUG_ID.getKey()).getValue());
- assertEquals("search-match-test 1", report.getRoot()
- .getAttribute(BugzillaAttribute.SHORT_DESC.getKey())
- .getValue());
- assertEquals("TestProduct", report.getRoot().getAttribute(BugzillaAttribute.PRODUCT.getKey()).getValue());
- assertEquals("TestComponent", report.getRoot().getAttribute(BugzillaAttribute.COMPONENT.getKey()).getValue());
- assertEquals("PC", report.getRoot().getAttribute(BugzillaAttribute.REP_PLATFORM.getKey()).getValue());
- assertEquals("Windows", report.getRoot().getAttribute(BugzillaAttribute.OP_SYS.getKey()).getValue());
- assertEquals("other", report.getRoot().getAttribute(BugzillaAttribute.VERSION.getKey()).getValue());
- assertEquals("P2", report.getRoot().getAttribute(BugzillaAttribute.PRIORITY.getKey()).getValue());
- assertEquals("normal", report.getRoot().getAttribute(BugzillaAttribute.BUG_SEVERITY.getKey()).getValue());
- assertEquals("NEW", report.getRoot().getAttribute(BugzillaAttribute.BUG_STATUS.getKey()).getValue());
- assertEquals("2006-03-02 18:13", report.getRoot()
- .getAttribute(BugzillaAttribute.CREATION_TS.getKey())
- .getValue());
- assertEquals("2006-05-03 13:06:11", report.getRoot()
- .getAttribute(BugzillaAttribute.DELTA_TS.getKey())
- .getValue());
- assertEquals("---", report.getRoot().getAttribute(BugzillaAttribute.TARGET_MILESTONE.getKey()).getValue());
- TaskAttribute attribute = report.getRoot().getAttribute(BugzillaAttribute.BLOCKED.getKey());
- assertEquals("2, 9", attribute.getValue());
- attribute = report.getRoot().getAttribute(BugzillaAttribute.CC.getKey());
- assertEquals(2, attribute.getValues().size());
- assertEquals("relves@cs.ubc.ca", attribute.getValues().get(0));
- assertEquals("relves@gmail.com", attribute.getValues().get(1));
- assertEquals("relves@cs.ubc.ca", report.getRoot().getAttribute(BugzillaAttribute.REPORTER.getKey()).getValue());
- assertEquals("relves@cs.ubc.ca", report.getRoot()
- .getAttribute(BugzillaAttribute.ASSIGNED_TO.getKey())
- .getValue());
- }
-
- // public void testReadingReport2201Eclipse() throws Exception {
- // String bugid = "24448";
- // TaskRepository repository = new
- // TaskRepository(BugzillaCorePlugin.REPOSITORY_KIND,
- // IBugzillaConstants.ECLIPSE_BUGZILLA_URL);
- //
- // RepositoryTaskData report = new RepositoryTaskData(attributeFactory,
- // BugzillaCorePlugin.REPOSITORY_KIND, repository
- // .getUrl(), bugid);
- // BugzillaServerFacade.setupExistingBugAttributes(repository.getUrl(),
- // report);
- // factory.populateReport(report, repository.getUrl(), null,
- // repository.getUserName(), repository.getPassword(),
- // null);
- //
- // assertNotNull(report);
- // assertEquals("24448",
- // report.getAttribute(BugzillaReportElement.BUG_ID.getKeyString()).getValue());
- // assertEquals("Ant causing Out of Memory",
- // report.getAttribute(BugzillaReportElement.SHORT_DESC.getKeyString())
- // .getValue());
- // assertEquals("Platform",
- // report.getAttribute(BugzillaReportElement.PRODUCT.getKeyString()).getValue());
- // assertEquals("Ant",
- // report.getAttribute(BugzillaReportElement.COMPONENT.getKeyString()).getValue());
- // assertEquals("PC",
- // report.getAttribute(BugzillaReportElement.REP_PLATFORM.getKeyString()).getValue());
- // assertEquals("other",
- // report.getAttribute(BugzillaReportElement.OP_SYS.getKeyString()).getValue());
- // assertEquals("2.0",
- // report.getAttribute(BugzillaReportElement.VERSION.getKeyString()).getValue());
- // assertEquals("P2",
- // report.getAttribute(BugzillaReportElement.PRIORITY.getKeyString()).getValue());
- // assertEquals("normal",
- // report.getAttribute(BugzillaReportElement.BUG_SEVERITY.getKeyString()).getValue());
- // assertEquals("RESOLVED",
- // report.getAttribute(BugzillaReportElement.BUG_STATUS.getKeyString()).getValue());
- // assertEquals("WONTFIX",
- // report.getAttribute(BugzillaReportElement.RESOLUTION.getKeyString()).getValue());
- // assertEquals("2002-10-07 09:32",
- // report.getAttribute(BugzillaReportElement.CREATION_TS.getKeyString())
- // .getValue());
- // assertEquals("2006-02-03 12:03:57",
- // report.getAttribute(BugzillaReportElement.DELTA_TS.getKeyString())
- // .getValue());
- // assertEquals("core, performance, ui",
- // report.getAttribute(BugzillaReportElement.KEYWORDS.getKeyString())
- // .getValue());
- // // RepositoryTaskAttribute attribute =
- // // report.getAttribute(BugzillaReportElement.CC);
- // // assertEquals(30, attribute.getValues().size());
- // // assertEquals("relves@cs.ubc.ca", attribute.getValues().get(0));
- // // assertEquals("relves@gmail.com", attribute.getValues().get(1));
- // // assertEquals("relves@cs.ubc.ca",
- // // report.getAttribute(BugzillaReportElement.REPORTER).getValue());
- // // assertEquals("relves@cs.ubc.ca",
- // // report.getAttribute(BugzillaReportElement.ASSIGNED_TO).getValue());
- // // assertEquals(1, report.getComments().size());
- // // assertEquals("relves@cs.ubc.ca",
- // //
- // report.getComments().get(0).getAttribute(BugzillaReportElement.WHO).getValue());
- // // assertEquals("2006-03-02 18:13",
- // //
- // report.getComments().get(0).getAttribute(BugzillaReportElement.BUG_WHEN)
- // // .getValue());
- // // assertEquals("search-match-test 1",
- // //
- // report.getComments().get(0).getAttribute(BugzillaReportElement.THETEXT)
- // // .getValue());
- // // assertEquals(0, report.getAttachments().size());
- // }
-
- // public void testReadingReport220() throws Exception {
- // String bugid = "1";
- // TaskRepository repository = new
- // TaskRepository(BugzillaCorePlugin.REPOSITORY_KIND,
- // IBugzillaConstants.TEST_BUGZILLA_220_URL);
- //
- // RepositoryTaskData report = new RepositoryTaskData(attributeFactory,
- // BugzillaCorePlugin.REPOSITORY_KIND,
- // repository.getUrl(), bugid);
- // BugzillaServerFacade.setupExistingBugAttributes(repository.getUrl(),
- // report);
- // factory.populateReport(report, repository.getUrl(), null,
- // repository.getUserName(), repository.getPassword(),
- // null);
- //
- // assertNotNull(report);
- // assertEquals("1",
- // report.getAttribute(BugzillaReportElement.BUG_ID.getKeyString()).getValue());
- // assertEquals("search-match-test",
- // report.getAttribute(BugzillaReportElement.SHORT_DESC.getKeyString())
- // .getValue());
- // assertEquals("TestProduct",
- // report.getAttribute(BugzillaReportElement.PRODUCT.getKeyString()).getValue());
- // assertEquals("TestComponent",
- // report.getAttribute(BugzillaReportElement.COMPONENT.getKeyString()).getValue());
- // assertEquals("PC",
- // report.getAttribute(BugzillaReportElement.REP_PLATFORM.getKeyString()).getValue());
- // assertEquals("Windows",
- // report.getAttribute(BugzillaReportElement.OP_SYS.getKeyString()).getValue());
- // assertEquals("other",
- // report.getAttribute(BugzillaReportElement.VERSION.getKeyString()).getValue());
- // assertEquals("P2",
- // report.getAttribute(BugzillaReportElement.PRIORITY.getKeyString()).getValue());
- // assertEquals("normal",
- // report.getAttribute(BugzillaReportElement.BUG_SEVERITY.getKeyString()).getValue());
- // assertEquals("NEW",
- // report.getAttribute(BugzillaReportElement.BUG_STATUS.getKeyString()).getValue());
- // assertEquals("2006-03-02 17:30",
- // report.getAttribute(BugzillaReportElement.CREATION_TS.getKeyString())
- // .getValue());
- // assertEquals("2006-04-20 15:13:43",
- // report.getAttribute(BugzillaReportElement.DELTA_TS.getKeyString())
- // .getValue());
- // assertEquals("---",
- // report.getAttribute(BugzillaReportElement.TARGET_MILESTONE.getKeyString()).getValue());
- // assertEquals("relves@cs.ubc.ca",
- // report.getAttribute(BugzillaReportElement.REPORTER.getKeyString()).getValue());
- // assertEquals("relves@cs.ubc.ca",
- // report.getAttribute(BugzillaReportElement.ASSIGNED_TO.getKeyString())
- // .getValue());
- // assertEquals("relves@cs.ubc.ca",
- // report.getAttribute(BugzillaReportElement.CC.getKeyString()).getValue());
- // assertEquals(3, report.getComments().size());
- // assertEquals("relves@cs.ubc.ca",
- // report.getComments().get(0).getAttribute(
- // BugzillaReportElement.WHO.getKeyString()).getValue());
- // assertEquals("2006-03-02 17:30",
- // report.getComments().get(0).getAttribute(
- // BugzillaReportElement.BUG_WHEN.getKeyString()).getValue());
- // assertEquals("search-match-test",
- // report.getComments().get(0).getAttribute(
- // BugzillaReportElement.THETEXT.getKeyString()).getValue());
- // assertEquals(0, report.getAttachments().size());
- // }
-
- public void testReadingReport218() throws Exception {
- String bugid = "1";
- setRepository(BugzillaCorePlugin.CONNECTOR_KIND, IBugzillaConstants.TEST_BUGZILLA_218_URL);
- TaskData report = init(bugid);
- assertNotNull(report);
- assertEquals("1", report.getRoot().getAttribute(BugzillaAttribute.BUG_ID.getKey()).getValue());
- assertEquals("search-match-test 1", report.getRoot()
- .getAttribute(BugzillaAttribute.SHORT_DESC.getKey())
- .getValue());
- assertEquals("TestProduct", report.getRoot().getAttribute(BugzillaAttribute.PRODUCT.getKey()).getValue());
- assertEquals("TestComponent", report.getRoot().getAttribute(BugzillaAttribute.COMPONENT.getKey()).getValue());
- assertEquals("PC", report.getRoot().getAttribute(BugzillaAttribute.REP_PLATFORM.getKey()).getValue());
- assertEquals("Windows XP", report.getRoot().getAttribute(BugzillaAttribute.OP_SYS.getKey()).getValue());
- assertEquals("other", report.getRoot().getAttribute(BugzillaAttribute.VERSION.getKey()).getValue());
- assertEquals("P2", report.getRoot().getAttribute(BugzillaAttribute.PRIORITY.getKey()).getValue());
- assertEquals("normal", report.getRoot().getAttribute(BugzillaAttribute.BUG_SEVERITY.getKey()).getValue());
- assertEquals("NEW", report.getRoot().getAttribute(BugzillaAttribute.BUG_STATUS.getKey()).getValue());
- assertEquals("2006-03-02 18:09", report.getRoot()
- .getAttribute(BugzillaAttribute.CREATION_TS.getKey())
- .getValue());
- assertEquals("2006-05-05 17:45:24", report.getRoot()
- .getAttribute(BugzillaAttribute.DELTA_TS.getKey())
- .getValue());
- assertEquals("---", report.getRoot().getAttribute(BugzillaAttribute.TARGET_MILESTONE.getKey()).getValue());
- assertEquals("relves@cs.ubc.ca", report.getRoot().getAttribute(BugzillaAttribute.REPORTER.getKey()).getValue());
- assertEquals("relves@cs.ubc.ca", report.getRoot()
- .getAttribute(BugzillaAttribute.ASSIGNED_TO.getKey())
- .getValue());
- assertEquals(0, report.getAttributeMapper().getAttributesByType(report, TaskAttribute.TYPE_ATTACHMENT).size());
- }
-
- public void testTimeTracking222() throws Exception {
- setRepository(BugzillaCorePlugin.CONNECTOR_KIND, IBugzillaConstants.TEST_BUGZILLA_222_URL);
- TaskData report = init("11");
- assertEquals("7.50", report.getRoot().getAttribute(BugzillaAttribute.ESTIMATED_TIME.getKey()).getValue());
- assertEquals("4.00", report.getRoot().getAttribute(BugzillaAttribute.ACTUAL_TIME.getKey()).getValue());
- assertEquals("3.00", report.getRoot().getAttribute(BugzillaAttribute.REMAINING_TIME.getKey()).getValue());
- assertEquals("2005-03-04", report.getRoot().getAttribute(BugzillaAttribute.DEADLINE.getKey()).getValue());
- }
-
- // public void testTimeTracking2201() throws Exception {
- // RepositoryTaskData report =
- // init(IBugzillaConstants.TEST_BUGZILLA_2201_URL, 23);
- //
- // assertEquals("7.50",
- // report.getAttribute(BugzillaReportElement.ESTIMATED_TIME.getKeyString()).getValue());
- // assertEquals("1.00",
- // report.getAttribute(BugzillaReportElement.ACTUAL_TIME.getKeyString()).getValue());
- // assertEquals("3.00",
- // report.getAttribute(BugzillaReportElement.REMAINING_TIME.getKeyString()).getValue());
- // assertEquals("2005-03-04",
- // report.getAttribute(BugzillaReportElement.DEADLINE.getKeyString()).getValue());
- // }
- //
- // public void testTimeTracking220() throws Exception {
- // RepositoryTaskData report =
- // init(IBugzillaConstants.TEST_BUGZILLA_220_URL, 9);
- //
- // assertEquals("7.50",
- // report.getAttribute(BugzillaReportElement.ESTIMATED_TIME.getKeyString()).getValue());
- // assertEquals("1.00",
- // report.getAttribute(BugzillaReportElement.ACTUAL_TIME.getKeyString()).getValue());
- // assertEquals("3.00",
- // report.getAttribute(BugzillaReportElement.REMAINING_TIME.getKeyString()).getValue());
- // assertEquals("2005-03-04",
- // report.getAttribute(BugzillaReportElement.DEADLINE.getKeyString()).getValue());
- // }
-
- public void testTimeTracking218() throws Exception {
- setRepository(BugzillaCorePlugin.CONNECTOR_KIND, IBugzillaConstants.TEST_BUGZILLA_218_URL);
- TaskData report = init("19");
- TaskAttribute root = report.getRoot();
- assertEquals("7.50", root.getAttribute(BugzillaAttribute.ESTIMATED_TIME.getKey()).getValue());
- assertEquals("1.00", root.getAttribute(BugzillaAttribute.ACTUAL_TIME.getKey()).getValue());
- assertEquals("3.00", root.getAttribute(BugzillaAttribute.REMAINING_TIME.getKey()).getValue());
- }
-
- public void testMultipleDepensOn() throws Exception {
- String bugid = "5";
- setRepository(BugzillaCorePlugin.CONNECTOR_KIND, IBugzillaConstants.TEST_BUGZILLA_218_URL);
- TaskData report = init(bugid);
- assertNotNull(report);
- TaskAttribute root = report.getRoot();
- assertEquals("5", root.getAttribute(BugzillaAttribute.BUG_ID.getKey()).getValue());
- assertEquals("6, 7", root.getAttribute(BugzillaAttribute.DEPENDSON.getKey()).getValue());
- assertEquals("13, 14", root.getAttribute(BugzillaAttribute.BLOCKED.getKey()).getValue());
- }
-
- public void testBugReportAPI() throws Exception {
- String bugid = "3";
- setRepository(BugzillaCorePlugin.CONNECTOR_KIND, IBugzillaConstants.TEST_BUGZILLA_222_URL);
- TaskData report = init(bugid);
- assertNotNull(report);
- assertTrue(report != null);
- TaskMapper mapper = new TaskMapper(report);
- assertEquals("search-match-test 2", mapper.getSummary());
- assertEquals("search-match-test 2", mapper.getDescription());
- assertEquals("TestProduct", mapper.getProduct());
- assertEquals("nhapke@cs.ubc.ca", mapper.getOwner());
- }
-
- public void testDeltaTsTruncation() {
- String ts1 = "2006-07-06 03:22:08 0900";
- String ts1_truncated = "2006-07-06 03:22:08";
- assertEquals(ts1_truncated, BugzillaClient.stripTimeZone(ts1));
-
- String ts2 = "2006-07-06 03:22:08";
- String ts2_truncated = "2006-07-06 03:22:08";
- assertEquals(ts2_truncated, BugzillaClient.stripTimeZone(ts2));
-
- String ts3 = "2006-07-06 03:22:08 PST";
- String ts3_truncated = "2006-07-06 03:22:08";
- assertEquals(ts3_truncated, BugzillaClient.stripTimeZone(ts3));
- }
-
-}
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryTaskHandleTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryTaskHandleTest.java
deleted file mode 100644
index c33ab603f..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryTaskHandleTest.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.bugzilla.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaTask;
-import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants;
-import org.eclipse.mylyn.internal.tasks.ui.TaskListManager;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.tests.connector.MockRepositoryConnector;
-
-/**
- * @author Mik Kersten
- */
-public class RepositoryTaskHandleTest extends TestCase {
-
- private TaskListManager manager = TasksUiPlugin.getTaskListManager();
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- manager = TasksUiPlugin.getTaskListManager();
- manager.resetTaskList();
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
- manager.resetTaskList();
- }
-
- // Dash now allowed in task id
- // public void testInvalidHandle() {
- // // MockRepositoryTask task = new MockRepositoryTask()
- // String url = "http://foo";
- // assertEquals(url + "-" + "abc", RepositoryTaskHandleUtil.getHandle(url,
- // "abc"));
- // Exception caught = null;
- // try {
- // RepositoryTaskHandleUtil.getHandle(url, "a-23");
- // } catch (Exception e) {
- // caught = e;
- // }
- // assertNotNull(caught);
- // }
-
- public void testRepositoryUrlHandles() {
- String repositoryUrl = IBugzillaConstants.ECLIPSE_BUGZILLA_URL;
- TaskRepository repository = new TaskRepository(MockRepositoryConnector.REPOSITORY_KIND, repositoryUrl);
- TasksUiPlugin.getRepositoryManager().addRepository(repository);
-
- String id = "123";
- BugzillaTask bugTask = new BugzillaTask(repositoryUrl, id, "label 124");
- assertEquals(repositoryUrl, bugTask.getRepositoryUrl());
-
- manager.getTaskList().addTask(bugTask);
- manager.saveTaskList();
- manager.resetTaskList();
- manager.readExistingOrCreateNewList();
-
- BugzillaTask readReport = (BugzillaTask) manager.getTaskList()
- .getUnmatchedContainer(repositoryUrl)
- .getChildren()
- .iterator()
- .next();
- assertEquals(readReport.getSummary(), readReport.getSummary());
- assertEquals(readReport.getRepositoryUrl(), readReport.getRepositoryUrl());
- TasksUiPlugin.getRepositoryManager().removeRepository(repository,
- TasksUiPlugin.getDefault().getRepositoriesFilePath());
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskEditorTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskEditorTest.java
deleted file mode 100644
index fe102ea23..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskEditorTest.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.bugzilla.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaAttributeFactory;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin;
-import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractLegacyRepositoryConnector;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractTaskDataHandler;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskAttribute;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.deprecated.AbstractRepositoryTaskEditor;
-import org.eclipse.mylyn.internal.tasks.ui.deprecated.NewTaskEditorInput;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Jeff Pound
- */
-public class TaskEditorTest extends TestCase {
-
- private static final String DESCRIPTION = "summary";
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- @Override
- protected void tearDown() throws Exception {
- PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().closeAllEditors(false);
- TasksUiPlugin.getRepositoryManager().clearRepositories(TasksUiPlugin.getDefault().getRepositoriesFilePath());
- TasksUiPlugin.getTaskListManager().resetTaskList();
- TasksUiPlugin.getTaskListManager().saveTaskList();
- // TasksUiPlugin.getDefault().getTaskListSaveManager().saveTaskList(true);
- super.tearDown();
- }
-
- /**
- * Automated task creation needs to access newly created task editors. This test tests that the access is available.
- *
- * @throws Exception
- */
- public void testAccessNewEditor() throws Exception {
- TaskRepository repository = new TaskRepository(BugzillaCorePlugin.CONNECTOR_KIND,
- IBugzillaConstants.TEST_BUGZILLA_222_URL);
-
- RepositoryTaskData model = new RepositoryTaskData(new BugzillaAttributeFactory(),
- BugzillaCorePlugin.CONNECTOR_KIND, repository.getRepositoryUrl(),
- TasksUiPlugin.getTaskDataStorageManager().getNewRepositoryTaskId());
- model.setNew(true);
- AbstractLegacyRepositoryConnector connector = (AbstractLegacyRepositoryConnector) TasksUiPlugin.getRepositoryManager()
- .getRepositoryConnector(repository.getConnectorKind());
- assertNotNull(connector);
- AbstractTaskDataHandler taskDataHandler = connector.getLegacyTaskDataHandler();
- assertNotNull(taskDataHandler);
- taskDataHandler.initializeTaskData(repository, model, null);
- NewTaskEditorInput editorInput = new NewTaskEditorInput(repository, model);
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- TasksUiUtil.openEditor(editorInput, TaskEditor.ID_EDITOR, page);
- assertTrue(page.getActiveEditor() instanceof TaskEditor);
- TaskEditor taskEditor = (TaskEditor) page.getActiveEditor();
- assertTrue(taskEditor.getActivePageInstance() instanceof AbstractRepositoryTaskEditor);
- AbstractRepositoryTaskEditor editor = (AbstractRepositoryTaskEditor) taskEditor.getActivePageInstance();
-
- String desc = DESCRIPTION;
- String summary = "summary";
- // ensure we have access without exceptions
- editor.setDescriptionText(desc);
- editor.setSummaryText(summary);
- // editor.doSave(new NullProgressMonitor());
- }
-
- public void testinitializeTaskData() throws Exception {
- TaskRepository repository = new TaskRepository(BugzillaCorePlugin.CONNECTOR_KIND,
- IBugzillaConstants.TEST_BUGZILLA_222_URL);
-
- RepositoryTaskData model = new RepositoryTaskData(new BugzillaAttributeFactory(),
- BugzillaCorePlugin.CONNECTOR_KIND, repository.getRepositoryUrl(),
- TasksUiPlugin.getTaskDataStorageManager().getNewRepositoryTaskId());
- model.setNew(true);
- AbstractLegacyRepositoryConnector connector = (AbstractLegacyRepositoryConnector) TasksUiPlugin.getRepositoryManager()
- .getRepositoryConnector(repository.getConnectorKind());
- assertNotNull(connector);
- AbstractTaskDataHandler taskDataHandler = connector.getLegacyTaskDataHandler();
- assertNotNull(taskDataHandler);
- assertFalse(taskDataHandler.initializeTaskData(repository, null, null));
- assertFalse(taskDataHandler.initializeTaskData(repository, model, null));
- model.setAttributeValue(RepositoryTaskAttribute.PRODUCT, "TestProduct");
- assertEquals("TestProduct", model.getProduct());
- assertTrue(taskDataHandler.initializeTaskData(repository, model, null));
-
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskListNotificationManagerTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskListNotificationManagerTest.java
deleted file mode 100644
index 10fa3fb34..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskListNotificationManagerTest.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.bugzilla.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaRepositoryQuery;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaTask;
-import org.eclipse.mylyn.internal.provisional.commons.ui.AbstractNotification;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.LocalTask;
-import org.eclipse.mylyn.internal.tasks.core.TaskActivityUtil;
-import org.eclipse.mylyn.internal.tasks.ui.TaskListNotificationManager;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.notifications.TaskListNotification;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.ITask.SynchronizationState;
-
-/**
- * @author Rob Elves
- */
-public class TaskListNotificationManagerTest extends TestCase {
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- public void testTaskListNotificationReminder() throws InterruptedException {
-
- AbstractTask task0 = new LocalTask("0", "t0 - test 0");
- AbstractTask task1 = new LocalTask("1", "t1 - test 1");
- AbstractTask task2 = new LocalTask("2", "t2 - test 2");
-
- task0.setScheduledForDate(TaskActivityUtil.getCurrentWeek().getToday().previous());
- task1.setScheduledForDate(TaskActivityUtil.getCurrentWeek().getToday().previous());
- task2.setScheduledForDate(TaskActivityUtil.getCurrentWeek().getToday().previous());
-
- TasksUiPlugin.getTaskList().addTask(task0);
- TasksUiPlugin.getTaskList().addTask(task1);
- TasksUiPlugin.getTaskList().addTask(task2);
-
- TaskListNotificationManager notificationManager = TasksUiPlugin.getTaskListNotificationManager();
- notificationManager.collectNotifications();
-
- task0 = TasksUiPlugin.getTaskList().getTask("local-0");
- assertNotNull(task0);
- assertTrue(task0.isReminded());
- task1 = TasksUiPlugin.getTaskList().getTask("local-1");
- assertNotNull(task1);
- assertTrue(task1.isReminded());
- task2 = TasksUiPlugin.getTaskList().getTask("local-2");
- assertNotNull(task2);
- assertTrue(task2.isReminded());
-
- }
-
- public void testTaskListNotificationIncoming() {
-
- TaskRepository repository = new TaskRepository("bugzilla", "https://bugs.eclipse.org/bugs");
- TasksUiPlugin.getRepositoryManager().addRepository(repository);
- AbstractTask task = new BugzillaTask("https://bugs.eclipse.org/bugs", "142891", "label");
- assertEquals(SynchronizationState.SYNCHRONIZED, task.getSynchronizationState());
- assertFalse(task.isNotified());
- TasksUiPlugin.getTaskList().addTask(task);
- TaskListNotificationManager notificationManager = TasksUiPlugin.getTaskListNotificationManager();
- notificationManager.collectNotifications();
- TaskListNotification notification = new TaskListNotification(task);
- notification.setDescription("Unread task");
- assertTrue(notificationManager.getNotifications().contains(notification));
- task = TasksUiPlugin.getTaskList().getTask("https://bugs.eclipse.org/bugs-142891");
- assertNotNull(task);
- assertTrue(task.isNotified());
- }
-
- public void testTaskListNotificationQueryIncoming() {
- BugzillaTask hit = new BugzillaTask("https://bugs.eclipse.org/bugs", "1", "summary");
- assertFalse(hit.isNotified());
- BugzillaRepositoryQuery query = new BugzillaRepositoryQuery("https://bugs.eclipse.org/bugs", "queryUrl",
- "summary");
- TasksUiPlugin.getTaskList().addQuery(query);
- TasksUiPlugin.getTaskList().addTask(hit, query);
-
- TaskListNotificationManager notificationManager = TasksUiPlugin.getTaskListNotificationManager();
- assertFalse(hit.isNotified());
- notificationManager.collectNotifications();
- for (AbstractNotification notification : notificationManager.getNotifications()) {
- notification.getLabel().equals(hit.getSummary());
- }
- //assertTrue(notificationManager.getNotifications().contains(new TaskListNotificationQueryIncoming(hit)));
- assertTrue(hit.isNotified());
- }
-
- public void testTaskListNotificationQueryIncomingRepeats() {
- TasksUiPlugin.getTaskListManager().resetTaskList();
- BugzillaTask hit = new BugzillaTask("https://bugs.eclipse.org/bugs", "1", "summary");
- String hitHandle = hit.getHandleIdentifier();
- assertFalse(hit.isNotified());
- BugzillaRepositoryQuery query = new BugzillaRepositoryQuery("https://bugs.eclipse.org/bugs", "queryUrl",
- "summary");
- TasksUiPlugin.getTaskList().addQuery(query);
- TasksUiPlugin.getTaskList().addTask(hit, query);
- TaskListNotificationManager notificationManager = TasksUiPlugin.getTaskListNotificationManager();
- notificationManager.collectNotifications();
- for (AbstractNotification notification : notificationManager.getNotifications()) {
- notification.getLabel().equals(hit.getSummary());
- }
- //assertTrue(notificationManager.getNotifications().iterator().next().equals(new TaskListNotificationQueryIncoming(hit)));
- assertTrue(hit.isNotified());
-
- TasksUiPlugin.getTaskListManager().saveTaskList();
- TasksUiPlugin.getTaskListManager().resetTaskList();
- assertEquals(0, TasksUiPlugin.getTaskList().getQueries().size());
- assertTrue(TasksUiPlugin.getTaskListManager().readExistingOrCreateNewList());
- assertEquals(1, TasksUiPlugin.getTaskList().getQueries().size());
- BugzillaTask hitLoaded = (BugzillaTask) TasksUiPlugin.getTaskList().getTask(hitHandle);
- assertNotNull(hitLoaded);
- assertTrue(hitLoaded.isNotified());
- }
-
-}
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskListStandaloneTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskListStandaloneTest.java
deleted file mode 100644
index b9f46da26..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskListStandaloneTest.java
+++ /dev/null
@@ -1,217 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.bugzilla.tests;
-
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Collection;
-import java.util.Date;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaRepositoryQuery;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaTask;
-import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants;
-import org.eclipse.mylyn.internal.bugzilla.ui.tasklist.BugzillaTaskListFactory;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.DateRange;
-import org.eclipse.mylyn.internal.tasks.core.LocalTask;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractTaskListFactory;
-import org.eclipse.mylyn.internal.tasks.ui.TaskListManager;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.ITask;
-
-/**
- * @author Mik Kersten
- * @author Rob Elves
- */
-public class TaskListStandaloneTest extends TestCase {
-
- private TaskListManager manager;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- TasksUiPlugin.getRepositoryManager().clearRepositories(TasksUiPlugin.getDefault().getRepositoriesFilePath());
- manager = TasksUiPlugin.getTaskListManager();
-
- manager.resetTaskList();
- assertEquals("should be empty: " + manager.getTaskList().getDefaultCategory().getChildren(), 0,
- manager.getTaskList().getDefaultCategory().getChildren().size());
- }
-
- @Override
- protected void tearDown() throws Exception {
- manager.resetTaskList();
- manager.saveTaskList();
- super.tearDown();
- }
-
- public void testDueDateExternalization() {
- AbstractTask task = new LocalTask("1", "task 1");
- Date dueDate = new Date();
- task.setDueDate(dueDate);
- manager.getTaskList().addTask(task);
- assertEquals(1, manager.getTaskList().getAllTasks().size());
-
- manager.saveTaskList();
- manager.resetTaskList();
- manager.readExistingOrCreateNewList();
- assertEquals(1, manager.getTaskList().getAllTasks().size());
- Collection<ITask> readList = manager.getTaskList().getDefaultCategory().getChildren();
- ITask readTask = readList.iterator().next();
- assertTrue(readTask.getSummary().equals("task 1"));
- assertTrue(readTask.getDueDate().compareTo(dueDate) == 0);
- }
-
- public void testPastReminder() throws InterruptedException {
- AbstractTask task = new LocalTask("1", "1");
-
- task.setScheduledForDate(new DateRange(Calendar.getInstance()));
- Thread.sleep(2000);
- assertTrue(task.isPastReminder());
-
- Calendar cal = Calendar.getInstance();
- cal.add(Calendar.MINUTE, 2);
- task.setScheduledForDate(new DateRange(cal));
- assertFalse(task.isPastReminder());
-
- Calendar cal1 = Calendar.getInstance();
- cal1.add(Calendar.MINUTE, -2);
- task.setScheduledForDate(new DateRange(cal1, cal));
- assertFalse(task.isPastReminder());
-
- Calendar cal2 = Calendar.getInstance();
- cal2.add(Calendar.MINUTE, -2);
- task.setScheduledForDate(new DateRange(cal2));
- task.setCompletionDate(new Date());
- assertFalse(task.isPastReminder());
- }
-
- public void testDates() {
- Date start = Calendar.getInstance().getTime();
- Date creation = new Date();
- AbstractTask task = new LocalTask("1", "task 1");
-
- manager.getTaskList().addTask(task);
- assertDatesCloseEnough(task.getCreationDate(), start);
-
- task.setCompleted(true);
- assertDatesCloseEnough(task.getCompletionDate(), start);
-
- assertEquals(1, manager.getTaskList().getRootElements().size());
- manager.saveTaskList();
-
- assertNotNull(manager.getTaskList());
- // TaskList list = new TaskList();
- // manager.setTaskList(list);
- // assertEquals(0, manager.getTaskList().getRootTasks().size());
- // manager.readOrCreateTaskList();
- // assertNotNull(manager.getTaskList());
- assertEquals(1, manager.getTaskList().getDefaultCategory().getChildren().size());
-
- Collection<ITask> readList = manager.getTaskList().getDefaultCategory().getChildren();
- AbstractTask readTask = (AbstractTask) readList.iterator().next();
- assertTrue(readTask.getSummary().equals("task 1"));
-
- assertEquals("should be: " + creation, task.getCreationDate(), readTask.getCreationDate());
- assertEquals(task.getCompletionDate(), readTask.getCompletionDate());
- assertEquals(task.getScheduledForDate(), readTask.getScheduledForDate());
- }
-
- // Task retention when connector missing upon startup
- public void testOrphanedTasks() {
- List<AbstractTaskListFactory> originalExternalizers = manager.getTaskListWriter().getExternalizers();
- List<AbstractTaskListFactory> externalizers;
- externalizers = new ArrayList<AbstractTaskListFactory>();
- externalizers.add(new BugzillaTaskListFactory());
- // make some tasks
- // save them
- BugzillaTask task = new BugzillaTask("http://bugs", "1", "1");
- manager.getTaskList().addTask(task);
- manager.saveTaskList();
-
- // reload tasklist and check that they persist
- manager.resetTaskList();
- manager.readExistingOrCreateNewList();
- assertEquals(1, manager.getTaskList().getAllTasks().size());
-
- // removed/disable externalizers
- externalizers.clear();
- manager.getTaskListWriter().setDelegateExternalizers(externalizers);
-
- // reload tasklist ensure task didn't load
- manager.resetTaskList();
- manager.readExistingOrCreateNewList();
- assertEquals(0, manager.getTaskList().getAllTasks().size());
- // Save the task list (tasks with missing connectors should get
- // persisted)
- manager.saveTaskList();
-
- // re-enable connector
- externalizers.add(new BugzillaTaskListFactory());
- manager.getTaskListWriter().setDelegateExternalizers(externalizers);
-
- // re-load tasklist
- manager.resetTaskList();
- manager.readExistingOrCreateNewList();
-
- // ensure that task now gets loaded
- assertEquals(1, manager.getTaskList().getAllTasks().size());
- manager.getTaskListWriter().setDelegateExternalizers(originalExternalizers);
- }
-
- // Query retention when connector missing/fails to load
- public void testOrphanedQueries() {
- List<AbstractTaskListFactory> originalExternalizers = manager.getTaskListWriter().getExternalizers();
- List<AbstractTaskListFactory> externalizers;
- externalizers = new ArrayList<AbstractTaskListFactory>();
- externalizers.add(new BugzillaTaskListFactory());
- // make a query
- BugzillaRepositoryQuery query = new BugzillaRepositoryQuery(IBugzillaConstants.TEST_BUGZILLA_222_URL,
- "http://queryurl", "summary");
-
- manager.getTaskList().addQuery(query);
- manager.saveTaskList();
-
- // reload tasklist and check that they persist
- manager.resetTaskList();
- manager.readExistingOrCreateNewList();
- assertEquals(1, manager.getTaskList().getQueries().size());
-
- // removed/disable externalizers
- externalizers.clear();
- manager.getTaskListWriter().setDelegateExternalizers(externalizers);
-
- // reload tasklist ensure query didn't load
- manager.resetTaskList();
- manager.readExistingOrCreateNewList();
- assertEquals(0, manager.getTaskList().getQueries().size());
- // Save the task list (queries with missing connectors should get
- // persisted)
- manager.saveTaskList();
-
- // re-enable connector
- externalizers.add(new BugzillaTaskListFactory());
- manager.getTaskListWriter().setDelegateExternalizers(externalizers);
-
- // re-load tasklist
- manager.resetTaskList();
- manager.readExistingOrCreateNewList();
-
- // ensure that task now gets loaded
- assertEquals(1, manager.getTaskList().getQueries().size());
- manager.getTaskListWriter().setDelegateExternalizers(originalExternalizers);
- }
-
- public void assertDatesCloseEnough(Date first, Date second) {
- assertTrue(second.getTime() - first.getTime() < 100);
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/headless/BugzillaQueryTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/headless/BugzillaQueryTest.java
deleted file mode 100644
index 4592d0f3d..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/headless/BugzillaQueryTest.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.bugzilla.tests.headless;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.context.tests.support.TestUtil;
-import org.eclipse.mylyn.context.tests.support.TestUtil.Credentials;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaLanguageSettings;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaRepositoryConnector;
-import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.data.AbstractTaskDataHandler;
-
-// import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * Example use of headless API (no ui dependencies)
- *
- * @author Rob Elves
- * @author Nathan Hapke
- */
-public class BugzillaQueryTest extends TestCase {
-
- private TaskRepository repository;
-
- private AbstractRepositoryConnector connectorOriginal;
-
- private BugzillaRepositoryConnector connector;
-
- private AbstractTaskDataHandler handler;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
-
- connectorOriginal = TasksUiPlugin.getRepositoryManager().getRepositoryConnector(
- BugzillaCorePlugin.CONNECTOR_KIND);
-
- BugzillaLanguageSettings language = BugzillaCorePlugin.getDefault().getLanguageSetting(
- IBugzillaConstants.DEFAULT_LANG);
-
- connector = new BugzillaRepositoryConnector();
- connector.addLanguageSetting(language);
- handler = connector.getTaskDataHandler();
- repository = new TaskRepository(BugzillaCorePlugin.CONNECTOR_KIND, IBugzillaConstants.TEST_BUGZILLA_222_URL);
- Credentials credentials = TestUtil.readCredentials();
- repository.setAuthenticationCredentials(credentials.username, credentials.password);
- }
-
- @Override
- protected void tearDown() throws Exception {
-
- }
-
- /**
- * This is the first test so that the repository credentials are correctly set for the other tests
- */
- public void testAddCredentials() {
- if (!repository.hasCredentials()) {
- Credentials credentials = TestUtil.readCredentials();
- repository.setAuthenticationCredentials(credentials.username, credentials.password);
-
- assertTrue(repository.hasCredentials());
- }
- }
-
- // XXX: refactor 3.0
-// public void testGetBug() throws Exception {
-// TaskData taskData = handler.getTaskData(repository, "1", new NullProgressMonitor());
-// assertNotNull(taskData);
-// assertEquals("user@mylar.eclipse.org", taskData.getAssignedTo());
-// assertEquals("foo", taskData.getDescription());
-//
-// // You can use the getAttributeValue to pull up the information on any
-// // part of the bug
-// assertEquals("P1", taskData.getAttributeValue(BugzillaReportElement.PRIORITY.getKey()));
-// }
-//
-
- // TODO: Uncomment when bug#176513 completed
-// public void testGetBugs() throws Exception {
-// HashSet<String> taskIds = new HashSet<String>();
-// taskIds.add("1");
-// taskIds.add("2");
-// taskIds.add("4");
-// Map<String, RepositoryTaskData> taskDataMap = handler.getTaskData(repository, taskIds);
-// assertNotNull(taskDataMap);
-// RepositoryTaskData taskData = taskDataMap.get("1");
-// assertEquals("user@mylar.eclipse.org", taskData.getAssignedTo());
-// assertEquals("foo", taskData.getDescription());
-// // You can use the getAttributeValue to pull up the information on any
-// // part of the bug
-// assertEquals("P1", taskData.getAttributeValue(BugzillaReportElement.PRIORITY.getKeyString()));
-//
-// taskData = taskDataMap.get("2");
-// assertEquals("nhapke@cs.ubc.ca", taskData.getAssignedTo());
-// assertEquals("search-match-test 1", taskData.getDescription());
-//
-// taskData = taskDataMap.get("4");
-// assertEquals("relves@cs.ubc.ca", taskData.getReporter());
-// assertEquals("Test", taskData.getDescription());
-// }
-
- // README
- // public void testPostBug() throws Exception {
- // RepositoryTaskData taskData = handler.getTaskData(repository, "1");
- // assertNotNull(taskData);
- // assertEquals("user@mylar.eclipse.org", taskData.getAssignedTo());
- // assertEquals("foo", taskData.getDescription());
- // taskData.setSummary("New Summary");
- // // post this modification back to the repository
- // handler.postTaskData(repository, taskData);
- //
- // // You can use the getAttributeValue to pull up the information on any
- // // part of the bug
- // // assertEquals("P1",
- // //
- // taskData.getAttributeValue(BugzillaReportElement.PRIORITY.getKeyString()));
- // }
-
- // XXX: refactpr
-// @SuppressWarnings("deprecation")
-// public void testQueryViaConnector() throws Exception {
-// String queryUrlString = repository.getRepositoryUrl()
-// + "/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=search-match-test&product=TestProduct&long_desc_type=substring&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&deadlinefrom=&deadlineto=&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=noop&type0-0-0=noop&value0-0-0=";
-//
-// // holds onto actual hit objects
-// ITaskList taskList = new TaskList();
-// QueryHitCollector collector = new QueryHitCollector(new TaskFactory(repository));
-// BugzillaRepositoryConnector connector = new BugzillaRepositoryConnector();
-// connector.init(taskList);
-// BugzillaRepositoryQuery query = new BugzillaRepositoryQuery(repository.getRepositoryUrl(), queryUrlString,
-// "summary");
-// connector.performQuery(repository, query, collector, null, new NullProgressMonitor());
-// assertEquals(2, collector.getTasks().size());
-// for (ITask hit : collector.getTasks()) {
-// assertTrue(hit.getSummary().contains("search-match-test"));
-// }
-// }
-}
-
-// public void testValidateCredentials() throws IOException,
-// BugzillaException, KeyManagementException,
-// GeneralSecurityException {
-// BugzillaClient.validateCredentials(null, repository.getUrl(),
-// repository.getCharacterEncoding(),
-// repository.getUserName(), repository.getPassword());
-// }
-//
-// public void testValidateCredentialsInvalidProxy() throws IOException,
-// BugzillaException, KeyManagementException,
-// GeneralSecurityException {
-// BugzillaClient.validateCredentials(new Proxy(Proxy.Type.HTTP, new
-// InetSocketAddress("localhost", 12356)),
-// repository.getUrl(), repository.getCharacterEncoding(),
-// repository.getUserName(), repository
-// .getPassword());
-// }
-
-// public void testCredentialsEncoding() throws IOException,
-// BugzillaException, KeyManagementException,
-// GeneralSecurityException {
-// String poundSignUTF8 =
-// BugzillaClient.addCredentials(IBugzillaConstants.TEST_BUGZILLA_222_URL,
-// "UTF-8",
-// "testUser", "\u00A3");
-// assertTrue(poundSignUTF8.endsWith("password=%C2%A3"));
-// String poundSignISO =
-// BugzillaClient.addCredentials(IBugzillaConstants.TEST_BUGZILLA_222_URL,
-// "ISO-8859-1", "testUser", "\u00A3");
-// assertFalse(poundSignISO.contains("%C2%A3"));
-// assertTrue(poundSignISO.endsWith("password=%A3"));
-// }
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/headless/BugzillaTaskHistoryTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/headless/BugzillaTaskHistoryTest.java
deleted file mode 100644
index a430bac0a..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/headless/BugzillaTaskHistoryTest.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.bugzilla.tests.headless;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-
-import org.eclipse.mylyn.bugzilla.tests.AbstractBugzillaTest;
-import org.eclipse.mylyn.context.tests.support.TestUtil;
-import org.eclipse.mylyn.context.tests.support.TestUtil.Credentials;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaClient;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaRepositoryConnector;
-import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants;
-import org.eclipse.mylyn.internal.bugzilla.core.history.AssignmentEvent;
-import org.eclipse.mylyn.internal.bugzilla.core.history.ResolutionEvent;
-import org.eclipse.mylyn.internal.bugzilla.core.history.StatusEvent;
-import org.eclipse.mylyn.internal.bugzilla.core.history.TaskHistory;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-public class BugzillaTaskHistoryTest extends AbstractBugzillaTest {
-
- private TaskRepository repository;
-
- private BugzillaRepositoryConnector connector;
-
- private static final String HISTORY_FILE_NAME = "storedHistory.history";
-
- private static final String REPORT_ID = "1";
-
- @Override
- public void setUp() throws Exception {
- super.setUp();
- connector = new BugzillaRepositoryConnector();
- repository = new TaskRepository(BugzillaCorePlugin.CONNECTOR_KIND, IBugzillaConstants.TEST_BUGZILLA_222_URL);
-
- Credentials credentials = TestUtil.readCredentials();
- repository.setAuthenticationCredentials(credentials.username, credentials.password);
- }
-
- public void testGetBugHistory() throws Exception {
-
- BugzillaClient client = connector.getClientManager().getClient(repository, null);
- assertNotNull(client);
- TaskHistory history = client.getHistory("1", null);
- assertNotNull(history);
-
- assertEquals(1, history.getAssignmentEvents().size());
- assertEquals(2, history.getStatusEvents().size());
- assertEquals(1, history.getResolutionEvents().size());
- assertEquals(12, history.getOtherEvents().size());
- }
-
- public void testAssignmentEvent() throws Exception {
- BugzillaClient client = connector.getClientManager().getClient(repository, null);
- assertNotNull(client);
- TaskHistory history = client.getHistory("1", null);
- assertNotNull(history);
-
- AssignmentEvent assignment = history.getAssignmentEvents().get(0);
- assertEquals("nhapke@cs.ubc.ca", assignment.getName());
- assertEquals("user@mylar.eclipse.org", assignment.getAssigned());
- assertEquals("2006-08-25 17:48:02", assignment.getDate());
- assertEquals("nhapke@cs.ubc.ca", assignment.getRemoved());
- assertEquals("user@mylar.eclipse.org", assignment.getAdded());
- assertEquals("AssignedTo", assignment.getWhat());
- }
-
- public void testStatusEvent() throws Exception {
-
- BugzillaClient client = connector.getClientManager().getClient(repository, null);
- assertNotNull(client);
- TaskHistory history = client.getHistory("1", null);
- assertNotNull(history);
-
- StatusEvent statusChange = history.getStatusEvents().get(0);
- assertEquals("nhapke@cs.ubc.ca", statusChange.getName());
- assertEquals("2006-08-25 19:18:05", statusChange.getDate());
- assertEquals("NEW", statusChange.getRemoved());
- assertEquals("ASSIGNED", statusChange.getAdded());
- assertEquals("Status", statusChange.getWhat());
- }
-
- public void testResolutionEvent() throws Exception {
- BugzillaClient client = connector.getClientManager().getClient(repository, null);
- assertNotNull(client);
- TaskHistory history = client.getHistory(REPORT_ID, null);
- assertNotNull(history);
-
- ResolutionEvent resolutionChange = history.getResolutionEvents().get(0);
- assertEquals("janvik@cs.ubc.ca", resolutionChange.getName());
- assertEquals("2007-02-15 14:52:51", resolutionChange.getDate());
- assertEquals("", resolutionChange.getRemoved());
- assertEquals("FIXED", resolutionChange.getAdded());
- assertEquals("Resolution", resolutionChange.getWhat());
- }
-
- public void testStoredHistory() throws Exception {
- BugzillaClient client = connector.getClientManager().getClient(repository, null);
- assertNotNull(client);
- TaskHistory history = client.getHistory(REPORT_ID, null);
- assertNotNull(history);
- storeHistory(history);
-
- history = getStoredHistory();
-
- assertEquals(1, history.getAssignmentEvents().size());
- assertEquals(2, history.getStatusEvents().size());
- assertEquals(1, history.getResolutionEvents().size());
- assertEquals(12, history.getOtherEvents().size());
-
- // Remove file
- File storedHistoryFile = new File(HISTORY_FILE_NAME);
- assertTrue(storedHistoryFile.delete());
- }
-
- private void storeHistory(TaskHistory history) {
- File saveFile = new File(HISTORY_FILE_NAME);
- saveFile.deleteOnExit();
- try {
- ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(saveFile));
- out.writeObject(history);
- out.close();
- } catch (FileNotFoundException e) {
- System.err.println("Can't write to: " + saveFile);
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
-
- private TaskHistory getStoredHistory() {
- File file = new File(HISTORY_FILE_NAME);
- try {
- ObjectInputStream in = new ObjectInputStream(new FileInputStream(file));
- TaskHistory history = (TaskHistory) in.readObject();
- in.close();
- return history;
- } catch (FileNotFoundException e) {
- System.err.println("Can't find: " + file);
- } catch (IOException e) {
- e.printStackTrace();
- } catch (ClassNotFoundException e) {
- e.printStackTrace();
- }
-
- // Should never happen
- return null;
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.tests/testdata/configuration/rdfconfig218.txt b/org.eclipse.mylyn.bugzilla.tests/testdata/configuration/rdfconfig218.txt
deleted file mode 100644
index bf41e9a70..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/testdata/configuration/rdfconfig218.txt
+++ /dev/null
@@ -1,461 +0,0 @@
-<?xml version="1.0"?>
-<!-- Note: this interface is experimental and under development.
- - We may and probably will make breaking changes to it in the future. -->
-
-<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:bz="http://www.bugzilla.org/rdf#">
-
-<bz:installation rdf:about="">
-<!-- NOTE: rdf:about="http://mylar.eclipse.org/bugs218/"
- changed to "" for testing -->
- <bz:install_version>2.18.5</bz:install_version>
- <bz:maintainer>relves&#64;cs.ubc.ca</bz:maintainer>
-
- <bz:status>
- <Seq>
- <li>UNCONFIRMED</li>
- <li>NEW</li>
- <li>ASSIGNED</li>
- <li>REOPENED</li>
- <li>RESOLVED</li>
- <li>VERIFIED</li>
- <li>CLOSED</li>
- </Seq>
- </bz:status>
-
- <bz:status_open>
- <Seq>
- <li>UNCONFIRMED</li>
- <li>NEW</li>
- <li>ASSIGNED</li>
- <li>REOPENED</li>
- </Seq>
- </bz:status_open>
-
- <bz:status_closed>
- <Seq>
- <li>RESOLVED</li>
- <li>VERIFIED</li>
- <li>CLOSED</li>
- </Seq>
- </bz:status_closed>
-
- <bz:resolution>
- <Seq>
- <li></li>
- <li>FIXED</li>
- <li>INVALID</li>
- <li>WONTFIX</li>
- <li>LATER</li>
- <li>REMIND</li>
- <li>DUPLICATE</li>
- <li>WORKSFORME</li>
- <li>MOVED</li>
- </Seq>
- </bz:resolution>
-
- <bz:keyword>
- <Seq>
- </Seq>
- </bz:keyword>
-
- <bz:platform>
- <Seq>
- <li>All</li>
- <li>DEC</li>
- <li>HP</li>
- <li>Macintosh</li>
- <li>PC</li>
- <li>SGI</li>
- <li>Sun</li>
- <li>Other</li>
- </Seq>
- </bz:platform>
-
- <bz:op_sys>
- <Seq>
- <li>All</li>
- <li>Windows 3.1</li>
- <li>Windows 95</li>
- <li>Windows 98</li>
- <li>Windows ME</li>
- <li>Windows 2000</li>
- <li>Windows NT</li>
- <li>Windows XP</li>
- <li>Windows Server 2003</li>
- <li>Mac System 7</li>
- <li>Mac System 7.5</li>
- <li>Mac System 7.6.1</li>
- <li>Mac System 8.0</li>
- <li>Mac System 8.5</li>
- <li>Mac System 8.6</li>
- <li>Mac System 9.x</li>
- <li>Mac OS X 10.0</li>
- <li>Mac OS X 10.1</li>
- <li>Mac OS X 10.2</li>
- <li>Mac OS X 10.3</li>
- <li>Linux</li>
- <li>BSD/OS</li>
- <li>FreeBSD</li>
- <li>NetBSD</li>
- <li>OpenBSD</li>
- <li>AIX</li>
- <li>BeOS</li>
- <li>HP-UX</li>
- <li>IRIX</li>
- <li>Neutrino</li>
- <li>OpenVMS</li>
- <li>OS/2</li>
- <li>OSF/1</li>
- <li>Solaris</li>
- <li>SunOS</li>
- <li>other</li>
- </Seq>
- </bz:op_sys>
-
- <bz:priority>
- <Seq>
- <li>P1</li>
- <li>P2</li>
- <li>P3</li>
- <li>P4</li>
- <li>P5</li>
- </Seq>
- </bz:priority>
-
- <bz:severity>
- <Seq>
- <li>blocker</li>
- <li>critical</li>
- <li>major</li>
- <li>normal</li>
- <li>minor</li>
- <li>trivial</li>
- <li>enhancement</li>
- </Seq>
- </bz:severity>
-
- <bz:products>
- <Seq>
- <li>
- <bz:product rdf:about="http://mylar.eclipse.org/bugs218/product.cgi?name=TestProduct">
- <bz:name>TestProduct</bz:name>
-
- <bz:components>
- <Seq>
- <li resource="http://mylar.eclipse.org/bugs218/component.cgi?name=TestComponent"/>
- </Seq>
- </bz:components>
-
- <bz:versions>
- <Seq>
- <li resource="http://mylar.eclipse.org/bugs218/version.cgi?name=other"/>
- </Seq>
- </bz:versions>
-
-
- </bz:product>
- </li>
- <li>
- <bz:product rdf:about="http://mylar.eclipse.org/bugs218/product.cgi?name=Test-Long-Named-Product-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA">
- <bz:name>Test-Long-Named-Product-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA</bz:name>
-
- <bz:components>
- <Seq>
- <li resource="http://mylar.eclipse.org/bugs218/component.cgi?name=TestComponent"/>
- </Seq>
- </bz:components>
-
- <bz:versions>
- <Seq>
- <li resource="http://mylar.eclipse.org/bugs218/version.cgi?name=other"/>
- </Seq>
- </bz:versions>
-
-
- </bz:product>
- </li>
- </Seq>
- </bz:products>
-
- <bz:components>
- <Seq>
- <li>
- <bz:component rdf:about="http://mylar.eclipse.org/bugs218/component.cgi?name=TestComponent">
- <bz:name>TestComponent</bz:name>
- </bz:component>
- </li>
- </Seq>
- </bz:components>
-
- <bz:versions>
- <Seq>
- <li>
- <bz:version rdf:about="http://mylar.eclipse.org/bugs218/version.cgi?name=other">
- <bz:name>other</bz:name>
- </bz:version>
- </li>
- </Seq>
- </bz:versions>
-
-
- <bz:fields>
- <Seq>
- <li>
- <bz:field rdf:about="http://mylar.eclipse.org/bugs218/field.cgi?name=bug_id">
- <bz:name>bug_id</bz:name>
- <bz:description>Bug ID</bz:description>
- </bz:field>
- </li>
- <li>
- <bz:field rdf:about="http://mylar.eclipse.org/bugs218/field.cgi?name=short_desc">
- <bz:name>short_desc</bz:name>
- <bz:description>Summary</bz:description>
- </bz:field>
- </li>
- <li>
- <bz:field rdf:about="http://mylar.eclipse.org/bugs218/field.cgi?name=product">
- <bz:name>product</bz:name>
- <bz:description>Product</bz:description>
- </bz:field>
- </li>
- <li>
- <bz:field rdf:about="http://mylar.eclipse.org/bugs218/field.cgi?name=version">
- <bz:name>version</bz:name>
- <bz:description>Version</bz:description>
- </bz:field>
- </li>
- <li>
- <bz:field rdf:about="http://mylar.eclipse.org/bugs218/field.cgi?name=rep_platform">
- <bz:name>rep_platform</bz:name>
- <bz:description>Hardware</bz:description>
- </bz:field>
- </li>
- <li>
- <bz:field rdf:about="http://mylar.eclipse.org/bugs218/field.cgi?name=bug_file_loc">
- <bz:name>bug_file_loc</bz:name>
- <bz:description>URL</bz:description>
- </bz:field>
- </li>
- <li>
- <bz:field rdf:about="http://mylar.eclipse.org/bugs218/field.cgi?name=op_sys">
- <bz:name>op_sys</bz:name>
- <bz:description>OS</bz:description>
- </bz:field>
- </li>
- <li>
- <bz:field rdf:about="http://mylar.eclipse.org/bugs218/field.cgi?name=bug_status">
- <bz:name>bug_status</bz:name>
- <bz:description>Status</bz:description>
- </bz:field>
- </li>
- <li>
- <bz:field rdf:about="http://mylar.eclipse.org/bugs218/field.cgi?name=status_whiteboard">
- <bz:name>status_whiteboard</bz:name>
- <bz:description>Whiteboard</bz:description>
- </bz:field>
- </li>
- <li>
- <bz:field rdf:about="http://mylar.eclipse.org/bugs218/field.cgi?name=keywords">
- <bz:name>keywords</bz:name>
- <bz:description>Keywords</bz:description>
- </bz:field>
- </li>
- <li>
- <bz:field rdf:about="http://mylar.eclipse.org/bugs218/field.cgi?name=resolution">
- <bz:name>resolution</bz:name>
- <bz:description>Resolution</bz:description>
- </bz:field>
- </li>
- <li>
- <bz:field rdf:about="http://mylar.eclipse.org/bugs218/field.cgi?name=bug_severity">
- <bz:name>bug_severity</bz:name>
- <bz:description>Severity</bz:description>
- </bz:field>
- </li>
- <li>
- <bz:field rdf:about="http://mylar.eclipse.org/bugs218/field.cgi?name=priority">
- <bz:name>priority</bz:name>
- <bz:description>Priority</bz:description>
- </bz:field>
- </li>
- <li>
- <bz:field rdf:about="http://mylar.eclipse.org/bugs218/field.cgi?name=component">
- <bz:name>component</bz:name>
- <bz:description>Component</bz:description>
- </bz:field>
- </li>
- <li>
- <bz:field rdf:about="http://mylar.eclipse.org/bugs218/field.cgi?name=assigned_to">
- <bz:name>assigned_to</bz:name>
- <bz:description>Assignee</bz:description>
- </bz:field>
- </li>
- <li>
- <bz:field rdf:about="http://mylar.eclipse.org/bugs218/field.cgi?name=reporter">
- <bz:name>reporter</bz:name>
- <bz:description>Reporter</bz:description>
- </bz:field>
- </li>
- <li>
- <bz:field rdf:about="http://mylar.eclipse.org/bugs218/field.cgi?name=votes">
- <bz:name>votes</bz:name>
- <bz:description>Votes</bz:description>
- </bz:field>
- </li>
- <li>
- <bz:field rdf:about="http://mylar.eclipse.org/bugs218/field.cgi?name=qa_contact">
- <bz:name>qa_contact</bz:name>
- <bz:description>QA Contact</bz:description>
- </bz:field>
- </li>
- <li>
- <bz:field rdf:about="http://mylar.eclipse.org/bugs218/field.cgi?name=cc">
- <bz:name>cc</bz:name>
- <bz:description>CC</bz:description>
- </bz:field>
- </li>
- <li>
- <bz:field rdf:about="http://mylar.eclipse.org/bugs218/field.cgi?name=dependson">
- <bz:name>dependson</bz:name>
- <bz:description>Depends on</bz:description>
- </bz:field>
- </li>
- <li>
- <bz:field rdf:about="http://mylar.eclipse.org/bugs218/field.cgi?name=blocked">
- <bz:name>blocked</bz:name>
- <bz:description>Blocks</bz:description>
- </bz:field>
- </li>
- <li>
- <bz:field rdf:about="http://mylar.eclipse.org/bugs218/field.cgi?name=attachments.description">
- <bz:name>attachments.description</bz:name>
- <bz:description>Attachment description</bz:description>
- </bz:field>
- </li>
- <li>
- <bz:field rdf:about="http://mylar.eclipse.org/bugs218/field.cgi?name=attachments.thedata">
- <bz:name>attachments.thedata</bz:name>
- <bz:description>Attachment data</bz:description>
- </bz:field>
- </li>
- <li>
- <bz:field rdf:about="http://mylar.eclipse.org/bugs218/field.cgi?name=attachments.filename">
- <bz:name>attachments.filename</bz:name>
- <bz:description>Attachment filename</bz:description>
- </bz:field>
- </li>
- <li>
- <bz:field rdf:about="http://mylar.eclipse.org/bugs218/field.cgi?name=attachments.mimetype">
- <bz:name>attachments.mimetype</bz:name>
- <bz:description>Attachment mime type</bz:description>
- </bz:field>
- </li>
- <li>
- <bz:field rdf:about="http://mylar.eclipse.org/bugs218/field.cgi?name=attachments.ispatch">
- <bz:name>attachments.ispatch</bz:name>
- <bz:description>Attachment is patch</bz:description>
- </bz:field>
- </li>
- <li>
- <bz:field rdf:about="http://mylar.eclipse.org/bugs218/field.cgi?name=attachments.isobsolete">
- <bz:name>attachments.isobsolete</bz:name>
- <bz:description>Attachment is obsolete</bz:description>
- </bz:field>
- </li>
- <li>
- <bz:field rdf:about="http://mylar.eclipse.org/bugs218/field.cgi?name=attachments.isprivate">
- <bz:name>attachments.isprivate</bz:name>
- <bz:description>Attachment is private</bz:description>
- </bz:field>
- </li>
- <li>
- <bz:field rdf:about="http://mylar.eclipse.org/bugs218/field.cgi?name=target_milestone">
- <bz:name>target_milestone</bz:name>
- <bz:description>Target Milestone</bz:description>
- </bz:field>
- </li>
- <li>
- <bz:field rdf:about="http://mylar.eclipse.org/bugs218/field.cgi?name=delta_ts">
- <bz:name>delta_ts</bz:name>
- <bz:description>Last Changed time</bz:description>
- </bz:field>
- </li>
- <li>
- <bz:field rdf:about="http://mylar.eclipse.org/bugs218/field.cgi?name=(to_days(now())%20-%20to_days(bugs.delta_ts))">
- <bz:name>(to_days(now()) - to_days(bugs.delta_ts))</bz:name>
- <bz:description>Days since bug changed</bz:description>
- </bz:field>
- </li>
- <li>
- <bz:field rdf:about="http://mylar.eclipse.org/bugs218/field.cgi?name=longdesc">
- <bz:name>longdesc</bz:name>
- <bz:description>Comment</bz:description>
- </bz:field>
- </li>
- <li>
- <bz:field rdf:about="http://mylar.eclipse.org/bugs218/field.cgi?name=alias">
- <bz:name>alias</bz:name>
- <bz:description>Alias</bz:description>
- </bz:field>
- </li>
- <li>
- <bz:field rdf:about="http://mylar.eclipse.org/bugs218/field.cgi?name=everconfirmed">
- <bz:name>everconfirmed</bz:name>
- <bz:description>Ever confirmed?</bz:description>
- </bz:field>
- </li>
- <li>
- <bz:field rdf:about="http://mylar.eclipse.org/bugs218/field.cgi?name=reporter_accessible">
- <bz:name>reporter_accessible</bz:name>
- <bz:description>Reporter accessible?</bz:description>
- </bz:field>
- </li>
- <li>
- <bz:field rdf:about="http://mylar.eclipse.org/bugs218/field.cgi?name=cclist_accessible">
- <bz:name>cclist_accessible</bz:name>
- <bz:description>CC list accessible?</bz:description>
- </bz:field>
- </li>
- <li>
- <bz:field rdf:about="http://mylar.eclipse.org/bugs218/field.cgi?name=bug_group">
- <bz:name>bug_group</bz:name>
- <bz:description>Group</bz:description>
- </bz:field>
- </li>
- <li>
- <bz:field rdf:about="http://mylar.eclipse.org/bugs218/field.cgi?name=flagtypes.name">
- <bz:name>flagtypes.name</bz:name>
- <bz:description>Flag</bz:description>
- </bz:field>
- </li>
- <li>
- <bz:field rdf:about="http://mylar.eclipse.org/bugs218/field.cgi?name=requestees.login_name">
- <bz:name>requestees.login_name</bz:name>
- <bz:description>Flag Requestee</bz:description>
- </bz:field>
- </li>
- <li>
- <bz:field rdf:about="http://mylar.eclipse.org/bugs218/field.cgi?name=setters.login_name">
- <bz:name>setters.login_name</bz:name>
- <bz:description>Flag Setter</bz:description>
- </bz:field>
- </li>
- <li>
- <bz:field rdf:about="http://mylar.eclipse.org/bugs218/field.cgi?name=content">
- <bz:name>content</bz:name>
- <bz:description>Content</bz:description>
- </bz:field>
- </li>
- <li>
- <bz:field rdf:about="http://mylar.eclipse.org/bugs218/field.cgi?name=owner_idle_time">
- <bz:name>owner_idle_time</bz:name>
- <bz:description>Time Since Owner Touched</bz:description>
- </bz:field>
- </li>
- </Seq>
- </bz:fields>
-</bz:installation>
-
-</RDF> \ No newline at end of file
diff --git a/org.eclipse.mylyn.bugzilla.tests/testdata/contexts/.cvsignore b/org.eclipse.mylyn.bugzilla.tests/testdata/contexts/.cvsignore
deleted file mode 100644
index 47269cfbd..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/testdata/contexts/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-downloadedContext.xml
diff --git a/org.eclipse.mylyn.bugzilla.tests/testdata/contexts/empty.txt b/org.eclipse.mylyn.bugzilla.tests/testdata/contexts/empty.txt
deleted file mode 100644
index e69de29bb..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/testdata/contexts/empty.txt
+++ /dev/null
diff --git a/org.eclipse.mylyn.bugzilla.tests/testdata/pages/bug-1-full.html b/org.eclipse.mylyn.bugzilla.tests/testdata/pages/bug-1-full.html
deleted file mode 100644
index 00fd1bcb7..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/testdata/pages/bug-1-full.html
+++ /dev/null
@@ -1,719 +0,0 @@
-<!-- 1.0@bugzilla.org -->
-
-<!-- 1.0@bugzilla.org -->
-
-
-
-
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
- <head>
- <title>Bug 1 - Usability issue with external editors (1GE6IRL)</title>
-
-
-
-
-
-
-
- </head>
-
-
-
- <body bgcolor="#FFFFFF" onload="">
-
-
-<!-- 1.0@bugzilla.org -->
-
-
-
-
-<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000EE" VLINK="#551A8B" ALINK="#FF0000" >
-<table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="100%" ><tr><td
-WIDTH="100%"><table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="100%"
-BGCOLOR="#006699" ><tr><td BGCOLOR="#000000" width="116" ><img
-src="images/EclipseBannerPic.jpg" width="115" height="50"></td><td
-WIDTH="637"><a href=http://www.eclipse.org><img SRC="images/gradient.jpg" BORDER=0 height=50
-width=282></a></td><td WIDTH="250"><img src="images/eproject-simple.gif"
-width="250" height="48"></td></tr></table></td></tr></table>
-
- <table border="0" cellspacing="0">
- <tr>
- <td valign="top" align="left">
- <table border="0" cellpadding="0" cellspacing="2">
- <tr>
- <td valign="top" align="left" nowrap="nowrap">
- <font size="+1"><b>Bugzilla Bug 1</b></font>
- </td>
- </tr>
- </table>
- </td>
- <td valign="middle">&nbsp;</td>
- <td valign="middle" align="left">Usability issue with external editors (1GE6IRL)</td>
- </tr>
- </table>
-<!-- 1.0@bugzilla.org -->
-
-
-
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="query.cgi">Query page</a>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="enter_bug.cgi">Enter new bug</a>
-
-<hr>
-
-<form name="changeform" method="post" action="process_bug.cgi">
-
- <input type="hidden" name="delta_ts" value="20011025104050">
- <input type="hidden" name="longdesclength" value="5">
- <input type="hidden" name="id" value="1">
-
-
-
- <table cellspacing="1" cellpadding="1" border="0">
- <tr>
- <td align="right">
- <b>Bug#:</b>
- </td>
- <td>
- <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=1">1</a>
- </td>
-
- <td>&nbsp;</td>
-
- <td align="right">
- <b>Platform:</b>
- </td><td>
- <select name="rep_platform">
- <option value="All" selected>All
- </option>
- <option value="Macintosh">Macintosh
- </option>
- <option value="PC">PC
- </option>
- <option value="Power PC">Power PC
- </option>
- <option value="Sun">Sun
- </option>
- <option value="Other">Other
- </option>
- </select>
- </td>
- <td>&nbsp;</td>
-
- <td align="right">
- <b>Reporter:</b>
- </td>
- <td>andre_weinand@ch.ibm.com (Andre Weinand)
- </td>
- </tr>
-
- <tr>
- <td align="right">
- <b>Product:</b>
- </td><td>
- <select name="product">
- <option value="AJDT">AJDT
- </option>
- <option value="AspectJ">AspectJ
- </option>
- <option value="CDT">CDT
- </option>
- <option value="EMF">EMF
- </option>
- <option value="Equinox">Equinox
- </option>
- <option value="GEF">GEF
- </option>
- <option value="JDT">JDT
- </option>
- <option value="PDE">PDE
- </option>
- <option value="Platform" selected>Platform
- </option>
- <option value="Stellation">Stellation
- </option>
- <option value="XSD">XSD
- </option>
- </select>
- </td>
- <td>&nbsp;</td>
-
- <td align="right">
- <b>OS:</b>
- </td><td>
- <select name="op_sys">
- <option value="All" selected>All
- </option>
- <option value="AIX Motif">AIX Motif
- </option>
- <option value="Windows 95">Windows 95
- </option>
- <option value="Windows 98">Windows 98
- </option>
- <option value="Windows CE">Windows CE
- </option>
- <option value="Windows ME">Windows ME
- </option>
- <option value="Windows 2000">Windows 2000
- </option>
- <option value="Windows NT">Windows NT
- </option>
- <option value="Windows XP">Windows XP
- </option>
- <option value="Windows All">Windows All
- </option>
- <option value="MacOS X">MacOS X
- </option>
- <option value="Linux">Linux
- </option>
- <option value="Linux-GTK">Linux-GTK
- </option>
- <option value="Linux-Motif">Linux-Motif
- </option>
- <option value="HP-UX">HP-UX
- </option>
- <option value="Neutrino">Neutrino
- </option>
- <option value="QNX-Photon">QNX-Photon
- </option>
- <option value="Solaris">Solaris
- </option>
- <option value="Unix All">Unix All
- </option>
- <option value="other">other
- </option>
- </select>
- </td>
- <td>&nbsp;</td>
-
- <td align="right">
- <b>Add&nbsp;CC:</b>
- </td>
- <td>
- <input name="newcc" size="30" value="">
- </td>
- </tr>
-
-
-
- <tr>
- <td align="right">
- <b>
- <a href="describecomponents.cgi?product=Platform">
- Component</a>:
- </b>
- </td>
- <td>
- <select name="component">
- <option value="Ant">Ant
- </option>
- <option value="Compare">Compare
- </option>
- <option value="Core">Core
- </option>
- <option value="Debug">Debug
- </option>
- <option value="Doc">Doc
- </option>
- <option value="Help">Help
- </option>
- <option value="Releng">Releng
- </option>
- <option value="Scripting">Scripting
- </option>
- <option value="Search">Search
- </option>
- <option value="SWT">SWT
- </option>
- <option value="Text">Text
- </option>
- <option value="UI">UI
- </option>
- <option value="Update">Update
- </option>
- <option value="VCM" selected>VCM
- </option>
- <option value="WebDAV">WebDAV
- </option>
- </select>
- </td>
-
- <td>&nbsp;</td>
-
- <td align="right">
- <b>Version:</b>
- </td><td>
- <select name="version">
- <option value="1.0">1.0
- </option>
- <option value="2.0" selected>2.0
- </option>
- <option value="2.0.1">2.0.1
- </option>
- <option value="2.0.2">2.0.2
- </option>
- <option value="2.1">2.1
- </option>
- </select>
- </td>
- <td>&nbsp;</td>
-
- <td rowspan="4" align="right" valign="top">
- <b>CC:</b>
- </td>
- <td rowspan="4" valign="top">
- <select name="cc" multiple="multiple" size="5">
- <option value="Kevin_McGuire@oti.com">Kevin_McGuire@oti.com</option>
- </select>
- <br>
- <input type="checkbox" name="removecc">Remove selected CCs
- <br>
- </td>
- </tr>
-
- <tr>
- <td align="right">
- <b>
- <a href="bug_status.html">Status</a>:
- </b>
- </td>
- <td>VERIFIED</td>
- <td>&nbsp;</td>
-
- <td align="right">
- <b><a href="bug_status.html#priority">Priority</a>:</b>
- </td><td>
- <select name="priority">
- <option value="P1">P1
- </option>
- <option value="P2">P2
- </option>
- <option value="P3" selected>P3
- </option>
- <option value="P4">P4
- </option>
- <option value="P5">P5
- </option>
- </select>
- </td>
- <td>&nbsp;</td>
- </tr>
-
- <tr>
- <td align="right">
- <b>
- <a href="bug_status.html">Resolution</a>:
- </b>
- </td>
- <td>FIXED</td>
- <td>&nbsp;</td>
-
- <td align="right">
- <b><a href="bug_status.html#severity">Severity</a>:</b>
- </td><td>
- <select name="bug_severity">
- <option value="blocker">blocker
- </option>
- <option value="critical">critical
- </option>
- <option value="major">major
- </option>
- <option value="normal" selected>normal
- </option>
- <option value="minor">minor
- </option>
- <option value="trivial">trivial
- </option>
- <option value="enhancement">enhancement
- </option>
- </select>
- </td>
- <td>&nbsp;</td>
-
- </tr>
-
- <tr>
- <td align="right">
- <b>
- <a href="bug_status.html#assigned_to">Assigned&nbsp;To</a>:
- </b>
- </td>
- <td>James_Moody@ca.ibm.com (James Moody)</td>
- <td>&nbsp;</td>
-
- <td align="right">
- <b>
- <a href="notargetmilestone.html">Target Milestone</a>:
- </b>
- </td><td>
- <select name="target_milestone">
- <option value="2.0 M1">2.0 M1
- </option>
- <option value="2.0 M2">2.0 M2
- </option>
- <option value="2.0 M3">2.0 M3
- </option>
- <option value="2.0 M4">2.0 M4
- </option>
- <option value="2.0 M5">2.0 M5
- </option>
- <option value="2.0 M6">2.0 M6
- </option>
- <option value="2.0 F1">2.0 F1
- </option>
- <option value="2.0 F2">2.0 F2
- </option>
- <option value="2.0 F3">2.0 F3
- </option>
- <option value="2.0 F4">2.0 F4
- </option>
- <option value="2.0.1">2.0.1
- </option>
- <option value="2.0.2">2.0.2
- </option>
- <option value="2.1">2.1
- </option>
- <option value="2.1 M1">2.1 M1
- </option>
- <option value="2.1 M2">2.1 M2
- </option>
- <option value="2.1 M3">2.1 M3
- </option>
- <option value="2.1 M4">2.1 M4
- </option>
- <option value="2.1 M5">2.1 M5
- </option>
- <option value="2.1 RC1">2.1 RC1
- </option>
- <option value="2.1 RC2">2.1 RC2
- </option>
- <option value="2.1 RC3">2.1 RC3
- </option>
- <option value="2.1 RC4">2.1 RC4
- </option>
- <option value="2.1.1">2.1.1
- </option>
- <option value="2.2">2.2
- </option>
- <option value="---" selected>---
- </option>
- </select>
- </td>
- <td>&nbsp;</td>
- </tr>
-
-
-
-
- <tr>
- <td align="right">
- <b>
- URL:
- </b>
- </td>
- <td colspan="7">
- <input name="bug_file_loc"
- value="" size="60">
- </td>
- </tr>
-
- <tr>
- <td align="right">
- <b>Summary:</b>
- </td>
- <td colspan="7">
- <input name="short_desc"
- value="Usability issue with external editors (1GE6IRL)" size="60">
- </td>
- </tr>
-
-
- <tr>
- <td align="right">
- <b>
- <a href="describekeywords.cgi">Keywords</a>:
- </b>
- <td colspan="7">
- <input name="keywords"
- value="" size="60">
- </td>
- </tr>
- </table>
-
-
-<!-- 1.0@bugzilla.org -->
-
-
-<br>
-<table cellspacing="0" cellpadding="4" border="1">
- <tr>
- <th bgcolor="#cccccc" align="left">Attachment</th>
- <th bgcolor="#cccccc" align="left">Type</th>
- <th bgcolor="#cccccc" align="left">Modified</th>
- <th bgcolor="#cccccc" align="left">Status</th>
- <th bgcolor="#cccccc" align="left">Actions</th>
- </tr>
-
-
- <tr>
- <td colspan="4">
- <a href="attachment.cgi?bugid=1&amp;action=enter">Create a New Attachment</a> (proposed patch, testcase, etc.)
- </td>
- <td colspan="1">
- <a href="attachment.cgi?bugid=1&amp;action=viewall">View All</a>
- </td>
- </tr>
-</table>
-<br>
-
-
-
- <table>
- <tr><th align="right">Bug 1 depends on:</th>
- <td>
- </td>
- <td>
- <input name="dependson"
- value="">
- </td>
- <td rowspan="2">
- <a href="showdependencytree.cgi?id=1">Show
- dependency tree</a>
-
- </td>
- </tr>
-
- <tr><th align="right">Bug 1 blocks:</th>
- <td>
- </td>
- <td>
- <input name="blocked"
- value="">
- </td>
- </tr>
- </table>
-
- <table>
- <tr>
- <th>
- <a href="votehelp.html">Votes</a>:
- </th>
- <td>0&nbsp;&nbsp;&nbsp;
- <a href="votes.cgi?action=show_bug&amp;bug_id=1">Show
- votes for this bug</a>&nbsp;&nbsp;&nbsp;
- <a href="votes.cgi?action=show_user&amp;bug_id=1">Vote
- for this bug</a>
- </td>
- </tr>
- </table>
-
-
-
- <br>
- <b>Additional Comments:</b>
- <br>
- <textarea wrap="hard" name="comment" rows="10" cols="80"
- accesskey="c"></textarea>
- <br>
-
-
-
-
- <br>
- <input type="radio" name="knob" value="none" checked="checked">
- Leave as <b>VERIFIED&nbsp;FIXED</b>
- <br>
-
-
-
- <input type="radio" name="knob" value="reopen"> Reopen bug
- <br>
- <input type="radio" name="knob" value="close">
- Mark bug as <b>CLOSED</b><br>
-
- <input type="submit" value="Commit">
- <input type="hidden" name="form_name" value="process_bug">
- <p>
- <font size="+1">
- <b>
- <a href="show_activity.cgi?id=1">View Bug Activity</a>
- &nbsp; | &nbsp;
- <a href="long_list.cgi?buglist=1">Format For Printing</a>
- </b>
- </font>
-
- </p>
-</form>
-
-
-
-<table>
- <tr>
- <td align="left">
- <b>
- <a name="c0" href="#c0">Description</a>:
- </b>
- </td>
- <td align="right" width="100%">
- Opened: 2001-10-10 21:34
- </td>
- </tr>
-</table>
-<hr>
-<!-- 1.0@bugzilla.org -->
-
-<pre>- Setup a project that contains a *.gif resource
- - release project to CVS
- - edit the *.gif resource with an external editor, e.g. PaintShop
- - save and close external editor
- - in Navigator open the icon resource and verify that your changes are there
- - release project
- -&gt; nothing to release!
- - in Navigator open the icon resource and verify that your changes are still there
-
- Problem: because I never &quot;Refreshed from local&quot;, the workspace hasn't changed so &quot;Release&quot; didn't find anything.
- However opening the resource with an external editor found the modified file on disk and showed the changes.
-
- The real problem occurs if &quot;Release&quot; actually finds something to release but you don't spot that some resources are missing.
- This is extremely error prone: one of my changes didn't made it into build 110 because of this!
-
-NOTES:
-EG (5/23/01 3:00:33 PM)
- Release should do a refresh from local before doing the release.
- Moving to VCM
-
-
-KM (05/27/01 5:10:19 PM)
- Comments from JM in related email:
-
- Should not do this for free. Could have a setting which made it optoinal but should nt be mandatory. Default setting could be to have it on.
- Consider the SWT team who keep their workspaces on network drives. This will be slow.
-
- Side effects will be that a build runs when the refresh is completed unless you somehow do it in a workspace runnable and don't end the
- runnable until after the release. This would be less than optimal as some builders may be responsible for maintaining some invariants and deriving resources which are releasable. If you don't run the builders before releasing, the invariants will not be maintained and you will release inconsistent state.
-
- Summary: Offer to &quot;ensure local consistency&quot; before releasing.
-
-KM (5/31/01 1:30:35 PM)
- See also 1GEAG1A: ITPVCM:WINNT - Internal error comparing with a document
- which failed with an error. Never got log from Tod though.</pre>
- <br>
- <i>------- Additional Comment
- <a name="c1" href="#c1">#1</a> From
- <a href="mailto:James_Moody@ca.ibm.com">James Moody</a>
- 2001-10-19 10:32 -------
- </i>
-
-
-<pre>*** <strike><a href="show_bug.cgi?id=183" title="RESOLVED DUPLICATE - readme: must refresh from local if using external editors (1GFBQNI)">Bug 183</a></strike> has been marked as a duplicate of this bug. ***</pre>
- <br>
- <i>------- Additional Comment
- <a name="c2" href="#c2">#2</a> From
- <a href="mailto:James_Moody@ca.ibm.com">James Moody</a>
- 2001-10-19 16:36 -------
- </i>
-
-
-<pre>Implemented 'auto refresh' option. Default value is off.</pre>
- <br>
- <i>------- Additional Comment
- <a name="c3" href="#c3">#3</a> From
- <a href="mailto:dj_houghton@ca.ibm.com">DJ Houghton</a>
- 2001-10-23 23:39 -------
- </i>
-
-
-<pre>PRODUCT VERSION:
- 109
-
-</pre>
- <br>
- <i>------- Additional Comment
- <a name="c4" href="#c4">#4</a> From
- <a href="mailto:James_Moody@ca.ibm.com">James Moody</a>
- 2001-10-25 10:19 -------
- </i>
-
-
-<pre>Fixed in v206</pre>
-
-<hr>
-<!-- 1.0@bugzilla.org -->
-
-
-
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="query.cgi">Query page</a>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="enter_bug.cgi">Enter new bug</a>
-
-<br>
-<!-- 1.0@bugzilla.org -->
-
-
-
-
-
-
-<table border="0">
- <tr>
- <td bgcolor="#000000" valign="top">
- <table border="0" cellpadding="10" cellspacing="0" width="100%"
- bgcolor="lightyellow">
- <tr>
- <td>
-
-
-
- This is <b>Bugzilla</b>: the Mozilla bug system. For more
- information about what Bugzilla is and what it can do, see
- <a href="http://www.bugzilla.org/">bugzilla.org</a>.
-
-
-
- <br>
-
-
-<!-- 1.0@bugzilla.org -->
-
-
-
-
-
-
-<form method="get" action="show_bug.cgi">
- <table width="100%">
- <tr>
- <td>
- Actions:
- </td>
-
- <td valign="middle" nowrap>
- <a href="enter_bug.cgi">New</a> |
- <a href="query.cgi">Query</a> |
-
- <input type="submit" value="Find"> bug #
- <input name="id" size="6"> |
-
- <a href="reports.cgi">Reports</a>
-
- </td>
-
- <td>&nbsp;</td>
-
- <td valign="middle" align="right">
- <a href="createaccount.cgi">New&nbsp;Account</a> |
- <a href="query.cgi?GoAheadAndLogIn=1">Log&nbsp;In</a>
- </td>
- </tr>
-
- </table>
-</form>
-
- </td>
- </tr>
- </table>
- </td>
- </tr>
-</table>
-
-</body>
-</html> \ No newline at end of file
diff --git a/org.eclipse.mylyn.bugzilla.tests/testdata/pages/bug-not-found-eclipse.html b/org.eclipse.mylyn.bugzilla.tests/testdata/pages/bug-not-found-eclipse.html
deleted file mode 100644
index 156212e5e..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/testdata/pages/bug-not-found-eclipse.html
+++ /dev/null
@@ -1,158 +0,0 @@
-<!-- 1.0@bugzilla.org -->
-
-
-
-<!-- 1.0@bugzilla.org -->
-
-
-
-
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
- <head>
- <title>Error</title>
-
-
-
-
-
-
-
- </head>
-
-
-
- <body bgcolor="#FFFFFF" onload="">
-
-
-<!-- 1.0@bugzilla.org -->
-
-
-
-
-<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000EE" VLINK="#551A8B" ALINK="#FF0000" >
-<table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="100%" ><tr><td
-WIDTH="100%"><table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="100%"
-BGCOLOR="#006699" ><tr><td BGCOLOR="#000000" width="116" ><img
-src="images/EclipseBannerPic.jpg" width="115" height="50"></td><td
-WIDTH="637"><a href=http://www.eclipse.org><img SRC="images/gradient.jpg" BORDER=0 height=50
-width=282></a></td><td WIDTH="250"><img src="images/eproject-simple.gif"
-width="250" height="48"></td></tr></table></td></tr></table>
-
- <table border="0" cellspacing="0">
- <tr>
- <td valign="top" align="left">
- <table border="0" cellpadding="0" cellspacing="2">
- <tr>
- <td valign="top" align="left" nowrap="nowrap">
- <font size="+1"><b>Error</b></font>
- </td>
- </tr>
- </table>
- </td>
- <td valign="middle">&nbsp;</td>
- <td valign="middle" align="left"></td>
- </tr>
- </table>
-
-<table cellpadding="20">
- <tr>
- <td bgcolor="#ff0000">
- <font size="+2">Bug #666 does not exist.
- </font>
- </td>
- </tr>
-</table>
-
-<p>
- Please press <b>Back</b> and try again.
-</p>
-<!-- 1.0@bugzilla.org -->
-
-
-
-
-
-
-<table border="0">
- <tr>
- <td bgcolor="#000000" valign="top">
- <table border="0" cellpadding="10" cellspacing="0" width="100%"
- bgcolor="lightyellow">
- <tr>
- <td>
-
-
-
- This is <b>Bugzilla</b>: the Mozilla bug system. For more
- information about what Bugzilla is and what it can do, see
- <a href="http://www.bugzilla.org/">bugzilla.org</a>.
-
-
-
- <br>
-
-
-<!-- 1.0@bugzilla.org -->
-
-
-
-
-
-
-<form method="get" action="show_bug.cgi">
- <table width="100%">
- <tr>
- <td>
- Actions:
- </td>
-
- <td valign="middle" nowrap>
- <a href="enter_bug.cgi">New</a> |
- <a href="query.cgi">Query</a> |
-
- <input type="submit" value="Find"> bug #
- <input name="id" size="6"> |
-
- <a href="reports.cgi">Reports</a>
-
- | <a href="votes.cgi?action=show_user">My Votes</a>
- </td>
-
- <td>&nbsp;</td>
-
-
- <td valign="middle">
- Edit <a href="userprefs.cgi">prefs</a>
-
- | <a href="relogin.cgi">Log&nbsp;out</a>&nbsp;cubranic@cs.ubc.ca
- </td>
- </tr>
-
-
-
-
- <tr>
- <td>
- Preset&nbsp;Queries:
- </td>
-
- <td colspan="3">
- <a href="buglist.cgi?bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&email1=cubranic%40cs.ubc.ca&emailtype1=exact&emailassigned_to1=1&emailreporter1=1">My&nbsp;Bugs</a>
-
- </td>
- </tr>
-
-
- </table>
-</form>
-
- </td>
- </tr>
- </table>
- </td>
- </tr>
-</table>
-
-</body>
-</html> \ No newline at end of file
diff --git a/org.eclipse.mylyn.bugzilla.tests/testdata/pages/bug-not-found-hipikat.html b/org.eclipse.mylyn.bugzilla.tests/testdata/pages/bug-not-found-hipikat.html
deleted file mode 100644
index e6261be5d..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/testdata/pages/bug-not-found-hipikat.html
+++ /dev/null
@@ -1,142 +0,0 @@
-<!-- 1.0@bugzilla.org -->
-
-
-
-<!-- 1.0@bugzilla.org -->
-
-
-
-
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
- <head>
- <title>Error</title>
-
-
-
-
-
-
-
- </head>
-
-
-
- <body bgcolor="#FFFFFF" onload="">
-
-
-<!-- 1.0@bugzilla.org -->
-
-
-
-
- <table bgcolor="#000000" width="100%" border="0" cellpadding="0"
- cellspacing="0">
- <tr>
- <td>
- <font color="#FFFFFF" size="8"><center>
- Bugzilla Version 2.16.3
- </center></font>
- </td>
- </tr>
- </table>
-
- <table border="0" cellspacing="0">
- <tr>
- <td valign="top" align="left">
- <table border="0" cellpadding="0" cellspacing="2">
- <tr>
- <td valign="top" align="left" nowrap="nowrap">
- <font size="+1"><b>Error</b></font>
- </td>
- </tr>
- </table>
- </td>
- <td valign="middle">&nbsp;</td>
- <td valign="middle" align="left"></td>
- </tr>
- </table>
-
-<table cellpadding="20">
- <tr>
- <td bgcolor="#ff0000">
- <font size="+2">Bug #666 does not exist.
- </font>
- </td>
- </tr>
-</table>
-
-<p>
- Please press <b>Back</b> and try again.
-</p>
-<!-- 1.0@bugzilla.org -->
-
-
-
-
-
-
-<table border="0">
- <tr>
- <td bgcolor="#000000" valign="top">
- <table border="0" cellpadding="10" cellspacing="0" width="100%"
- bgcolor="lightyellow">
- <tr>
- <td>
-
-
-
- This is <b>Bugzilla</b>: the Mozilla bug system. For more
- information about what Bugzilla is and what it can do, see
- <a href="http://www.bugzilla.org/">bugzilla.org</a>.
-
-
-
- <br>
-
-
-<!-- 1.0@bugzilla.org -->
-
-
-
-
-
-
-<form method="get" action="show_bug.cgi">
- <table width="100%">
- <tr>
- <td>
- Actions:
- </td>
-
- <td valign="middle" nowrap>
- <a href="enter_bug.cgi">New</a> |
- <a href="query.cgi">Query</a> |
-
- <input type="submit" value="Find"> bug #
- <input name="id" size="6"> |
-
- <a href="reports.cgi">Reports</a>
-
- </td>
-
- <td>&nbsp;</td>
-
- <td valign="middle" align="right">
- <a href="createaccount.cgi">New&nbsp;Account</a> |
- <a href="query.cgi?GoAheadAndLogIn=1">Log&nbsp;In</a>
- </td>
- </tr>
-
- </table>
-</form>
-
- </td>
- </tr>
- </table>
- </td>
- </tr>
-</table>
-
-</body>
-</html> \ No newline at end of file
diff --git a/org.eclipse.mylyn.bugzilla.tests/testdata/pages/cdt-page.html b/org.eclipse.mylyn.bugzilla.tests/testdata/pages/cdt-page.html
deleted file mode 100644
index 3a1d20fdb..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/testdata/pages/cdt-page.html
+++ /dev/null
@@ -1,184 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<!-- saved from url=(0055)https://bugs.eclipse.org/bugs/enter_bug.cgi?product=CDT -->
-<!-- 1.0@bugzilla.org --><!-- 1.0@bugzilla.org --><HTML><HEAD><TITLE>Enter Bug</TITLE>
-<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<META content="MSHTML 6.00.2800.1400" name=GENERATOR></HEAD>
-<BODY text=#000000 vLink=#551a8b aLink=#ff0000 link=#0000ee bgColor=#ffffff
-onload=""><!-- 1.0@bugzilla.org -->
-<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
- <TBODY>
- <TR>
- <TD width="100%">
- <TABLE cellSpacing=0 cellPadding=0 width="100%" bgColor=#006699
- border=0><TBODY>
- <TR>
- <TD width=116 bgColor=#000000><IMG height=50
- src="Enter Bug_files/EclipseBannerPic.jpg" width=115></TD>
- <TD width=637><A href="http://www.eclipse.org/"><IMG height=50
- src="Enter Bug_files/gradient.jpg" width=282 border=0></A></TD>
- <TD width=250><IMG height=48
- src="Enter Bug_files/eproject-simple.gif"
- width=250></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
-<TABLE cellSpacing=0 border=0>
- <TBODY>
- <TR>
- <TD vAlign=top align=left>
- <TABLE cellSpacing=2 cellPadding=0 border=0>
- <TBODY>
- <TR>
- <TD vAlign=top noWrap align=left><FONT size=+1><B>Enter
- Bug</B></FONT> </TD></TR></TBODY></TABLE></TD>
- <TD vAlign=center>&nbsp;</TD>
- <TD vAlign=center align=left>This page lets you enter a new bug into
- Bugzilla.</TD></TR></TBODY></TABLE>
-<FORM action=post_bug.cgi method=post><INPUT type=hidden value=CDT name=product>
-
-<TABLE cellSpacing=2 cellPadding=0 border=0>
- <TBODY>
- <TR>
- <TD><BR></TD></TR>
- <TR>
- <TD></TD>
- <TD colSpan=3><!-- 1.0@bugzilla.org -->Before reporting a bug, please read
- the <A href="https://bugs.eclipse.org/bugs/bugwritinghelp.html">bug
- writing guidelines</A>, please look at the list of <A
- href="https://bugs.eclipse.org/bugs/duplicates.cgi">most frequently
- reported bugs</A>, and please <A
- href="https://bugs.eclipse.org/bugs/query.cgi">search</A> for the bug.
- </TD></TR>
- <TR>
- <TD><BR></TD></TR>
- <TR>
- <TD vAlign=top align=right><STRONG>Reporter:</STRONG></TD>
- <TD vAlign=top>tanya@cs.ubc.ca</TD>
- <TD vAlign=top align=right><STRONG>Product:</STRONG></TD>
- <TD vAlign=top>CDT</TD></TR>
- <TR>
- <TD vAlign=top align=right><STRONG>Version:</STRONG> </TD>
- <TD><SELECT size=5 name=version> <OPTION value=1.0>1.0</OPTION> <OPTION
- value=1.0.1>1.0.1</OPTION> <OPTION value=1.1>1.1</OPTION> <OPTION
- value=1.2>1.2</OPTION> <OPTION value=2.0 selected>2.0</OPTION></SELECT>
-</TD>
- <TD vAlign=top align=right><STRONG><A
- href="https://bugs.eclipse.org/bugs/describecomponents.cgi?product=CDT">Component</A>:
- </STRONG></TD>
- <TD><SELECT size=5 name=component> <OPTION
- value=CDT-parser>CDT-parser</OPTION> <OPTION value=Core>Core</OPTION>
- <OPTION value=Cpp-Extensions>Cpp-Extensions</OPTION> <OPTION
- value=Debug>Debug</OPTION> <OPTION value=Debug-MI>Debug-MI</OPTION>
- <OPTION value=Doc>Doc</OPTION> <OPTION
- value=Generic-Extensions>Generic-Extensions</OPTION> <OPTION
- value=Launcher>Launcher</OPTION> <OPTION value=UI>UI</OPTION></SELECT>
- </TD></TR>
- <TR>
- <TD>&nbsp;</TD>
- <TD colSpan=3></TD></TR>
- <TR>
- <TD align=right><STRONG><A
- href="https://bugs.eclipse.org/bugs/bug_status.html#rep_platform">Platform</A>:
- </STRONG></TD>
- <TD><SELECT name=rep_platform> <OPTION value=All>All</OPTION> <OPTION
- value=Macintosh>Macintosh</OPTION> <OPTION value=PC selected>PC</OPTION>
- <OPTION value="Power PC">Power PC</OPTION> <OPTION
- value=Sun>Sun</OPTION> <OPTION value=Other>Other</OPTION></SELECT> </TD>
- <TD align=right><STRONG><A
- href="https://bugs.eclipse.org/bugs/bug_status.html#op_sys">OS</A>:
- </STRONG></TD>
- <TD><SELECT name=op_sys> <OPTION value=All>All</OPTION> <OPTION
- value="AIX Motif">AIX Motif</OPTION> <OPTION value="Windows 95">Windows
- 95</OPTION> <OPTION value="Windows 98">Windows 98</OPTION> <OPTION
- value="Windows CE">Windows CE</OPTION> <OPTION
- value="Windows ME">Windows ME</OPTION> <OPTION
- value="Windows 2000">Windows 2000</OPTION> <OPTION
- value="Windows NT">Windows NT</OPTION> <OPTION value="Windows XP"
- selected>Windows XP</OPTION> <OPTION value="Windows All">Windows
- All</OPTION> <OPTION value="MacOS X">MacOS X</OPTION> <OPTION
- value=Linux>Linux</OPTION> <OPTION value=Linux-GTK>Linux-GTK</OPTION>
- <OPTION value=Linux-Motif>Linux-Motif</OPTION> <OPTION
- value=HP-UX>HP-UX</OPTION> <OPTION value=Neutrino>Neutrino</OPTION>
- <OPTION value=QNX-Photon>QNX-Photon</OPTION> <OPTION
- value=Solaris>Solaris</OPTION> <OPTION value="Unix All">Unix
- All</OPTION> <OPTION value=other>other</OPTION></SELECT> </TD></TR>
- <TR><INPUT type=hidden value=P3 name=priority>
- <TD align=right><STRONG><A
- href="https://bugs.eclipse.org/bugs/bug_status.html#bug_severity">Severity</A>:
- </STRONG></TD>
- <TD><SELECT name=bug_severity> <OPTION value=blocker>blocker</OPTION>
- <OPTION value=critical>critical</OPTION> <OPTION
- value=major>major</OPTION> <OPTION value=normal selected>normal</OPTION>
- <OPTION value=minor>minor</OPTION> <OPTION
- value=trivial>trivial</OPTION> <OPTION
- value=enhancement>enhancement</OPTION></SELECT> </TD></TR>
- <TR>
- <TD>&nbsp;</TD>
- <TD colSpan=3></TD></TR><INPUT type=hidden value=NEW name=bug_status>
- <TR>
- <TD align=right><STRONG><A
- href="https://bugs.eclipse.org/bugs/bug_status.html#assigned_to">Assigned
- To</A>: </STRONG></TD>
- <TD colSpan=3><INPUT size=32 name=assigned_to> (Leave blank to assign to
- default component owner) </TD></TR>
- <TR>
- <TD align=right><STRONG>Cc:</STRONG></TD>
- <TD colSpan=3><INPUT size=45 name=cc> </TD></TR>
- <TR>
- <TD>&nbsp;</TD>
- <TD colSpan=3></TD></TR>
- <TR>
- <TD colSpan=3><INPUT type=hidden size=60 name=bug_file_loc input> </TD></TR>
- <TR>
- <TD align=right><STRONG>Summary:</STRONG></TD>
- <TD colSpan=3><INPUT size=60 name=short_desc> </TD></TR>
- <TR>
- <TD vAlign=top align=right><STRONG>Description:</STRONG></TD>
- <TD colSpan=3><TEXTAREA name=comment rows=10 wrap=hard cols=80></TEXTAREA>
- <BR></TD></TR>
- <TR>
- <TD></TD>
- <TD colSpan=3></TD></TR>
- <TR>
- <TD></TD>
- <TD colSpan=3><INPUT onclick="if (this.form.short_desc.value == '') &#10; { alert('Please enter a summary sentence for this bug.'); &#10; return false; } return true;" type=submit value=" Commit ">
- &nbsp;&nbsp;&nbsp;&nbsp; <INPUT type=submit value="Remember values as bookmarkable template" name=maketemplate>
- </TD></TR>
- <TR>
- <TD></TD>
- <TD colSpan=3><BR>We've made a guess at your operating system and
- platform. Please check them and, if we got it wrong, email
- webmaster@eclipse.org. </TD></TR></TBODY></TABLE><INPUT type=hidden
-value=enter_bug name=form_name> </FORM><!-- 1.0@bugzilla.org -->
-<TABLE border=0>
- <TBODY>
- <TR>
- <TD vAlign=top bgColor=#000000>
- <TABLE cellSpacing=0 cellPadding=10 width="100%" bgColor=lightyellow
- border=0>
- <TBODY>
- <TR>
- <TD>This is <B>Bugzilla</B>: the Mozilla bug system. For more
- information about what Bugzilla is and what it can do, see <A
- href="http://www.bugzilla.org/">bugzilla.org</A>. <BR><!-- 1.0@bugzilla.org -->
- <FORM action=show_bug.cgi method=get>
- <TABLE width="100%">
- <TBODY>
- <TR>
- <TD>Actions: </TD>
- <TD vAlign=center noWrap><A
- href="https://bugs.eclipse.org/bugs/enter_bug.cgi">New</A> |
- <A href="https://bugs.eclipse.org/bugs/query.cgi">Query</A> | <INPUT type=submit value=Find> bug # <INPUT size=6 name=id> |
- <A
- href="https://bugs.eclipse.org/bugs/reports.cgi">Reports</A> |
- <A
- href="https://bugs.eclipse.org/bugs/votes.cgi?action=show_user">My
- Votes</A> </TD>
- <TD>&nbsp;</TD>
- <TD vAlign=center>Edit <A
- href="https://bugs.eclipse.org/bugs/userprefs.cgi">prefs</A> |
- <A
- href="https://bugs.eclipse.org/bugs/relogin.cgi">Log&nbsp;out</A>&nbsp;tanya@cs.ubc.ca
- </TD></TR>
- <TR>
- <TD>Preset&nbsp;Queries: </TD>
- <TD colSpan=3><A
- href="https://bugs.eclipse.org/bugs/buglist.cgi?bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;email1=tanya%40cs.ubc.ca&amp;emailtype1=exact&amp;emailassigned_to1=1&amp;emailreporter1=1">My&nbsp;Bugs</A>
- </TD></TR></TBODY></TABLE></FORM></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></BODY></HTML>
diff --git a/org.eclipse.mylyn.bugzilla.tests/testdata/pages/enter-bug220.html b/org.eclipse.mylyn.bugzilla.tests/testdata/pages/enter-bug220.html
deleted file mode 100644
index e9c1deb49..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/testdata/pages/enter-bug220.html
+++ /dev/null
@@ -1,441 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-<html>
- <head>
- <title>Enter Bug: TestProduct</title>
-
-
-<link rel="Top" href="http://you-havent-visited-editparams.cgi-yet/">
-
-
-
-
-
-
-
-
- <link rel="Saved&nbsp;Searches" title="My Bugs"
- href="buglist.cgi?bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;email1=relves%40cs.ubc.ca&amp;emailtype1=exact&amp;emailassigned_to1=1&amp;emailreporter1=1">
-
-
- <link rel="Administration" title="Parameters"
- href="editparams.cgi"><link rel="Administration" title="Users"
- href="editusers.cgi"><link rel="Administration" title="Products"
- href="editproducts.cgi"><link rel="Administration" title="Flag Types"
- href="editflagtypes.cgi"><link rel="Administration" title="Groups"
- href="editgroups.cgi"><link rel="Administration" title="Keywords"
- href="editkeywords.cgi"><link rel="Administration" title="Whining"
- href="editwhines.cgi"><link rel="Administration" title="Sanity Check"
- href="sanitycheck.cgi">
-
-
-
- <script type="text/javascript">
- <!--
-
- function initHelp() {}
- // -->
- </script>
-
- <link href="skins/standard/global.css" rel="stylesheet" type="text/css">
- <link href="skins/custom/global.css" rel="stylesheet" type="text/css">
-
-
-
-
-
- </head>
-
-
-
- <body onload="set_assign_to();"
- class="you-havent-visited-editparams-cgi-yet">
-
-
-<div id="banner">
- <div class="intro"></div>
- <p id="banner-name">
- <span>This is Bugzilla</span>
- </p>
- <p id="banner-version">
- <a href="http://www.bugzilla.org/"><span>Bugzilla</span></a>
-
- <span>Version 2.20</span>
- </p>
- <div class="outro"></div>
- </div>
-
-<div id="header">
- <h1>Enter Bug: TestProduct</h1>
-
- <h2>This page lets you enter a new bug into Bugzilla.</h2>
-
-</div>
-
-<script type="text/javascript">
-<!--
-
-var initialowners = new Array(1);
-var last_initialowner;
-var components = new Array(1);
- components[0] = "TestComponent";
- initialowners[0] = "relves\x40cs.ubc.ca";
-
-function set_assign_to() {
- // Based on the selected component, fill the "Assign To:" field
- // with the default component owner, and the the "QA Contact:" field
- // with the default QA Contact.
- var form = document.Create;
- var assigned_to = form.assigned_to.value;
-
-
- var index = -1;
- if (form.component.type == 'select-one') {
- index = form.component.selectedIndex;
- } else if (form.component.type == 'hidden') {
- // Assume there is only one component in the list
- index = 0;
- }
- if (index != -1) {
- var owner = initialowners[index];
- var component = components[index];
- if (assigned_to == last_initialowner
- || assigned_to == owner
- || assigned_to == '') {
- form.assigned_to.value = owner;
- last_initialowner = owner;
- }
- }
-}
--->
-</script>
-
-<form name="Create" id="Create" method="post" action="post_bug.cgi">
-<input type="hidden" name="product" value="TestProduct">
-
-<table cellspacing="2" cellpadding="0" border="0">
-
- <tr>
- <td><br></td>
- </tr>
-
- <tr>
- <td></td>
- <td colspan="3">
- Before reporting a bug, please read the
-<a href="page.cgi?id=bug-writing.html">bug writing guidelines</a>, please look at the list of
-<a href="duplicates.cgi">most frequently reported bugs</a>, and please
-<a href="query.cgi">search</a> for the bug.
- </td>
-
- </tr>
-
- <tr>
- <td><br></td>
- </tr>
-
- <tr>
- <td align="right" valign="top"><strong>Reporter:</strong></td>
- <td valign="top">relves&#64;cs.ubc.ca</td>
-
- <td align="right" valign="top"><strong>Product:</strong></td>
- <td valign="top">TestProduct</td>
- </tr>
-
-
- <tr>
- <td align="right" valign="top">
- <strong>Version:</strong>
-
- </td>
- <td>
- <select name="version" size="5">
- <option value="other" selected="selected">other </option>
- </select>
- </td>
-
- <td align="right" valign="top">
- <strong>
-
- <a href="describecomponents.cgi?product=TestProduct">
- Component</a>:
- </strong>
- </td>
- <td>
- <select name="component" onchange="set_assign_to();" size="5">
- <option value="TestComponent" selected="selected">TestComponent </option>
- </select>
-
- </td>
- </tr>
-
- <tr>
- <td>&nbsp;</td>
- <td colspan="3"></td>
- </tr>
-
- <tr><td align="right">
- <strong>
-
- <a href="page.cgi?id=fields.html#rep_platform">Platform</a>:
- </strong>
- </td>
-
- <td>
- <select name="rep_platform">
- <option value="All">All</option>
- <option value="PC" selected="selected">PC</option>
-
- <option value="Macintosh">Macintosh</option>
- <option value="Other">Other</option>
- </select>
- </td>
-<td align="right">
- <strong>
- <a href="page.cgi?id=fields.html#op_sys">OS</a>:
- </strong>
-
- </td>
-
- <td>
- <select name="op_sys">
- <option value="All">All</option>
- <option value="Windows" selected="selected">Windows</option>
- <option value="Mac OS">Mac OS</option>
- <option value="Linux">Linux</option>
-
- <option value="Other">Other</option>
- </select>
- </td>
- </tr>
-
- <tr><td align="right">
- <strong>
- <a href="page.cgi?id=fields.html#priority">Priority</a>:
- </strong>
-
- </td>
-
- <td>
- <select name="priority">
- <option value="P1">P1</option>
- <option value="P2" selected="selected">P2</option>
- <option value="P3">P3</option>
- <option value="P4">P4</option>
-
- <option value="P5">P5</option>
- </select>
- </td>
-<td align="right">
- <strong>
- <a href="page.cgi?id=fields.html#bug_severity">Severity</a>:
- </strong>
- </td>
-
- <td>
- <select name="bug_severity">
- <option value="blocker">blocker</option>
- <option value="critical">critical</option>
- <option value="major">major</option>
- <option value="normal" selected="selected">normal</option>
- <option value="minor">minor</option>
-
- <option value="trivial">trivial</option>
- <option value="enhancement">enhancement</option>
- </select>
- </td>
- </tr>
-
-
- <tr>
- <td>&nbsp;</td>
-
- <td colspan="3"></td>
- </tr>
-
- <tr>
- <input type="hidden" name="bug_status"
- value="NEW">
- <td align="right" valign="top"><strong>Initial State:</strong></td>
- <td valign="top">NEW</td>
- <td colspan="2"></td>
-
- </tr>
-
- <tr>
- <td align="right">
- <strong>
- <a href="page.cgi?id=fields.html#assigned_to">Assign To</a>:
- </strong>
- </td>
- <td colspan="3"><input
- name="assigned_to"
- value="" size="32"
->
-
- <noscript>(Leave blank to assign to component's default assignee)</noscript>
- </td>
- </tr>
-
-
- <tr>
- <td align="right"><strong>Cc:</strong></td>
- <td colspan="3"><input
- name="cc"
- value="" size="45"
->
- </td>
-
- </tr>
-
- <tr>
- <td>&nbsp;</td>
- <td colspan="3"></td>
- </tr>
-
-
- <tr>
- <td align="right"><strong>URL:</strong></td>
-
- <td colspan="3">
- <input name="bug_file_loc" size="60"
- value="http://">
- </td>
- </tr>
-
- <tr>
- <td align="right"><strong>Summary:</strong></td>
- <td colspan="3">
- <input name="short_desc" size="60" value="">
-
- </td>
- </tr>
-
- <tr><td align="right" valign="top"><strong>Description:</strong></td>
- <td colspan="3">
- <textarea name="comment" rows="10" cols="80"></textarea>
- <br>
- </td>
-
- </tr>
-
- <input type="hidden" name="commentprivacy" value="0">
-
- <tr>
- <td align="right">
- <strong>Depends on:</strong>
- </td>
- <td>
-
- <input name="dependson" accesskey="d" value="">
- </td>
- </tr>
- <tr>
- <td align="right">
- <strong>Blocks:</strong>
- </td>
- <td>
-
- <input name="blocked" accesskey="b" value="">
- </td>
- </tr>
-
- <tr>
- <td></td>
- <td colspan="3">
- </td>
- </tr>
-
-
-
- <tr>
- <td></td>
- <td colspan="3">
- <input type="submit" value=" Commit "
- onclick="if (this.form.short_desc.value == '')
- { alert('Please enter a summary sentence for this bug.');
- return false; } return true;">
- &nbsp;&nbsp;&nbsp;&nbsp;
- <input type="submit" name="maketemplate"
- value="Remember values as bookmarkable template">
- </td>
- </tr>
-
- <tr>
- <td></td>
- <td colspan="3">
- <br>
- We've made a guess at your
- operating system and platform. Please check them
- and, if we got it wrong, email
- THE MAINTAINER HAS NOT YET BEEN SET.
- </td>
- </tr>
-
- </table>
-
- <input type="hidden" name="form_name" value="enter_bug">
-</form>
-
-
-<div id="footer">
- <div class="intro"></div>
-
-
-
-
-<form method="get" action="show_bug.cgi">
-<div id="useful-links">
- <div id="links-actions">
- <div class="label">Actions:</div>
-
- <div class="links">
- <a href="./">Home</a> |
- <a href="enter_bug.cgi">New</a> |
- <a href="query.cgi">Search</a> |
- bug # <input class="txt" name="id" size="6">
- <input class="btn" type="submit" value="Find"> |
-
- <a href="report.cgi">Reports</a>
-
- | <a href="request.cgi?requester=relves%40cs.ubc.ca&amp;requestee=relves%40cs.ubc.ca&amp;do_union=1&amp;group=type">My Requests</a>
-
-
- | <a href="votes.cgi?action=show_user">My&nbsp;Votes</a>
- | <a href="sanitycheck.cgi">Sanity&nbsp;check</a>
- | <a href="relogin.cgi">Log&nbsp;out</a>&nbsp;relves&#64;cs.ubc.ca
- </div>
- </div>
-
-
- <div id="links-edit">
- <div class="label">Edit:</div>
- <div class="links">
-
- <a href="userprefs.cgi">Prefs</a> | <a href="editparams.cgi">Parameters</a> | <a href="editsettings.cgi">User Preferences</a> | <a href="editusers.cgi">Users</a> | <a href="editproducts.cgi">Products</a> | <a href="editflagtypes.cgi">Flags</a> | <a href="editvalues.cgi">Field Values</a> | <a href="editgroups.cgi">Groups</a> | <a href="editkeywords.cgi">Keywords</a> | <a href="editwhines.cgi">Whining</a>
-
- </div>
- </div>
-
-
-
-
- <div id="links-saved">
- <div class="label">
- Saved&nbsp;Searches:
- </div>
- <div class="links">
- <a href="buglist.cgi?bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;email1=relves%40cs.ubc.ca&amp;emailtype1=exact&amp;emailassigned_to1=1&amp;emailreporter1=1">My&nbsp;Bugs</a>
-
- </div>
- </div>
-
-
-</div>
-</form>
-
- <div class="outro"></div>
-</div>
-
-</body>
-</html>
diff --git a/org.eclipse.mylyn.bugzilla.tests/testdata/pages/enter-bug2201.html b/org.eclipse.mylyn.bugzilla.tests/testdata/pages/enter-bug2201.html
deleted file mode 100644
index b942b2a55..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/testdata/pages/enter-bug2201.html
+++ /dev/null
@@ -1,493 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-<html>
- <head>
- <title>Enter Bug: Mylar</title>
-
-
-<link rel="Top" href="https://bugs.eclipse.org/bugs/">
-
-
-
-
-
-
-
-
- <link rel="Saved&nbsp;Searches" title="My Bugs"
- href="buglist.cgi?bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&email1=relves%40cs.ubc.ca&emailtype1=exact&emailassigned_to1=1&emailreporter1=1">
-
- <link rel="Saved&nbsp;Searches"
- title="AssignedToMe"
- href="buglist.cgi?cmdtype=runnamed&amp;namedcmd=AssignedToMe">
-
-
-
- <script type="text/javascript">
- <!--
-
- function initHelp() {}
- // -->
- </script>
-
- <link href="skins/standard/global.css" rel="stylesheet" type="text/css">
- <link href="skins/custom/global.css" rel="stylesheet" type="text/css">
-
-
-
-
-
- </head>
-
-
-
- <body onload="set_assign_to();"
- class="bugs-eclipse-org-bugs">
-
-
-<!-- 1.0@bugzilla.org -->
-
-
-
-
-<table width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr style="background-image: url(/bugs/header_bg.gif);">
- <td>
- <a href="http://www.eclipse.org/"><img src="/bugs/header_logo.gif" width="164" height="68" border="0" /></a>
- </td>
- <td align="right" style="color: white; font-family: verdana,arial,helvetica; font-size: 1.25em; font-style: italic;"><b>Eclipse bugs</b></font> <br /><font style="font-size: .5em;">Bugzilla 2.20.1 &#160;</font></td>
-
- </tr>
-</table>
-
-<div id="header">
- <h1>Enter Bug: Mylar</h1>
-
- <h2>This page lets you enter a new bug into Bugzilla.</h2>
-
-</div>
-
-<script type="text/javascript">
-<!--
-
-var initialowners = new Array(10);
-var last_initialowner;
-var components = new Array(10);
- var initialqacontacts = new Array(10);
- var last_initialqacontact;
- components[0] = "Bugzilla";
- initialowners[0] = "beatmik\x40acm.org";
- initialqacontacts[0] = "";
- components[1] = "Core";
- initialowners[1] = "beatmik\x40acm.org";
- initialqacontacts[1] = "";
- components[2] = "Doc";
- initialowners[2] = "beatmik\x40acm.org";
- initialqacontacts[2] = "";
- components[3] = "Java";
- initialowners[3] = "beatmik\x40acm.org";
- initialqacontacts[3] = "";
- components[4] = "Jira";
- initialowners[4] = "beatmik\x40acm.org";
- initialqacontacts[4] = "";
- components[5] = "Monitor";
- initialowners[5] = "beatmik\x40acm.org";
- initialqacontacts[5] = "";
- components[6] = "Tasks";
- initialowners[6] = "beatmik\x40acm.org";
- initialqacontacts[6] = "";
- components[7] = "UI";
- initialowners[7] = "beatmik\x40acm.org";
- initialqacontacts[7] = "";
- components[8] = "XML";
- initialowners[8] = "beatmik\x40acm.org";
- initialqacontacts[8] = "";
- components[9] = "Zest";
- initialowners[9] = "irbull\x40cs.uvic.ca";
- initialqacontacts[9] = "";
-
-function set_assign_to() {
- // Based on the selected component, fill the "Assign To:" field
- // with the default component owner, and the the "QA Contact:" field
- // with the default QA Contact.
- var form = document.Create;
- var assigned_to = form.assigned_to.value;
-
- var qa_contact = form.qa_contact.value;
-
- var index = -1;
- if (form.component.type == 'select-one') {
- index = form.component.selectedIndex;
- } else if (form.component.type == 'hidden') {
- // Assume there is only one component in the list
- index = 0;
- }
- if (index != -1) {
- var owner = initialowners[index];
- var component = components[index];
- if (assigned_to == last_initialowner
- || assigned_to == owner
- || assigned_to == '') {
- form.assigned_to.value = owner;
- last_initialowner = owner;
- }
- var contact = initialqacontacts[index];
- if (qa_contact == last_initialqacontact
- || qa_contact == contact
- || qa_contact == '') {
- form.qa_contact.value = contact;
- last_initialqacontact = contact;
- }
- }
-}
--->
-</script>
-
-<form name="Create" id="Create" method="post" action="post_bug.cgi">
-<input type="hidden" name="product" value="Mylar">
-
-<table cellspacing="2" cellpadding="0" border="0">
-
- <tr>
- <td><br></td>
- </tr>
-
- <tr>
- <td></td>
-
- <td colspan="3">
- Before reporting a bug, please read the
-<a href="page.cgi?id=bug-writing.html">bug writing guidelines</a>, please look at the list of
-<a href="duplicates.cgi">most frequently reported bugs</a>, and please
-<a href="query.cgi">search</a> for the bug.
- </td>
- </tr>
-
- <tr>
-
- <td><br></td>
- </tr>
-
- <tr>
- <td align="right" valign="top"><strong>Reporter:</strong></td>
- <td valign="top">relves&#64;cs.ubc.ca</td>
-
- <td align="right" valign="top"><strong>Product:</strong></td>
-
- <td valign="top">Mylar</td>
- </tr>
-
-
- <tr>
- <td align="right" valign="top">
- <strong>Version:</strong>
- </td>
- <td>
-
- <select name="version" size="5">
- <option value="0.2">0.2 </option>
- <option value="0.3">0.3 </option>
- <option value="0.4" selected="selected">0.4 </option>
- <option value="unspecified">unspecified </option>
- </select>
- </td>
-
- <td align="right" valign="top">
- <strong>
- <a href="describecomponents.cgi?product=Mylar">
- Component</a>:
- </strong>
- </td>
- <td>
- <select name="component" onchange="set_assign_to();" size="5">
-
- <option value="Bugzilla">Bugzilla </option>
- <option value="Core">Core </option>
- <option value="Doc">Doc </option>
- <option value="Java">Java </option>
- <option value="Jira">Jira </option>
- <option value="Monitor">Monitor </option>
-
- <option value="Tasks">Tasks </option>
- <option value="UI">UI </option>
- <option value="XML">XML </option>
- <option value="Zest">Zest </option>
- </select>
- </td>
- </tr>
-
- <tr>
- <td>&nbsp;</td>
- <td colspan="3"></td>
- </tr>
-
- <tr><td align="right">
- <strong>
- <a href="page.cgi?id=fields.html#rep_platform">Platform</a>:
- </strong>
-
- </td>
-
- <td>
- <select name="rep_platform">
- <option value="All">All</option>
- <option value="Macintosh">Macintosh</option>
- <option value="Other">Other</option>
- <option value="PC" selected="selected">PC</option>
-
- <option value="Power PC">Power PC</option>
- <option value="Sun">Sun</option>
- </select>
- </td>
-<td align="right">
- <strong>
- <a href="page.cgi?id=fields.html#op_sys">OS</a>:
- </strong>
-
- </td>
-
- <td>
- <select name="op_sys">
- <option value="All">All</option>
- <option value="AIX Motif">AIX Motif</option>
- <option value="HP-UX">HP-UX</option>
- <option value="Linux">Linux</option>
-
- <option value="Linux-GTK">Linux-GTK</option>
- <option value="Linux-Motif">Linux-Motif</option>
- <option value="Mac OS">Mac OS</option>
- <option value="MacOS X">MacOS X</option>
- <option value="Neutrino">Neutrino</option>
- <option value="other">other</option>
-
- <option value="QNX-Photon">QNX-Photon</option>
- <option value="Solaris">Solaris</option>
- <option value="Solaris-GTK">Solaris-GTK</option>
- <option value="Solaris-Motif">Solaris-Motif</option>
- <option value="SymbianOS-Series 80">SymbianOS-Series 80</option>
- <option value="Unix All">Unix All</option>
-
- <option value="Windows All">Windows All</option>
- <option value="Windows 95">Windows 95</option>
- <option value="Windows 98">Windows 98</option>
- <option value="Windows 2000">Windows 2000</option>
- <option value="Windows 2003 Server">Windows 2003 Server</option>
- <option value="Windows CE">Windows CE</option>
-
- <option value="Windows ME">Windows ME</option>
- <option value="Windows Mobile 2003">Windows Mobile 2003</option>
- <option value="Windows NT">Windows NT</option>
- <option value="Windows XP" selected="selected">Windows XP</option>
- </select>
- </td>
- </tr>
-
- <tr>
- <input type="hidden" name="priority"
- value="P3">
-<td align="right">
- <strong>
- <a href="page.cgi?id=fields.html#bug_severity">Severity</a>:
- </strong>
- </td>
-
- <td>
-
- <select name="bug_severity">
- <option value="blocker">blocker</option>
- <option value="critical">critical</option>
- <option value="major">major</option>
- <option value="normal" selected="selected">normal</option>
- <option value="minor">minor</option>
-
- <option value="trivial">trivial</option>
- <option value="enhancement">enhancement</option>
- </select>
- </td>
- </tr>
-
-
- <tr>
- <td>&nbsp;</td>
-
- <td colspan="3"></td>
- </tr>
-
- <tr>
- <input type="hidden" name="bug_status"
- value="NEW">
- <td align="right" valign="top"><strong>Initial State:</strong></td>
- <td valign="top">NEW</td>
- <td colspan="2"></td>
-
- </tr>
-
- <tr>
- <td align="right">
- <strong>
- <a href="page.cgi?id=fields.html#assigned_to">Assign To</a>:
- </strong>
- </td>
- <td colspan="3"><input
- name="assigned_to"
- value="" disabled="1" size="32"
->
-
- <noscript>(Leave blank to assign to component's default assignee)</noscript>
- </td>
- </tr>
-
- <tr>
- <td align="right"><strong>QA Contact:</strong></td>
- <td colspan="3"><input
- name="qa_contact"
- value="" disabled="1" size="32"
->
- <noscript>(Leave blank to assign to default qa contact)</noscript>
-
- </td>
- </tr>
-
- <tr>
- <td align="right"><strong>Cc:</strong></td>
- <td colspan="3"><input
- name="cc"
- value="" size="45"
->
- </td>
- </tr>
-
- <tr>
-
- <td>&nbsp;</td>
- <td colspan="3"></td>
- </tr>
-
-
- <tr>
- <td align="right"><strong>URL:</strong></td>
- <td colspan="3">
- <input name="bug_file_loc" size="60"
- value="http://">
-
- </td>
- </tr>
-
- <tr>
- <td align="right"><strong>Summary:</strong></td>
- <td colspan="3">
- <input name="short_desc" size="60" value="">
- </td>
- </tr>
-
- <tr><td align="right" valign="top"><strong>Description:</strong></td>
- <td colspan="3">
- <textarea name="comment" rows="10" cols="80"></textarea>
- <br>
- </td>
- </tr>
-
- <input type="hidden" name="commentprivacy" value="0">
-
-
- <tr>
- <td></td>
- <td colspan="3">
- </td>
- </tr>
-
-
-
- <tr>
- <td></td>
-
- <td colspan="3">
- <input type="submit" value=" Commit "
- onclick="if (this.form.short_desc.value == '')
- { alert('Please enter a summary sentence for this bug.');
- return false; } return true;">
- &nbsp;&nbsp;&nbsp;&nbsp;
- <input type="submit" name="maketemplate"
- value="Remember values as bookmarkable template">
- </td>
- </tr>
-
- <tr>
- <td></td>
-
- <td colspan="3">
- <br>
- We've made a guess at your
- operating system and platform. Please check them
- and, if we got it wrong, email
- webmaster@eclipse.org.
- </td>
- </tr>
-
- </table>
- <input type="hidden" name="form_name" value="enter_bug">
-</form>
-
-
-<div id="footer">
- <div class="intro"></div>
-
-
-
-
-<form method="get" action="show_bug.cgi">
-<div id="useful-links">
- <div id="links-actions">
- <div class="label">Actions:</div>
- <div class="links">
- <a href="./">Home</a> |
- <a href="enter_bug.cgi">New</a> |
- <a href="query.cgi">Search</a> |
- bug # <input class="txt" name="id" size="6">
-
- <input class="btn" type="submit" value="Find"> |
-
- <a href="report.cgi">Reports</a>
-
- | <a href="request.cgi?requester=relves%40cs.ubc.ca&amp;requestee=relves%40cs.ubc.ca&amp;do_union=1&amp;group=type">My Requests</a>
-
- | <a href="votes.cgi?action=show_user">My&nbsp;Votes</a>
-
- | <a href="relogin.cgi">Log&nbsp;out</a>&nbsp;relves&#64;cs.ubc.ca
- </div>
-
- </div>
-
- <div id="links-edit">
- <div class="label">Edit:</div>
- <div class="links">
-
- <a href="userprefs.cgi">Prefs</a>
- </div>
- </div>
-
-
-
-
- <div id="links-saved">
-
- <div class="label">
- Saved&nbsp;Searches:
- </div>
- <div class="links">
- <a href="buglist.cgi?bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&email1=relves%40cs.ubc.ca&emailtype1=exact&emailassigned_to1=1&emailreporter1=1">My&nbsp;Bugs</a>
- |
- <a href="buglist.cgi?cmdtype=runnamed&amp;namedcmd=AssignedToMe">AssignedToMe</a>
- </div>
-
- </div>
-
-
-</div>
-</form>
-
- <div class="outro"></div>
-</div>
-
-</body>
-</html>
diff --git a/org.eclipse.mylyn.bugzilla.tests/testdata/pages/equinox-page.html b/org.eclipse.mylyn.bugzilla.tests/testdata/pages/equinox-page.html
deleted file mode 100644
index 1c8fdf57d..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/testdata/pages/equinox-page.html
+++ /dev/null
@@ -1,177 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<!-- saved from url=(0059)https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Equinox -->
-<!-- 1.0@bugzilla.org --><!-- 1.0@bugzilla.org --><HTML><HEAD><TITLE>Enter Bug</TITLE>
-<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<META content="MSHTML 6.00.2800.1400" name=GENERATOR></HEAD>
-<BODY text=#000000 vLink=#551a8b aLink=#ff0000 link=#0000ee bgColor=#ffffff
-onload=""><!-- 1.0@bugzilla.org -->
-<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
- <TBODY>
- <TR>
- <TD width="100%">
- <TABLE cellSpacing=0 cellPadding=0 width="100%" bgColor=#006699
- border=0><TBODY>
- <TR>
- <TD width=116 bgColor=#000000><IMG height=50
- src="Equinox_files/EclipseBannerPic.jpg" width=115></TD>
- <TD width=637><A href="http://www.eclipse.org/"><IMG height=50
- src="Equinox_files/gradient.jpg" width=282 border=0></A></TD>
- <TD width=250><IMG height=48 src="Equinox_files/eproject-simple.gif"
- width=250></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
-<TABLE cellSpacing=0 border=0>
- <TBODY>
- <TR>
- <TD vAlign=top align=left>
- <TABLE cellSpacing=2 cellPadding=0 border=0>
- <TBODY>
- <TR>
- <TD vAlign=top noWrap align=left><FONT size=+1><B>Enter
- Bug</B></FONT> </TD></TR></TBODY></TABLE></TD>
- <TD vAlign=center>&nbsp;</TD>
- <TD vAlign=center align=left>This page lets you enter a new bug into
- Bugzilla.</TD></TR></TBODY></TABLE>
-<FORM action=post_bug.cgi method=post><INPUT type=hidden value=Equinox
-name=product>
-<TABLE cellSpacing=2 cellPadding=0 border=0>
- <TBODY>
- <TR>
- <TD><BR></TD></TR>
- <TR>
- <TD></TD>
- <TD colSpan=3><!-- 1.0@bugzilla.org -->Before reporting a bug, please read
- the <A href="https://bugs.eclipse.org/bugs/bugwritinghelp.html">bug
- writing guidelines</A>, please look at the list of <A
- href="https://bugs.eclipse.org/bugs/duplicates.cgi">most frequently
- reported bugs</A>, and please <A
- href="https://bugs.eclipse.org/bugs/query.cgi">search</A> for the bug.
- </TD></TR>
- <TR>
- <TD><BR></TD></TR>
- <TR>
- <TD vAlign=top align=right><STRONG>Reporter:</STRONG></TD>
- <TD vAlign=top>tanya@cs.ubc.ca</TD>
- <TD vAlign=top align=right><STRONG>Product:</STRONG></TD>
- <TD vAlign=top>Equinox</TD></TR>
- <TR>
- <TD vAlign=top align=right><STRONG>Version:</STRONG> </TD>
- <TD><SELECT size=5 name=version> <OPTION value=unspecified
- selected>unspecified</OPTION></SELECT> </TD>
- <TD vAlign=top align=right><STRONG><A
- href="https://bugs.eclipse.org/bugs/describecomponents.cgi?product=Equinox">Component</A>:
- </STRONG></TD>
- <TD><SELECT size=5 name=component> <OPTION
- value="Dynamic Plugins">Dynamic Plugins</OPTION> <OPTION
- value=General>General</OPTION> <OPTION value=OSGi>OSGi</OPTION></SELECT>
- </TD></TR>
- <TR>
- <TD>&nbsp;</TD>
- <TD colSpan=3></TD></TR>
- <TR>
- <TD align=right><STRONG><A
- href="https://bugs.eclipse.org/bugs/bug_status.html#rep_platform">Platform</A>:
- </STRONG></TD>
- <TD><SELECT name=rep_platform> <OPTION value=All>All</OPTION> <OPTION
- value=Macintosh>Macintosh</OPTION> <OPTION value=PC selected>PC</OPTION>
- <OPTION value="Power PC">Power PC</OPTION> <OPTION
- value=Sun>Sun</OPTION> <OPTION value=Other>Other</OPTION></SELECT> </TD>
- <TD align=right><STRONG><A
- href="https://bugs.eclipse.org/bugs/bug_status.html#op_sys">OS</A>:
- </STRONG></TD>
- <TD><SELECT name=op_sys> <OPTION value=All>All</OPTION> <OPTION
- value="AIX Motif">AIX Motif</OPTION> <OPTION value="Windows 95">Windows
- 95</OPTION> <OPTION value="Windows 98">Windows 98</OPTION> <OPTION
- value="Windows CE">Windows CE</OPTION> <OPTION
- value="Windows ME">Windows ME</OPTION> <OPTION
- value="Windows 2000">Windows 2000</OPTION> <OPTION
- value="Windows NT">Windows NT</OPTION> <OPTION value="Windows XP"
- selected>Windows XP</OPTION> <OPTION value="Windows All">Windows
- All</OPTION> <OPTION value="MacOS X">MacOS X</OPTION> <OPTION
- value=Linux>Linux</OPTION> <OPTION value=Linux-GTK>Linux-GTK</OPTION>
- <OPTION value=Linux-Motif>Linux-Motif</OPTION> <OPTION
- value=HP-UX>HP-UX</OPTION> <OPTION value=Neutrino>Neutrino</OPTION>
- <OPTION value=QNX-Photon>QNX-Photon</OPTION> <OPTION
- value=Solaris>Solaris</OPTION> <OPTION value="Unix All">Unix
- All</OPTION> <OPTION value=other>other</OPTION></SELECT> </TD></TR>
- <TR><INPUT type=hidden value=P3 name=priority>
- <TD align=right><STRONG><A
- href="https://bugs.eclipse.org/bugs/bug_status.html#bug_severity">Severity</A>:
- </STRONG></TD>
- <TD><SELECT name=bug_severity> <OPTION value=blocker>blocker</OPTION>
- <OPTION value=critical>critical</OPTION> <OPTION
- value=major>major</OPTION> <OPTION value=normal selected>normal</OPTION>
- <OPTION value=minor>minor</OPTION> <OPTION
- value=trivial>trivial</OPTION> <OPTION
- value=enhancement>enhancement</OPTION></SELECT> </TD></TR>
- <TR>
- <TD>&nbsp;</TD>
- <TD colSpan=3></TD></TR><INPUT type=hidden value=NEW name=bug_status>
- <TR>
- <TD align=right><STRONG><A
- href="https://bugs.eclipse.org/bugs/bug_status.html#assigned_to">Assigned
- To</A>: </STRONG></TD>
- <TD colSpan=3><INPUT size=32 name=assigned_to> (Leave blank to assign to
- default component owner) </TD></TR>
- <TR>
- <TD align=right><STRONG>Cc:</STRONG></TD>
- <TD colSpan=3><INPUT size=45 name=cc> </TD></TR>
- <TR>
- <TD>&nbsp;</TD>
- <TD colSpan=3></TD></TR>
- <TR>
- <TD colSpan=3><INPUT type=hidden size=60 name=bug_file_loc input> </TD></TR>
- <TR>
- <TD align=right><STRONG>Summary:</STRONG></TD>
- <TD colSpan=3><INPUT size=60 name=short_desc> </TD></TR>
- <TR>
- <TD vAlign=top align=right><STRONG>Description:</STRONG></TD>
- <TD colSpan=3><TEXTAREA name=comment rows=10 wrap=hard cols=80></TEXTAREA>
- <BR></TD></TR>
- <TR>
- <TD></TD>
- <TD colSpan=3></TD></TR>
- <TR>
- <TD></TD>
- <TD colSpan=3><INPUT onclick="if (this.form.short_desc.value == '') &#10; { alert('Please enter a summary sentence for this bug.'); &#10; return false; } return true;" type=submit value=" Commit ">
- &nbsp;&nbsp;&nbsp;&nbsp; <INPUT type=submit value="Remember values as bookmarkable template" name=maketemplate>
- </TD></TR>
- <TR>
- <TD></TD>
- <TD colSpan=3><BR>We've made a guess at your operating system and
- platform. Please check them and, if we got it wrong, email
- webmaster@eclipse.org. </TD></TR></TBODY></TABLE><INPUT type=hidden
-value=enter_bug name=form_name> </FORM><!-- 1.0@bugzilla.org -->
-<TABLE border=0>
- <TBODY>
- <TR>
- <TD vAlign=top bgColor=#000000>
- <TABLE cellSpacing=0 cellPadding=10 width="100%" bgColor=lightyellow
- border=0>
- <TBODY>
- <TR>
- <TD>This is <B>Bugzilla</B>: the Mozilla bug system. For more
- information about what Bugzilla is and what it can do, see <A
- href="http://www.bugzilla.org/">bugzilla.org</A>. <BR><!-- 1.0@bugzilla.org -->
- <FORM action=show_bug.cgi method=get>
- <TABLE width="100%">
- <TBODY>
- <TR>
- <TD>Actions: </TD>
- <TD vAlign=center noWrap><A
- href="https://bugs.eclipse.org/bugs/enter_bug.cgi">New</A> |
- <A href="https://bugs.eclipse.org/bugs/query.cgi">Query</A> | <INPUT type=submit value=Find> bug # <INPUT size=6 name=id> |
- <A
- href="https://bugs.eclipse.org/bugs/reports.cgi">Reports</A> |
- <A
- href="https://bugs.eclipse.org/bugs/votes.cgi?action=show_user">My
- Votes</A> </TD>
- <TD>&nbsp;</TD>
- <TD vAlign=center>Edit <A
- href="https://bugs.eclipse.org/bugs/userprefs.cgi">prefs</A> |
- <A
- href="https://bugs.eclipse.org/bugs/relogin.cgi">Log&nbsp;out</A>&nbsp;tanya@cs.ubc.ca
- </TD></TR>
- <TR>
- <TD>Preset&nbsp;Queries: </TD>
- <TD colSpan=3><A
- href="https://bugs.eclipse.org/bugs/buglist.cgi?bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;email1=tanya%40cs.ubc.ca&amp;emailtype1=exact&amp;emailassigned_to1=1&amp;emailreporter1=1">My&nbsp;Bugs</A>
- </TD></TR></TBODY></TABLE></FORM></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></BODY></HTML>
diff --git a/org.eclipse.mylyn.bugzilla.tests/testdata/pages/gmt-page.html b/org.eclipse.mylyn.bugzilla.tests/testdata/pages/gmt-page.html
deleted file mode 100644
index 951b86ccd..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/testdata/pages/gmt-page.html
+++ /dev/null
@@ -1,175 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<!-- saved from url=(0055)https://bugs.eclipse.org/bugs/enter_bug.cgi?product=GMT -->
-<!-- 1.0@bugzilla.org --><!-- 1.0@bugzilla.org --><HTML><HEAD><TITLE>Enter Bug</TITLE>
-<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<META content="MSHTML 6.00.2800.1400" name=GENERATOR></HEAD>
-<BODY text=#000000 vLink=#551a8b aLink=#ff0000 link=#0000ee bgColor=#ffffff
-onload=""><!-- 1.0@bugzilla.org -->
-<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
- <TBODY>
- <TR>
- <TD width="100%">
- <TABLE cellSpacing=0 cellPadding=0 width="100%" bgColor=#006699
- border=0><TBODY>
- <TR>
- <TD width=116 bgColor=#000000><IMG height=50
- src="GMT_files/EclipseBannerPic.jpg" width=115></TD>
- <TD width=637><A href="http://www.eclipse.org/"><IMG height=50
- src="GMT_files/gradient.jpg" width=282 border=0></A></TD>
- <TD width=250><IMG height=48 src="GMT_files/eproject-simple.gif"
- width=250></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
-<TABLE cellSpacing=0 border=0>
- <TBODY>
- <TR>
- <TD vAlign=top align=left>
- <TABLE cellSpacing=2 cellPadding=0 border=0>
- <TBODY>
- <TR>
- <TD vAlign=top noWrap align=left><FONT size=+1><B>Enter
- Bug</B></FONT> </TD></TR></TBODY></TABLE></TD>
- <TD vAlign=center>&nbsp;</TD>
- <TD vAlign=center align=left>This page lets you enter a new bug into
- Bugzilla.</TD></TR></TBODY></TABLE>
-<FORM action=post_bug.cgi method=post><INPUT type=hidden value=GMT name=product>
-
-<TABLE cellSpacing=2 cellPadding=0 border=0>
- <TBODY>
- <TR>
- <TD><BR></TD></TR>
- <TR>
- <TD></TD>
- <TD colSpan=3><!-- 1.0@bugzilla.org -->Before reporting a bug, please read
- the <A href="https://bugs.eclipse.org/bugs/bugwritinghelp.html">bug
- writing guidelines</A>, please look at the list of <A
- href="https://bugs.eclipse.org/bugs/duplicates.cgi">most frequently
- reported bugs</A>, and please <A
- href="https://bugs.eclipse.org/bugs/query.cgi">search</A> for the bug.
- </TD></TR>
- <TR>
- <TD><BR></TD></TR>
- <TR>
- <TD vAlign=top align=right><STRONG>Reporter:</STRONG></TD>
- <TD vAlign=top>tanya@cs.ubc.ca</TD>
- <TD vAlign=top align=right><STRONG>Product:</STRONG></TD>
- <TD vAlign=top>GMT</TD></TR>
- <TR>
- <TD vAlign=top align=right><STRONG>Version:</STRONG> </TD>
- <TD><SELECT size=5 name=version> <OPTION value=unspecified
- selected>unspecified</OPTION></SELECT> </TD>
- <TD vAlign=top align=right><STRONG><A
- href="https://bugs.eclipse.org/bugs/describecomponents.cgi?product=GMT">Component</A>:
- </STRONG></TD>
- <TD><SELECT size=5 name=component> <OPTION value=Core
- selected>Core</OPTION></SELECT> </TD></TR>
- <TR>
- <TD>&nbsp;</TD>
- <TD colSpan=3></TD></TR>
- <TR>
- <TD align=right><STRONG><A
- href="https://bugs.eclipse.org/bugs/bug_status.html#rep_platform">Platform</A>:
- </STRONG></TD>
- <TD><SELECT name=rep_platform> <OPTION value=All>All</OPTION> <OPTION
- value=Macintosh>Macintosh</OPTION> <OPTION value=PC selected>PC</OPTION>
- <OPTION value="Power PC">Power PC</OPTION> <OPTION
- value=Sun>Sun</OPTION> <OPTION value=Other>Other</OPTION></SELECT> </TD>
- <TD align=right><STRONG><A
- href="https://bugs.eclipse.org/bugs/bug_status.html#op_sys">OS</A>:
- </STRONG></TD>
- <TD><SELECT name=op_sys> <OPTION value=All>All</OPTION> <OPTION
- value="AIX Motif">AIX Motif</OPTION> <OPTION value="Windows 95">Windows
- 95</OPTION> <OPTION value="Windows 98">Windows 98</OPTION> <OPTION
- value="Windows CE">Windows CE</OPTION> <OPTION
- value="Windows ME">Windows ME</OPTION> <OPTION
- value="Windows 2000">Windows 2000</OPTION> <OPTION
- value="Windows NT">Windows NT</OPTION> <OPTION value="Windows XP"
- selected>Windows XP</OPTION> <OPTION value="Windows All">Windows
- All</OPTION> <OPTION value="MacOS X">MacOS X</OPTION> <OPTION
- value=Linux>Linux</OPTION> <OPTION value=Linux-GTK>Linux-GTK</OPTION>
- <OPTION value=Linux-Motif>Linux-Motif</OPTION> <OPTION
- value=HP-UX>HP-UX</OPTION> <OPTION value=Neutrino>Neutrino</OPTION>
- <OPTION value=QNX-Photon>QNX-Photon</OPTION> <OPTION
- value=Solaris>Solaris</OPTION> <OPTION value="Unix All">Unix
- All</OPTION> <OPTION value=other>other</OPTION></SELECT> </TD></TR>
- <TR><INPUT type=hidden value=P3 name=priority>
- <TD align=right><STRONG><A
- href="https://bugs.eclipse.org/bugs/bug_status.html#bug_severity">Severity</A>:
- </STRONG></TD>
- <TD><SELECT name=bug_severity> <OPTION value=blocker>blocker</OPTION>
- <OPTION value=critical>critical</OPTION> <OPTION
- value=major>major</OPTION> <OPTION value=normal selected>normal</OPTION>
- <OPTION value=minor>minor</OPTION> <OPTION
- value=trivial>trivial</OPTION> <OPTION
- value=enhancement>enhancement</OPTION></SELECT> </TD></TR>
- <TR>
- <TD>&nbsp;</TD>
- <TD colSpan=3></TD></TR><INPUT type=hidden value=NEW name=bug_status>
- <TR>
- <TD align=right><STRONG><A
- href="https://bugs.eclipse.org/bugs/bug_status.html#assigned_to">Assigned
- To</A>: </STRONG></TD>
- <TD colSpan=3><INPUT size=32 name=assigned_to> (Leave blank to assign to
- default component owner) </TD></TR>
- <TR>
- <TD align=right><STRONG>Cc:</STRONG></TD>
- <TD colSpan=3><INPUT size=45 name=cc> </TD></TR>
- <TR>
- <TD>&nbsp;</TD>
- <TD colSpan=3></TD></TR>
- <TR>
- <TD colSpan=3><INPUT type=hidden size=60 name=bug_file_loc input> </TD></TR>
- <TR>
- <TD align=right><STRONG>Summary:</STRONG></TD>
- <TD colSpan=3><INPUT size=60 name=short_desc> </TD></TR>
- <TR>
- <TD vAlign=top align=right><STRONG>Description:</STRONG></TD>
- <TD colSpan=3><TEXTAREA name=comment rows=10 wrap=hard cols=80></TEXTAREA>
- <BR></TD></TR>
- <TR>
- <TD></TD>
- <TD colSpan=3></TD></TR>
- <TR>
- <TD></TD>
- <TD colSpan=3><INPUT onclick="if (this.form.short_desc.value == '') &#10; { alert('Please enter a summary sentence for this bug.'); &#10; return false; } return true;" type=submit value=" Commit ">
- &nbsp;&nbsp;&nbsp;&nbsp; <INPUT type=submit value="Remember values as bookmarkable template" name=maketemplate>
- </TD></TR>
- <TR>
- <TD></TD>
- <TD colSpan=3><BR>We've made a guess at your operating system and
- platform. Please check them and, if we got it wrong, email
- webmaster@eclipse.org. </TD></TR></TBODY></TABLE><INPUT type=hidden
-value=enter_bug name=form_name> </FORM><!-- 1.0@bugzilla.org -->
-<TABLE border=0>
- <TBODY>
- <TR>
- <TD vAlign=top bgColor=#000000>
- <TABLE cellSpacing=0 cellPadding=10 width="100%" bgColor=lightyellow
- border=0>
- <TBODY>
- <TR>
- <TD>This is <B>Bugzilla</B>: the Mozilla bug system. For more
- information about what Bugzilla is and what it can do, see <A
- href="http://www.bugzilla.org/">bugzilla.org</A>. <BR><!-- 1.0@bugzilla.org -->
- <FORM action=show_bug.cgi method=get>
- <TABLE width="100%">
- <TBODY>
- <TR>
- <TD>Actions: </TD>
- <TD vAlign=center noWrap><A
- href="https://bugs.eclipse.org/bugs/enter_bug.cgi">New</A> |
- <A href="https://bugs.eclipse.org/bugs/query.cgi">Query</A> | <INPUT type=submit value=Find> bug # <INPUT size=6 name=id> |
- <A
- href="https://bugs.eclipse.org/bugs/reports.cgi">Reports</A> |
- <A
- href="https://bugs.eclipse.org/bugs/votes.cgi?action=show_user">My
- Votes</A> </TD>
- <TD>&nbsp;</TD>
- <TD vAlign=center>Edit <A
- href="https://bugs.eclipse.org/bugs/userprefs.cgi">prefs</A> |
- <A
- href="https://bugs.eclipse.org/bugs/relogin.cgi">Log&nbsp;out</A>&nbsp;tanya@cs.ubc.ca
- </TD></TR>
- <TR>
- <TD>Preset&nbsp;Queries: </TD>
- <TD colSpan=3><A
- href="https://bugs.eclipse.org/bugs/buglist.cgi?bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;email1=tanya%40cs.ubc.ca&amp;emailtype1=exact&amp;emailassigned_to1=1&amp;emailreporter1=1">My&nbsp;Bugs</A>
- </TD></TR></TBODY></TABLE></FORM></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></BODY></HTML>
diff --git a/org.eclipse.mylyn.bugzilla.tests/testdata/pages/hipikat-copy-bug-1-full.html b/org.eclipse.mylyn.bugzilla.tests/testdata/pages/hipikat-copy-bug-1-full.html
deleted file mode 100644
index 6390fcc9a..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/testdata/pages/hipikat-copy-bug-1-full.html
+++ /dev/null
@@ -1,157 +0,0 @@
-<HTML><HEAD>
-<TITLE>Bug 1 - Usability issue with external editors (1GE6IRL)</TITLE>
-
-
-</HEAD>
-<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000EE" VLINK="#551A8B" ALINK="#FF0000" >
-<table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="100%" ><tr><td
-WIDTH="100%"><table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="100%"
-BGCOLOR="#006699" ><tr><td BGCOLOR="#000000" width="116" ><img
-src="http://bugs.eclipse.org/bugs/images/EclipseBannerPic.jpg" width="115" height="50"></td><td
-WIDTH="637"><img SRC="http://bugs.eclipse.org/bugs/images/gradient.jpg" BORDER=0 height=50
-width=282></td><td WIDTH="250"><img src="http://bugs.eclipse.org/bugs/images/eproject-simple.gif"
-width="250" height="48"></td></tr></table></td></tr></table>
-
-<TABLE BORDER=0 CELLSPACING=0 WIDTH="100%">
- <TR>
- <TD WIDTH=10% VALIGN=TOP ALIGN=LEFT>
- <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=2>
- <TR><TD VALIGN=TOP ALIGN=LEFT NOWRAP>
- <FONT SIZE=+1><B>Bugzilla Bug 1</B></FONT> </TD></TR>
- </TABLE>
- </TD>
- <TD VALIGN=CENTER>&nbsp;</TD>
- <TD VALIGN=CENTER ALIGN=LEFT>
-Usability issue with external editors (1GE6IRL)
-</TD></TR></TABLE>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF=query.cgi>Query page</A>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF=enter_bug.cgi>Enter new bug</A>
-<HR>
-<FORM NAME="changeform" METHOD="POST" ACTION="process_bug.cgi">
-
-<INPUT TYPE=HIDDEN NAME="delta_ts" VALUE="20020427143827">
-<INPUT TYPE=HIDDEN NAME="longdesclength" VALUE="3022">
-<INPUT TYPE=HIDDEN NAME="id" VALUE=1>
- <TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0><TR>
- <TD ALIGN=RIGHT><B>Bug#:</B></TD><TD><A HREF="http://cvs-mirror.mozilla.org/webtools/bugzilla/show_bug.cgi?id=1">1</A></TD>
- <TD>&nbsp;</TD>
- <TD ALIGN=RIGHT><B><A HREF="bug_status.html#rep_platform">Platform:</A></B></TD>
- <TD><SELECT NAME=rep_platform><OPTION VALUE="All">All<OPTION VALUE="DEC">DEC<OPTION VALUE="HP">HP<OPTION VALUE="Macintosh">Macintosh<OPTION VALUE="PC">PC<OPTION VALUE="SGI">SGI<OPTION VALUE="Sun">Sun<OPTION VALUE="Other">Other</SELECT></TD>
- <TD>&nbsp;</TD>
- <TD ALIGN=RIGHT><B>Reporter:</B></TD><TD>Andre_Weinand@oti.com (Andre Weinand)</TD>
-</TR><TR>
- <TD ALIGN=RIGHT><B>Product:</B></TD>
- <TD><SELECT NAME=product><OPTION VALUE="TestProduct">TestProduct</SELECT></TD>
- <TD>&nbsp;</TD>
- <TD ALIGN=RIGHT><B>OS:</B></TD>
- <TD><SELECT NAME=op_sys><OPTION SELECTED VALUE="All">All<OPTION VALUE="Windows 3.1">Windows 3.1<OPTION VALUE="Windows 95">Windows 95<OPTION VALUE="Windows 98">Windows 98<OPTION VALUE="Windows ME">Windows ME<OPTION VALUE="Windows 2000">Windows 2000<OPTION VALUE="Windows NT">Windows NT<OPTION VALUE="Mac System 7">Mac System 7<OPTION VALUE="Mac System 7.5">Mac System 7.5<OPTION VALUE="Mac System 7.6.1">Mac System 7.6.1<OPTION VALUE="Mac System 8.0">Mac System 8.0<OPTION VALUE="Mac System 8.5">Mac System 8.5<OPTION VALUE="Mac System 8.6">Mac System 8.6<OPTION VALUE="Mac System 9.0">Mac System 9.0<OPTION VALUE="Linux">Linux<OPTION VALUE="BSDI">BSDI<OPTION VALUE="FreeBSD">FreeBSD<OPTION VALUE="NetBSD">NetBSD<OPTION VALUE="OpenBSD">OpenBSD<OPTION VALUE="AIX">AIX<OPTION VALUE="BeOS">BeOS<OPTION VALUE="HP-UX">HP-UX<OPTION VALUE="IRIX">IRIX<OPTION VALUE="Neutrino">Neutrino<OPTION VALUE="OpenVMS">OpenVMS<OPTION VALUE="OS/2">OS/2<OPTION VALUE="OSF/1">OSF/1<OPTION VALUE="Solaris">Solaris<OPTION VALUE="SunOS">SunOS<OPTION VALUE="other">other</SELECT></TD>
- <TD>&nbsp;</TD>
- <TD ALIGN=RIGHT NOWRAP><b>Add CC:</b></TD>
- <TD><INPUT NAME=newcc SIZE=30 VALUE=""></TD>
-</TR><TR>
- <TD ALIGN=RIGHT><B><A HREF="describecomponents.cgi?product=">Component:</A></B></TD>
- <TD><SELECT NAME=component></SELECT></TD>
- <TD>&nbsp;</TD>
- <TD ALIGN=RIGHT><B>Version:</B></TD>
- <TD><SELECT NAME=version></SELECT></TD>
- <TD>&nbsp;</TD>
- <TD ROWSPAN=4 ALIGN=RIGHT VALIGN=TOP><B>Cc:</B></TD>
- <TD ROWSPAN=4 VALIGN=TOP> <SELECT NAME=cc MULTIPLE SIZE=5>
-<OPTION VALUE="Kevin_McGuire@oti.com">Kevin_McGuire@oti.com
-</SELECT><BR>
-<INPUT TYPE=CHECKBOX NAME=removecc>Remove selected CCs<br>
- </TD>
-</TR><TR>
- <TD ALIGN=RIGHT><B><A HREF="bug_status.html">Status:</A></B></TD>
- <TD>VERIFIED</TD>
- <TD>&nbsp;</TD>
- <TD ALIGN=RIGHT><B><A HREF="bug_status.html#priority">Priority:</A></B></TD>
- <TD><SELECT NAME=priority><OPTION VALUE="P1">P1<OPTION VALUE="P2">P2<OPTION SELECTED VALUE="P3">P3<OPTION VALUE="P4">P4<OPTION VALUE="P5">P5</SELECT></TD>
- <TD>&nbsp;</TD>
-</TR><TR>
- <TD ALIGN=RIGHT><B><A HREF="bug_status.html">Resolution:</A></B></TD>
- <TD>FIXED</TD>
- <TD>&nbsp;</TD>
- <TD ALIGN=RIGHT><B><A HREF="bug_status.html#severity">Severity:</A></B></TD>
- <TD><SELECT NAME=bug_severity><OPTION VALUE="blocker">blocker<OPTION VALUE="critical">critical<OPTION VALUE="major">major<OPTION SELECTED VALUE="normal">normal<OPTION VALUE="minor">minor<OPTION VALUE="trivial">trivial<OPTION VALUE="enhancement">enhancement</SELECT></TD>
- <TD>&nbsp;</TD>
-</TR><TR>
- <TD ALIGN=RIGHT><B><A HREF="bug_status.html#assigned_to">Assigned&nbsp;To:
- </A></B></TD>
- <TD>James_Moody@oti.com (James Moody)</TD>
- <TD>&nbsp;</TD><TD></TD><TD></TD><TD>&nbsp;</TD>
-</TR>
- <TR>
- <TD ALIGN="RIGHT"><B>URL:</B>
- <TD COLSPAN=7>
- <INPUT NAME=bug_file_loc VALUE="" SIZE=60></TD>
- </TR><TR>
- <TD ALIGN="RIGHT"><B>Summary:</B>
- <TD COLSPAN=7>
- <INPUT NAME=short_desc VALUE="Usability issue with external editors (1GE6IRL)" SIZE=60></TD>
- </TR><tr><td align=right><B>Attachments:</b></td>
-<td colspan=7><a href="createattachment.cgi?id=1">Create a new attachment</a> (proposed patch, testcase, etc.)</td></tr></table>
-<table><tr>
-<th align=right>Bug 1 depends on:</th><td></td><td><input name=dependson value=""></td>
-
-<td rowspan=2><a href="showdependencytree.cgi?id=1">Show dependency tree</a>
-
-<br><a href="showdependencygraph.cgi?id=1">Show dependency graph</a>
-</td></tr><tr><th align=right>Bug 1 blocks:</th><td></td><td><input name=blocked value=""></td>
-</tr></table>
-
-<br>
-<B>Additional Comments:</B>
-<BR>
-<TEXTAREA WRAP=HARD NAME=comment ROWS=10 COLS=80></TEXTAREA><BR><br>
-<INPUT TYPE=radio NAME=knob VALUE=none CHECKED>
- Leave as <b>VERIFIED FIXED</b><br><INPUT TYPE=radio NAME=knob VALUE=reopen> Reopen bug<br>
-<INPUT TYPE=radio NAME=knob VALUE=close>
- Mark bug as <b>CLOSED</b><br>
-
-<INPUT TYPE="submit" VALUE="Commit">
-<INPUT TYPE="reset" VALUE="Reset">
-<INPUT TYPE="hidden" name="form_name" VALUE="process_bug">
-<P>
-<FONT size="+1"><B>
- <A HREF="show_activity.cgi?id=1">View Bug Activity</A>
- &nbsp; | &nbsp;
- <A HREF="long_list.cgi?buglist=1">Format For Printing</A>
-</B></FONT>
-<BR></FORM>
-<table><tr><td align=left><B>Description:</B></td>
-<td align=right width=100%>Opened: 2001-10-10 17:34</td></tr></table>
-<HR>
-<PRE>- Setup a project that contains a *.gif resource&#013; - release project to CVS&#013; - edit the *.gif resource with an external editor, e.g. PaintShop&#013; - save and close external editor&#013; - in Navigator open the icon resource and verify that your changes are there&#013; - release project&#013; -&gt; nothing to release!&#013; - in Navigator open the icon resource and verify that your changes are still there&#013;&#013; Problem: because I never &quot;Refreshed from local&quot;, the workspace hasn't changed so &quot;Release&quot; didn't find anything.&#013; However opening the resource with an external editor found the modified file on disk and showed the changes.&#013;&#013; The real problem occurs if &quot;Release&quot; actually finds something to release but you don't spot that some resources are missing.&#013; This is extremely error prone: one of my changes didn't made it into build 110 because of this!&#013;&#013;NOTES:&#013;EG (5/23/01 3:00:33 PM)&#013; Release should do a refresh from local before doing the release.&#013; Moving to VCM&#013;&#013;&#013;KM (05/27/01 5:10:19 PM)&#013; Comments from JM in related email:&#013;&#013; Should not do this for free. Could have a setting which made it optoinal but should nt be mandatory. Default setting could be to have it on.&#013; Consider the SWT team who keep their workspaces on network drives. This will be slow. &#013;&#013; Side effects will be that a build runs when the refresh is completed unless you somehow do it in a workspace runnable and don't end the&#013; runnable until after the release. This would be less than optimal as some builders may be responsible for maintaining some invariants and deriving resources which are releasable. If you don't run the builders before releasing, the invariants will not be maintained and you will release inconsistent state.&#013;&#013; Summary: Offer to &quot;ensure local consistency&quot; before releasing.&#013;&#013;KM (5/31/01 1:30:35 PM)&#013; See also 1GEAG1A: ITPVCM:WINNT - Internal error comparing with a document&#013; which failed with an error. Never got log from Tod though.</PRE>
-<BR><BR><I>------- Additional Comments From <A HREF="mailto:James_Moody@oti.com">James Moody</A> 2001-10-19 06:32 -------</I><BR>
-<PRE>*** <strike><a href="show_bug.cgi?id=183" title="RESOLVED DUPLICATE - readme: must refresh from local if using external editors (1GFBQNI)">Bug 183</a></strike> has been marked as a duplicate of this bug. ***</PRE>
-<BR><BR><I>------- Additional Comments From <A HREF="mailto:James_Moody@oti.com">James Moody</A> 2001-10-19 12:36 -------</I><BR>
-<PRE>Implemented 'auto refresh' option. Default value is off.</PRE>
-<BR><BR><I>------- Additional Comments From <A HREF="mailto:DJ_Houghton@oti.com">DJ Houghton</A> 2001-10-23 19:39 -------</I><BR>
-<PRE>PRODUCT VERSION:&#013; 109&#013;&#013;</PRE>
-<BR><BR><I>------- Additional Comments From <A HREF="mailto:James_Moody@oti.com">James Moody</A> 2001-10-25 06:19 -------</I><BR>
-<PRE>Fixed in v206</PRE>
-
-<HR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF=query.cgi>Query page</A>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF=enter_bug.cgi>Enter new bug</A>
-<hr>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a HREF=query.cgi>Query page</a>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a HREF=enter_bug.cgi>Enter new bug</a>
-<table BORDER="0"><tr><td BGCOLOR="#000000" VALIGN="TOP">
-<table BORDER="0" CELLPADDING="10" CELLSPACING="0" WIDTH="100%"
-BGCOLOR="lightyellow">
-<tr><td>
-<form METHOD=GET ACTION="show_bug.cgi">
-<table width="100%"><tr><td>
-Actions:
-</td><td VALIGN="middle" NOWRAP>
-<a href='enter_bug.cgi'>New</a> | <a href='query.cgi'>Query</a> |
- <input TYPE=SUBMIT VALUE="Find"> bug # <input NAME=id SIZE=6> | <a
-href='reports.cgi'>Reports</a></td><td>&nbsp;</td><td valign=middle align=right>
-
- <a href="createaccount.cgi"><nobr>New account</nobr></a>
- | <nobr><a href=query.cgi?GoAheadAndLogIn=1>Log in</a></nobr></td></tr></form>
-</table><br>
-<a HREF="index.html">Eclipse Bugs Home</a>
-</td></tr>
diff --git a/org.eclipse.mylyn.bugzilla.tests/testdata/pages/platform-page.html b/org.eclipse.mylyn.bugzilla.tests/testdata/pages/platform-page.html
deleted file mode 100644
index d41b5c84d..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/testdata/pages/platform-page.html
+++ /dev/null
@@ -1,299 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><!-- 1.0@bugzilla.org --><!-- 1.0@bugzilla.org --><title>Enter Bug</title></head>
-
-
-
-
-
-
-
-
- <body bgcolor="#ffffff" onload="" text="#000000" link="#0000ee" vlink="#551a8b" alink="#ff0000">
-
-
-<!-- 1.0@bugzilla.org -->
-
-
-
-
-
-<table border="0" cellspacing="0" cellpadding="0" width="100%"><tbody><tr><td width="100%"><table border="0" cellspacing="0" cellpadding="0" width="100%" bgcolor="#006699"><tbody><tr><td bgcolor="#000000" width="116"><img src="main_data/EclipseBannerPic.jpg" width="115" height="50"></td><td width="637"><a href="http://www.eclipse.org/"><img src="main_data/gradient.jpg" border="0" height="50" width="282"></a></td><td width="250"><img src="main_data/eproject-simple.gif" width="250" height="48"></td></tr></tbody></table></td></tr></tbody></table>
-
- <table border="0" cellspacing="0">
- <tbody><tr>
- <td valign="top" align="left">
- <table border="0" cellpadding="0" cellspacing="2">
- <tbody><tr>
- <td valign="top" align="left" nowrap="nowrap">
- <font size="+1"><b>Enter Bug</b></font>
- </td>
- </tr>
- </tbody></table>
- </td>
- <td valign="middle">&nbsp;</td>
- <td valign="middle" align="left">This page lets you enter a new bug into Bugzilla.</td>
- </tr>
- </tbody></table>
-
-<form method="post" action="post_bug.cgi">
-<input type="hidden" name="product" value="Platform">
-
-<input type="hidden" name="priority" value="P3">
-<input type="hidden" name="bug_status" value="NEW">
-
- <table cellspacing="2" cellpadding="0" border="0">
-
- <tbody><tr>
- <td><br></td>
- </tr>
-
- <tr>
- <td></td>
- <td colspan="3">
- <!-- 1.0@bugzilla.org -->
-
-
-
-
-
-
-Before reporting a bug, please read the <a href="https://bugs.eclipse.org/bugs/bugwritinghelp.html">
-bug writing guidelines</a>, please look at the list of
-<a href="https://bugs.eclipse.org/bugs/duplicates.cgi">most frequently reported bugs</a>, and please
-<a href="https://bugs.eclipse.org/bugs/query.cgi">search</a> for the bug.
- </td>
- </tr>
-
- <tr>
- <td><br></td>
- </tr>
-
- <tr>
- <td align="right" valign="top"><strong>Reporter:</strong></td>
- <td valign="top">tanya@cs.ubc.ca</td>
-
- <td align="right" valign="top"><strong>Product:</strong></td>
- <td valign="top">Platform</td>
- </tr>
-
-
- <tr>
- <td align="right" valign="top">
- <strong>Version:</strong>
- </td>
- <td>
- <select name="version" size="5"><option value="1.0">1.0 </option><option value="2.0">2.0 </option><option value="2.0.1">2.0.1 </option><option value="2.0.2">2.0.2 </option><option value="2.1">2.1 </option><option value="2.1.1">2.1.1 </option><option value="2.1.2">2.1.2 </option><option value="3.0" selected="selected">3.0 </option></select>
- </td>
-
- <td align="right" valign="top">
- <strong>
- <a href="https://bugs.eclipse.org/bugs/describecomponents.cgi?product=Platform">
- Component</a>:
- </strong>
- </td>
- <td>
- <select name="component" size="5"><option value="Ant">Ant </option><option value="Compare">Compare </option><option value="Core">Core </option><option value="CVS">CVS </option><option value="Debug">Debug </option><option value="Doc">Doc </option><option value="Help">Help </option><option value="Releng">Releng </option><option value="Scripting">Scripting </option><option value="Search">Search </option><option value="SWT">SWT </option><option value="Team">Team </option><option value="Text">Text </option><option value="UI">UI </option><option value="Update">Update </option><option value="WebDAV">WebDAV </option></select>
- </td>
- </tr>
-
- <tr>
- <td>&nbsp;</td>
- <td colspan="3"></td>
- </tr>
-
- <tr><td align="right">
- <strong>
- <a href="https://bugs.eclipse.org/bugs/bug_status.html#rep_platform">Platform</a>:
- </strong>
- </td>
-
- <td>
- <select name="rep_platform"><option value="All">All </option><option value="Macintosh">Macintosh </option><option value="PC" selected="selected">PC </option><option value="Power PC">Power PC </option><option value="Sun">Sun </option><option value="Other">Other </option></select>
- </td>
- <td align="right">
- <strong>
- <a href="https://bugs.eclipse.org/bugs/bug_status.html#op_sys">OS</a>:
- </strong>
- </td>
-
- <td>
- <select name="op_sys"><option value="All">All </option><option value="AIX Motif">AIX Motif </option><option value="Windows 95">Windows 95 </option><option value="Windows 98">Windows 98 </option><option value="Windows CE">Windows CE </option><option value="Windows ME">Windows ME </option><option value="Windows 2000">Windows 2000 </option><option value="Windows NT">Windows NT </option><option value="Windows XP" selected="selected">Windows XP </option><option value="Windows All">Windows All </option><option value="MacOS X">MacOS X </option><option value="Linux">Linux </option><option value="Linux-GTK">Linux-GTK </option><option value="Linux-Motif">Linux-Motif </option><option value="HP-UX">HP-UX </option><option value="Neutrino">Neutrino </option><option value="QNX-Photon">QNX-Photon </option><option value="Solaris">Solaris </option><option value="Unix All">Unix All </option><option value="other">other </option></select>
- </td>
- </tr>
-
- <tr>
- <td align="right">
- <strong>
- <a href="https://bugs.eclipse.org/bugs/bug_status.html#bug_severity">Severity</a>:
- </strong>
- </td>
-
- <td>
- <select name="bug_severity"><option value="blocker">blocker </option><option value="critical">critical </option><option value="major">major </option><option value="normal" selected="selected">normal </option><option value="minor">minor </option><option value="trivial">trivial </option><option value="enhancement">enhancement </option></select>
- </td>
- </tr>
-
- <tr>
- <td>&nbsp;</td>
- <td colspan="3"></td>
- </tr>
-
- <tr>
- <td align="right">
- <strong>
- <a href="https://bugs.eclipse.org/bugs/bug_status.html#assigned_to">Assigned To</a>:
- </strong>
- </td>
- <td colspan="3">
- <input name="assigned_to" size="32" value="">
- (Leave blank to assign to default component owner)
- </td>
- </tr>
-
- <tr>
- <td align="right"><strong>Cc:</strong></td>
- <td colspan="3">
- <input name="cc" size="45" value="">
- </td>
- </tr>
-
- <tr>
- <td>&nbsp;</td>
- <td colspan="3"></td>
- </tr>
-
- <tr>
- <td colspan="3">
- <input type="hidden" input="" name="bug_file_loc" size="60" value="">
- </td>
- </tr>
-
- <tr>
- <td align="right"><strong>Summary:</strong></td>
- <td colspan="3">
- <input name="short_desc" size="60" value="">
- </td>
- </tr>
-
- <tr><td align="right" valign="top"><strong>Description:</strong></td>
- <td colspan="3">
- <textarea wrap="hard" name="comment" rows="10" cols="80"></textarea>
- <br>
- </td>
- </tr>
-
- <tr>
- <td></td>
- <td colspan="3">
- </td>
- </tr>
-
- <tr>
- <td></td>
- <td colspan="3">
- <input type="submit" value=" Commit " onclick="if (this.form.short_desc.value == '')
- { alert('Please enter a summary sentence for this bug.');
- return false; } return true;">
- &nbsp;&nbsp;&nbsp;&nbsp;
- <input type="submit" name="maketemplate" value="Remember values as bookmarkable template">
- </td>
- </tr>
-
- <tr>
- <td></td>
- <td colspan="3">
- <br>
- We've made a guess at your operating system and platform.
- Please check them and, if we got it wrong, email webmaster@eclipse.org.
- </td>
- </tr>
-
- </tbody></table>
- <input type="hidden" name="form_name" value="enter_bug">
-</form>
-<!-- 1.0@bugzilla.org -->
-
-
-
-
-
-
-<table border="0">
- <tbody><tr>
- <td bgcolor="#000000" valign="top">
- <table border="0" cellpadding="10" cellspacing="0" width="100%" bgcolor="lightyellow">
- <tbody><tr>
- <td>
-
-
-
- This is <b>Bugzilla</b>: the Mozilla bug system. For more
- information about what Bugzilla is and what it can do, see
- <a href="http://www.bugzilla.org/">bugzilla.org</a>.
-
-
-
- <br>
-
-
-<!-- 1.0@bugzilla.org -->
-
-
-
-
-
-
-<form method="get" action="show_bug.cgi">
- <table width="100%">
- <tbody><tr>
- <td>
- Actions:
- </td>
-
- <td valign="middle" nowrap="nowrap">
- <a href="https://bugs.eclipse.org/bugs/enter_bug.cgi">New</a> |
- <a href="https://bugs.eclipse.org/bugs/query.cgi">Query</a> |
-
- <input type="submit" value="Find"> bug #
- <input name="id" size="6"> |
-
- <a href="https://bugs.eclipse.org/bugs/reports.cgi">Reports</a>
-
- | <a href="https://bugs.eclipse.org/bugs/votes.cgi?action=show_user">My Votes</a>
- </td>
-
- <td>&nbsp;</td>
-
-
- <td valign="middle">
- Edit <a href="https://bugs.eclipse.org/bugs/userprefs.cgi">prefs</a>
-
- | <a href="https://bugs.eclipse.org/bugs/relogin.cgi">Log&nbsp;out</a>&nbsp;tanya@cs.ubc.ca
- </td>
- </tr>
-
-
-
-
- <tr>
- <td>
- Preset&nbsp;Queries:
- </td>
-
- <td colspan="3">
- <a href="https://bugs.eclipse.org/bugs/buglist.cgi?bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;email1=tanya%40cs.ubc.ca&amp;emailtype1=exact&amp;emailassigned_to1=1&amp;emailreporter1=1">My&nbsp;Bugs</a>
-
- </td>
- </tr>
-
-
- </tbody></table>
-</form>
-
- </td>
- </tr>
- </tbody></table>
- </td>
- </tr>
-</tbody></table>
-
-</body></html> \ No newline at end of file
diff --git a/org.eclipse.mylyn.bugzilla.tests/testdata/pages/product-page-1-product-hipikat.html b/org.eclipse.mylyn.bugzilla.tests/testdata/pages/product-page-1-product-hipikat.html
deleted file mode 100644
index 53805b2d2..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/testdata/pages/product-page-1-product-hipikat.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<!-- saved from url=(0073)http://hipikat.cs.ubc.ca:8081/bugzilla-test/bugzilla-2.17.6/enter_bug.cgi -->
-<!-- 1.0@bugzilla.org --><!-- 1.0@bugzilla.org --><HTML><HEAD><TITLE>Enter Bug</TITLE>
-<META http-equiv=Content-Type content="text/html; charset=windows-1252"><!-- 1.0@bugzilla.org --><!-- 1.0@bugzilla.org -->
-<SCRIPT
-type=text/javascript>
- <!--
-
- function initHelp() {}
- // -->
- </SCRIPT>
-
-<META content="MSHTML 6.00.2800.1400" name=GENERATOR></HEAD>
-<BODY bgColor=#ffffff onload=set_assign_to();><!-- 1.0@bugzilla.org -->
-<TABLE cellSpacing=0 cellPadding=0 width="100%" bgColor=#000000 border=0>
- <TBODY>
- <TR>
- <TD>
- <CENTER><FONT color=#ffffff size=8>This is Bugzilla
- </FONT></CENTER></TD></TR></TBODY></TABLE>
-<CENTER><FONT size=-1><A href="http://www.bugzilla.org/">Bugzilla</A> Version
-2.17.6 </FONT></CENTER>
-<TABLE cellSpacing=0 width="100%" border=0>
- <TBODY>
- <TR>
- <TD vAlign=top align=left>
- <TABLE cellSpacing=2 cellPadding=0 border=0>
- <TBODY>
- <TR>
- <TD vAlign=top noWrap align=left><FONT size=+1><B>Enter
- Bug</B></FONT> </TD></TR></TBODY></TABLE></TD>
- <TD vAlign=center align=left>&nbsp;</TD>
- <TD vAlign=center align=left>This page lets you enter a new bug into
- Bugzilla.</TD></TR></TBODY></TABLE>
-<SCRIPT language=JavaScript type=text/javascript>
-<!--
-
-var default_owners = new Array(1);
-var components = new Array(1);
- components[0] = "TestComponent";
- default_owners[0] = "cubranic\x40cs.ubc.ca";
-var last_default_owner;
-function set_assign_to() {
- // Based on the selected component, fill the "Assign To:" field
- // with the default component owner.
- var form = document.Create;
- assigned_to = form.assigned_to.value
- var index = -1;
- if (form.component.type == 'select-one') {
- index = form.component.selectedIndex;
- } else if (form.component.type == 'hidden') {
- // Assume there is only one component in the list
- index = 0;
- }
- if (index != -1) {
- var owner = default_owners[index];
- var component = components[index];
- if (assigned_to == last_default_owner
- || assigned_to == owner
- || assigned_to == ''
- || confirm('Would you like to change\n\n' +
- ' "Assign To: ' + assigned_to + '"\n\n' +
- 'to the default "' + component + '" owner:\n\n' +
- ' ' + owner + "?")) {
- form.assigned_to.value = owner;
- last_default_owner = owner;
- }
- }
-}
--->
-</SCRIPT>
-
-<FORM id=Create name=Create action=post_bug.cgi method=post><INPUT type=hidden
-value=TestProduct name=product>
-<TABLE cellSpacing=2 cellPadding=0 border=0>
- <TBODY>
- <TR>
- <TD><BR></TD></TR>
- <TR>
- <TD></TD>
- <TD colSpan=3><!-- 1.0@bugzilla.org -->Before reporting a bug, please read
- the <A
- href="http://hipikat.cs.ubc.ca:8081/bugzilla-test/bugzilla-2.17.6/bugwritinghelp.html">bug
- writing guidelines</A>, please look at the list of <A
- href="http://hipikat.cs.ubc.ca:8081/bugzilla-test/bugzilla-2.17.6/duplicates.cgi">most
- frequently reported bugs</A>, and please <A
- href="http://hipikat.cs.ubc.ca:8081/bugzilla-test/bugzilla-2.17.6/query.cgi">search</A>
- for the bug. </TD></TR>
- <TR>
- <TD><BR></TD></TR>
- <TR>
- <TD vAlign=top align=right><STRONG>Reporter:</STRONG></TD>
- <TD vAlign=top>tanya@cs.ubc.ca</TD>
- <TD vAlign=top align=right><STRONG>Product:</STRONG></TD>
- <TD vAlign=top>TestProduct</TD></TR>
- <TR>
- <TD vAlign=top align=right><STRONG>Version:</STRONG> </TD>
- <TD><SELECT size=5 name=version> <OPTION value=other
- selected>other</OPTION></SELECT> </TD>
- <TD vAlign=top align=right><STRONG><A
- href="http://hipikat.cs.ubc.ca:8081/bugzilla-test/bugzilla-2.17.6/describecomponents.cgi?product=TestProduct">Component</A>:
- </STRONG></TD>
- <TD><SELECT onchange=set_assign_to(); size=5 name=component> <OPTION
- value=TestComponent selected>TestComponent</OPTION></SELECT> </TD></TR>
- <TR>
- <TD>&nbsp;</TD>
- <TD colSpan=3></TD></TR>
- <TR>
- <TD align=right><STRONG><A
- href="http://hipikat.cs.ubc.ca:8081/bugzilla-test/bugzilla-2.17.6/bug_status.html#rep_platform">Platform</A>:
- </STRONG></TD>
- <TD><SELECT name=rep_platform> <OPTION value=All>All</OPTION> <OPTION
- value=DEC>DEC</OPTION> <OPTION value=HP>HP</OPTION> <OPTION
- value=Macintosh>Macintosh</OPTION> <OPTION value=PC selected>PC</OPTION>
- <OPTION value=SGI>SGI</OPTION> <OPTION value=Sun>Sun</OPTION> <OPTION
- value=Other>Other</OPTION></SELECT> </TD>
- <TD align=right><STRONG><A
- href="http://hipikat.cs.ubc.ca:8081/bugzilla-test/bugzilla-2.17.6/bug_status.html#op_sys">OS</A>:
- </STRONG></TD>
- <TD><SELECT name=op_sys> <OPTION value=All>All</OPTION> <OPTION
- value="Windows 3.1">Windows 3.1</OPTION> <OPTION
- value="Windows 95">Windows 95</OPTION> <OPTION
- value="Windows 98">Windows 98</OPTION> <OPTION
- value="Windows ME">Windows ME</OPTION> <OPTION
- value="Windows 2000">Windows 2000</OPTION> <OPTION
- value="Windows NT">Windows NT</OPTION> <OPTION value="Windows XP"
- selected>Windows XP</OPTION> <OPTION value="Windows Server 2003">Windows
- Server 2003</OPTION> <OPTION value="Mac System 7">Mac System 7</OPTION>
- <OPTION value="Mac System 7.5">Mac System 7.5</OPTION> <OPTION
- value="Mac System 7.6.1">Mac System 7.6.1</OPTION> <OPTION
- value="Mac System 8.0">Mac System 8.0</OPTION> <OPTION
- value="Mac System 8.5">Mac System 8.5</OPTION> <OPTION
- value="Mac System 8.6">Mac System 8.6</OPTION> <OPTION
- value="Mac System 9.x">Mac System 9.x</OPTION> <OPTION
- value="Mac OS X 10.0">Mac OS X 10.0</OPTION> <OPTION
- value="Mac OS X 10.1">Mac OS X 10.1</OPTION> <OPTION
- value="Mac OS X 10.2">Mac OS X 10.2</OPTION> <OPTION
- value=Linux>Linux</OPTION> <OPTION value=BSD/OS>BSD/OS</OPTION> <OPTION
- value=FreeBSD>FreeBSD</OPTION> <OPTION value=NetBSD>NetBSD</OPTION>
- <OPTION value=OpenBSD>OpenBSD</OPTION> <OPTION value=AIX>AIX</OPTION>
- <OPTION value=BeOS>BeOS</OPTION> <OPTION value=HP-UX>HP-UX</OPTION>
- <OPTION value=IRIX>IRIX</OPTION> <OPTION
- value=Neutrino>Neutrino</OPTION> <OPTION value=OpenVMS>OpenVMS</OPTION>
- <OPTION value=OS/2>OS/2</OPTION> <OPTION value=OSF/1>OSF/1</OPTION>
- <OPTION value=Solaris>Solaris</OPTION> <OPTION
- value=SunOS>SunOS</OPTION> <OPTION value=other>other</OPTION></SELECT>
- </TD></TR>
- <TR>
- <TD align=right><STRONG><A
- href="http://hipikat.cs.ubc.ca:8081/bugzilla-test/bugzilla-2.17.6/bug_status.html#priority">Priority</A>:
- </STRONG></TD>
- <TD><SELECT name=priority> <OPTION value=P1>P1</OPTION> <OPTION value=P2
- selected>P2</OPTION> <OPTION value=P3>P3</OPTION> <OPTION
- value=P4>P4</OPTION> <OPTION value=P5>P5</OPTION></SELECT> </TD>
- <TD align=right><STRONG><A
- href="http://hipikat.cs.ubc.ca:8081/bugzilla-test/bugzilla-2.17.6/bug_status.html#bug_severity">Severity</A>:
- </STRONG></TD>
- <TD><SELECT name=bug_severity> <OPTION value=blocker>blocker</OPTION>
- <OPTION value=critical>critical</OPTION> <OPTION
- value=major>major</OPTION> <OPTION value=normal selected>normal</OPTION>
- <OPTION value=minor>minor</OPTION> <OPTION
- value=trivial>trivial</OPTION> <OPTION
- value=enhancement>enhancement</OPTION></SELECT> </TD></TR>
- <TR>
- <TD>&nbsp;</TD>
- <TD colSpan=3></TD></TR><INPUT type=hidden value=NEW name=bug_status>
- <TR>
- <TD align=right><STRONG><A
- href="http://hipikat.cs.ubc.ca:8081/bugzilla-test/bugzilla-2.17.6/bug_status.html#assigned_to">Assign
- To</A>: </STRONG></TD>
- <TD colSpan=3><INPUT size=32 name=assigned_to> <NOSCRIPT>(Leave blank to
- assign to default component owner)</NOSCRIPT> </TD></TR>
- <TR>
- <TD align=right><STRONG>Cc:</STRONG></TD>
- <TD colSpan=3><INPUT size=45 name=cc> </TD></TR>
- <TR>
- <TD>&nbsp;</TD>
- <TD colSpan=3></TD></TR>
- <TR>
- <TD align=right><STRONG>URL:</STRONG></TD>
- <TD colSpan=3><INPUT size=60 value=http:// name=bug_file_loc> </TD></TR>
- <TR>
- <TD align=right><STRONG>Summary:</STRONG></TD>
- <TD colSpan=3><INPUT size=60 name=short_desc> </TD></TR>
- <TR>
- <TD vAlign=top align=right><STRONG>Description:</STRONG></TD>
- <TD colSpan=3><TEXTAREA name=comment rows=10 wrap=hard cols=80></TEXTAREA>
- <BR></TD></TR>
- <TR>
- <TD vAlign=top align=right><STRONG><A
- href="http://hipikat.cs.ubc.ca:8081/bugzilla-test/bugzilla-2.17.6/describekeywords.cgi">Keywords</A>:
- </STRONG></TD>
- <TD colSpan=3><INPUT size=60 name=keywords> (optional) </TD></TR>
- <TR>
- <TD align=right><STRONG>Depends on:</STRONG> </TD>
- <TD><INPUT accessKey=d name=dependson> </TD></TR>
- <TR>
- <TD align=right><STRONG>Blocks:</STRONG> </TD>
- <TD><INPUT accessKey=b name=blocked> </TD></TR>
- <TR>
- <TD></TD>
- <TD colSpan=3></TD></TR>
- <TR>
- <TD></TD>
- <TD colSpan=3><INPUT onclick="if (this.form.short_desc.value == '')&#10; { alert('Please enter a summary sentence for this bug.');&#10; return false; } return true;" type=submit value=" Commit ">
- &nbsp;&nbsp;&nbsp;&nbsp; <INPUT type=submit value="Remember values as bookmarkable template" name=maketemplate>
- </TD></TR>
- <TR>
- <TD></TD>
- <TD colSpan=3><BR>We've made a guess at your operating system and
- platform. Please check them and, if we got it wrong, emailTHE MAINTAINER
- HAS NOT YET BEEN SET. </TD></TR></TBODY></TABLE><INPUT type=hidden
-value=enter_bug name=form_name> </FORM><!-- 1.0@bugzilla.org --><!-- 1.0@bugzilla.org -->
-<TABLE border=0>
- <TBODY>
- <TR>
- <TD vAlign=top bgColor=#000000>
- <TABLE cellSpacing=0 cellPadding=10 width="100%" bgColor=lightyellow
- border=0>
- <TBODY>
- <TR>
- <TD><!-- 1.0@bugzilla.org -->
- <FORM action=show_bug.cgi method=get>
- <TABLE width="100%">
- <TBODY>
- <TR>
- <TD>Actions: </TD>
- <TD vAlign=center noWrap><A
- href="http://hipikat.cs.ubc.ca:8081/bugzilla-test/bugzilla-2.17.6/enter_bug.cgi">New</A>
- | <A
- href="http://hipikat.cs.ubc.ca:8081/bugzilla-test/bugzilla-2.17.6/query.cgi">Search</A>
- | <INPUT type=submit value=Find> bug # <INPUT size=6 name=id>
- | <A
- href="http://hipikat.cs.ubc.ca:8081/bugzilla-test/bugzilla-2.17.6/report.cgi">Reports</A>
- | <A
- href="http://hipikat.cs.ubc.ca:8081/bugzilla-test/bugzilla-2.17.6/request.cgi?requester=tanya%40cs.ubc.ca&amp;requestee=tanya%40cs.ubc.ca&amp;do_union=1&amp;group=type">My
- Requests</A> | <A
- href="http://hipikat.cs.ubc.ca:8081/bugzilla-test/bugzilla-2.17.6/votes.cgi?action=show_user">My
- Votes</A> </TD>
- <TD>&nbsp;</TD>
- <TD vAlign=center>Edit <A
- href="http://hipikat.cs.ubc.ca:8081/bugzilla-test/bugzilla-2.17.6/userprefs.cgi">prefs</A>,
- <A
- href="http://hipikat.cs.ubc.ca:8081/bugzilla-test/bugzilla-2.17.6/editproducts.cgi">products</A>,
- <A
- href="http://hipikat.cs.ubc.ca:8081/bugzilla-test/bugzilla-2.17.6/editflagtypes.cgi">flags</A>,
- <A
- href="http://hipikat.cs.ubc.ca:8081/bugzilla-test/bugzilla-2.17.6/editkeywords.cgi">keywords</A>
- | <A
- href="http://hipikat.cs.ubc.ca:8081/bugzilla-test/bugzilla-2.17.6/relogin.cgi">Log&nbsp;out</A>&nbsp;tanya@cs.ubc.ca
- </TD></TR>
- <TR>
- <TD>Saved&nbsp;Searches: </TD>
- <TD colSpan=3><A
- href="http://hipikat.cs.ubc.ca:8081/bugzilla-test/bugzilla-2.17.6/buglist.cgi?bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;email1=tanya%40cs.ubc.ca&amp;emailtype1=exact&amp;emailassigned_to1=1&amp;emailreporter1=1">My&nbsp;Bugs</A>
- </TD></TR></TBODY></TABLE></FORM></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></BODY></HTML>
diff --git a/org.eclipse.mylyn.bugzilla.tests/testdata/pages/test-report-220.html b/org.eclipse.mylyn.bugzilla.tests/testdata/pages/test-report-220.html
deleted file mode 100644
index 6e8adde46..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/testdata/pages/test-report-220.html
+++ /dev/null
@@ -1,667 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-<html>
- <head>
- <title>Bug 7 - summary</title>
-
-
-
-
-
-
- <script type="text/javascript">
- <!--
-
- function initHelp() {}
- // -->
- </script>
-
- <link href="skins/standard/global.css" rel="stylesheet" type="text/css">
- <link href="skins/custom/global.css" rel="stylesheet" type="text/css">
-
-
-
-
-
- </head>
-
-
-
- <body onload=""
- class="you-havent-visited-editparams-cgi-yet bz_bug bz_status_NEW bz_component_TestComponent bz_bug_7">
-
-
-<div id="banner">
- <div class="intro"></div>
- <p id="banner-name">
- <span>This is Bugzilla</span>
- </p>
- <p id="banner-version">
- <a href="http://www.bugzilla.org/"><span>Bugzilla</span></a>
- <span>Version 2.20</span>
- </p>
- <div class="outro"></div>
- </div>
-
-<div id="header">
- <h1>Bugzilla Bug 7</h1>
-
- <h2>summary</h2>
-
- <h3>Last modified: 2006-02-21 16:34:29</h3>
-</div>
-<i><font color="#777777">First</font></i>
- <i><font color="#777777">Last</font></i>
- <i><font color="#777777">Prev</font></i>
- <i><font color="#777777">Next</font></i>
- &nbsp;&nbsp;
- <i><font color="#777777">No search results available</font></i>
-
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="query.cgi">Search page</a>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="enter_bug.cgi">Enter new bug</a>
-
-<hr>
-<script type="text/javascript">
- <!--
-
- /* Outputs a link to call replyToComment(); used to reduce HTML output */
- function addReplyLink(id) {
- /* XXX this should really be updated to use the DOM Core's
- * createElement, but finding a container isn't trivial */
- document.write('[<a href="#add_comment" onclick="replyToComment(' +
- id + ');">reply<' + '/a>]');
- }
-
- /* Adds the reply text to the `comment' textarea */
- function replyToComment(id) {
- /* pre id="comment_name_N" */
- var text_elem = document.getElementById('comment_text_'+id);
- var text = getText(text_elem);
-
- /* make sure we split on all newlines -- IE or Moz use \r and \n
- * respectively */
- text = text.split(/\r|\n/);
-
- var replytext = "";
- for (var i=0; i < text.length; i++) {
- replytext += "> " + text[i] + "\n";
- }
-
- replytext = "(In reply to comment #" + id + ")\n" + replytext + "\n";
-
-
- /* <textarea id="comment"> */
- var textarea = document.getElementById('comment');
- textarea.value += replytext;
-
- textarea.focus();
- }
-
- if (!Node) {
- /* MSIE doesn't define Node, so provide a compatibility array */
- var Node = {
- TEXT_NODE: 3,
- ENTITY_REFERENCE_NODE: 5
- };
- }
-
- /* Concatenates all text from element's childNodes. This is used
- * instead of innerHTML because we want the actual text (and
- * innerText is non-standard) */
- function getText(element) {
- var child, text = "";
- for (var i=0; i < element.childNodes.length; i++) {
- child = element.childNodes[i];
- var type = child.nodeType;
- if (type == Node.TEXT_NODE || type == Node.ENTITY_REFERENCE_NODE) {
- text += child.nodeValue;
- } else {
- /* recurse into nodes of other types */
- text += getText(child);
- }
- }
- return text;
- }
-
-
- //-->
- </script>
-
-<form name="changeform" method="post" action="process_bug.cgi">
-
- <input type="hidden" name="delta_ts" value="2006-02-21 16:34:29">
- <input type="hidden" name="longdesclength" value="2">
- <input type="hidden" name="id" value="7">
-
-
-
- <table>
-
- <tr>
- <td valign="top">
- <table cellspacing="1" cellpadding="1">
-
- <tr>
- <td align="right">
- <b>Bug#:</b>
- </td>
- <td>
- <a href="http://you-havent-visited-editparams.cgi-yet/show_bug.cgi?id=7">7</a>
- </td>
- </tr>
-
- <tr>
- <td align="right">
- <b><u>P</u>roduct:</b>
- </td><td>
- <label for="product" accesskey="p">
- <select name="product" id="product">
- <option value="TestProduct" selected>TestProduct
- </option>
- </select>
- </label>
- </td>
- <td>&nbsp;</td>
- </tr>
-
-
-
- <tr>
- <td align="right">
- <b>
- <a href="describecomponents.cgi?product=TestProduct">
- Co<u>m</u>ponent</a>:
- </b>
- </td><td>
- <label for="component" accesskey="m">
- <select name="component" id="component">
- <option value="TestComponent" selected>TestComponent
- </option>
- </select>
- </label>
- </td>
- <td>&nbsp;</td>
- </tr>
-
- <tr>
- <td align="right">
- <b>
- <a href="page.cgi?id=fields.html#status">Status</a>:
- </b>
- </td>
- <td>NEW</td>
- </tr>
-
- <tr>
- <td align="right">
- <b>
- <a href="page.cgi?id=fields.html#resolution">Resolution</a>:
- </b>
- </td>
- <td>
- </td>
- </tr>
-
- <tr>
- <td align="right">
- <b>
- <a href="page.cgi?id=fields.html#assigned_to">Assigned&nbsp;To</a>:
- </b>
- </td>
- <td>Robert Elves &lt;relves&#64;cs.ubc.ca&gt;</td>
- </tr>
-
- </table>
-
- </td>
- <td valign="top">
-
- <table cellspacing="1" cellpadding="1">
-
- <tr>
- <td align="right">
- <b><u>H</u>ardware:</b>
- </td><td>
- <label for="rep_platform" accesskey="h">
- <select name="rep_platform" id="rep_platform">
- <option value="All">All
- </option>
- <option value="PC" selected>PC
- </option>
- <option value="Macintosh">Macintosh
- </option>
- <option value="Other">Other
- </option>
- </select>
- </label>
- </td>
- <td>&nbsp;</td>
- </tr>
-
- <tr>
- <td align="right">
- <b><u>O</u>S:</b>
- </td><td>
- <label for="op_sys" accesskey="o">
- <select name="op_sys" id="op_sys">
- <option value="All">All
- </option>
- <option value="Windows">Windows
- </option>
- <option value="Mac OS">Mac OS
- </option>
- <option value="Linux">Linux
- </option>
- <option value="Other" selected>Other
- </option>
- </select>
- </label>
- </td>
- <td>&nbsp;</td>
- </tr>
-
- <tr>
- <td align="right">
- <b><u>V</u>ersion:</b>
- </td><td>
- <label for="version" accesskey="v">
- <select name="version" id="version">
- <option value="other" selected>other
- </option>
- </select>
- </label>
- </td>
- <td>&nbsp;</td>
- </tr>
-
- <tr>
- <td align="right">
- <b><a href="page.cgi?id=fields.html#priority">Pr<u>i</u>ority</a>:</b>
- </td><td>
- <label for="priority" accesskey="i">
- <select name="priority" id="priority">
- <option value="P1">P1
- </option>
- <option value="P2" selected>P2
- </option>
- <option value="P3">P3
- </option>
- <option value="P4">P4
- </option>
- <option value="P5">P5
- </option>
- </select>
- </label>
- </td>
- <td>&nbsp;</td>
- </tr>
-
- <tr>
- <td align="right">
- <b><a href="page.cgi?id=fields.html#bug_severity">S<u>e</u>verity</a>:</b>
- </td><td>
- <label for="bug_severity" accesskey="e">
- <select name="bug_severity" id="bug_severity">
- <option value="blocker">blocker
- </option>
- <option value="critical">critical
- </option>
- <option value="major">major
- </option>
- <option value="normal" selected>normal
- </option>
- <option value="minor">minor
- </option>
- <option value="trivial">trivial
- </option>
- <option value="enhancement">enhancement
- </option>
- </select>
- </label>
- </td>
- <td>&nbsp;</td>
- </tr>
-
-
- </table>
- </td>
-
- <td valign="top">
-
- <table cellpadding="1" cellspacing="1">
-
- <tr>
- <td align="right">
- <b>Reporter:</b>
- </td>
- <td>
- <a href="mailto:relves&#64;cs.ubc.ca">Robert Elves &lt;relves&#64;cs.ubc.ca&gt;</a>
- </td>
- </tr>
-
- <tr>
- <td align="right" valign="top">
- <b><u>A</u>dd&nbsp;CC:</b>
- </td>
- <td><input
- name="newcc"
- value="" accesskey="a" size="30"
->
- </td>
- </tr>
-
- <tr>
- <td align="right" valign="top">
- <b>CC:</b>
- </td>
- <td valign="top">
- <select name="cc" multiple="multiple" size="5">
- <option value="relves&#64;cs.ubc.ca">relves&#64;cs.ubc.ca</option>
- </select>
- <br>
- <input type="checkbox" name="removecc">Remove selected CCs
- <br>
- </td>
- </tr>
-
- </table>
-
- </td>
- </tr>
-
- <tr>
- <td colspan="2">
- <table cellspacing="1" cellpadding="1">
-
-
-
-
- <tr>
- <td align="right">
- <b>
- <u>U</u>RL:
- </b>
- </td>
- <td colspan="5">
- <input name="bug_file_loc" accesskey="u"
- value="" size="60">
- </td>
- </tr>
-
- <tr>
- <td align="right">
- <b><u>S</u>ummary:</b>
- </td>
- <td colspan="5">
- <input name="short_desc" accesskey="s"
- value="summary" size="60">
- </td>
- </tr>
-
-
-
- </table>
- </td>
-
- <td valign="top">
- <table cellspacing="1" cellpadding="1">
- <tr>
- <td colspan="2" valign="top">
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
-
-
-
-<br>
-<table cellspacing="0" cellpadding="4" border="1">
- <tr>
- <th bgcolor="#cccccc" align="left">Attachment</th>
- <th bgcolor="#cccccc" align="left">Type</th>
- <th bgcolor="#cccccc" align="left">Created</th>
- <th bgcolor="#cccccc" align="left">Size</th>
- <th bgcolor="#cccccc" align="left">Actions</th>
- </tr>
-
- <tr>
- <td colspan="4">
- <a href="attachment.cgi?bugid=7&amp;action=enter">Create a New Attachment</a> (proposed patch, testcase, etc.)
- </td>
- <td class="bz_disabled">
- View All
- </td>
- </tr>
-</table>
-<br>
-
-
-
- <table>
- <tr><th align="right">Bug 7 <u>d</u>epends on:</th>
- <td>
- </td>
- <td>
- <input name="dependson" accesskey="d"
- value="">
- </td>
- <td rowspan="2">
- <a href="showdependencytree.cgi?id=7">Show
- dependency tree</a>
-
- <br>
- <a href="showdependencygraph.cgi?id=7">Show
- dependency graph</a>
- </td>
- </tr>
-
- <tr><th align="right">Bug 7 <u>b</u>locks:</th>
- <td>
- </td>
- <td>
- <input name="blocked" accesskey="b"
- value="">
- </td>
- </tr>
- </table>
-
-
-
-
- <br>
- <b>Additional <u>C</u>omments:</b>
- <br>
- <a name="add_comment"></a>
- <textarea name="comment" id="comment" rows="10" cols="80"
- accesskey="c"></textarea>
-
- <br>
- <label for="addselfcc">
- <input type="checkbox" id="addselfcc" name="addselfcc">
- Add to CC list
- </label>
- <br>
-
-<br>
- <input type="radio" id="knob-leave" name="knob" value="none" checked="checked">
- <label for="knob-leave">
- Leave as <b>NEW&nbsp;</b>
- </label>
- <br>
-
-
-
- <input type="radio" id="knob-accept" name="knob" value="accept">
- <label for="knob-accept">
- Accept bug (change
- status to <b>ASSIGNED</b>)
- </label>
- <br>
-
-
- <input type="radio" id="knob-resolve" name="knob" value="resolve">
- <label for="knob-resolve">
- Resolve bug, changing
- <a href="page.cgi?id=fields.html#resolution">resolution</a> to
- </label>
- <select name="resolution"
- onchange="document.changeform.knob[2].checked=true">
- <option value="FIXED">FIXED</option>
- <option value="INVALID">INVALID</option>
- <option value="WONTFIX">WONTFIX</option>
- <option value="LATER">LATER</option>
- <option value="REMIND">REMIND</option>
- <option value="WORKSFORME">WORKSFORME</option>
- </select>
- <br>
-
- <input type="radio" id="knob-duplicate" name="knob" value="duplicate">
- <label for="knob-duplicate">
- Resolve bug, mark it as duplicate of bug #
- </label>
- <input name="dup_id" size="6"
- onchange="if (this.value != '')
- {document.changeform.knob[3].checked=true}">
- <br>
-
- <input type="radio" id="knob-reassign" name="knob" value="reassign">
- <label for="knob-reassign">
- <a href="page.cgi?id=fields.html#assigned_to">Reassign</a> bug to
- </label><input
- name="assigned_to"
- value="relves&#64;cs.ubc.ca" onchange="if ((this.value != 'relves\x40cs.ubc.ca') &amp;&amp; (this.value != '')) {
- document.changeform.knob[4].checked=true;
- }" accesskey="b" size="32"
->
- <br>
-
- <input type="radio" id="knob-reassign-cmp" name="knob" value="reassignbycomponent">
- <label for="knob-reassign-cmp">
- Reassign bug to default assignee
- of selected component
- </label>
- <br>
-
- <input type="submit" value="Commit">
- <input type="hidden" name="form_name" value="process_bug">
- <p>
- <font size="+1">
- <b>
- <a href="show_activity.cgi?id=7">View Bug Activity</a>
- &nbsp; | &nbsp;
- <a href="show_bug.cgi?format=multiple&amp;id=7">Format For Printing</a>
- &nbsp; | &nbsp;
- <a href="enter_bug.cgi?cloned_bug_id=7">Clone This Bug</a>
-
-
- </b>
- </font>
-
- </p>
-
-
-
-<hr>
-<div >
- <table>
- <tr>
- <td align="left">
- <b><a name="c0" href="#c0">Description</a>:</b>&nbsp;&nbsp;<script
- type="text/javascript"><!--
- addReplyLink(0);
- //--></script>
- </td>
- <td align="left" width="30%">
- <b>Opened:</b> 2006-02-13 17:02
- </td>
- </tr>
- </table>
-
-
-
-<pre id="comment_text_0">test summary
-</pre>
- </div>
- <div >
- <br>
- <span class="bz_comment">
- ------- <i>Comment
- <a name="c1" href="#c1">#1</a> From
- <a href="mailto:relves&#64;cs.ubc.ca">Robert Elves</a>
- 2006-02-21 16:34
- </i>
- <script type="text/javascript"><!--
- addReplyLink(1); //--></script>
- -------
- </span>
-
-
-
-<pre id="comment_text_1">out
-</pre>
- </div>
-
-</form>
-
-<hr>
-<i><font color="#777777">First</font></i>
- <i><font color="#777777">Last</font></i>
- <i><font color="#777777">Prev</font></i>
- <i><font color="#777777">Next</font></i>
- &nbsp;&nbsp;
- <i><font color="#777777">No search results available</font></i>
-
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="query.cgi">Search page</a>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="enter_bug.cgi">Enter new bug</a>
-
-<br>
-<div id="footer">
- <div class="intro"></div>
-
-
-
-
-<form method="get" action="show_bug.cgi">
-<div id="useful-links">
- <div id="links-actions">
- <div class="label">Actions:</div>
- <div class="links">
- <a href="./">Home</a> |
- <a href="enter_bug.cgi">New</a> |
- <a href="query.cgi">Search</a> |
- bug # <input class="txt" name="id" size="6">
- <input class="btn" type="submit" value="Find"> |
-
- <a href="report.cgi">Reports</a>
-
- | <a href="request.cgi">Requests</a>
-
-
- | <a href="createaccount.cgi">New&nbsp;Account</a>
- | <a href="index.cgi?GoAheadAndLogIn=1">Log&nbsp;In</a>
- </div>
- </div>
-
-
-
-
-
- <div id="links-saved">
- <div class="label">
- </div>
- <div class="links">
-
- </div>
- </div>
-
-
-</div>
-</form>
-
- <div class="outro"></div>
-</div>
-
-</body>
-</html> \ No newline at end of file
diff --git a/org.eclipse.mylyn.bugzilla.tests/testdata/pages/test-report-2201.html b/org.eclipse.mylyn.bugzilla.tests/testdata/pages/test-report-2201.html
deleted file mode 100644
index f93d6a5c8..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/testdata/pages/test-report-2201.html
+++ /dev/null
@@ -1,859 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-<html>
- <head>
- <title>Bug 125527 - bugzilla refresh incorrect for new reports and newly opened hits</title>
-
-
-
-
-
-
- <script type="text/javascript">
- <!--
-
- function initHelp() {}
- // -->
- </script>
-
- <link href="skins/standard/global.css" rel="stylesheet" type="text/css">
- <link href="skins/custom/global.css" rel="stylesheet" type="text/css">
-
-
-
-
-
- </head>
-
-
-
- <body onload=""
- class="bugs-eclipse-org-bugs bz_bug bz_status_RESOLVED bz_component_Bugzilla bz_bug_125527">
-
-
-<!-- 1.0@bugzilla.org -->
-
-
-
-
-<table width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr style="background-image: url(/bugs/header_bg.gif);">
- <td>
- <a href="http://www.eclipse.org/"><img src="/bugs/header_logo.gif" width="164" height="68" border="0" /></a>
- </td>
- <td align="right" style="color: white; font-family: verdana,arial,helvetica; font-size: 1.25em; font-style: italic;"><b>Eclipse bugs</b></font> <br /><font style="font-size: .5em;">Bugzilla 2.20.1 &#160;</font></td>
- </tr>
-</table>
-
-<div id="header">
- <h1>Bugzilla Bug 125527</h1>
-
- <h2>bugzilla refresh incorrect for new reports and newly opened hits</h2>
-
- <h3>Last modified: 2006-01-27 21:30:34</h3>
-</div>
-<i><font color="#777777">First</font></i>
- <i><font color="#777777">Last</font></i>
- <i><font color="#777777">Prev</font></i>
- <i><font color="#777777">Next</font></i>
- &nbsp;&nbsp;
- <i><font color="#777777">No search results available</font></i>
-
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="query.cgi">Search page</a>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="enter_bug.cgi">Enter new bug</a>
-
-<hr>
-<script type="text/javascript">
- <!--
-
- /* Outputs a link to call replyToComment(); used to reduce HTML output */
- function addReplyLink(id) {
- /* XXX this should really be updated to use the DOM Core's
- * createElement, but finding a container isn't trivial.
- */
- document.write('[<a href="#add_comment" onclick="replyToComment(' +
- id + ');">reply<' + '/a>]');
- }
-
- /* Adds the reply text to the `comment' textarea */
- function replyToComment(id) {
- /* pre id="comment_name_N" */
- var text_elem = document.getElementById('comment_text_'+id);
- var text = getText(text_elem);
-
- /* make sure we split on all newlines -- IE or Moz use \r and \n
- * respectively.
- */
- text = text.split(/\r|\n/);
-
- var replytext = "";
- for (var i=0; i < text.length; i++) {
- replytext += "> " + text[i] + "\n";
- }
-
- replytext = "(In reply to comment #" + id + ")\n" + replytext + "\n";
-
-
- /* <textarea id="comment"> */
- var textarea = document.getElementById('comment');
- textarea.value += replytext;
-
- textarea.focus();
- }
-
- if (typeof Node == 'undefined') {
- /* MSIE doesn't define Node, so provide a compatibility object */
- window.Node = {
- TEXT_NODE: 3,
- ENTITY_REFERENCE_NODE: 5
- };
- }
-
- /* Concatenates all text from element's childNodes. This is used
- * instead of innerHTML because we want the actual text (and
- * innerText is non-standard).
- */
- function getText(element) {
- var child, text = "";
- for (var i=0; i < element.childNodes.length; i++) {
- child = element.childNodes[i];
- var type = child.nodeType;
- if (type == Node.TEXT_NODE || type == Node.ENTITY_REFERENCE_NODE) {
- text += child.nodeValue;
- } else {
- /* recurse into nodes of other types */
- text += getText(child);
- }
- }
- return text;
- }
-
-
- //-->
- </script>
-
-<form name="changeform" method="post" action="process_bug.cgi">
-
- <input type="hidden" name="delta_ts" value="2006-01-27 21:30:34">
- <input type="hidden" name="longdesclength" value="2">
- <input type="hidden" name="id" value="125527">
-
-
-
- <table>
-
- <tr>
- <td valign="top">
- <table cellspacing="1" cellpadding="1">
-
- <tr>
- <td align="right">
- <b>[Technology]</b>
- <b>Bug#:</b>
- </td>
- <td>
- <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=125527">125527</a>
- </td>
- </tr>
-
- <tr>
- <td align="right">
- <b><u>P</u>roduct:</b>
- </td><td>
- <label for="product" accesskey="p">
- <select name="product" id="product">
- <option value="AJDT">AJDT
- </option>
- <option value="ALF">ALF
- </option>
- <option value="AspectJ">AspectJ
- </option>
- <option value="BIRT">BIRT
- </option>
- <option value="BPEL">BPEL
- </option>
- <option value="Buckminster">Buckminster
- </option>
- <option value="CDT">CDT
- </option>
- <option value="Community">Community
- </option>
- <option value="Dali">Dali
- </option>
- <option value="Dash">Dash
- </option>
- <option value="Data Tools">Data Tools
- </option>
- <option value="DSDP">DSDP
- </option>
- <option value="ECF">ECF
- </option>
- <option value="EMF">EMF
- </option>
- <option value="EMFT">EMFT
- </option>
- <option value="EPF">EPF
- </option>
- <option value="Equinox">Equinox
- </option>
- <option value="ERCP">ERCP
- </option>
- <option value="GEF">GEF
- </option>
- <option value="GMF">GMF
- </option>
- <option value="GMT">GMT
- </option>
- <option value="Higgins">Higgins
- </option>
- <option value="Hyades">Hyades
- </option>
- <option value="Java Server Faces">Java Server Faces
- </option>
- <option value="JDT">JDT
- </option>
- <option value="JSR220-ORM">JSR220-ORM
- </option>
- <option value="Laszlo">Laszlo
- </option>
- <option value="Lepido">Lepido
- </option>
- <option value="MDDi">MDDi
- </option>
- <option value="MTJ">MTJ
- </option>
- <option value="Mylar" selected>Mylar
- </option>
- <option value="OHF">OHF
- </option>
- <option value="PDE">PDE
- </option>
- <option value="Phoenix">Phoenix
- </option>
- <option value="Photran">Photran
- </option>
- <option value="Platform">Platform
- </option>
- <option value="PTP">PTP
- </option>
- <option value="SOA">SOA
- </option>
- <option value="Target Management">Target Management
- </option>
- <option value="TPTP">TPTP
- </option>
- <option value="UML2">UML2
- </option>
- <option value="VE">VE
- </option>
- <option value="VTP">VTP
- </option>
- <option value="Web Tools">Web Tools
- </option>
- <option value="XSD">XSD
- </option>
- </select>
- </label>
- </td>
- <td>&nbsp;</td>
- </tr>
-
-
-
- <tr>
- <td align="right">
- <b>
- <a href="describecomponents.cgi?product=Mylar">
- Co<u>m</u>ponent</a>:
- </b>
- </td><td>
- <label for="component" accesskey="m">
- <select name="component" id="component">
- <option value="Bugzilla" selected>Bugzilla
- </option>
- <option value="Core">Core
- </option>
- <option value="Doc">Doc
- </option>
- <option value="Java">Java
- </option>
- <option value="Jira">Jira
- </option>
- <option value="Monitor">Monitor
- </option>
- <option value="Tasks">Tasks
- </option>
- <option value="UI">UI
- </option>
- <option value="XML">XML
- </option>
- <option value="Zest">Zest
- </option>
- </select>
- </label>
- </td>
- <td>&nbsp;</td>
- </tr>
-
- <tr>
- <td align="right">
- <b>
- <a href="page.cgi?id=fields.html#status">Status</a>:
- </b>
- </td>
- <td>RESOLVED</td>
- </tr>
-
- <tr>
- <td align="right">
- <b>
- <a href="page.cgi?id=fields.html#resolution">Resolution</a>:
- </b>
- </td>
- <td>FIXED
- </td>
- </tr>
-
- <tr>
- <td align="right">
- <b>
- <a href="page.cgi?id=fields.html#assigned_to">Assigned&nbsp;To</a>:
- </b>
- </td>
- <td>Robert Elves &lt;relves&#64;cs.ubc.ca&gt;</td>
- </tr>
-
- </table>
-
- </td>
- <td valign="top">
-
- <table cellspacing="1" cellpadding="1">
-
- <tr>
- <td align="right">
- <b><u>H</u>ardware:</b>
- </td><td>
- <label for="rep_platform" accesskey="h">
- <select name="rep_platform" id="rep_platform">
- <option value="All">All
- </option>
- <option value="Macintosh">Macintosh
- </option>
- <option value="Other">Other
- </option>
- <option value="PC" selected>PC
- </option>
- <option value="Power PC">Power PC
- </option>
- <option value="Sun">Sun
- </option>
- </select>
- </label>
- </td>
- <td>&nbsp;</td>
- </tr>
-
- <tr>
- <td align="right">
- <b><u>O</u>S:</b>
- </td><td>
- <label for="op_sys" accesskey="o">
- <select name="op_sys" id="op_sys">
- <option value="All">All
- </option>
- <option value="AIX Motif">AIX Motif
- </option>
- <option value="HP-UX">HP-UX
- </option>
- <option value="Linux">Linux
- </option>
- <option value="Linux-GTK">Linux-GTK
- </option>
- <option value="Linux-Motif">Linux-Motif
- </option>
- <option value="Mac OS">Mac OS
- </option>
- <option value="MacOS X">MacOS X
- </option>
- <option value="Neutrino">Neutrino
- </option>
- <option value="other">other
- </option>
- <option value="QNX-Photon">QNX-Photon
- </option>
- <option value="Solaris">Solaris
- </option>
- <option value="Solaris-GTK">Solaris-GTK
- </option>
- <option value="Solaris-Motif">Solaris-Motif
- </option>
- <option value="SymbianOS-Series 80">SymbianOS-Series 80
- </option>
- <option value="Unix All">Unix All
- </option>
- <option value="Windows All" selected>Windows All
- </option>
- <option value="Windows 95">Windows 95
- </option>
- <option value="Windows 98">Windows 98
- </option>
- <option value="Windows 2000">Windows 2000
- </option>
- <option value="Windows 2003 Server">Windows 2003 Server
- </option>
- <option value="Windows CE">Windows CE
- </option>
- <option value="Windows ME">Windows ME
- </option>
- <option value="Windows Mobile 2003">Windows Mobile 2003
- </option>
- <option value="Windows NT">Windows NT
- </option>
- <option value="Windows XP">Windows XP
- </option>
- </select>
- </label>
- </td>
- <td>&nbsp;</td>
- </tr>
-
- <tr>
- <td align="right">
- <b>Version:</b>
- </td><td>
- <label for="version" accesskey="o">
- <select name="version" id="version">
- <option value="0.2">0.2
- </option>
- <option value="0.3">0.3
- </option>
- <option value="0.4">0.4
- </option>
- <option value="unspecified" selected>unspecified
- </option>
- </select>
- </label>
- </td>
- <td>&nbsp;</td>
- </tr>
-
- <tr>
- <td align="right">
- <b><a href="page.cgi?id=fields.html#priority">Pr<u>i</u>ority</a>:</b>
- </td><td>
- <label for="priority" accesskey="i">
- <select name="priority" id="priority">
- <option value="P1" selected>P1
- </option>
- <option value="P2">P2
- </option>
- <option value="P3">P3
- </option>
- <option value="P4">P4
- </option>
- <option value="P5">P5
- </option>
- </select>
- </label>
- </td>
- <td>&nbsp;</td>
- </tr>
-
- <tr>
- <td align="right">
- <b><a href="page.cgi?id=fields.html#bug_severity">Severity</a>:</b>
- </td><td>
- <label for="bug_severity" accesskey="i">
- <select name="bug_severity" id="bug_severity">
- <option value="blocker">blocker
- </option>
- <option value="critical">critical
- </option>
- <option value="major">major
- </option>
- <option value="normal" selected>normal
- </option>
- <option value="minor">minor
- </option>
- <option value="trivial">trivial
- </option>
- <option value="enhancement">enhancement
- </option>
- </select>
- </label>
- </td>
- <td>&nbsp;</td>
- </tr>
-
- <tr>
- <td align="right">
- <b>
- Target Milestone:
- </b>
- </td><td>
- <label for="target_milestone" accesskey="i">
- <select name="target_milestone" id="target_milestone">
- <option value="---" selected>---
- </option>
- <option value="0.5">0.5
- </option>
- <option value="0.6">0.6
- </option>
- </select>
- </label>
- </td>
- <td>&nbsp;</td>
- </tr>
-
- </table>
- </td>
-
- <td valign="top">
-
- <table cellpadding="1" cellspacing="1">
-
- <tr>
- <td align="right">
- <b>Reporter:</b>
- </td>
- <td>
- <a href="mailto:beatmik&#64;acm.org">Mik Kersten &lt;beatmik&#64;acm.org&gt;</a>
- </td>
- </tr>
-
- <tr>
- <td align="right" valign="top">
- <b><u>A</u>dd&nbsp;CC:</b>
- </td>
- <td><input
- name="newcc"
- value="" accesskey="a" size="30"
->
- </td>
- </tr>
-
- <tr>
- <td align="right" valign="top">
- <b>CC:</b>
- </td>
- <td valign="top">
- <select name="cc" multiple="multiple" size="5">
- <option value="beatmik&#64;acm.org">beatmik&#64;acm.org</option>
- </select>
- <br>
- <input type="checkbox" name="removecc">Remove selected CCs
- <br>
- </td>
- </tr>
-
- </table>
-
- </td>
- </tr>
-
- <tr>
- <td colspan="2">
- <table cellspacing="1" cellpadding="1">
-
-
-
- <tr>
- <td align="right">
- <b><u>Q</u>A Contact:</b>
- </td>
- <td colspan="7"><input
- name="qa_contact"
- value="" accesskey="q" size="60"
->
- </td>
- </tr>
-
- <tr>
- <td align="right">
- <b>
- <u>U</u>RL:
- </b>
- </td>
- <td colspan="5">
- <input name="bug_file_loc" accesskey="u"
- value="" size="60">
- </td>
- </tr>
-
- <tr>
- <td align="right">
- <b><u>S</u>ummary:</b>
- </td>
- <td colspan="5">
- <input name="short_desc" accesskey="s"
- value="bugzilla refresh incorrect for new reports and newly opened hits" size="60">
- </td>
- </tr>
-
- <tr>
- <td align="right">
- <b>Status <u>W</u>hiteboard:</b>
- </td>
- <td colspan="5">
- <input name="status_whiteboard" accesskey="w"
- value="" size="60">
- </td>
- </tr>
-
- <tr>
- <td align="right">
- <b>
- <a href="describekeywords.cgi"><u>K</u>eywords</a>:
- </b>
- <td colspan="5">
- <input name="keywords" accesskey="k"
- value="" size="60">
- </td>
- </tr>
-
- </table>
- </td>
-
- <td valign="top">
- <table cellspacing="1" cellpadding="1">
- <tr>
- <td colspan="2" valign="top">
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
-
-
-
-<br>
-<table cellspacing="0" cellpadding="4" border="1">
- <tr>
- <th bgcolor="#cccccc" align="left">Attachment</th>
- <th bgcolor="#cccccc" align="left">Type</th>
- <th bgcolor="#cccccc" align="left">Created</th>
- <th bgcolor="#cccccc" align="left">Size</th>
- <th bgcolor="#cccccc" align="left">Actions</th>
- </tr>
-
- <tr>
- <td colspan="4">
- <a href="attachment.cgi?bugid=125527&amp;action=enter">Create a New Attachment</a> (proposed patch, testcase, etc.)
- </td>
- <td class="bz_disabled">
- View All
- </td>
- </tr>
-</table>
-<br>
-
-
-
- <table>
- <tr><th align="right">Bug 125527 depends on:</th>
- <td>
- </td>
- <td>
- <input name="dependson" accesskey="i"
- value="">
- </td>
- <td rowspan="2">
- <a href="showdependencytree.cgi?id=125527">Show
- dependency tree</a>
-
- </td>
- </tr>
-
- <tr><th align="right">Bug 125527 <u>b</u>locks:</th>
- <td>
- </td>
- <td>
- <input name="blocked" accesskey="b"
- value="">
- </td>
- </tr>
- </table>
-
- <table>
- <tr>
- <th>
- <a href="page.cgi?id=voting.html">Votes</a>:
- </th>
- <td>0&nbsp;&nbsp;&nbsp;
- <a href="votes.cgi?action=show_bug&amp;bug_id=125527">Show
- votes for this bug</a>&nbsp;&nbsp;&nbsp;
- <a href="votes.cgi?action=show_user&amp;bug_id=125527#vote_125527">Vote
- for this bug</a>
- </td>
- </tr>
- </table>
-
-
-
- <br>
- <b>Additional <u>C</u>omments:</b>
- <br>
- <a name="add_comment"></a>
- <textarea name="comment" id="comment" rows="10" cols="80"
- accesskey="c"></textarea>
-
- <br>
- <label for="addselfcc">
- <input type="checkbox" id="addselfcc" name="addselfcc">
- Add to CC list
- </label>
- <br>
-
-<br>
- <input type="radio" id="knob-leave" name="knob" value="none" checked="checked">
- <label for="knob-leave">
- Leave as <b>RESOLVED&nbsp;FIXED</b>
- </label>
- <br>
-
-
-
-
- <input type="radio" id="knob-reopen" name="knob" value="reopen">
- <label for="knob-reopen">
- Reopen bug
- </label>
- <br>
- <input type="radio" id="knob-verify" name="knob" value="verify">
- <label for="knob-verify">
- Mark bug as <b>VERIFIED</b>
- </label>
- <br>
- <input type="radio" id="knob-close" name="knob" value="close">
- <label for="knob-close">
- Mark bug as <b>CLOSED</b>
- </label>
- <br>
-
- <input type="submit" value="Commit">
- <input type="hidden" name="form_name" value="process_bug">
- <p>
- <font size="+1">
- <b>
- <a href="show_activity.cgi?id=125527">View Bug Activity</a>
- &nbsp; | &nbsp;
- <a href="show_bug.cgi?format=multiple&amp;id=125527">Format For Printing</a>
- &nbsp; | &nbsp;
- <a href="enter_bug.cgi?cloned_bug_id=125527">Clone This Bug</a>
-
-
- </b>
- </font>
-
- </p>
-
-
-
-<hr>
-<div >
- <table>
- <tr>
- <td align="left">
- <b><a name="c0" href="show_bug.cgi?id=125527#c0">
- Description</a>:</b>&nbsp;&nbsp;<script type="text/javascript"><!--
- addReplyLink(0);
- //--></script>
- </td>
- <td align="left" width="30%">
- <b>Opened:</b> 2006-01-27 13:36
- </td>
- </tr>
- </table>
-
-
-
-<pre id="comment_text_0">After bug report is added, description is always blank, and it's opened in
-wrong editor (ExistingBugEditor, not MylarTaskEditor).
-
-After hit is opened and becomes a task, task stays italic.
-</pre>
- </div>
- <div >
- <br>
- <span class="bz_comment">
- ------- <i>Comment
- <a name="c1" href="show_bug.cgi?id=125527#c1">
- #1</a> From
- <a href="mailto:beatmik&#64;acm.org">Mik Kersten</a>
- 2006-01-27 21:30
- </i>
- <script type="text/javascript"><!--
- addReplyLink(1); //--></script>
- -------
- </span>
-
-
-
-<pre id="comment_text_1">Done.
-</pre>
- </div>
-
-</form>
-
-<hr>
-<i><font color="#777777">First</font></i>
- <i><font color="#777777">Last</font></i>
- <i><font color="#777777">Prev</font></i>
- <i><font color="#777777">Next</font></i>
- &nbsp;&nbsp;
- <i><font color="#777777">No search results available</font></i>
-
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="query.cgi">Search page</a>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="enter_bug.cgi">Enter new bug</a>
-
-<br>
-<div id="footer">
- <div class="intro"></div>
-
-
-
-
-<form method="get" action="show_bug.cgi">
-<div id="useful-links">
- <div id="links-actions">
- <div class="label">Actions:</div>
- <div class="links">
- <a href="./">Home</a> |
- <a href="enter_bug.cgi">New</a> |
- <a href="query.cgi">Search</a> |
- bug # <input class="txt" name="id" size="6">
- <input class="btn" type="submit" value="Find"> |
-
- <a href="report.cgi">Reports</a>
-
- | <a href="request.cgi">Requests</a>
-
-
- | <a href="createaccount.cgi">New&nbsp;Account</a>
- | <a href="index.cgi?GoAheadAndLogIn=1">Log&nbsp;In</a>
- </div>
- </div>
-
-
-
-
-
- <div id="links-saved">
- <div class="label">
- </div>
- <div class="links">
-
- </div>
- </div>
-
-
-</div>
-</form>
-
- <div class="outro"></div>
-</div>
-
-</body>
-</html> \ No newline at end of file
diff --git a/org.eclipse.mylyn.bugzilla.tests/testdata/pages/test-report-222attachment.html b/org.eclipse.mylyn.bugzilla.tests/testdata/pages/test-report-222attachment.html
deleted file mode 100644
index 6248ce40d..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/testdata/pages/test-report-222attachment.html
+++ /dev/null
@@ -1,859 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-<html>
- <head>
- <title>Bug 4 - Another Test</title>
-
-
-<link rel="Top" href="http://mylar.eclipse.org/bugs222/">
-
-
- <link rel="Up" href="buglist.cgi?regetlastlist=1">
-
- <link rel="First" href="show_bug.cgi?id=1">
- <link rel="Last" href="show_bug.cgi?id=4">
-
-
-
- <link rel="Prev" href="show_bug.cgi?id=3">
-
-
-
-
-
- <link rel="Show" title="Dependency Tree"
- href="showdependencytree.cgi?id=4">
- <link rel="Show" title="Dependency Graph"
- href="showdependencygraph.cgi?id=4">
-
-
- <link rel="Show" title="Bug Activity"
- href="show_activity.cgi?id=4">
-
- <link rel="Show" title="Printer-Friendly Version"
- href="show_bug.cgi?format=multiple&amp;id=4">
-
-
-
- <link rel="Saved&nbsp;Searches" title="My Bugs"
- href="buglist.cgi?bug_status=UNCONFIRMED&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;emailassigned_to1=1&amp;emailreporter1=1&amp;emailtype1=exact&amp;email1=relves%40cs.ubc.ca&amp;field0-0-0=bug_status&amp;type0-0-0=notequals&amp;value0-0-0=UNCONFIRMED&amp;field0-0-1=reporter&amp;type0-0-1=equals&amp;value0-0-1=relves%40cs.ubc.ca">
-
-
- <link rel="Administration" title="Parameters"
- href="editparams.cgi"><link rel="Administration" title="Users"
- href="editusers.cgi"><link rel="Administration" title="Products"
- href="editproducts.cgi"><link rel="Administration" title="Flag Types"
- href="editflagtypes.cgi"><link rel="Administration" title="Groups"
- href="editgroups.cgi"><link rel="Administration" title="Keywords"
- href="editkeywords.cgi"><link rel="Administration" title="Whining"
- href="editwhines.cgi"><link rel="Administration" title="Sanity Check"
- href="sanitycheck.cgi">
-
-
-
- <script type="text/javascript">
- <!--
-
- function initHelp() {}
- // -->
- </script>
-
- <link href="skins/standard/global.css" rel="stylesheet" type="text/css">
-
- <link href="skins/custom/global.css" rel="stylesheet" type="text/css">
-
-
-
-
-
- </head>
-
-
-
- <body onload=""
- class="mylar-eclipse-org-bugs222 bz_bug bz_status_NEW bz_component_TestComponent bz_bug_4">
-
-
-<div id="banner">
- <div class="intro"></div>
-
- <p id="banner-name">
- <span>This is Bugzilla</span>
- </p>
- <p id="banner-version">
- <a href="http://www.bugzilla.org/"><span>Bugzilla</span></a>
- <span>Version 2.22rc1</span>
- </p>
-
- <div class="outro"></div>
- </div>
-
-<div id="header">
- <h1>Bugzilla Bug 4</h1>
-
- <h2>Another Test</h2>
-
- <h3>Last modified: 2006-03-10 14:11:48</h3>
-
-</div>
-
-<b>Bug List:</b>
- (4 of 4)
-
- <a href="show_bug.cgi?id=1">First</a>
- <a href="show_bug.cgi?id=4">Last</a>
-
- <a href="show_bug.cgi?id=3">Prev</a>
-
- <i><font color="#777777">Next</font></i>
-
- &nbsp;&nbsp;<a href="buglist.cgi?regetlastlist=1">Show last search results</a>
-
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="query.cgi">Search page</a>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="enter_bug.cgi">Enter new bug</a>
-
-<hr>
-<script type="text/javascript">
- <!--
-
- /* Outputs a link to call replyToComment(); used to reduce HTML output */
- function addReplyLink(id) {
- /* XXX this should really be updated to use the DOM Core's
- * createElement, but finding a container isn't trivial.
- */
- document.write('[<a href="#add_comment" onclick="replyToComment(' +
- id + ');">reply<' + '/a>]');
- }
-
- /* Adds the reply text to the `comment' textarea */
- function replyToComment(id) {
- /* pre id="comment_name_N" */
- var text_elem = document.getElementById('comment_text_'+id);
- var text = getText(text_elem);
-
- /* make sure we split on all newlines -- IE or Moz use \r and \n
- * respectively.
- */
- text = text.split(/\r|\n/);
-
- var replytext = "";
- for (var i=0; i < text.length; i++) {
- replytext += "> " + text[i] + "\n";
- }
-
- replytext = "(In reply to comment #" + id + ")\n" + replytext + "\n";
-
-
- /* <textarea id="comment"> */
- var textarea = document.getElementById('comment');
- textarea.value += replytext;
-
- textarea.focus();
- }
-
- if (typeof Node == 'undefined') {
- /* MSIE doesn't define Node, so provide a compatibility object */
- window.Node = {
- TEXT_NODE: 3,
- ENTITY_REFERENCE_NODE: 5
- };
- }
-
- /* Concatenates all text from element's childNodes. This is used
- * instead of innerHTML because we want the actual text (and
- * innerText is non-standard).
- */
- function getText(element) {
- var child, text = "";
- for (var i=0; i < element.childNodes.length; i++) {
- child = element.childNodes[i];
- var type = child.nodeType;
- if (type == Node.TEXT_NODE || type == Node.ENTITY_REFERENCE_NODE) {
- text += child.nodeValue;
- } else {
- /* recurse into nodes of other types */
- text += getText(child);
- }
- }
- return text;
- }
-
-
- function updateCommentTagControl(checkbox, form) {
- if (checkbox.checked) {
- form.comment.className='bz_private';
- } else {
- form.comment.className='';
- }
- }
-
- //-->
- </script>
-
-<form name="changeform" method="post" action="process_bug.cgi">
-
- <input type="hidden" name="delta_ts" value="2006-03-10 14:11:48">
-
- <input type="hidden" name="longdesclength" value="2">
- <input type="hidden" name="id" value="4">
-
-
-
- <table>
-
- <tr>
- <td valign="top">
- <table cellspacing="1" cellpadding="1">
- <tr>
-
- <td align="right">
- <b>Bug#:</b>
- </td>
- <td>
- <a href="http://mylar.eclipse.org/bugs222/show_bug.cgi?id=4">4</a>
- </td>
- </tr>
-
- <tr>
- <td align="right">
- <b><u>P</u>roduct:</b>
- </td><td>
- <label for="product" accesskey="p">
- <select name="product" id="product">
- <option value="TestProduct" selected>TestProduct
- </option>
-
- </select>
- </label>
- </td>
- </tr>
-
-
-
- <tr>
- <td align="right">
- <b>
- <a href="describecomponents.cgi?product=TestProduct">
-
- Co<u>m</u>ponent</a>:
- </b>
- </td><td>
- <label for="component" accesskey="m">
- <select name="component" id="component">
- <option value="TestComponent" selected>TestComponent
- </option>
- </select>
-
- </label>
- </td>
- </tr>
-
- <tr>
- <td align="right">
- <b>
- <a href="page.cgi?id=fields.html#status">Status</a>:
- </b>
-
- </td>
- <td>NEW</td>
- </tr>
-
- <tr>
- <td align="right">
- <b>
- <a href="page.cgi?id=fields.html#resolution">Resolution</a>:
- </b>
-
- </td>
- <td>
- </td>
- </tr>
-
- <tr>
- <td align="right">
- <b>
- <a href="page.cgi?id=fields.html#assigned_to">Assigned&nbsp;To</a>:
- </b>
-
- </td>
- <td>Robert Elves &lt;relves&#64;cs.ubc.ca&gt;</td>
- </tr>
-
- </table>
-
- </td>
- <td valign="top">
-
- <table cellspacing="1" cellpadding="1">
-
- <tr>
- <td align="right">
- <b><u>H</u>ardware:</b>
- </td><td>
- <label for="rep_platform" accesskey="h">
- <select name="rep_platform" id="rep_platform">
-
- <option value="All">All
- </option>
- <option value="PC" selected>PC
- </option>
- <option value="Macintosh">Macintosh
- </option>
- <option value="Other">Other
- </option>
- </select>
- </label>
- </td>
-
- </tr>
-
- <tr>
- <td align="right">
- <b><u>O</u>S:</b>
- </td><td>
- <label for="op_sys" accesskey="o">
- <select name="op_sys" id="op_sys">
-
- <option value="All">All
- </option>
- <option value="Windows">Windows
- </option>
- <option value="Mac OS">Mac OS
- </option>
- <option value="Linux">Linux
- </option>
- <option value="Other" selected>Other
- </option>
- </select>
-
- </label>
- </td>
- </tr>
-
- <tr>
- <td align="right">
- <b>Version:</b>
- </td><td>
- <label for="version" accesskey="o">
-
- <select name="version" id="version">
- <option value="other" selected>other
- </option>
- </select>
- </label>
- </td>
- </tr>
-
- <tr>
- <td align="right">
-
- <b><a href="page.cgi?id=fields.html#priority">Pr<u>i</u>ority</a>:</b>
- </td><td>
- <label for="priority" accesskey="i">
- <select name="priority" id="priority">
- <option value="P1">P1
- </option>
- <option value="P2">P2
- </option>
-
- <option value="P3" selected>P3
- </option>
- <option value="P4">P4
- </option>
- <option value="P5">P5
- </option>
- </select>
- </label>
- </td>
- </tr>
-
- <tr>
- <td align="right">
- <b><a href="page.cgi?id=fields.html#bug_severity">Severity</a>:</b>
- </td><td>
- <label for="bug_severity" accesskey="i">
- <select name="bug_severity" id="bug_severity">
- <option value="blocker">blocker
- </option>
-
- <option value="critical">critical
- </option>
- <option value="major">major
- </option>
- <option value="normal" selected>normal
- </option>
- <option value="minor">minor
- </option>
- <option value="trivial">trivial
- </option>
- <option value="enhancement">enhancement
- </option>
-
- </select>
- </label>
- </td>
- </tr>
-
- <tr>
- <td align="right">
- <b>
- Target Milestone:
- </b>
-
- </td><td>
- <label for="target_milestone" accesskey="i">
- <select name="target_milestone" id="target_milestone">
- <option value="---" selected>---
- </option>
- </select>
- </label>
- </td>
- </tr>
-
- </table>
- </td>
-
- <td valign="top">
-
- <table cellpadding="1" cellspacing="1">
-
- <tr>
- <td align="right">
- <b>Reporter:</b>
-
- </td>
- <td>
- <a href="mailto:relves&#64;cs.ubc.ca">Robert Elves &lt;relves&#64;cs.ubc.ca&gt;</a>
- </td>
- </tr>
-
- <tr>
- <td align="right" valign="top">
-
- <b><u>A</u>dd&nbsp;CC:</b>
- </td>
- <td><input
- name="newcc"
- value="" accesskey="a" size="30"
->
- </td>
- </tr>
-
- <tr>
- <td align="right" valign="top">
-
- <b>CC:</b>
- </td>
- <td valign="top">
- <input type="hidden" name="cc" value="">
- </td>
- </tr>
-
- </table>
-
- </td>
- </tr>
-
- <tr>
- <td colspan="2">
- <table cellspacing="1" cellpadding="1">
-
-
-
-
- <tr>
- <td align="right">
- <b>
-
- <u>U</u>RL:
- </b>
- </td>
- <td colspan="5">
- <input name="bug_file_loc" accesskey="u"
- value="" size="60">
- </td>
- </tr>
-
- <tr>
-
- <td align="right">
- <b><u>S</u>ummary:</b>
- </td>
- <td colspan="5">
- <input name="short_desc" accesskey="s"
- value="Another Test" size="60">
- </td>
- </tr>
-
-
- </table>
- </td>
-
- <td valign="top">
- <table cellspacing="1" cellpadding="1">
- <tr>
- <td colspan="2" valign="top">
- </td>
-
- </tr>
- </table>
- </td>
- </tr>
- </table>
-
-
-
-<br>
-<table cellspacing="0" cellpadding="4" border="1">
- <tr>
-
- <th bgcolor="#cccccc" align="left">Attachment</th>
- <th bgcolor="#cccccc" align="left">Type</th>
- <th bgcolor="#cccccc" align="left">Creator</th>
- <th bgcolor="#cccccc" align="left">Created</th>
- <th bgcolor="#cccccc" align="left">Size</th>
- <th bgcolor="#cccccc" align="left">Actions</th>
-
- </tr>
- <tr >
- <td valign="top">
- <a href="attachment.cgi?id=1">Testing upload</a>
- </td>
-
- <td valign="top">text/plain
- </td>
-
- <td valign="top">
-
- <a href="mailto:relves&#64;cs.ubc.ca">Robert Elves
- </a>
- </td>
- <td valign="top">2006-03-10 14:11</td>
- <td valign="top">6.87 KB</td>
-
-
- <td valign="top">
- <a href="attachment.cgi?id=1&amp;action=edit">Edit</a>
-
- </td>
- </tr>
-
- <tr>
- <td colspan="5">
- <a href="attachment.cgi?bugid=4&amp;action=enter">Create a New Attachment</a> (proposed patch, testcase, etc.)
- </td>
- <td>
- <a href="attachment.cgi?bugid=4&amp;action=viewall">View All</a>
-
- </td>
- </tr>
-</table>
-<br>
-
-
-
- <table>
- <tr><th align="right">Bug 4 depends on:</th>
- <td>
- </td>
-
- <td>
- <input name="dependson" accesskey="i"
- value="">
- </td>
- <td rowspan="2">
- <a href="showdependencytree.cgi?id=4">Show
- dependency tree</a>
-
- <br>
- <a href="showdependencygraph.cgi?id=4">Show
- dependency graph</a>
-
- </td>
- </tr>
-
- <tr><th align="right">Bug 4 <u>b</u>locks:</th>
- <td>
- </td>
- <td>
- <input name="blocked" accesskey="b"
- value="">
-
- </td>
- </tr>
- </table>
-
-
-
-
- <br>
- <b>Additional <u>C</u>omments:</b>
-
- <br>
- <a name="add_comment"></a>
- <textarea name="comment" id="comment" rows="10" cols="80"
- accesskey="c"></textarea>
-
- <br>
- <label for="addselfcc">
- <input type="checkbox" id="addselfcc" name="addselfcc">
- Add relves&#64;cs.ubc.ca to CC list
- </label>
-
- <br>
-
-<br>
- <input type="radio" id="knob-leave" name="knob" value="none" checked="checked">
- <label for="knob-leave">
- Leave as <b>NEW&nbsp;</b>
- </label>
- <br>
-
-
- <input type="radio" id="knob-accept" name="knob" value="accept">
- <label for="knob-accept">
- Accept bug (change
- status to <b>ASSIGNED</b>)
- </label>
- <br>
-
-
- <input type="radio" id="knob-resolve" name="knob" value="resolve">
-
- <label for="knob-resolve">
- Resolve bug, changing
- <a href="page.cgi?id=fields.html#resolution">resolution</a> to
- </label>
- <select name="resolution"
- onchange="document.changeform.knob[2].checked=true">
- <option value="FIXED">FIXED</option>
- <option value="INVALID">INVALID</option>
- <option value="WONTFIX">WONTFIX</option>
-
- <option value="LATER">LATER</option>
- <option value="REMIND">REMIND</option>
- <option value="WORKSFORME">WORKSFORME</option>
- </select>
- <br>
-
- <input type="radio" id="knob-duplicate" name="knob" value="duplicate">
- <label for="knob-duplicate">
-
- Resolve bug, mark it as duplicate of bug #
- </label>
- <input name="dup_id" size="6"
- onchange="if (this.value != '')
- {document.changeform.knob[3].checked=true}">
- <br>
-
- <input type="radio" id="knob-reassign" name="knob" value="reassign">
- <label for="knob-reassign">
- <a href="page.cgi?id=fields.html#assigned_to">Reassign</a> bug to
- </label><input
- name="assigned_to"
- value="relves&#64;cs.ubc.ca" onchange="if ((this.value != 'relves\x40cs.ubc.ca') &amp;&amp; (this.value != '')) {
- document.changeform.knob[4].checked=true;
- }" accesskey="b" size="32"
->
-
- <br>
-
- <input type="radio" id="knob-reassign-cmp" name="knob" value="reassignbycomponent">
- <label for="knob-reassign-cmp">
- Reassign bug to default assignee
- of selected component
- </label>
- <br>
-
- <input type="submit" value="Commit">
- <input type="hidden" name="form_name" value="process_bug">
-
- <p>
- <font size="+1">
- <b>
- <a href="show_activity.cgi?id=4">View Bug Activity</a>
- &nbsp; | &nbsp;
- <a href="show_bug.cgi?format=multiple&amp;id=4">Format For Printing</a>
- &nbsp; | &nbsp;
-
- <a href="show_bug.cgi?ctype=xml&amp;id=4">XML</a>
- &nbsp; | &nbsp;
- <a href="enter_bug.cgi?cloned_bug_id=4">Clone This Bug</a>
-
-
- </b>
- </font>
-
- </p>
-
-
-
-<hr>
-<script type="text/javascript">
- <!--
- function updateCommentPrivacy(checkbox, id) {
- var text_elem = document.getElementById('comment_text_'+id);
- if (checkbox.checked) {
- text_elem.parentNode.className='bz_private';
- } else {
- text_elem.parentNode.className='';
- }
- }
- //-->
- </script>
-
-
-
-
-
-
-
-
-<div >
- <table>
-
- <tr>
- <td align="left">
- <b><a name="c0" href="show_bug.cgi?id=4#c0">
- Description</a>:</b>&nbsp;&nbsp;<script type="text/javascript"><!--
- addReplyLink(0);
- //--></script>
- </td>
- <td align="left" width="30%">
- <b>Opened:</b> 2006-03-09 13:09
- </td>
-
- </tr>
- </table>
-
-
-
-<pre id="comment_text_0">Testing new 2.22 version capability
-</pre>
- </div>
- <div >
- <br>
- <span class="bz_comment">
- ------- <i>Comment
- <a name="c1" href="show_bug.cgi?id=4#c1">
-
- #1</a> From
- <a href="mailto:relves&#64;cs.ubc.ca">Robert Elves</a>
- 2006-03-10 14:11:48
- </i>
- <script type="text/javascript"><!--
- addReplyLink(1); //--></script>
- -------
- </span>
-
-
-
-<pre id="comment_text_1"><span class=""><a href="attachment.cgi?id=1&amp;action=view" title="Testing upload">Created an attachment (id=1)</a> <a href="attachment.cgi?id=1&amp;action=edit" title="Testing upload">[edit]</a></span>
-
-Testing upload
-
-The comment
-</pre>
- </div>
-
-</form>
-
-<hr>
-<b>Bug List:</b>
- (4 of 4)
-
- <a href="show_bug.cgi?id=1">First</a>
- <a href="show_bug.cgi?id=4">Last</a>
-
- <a href="show_bug.cgi?id=3">Prev</a>
-
- <i><font color="#777777">Next</font></i>
-
- &nbsp;&nbsp;<a href="buglist.cgi?regetlastlist=1">Show last search results</a>
-
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="query.cgi">Search page</a>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="enter_bug.cgi">Enter new bug</a>
-
-<br>
-<div id="footer">
- <div class="intro"></div>
-
-
-
-
-<div id="useful-links">
- <div id="links-actions">
- <div class="label">Actions:</div>
- <div class="links">
-
- <a href="./">Home</a> |
- <a href="enter_bug.cgi">New</a> |
- <a href="query.cgi">Search</a> |
-
- <form action="buglist.cgi" method="get"
- onsubmit="if (this.quicksearch.value == '')
- { alert('Please enter one or more search terms first.');
- return false; } return true;">
- <input class="txt" type="text" name="quicksearch">
- <input class="btn" type="submit" value="Find">
- </form> |
-
- <a href="report.cgi">Reports</a>
-
- | <a href="request.cgi?requester=relves%40cs.ubc.ca&amp;requestee=relves%40cs.ubc.ca&amp;do_union=1&amp;group=type">My Requests</a>
-
-
- | <a href="votes.cgi?action=show_user">My&nbsp;Votes</a>
- | <a href="sanitycheck.cgi">Sanity&nbsp;check</a>
- | <a href="relogin.cgi">Log&nbsp;out</a>&nbsp;relves&#64;cs.ubc.ca
- </div>
- </div>
-
-
- <div id="links-edit">
- <div class="label">Edit:</div>
- <div class="links">
-
- <a href="userprefs.cgi">Prefs</a> | <a href="editparams.cgi">Parameters</a> | <a href="editsettings.cgi">User Preferences</a> | <a href="editusers.cgi">Users</a> | <a href="editproducts.cgi">Products</a> | <a href="editflagtypes.cgi">Flags</a> | <a href="editvalues.cgi">Field Values</a> | <a href="editgroups.cgi">Groups</a> | <a href="editkeywords.cgi">Keywords</a> | <a href="editwhines.cgi">Whining</a>
-
- </div>
- </div>
-
-
-
-
- <div id="links-saved">
- <div class="label">
- Saved&nbsp;Searches:
- </div>
- <div class="links">
- <a href="buglist.cgi?bug_status=UNCONFIRMED&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;emailassigned_to1=1&amp;emailreporter1=1&amp;emailtype1=exact&amp;email1=relves%40cs.ubc.ca&amp;field0-0-0=bug_status&amp;type0-0-0=notequals&amp;value0-0-0=UNCONFIRMED&amp;field0-0-1=reporter&amp;type0-0-1=equals&amp;value0-0-1=relves%40cs.ubc.ca">My&nbsp;Bugs</a>
-
- </div>
- </div>
-
-
-<div id="links-special">
- <div class="label">&nbsp;</div>
- <div class="links">
- <form action="buglist.cgi" method="get">
- <input type="hidden" name="cmdtype" value="doit">
- <input type="hidden" name="remtype" value="asnamed">
-
- <input type="hidden" name="add_bugids" value="1">
- <input type="submit" value="Add"> bugs
- <input type="text" name="bug_ids" size="8" maxlength="80"> to
- the new saved search:
- <input type="text" name="newqueryname" size="20" maxlength="64">
- </form>
- </div>
- </div>
-
-
-</div>
-
- <div class="outro"></div>
-</div>
-
-</body>
-</html>
diff --git a/org.eclipse.mylyn.bugzilla.tests/testdata/pages/ve-page.html b/org.eclipse.mylyn.bugzilla.tests/testdata/pages/ve-page.html
deleted file mode 100644
index e5423da71..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/testdata/pages/ve-page.html
+++ /dev/null
@@ -1,178 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<!-- saved from url=(0054)https://bugs.eclipse.org/bugs/enter_bug.cgi?product=VE -->
-<!-- 1.0@bugzilla.org --><!-- 1.0@bugzilla.org --><HTML><HEAD><TITLE>Enter Bug</TITLE>
-<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<META content="MSHTML 6.00.2800.1400" name=GENERATOR></HEAD>
-<BODY text=#000000 vLink=#551a8b aLink=#ff0000 link=#0000ee bgColor=#ffffff
-onload=""><!-- 1.0@bugzilla.org -->
-<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
- <TBODY>
- <TR>
- <TD width="100%">
- <TABLE cellSpacing=0 cellPadding=0 width="100%" bgColor=#006699
- border=0><TBODY>
- <TR>
- <TD width=116 bgColor=#000000><IMG height=50
- src="VE_files/EclipseBannerPic.jpg" width=115></TD>
- <TD width=637><A href="http://www.eclipse.org/"><IMG height=50
- src="VE_files/gradient.jpg" width=282 border=0></A></TD>
- <TD width=250><IMG height=48 src="VE_files/eproject-simple.gif"
- width=250></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
-<TABLE cellSpacing=0 border=0>
- <TBODY>
- <TR>
- <TD vAlign=top align=left>
- <TABLE cellSpacing=2 cellPadding=0 border=0>
- <TBODY>
- <TR>
- <TD vAlign=top noWrap align=left><FONT size=+1><B>Enter
- Bug</B></FONT> </TD></TR></TBODY></TABLE></TD>
- <TD vAlign=center>&nbsp;</TD>
- <TD vAlign=center align=left>This page lets you enter a new bug into
- Bugzilla.</TD></TR></TBODY></TABLE>
-<FORM action=post_bug.cgi method=post><INPUT type=hidden value=VE name=product>
-<TABLE cellSpacing=2 cellPadding=0 border=0>
- <TBODY>
- <TR>
- <TD><BR></TD></TR>
- <TR>
- <TD></TD>
- <TD colSpan=3><!-- 1.0@bugzilla.org -->Before reporting a bug, please read
- the <A href="https://bugs.eclipse.org/bugs/bugwritinghelp.html">bug
- writing guidelines</A>, please look at the list of <A
- href="https://bugs.eclipse.org/bugs/duplicates.cgi">most frequently
- reported bugs</A>, and please <A
- href="https://bugs.eclipse.org/bugs/query.cgi">search</A> for the bug.
- </TD></TR>
- <TR>
- <TD><BR></TD></TR>
- <TR>
- <TD vAlign=top align=right><STRONG>Reporter:</STRONG></TD>
- <TD vAlign=top>tanya@cs.ubc.ca</TD>
- <TD vAlign=top align=right><STRONG>Product:</STRONG></TD>
- <TD vAlign=top>VE</TD></TR>
- <TR>
- <TD vAlign=top align=right><STRONG>Version:</STRONG> </TD>
- <TD><SELECT size=5 name=version> <OPTION value=0.5.0>0.5.0</OPTION>
- <OPTION value=1.0.0>1.0.0</OPTION> <OPTION value=unspecified
- selected>unspecified</OPTION></SELECT> </TD>
- <TD vAlign=top align=right><STRONG><A
- href="https://bugs.eclipse.org/bugs/describecomponents.cgi?product=VE">Component</A>:
- </STRONG></TD>
- <TD><SELECT size=5 name=component> <OPTION value=CDE>CDE</OPTION>
- <OPTION value=Doc>Doc</OPTION> <OPTION value="Java Core">Java
- Core</OPTION> <OPTION value="Java Model (JEM)">Java Model (JEM)</OPTION>
- <OPTION value=JFC/Swing>JFC/Swing</OPTION> <OPTION
- value=SWT>SWT</OPTION></SELECT> </TD></TR>
- <TR>
- <TD>&nbsp;</TD>
- <TD colSpan=3></TD></TR>
- <TR>
- <TD align=right><STRONG><A
- href="https://bugs.eclipse.org/bugs/bug_status.html#rep_platform">Platform</A>:
- </STRONG></TD>
- <TD><SELECT name=rep_platform> <OPTION value=All>All</OPTION> <OPTION
- value=Macintosh>Macintosh</OPTION> <OPTION value=PC selected>PC</OPTION>
- <OPTION value="Power PC">Power PC</OPTION> <OPTION
- value=Sun>Sun</OPTION> <OPTION value=Other>Other</OPTION></SELECT> </TD>
- <TD align=right><STRONG><A
- href="https://bugs.eclipse.org/bugs/bug_status.html#op_sys">OS</A>:
- </STRONG></TD>
- <TD><SELECT name=op_sys> <OPTION value=All>All</OPTION> <OPTION
- value="AIX Motif">AIX Motif</OPTION> <OPTION value="Windows 95">Windows
- 95</OPTION> <OPTION value="Windows 98">Windows 98</OPTION> <OPTION
- value="Windows CE">Windows CE</OPTION> <OPTION
- value="Windows ME">Windows ME</OPTION> <OPTION
- value="Windows 2000">Windows 2000</OPTION> <OPTION
- value="Windows NT">Windows NT</OPTION> <OPTION value="Windows XP"
- selected>Windows XP</OPTION> <OPTION value="Windows All">Windows
- All</OPTION> <OPTION value="MacOS X">MacOS X</OPTION> <OPTION
- value=Linux>Linux</OPTION> <OPTION value=Linux-GTK>Linux-GTK</OPTION>
- <OPTION value=Linux-Motif>Linux-Motif</OPTION> <OPTION
- value=HP-UX>HP-UX</OPTION> <OPTION value=Neutrino>Neutrino</OPTION>
- <OPTION value=QNX-Photon>QNX-Photon</OPTION> <OPTION
- value=Solaris>Solaris</OPTION> <OPTION value="Unix All">Unix
- All</OPTION> <OPTION value=other>other</OPTION></SELECT> </TD></TR>
- <TR><INPUT type=hidden value=P3 name=priority>
- <TD align=right><STRONG><A
- href="https://bugs.eclipse.org/bugs/bug_status.html#bug_severity">Severity</A>:
- </STRONG></TD>
- <TD><SELECT name=bug_severity> <OPTION value=blocker>blocker</OPTION>
- <OPTION value=critical>critical</OPTION> <OPTION
- value=major>major</OPTION> <OPTION value=normal selected>normal</OPTION>
- <OPTION value=minor>minor</OPTION> <OPTION
- value=trivial>trivial</OPTION> <OPTION
- value=enhancement>enhancement</OPTION></SELECT> </TD></TR>
- <TR>
- <TD>&nbsp;</TD>
- <TD colSpan=3></TD></TR><INPUT type=hidden value=NEW name=bug_status>
- <TR>
- <TD align=right><STRONG><A
- href="https://bugs.eclipse.org/bugs/bug_status.html#assigned_to">Assigned
- To</A>: </STRONG></TD>
- <TD colSpan=3><INPUT size=32 name=assigned_to> (Leave blank to assign to
- default component owner) </TD></TR>
- <TR>
- <TD align=right><STRONG>Cc:</STRONG></TD>
- <TD colSpan=3><INPUT size=45 name=cc> </TD></TR>
- <TR>
- <TD>&nbsp;</TD>
- <TD colSpan=3></TD></TR>
- <TR>
- <TD colSpan=3><INPUT type=hidden size=60 name=bug_file_loc input> </TD></TR>
- <TR>
- <TD align=right><STRONG>Summary:</STRONG></TD>
- <TD colSpan=3><INPUT size=60 name=short_desc> </TD></TR>
- <TR>
- <TD vAlign=top align=right><STRONG>Description:</STRONG></TD>
- <TD colSpan=3><TEXTAREA name=comment rows=10 wrap=hard cols=80></TEXTAREA>
- <BR></TD></TR>
- <TR>
- <TD></TD>
- <TD colSpan=3></TD></TR>
- <TR>
- <TD></TD>
- <TD colSpan=3><INPUT onclick="if (this.form.short_desc.value == '') &#10; { alert('Please enter a summary sentence for this bug.'); &#10; return false; } return true;" type=submit value=" Commit ">
- &nbsp;&nbsp;&nbsp;&nbsp; <INPUT type=submit value="Remember values as bookmarkable template" name=maketemplate>
- </TD></TR>
- <TR>
- <TD></TD>
- <TD colSpan=3><BR>We've made a guess at your operating system and
- platform. Please check them and, if we got it wrong, email
- webmaster@eclipse.org. </TD></TR></TBODY></TABLE><INPUT type=hidden
-value=enter_bug name=form_name> </FORM><!-- 1.0@bugzilla.org -->
-<TABLE border=0>
- <TBODY>
- <TR>
- <TD vAlign=top bgColor=#000000>
- <TABLE cellSpacing=0 cellPadding=10 width="100%" bgColor=lightyellow
- border=0>
- <TBODY>
- <TR>
- <TD>This is <B>Bugzilla</B>: the Mozilla bug system. For more
- information about what Bugzilla is and what it can do, see <A
- href="http://www.bugzilla.org/">bugzilla.org</A>. <BR><!-- 1.0@bugzilla.org -->
- <FORM action=show_bug.cgi method=get>
- <TABLE width="100%">
- <TBODY>
- <TR>
- <TD>Actions: </TD>
- <TD vAlign=center noWrap><A
- href="https://bugs.eclipse.org/bugs/enter_bug.cgi">New</A> |
- <A href="https://bugs.eclipse.org/bugs/query.cgi">Query</A> | <INPUT type=submit value=Find> bug # <INPUT size=6 name=id> |
- <A
- href="https://bugs.eclipse.org/bugs/reports.cgi">Reports</A> |
- <A
- href="https://bugs.eclipse.org/bugs/votes.cgi?action=show_user">My
- Votes</A> </TD>
- <TD>&nbsp;</TD>
- <TD vAlign=center>Edit <A
- href="https://bugs.eclipse.org/bugs/userprefs.cgi">prefs</A> |
- <A
- href="https://bugs.eclipse.org/bugs/relogin.cgi">Log&nbsp;out</A>&nbsp;tanya@cs.ubc.ca
- </TD></TR>
- <TR>
- <TD>Preset&nbsp;Queries: </TD>
- <TD colSpan=3><A
- href="https://bugs.eclipse.org/bugs/buglist.cgi?bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;email1=tanya%40cs.ubc.ca&amp;emailtype1=exact&amp;emailassigned_to1=1&amp;emailreporter1=1">My&nbsp;Bugs</A>
- </TD></TR></TBODY></TABLE></FORM></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></BODY></HTML>
diff --git a/org.eclipse.mylyn.bugzilla.tests/testdata/reports-stacktrace/1.html b/org.eclipse.mylyn.bugzilla.tests/testdata/reports-stacktrace/1.html
deleted file mode 100644
index cf50a3d46..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/testdata/reports-stacktrace/1.html
+++ /dev/null
@@ -1,377 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<!-- saved from url=(0050)https://bugs.eclipse.org/bugs/show_bug.cgi?id=4548 -->
-<!-- 1.0@bugzilla.org --><!-- 1.0@bugzilla.org --><HTML><HEAD><TITLE>Bug 4548 - DCR: TableTree should support icon in 1st column (1G06WFT)</TITLE>
-<META http-equiv=Content-Type content="text/html; charset=iso-8859-1"><LINK
-href="show_bug.cgi?id=36310" rel=Next><LINK href="show_bug.cgi?id=76101"
-rel=Last><LINK href="buglist.cgi?regetlastlist=1" rel=Up><LINK
-href="buglist.cgi?regetlastlist=1" rel=Contents>
-<META content="MSHTML 6.00.2800.1476" name=GENERATOR></HEAD>
-<BODY text=#000000 vLink=#551a8b aLink=#ff0000 link=#0000ee bgColor=#ffffff
-onload=""><!-- 1.0@bugzilla.org -->
-<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
- <TBODY>
- <TR>
- <TD width="100%">
- <TABLE cellSpacing=0 cellPadding=0 width="100%" bgColor=#006699
- border=0><TBODY>
- <TR>
- <TD width=116 bgColor=#000000><IMG height=50
- src="4548_files/EclipseBannerPic.jpg" width=115></TD>
- <TD width=637><A href="http://www.eclipse.org/"><IMG height=50
- src="4548_files/gradient.jpg" width=282 border=0></A></TD>
- <TD width=250><IMG height=48 src="4548_files/eproject-simple.gif"
- width=250></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
-<TABLE cellSpacing=0 border=0>
- <TBODY>
- <TR>
- <TD vAlign=top align=left>
- <TABLE cellSpacing=2 cellPadding=0 border=0>
- <TBODY>
- <TR>
- <TD vAlign=top noWrap align=left><FONT size=+1><B>Bugzilla Bug
- 4548</B></FONT> </TD></TR></TBODY></TABLE></TD>
- <TD vAlign=center>&nbsp;</TD>
- <TD vAlign=center align=left>DCR: TableTree should support icon in 1st
- column (1G06WFT)</TD></TR></TBODY></TABLE><!-- 1.0@bugzilla.org --><B>Bug
-List:</B> <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=36310">First</A> <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=76101">Last</A> (This bug is
-not in your list) &nbsp;&nbsp;<A
-href="https://bugs.eclipse.org/bugs/buglist.cgi?regetlastlist=1">Show list</A>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A
-href="https://bugs.eclipse.org/bugs/query.cgi">Query page</A>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A
-href="https://bugs.eclipse.org/bugs/enter_bug.cgi">Enter new bug</A>
-<HR>
-
-<FORM name=changeform action=process_bug.cgi method=post><INPUT type=hidden
-value=20020527161709 name=delta_ts> <INPUT type=hidden value=2
-name=longdesclength> <INPUT type=hidden value=4548 name=id>
-<TABLE cellSpacing=1 cellPadding=1 border=0>
- <TBODY>
- <TR>
- <TD align=right><B>Bug#:</B> </TD>
- <TD><A href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=4548">4548</A>
- </TD>
- <TD>&nbsp;</TD>
- <TD align=right><B>Platform:</B> </TD>
- <TD><SELECT name=rep_platform> <OPTION value=All selected>All</OPTION>
- <OPTION value=Macintosh>Macintosh</OPTION> <OPTION value=PC>PC</OPTION>
- <OPTION value="Power PC">Power PC</OPTION> <OPTION
- value=Sun>Sun</OPTION> <OPTION value=Other>Other</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD>
- <TD align=right><B>Reporter:</B> </TD>
- <TD>erich_gamma@ch.ibm.com (Erich Gamma) </TD></TR>
- <TR>
- <TD align=right><B>Product:</B> </TD>
- <TD><SELECT name=product> <OPTION value=AJDT>AJDT</OPTION> <OPTION
- value=AspectJ>AspectJ</OPTION> <OPTION value=Birt>Birt</OPTION> <OPTION
- value=CDT>CDT</OPTION> <OPTION value=CME>CME</OPTION> <OPTION
- value=Community>Community</OPTION> <OPTION value=ECESIS>ECESIS</OPTION>
- <OPTION value=ECF>ECF</OPTION> <OPTION value=EMF>EMF</OPTION> <OPTION
- value=Equinox>Equinox</OPTION> <OPTION value=ERCP>ERCP</OPTION> <OPTION
- value=GEF>GEF</OPTION> <OPTION value=GMT>GMT</OPTION> <OPTION
- value=Hyades>Hyades</OPTION> <OPTION value=JDT>JDT</OPTION> <OPTION
- value=OMELET>OMELET</OPTION> <OPTION value=PDE>PDE</OPTION> <OPTION
- value=Platform selected>Platform</OPTION> <OPTION
- value=Pollinate>Pollinate</OPTION> <OPTION
- value=Stellation>Stellation</OPTION> <OPTION value=UML2>UML2</OPTION>
- <OPTION value=VE>VE</OPTION> <OPTION value="Web Tools">Web
- Tools</OPTION> <OPTION value=WSVT>WSVT</OPTION> <OPTION
- value=XSD>XSD</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD>
- <TD align=right><B>OS:</B> </TD>
- <TD><SELECT name=op_sys> <OPTION value=All selected>All</OPTION> <OPTION
- value="AIX Motif">AIX Motif</OPTION> <OPTION value="Windows 95">Windows
- 95</OPTION> <OPTION value="Windows 98">Windows 98</OPTION> <OPTION
- value="Windows CE">Windows CE</OPTION> <OPTION
- value="Windows ME">Windows ME</OPTION> <OPTION
- value="Windows 2000">Windows 2000</OPTION> <OPTION
- value="Windows NT">Windows NT</OPTION> <OPTION
- value="Windows XP">Windows XP</OPTION> <OPTION
- value="Windows All">Windows All</OPTION> <OPTION value="MacOS X">MacOS
- X</OPTION> <OPTION value=Linux>Linux</OPTION> <OPTION
- value=Linux-GTK>Linux-GTK</OPTION> <OPTION
- value=Linux-Motif>Linux-Motif</OPTION> <OPTION
- value=HP-UX>HP-UX</OPTION> <OPTION value=Neutrino>Neutrino</OPTION>
- <OPTION value=QNX-Photon>QNX-Photon</OPTION> <OPTION
- value=Solaris>Solaris</OPTION> <OPTION
- value=Solaris-GTK>Solaris-GTK</OPTION> <OPTION
- value=Solaris-Motif>Solaris-Motif</OPTION> <OPTION value="Unix All">Unix
- All</OPTION> <OPTION value=other>other</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD>
- <TD align=right><B>Add&nbsp;CC:</B> </TD>
- <TD><INPUT size=30 name=newcc> </TD></TR>
- <TR>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/describecomponents.cgi?product=Platform">Component</A>:
- </B></TD>
- <TD><SELECT name=component> <OPTION value=Ant>Ant</OPTION> <OPTION
- value=Compare>Compare</OPTION> <OPTION value=CVS>CVS</OPTION> <OPTION
- value=Debug>Debug</OPTION> <OPTION value=Doc>Doc</OPTION> <OPTION
- value=Help>Help</OPTION> <OPTION value=Intro>Intro</OPTION> <OPTION
- value=Releng>Releng</OPTION> <OPTION value=Resources>Resources</OPTION>
- <OPTION value=Runtime>Runtime</OPTION> <OPTION
- value=Scripting>Scripting</OPTION> <OPTION value=Search>Search</OPTION>
- <OPTION value=SWT selected>SWT</OPTION> <OPTION value=Team>Team</OPTION>
- <OPTION value=Text>Text</OPTION> <OPTION value=UI>UI</OPTION> <OPTION
- value=Update>Update</OPTION> <OPTION value=WebDAV>WebDAV</OPTION></SELECT>
- </TD>
- <TD>&nbsp;</TD>
- <TD align=right><B>Version:</B> </TD>
- <TD><SELECT name=version> <OPTION value=1.0>1.0</OPTION> <OPTION
- value=2.0 selected>2.0</OPTION> <OPTION value=2.0.1>2.0.1</OPTION>
- <OPTION value=2.0.2>2.0.2</OPTION> <OPTION value=2.1>2.1</OPTION>
- <OPTION value=2.1.1>2.1.1</OPTION> <OPTION value=2.1.2>2.1.2</OPTION>
- <OPTION value=2.1.3>2.1.3</OPTION> <OPTION value=3.0>3.0</OPTION>
- <OPTION value=3.0.1>3.0.1</OPTION> <OPTION value=3.1>3.1</OPTION></SELECT>
- </TD>
- <TD>&nbsp;</TD>
- <TD vAlign=top align=right rowSpan=4><B>CC:</B> </TD>
- <TD vAlign=top rowSpan=4><INPUT type=hidden name=cc> </TD></TR>
- <TR>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/bug_status.html">Status</A>: </B></TD>
- <TD>RESOLVED</TD>
- <TD>&nbsp;</TD>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/bug_status.html#priority">Priority</A>:</B>
- </TD>
- <TD><SELECT name=priority> <OPTION value=P1>P1</OPTION> <OPTION
- value=P2>P2</OPTION> <OPTION value=P3>P3</OPTION> <OPTION
- value=P4>P4</OPTION> <OPTION value=P5 selected>P5</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD></TR>
- <TR>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/bug_status.html">Resolution</A>:
- </B></TD>
- <TD>WONTFIX</TD>
- <TD>&nbsp;</TD>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/bug_status.html#severity">Severity</A>:</B>
- </TD>
- <TD><SELECT name=bug_severity> <OPTION value=blocker>blocker</OPTION>
- <OPTION value=critical>critical</OPTION> <OPTION
- value=major>major</OPTION> <OPTION value=normal selected>normal</OPTION>
- <OPTION value=minor>minor</OPTION> <OPTION
- value=trivial>trivial</OPTION> <OPTION
- value=enhancement>enhancement</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD></TR>
- <TR>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/bug_status.html#assigned_to">Assigned&nbsp;To</A>:
- </B></TD>
- <TD>veronika_irvine@ca.ibm.com (Veronika Irvine)</TD>
- <TD>&nbsp;</TD>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/notargetmilestone.html">Target
- Milestone</A>: </B></TD>
- <TD><SELECT name=target_milestone> <OPTION value="2.0 M1">2.0
- M1</OPTION> <OPTION value="2.0 M2">2.0 M2</OPTION> <OPTION
- value="2.0 M3">2.0 M3</OPTION> <OPTION value="2.0 M4">2.0 M4</OPTION>
- <OPTION value="2.0 M5">2.0 M5</OPTION> <OPTION value="2.0 M6">2.0
- M6</OPTION> <OPTION value="2.0 F1">2.0 F1</OPTION> <OPTION
- value="2.0 F2">2.0 F2</OPTION> <OPTION value="2.0 F3">2.0 F3</OPTION>
- <OPTION value="2.0 F4">2.0 F4</OPTION> <OPTION
- value=2.0.1>2.0.1</OPTION> <OPTION value=2.0.2>2.0.2</OPTION> <OPTION
- value=2.1>2.1</OPTION> <OPTION value="2.1 M1">2.1 M1</OPTION> <OPTION
- value="2.1 M2">2.1 M2</OPTION> <OPTION value="2.1 M3">2.1 M3</OPTION>
- <OPTION value="2.1 M4">2.1 M4</OPTION> <OPTION value="2.1 M5">2.1
- M5</OPTION> <OPTION value="2.1 RC1">2.1 RC1</OPTION> <OPTION
- value="2.1 RC2">2.1 RC2</OPTION> <OPTION value="2.1 RC3">2.1
- RC3</OPTION> <OPTION value="2.1 RC4">2.1 RC4</OPTION> <OPTION
- value=2.1.1>2.1.1</OPTION> <OPTION value=2.1.2>2.1.2</OPTION> <OPTION
- value=2.1.3>2.1.3</OPTION> <OPTION value=3.0>3.0</OPTION> <OPTION
- value="3.0 M1">3.0 M1</OPTION> <OPTION value="3.0 M2">3.0 M2</OPTION>
- <OPTION value="3.0 M3">3.0 M3</OPTION> <OPTION value="3.0 M4">3.0
- M4</OPTION> <OPTION value="3.0 M5">3.0 M5</OPTION> <OPTION
- value="3.0 M6">3.0 M6</OPTION> <OPTION value="3.0 M7">3.0 M7</OPTION>
- <OPTION value="3.0 M8">3.0 M8</OPTION> <OPTION value="3.0 M9">3.0
- M9</OPTION> <OPTION value="3.0 RC1">3.0 RC1</OPTION> <OPTION
- value="3.0 RC2">3.0 RC2</OPTION> <OPTION value="3.0 RC3">3.0
- RC3</OPTION> <OPTION value="3.0 RC4">3.0 RC4</OPTION> <OPTION
- value=3.0.1>3.0.1</OPTION> <OPTION value=3.0.2>3.0.2</OPTION> <OPTION
- value=3.1>3.1</OPTION> <OPTION value="3.1 M1">3.1 M1</OPTION> <OPTION
- value="3.1 M2">3.1 M2</OPTION> <OPTION value="3.1 M3">3.1 M3</OPTION>
- <OPTION value="3.1 M4">3.1 M4</OPTION> <OPTION value="3.1 M5">3.1
- M5</OPTION> <OPTION value="3.1 M6">3.1 M6</OPTION> <OPTION value=---
- selected>---</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD></TR>
- <TR>
- <TD align=right><B>URL: </B></TD>
- <TD colSpan=7><INPUT size=60 name=bug_file_loc> </TD></TR>
- <TR>
- <TD align=right><B>Summary:</B> </TD>
- <TD colSpan=7><INPUT size=60
- value="DCR: TableTree should support icon in 1st column (1G06WFT)"
- name=short_desc> </TD></TR>
- <TR>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/describekeywords.cgi">Keywords</A>:
- </B>
- <TD colSpan=7><INPUT size=60 name=keywords> </TD></TR></TBODY></TABLE><!-- 1.0@bugzilla.org --><BR>
-<TABLE cellSpacing=0 cellPadding=4 border=1>
- <TBODY>
- <TR>
- <TH align=left bgColor=#cccccc>Attachment</TH>
- <TH align=left bgColor=#cccccc>Type</TH>
- <TH align=left bgColor=#cccccc>Modified</TH>
- <TH align=left bgColor=#cccccc>Status</TH>
- <TH align=left bgColor=#cccccc>Actions</TH></TR>
- <TR>
- <TD colSpan=4><A
- href="https://bugs.eclipse.org/bugs/attachment.cgi?bugid=4548&amp;action=enter">Create
- a New Attachment</A> (proposed patch, testcase, etc.) </TD>
- <TD><A
- href="https://bugs.eclipse.org/bugs/attachment.cgi?bugid=4548&amp;action=viewall">View
- All</A> </TD></TR></TBODY></TABLE><BR>
-<TABLE>
- <TBODY>
- <TR>
- <TH align=right>Bug 4548 depends on:</TH>
- <TD></TD>
- <TD><INPUT name=dependson> </TD>
- <TD rowSpan=2><A
- href="https://bugs.eclipse.org/bugs/showdependencytree.cgi?id=4548">Show
- dependency tree</A> </TD></TR>
- <TR>
- <TH align=right>Bug 4548 blocks:</TH>
- <TD></TD>
- <TD><INPUT name=blocked> </TD></TR></TBODY></TABLE>
-<TABLE>
- <TBODY>
- <TR>
- <TH><A href="https://bugs.eclipse.org/bugs/votehelp.html">Votes</A>: </TH>
- <TD>0&nbsp;&nbsp;&nbsp; <A
- href="https://bugs.eclipse.org/bugs/votes.cgi?action=show_bug&amp;bug_id=4548">Show
- votes for this bug</A>&nbsp;&nbsp;&nbsp; <A
- href="https://bugs.eclipse.org/bugs/votes.cgi?action=show_user&amp;bug_id=4548">Vote
- for this bug</A> </TD></TR></TBODY></TABLE><BR><B>Additional Comments:</B> <BR><TEXTAREA accessKey=c name=comment rows=10 wrap=hard cols=80></TEXTAREA>
-<BR><BR><INPUT type=radio CHECKED value=none name=knob> Leave as
-<B>RESOLVED&nbsp;WONTFIX</B> <BR><INPUT type=radio value=reopen name=knob>
-Reopen bug <BR><INPUT type=radio value=verify name=knob> Mark bug as
-<B>VERIFIED</B><BR><INPUT type=radio value=close name=knob> Mark bug as
-<B>CLOSED</B><BR><INPUT type=submit value=Commit> <INPUT type=hidden
-value=process_bug name=form_name>
-<P><FONT size=+1><B><A
-href="https://bugs.eclipse.org/bugs/show_activity.cgi?id=4548">View Bug
-Activity</A> &nbsp; | &nbsp; <A
-href="https://bugs.eclipse.org/bugs/long_list.cgi?buglist=4548">Format For
-Printing</A> </B></FONT></P></FORM>
-<TABLE>
- <TBODY>
- <TR>
- <TD align=left><B><A
- href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=4548#c0"
- name=c0>Description</A>: </B></TD>
- <TD align=right width="100%">Opened: 2001-10-11 14:18 </TD></TR></TBODY></TABLE>
-<HR>
-<!-- 1.0@bugzilla.org --><PRE>EG (8/24/00 3:41:25 PM)
- TableTree doesn't support showing an icon in the first column. The icon is eaten up
- by the +/- icon.
- Not being able to have an icon in the first column reduces the applicability
- of TableTree (we would like to use it in the Java plugin, but we can't).
-
-NOTES:
-
-VI (8/24/00 10:54:39 AM)
- TableTree is implemented using the Windows table widget and this only allows
- one image per column. Sorry, there's nothing we can do.
-
-AW (24.08.00 17:31:06)
- Why not combining the +/- icon with the client's icon into a single icon?
-
-EG (8/29/00 3:35:01 PM)
- JFace has support for compositing icons see:
- com.ibm.jface.examples.compositeimage.CompositeImageExample
-
-CM (3/17/01 5:29:49 PM)
- P1/M1 (April 1st, 2001)
- Need to know the priority of 1GAJ9KP: SWT:ALL - TableTree class has no selection support for the SWT.CHECK style
- because these two PRs may conflict.
-
-CM (3/28/01 5:09:33 PM)
- We investigated using the Windows "state image" feature in Table, but this is already being used by
- checkboxes if the Table is created with check style. It would also mean that we would have to provide
- platform-specific public API on Table to allow TableTree class to set/get state images. So we decided
- against this.
-
- VI is going to investigate merging the [+]/[-] images with the user's image. We would try to write it
- in such a way that only those who actually put an image in the first column would have to pay for
- the added slowness. We suspect there may be issues such as background color/transparency
- problems, hit test problems, selection highlight problems, and cheese problems, but we will have
- to try it first before we know for sure.
-
-VI (4/4/2001 10:41:59 AM)
- Two major issues which prevent us from merging the [+]/[-] with the user's image and using the normal first column image:
- 1) Images of different sizes can be added to the control, however the size of the image displayed in the associated
- Windows Common Control will be constrained to the size of the first image added to the ImageList.
- Images for all columns are added to the same ImageList and therefore must have the exact same height and WIDTH.
- This makes merging the +/- and the first column image have impact on every image in the TableTree
- 2) There is a limit to how may images I can cram in the ImageList. Having potentially 3 per row I think will quickly exceed the limit.
-
-VI (4/4/2001 05:20 PM)
-
- We have a PR that requests support for an image in the first column of a TableTree and I believe that you
- are the prime requestor.
-
- I have tried to make this work and below is the best I can do. As you can see, there is a limitation on the
- underlying native widget which is that all images in the TableTree must have the exact same height and width.
- Consequently, when I leave enough room to merge the +/- image with the image you wish to show in the first column,
- this causes all the other images in the TableTree to be stretched width wise.
-
- &lt;picture&gt;
-
- It is my opinion that the current TableTree can not be made to work any better than this. If this is not
- adequate for your use, the only alternative is to write a custom widget that does this and does not
- use the native widget. Writing a full custom widget is not trivial. It will probably require a month or
- two and will probably not give all the capability that is present in native List or Tree widgets (just
- because there are a lot of subtle things going on there and I won't have time to get them all). I need
- to know if I should commence with a custom widget. Also, as I have other responsibilities, Mike and I will
- have to discuss which of them will be set aside before I can do this work.
-
-VI (4/27/2001 8:42:19 AM)
- Have received no feedback requesting a custom Tree or implementation of the solution presented above.
- Moving to Inactive.</PRE><BR><I>------- Additional Comment <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=4548#c1" name=c1>#1</A> From
-<A href="mailto:veronika_irvine@ca.ibm.com">Veronika Irvine</A> 2002-05-27 16:17
-------- </I><PRE>java.lang.NullPointerException Closing this bug report. A new DCR should be raised from a better custom table
-tree.</PRE>
-<HR>
-<!-- 1.0@bugzilla.org --><B>Bug List:</B> <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=36310">First</A> <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=76101">Last</A> (This bug is
-not in your list) &nbsp;&nbsp;<A
-href="https://bugs.eclipse.org/bugs/buglist.cgi?regetlastlist=1">Show list</A>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A
-href="https://bugs.eclipse.org/bugs/query.cgi">Query page</A>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A
-href="https://bugs.eclipse.org/bugs/enter_bug.cgi">Enter new bug</A> <BR><!-- 1.0@bugzilla.org -->
-<TABLE border=0>
- <TBODY>
- <TR>
- <TD vAlign=top bgColor=#000000>
- <TABLE cellSpacing=0 cellPadding=10 width="100%" bgColor=lightyellow
- border=0>
- <TBODY>
- <TR>
- <TD>This is <B>Bugzilla</B>: the Mozilla bug system. For more
- information about what Bugzilla is and what it can do, see <A
- href="http://www.bugzilla.org/">bugzilla.org</A>. <BR><!-- 1.0@bugzilla.org -->
- <FORM action=show_bug.cgi method=get>
- <TABLE width="100%">
- <TBODY>
- <TR>
- <TD>Actions: </TD>
- <TD vAlign=center noWrap><A
- href="https://bugs.eclipse.org/bugs/enter_bug.cgi">New</A> |
- <A href="https://bugs.eclipse.org/bugs/query.cgi">Query</A> | <INPUT type=submit value=Find> bug # <INPUT size=6 name=id> |
- <A
- href="https://bugs.eclipse.org/bugs/reports.cgi">Reports</A>
- </TD>
- <TD>&nbsp;</TD>
- <TD vAlign=center align=right><A
- href="https://bugs.eclipse.org/bugs/createaccount.cgi">New&nbsp;Account</A>
- | <A
- href="https://bugs.eclipse.org/bugs/query.cgi?GoAheadAndLogIn=1">Log&nbsp;In</A>
- </TD></TR></TBODY></TABLE></FORM></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></BODY></HTML>
diff --git a/org.eclipse.mylyn.bugzilla.tests/testdata/reports-stacktrace/2.html b/org.eclipse.mylyn.bugzilla.tests/testdata/reports-stacktrace/2.html
deleted file mode 100644
index 6bae80545..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/testdata/reports-stacktrace/2.html
+++ /dev/null
@@ -1,406 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<!-- saved from url=(0051)https://bugs.eclipse.org/bugs/show_bug.cgi?id=76146 -->
-<!-- 1.0@bugzilla.org --><!-- 1.0@bugzilla.org --><HTML><HEAD><TITLE>Bug 76146 - NPE using quickfix in Aspect opened with java editor</TITLE>
-<META http-equiv=Content-Type content="text/html; charset=iso-8859-1"><LINK
-href="show_bug.cgi?id=36310" rel=Next><LINK href="show_bug.cgi?id=76101"
-rel=Last><LINK href="buglist.cgi?regetlastlist=1" rel=Up><LINK
-href="buglist.cgi?regetlastlist=1" rel=Contents>
-<META content="MSHTML 6.00.2800.1476" name=GENERATOR></HEAD>
-<BODY text=#000000 vLink=#551a8b aLink=#ff0000 link=#0000ee bgColor=#ffffff
-onload=""><!-- 1.0@bugzilla.org -->
-<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
- <TBODY>
- <TR>
- <TD width="100%">
- <TABLE cellSpacing=0 cellPadding=0 width="100%" bgColor=#006699
- border=0><TBODY>
- <TR>
- <TD width=116 bgColor=#000000><IMG height=50
- src="76146_files/EclipseBannerPic.jpg" width=115></TD>
- <TD width=637><A href="http://www.eclipse.org/"><IMG height=50
- src="76146_files/gradient.jpg" width=282 border=0></A></TD>
- <TD width=250><IMG height=48 src="76146_files/eproject-simple.gif"
- width=250></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
-<TABLE cellSpacing=0 border=0>
- <TBODY>
- <TR>
- <TD vAlign=top align=left>
- <TABLE cellSpacing=2 cellPadding=0 border=0>
- <TBODY>
- <TR>
- <TD vAlign=top noWrap align=left><FONT size=+1><B>Bugzilla Bug
- 76146</B></FONT> </TD></TR></TBODY></TABLE></TD>
- <TD vAlign=center>&nbsp;</TD>
- <TD vAlign=center align=left>NPE using quickfix in Aspect opened with java
- editor</TD></TR></TBODY></TABLE><!-- 1.0@bugzilla.org --><B>Bug List:</B> <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=36310">First</A> <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=76101">Last</A> (This bug is
-not in your list) &nbsp;&nbsp;<A
-href="https://bugs.eclipse.org/bugs/buglist.cgi?regetlastlist=1">Show list</A>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A
-href="https://bugs.eclipse.org/bugs/query.cgi">Query page</A>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A
-href="https://bugs.eclipse.org/bugs/enter_bug.cgi">Enter new bug</A>
-<HR>
-
-<FORM name=changeform action=process_bug.cgi method=post><INPUT type=hidden
-value=20041013045125 name=delta_ts> <INPUT type=hidden value=1
-name=longdesclength> <INPUT type=hidden value=76146 name=id>
-<TABLE cellSpacing=1 cellPadding=1 border=0>
- <TBODY>
- <TR>
- <TD align=right><B>Bug#:</B> </TD>
- <TD><A
- href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=76146">76146</A> </TD>
- <TD>&nbsp;</TD>
- <TD align=right><B>Platform:</B> </TD>
- <TD><SELECT name=rep_platform> <OPTION value=All>All</OPTION> <OPTION
- value=Macintosh>Macintosh</OPTION> <OPTION value=PC selected>PC</OPTION>
- <OPTION value="Power PC">Power PC</OPTION> <OPTION
- value=Sun>Sun</OPTION> <OPTION value=Other>Other</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD>
- <TD align=right><B>Reporter:</B> </TD>
- <TD>hawkinsh@uk.ibm.com (Helen Hawkins) </TD></TR>
- <TR>
- <TD align=right><B>Product:</B> </TD>
- <TD><SELECT name=product> <OPTION value=AJDT selected>AJDT</OPTION>
- <OPTION value=AspectJ>AspectJ</OPTION> <OPTION value=Birt>Birt</OPTION>
- <OPTION value=CDT>CDT</OPTION> <OPTION value=CME>CME</OPTION> <OPTION
- value=Community>Community</OPTION> <OPTION value=ECESIS>ECESIS</OPTION>
- <OPTION value=ECF>ECF</OPTION> <OPTION value=EMF>EMF</OPTION> <OPTION
- value=Equinox>Equinox</OPTION> <OPTION value=ERCP>ERCP</OPTION> <OPTION
- value=GEF>GEF</OPTION> <OPTION value=GMT>GMT</OPTION> <OPTION
- value=Hyades>Hyades</OPTION> <OPTION value=JDT>JDT</OPTION> <OPTION
- value=OMELET>OMELET</OPTION> <OPTION value=PDE>PDE</OPTION> <OPTION
- value=Platform>Platform</OPTION> <OPTION
- value=Pollinate>Pollinate</OPTION> <OPTION
- value=Stellation>Stellation</OPTION> <OPTION value=UML2>UML2</OPTION>
- <OPTION value=VE>VE</OPTION> <OPTION value="Web Tools">Web
- Tools</OPTION> <OPTION value=WSVT>WSVT</OPTION> <OPTION
- value=XSD>XSD</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD>
- <TD align=right><B>OS:</B> </TD>
- <TD><SELECT name=op_sys> <OPTION value=All>All</OPTION> <OPTION
- value="AIX Motif">AIX Motif</OPTION> <OPTION value="Windows 95">Windows
- 95</OPTION> <OPTION value="Windows 98">Windows 98</OPTION> <OPTION
- value="Windows CE">Windows CE</OPTION> <OPTION
- value="Windows ME">Windows ME</OPTION> <OPTION
- value="Windows 2000">Windows 2000</OPTION> <OPTION
- value="Windows NT">Windows NT</OPTION> <OPTION value="Windows XP"
- selected>Windows XP</OPTION> <OPTION value="Windows All">Windows
- All</OPTION> <OPTION value="MacOS X">MacOS X</OPTION> <OPTION
- value=Linux>Linux</OPTION> <OPTION value=Linux-GTK>Linux-GTK</OPTION>
- <OPTION value=Linux-Motif>Linux-Motif</OPTION> <OPTION
- value=HP-UX>HP-UX</OPTION> <OPTION value=Neutrino>Neutrino</OPTION>
- <OPTION value=QNX-Photon>QNX-Photon</OPTION> <OPTION
- value=Solaris>Solaris</OPTION> <OPTION
- value=Solaris-GTK>Solaris-GTK</OPTION> <OPTION
- value=Solaris-Motif>Solaris-Motif</OPTION> <OPTION value="Unix All">Unix
- All</OPTION> <OPTION value=other>other</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD>
- <TD align=right><B>Add&nbsp;CC:</B> </TD>
- <TD><INPUT size=30 name=newcc> </TD></TR>
- <TR>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/describecomponents.cgi?product=AJDT">Component</A>:
- </B></TD>
- <TD><SELECT name=component> <OPTION value=Core>Core</OPTION> <OPTION
- value=Doc>Doc</OPTION> <OPTION value=UI selected>UI</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD>
- <TD align=right><B>Version:</B> </TD>
- <TD><SELECT name=version> <OPTION value=1.1.11>1.1.11</OPTION> <OPTION
- value=1.1.12 selected>1.1.12</OPTION> <OPTION value=1.1.3>1.1.3</OPTION>
- <OPTION value=1.1.4>1.1.4</OPTION> <OPTION value=1.1.7>1.1.7</OPTION>
- <OPTION value=1.2.0>1.2.0</OPTION> <OPTION value="1.2.0 M1">1.2.0
- M1</OPTION> <OPTION value=unspecified>unspecified</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD>
- <TD vAlign=top align=right rowSpan=4><B>CC:</B> </TD>
- <TD vAlign=top rowSpan=4><INPUT type=hidden name=cc> </TD></TR>
- <TR>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/bug_status.html">Status</A>: </B></TD>
- <TD>NEW</TD>
- <TD>&nbsp;</TD>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/bug_status.html#priority">Priority</A>:</B>
- </TD>
- <TD><SELECT name=priority> <OPTION value=P1>P1</OPTION> <OPTION
- value=P2>P2</OPTION> <OPTION value=P3 selected>P3</OPTION> <OPTION
- value=P4>P4</OPTION> <OPTION value=P5>P5</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD></TR>
- <TR>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/bug_status.html">Resolution</A>:
- </B></TD>
- <TD></TD>
- <TD>&nbsp;</TD>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/bug_status.html#severity">Severity</A>:</B>
- </TD>
- <TD><SELECT name=bug_severity> <OPTION value=blocker>blocker</OPTION>
- <OPTION value=critical>critical</OPTION> <OPTION
- value=major>major</OPTION> <OPTION value=normal selected>normal</OPTION>
- <OPTION value=minor>minor</OPTION> <OPTION
- value=trivial>trivial</OPTION> <OPTION
- value=enhancement>enhancement</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD></TR>
- <TR>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/bug_status.html#assigned_to">Assigned&nbsp;To</A>:
- </B></TD>
- <TD>mchapman@uk.ibm.com (Matt Chapman)</TD>
- <TD>&nbsp;</TD>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/notargetmilestone.html">Target
- Milestone</A>: </B></TD>
- <TD><SELECT name=target_milestone> <OPTION value=---
- selected>---</OPTION> <OPTION value=1.1.12>1.1.12</OPTION> <OPTION
- value=1.1.13>1.1.13</OPTION> <OPTION value=1.1.3>1.1.3</OPTION> <OPTION
- value=1.1.4>1.1.4</OPTION> <OPTION value=1.2.0>1.2.0</OPTION> <OPTION
- value="1.2.0 M1">1.2.0 M1</OPTION> <OPTION value="1.2.0 M2">1.2.0
- M2</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD></TR>
- <TR>
- <TD align=right><B>URL: </B></TD>
- <TD colSpan=7><INPUT size=60 name=bug_file_loc> </TD></TR>
- <TR>
- <TD align=right><B>Summary:</B> </TD>
- <TD colSpan=7><INPUT size=60
- value="NPE using quickfix in Aspect opened with java editor"
- name=short_desc> </TD></TR>
- <TR>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/describekeywords.cgi">Keywords</A>:
- </B>
- <TD colSpan=7><INPUT size=60 name=keywords> </TD></TR></TBODY></TABLE><!-- 1.0@bugzilla.org --><BR>
-<TABLE cellSpacing=0 cellPadding=4 border=1>
- <TBODY>
- <TR>
- <TH align=left bgColor=#cccccc>Attachment</TH>
- <TH align=left bgColor=#cccccc>Type</TH>
- <TH align=left bgColor=#cccccc>Modified</TH>
- <TH align=left bgColor=#cccccc>Status</TH>
- <TH align=left bgColor=#cccccc>Actions</TH></TR>
- <TR>
- <TD colSpan=4><A
- href="https://bugs.eclipse.org/bugs/attachment.cgi?bugid=76146&amp;action=enter">Create
- a New Attachment</A> (proposed patch, testcase, etc.) </TD>
- <TD><A
- href="https://bugs.eclipse.org/bugs/attachment.cgi?bugid=76146&amp;action=viewall">View
- All</A> </TD></TR></TBODY></TABLE><BR>
-<TABLE>
- <TBODY>
- <TR>
- <TH align=right>Bug 76146 depends on:</TH>
- <TD></TD>
- <TD><INPUT name=dependson> </TD>
- <TD rowSpan=2><A
- href="https://bugs.eclipse.org/bugs/showdependencytree.cgi?id=76146">Show
- dependency tree</A> </TD></TR>
- <TR>
- <TH align=right>Bug 76146 blocks:</TH>
- <TD></TD>
- <TD><INPUT name=blocked> </TD></TR></TBODY></TABLE><BR><B>Additional
-Comments:</B> <BR><TEXTAREA accessKey=c name=comment rows=10 wrap=hard cols=80></TEXTAREA>
-<BR><BR><INPUT type=radio CHECKED value=none name=knob> Leave as
-<B>NEW&nbsp;</B> <BR><INPUT type=radio value=accept name=knob> Accept bug
-(change status to <B>ASSIGNED</B>) <BR><INPUT type=radio value=resolve
-name=knob> Resolve bug, changing <A
-href="https://bugs.eclipse.org/bugs/bug_status.html">resolution</A> to <SELECT
-onchange=document.changeform.knob[2].checked=true name=resolution> <OPTION
- value=FIXED selected>FIXED</OPTION> <OPTION value=INVALID>INVALID</OPTION>
- <OPTION value=WONTFIX>WONTFIX</OPTION> <OPTION value=LATER>LATER</OPTION>
- <OPTION value=REMIND>REMIND</OPTION> <OPTION
- value=WORKSFORME>WORKSFORME</OPTION></SELECT> <BR><INPUT type=radio
-value=duplicate name=knob> Resolve bug, mark it as duplicate of bug # <INPUT
-onchange="if (this.value != '')&#10; {document.changeform.knob[3].checked=true}"
-size=6 name=dup_id> <BR><INPUT type=radio value=reassign name=knob> <A
-href="https://bugs.eclipse.org/bugs/bug_status.html#assigned_to">Reassign</A>
-bug to <INPUT
-onchange="if ((this.value != 'mchapman@uk.ibm.com') &amp;&amp; &#10; (this.value != '')) {&#10; document.changeform.knob[4].checked=true; &#10; }"
-size=32 value=mchapman@uk.ibm.com name=assigned_to> <BR><INPUT type=radio
-value=reassignbycomponent name=knob> Reassign bug to owner of selected component
-<BR><INPUT type=submit value=Commit> <INPUT type=hidden value=process_bug
-name=form_name>
-<P><FONT size=+1><B><A
-href="https://bugs.eclipse.org/bugs/show_activity.cgi?id=76146">View Bug
-Activity</A> &nbsp; | &nbsp; <A
-href="https://bugs.eclipse.org/bugs/long_list.cgi?buglist=76146">Format For
-Printing</A> </B></FONT></P></FORM>
-<TABLE>
- <TBODY>
- <TR>
- <TD align=left><B><A
- href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=76146#c0"
- name=c0>Description</A>: </B></TD>
- <TD align=right width="100%">Opened: 2004-10-13 04:51 </TD></TR></TBODY></TABLE>
-<HR>
-<!-- 1.0@bugzilla.org --><PRE>To recreate:
-
-- Check out the QuickFix project from ajdt.test project
-java.lang.NullPointerException- Open TestAspect.java in the Java Editor (right click &gt; open with &gt; Java
-Editor)
-- Click on the lightbulb with the error marker (the same line as File f = new
-File("tmp");
-java.lang.NullPointerException- An Internal Error appear in the Error log with the following stack trace:
-
-
-
-java.lang.NullPointerException
-at
-org.eclipse.jdt.internal.ui.text.correction.UnresolvedElementsSubProcessor.getT
-ypeProposals(UnresolvedElementsSubProcessor.java:395)
-at org.eclipse.jdt.internal.ui.text.correction.QuickFixProcessor.process
-(QuickFixProcessor.java:270)
-at org.eclipse.jdt.internal.ui.text.correction.QuickFixProcessor.getCorrections
-(QuickFixProcessor.java:202)
-at
-org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor.collectCorr
-ections(JavaCorrectionProcessor.java:240)
-at
-org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor.processAnno
-tations(JavaCorrectionProcessor.java:208)
-at
-org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor.computeComp
-letionProposals(JavaCorrectionProcessor.java:177)
-at
-org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposal
-s(ContentAssistant.java:1472)
-at
-org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals
-(CompletionProposalPopup.java:242)
-at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$7
-(CompletionProposalPopup.java:238)
-at org.eclipse.jface.text.contentassist.CompletionProposalPopup$1.run
-(CompletionProposalPopup.java:197)
-at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
-at org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals
-(CompletionProposalPopup.java:192)
-at
-org.eclipse.jface.text.contentassist.ContentAssistant.showPossibleCompletions
-(ContentAssistant.java:1320)
-at
-org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionAssistant.showPossibl
-eCompletions(JavaCorrectionAssistant.java:159)
-at
-org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor$AdaptedSourceViewe
-r.doOperation(CompilationUnitEditor.java:184)
-at org.eclipse.jdt.internal.ui.javaeditor.JavaSelectAnnotationRulerAction.run
-(JavaSelectAnnotationRulerAction.java:78)
-at org.eclipse.ui.texteditor.AbstractRulerActionDelegate.run
-(AbstractRulerActionDelegate.java:99)
-at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:276)
-at org.eclipse.ui.internal.PluginAction.run(PluginAction.java:238)
-at org.eclipse.ui.texteditor.AbstractTextEditor$11.triggerAction
-(AbstractTextEditor.java:2110)
-at org.eclipse.ui.texteditor.AbstractTextEditor$11.mouseUp
-(AbstractTextEditor.java:2117)
-at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:136)
-at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
-at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
-at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2772)
-at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2431)
-at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1377)
-at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348)
-at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:254)
-at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141)
-at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:96)
-at org.eclipse.core.internal.runtime.PlatformActivator$1.run
-(PlatformActivator.java:335)
-at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:273)
-at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:129)
-at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
-at sun.reflect.NativeMethodAccessorImpl.invoke
-(NativeMethodAccessorImpl.java:39)
-at sun.reflect.DelegatingMethodAccessorImpl.invoke
-(DelegatingMethodAccessorImpl.java:25)
-at java.lang.reflect.Method.invoke(Method.java:324)
-at org.eclipse.core.launcher.Main.basicRun(Main.java:183)
-at org.eclipse.core.launcher.Main.run(Main.java:644)
-at org.eclipse.core.launcher.Main.main(Main.java:628)
-
-
-Looking at the jdt code in UnresolvedElementsSubProcessor.java, at line 395,
-the parent field is null:
-
- ASTNode parent= selectedNode.getParent();
- while (parent.getLength() == selectedNode.getLength()) { // line 395
- parent= parent.getParent();
- }
-
-java.lang.NullPointerException There just needs to be a null check as there is above:
-
-
- ASTNode selectedNode= problem.getCoveringNode(context.getASTRoot());
- if (selectedNode == null) {
- return;
- }
- int kind= SimilarElementsRequestor.ALL_TYPES;
-
- ASTNode parent= selectedNode.getParent();
- while (parent.getLength() == selectedNode.getLength()) {
- parent= parent.getParent();
- }
-
-should become:
-
-
- ASTNode selectedNode= problem.getCoveringNode(context.getASTRoot());
- if (selectedNode == null) {
- return;
- }
- int kind= SimilarElementsRequestor.ALL_TYPES;
-
- ASTNode parent= selectedNode.getParent();
- if (parent == null) {
- return;
- }
- while (parent.getLength() == selectedNode.getLength()) {
- parent= parent.getParent();
- }
-
-
-This needs to be raised as a jdt bug, since we don't pass through any ajdt
-code in order to get here.
-
-Raising this bug against ajdt is just for tracking.
-
-(note this happens on 1.1.12, but also on the latest AJDT dev build).</PRE>
-<HR>
-<!-- 1.0@bugzilla.org --><B>Bug List:</B> <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=36310">First</A> <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=76101">Last</A> (This bug is
-not in your list) &nbsp;&nbsp;<A
-href="https://bugs.eclipse.org/bugs/buglist.cgi?regetlastlist=1">Show list</A>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A
-href="https://bugs.eclipse.org/bugs/query.cgi">Query page</A>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A
-href="https://bugs.eclipse.org/bugs/enter_bug.cgi">Enter new bug</A> <BR><!-- 1.0@bugzilla.org -->
-<TABLE border=0>
- <TBODY>
- <TR>
- <TD vAlign=top bgColor=#000000>
- <TABLE cellSpacing=0 cellPadding=10 width="100%" bgColor=lightyellow
- border=0>
- <TBODY>
- <TR>
- <TD>This is <B>Bugzilla</B>: the Mozilla bug system. For more
- information about what Bugzilla is and what it can do, see <A
- href="http://www.bugzilla.org/">bugzilla.org</A>. <BR><!-- 1.0@bugzilla.org -->
- <FORM action=show_bug.cgi method=get>
- <TABLE width="100%">
- <TBODY>
- <TR>
- <TD>Actions: </TD>
- <TD vAlign=center noWrap><A
- href="https://bugs.eclipse.org/bugs/enter_bug.cgi">New</A> |
- <A href="https://bugs.eclipse.org/bugs/query.cgi">Query</A> | <INPUT type=submit value=Find> bug # <INPUT size=6 name=id> |
- <A
- href="https://bugs.eclipse.org/bugs/reports.cgi">Reports</A>
- </TD>
- <TD>&nbsp;</TD>
- <TD vAlign=center align=right><A
- href="https://bugs.eclipse.org/bugs/createaccount.cgi">New&nbsp;Account</A>
- | <A
- href="https://bugs.eclipse.org/bugs/query.cgi?GoAheadAndLogIn=1">Log&nbsp;In</A>
- </TD></TR></TBODY></TABLE></FORM></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></BODY></HTML>
diff --git a/org.eclipse.mylyn.bugzilla.tests/testdata/reports-stacktrace/40152.html b/org.eclipse.mylyn.bugzilla.tests/testdata/reports-stacktrace/40152.html
deleted file mode 100644
index fb15d0fa8..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/testdata/reports-stacktrace/40152.html
+++ /dev/null
@@ -1,1228 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<!-- saved from url=(0051)https://bugs.eclipse.org/bugs/show_bug.cgi?id=40152 -->
-<!-- 1.0@bugzilla.org --><!-- 1.0@bugzilla.org --><HTML><HEAD><TITLE>Bug 40152 - Junit tests fail on GTK</TITLE>
-<META http-equiv=Content-Type content="text/html; charset=iso-8859-1"><LINK
-href="show_bug.cgi?id=4862" rel=First><LINK href="show_bug.cgi?id=40059"
-rel=Prev><LINK href="show_bug.cgi?id=40723" rel=Next><LINK
-href="show_bug.cgi?id=79413" rel=Last><LINK href="buglist.cgi?regetlastlist=1"
-rel=Up><LINK href="buglist.cgi?regetlastlist=1" rel=Contents>
-<META content="MSHTML 6.00.2800.1476" name=GENERATOR></HEAD>
-<BODY text=#000000 vLink=#551a8b aLink=#ff0000 link=#0000ee bgColor=#ffffff
-onload=""><!-- 1.0@bugzilla.org -->
-<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
- <TBODY>
- <TR>
- <TD width="100%">
- <TABLE cellSpacing=0 cellPadding=0 width="100%" bgColor=#006699
- border=0><TBODY>
- <TR>
- <TD width=116 bgColor=#000000><IMG height=50
- src="40152_files/EclipseBannerPic.jpg" width=115></TD>
- <TD width=637><A href="http://www.eclipse.org/"><IMG height=50
- src="40152_files/gradient.jpg" width=282 border=0></A></TD>
- <TD width=250><IMG height=48 src="40152_files/eproject-simple.gif"
- width=250></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
-<TABLE cellSpacing=0 border=0>
- <TBODY>
- <TR>
- <TD vAlign=top align=left>
- <TABLE cellSpacing=2 cellPadding=0 border=0>
- <TBODY>
- <TR>
- <TD vAlign=top noWrap align=left><FONT size=+1><B>Bugzilla Bug
- 40152</B></FONT> </TD></TR></TBODY></TABLE></TD>
- <TD vAlign=center>&nbsp;</TD>
- <TD vAlign=center align=left>Junit tests fail on GTK</TD></TR></TBODY></TABLE><!-- 1.0@bugzilla.org --><B>Bug List:</B> (18 of
-183) <A href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=4862">First</A> <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=79413">Last</A> <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=40059">Prev</A> <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=40723">Next</A>
-&nbsp;&nbsp;<A
-href="https://bugs.eclipse.org/bugs/buglist.cgi?regetlastlist=1">Show list</A>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A
-href="https://bugs.eclipse.org/bugs/query.cgi">Query page</A>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A
-href="https://bugs.eclipse.org/bugs/enter_bug.cgi">Enter new bug</A>
-<HR>
-
-<FORM name=changeform action=process_bug.cgi method=post><INPUT type=hidden
-value=20040525174037 name=delta_ts> <INPUT type=hidden value=2
-name=longdesclength> <INPUT type=hidden value=40152 name=id>
-<TABLE cellSpacing=1 cellPadding=1 border=0>
- <TBODY>
- <TR>
- <TD align=right><B>Bug#:</B> </TD>
- <TD><A
- href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=40152">40152</A> </TD>
- <TD>&nbsp;</TD>
- <TD align=right><B>Platform:</B> </TD>
- <TD><SELECT name=rep_platform> <OPTION value=All>All</OPTION> <OPTION
- value=Macintosh>Macintosh</OPTION> <OPTION value=PC selected>PC</OPTION>
- <OPTION value="Power PC">Power PC</OPTION> <OPTION
- value=Sun>Sun</OPTION> <OPTION value=Other>Other</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD>
- <TD align=right><B>Reporter:</B> </TD>
- <TD>christophe_cornu@ca.ibm.com (Christophe Cornu) </TD></TR>
- <TR>
- <TD align=right><B>Product:</B> </TD>
- <TD><SELECT name=product> <OPTION value=AJDT>AJDT</OPTION> <OPTION
- value=AspectJ>AspectJ</OPTION> <OPTION value=Birt>Birt</OPTION> <OPTION
- value=CDT>CDT</OPTION> <OPTION value=CME>CME</OPTION> <OPTION
- value=Community>Community</OPTION> <OPTION value=ECESIS>ECESIS</OPTION>
- <OPTION value=ECF>ECF</OPTION> <OPTION value=EMF>EMF</OPTION> <OPTION
- value=Equinox>Equinox</OPTION> <OPTION value=ERCP>ERCP</OPTION> <OPTION
- value=GEF>GEF</OPTION> <OPTION value=GMT>GMT</OPTION> <OPTION
- value=Hyades>Hyades</OPTION> <OPTION value=JDT>JDT</OPTION> <OPTION
- value=OMELET>OMELET</OPTION> <OPTION value=PDE>PDE</OPTION> <OPTION
- value=Platform selected>Platform</OPTION> <OPTION
- value=Pollinate>Pollinate</OPTION> <OPTION
- value=Stellation>Stellation</OPTION> <OPTION value=UML2>UML2</OPTION>
- <OPTION value=VE>VE</OPTION> <OPTION value="Web Tools">Web
- Tools</OPTION> <OPTION value=WSVT>WSVT</OPTION> <OPTION
- value=XSD>XSD</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD>
- <TD align=right><B>OS:</B> </TD>
- <TD><SELECT name=op_sys> <OPTION value=All>All</OPTION> <OPTION
- value="AIX Motif">AIX Motif</OPTION> <OPTION value="Windows 95">Windows
- 95</OPTION> <OPTION value="Windows 98">Windows 98</OPTION> <OPTION
- value="Windows CE">Windows CE</OPTION> <OPTION
- value="Windows ME">Windows ME</OPTION> <OPTION
- value="Windows 2000">Windows 2000</OPTION> <OPTION
- value="Windows NT">Windows NT</OPTION> <OPTION
- value="Windows XP">Windows XP</OPTION> <OPTION
- value="Windows All">Windows All</OPTION> <OPTION value="MacOS X">MacOS
- X</OPTION> <OPTION value=Linux>Linux</OPTION> <OPTION value=Linux-GTK
- selected>Linux-GTK</OPTION> <OPTION
- value=Linux-Motif>Linux-Motif</OPTION> <OPTION
- value=HP-UX>HP-UX</OPTION> <OPTION value=Neutrino>Neutrino</OPTION>
- <OPTION value=QNX-Photon>QNX-Photon</OPTION> <OPTION
- value=Solaris>Solaris</OPTION> <OPTION
- value=Solaris-GTK>Solaris-GTK</OPTION> <OPTION
- value=Solaris-Motif>Solaris-Motif</OPTION> <OPTION value="Unix All">Unix
- All</OPTION> <OPTION value=other>other</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD>
- <TD align=right><B>Add&nbsp;CC:</B> </TD>
- <TD><INPUT size=30 name=newcc> </TD></TR>
- <TR>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/describecomponents.cgi?product=Platform">Component</A>:
- </B></TD>
- <TD><SELECT name=component> <OPTION value=Ant>Ant</OPTION> <OPTION
- value=Compare>Compare</OPTION> <OPTION value=CVS>CVS</OPTION> <OPTION
- value=Debug>Debug</OPTION> <OPTION value=Doc>Doc</OPTION> <OPTION
- value=Help>Help</OPTION> <OPTION value=Intro>Intro</OPTION> <OPTION
- value=Releng>Releng</OPTION> <OPTION value=Resources>Resources</OPTION>
- <OPTION value=Runtime>Runtime</OPTION> <OPTION
- value=Scripting>Scripting</OPTION> <OPTION value=Search>Search</OPTION>
- <OPTION value=SWT selected>SWT</OPTION> <OPTION value=Team>Team</OPTION>
- <OPTION value=Text>Text</OPTION> <OPTION value=UI>UI</OPTION> <OPTION
- value=Update>Update</OPTION> <OPTION value=WebDAV>WebDAV</OPTION></SELECT>
- </TD>
- <TD>&nbsp;</TD>
- <TD align=right><B>Version:</B> </TD>
- <TD><SELECT name=version> <OPTION value=1.0>1.0</OPTION> <OPTION
- value=2.0>2.0</OPTION> <OPTION value=2.0.1>2.0.1</OPTION> <OPTION
- value=2.0.2>2.0.2</OPTION> <OPTION value=2.1>2.1</OPTION> <OPTION
- value=2.1.1>2.1.1</OPTION> <OPTION value=2.1.2>2.1.2</OPTION> <OPTION
- value=2.1.3>2.1.3</OPTION> <OPTION value=3.0 selected>3.0</OPTION>
- <OPTION value=3.0.1>3.0.1</OPTION> <OPTION value=3.1>3.1</OPTION></SELECT>
- </TD>
- <TD>&nbsp;</TD>
- <TD vAlign=top align=right rowSpan=4><B>CC:</B> </TD>
- <TD vAlign=top rowSpan=4><INPUT type=hidden name=cc> </TD></TR>
- <TR>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/bug_status.html">Status</A>: </B></TD>
- <TD>NEW</TD>
- <TD>&nbsp;</TD>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/bug_status.html#priority">Priority</A>:</B>
- </TD>
- <TD><SELECT name=priority> <OPTION value=P1>P1</OPTION> <OPTION
- value=P2>P2</OPTION> <OPTION value=P3 selected>P3</OPTION> <OPTION
- value=P4>P4</OPTION> <OPTION value=P5>P5</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD></TR>
- <TR>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/bug_status.html">Resolution</A>:
- </B></TD>
- <TD></TD>
- <TD>&nbsp;</TD>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/bug_status.html#severity">Severity</A>:</B>
- </TD>
- <TD><SELECT name=bug_severity> <OPTION value=blocker>blocker</OPTION>
- <OPTION value=critical>critical</OPTION> <OPTION value=major
- selected>major</OPTION> <OPTION value=normal>normal</OPTION> <OPTION
- value=minor>minor</OPTION> <OPTION value=trivial>trivial</OPTION>
- <OPTION value=enhancement>enhancement</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD></TR>
- <TR>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/bug_status.html#assigned_to">Assigned&nbsp;To</A>:
- </B></TD>
- <TD>felipe_heidrich@ca.ibm.com (Felipe Heidrich)</TD>
- <TD>&nbsp;</TD>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/notargetmilestone.html">Target
- Milestone</A>: </B></TD>
- <TD><SELECT name=target_milestone> <OPTION value="2.0 M1">2.0
- M1</OPTION> <OPTION value="2.0 M2">2.0 M2</OPTION> <OPTION
- value="2.0 M3">2.0 M3</OPTION> <OPTION value="2.0 M4">2.0 M4</OPTION>
- <OPTION value="2.0 M5">2.0 M5</OPTION> <OPTION value="2.0 M6">2.0
- M6</OPTION> <OPTION value="2.0 F1">2.0 F1</OPTION> <OPTION
- value="2.0 F2">2.0 F2</OPTION> <OPTION value="2.0 F3">2.0 F3</OPTION>
- <OPTION value="2.0 F4">2.0 F4</OPTION> <OPTION
- value=2.0.1>2.0.1</OPTION> <OPTION value=2.0.2>2.0.2</OPTION> <OPTION
- value=2.1>2.1</OPTION> <OPTION value="2.1 M1">2.1 M1</OPTION> <OPTION
- value="2.1 M2">2.1 M2</OPTION> <OPTION value="2.1 M3">2.1 M3</OPTION>
- <OPTION value="2.1 M4">2.1 M4</OPTION> <OPTION value="2.1 M5">2.1
- M5</OPTION> <OPTION value="2.1 RC1">2.1 RC1</OPTION> <OPTION
- value="2.1 RC2">2.1 RC2</OPTION> <OPTION value="2.1 RC3">2.1
- RC3</OPTION> <OPTION value="2.1 RC4">2.1 RC4</OPTION> <OPTION
- value=2.1.1>2.1.1</OPTION> <OPTION value=2.1.2>2.1.2</OPTION> <OPTION
- value=2.1.3>2.1.3</OPTION> <OPTION value=3.0>3.0</OPTION> <OPTION
- value="3.0 M1">3.0 M1</OPTION> <OPTION value="3.0 M2">3.0 M2</OPTION>
- <OPTION value="3.0 M3">3.0 M3</OPTION> <OPTION value="3.0 M4">3.0
- M4</OPTION> <OPTION value="3.0 M5">3.0 M5</OPTION> <OPTION
- value="3.0 M6">3.0 M6</OPTION> <OPTION value="3.0 M7">3.0 M7</OPTION>
- <OPTION value="3.0 M8">3.0 M8</OPTION> <OPTION value="3.0 M9">3.0
- M9</OPTION> <OPTION value="3.0 RC1">3.0 RC1</OPTION> <OPTION
- value="3.0 RC2">3.0 RC2</OPTION> <OPTION value="3.0 RC3">3.0
- RC3</OPTION> <OPTION value="3.0 RC4">3.0 RC4</OPTION> <OPTION
- value=3.0.1>3.0.1</OPTION> <OPTION value=3.0.2>3.0.2</OPTION> <OPTION
- value=3.1>3.1</OPTION> <OPTION value="3.1 M1">3.1 M1</OPTION> <OPTION
- value="3.1 M2">3.1 M2</OPTION> <OPTION value="3.1 M3">3.1 M3</OPTION>
- <OPTION value="3.1 M4">3.1 M4</OPTION> <OPTION value="3.1 M5">3.1
- M5</OPTION> <OPTION value="3.1 M6">3.1 M6</OPTION> <OPTION value=---
- selected>---</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD></TR>
- <TR>
- <TD align=right><B>URL: </B></TD>
- <TD colSpan=7><INPUT size=60 name=bug_file_loc> </TD></TR>
- <TR>
- <TD align=right><B>Summary:</B> </TD>
- <TD colSpan=7><INPUT size=60 value="Junit tests fail on GTK"
- name=short_desc> </TD></TR>
- <TR>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/describekeywords.cgi">Keywords</A>:
- </B>
- <TD colSpan=7><INPUT size=60 name=keywords> </TD></TR></TBODY></TABLE><!-- 1.0@bugzilla.org --><BR>
-<TABLE cellSpacing=0 cellPadding=4 border=1>
- <TBODY>
- <TR>
- <TH align=left bgColor=#cccccc>Attachment</TH>
- <TH align=left bgColor=#cccccc>Type</TH>
- <TH align=left bgColor=#cccccc>Modified</TH>
- <TH align=left bgColor=#cccccc>Status</TH>
- <TH align=left bgColor=#cccccc>Actions</TH></TR>
- <TR>
- <TD colSpan=4><A
- href="https://bugs.eclipse.org/bugs/attachment.cgi?bugid=40152&amp;action=enter">Create
- a New Attachment</A> (proposed patch, testcase, etc.) </TD>
- <TD><A
- href="https://bugs.eclipse.org/bugs/attachment.cgi?bugid=40152&amp;action=viewall">View
- All</A> </TD></TR></TBODY></TABLE><BR>
-<TABLE>
- <TBODY>
- <TR>
- <TH align=right>Bug 40152 depends on:</TH>
- <TD></TD>
- <TD><INPUT name=dependson> </TD>
- <TD rowSpan=2><A
- href="https://bugs.eclipse.org/bugs/showdependencytree.cgi?id=40152">Show
- dependency tree</A> </TD></TR>
- <TR>
- <TH align=right>Bug 40152 blocks:</TH>
- <TD></TD>
- <TD><INPUT name=blocked> </TD></TR></TBODY></TABLE>
-<TABLE>
- <TBODY>
- <TR>
- <TH><A href="https://bugs.eclipse.org/bugs/votehelp.html">Votes</A>: </TH>
- <TD>0&nbsp;&nbsp;&nbsp; <A
- href="https://bugs.eclipse.org/bugs/votes.cgi?action=show_bug&amp;bug_id=40152">Show
- votes for this bug</A>&nbsp;&nbsp;&nbsp; <A
- href="https://bugs.eclipse.org/bugs/votes.cgi?action=show_user&amp;bug_id=40152">Vote
- for this bug</A> </TD></TR></TBODY></TABLE><BR><B>Additional Comments:</B> <BR><TEXTAREA accessKey=c name=comment rows=10 wrap=hard cols=80></TEXTAREA>
-<BR><BR><INPUT type=radio CHECKED value=none name=knob> Leave as
-<B>NEW&nbsp;</B> <BR><INPUT type=radio value=accept name=knob> Accept bug
-(change status to <B>ASSIGNED</B>) <BR><INPUT type=radio value=resolve
-name=knob> Resolve bug, changing <A
-href="https://bugs.eclipse.org/bugs/bug_status.html">resolution</A> to <SELECT
-onchange=document.changeform.knob[2].checked=true name=resolution> <OPTION
- value=FIXED selected>FIXED</OPTION> <OPTION value=INVALID>INVALID</OPTION>
- <OPTION value=WONTFIX>WONTFIX</OPTION> <OPTION value=LATER>LATER</OPTION>
- <OPTION value=REMIND>REMIND</OPTION> <OPTION
- value=WORKSFORME>WORKSFORME</OPTION></SELECT> <BR><INPUT type=radio
-value=duplicate name=knob> Resolve bug, mark it as duplicate of bug # <INPUT
-onchange="if (this.value != '')&#10; {document.changeform.knob[3].checked=true}"
-size=6 name=dup_id> <BR><INPUT type=radio value=reassign name=knob> <A
-href="https://bugs.eclipse.org/bugs/bug_status.html#assigned_to">Reassign</A>
-bug to <INPUT
-onchange="if ((this.value != 'felipe_heidrich@ca.ibm.com') &amp;&amp; &#10; (this.value != '')) {&#10; document.changeform.knob[4].checked=true; &#10; }"
-size=32 value=felipe_heidrich@ca.ibm.com name=assigned_to> <BR><INPUT type=radio
-value=reassignbycomponent name=knob> Reassign bug to owner of selected component
-<BR><INPUT type=submit value=Commit> <INPUT type=hidden value=process_bug
-name=form_name>
-<P><FONT size=+1><B><A
-href="https://bugs.eclipse.org/bugs/show_activity.cgi?id=40152">View Bug
-Activity</A> &nbsp; | &nbsp; <A
-href="https://bugs.eclipse.org/bugs/long_list.cgi?buglist=40152">Format For
-Printing</A> </B></FONT></P></FORM>
-<TABLE>
- <TBODY>
- <TR>
- <TD align=left><B><A
- href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=40152#c0"
- name=c0>Description</A>: </B></TD>
- <TD align=right width="100%">Opened: 2003-07-15 16:25 </TD></TR></TBODY></TABLE>
-<HR>
-<!-- 1.0@bugzilla.org --><PRE>latest from head (20030715) generate about 30 errors/failures.
-
-.........................................
-.........................................
-.........................E................
-..........4
-5
-...............................
-.........................................
-.........................................
-.........................................
-.........................................
-.........................................
-...........F.....F...........F.E.E............
-.................F....F....................
-..........
-(&lt;unknown&gt;:6548): Gdk-CRITICAL **: file gdkdraw.c: line 238
-(gdk_drawable_get_display): assertion `GDK_IS_DRAWABLE (drawable)' failed
-
-(&lt;unknown&gt;:6548): Gdk-CRITICAL **: file gdkdisplay.c: line 498
-(gdk_display_get_window_at_pointer): assertion `GDK_IS_DISPLAY (display)'
-failed
-........
-(&lt;unknown&gt;:6548): Gdk-CRITICAL **: file gdkdraw.c: line 238
-(gdk_drawable_get_display): assertion `GDK_IS_DRAWABLE (drawable)' failed
-
-(&lt;unknown&gt;:6548): Gdk-CRITICAL **: file gdkdisplay.c: line 498
-(gdk_display_get_window_at_pointer): assertion `GDK_IS_DISPLAY (display)'
-failed
-.......................
-.........................................
-..............F...........................
-.........................................
-....................................F.....
-.........................................
-.........................................
-.........................................
-.......................................
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtkwidget.c: line 5139
-(gtk_widget_set_size_request): assertion `width &gt;= -1' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtkwidget.c: line 5139
-(gtk_widget_set_size_request): assertion `width &gt;= -1' failed
-..
-...................
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtkwidget.c: line 5139
-(gtk_widget_set_size_request): assertion `width &gt;= -1' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtkwidget.c: line 5139
-(gtk_widget_set_size_request): assertion `width &gt;= -1' failed
-......................
-.........................................
-..................................
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreeview.c: line 9817
-(gtk_tree_view_get_path_at_pos): assertion `tree_view-&gt;priv-&gt;bin_window !=
-NULL' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreeview.c: line 9817
-(gtk_tree_view_get_path_at_pos): assertion `tree_view-&gt;priv-&gt;bin_window !=
-NULL' failed
-.......
-...
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtkliststore.c: line 533
-(gtk_list_store_get_path): assertion `iter-&gt;stamp == GTK_LIST_STORE
-(tree_model)-&gt;stamp' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtkliststore.c: line 533
-(gtk_list_store_get_path): assertion `iter-&gt;stamp == GTK_LIST_STORE
-(tree_model)-&gt;stamp' failed
-.........
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtkliststore.c: line 533
-(gtk_list_store_get_path): assertion `iter-&gt;stamp == GTK_LIST_STORE
-(tree_model)-&gt;stamp' failed
-..
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreeview.c: line 9817
-(gtk_tree_view_get_path_at_pos): assertion `tree_view-&gt;priv-&gt;bin_window !=
-NULL' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreeview.c: line 9817
-(gtk_tree_view_get_path_at_pos): assertion `tree_view-&gt;priv-&gt;bin_window !=
-NULL' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreeview.c: line 9817
-(gtk_tree_view_get_path_at_pos): assertion `tree_view-&gt;priv-&gt;bin_window !=
-NULL' failed
-F...........................
-.........................................
-........................................F.
-............F........F........F...F..........
-.........................................
-.........................................
-.....................F.F...................
-.........................................
-.........................................
-................................
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreeview.c: line 9817
-(gtk_tree_view_get_path_at_pos): assertion `tree_view-&gt;priv-&gt;bin_window !=
-NULL' failed
-F.
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreestore.c: line 569
-(gtk_tree_store_get_path): assertion `iter-&gt;stamp == GTK_TREE_STORE
-(tree_model)-&gt;stamp' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreemodel.c: line 369
-(gtk_tree_path_get_depth): assertion `path != NULL' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreeview.c: line 8800
-(gtk_tree_view_scroll_to_cell): assertion `path != NULL || column != NULL'
-failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreemodel.c: line 400
-(gtk_tree_path_free): assertion `path != NULL' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreestore.c: line 569
-(gtk_tree_store_get_path): assertion `iter-&gt;stamp == GTK_TREE_STORE
-(tree_model)-&gt;stamp' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreemodel.c: line 369
-(gtk_tree_path_get_depth): assertion `path != NULL' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreeview.c: line 8800
-(gtk_tree_view_scroll_to_cell): assertion `path != NULL || column != NULL'
-failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreemodel.c: line 400
-(gtk_tree_path_free): assertion `path != NULL' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreestore.c: line 569
-(gtk_tree_store_get_path): assertion `iter-&gt;stamp == GTK_TREE_STORE
-(tree_model)-&gt;stamp' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreemodel.c: line 369
-(gtk_tree_path_get_depth): assertion `path != NULL' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreeview.c: line 8800
-(gtk_tree_view_scroll_to_cell): assertion `path != NULL || column != NULL'
-failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreemodel.c: line 400
-(gtk_tree_path_free): assertion `path != NULL' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreestore.c: line 569
-(gtk_tree_store_get_path): assertion `iter-&gt;stamp == GTK_TREE_STORE
-(tree_model)-&gt;stamp' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreemodel.c: line 369
-(gtk_tree_path_get_depth): assertion `path != NULL' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreeview.c: line 8800
-(gtk_tree_view_scroll_to_cell): assertion `path != NULL || column != NULL'
-failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreemodel.c: line 400
-(gtk_tree_path_free): assertion `path != NULL' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreestore.c: line 569
-(gtk_tree_store_get_path): assertion `iter-&gt;stamp == GTK_TREE_STORE
-(tree_model)-&gt;stamp' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreemodel.c: line 369
-(gtk_tree_path_get_depth): assertion `path != NULL' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreeview.c: line 8800
-(gtk_tree_view_scroll_to_cell): assertion `path != NULL || column != NULL'
-failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreemodel.c: line 400
-(gtk_tree_path_free): assertion `path != NULL' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreestore.c: line 569
-(gtk_tree_store_get_path): assertion `iter-&gt;stamp == GTK_TREE_STORE
-(tree_model)-&gt;stamp' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreemodel.c: line 369
-(gtk_tree_path_get_depth): assertion `path != NULL' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreeview.c: line 8800
-(gtk_tree_view_scroll_to_cell): assertion `path != NULL || column != NULL'
-failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreemodel.c: line 400
-(gtk_tree_path_free): assertion `path != NULL' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreestore.c: line 569
-(gtk_tree_store_get_path): assertion `iter-&gt;stamp == GTK_TREE_STORE
-(tree_model)-&gt;stamp' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreemodel.c: line 369
-(gtk_tree_path_get_depth): assertion `path != NULL' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreeview.c: line 8800
-(gtk_tree_view_scroll_to_cell): assertion `path != NULL || column != NULL'
-failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreemodel.c: line 400
-(gtk_tree_path_free): assertion `path != NULL' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreestore.c: line 569
-(gtk_tree_store_get_path): assertion `iter-&gt;stamp == GTK_TREE_STORE
-(tree_model)-&gt;stamp' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreemodel.c: line 369
-(gtk_tree_path_get_depth): assertion `path != NULL' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreeview.c: line 8800
-(gtk_tree_view_scroll_to_cell): assertion `path != NULL || column != NULL'
-failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreemodel.c: line 400
-(gtk_tree_path_free): assertion `path != NULL' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreestore.c: line 569
-(gtk_tree_store_get_path): assertion `iter-&gt;stamp == GTK_TREE_STORE
-(tree_model)-&gt;stamp' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreemodel.c: line 369
-(gtk_tree_path_get_depth): assertion `path != NULL' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreeview.c: line 8800
-(gtk_tree_view_scroll_to_cell): assertion `path != NULL || column != NULL'
-failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreemodel.c: line 400
-(gtk_tree_path_free): assertion `path != NULL' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreestore.c: line 569
-(gtk_tree_store_get_path): assertion `iter-&gt;stamp == GTK_TREE_STORE
-(tree_model)-&gt;stamp' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreemodel.c: line 369
-(gtk_tree_path_get_depth): assertion `path != NULL' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreeview.c: line 8800
-(gtk_tree_view_scroll_to_cell): assertion `path != NULL || column != NULL'
-failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreemodel.c: line 400
-(gtk_tree_path_free): assertion `path != NULL' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreestore.c: line 569
-(gtk_tree_store_get_path): assertion `iter-&gt;stamp == GTK_TREE_STORE
-(tree_model)-&gt;stamp' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreemodel.c: line 369
-(gtk_tree_path_get_depth): assertion `path != NULL' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreeview.c: line 8800
-(gtk_tree_view_scroll_to_cell): assertion `path != NULL || column != NULL'
-failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreemodel.c: line 400
-(gtk_tree_path_free): assertion `path != NULL' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreestore.c: line 569
-(gtk_tree_store_get_path): assertion `iter-&gt;stamp == GTK_TREE_STORE
-(tree_model)-&gt;stamp' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreemodel.c: line 369
-(gtk_tree_path_get_depth): assertion `path != NULL' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreeview.c: line 8800
-(gtk_tree_view_scroll_to_cell): assertion `path != NULL || column != NULL'
-failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreemodel.c: line 400
-(gtk_tree_path_free): assertion `path != NULL' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreestore.c: line 569
-(gtk_tree_store_get_path): assertion `iter-&gt;stamp == GTK_TREE_STORE
-(tree_model)-&gt;stamp' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreemodel.c: line 369
-(gtk_tree_path_get_depth): assertion `path != NULL' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreeview.c: line 8800
-(gtk_tree_view_scroll_to_cell): assertion `path != NULL || column != NULL'
-failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreemodel.c: line 400
-(gtk_tree_path_free): assertion `path != NULL' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreestore.c: line 569
-(gtk_tree_store_get_path): assertion `iter-&gt;stamp == GTK_TREE_STORE
-(tree_model)-&gt;stamp' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreemodel.c: line 369
-(gtk_tree_path_get_depth): assertion `path != NULL' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreeview.c: line 8800
-(gtk_tree_view_scroll_to_cell): assertion `path != NULL || column != NULL'
-failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreemodel.c: line 400
-(gtk_tree_path_free): assertion `path != NULL' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreestore.c: line 569
-(gtk_tree_store_get_path): assertion `iter-&gt;stamp == GTK_TREE_STORE
-(tree_model)-&gt;stamp' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreemodel.c: line 369
-(gtk_tree_path_get_depth): assertion `path != NULL' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreeview.c: line 8800
-(gtk_tree_view_scroll_to_cell): assertion `path != NULL || column != NULL'
-failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreemodel.c: line 400
-(gtk_tree_path_free): assertion `path != NULL' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreestore.c: line 569
-(gtk_tree_store_get_path): assertion `iter-&gt;stamp == GTK_TREE_STORE
-(tree_model)-&gt;stamp' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreemodel.c: line 369
-(gtk_tree_path_get_depth): assertion `path != NULL' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreeview.c: line 8800
-(gtk_tree_view_scroll_to_cell): assertion `path != NULL || column != NULL'
-failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreemodel.c: line 400
-(gtk_tree_path_free): assertion `path != NULL' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreestore.c: line 569
-(gtk_tree_store_get_path): assertion `iter-&gt;stamp == GTK_TREE_STORE
-(tree_model)-&gt;stamp' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreemodel.c: line 369
-(gtk_tree_path_get_depth): assertion `path != NULL' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreeview.c: line 8800
-(gtk_tree_view_scroll_to_cell): assertion `path != NULL || column != NULL'
-failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreemodel.c: line 400
-(gtk_tree_path_free): assertion `path != NULL' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreestore.c: line 569
-(gtk_tree_store_get_path): assertion `iter-&gt;stamp == GTK_TREE_STORE
-(tree_model)-&gt;stamp' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreemodel.c: line 369
-(gtk_tree_path_get_depth): assertion `path != NULL' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreeview.c: line 8800
-(gtk_tree_view_scroll_to_cell): assertion `path != NULL || column != NULL'
-failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreemodel.c: line 400
-(gtk_tree_path_free): assertion `path != NULL' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreestore.c: line 569
-(gtk_tree_store_get_path): assertion `iter-&gt;stamp == GTK_TREE_STORE
-(tree_model)-&gt;stamp' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreemodel.c: line 369
-(gtk_tree_path_get_depth): assertion `path != NULL' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreeview.c: line 8800
-(gtk_tree_view_scroll_to_cell): assertion `path != NULL || column != NULL'
-failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreemodel.c: line 400
-(gtk_tree_path_free): assertion `path != NULL' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreestore.c: line 569
-(gtk_tree_store_get_path): assertion `iter-&gt;stamp == GTK_TREE_STORE
-(tree_model)-&gt;stamp' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreemodel.c: line 369
-(gtk_tree_path_get_depth): assertion `path != NULL' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreeview.c: line 8800
-(gtk_tree_view_scroll_to_cell): assertion `path != NULL || column != NULL'
-failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtktreemodel.c: line 400
-(gtk_tree_path_free): assertion `path != NULL' failed
-........
-.........................................
-.........................................
-...........................F..............
-.........................................
-.........................................
-.............
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtkeditable.c: line 172
-(gtk_editable_delete_selection): assertion `GTK_IS_EDITABLE (editable)' failed
-
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtkeditable.c: line 172
-(gtk_editable_delete_selection): assertion `GTK_IS_EDITABLE (editable)' failed
-F....F.......F.......F.E.......E..
-.........................................
-.........................................
-.............................
-(&lt;unknown&gt;:6548): Gtk-CRITICAL **: file gtkframe.c: line 362
-(gtk_frame_set_label_widget): assertion `label_widget == NULL || label_widget-
-&gt;parent == NULL' failed
-............
-.........................................
-.........................................
-................F.........................
-.........................................
-.........................................
-.........................................
-.........................................
-.........................................
-.........................................
-.........................................
-.........................................
-.........................................
-.........................................
-.......................................F.F.
-.........................................
-.........................................
-.........................................
-.........................................
-.........................................
-.........................................
-.........................................
-.........................................
-.........................................
-.........................................
-.........................................
-.........................................
-.........................................
-.........................................
-.........................................
-.........................................
-.........................................
-.........................................
-.........................................
-.........................................
-.........................................
-.........................................
-.........................................
-.........................................
-.........................................
-.........................................
-.........................................
-.........................................
-.........................................
-.........................................
-.........................................
-.........................................
-.........................................
-.........................................
-...........F.F.............................
-..F....F..E.E................................
-....F.F....................................
-.........................................
-.........................................
-.........................................
-.........................................
-.........................................
-.........................................
-.........................................
-.........................................
-.......
-Time: 111.199
-There were 7 errors:
-1) test_getFontData
-(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_graphics_Font)
-java.lang.NullPointerException
- at org.eclipse.swt.graphics.Font.dispose(Font.java:143)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_graphics_Font.test_getFontData
-(Test_org_eclipse_swt_graphics_Font.java:239)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_graphics_Font.runTest
-(Test_org_eclipse_swt_graphics_Font.java:308)
- at org.eclipse.swt.tests.junit.AllTests.main(AllTests.java:25)
-2) test_setText$Ljava_lang_String
-(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_TableItem)
-org.eclipse.swt.SWTError: Cannot get text
- at org.eclipse.swt.SWT.error(SWT.java:2391)
- at org.eclipse.swt.SWT.error(SWT.java:2295)
- at org.eclipse.swt.widgets.Widget.error(Widget.java:375)
- at org.eclipse.swt.widgets.TableItem.getText(TableItem.java:350)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_TableItem.test_setText
-$Ljava_lang_String(Test_org_eclipse_swt_widgets_TableItem.java:359)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_TableItem.runTest
-(Test_org_eclipse_swt_widgets_TableItem.java:518)
- at org.eclipse.swt.tests.junit.AllTests.main(AllTests.java:25)
-3) test_setTextILjava_lang_String
-(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_TableItem)
-org.eclipse.swt.SWTError: Cannot get text
- at org.eclipse.swt.SWT.error(SWT.java:2391)
- at org.eclipse.swt.SWT.error(SWT.java:2295)
- at org.eclipse.swt.widgets.Widget.error(Widget.java:375)
- at org.eclipse.swt.widgets.TableItem.getText(TableItem.java:350)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_TableItem.test_setText
-ILjava_lang_String(Test_org_eclipse_swt_widgets_TableItem.java:396)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_TableItem.runTest
-(Test_org_eclipse_swt_widgets_TableItem.java:519)
- at org.eclipse.swt.tests.junit.AllTests.main(AllTests.java:25)
-4) test_removeII
-(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Combo)
-java.lang.IllegalArgumentException: Index out of bounds
- at org.eclipse.swt.SWT.error(SWT.java:2351)
- at org.eclipse.swt.SWT.error(SWT.java:2295)
- at org.eclipse.swt.widgets.Widget.error(Widget.java:375)
- at org.eclipse.swt.widgets.Combo.remove(Combo.java:938)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Combo.test_removeII
-(Test_org_eclipse_swt_widgets_Combo.java:397)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Combo.runTest
-(Test_org_eclipse_swt_widgets_Combo.java:688)
- at org.eclipse.swt.tests.junit.AllTests.main(AllTests.java:25)
-5) test_setItemILjava_lang_String
-(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Combo)
-java.lang.ArrayIndexOutOfBoundsException: 0
- at org.eclipse.swt.widgets.Combo.setItem(Combo.java:1103)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Combo.test_setItemILja
-va_lang_String(Test_org_eclipse_swt_widgets_Combo.java:503)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Combo.runTest
-(Test_org_eclipse_swt_widgets_Combo.java:695)
- at org.eclipse.swt.tests.junit.AllTests.main(AllTests.java:25)
-6) test_print
-(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_custom_StyledText)
-java.lang.NullPointerException
- at org.eclipse.swt.custom.StyledText$Printing.&lt;init&gt;
-(StyledText.java:200)
- at org.eclipse.swt.custom.StyledText.print(StyledText.java:5933)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_custom_StyledText.test_print
-(Test_org_eclipse_swt_custom_StyledText.java:1690)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_custom_StyledText.runTest
-(Test_org_eclipse_swt_custom_StyledText.java:4165)
- at org.eclipse.swt.tests.junit.AllTests.main(AllTests.java:25)
-7) test_printLorg_eclipse_swt_printing_Printer
-(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_custom_StyledText)
-java.lang.NullPointerException
- at org.eclipse.swt.custom.StyledText$Printing.&lt;init&gt;
-(StyledText.java:200)
- at org.eclipse.swt.custom.StyledText.print(StyledText.java:5988)
- at org.eclipse.swt.custom.StyledText.print(StyledText.java:5963)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_custom_StyledText.test_printLo
-rg_eclipse_swt_printing_Printer
-(Test_org_eclipse_swt_custom_StyledText.java:1710)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_custom_StyledText.runTest
-(Test_org_eclipse_swt_custom_StyledText.java:4166)
- at org.eclipse.swt.tests.junit.AllTests.main(AllTests.java:25)
-There were 30 failures:
-1) test_getBoundsI
-(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_TableItem)
-junit.framework.AssertionFailedError: :a:
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_TableItem.test_getBoun
-dsI(Test_org_eclipse_swt_widgets_TableItem.java:85)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_TableItem.runTest
-(Test_org_eclipse_swt_widgets_TableItem.java:501)
- at org.eclipse.swt.tests.junit.AllTests.main(AllTests.java:25)
-2) test_getImageBoundsI
-(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_TableItem)
-junit.framework.AssertionFailedError: :e:
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_TableItem.test_getImag
-eBoundsI(Test_org_eclipse_swt_widgets_TableItem.java:177)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_TableItem.runTest
-(Test_org_eclipse_swt_widgets_TableItem.java:506)
- at org.eclipse.swt.tests.junit.AllTests.main(AllTests.java:25)
-3) test_setImageIndentI
-(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_TableItem)
-junit.framework.AssertionFailedError: expected:&lt;1&gt; but was:&lt;0&gt;
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_TableItem.test_setImag
-eIndentI(Test_org_eclipse_swt_widgets_TableItem.java:338)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_TableItem.runTest
-(Test_org_eclipse_swt_widgets_TableItem.java:517)
- at org.eclipse.swt.tests.junit.AllTests.main(AllTests.java:25)
-4) test_getWidth
-(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_TableColumn)
-junit.framework.AssertionFailedError: :a: width=0 should be=10
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_TableColumn.test_getWi
-dth(Test_org_eclipse_swt_widgets_TableColumn.java:122)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_TableColumn.runTest
-(Test_org_eclipse_swt_widgets_TableColumn.java:264)
- at org.eclipse.swt.tests.junit.AllTests.main(AllTests.java:25)
-5) test_setAlignmentI
-(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_TableColumn)
-junit.framework.AssertionFailedError: :c: Should not be allowed to set
-alignment of the first column
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_TableColumn.test_setAl
-ignmentI(Test_org_eclipse_swt_widgets_TableColumn.java:177)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_TableColumn.runTest
-(Test_org_eclipse_swt_widgets_TableColumn.java:268)
- at org.eclipse.swt.tests.junit.AllTests.main(AllTests.java:25)
-6) test_setDefaultItemLorg_eclipse_swt_widgets_MenuItem
-(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Menu)
-junit.framework.AssertionFailedError: expected:&lt;null&gt; but was:&lt;MenuItem {}&gt;
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Menu.test_setDefaultIt
-emLorg_eclipse_swt_widgets_MenuItem(Test_org_eclipse_swt_widgets_Menu.java:272)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Menu.runTest
-(Test_org_eclipse_swt_widgets_Menu.java:387)
- at org.eclipse.swt.tests.junit.AllTests.main(AllTests.java:25)
-7) test_getMonitor
-(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Shell)
-junit.framework.AssertionFailedError
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Control.test_getMonito
-r(Test_org_eclipse_swt_widgets_Control.java:287)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Control.runTest
-(Test_org_eclipse_swt_widgets_Control.java:819)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Scrollable.runTest
-(Test_org_eclipse_swt_widgets_Scrollable.java:72)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Composite.runTest
-(Test_org_eclipse_swt_widgets_Composite.java:159)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Canvas.runTest
-(Test_org_eclipse_swt_widgets_Canvas.java:115)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Decorations.runTest
-(Test_org_eclipse_swt_widgets_Decorations.java:250)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Shell.runTest
-(Test_org_eclipse_swt_widgets_Shell.java:428)
- at org.eclipse.swt.tests.junit.AllTests.main(AllTests.java:25)
-8) test_setTopIndexI
-(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_List)
-junit.framework.AssertionFailedError: expected:&lt;0&gt; but was:&lt;1&gt;
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_List.test_setTopIndexI
-(Test_org_eclipse_swt_widgets_List.java:2019)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_List.runTest
-(Test_org_eclipse_swt_widgets_List.java:2144)
- at org.eclipse.swt.tests.junit.AllTests.main(AllTests.java:25)
-9) test_getDoubleClickEnabled
-(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Text)
-junit.framework.AssertionFailedError: expected:&lt;false&gt; but was:&lt;true&gt;
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Text.test_getDoubleCli
-ckEnabled(Test_org_eclipse_swt_widgets_Text.java:316)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Text.runTest
-(Test_org_eclipse_swt_widgets_Text.java:953)
- at org.eclipse.swt.tests.junit.AllTests.main(AllTests.java:25)
-10) test_getTopIndex
-(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Text)
-junit.framework.AssertionFailedError: expected:&lt;1&gt; but was:&lt;0&gt;
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Text.test_getTopIndex
-(Test_org_eclipse_swt_widgets_Text.java:424)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Text.runTest
-(Test_org_eclipse_swt_widgets_Text.java:966)
- at org.eclipse.swt.tests.junit.AllTests.main(AllTests.java:25)
-11) test_setDoubleClickEnabledZ
-(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Text)
-junit.framework.AssertionFailedError: expected:&lt;false&gt; but was:&lt;true&gt;
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Text.test_setDoubleCli
-ckEnabledZ(Test_org_eclipse_swt_widgets_Text.java:599)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Text.runTest
-(Test_org_eclipse_swt_widgets_Text.java:974)
- at org.eclipse.swt.tests.junit.AllTests.main(AllTests.java:25)
-12) test_setTabsI
-(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Text)
-junit.framework.AssertionFailedError: expected:&lt;8&gt; but was:&lt;0&gt;
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Text.test_setTabsI
-(Test_org_eclipse_swt_widgets_Text.java:759)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Text.runTest
-(Test_org_eclipse_swt_widgets_Text.java:982)
- at org.eclipse.swt.tests.junit.AllTests.main(AllTests.java:25)
-13) test_setTopIndexI
-(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Text)
-junit.framework.AssertionFailedError: expected:&lt;1&gt; but was:&lt;0&gt;
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Text.test_setTopIndexI
-(Test_org_eclipse_swt_widgets_Text.java:820)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Text.runTest
-(Test_org_eclipse_swt_widgets_Text.java:985)
- at org.eclipse.swt.tests.junit.AllTests.main(AllTests.java:25)
-14) test_setMaximumI
-(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_ScrollBar)
-junit.framework.AssertionFailedError: expected:&lt;1&gt; but was:&lt;10&gt;
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_ScrollBar.check
-(Test_org_eclipse_swt_widgets_ScrollBar.java:67)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_ScrollBar.report
-(Test_org_eclipse_swt_widgets_ScrollBar.java:61)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_ScrollBar.test_setMaxi
-mumI(Test_org_eclipse_swt_widgets_ScrollBar.java:757)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_ScrollBar.runTest
-(Test_org_eclipse_swt_widgets_ScrollBar.java:892)
- at org.eclipse.swt.tests.junit.AllTests.main(AllTests.java:25)
-15) test_setMinimumI
-(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_ScrollBar)
-junit.framework.AssertionFailedError: expected:&lt;10&gt; but was:&lt;9&gt;
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_ScrollBar.check
-(Test_org_eclipse_swt_widgets_ScrollBar.java:68)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_ScrollBar.report
-(Test_org_eclipse_swt_widgets_ScrollBar.java:61)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_ScrollBar.test_setMini
-mumI(Test_org_eclipse_swt_widgets_ScrollBar.java:773)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_ScrollBar.runTest
-(Test_org_eclipse_swt_widgets_ScrollBar.java:893)
- at org.eclipse.swt.tests.junit.AllTests.main(AllTests.java:25)
-16) test_setTopItemLorg_eclipse_swt_widgets_TreeItem
-(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Tree)
-junit.framework.AssertionFailedError: expected:&lt;TreeItem {}&gt; but was:&lt;null&gt;
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Tree.test_setTopItemLo
-rg_eclipse_swt_widgets_TreeItem(Test_org_eclipse_swt_widgets_Tree.java:424)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Tree.runTest
-(Test_org_eclipse_swt_widgets_Tree.java:538)
- at org.eclipse.swt.tests.junit.AllTests.main(AllTests.java:25)
-17) test_setSelectionI
-(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_TabFolder)
-junit.framework.AssertionFailedError: expected:&lt;0&gt; but was:&lt;1&gt;
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_TabFolder.test_setSele
-ctionI(Test_org_eclipse_swt_widgets_TabFolder.java:307)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_TabFolder.runTest
-(Test_org_eclipse_swt_widgets_TabFolder.java:405)
- at org.eclipse.swt.tests.junit.AllTests.main(AllTests.java:25)
-18) test_clearSelection
-(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Combo)
-junit.framework.AssertionFailedError: :d:
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Combo.test_clearSelect
-ion(Test_org_eclipse_swt_widgets_Combo.java:130)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Combo.runTest
-(Test_org_eclipse_swt_widgets_Combo.java:669)
- at org.eclipse.swt.tests.junit.AllTests.main(AllTests.java:25)
-19) test_deselectI
-(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Combo)
-junit.framework.AssertionFailedError: :b:0
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Combo.test_deselectI
-(Test_org_eclipse_swt_widgets_Combo.java:155)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Combo.runTest
-(Test_org_eclipse_swt_widgets_Combo.java:673)
- at org.eclipse.swt.tests.junit.AllTests.main(AllTests.java:25)
-20) test_getSelectionIndex
-(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Combo)
-junit.framework.AssertionFailedError: expected:&lt;1&gt; but was:&lt;0&gt;
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Combo.test_getSelectio
-nIndex(Test_org_eclipse_swt_widgets_Combo.java:219)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Combo.runTest
-(Test_org_eclipse_swt_widgets_Combo.java:680)
- at org.eclipse.swt.tests.junit.AllTests.main(AllTests.java:25)
-21) test_removeI
-(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Combo)
-junit.framework.AssertionFailedError: index 0 expected:&lt;0&gt; but was:&lt;-1&gt;
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Combo.test_removeI
-(Test_org_eclipse_swt_widgets_Combo.java:356)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Combo.runTest
-(Test_org_eclipse_swt_widgets_Combo.java:687)
- at org.eclipse.swt.tests.junit.AllTests.main(AllTests.java:25)
-22) test_getRowCount
-(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_ToolBar)
-junit.framework.AssertionFailedError: :a:1
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_ToolBar.test_getRowCou
-nt(Test_org_eclipse_swt_widgets_ToolBar.java:132)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_ToolBar.runTest
-(Test_org_eclipse_swt_widgets_ToolBar.java:206)
- at org.eclipse.swt.tests.junit.AllTests.main(AllTests.java:25)
-23) test_setMaximumI
-(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Slider)
-junit.framework.AssertionFailedError: setMaximum(11): Thumb Expected: 1
-Actual: 10
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Slider.check
-(Test_org_eclipse_swt_widgets_Slider.java:67)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Slider.report
-(Test_org_eclipse_swt_widgets_Slider.java:60)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Slider.test_setMaximum
-I(Test_org_eclipse_swt_widgets_Slider.java:743)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Slider.runTest
-(Test_org_eclipse_swt_widgets_Slider.java:836)
- at org.eclipse.swt.tests.junit.AllTests.main(AllTests.java:25)
-24) test_setMinimumI
-(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Slider)
-junit.framework.AssertionFailedError: setMinimum(91): Thumb Expected: 9
-Actual: 10
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Slider.check
-(Test_org_eclipse_swt_widgets_Slider.java:67)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Slider.report
-(Test_org_eclipse_swt_widgets_Slider.java:60)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Slider.test_setMinimum
-I(Test_org_eclipse_swt_widgets_Slider.java:755)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Slider.runTest
-(Test_org_eclipse_swt_widgets_Slider.java:837)
- at org.eclipse.swt.tests.junit.AllTests.main(AllTests.java:25)
-25) test_copy
-(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_custom_StyledText)
-junit.framework.AssertionFailedError: :a:
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_custom_StyledText.test_copy
-(Test_org_eclipse_swt_custom_StyledText.java:559)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_custom_StyledText.runTest
-(Test_org_eclipse_swt_custom_StyledText.java:4127)
- at org.eclipse.swt.tests.junit.AllTests.main(AllTests.java:25)
-26) test_cut
-(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_custom_StyledText)
-junit.framework.AssertionFailedError: :a:
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_custom_StyledText.test_cut
-(Test_org_eclipse_swt_custom_StyledText.java:619)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_custom_StyledText.runTest
-(Test_org_eclipse_swt_custom_StyledText.java:4128)
- at org.eclipse.swt.tests.junit.AllTests.main(AllTests.java:25)
-27) test_getTopIndex
-(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_custom_StyledText)
-junit.framework.AssertionFailedError: :d:
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_custom_StyledText.test_getTopI
-ndex(Test_org_eclipse_swt_custom_StyledText.java:1388)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_custom_StyledText.runTest
-(Test_org_eclipse_swt_custom_StyledText.java:4159)
- at org.eclipse.swt.tests.junit.AllTests.main(AllTests.java:25)
-28) test_invokeActionI
-(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_custom_StyledText)
-junit.framework.ComparisonFailure: expected:&lt;...
-...&gt; but was:&lt;......&gt;
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_custom_StyledText.test_invokeA
-ctionI(Test_org_eclipse_swt_custom_StyledText.java:1593)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_custom_StyledText.runTest
-(Test_org_eclipse_swt_custom_StyledText.java:4163)
- at org.eclipse.swt.tests.junit.AllTests.main(AllTests.java:25)
-29) test_setTopIndexI
-(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_custom_StyledText)
-junit.framework.AssertionFailedError: :e:
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_custom_StyledText.test_setTopI
-ndexI(Test_org_eclipse_swt_custom_StyledText.java:3943)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_custom_StyledText.runTest
-(Test_org_eclipse_swt_custom_StyledText.java:4202)
- at org.eclipse.swt.tests.junit.AllTests.main(AllTests.java:25)
-30) test_setTopPixelI
-(org.eclipse.swt.tests.junit.Test_org_eclipse_swt_custom_StyledText)
-junit.framework.AssertionFailedError: :f:
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_custom_StyledText.test_setTopP
-ixelI(Test_org_eclipse_swt_custom_StyledText.java:3972)
- at
-org.eclipse.swt.tests.junit.Test_org_eclipse_swt_custom_StyledText.runTest
-(Test_org_eclipse_swt_custom_StyledText.java:4203)
- at org.eclipse.swt.tests.junit.AllTests.main(AllTests.java:25)
-
-FAILURES!!!
-Tests run: 4148, Failures: 30, Errors: 7
-
-
-Calls to warnUnimpl: 958</PRE><BR><I>------- Additional Comment <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=40152#c1" name=c1>#1</A>
-From <A href="mailto:felipe_heidrich@ca.ibm.com">Felipe Heidrich</A> 2003-07-28
-17:17 ------- </I><PRE>I was able to get rid of the GTK warnings, we still have 2 errors and 28
-Failures.
-</PRE>
-<HR>
-<!-- 1.0@bugzilla.org --><B>Bug List:</B> (18 of 183) <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=4862">First</A> <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=79413">Last</A> <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=40059">Prev</A> <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=40723">Next</A>
-&nbsp;&nbsp;<A
-href="https://bugs.eclipse.org/bugs/buglist.cgi?regetlastlist=1">Show list</A>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A
-href="https://bugs.eclipse.org/bugs/query.cgi">Query page</A>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A
-href="https://bugs.eclipse.org/bugs/enter_bug.cgi">Enter new bug</A> <BR><!-- 1.0@bugzilla.org -->
-<TABLE border=0>
- <TBODY>
- <TR>
- <TD vAlign=top bgColor=#000000>
- <TABLE cellSpacing=0 cellPadding=10 width="100%" bgColor=lightyellow
- border=0>
- <TBODY>
- <TR>
- <TD>This is <B>Bugzilla</B>: the Mozilla bug system. For more
- information about what Bugzilla is and what it can do, see <A
- href="http://www.bugzilla.org/">bugzilla.org</A>. <BR><!-- 1.0@bugzilla.org -->
- <FORM action=show_bug.cgi method=get>
- <TABLE width="100%">
- <TBODY>
- <TR>
- <TD>Actions: </TD>
- <TD vAlign=center noWrap><A
- href="https://bugs.eclipse.org/bugs/enter_bug.cgi">New</A> |
- <A href="https://bugs.eclipse.org/bugs/query.cgi">Query</A> | <INPUT type=submit value=Find> bug # <INPUT size=6 name=id> |
- <A
- href="https://bugs.eclipse.org/bugs/reports.cgi">Reports</A>
- </TD>
- <TD>&nbsp;</TD>
- <TD vAlign=center align=right><A
- href="https://bugs.eclipse.org/bugs/createaccount.cgi">New&nbsp;Account</A>
- | <A
- href="https://bugs.eclipse.org/bugs/query.cgi?GoAheadAndLogIn=1">Log&nbsp;In</A>
- </TD></TR></TBODY></TABLE></FORM></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></BODY></HTML>
diff --git a/org.eclipse.mylyn.bugzilla.tests/testdata/reports-stacktrace/4548.html b/org.eclipse.mylyn.bugzilla.tests/testdata/reports-stacktrace/4548.html
deleted file mode 100644
index b7047a40b..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/testdata/reports-stacktrace/4548.html
+++ /dev/null
@@ -1,377 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<!-- saved from url=(0050)https://bugs.eclipse.org/bugs/show_bug.cgi?id=4548 -->
-<!-- 1.0@bugzilla.org --><!-- 1.0@bugzilla.org --><HTML><HEAD><TITLE>Bug 4548 - DCR: TableTree should support icon in 1st column (1G06WFT)</TITLE>
-<META http-equiv=Content-Type content="text/html; charset=iso-8859-1"><LINK
-href="show_bug.cgi?id=36310" rel=Next><LINK href="show_bug.cgi?id=76101"
-rel=Last><LINK href="buglist.cgi?regetlastlist=1" rel=Up><LINK
-href="buglist.cgi?regetlastlist=1" rel=Contents>
-<META content="MSHTML 6.00.2800.1476" name=GENERATOR></HEAD>
-<BODY text=#000000 vLink=#551a8b aLink=#ff0000 link=#0000ee bgColor=#ffffff
-onload=""><!-- 1.0@bugzilla.org -->
-<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
- <TBODY>
- <TR>
- <TD width="100%">
- <TABLE cellSpacing=0 cellPadding=0 width="100%" bgColor=#006699
- border=0><TBODY>
- <TR>
- <TD width=116 bgColor=#000000><IMG height=50
- src="4548_files/EclipseBannerPic.jpg" width=115></TD>
- <TD width=637><A href="http://www.eclipse.org/"><IMG height=50
- src="4548_files/gradient.jpg" width=282 border=0></A></TD>
- <TD width=250><IMG height=48 src="4548_files/eproject-simple.gif"
- width=250></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
-<TABLE cellSpacing=0 border=0>
- <TBODY>
- <TR>
- <TD vAlign=top align=left>
- <TABLE cellSpacing=2 cellPadding=0 border=0>
- <TBODY>
- <TR>
- <TD vAlign=top noWrap align=left><FONT size=+1><B>Bugzilla Bug
- 4548</B></FONT> </TD></TR></TBODY></TABLE></TD>
- <TD vAlign=center>&nbsp;</TD>
- <TD vAlign=center align=left>DCR: TableTree should support icon in 1st
- column (1G06WFT)</TD></TR></TBODY></TABLE><!-- 1.0@bugzilla.org --><B>Bug
-List:</B> <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=36310">First</A> <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=76101">Last</A> (This bug is
-not in your list) &nbsp;&nbsp;<A
-href="https://bugs.eclipse.org/bugs/buglist.cgi?regetlastlist=1">Show list</A>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A
-href="https://bugs.eclipse.org/bugs/query.cgi">Query page</A>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A
-href="https://bugs.eclipse.org/bugs/enter_bug.cgi">Enter new bug</A>
-<HR>
-
-<FORM name=changeform action=process_bug.cgi method=post><INPUT type=hidden
-value=20020527161709 name=delta_ts> <INPUT type=hidden value=2
-name=longdesclength> <INPUT type=hidden value=4548 name=id>
-<TABLE cellSpacing=1 cellPadding=1 border=0>
- <TBODY>
- <TR>
- <TD align=right><B>Bug#:</B> </TD>
- <TD><A href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=4548">4548</A>
- </TD>
- <TD>&nbsp;</TD>
- <TD align=right><B>Platform:</B> </TD>
- <TD><SELECT name=rep_platform> <OPTION value=All selected>All</OPTION>
- <OPTION value=Macintosh>Macintosh</OPTION> <OPTION value=PC>PC</OPTION>
- <OPTION value="Power PC">Power PC</OPTION> <OPTION
- value=Sun>Sun</OPTION> <OPTION value=Other>Other</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD>
- <TD align=right><B>Reporter:</B> </TD>
- <TD>erich_gamma@ch.ibm.com (Erich Gamma) </TD></TR>
- <TR>
- <TD align=right><B>Product:</B> </TD>
- <TD><SELECT name=product> <OPTION value=AJDT>AJDT</OPTION> <OPTION
- value=AspectJ>AspectJ</OPTION> <OPTION value=Birt>Birt</OPTION> <OPTION
- value=CDT>CDT</OPTION> <OPTION value=CME>CME</OPTION> <OPTION
- value=Community>Community</OPTION> <OPTION value=ECESIS>ECESIS</OPTION>
- <OPTION value=ECF>ECF</OPTION> <OPTION value=EMF>EMF</OPTION> <OPTION
- value=Equinox>Equinox</OPTION> <OPTION value=ERCP>ERCP</OPTION> <OPTION
- value=GEF>GEF</OPTION> <OPTION value=GMT>GMT</OPTION> <OPTION
- value=Hyades>Hyades</OPTION> <OPTION value=JDT>JDT</OPTION> <OPTION
- value=OMELET>OMELET</OPTION> <OPTION value=PDE>PDE</OPTION> <OPTION
- value=Platform selected>Platform</OPTION> <OPTION
- value=Pollinate>Pollinate</OPTION> <OPTION
- value=Stellation>Stellation</OPTION> <OPTION value=UML2>UML2</OPTION>
- <OPTION value=VE>VE</OPTION> <OPTION value="Web Tools">Web
- Tools</OPTION> <OPTION value=WSVT>WSVT</OPTION> <OPTION
- value=XSD>XSD</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD>
- <TD align=right><B>OS:</B> </TD>
- <TD><SELECT name=op_sys> <OPTION value=All selected>All</OPTION> <OPTION
- value="AIX Motif">AIX Motif</OPTION> <OPTION value="Windows 95">Windows
- 95</OPTION> <OPTION value="Windows 98">Windows 98</OPTION> <OPTION
- value="Windows CE">Windows CE</OPTION> <OPTION
- value="Windows ME">Windows ME</OPTION> <OPTION
- value="Windows 2000">Windows 2000</OPTION> <OPTION
- value="Windows NT">Windows NT</OPTION> <OPTION
- value="Windows XP">Windows XP</OPTION> <OPTION
- value="Windows All">Windows All</OPTION> <OPTION value="MacOS X">MacOS
- X</OPTION> <OPTION value=Linux>Linux</OPTION> <OPTION
- value=Linux-GTK>Linux-GTK</OPTION> <OPTION
- value=Linux-Motif>Linux-Motif</OPTION> <OPTION
- value=HP-UX>HP-UX</OPTION> <OPTION value=Neutrino>Neutrino</OPTION>
- <OPTION value=QNX-Photon>QNX-Photon</OPTION> <OPTION
- value=Solaris>Solaris</OPTION> <OPTION
- value=Solaris-GTK>Solaris-GTK</OPTION> <OPTION
- value=Solaris-Motif>Solaris-Motif</OPTION> <OPTION value="Unix All">Unix
- All</OPTION> <OPTION value=other>other</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD>
- <TD align=right><B>Add&nbsp;CC:</B> </TD>
- <TD><INPUT size=30 name=newcc> </TD></TR>
- <TR>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/describecomponents.cgi?product=Platform">Component</A>:
- </B></TD>
- <TD><SELECT name=component> <OPTION value=Ant>Ant</OPTION> <OPTION
- value=Compare>Compare</OPTION> <OPTION value=CVS>CVS</OPTION> <OPTION
- value=Debug>Debug</OPTION> <OPTION value=Doc>Doc</OPTION> <OPTION
- value=Help>Help</OPTION> <OPTION value=Intro>Intro</OPTION> <OPTION
- value=Releng>Releng</OPTION> <OPTION value=Resources>Resources</OPTION>
- <OPTION value=Runtime>Runtime</OPTION> <OPTION
- value=Scripting>Scripting</OPTION> <OPTION value=Search>Search</OPTION>
- <OPTION value=SWT selected>SWT</OPTION> <OPTION value=Team>Team</OPTION>
- <OPTION value=Text>Text</OPTION> <OPTION value=UI>UI</OPTION> <OPTION
- value=Update>Update</OPTION> <OPTION value=WebDAV>WebDAV</OPTION></SELECT>
- </TD>
- <TD>&nbsp;</TD>
- <TD align=right><B>Version:</B> </TD>
- <TD><SELECT name=version> <OPTION value=1.0>1.0</OPTION> <OPTION
- value=2.0 selected>2.0</OPTION> <OPTION value=2.0.1>2.0.1</OPTION>
- <OPTION value=2.0.2>2.0.2</OPTION> <OPTION value=2.1>2.1</OPTION>
- <OPTION value=2.1.1>2.1.1</OPTION> <OPTION value=2.1.2>2.1.2</OPTION>
- <OPTION value=2.1.3>2.1.3</OPTION> <OPTION value=3.0>3.0</OPTION>
- <OPTION value=3.0.1>3.0.1</OPTION> <OPTION value=3.1>3.1</OPTION></SELECT>
- </TD>
- <TD>&nbsp;</TD>
- <TD vAlign=top align=right rowSpan=4><B>CC:</B> </TD>
- <TD vAlign=top rowSpan=4><INPUT type=hidden name=cc> </TD></TR>
- <TR>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/bug_status.html">Status</A>: </B></TD>
- <TD>RESOLVED</TD>
- <TD>&nbsp;</TD>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/bug_status.html#priority">Priority</A>:</B>
- </TD>
- <TD><SELECT name=priority> <OPTION value=P1>P1</OPTION> <OPTION
- value=P2>P2</OPTION> <OPTION value=P3>P3</OPTION> <OPTION
- value=P4>P4</OPTION> <OPTION value=P5 selected>P5</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD></TR>
- <TR>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/bug_status.html">Resolution</A>:
- </B></TD>
- <TD>WONTFIX</TD>
- <TD>&nbsp;</TD>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/bug_status.html#severity">Severity</A>:</B>
- </TD>
- <TD><SELECT name=bug_severity> <OPTION value=blocker>blocker</OPTION>
- <OPTION value=critical>critical</OPTION> <OPTION
- value=major>major</OPTION> <OPTION value=normal selected>normal</OPTION>
- <OPTION value=minor>minor</OPTION> <OPTION
- value=trivial>trivial</OPTION> <OPTION
- value=enhancement>enhancement</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD></TR>
- <TR>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/bug_status.html#assigned_to">Assigned&nbsp;To</A>:
- </B></TD>
- <TD>veronika_irvine@ca.ibm.com (Veronika Irvine)</TD>
- <TD>&nbsp;</TD>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/notargetmilestone.html">Target
- Milestone</A>: </B></TD>
- <TD><SELECT name=target_milestone> <OPTION value="2.0 M1">2.0
- M1</OPTION> <OPTION value="2.0 M2">2.0 M2</OPTION> <OPTION
- value="2.0 M3">2.0 M3</OPTION> <OPTION value="2.0 M4">2.0 M4</OPTION>
- <OPTION value="2.0 M5">2.0 M5</OPTION> <OPTION value="2.0 M6">2.0
- M6</OPTION> <OPTION value="2.0 F1">2.0 F1</OPTION> <OPTION
- value="2.0 F2">2.0 F2</OPTION> <OPTION value="2.0 F3">2.0 F3</OPTION>
- <OPTION value="2.0 F4">2.0 F4</OPTION> <OPTION
- value=2.0.1>2.0.1</OPTION> <OPTION value=2.0.2>2.0.2</OPTION> <OPTION
- value=2.1>2.1</OPTION> <OPTION value="2.1 M1">2.1 M1</OPTION> <OPTION
- value="2.1 M2">2.1 M2</OPTION> <OPTION value="2.1 M3">2.1 M3</OPTION>
- <OPTION value="2.1 M4">2.1 M4</OPTION> <OPTION value="2.1 M5">2.1
- M5</OPTION> <OPTION value="2.1 RC1">2.1 RC1</OPTION> <OPTION
- value="2.1 RC2">2.1 RC2</OPTION> <OPTION value="2.1 RC3">2.1
- RC3</OPTION> <OPTION value="2.1 RC4">2.1 RC4</OPTION> <OPTION
- value=2.1.1>2.1.1</OPTION> <OPTION value=2.1.2>2.1.2</OPTION> <OPTION
- value=2.1.3>2.1.3</OPTION> <OPTION value=3.0>3.0</OPTION> <OPTION
- value="3.0 M1">3.0 M1</OPTION> <OPTION value="3.0 M2">3.0 M2</OPTION>
- <OPTION value="3.0 M3">3.0 M3</OPTION> <OPTION value="3.0 M4">3.0
- M4</OPTION> <OPTION value="3.0 M5">3.0 M5</OPTION> <OPTION
- value="3.0 M6">3.0 M6</OPTION> <OPTION value="3.0 M7">3.0 M7</OPTION>
- <OPTION value="3.0 M8">3.0 M8</OPTION> <OPTION value="3.0 M9">3.0
- M9</OPTION> <OPTION value="3.0 RC1">3.0 RC1</OPTION> <OPTION
- value="3.0 RC2">3.0 RC2</OPTION> <OPTION value="3.0 RC3">3.0
- RC3</OPTION> <OPTION value="3.0 RC4">3.0 RC4</OPTION> <OPTION
- value=3.0.1>3.0.1</OPTION> <OPTION value=3.0.2>3.0.2</OPTION> <OPTION
- value=3.1>3.1</OPTION> <OPTION value="3.1 M1">3.1 M1</OPTION> <OPTION
- value="3.1 M2">3.1 M2</OPTION> <OPTION value="3.1 M3">3.1 M3</OPTION>
- <OPTION value="3.1 M4">3.1 M4</OPTION> <OPTION value="3.1 M5">3.1
- M5</OPTION> <OPTION value="3.1 M6">3.1 M6</OPTION> <OPTION value=---
- selected>---</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD></TR>
- <TR>
- <TD align=right><B>URL: </B></TD>
- <TD colSpan=7><INPUT size=60 name=bug_file_loc> </TD></TR>
- <TR>
- <TD align=right><B>Summary:</B> </TD>
- <TD colSpan=7><INPUT size=60
- value="DCR: TableTree should support icon in 1st column (1G06WFT)"
- name=short_desc> </TD></TR>
- <TR>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/describekeywords.cgi">Keywords</A>:
- </B>
- <TD colSpan=7><INPUT size=60 name=keywords> </TD></TR></TBODY></TABLE><!-- 1.0@bugzilla.org --><BR>
-<TABLE cellSpacing=0 cellPadding=4 border=1>
- <TBODY>
- <TR>
- <TH align=left bgColor=#cccccc>Attachment</TH>
- <TH align=left bgColor=#cccccc>Type</TH>
- <TH align=left bgColor=#cccccc>Modified</TH>
- <TH align=left bgColor=#cccccc>Status</TH>
- <TH align=left bgColor=#cccccc>Actions</TH></TR>
- <TR>
- <TD colSpan=4><A
- href="https://bugs.eclipse.org/bugs/attachment.cgi?bugid=4548&amp;action=enter">Create
- a New Attachment</A> (proposed patch, testcase, etc.) </TD>
- <TD><A
- href="https://bugs.eclipse.org/bugs/attachment.cgi?bugid=4548&amp;action=viewall">View
- All</A> </TD></TR></TBODY></TABLE><BR>
-<TABLE>
- <TBODY>
- <TR>
- <TH align=right>Bug 4548 depends on:</TH>
- <TD></TD>
- <TD><INPUT name=dependson> </TD>
- <TD rowSpan=2><A
- href="https://bugs.eclipse.org/bugs/showdependencytree.cgi?id=4548">Show
- dependency tree</A> </TD></TR>
- <TR>
- <TH align=right>Bug 4548 blocks:</TH>
- <TD></TD>
- <TD><INPUT name=blocked> </TD></TR></TBODY></TABLE>
-<TABLE>
- <TBODY>
- <TR>
- <TH><A href="https://bugs.eclipse.org/bugs/votehelp.html">Votes</A>: </TH>
- <TD>0&nbsp;&nbsp;&nbsp; <A
- href="https://bugs.eclipse.org/bugs/votes.cgi?action=show_bug&amp;bug_id=4548">Show
- votes for this bug</A>&nbsp;&nbsp;&nbsp; <A
- href="https://bugs.eclipse.org/bugs/votes.cgi?action=show_user&amp;bug_id=4548">Vote
- for this bug</A> </TD></TR></TBODY></TABLE><BR><B>Additional Comments:</B> <BR><TEXTAREA accessKey=c name=comment rows=10 wrap=hard cols=80></TEXTAREA>
-<BR><BR><INPUT type=radio CHECKED value=none name=knob> Leave as
-<B>RESOLVED&nbsp;WONTFIX</B> <BR><INPUT type=radio value=reopen name=knob>
-Reopen bug <BR><INPUT type=radio value=verify name=knob> Mark bug as
-<B>VERIFIED</B><BR><INPUT type=radio value=close name=knob> Mark bug as
-<B>CLOSED</B><BR><INPUT type=submit value=Commit> <INPUT type=hidden
-value=process_bug name=form_name>
-<P><FONT size=+1><B><A
-href="https://bugs.eclipse.org/bugs/show_activity.cgi?id=4548">View Bug
-Activity</A> &nbsp; | &nbsp; <A
-href="https://bugs.eclipse.org/bugs/long_list.cgi?buglist=4548">Format For
-Printing</A> </B></FONT></P></FORM>
-<TABLE>
- <TBODY>
- <TR>
- <TD align=left><B><A
- href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=4548#c0"
- name=c0>Description</A>: </B></TD>
- <TD align=right width="100%">Opened: 2001-10-11 14:18 </TD></TR></TBODY></TABLE>
-<HR>
-<!-- 1.0@bugzilla.org --><PRE>EG (8/24/00 3:41:25 PM)
- TableTree doesn't support showing an icon in the first column. The icon is eaten up
- by the +/- icon.
- Not being able to have an icon in the first column reduces the applicability
- of TableTree (we would like to use it in the Java plugin, but we can't).
-
-NOTES:
-
-VI (8/24/00 10:54:39 AM)
- TableTree is implemented using the Windows table widget and this only allows
- one image per column. Sorry, there's nothing we can do.
-
-AW (24.08.00 17:31:06)
- Why not combining the +/- icon with the client's icon into a single icon?
-
-EG (8/29/00 3:35:01 PM)
- JFace has support for compositing icons see:
- com.ibm.jface.examples.compositeimage.CompositeImageExample
-
-CM (3/17/01 5:29:49 PM)
- P1/M1 (April 1st, 2001)
- Need to know the priority of 1GAJ9KP: SWT:ALL - TableTree class has no selection support for the SWT.CHECK style
- because these two PRs may conflict.
-
-CM (3/28/01 5:09:33 PM)
- We investigated using the Windows "state image" feature in Table, but this is already being used by
- checkboxes if the Table is created with check style. It would also mean that we would have to provide
- platform-specific public API on Table to allow TableTree class to set/get state images. So we decided
- against this.
-
- VI is going to investigate merging the [+]/[-] images with the user's image. We would try to write it
- in such a way that only those who actually put an image in the first column would have to pay for
- the added slowness. We suspect there may be issues such as background color/transparency
- problems, hit test problems, selection highlight problems, and cheese problems, but we will have
- to try it first before we know for sure.
-
-VI (4/4/2001 10:41:59 AM)
- Two major issues which prevent us from merging the [+]/[-] with the user's image and using the normal first column image:
- 1) Images of different sizes can be added to the control, however the size of the image displayed in the associated
- Windows Common Control will be constrained to the size of the first image added to the ImageList.
- Images for all columns are added to the same ImageList and therefore must have the exact same height and WIDTH.
- This makes merging the +/- and the first column image have impact on every image in the TableTree
- 2) There is a limit to how may images I can cram in the ImageList. Having potentially 3 per row I think will quickly exceed the limit.
-
-VI (4/4/2001 05:20 PM)
-
- We have a PR that requests support for an image in the first column of a TableTree and I believe that you
- are the prime requestor.
-
- I have tried to make this work and below is the best I can do. As you can see, there is a limitation on the
- underlying native widget which is that all images in the TableTree must have the exact same height and width.
- Consequently, when I leave enough room to merge the +/- image with the image you wish to show in the first column,
- this causes all the other images in the TableTree to be stretched width wise.
-
- &lt;picture&gt;
-
- It is my opinion that the current TableTree can not be made to work any better than this. If this is not
- adequate for your use, the only alternative is to write a custom widget that does this and does not
- use the native widget. Writing a full custom widget is not trivial. It will probably require a month or
- two and will probably not give all the capability that is present in native List or Tree widgets (just
- because there are a lot of subtle things going on there and I won't have time to get them all). I need
- to know if I should commence with a custom widget. Also, as I have other responsibilities, Mike and I will
- have to discuss which of them will be set aside before I can do this work.
-
-VI (4/27/2001 8:42:19 AM)
- Have received no feedback requesting a custom Tree or implementation of the solution presented above.
- Moving to Inactive.</PRE><BR><I>------- Additional Comment <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=4548#c1" name=c1>#1</A> From
-<A href="mailto:veronika_irvine@ca.ibm.com">Veronika Irvine</A> 2002-05-27 16:17
-------- </I><PRE>Closing this bug report. A new DCR should be raised from a better custom table
-tree.</PRE>
-<HR>
-<!-- 1.0@bugzilla.org --><B>Bug List:</B> <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=36310">First</A> <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=76101">Last</A> (This bug is
-not in your list) &nbsp;&nbsp;<A
-href="https://bugs.eclipse.org/bugs/buglist.cgi?regetlastlist=1">Show list</A>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A
-href="https://bugs.eclipse.org/bugs/query.cgi">Query page</A>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A
-href="https://bugs.eclipse.org/bugs/enter_bug.cgi">Enter new bug</A> <BR><!-- 1.0@bugzilla.org -->
-<TABLE border=0>
- <TBODY>
- <TR>
- <TD vAlign=top bgColor=#000000>
- <TABLE cellSpacing=0 cellPadding=10 width="100%" bgColor=lightyellow
- border=0>
- <TBODY>
- <TR>
- <TD>This is <B>Bugzilla</B>: the Mozilla bug system. For more
- information about what Bugzilla is and what it can do, see <A
- href="http://www.bugzilla.org/">bugzilla.org</A>. <BR><!-- 1.0@bugzilla.org -->
- <FORM action=show_bug.cgi method=get>
- <TABLE width="100%">
- <TBODY>
- <TR>
- <TD>Actions: </TD>
- <TD vAlign=center noWrap><A
- href="https://bugs.eclipse.org/bugs/enter_bug.cgi">New</A> |
- <A href="https://bugs.eclipse.org/bugs/query.cgi">Query</A> | <INPUT type=submit value=Find> bug # <INPUT size=6 name=id> |
- <A
- href="https://bugs.eclipse.org/bugs/reports.cgi">Reports</A>
- </TD>
- <TD>&nbsp;</TD>
- <TD vAlign=center align=right><A
- href="https://bugs.eclipse.org/bugs/createaccount.cgi">New&nbsp;Account</A>
- | <A
- href="https://bugs.eclipse.org/bugs/query.cgi?GoAheadAndLogIn=1">Log&nbsp;In</A>
- </TD></TR></TBODY></TABLE></FORM></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></BODY></HTML>
diff --git a/org.eclipse.mylyn.bugzilla.tests/testdata/reports-stacktrace/4862.html b/org.eclipse.mylyn.bugzilla.tests/testdata/reports-stacktrace/4862.html
deleted file mode 100644
index 813a29a15..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/testdata/reports-stacktrace/4862.html
+++ /dev/null
@@ -1,401 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<!-- saved from url=(0050)https://bugs.eclipse.org/bugs/show_bug.cgi?id=4862 -->
-<!-- 1.0@bugzilla.org --><!-- 1.0@bugzilla.org --><HTML><HEAD><TITLE>Bug 4862 - Check for isDisposed() in dispose after sending Dispose Calback (1GLC25X)</TITLE>
-<META http-equiv=Content-Type content="text/html; charset=iso-8859-1"><LINK
-href="show_bug.cgi?id=36310" rel=Next><LINK href="show_bug.cgi?id=76101"
-rel=Last><LINK href="buglist.cgi?regetlastlist=1" rel=Up><LINK
-href="buglist.cgi?regetlastlist=1" rel=Contents>
-<META content="MSHTML 6.00.2800.1476" name=GENERATOR></HEAD>
-<BODY text=#000000 vLink=#551a8b aLink=#ff0000 link=#0000ee bgColor=#ffffff
-onload=""><!-- 1.0@bugzilla.org -->
-<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
- <TBODY>
- <TR>
- <TD width="100%">
- <TABLE cellSpacing=0 cellPadding=0 width="100%" bgColor=#006699
- border=0><TBODY>
- <TR>
- <TD width=116 bgColor=#000000><IMG height=50
- src="4862_files/EclipseBannerPic.jpg" width=115></TD>
- <TD width=637><A href="http://www.eclipse.org/"><IMG height=50
- src="4862_files/gradient.jpg" width=282 border=0></A></TD>
- <TD width=250><IMG height=48 src="4862_files/eproject-simple.gif"
- width=250></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
-<TABLE cellSpacing=0 border=0>
- <TBODY>
- <TR>
- <TD vAlign=top align=left>
- <TABLE cellSpacing=2 cellPadding=0 border=0>
- <TBODY>
- <TR>
- <TD vAlign=top noWrap align=left><FONT size=+1><B>Bugzilla Bug
- 4862</B></FONT> </TD></TR></TBODY></TABLE></TD>
- <TD vAlign=center>&nbsp;</TD>
- <TD vAlign=center align=left>Check for isDisposed() in dispose after
- sending Dispose Calback (1GLC25X)</TD></TR></TBODY></TABLE><!-- 1.0@bugzilla.org --><B>Bug List:</B> <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=36310">First</A> <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=76101">Last</A> (This bug is
-not in your list) &nbsp;&nbsp;<A
-href="https://bugs.eclipse.org/bugs/buglist.cgi?regetlastlist=1">Show list</A>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A
-href="https://bugs.eclipse.org/bugs/query.cgi">Query page</A>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A
-href="https://bugs.eclipse.org/bugs/enter_bug.cgi">Enter new bug</A>
-<HR>
-
-<FORM name=changeform action=process_bug.cgi method=post><INPUT type=hidden
-value=20040924100922 name=delta_ts> <INPUT type=hidden value=3
-name=longdesclength> <INPUT type=hidden value=4862 name=id>
-<TABLE cellSpacing=1 cellPadding=1 border=0>
- <TBODY>
- <TR>
- <TD align=right><B>Bug#:</B> </TD>
- <TD><A href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=4862">4862</A>
- </TD>
- <TD>&nbsp;</TD>
- <TD align=right><B>Platform:</B> </TD>
- <TD><SELECT name=rep_platform> <OPTION value=All selected>All</OPTION>
- <OPTION value=Macintosh>Macintosh</OPTION> <OPTION value=PC>PC</OPTION>
- <OPTION value="Power PC">Power PC</OPTION> <OPTION
- value=Sun>Sun</OPTION> <OPTION value=Other>Other</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD>
- <TD align=right><B>Reporter:</B> </TD>
- <TD>veronika_irvine@ca.ibm.com (Veronika Irvine) </TD></TR>
- <TR>
- <TD align=right><B>Product:</B> </TD>
- <TD><SELECT name=product> <OPTION value=AJDT>AJDT</OPTION> <OPTION
- value=AspectJ>AspectJ</OPTION> <OPTION value=CDT>CDT</OPTION> <OPTION
- value=CME>CME</OPTION> <OPTION value=Community>Community</OPTION>
- <OPTION value=ECESIS>ECESIS</OPTION> <OPTION value=EMF>EMF</OPTION>
- <OPTION value=Equinox>Equinox</OPTION> <OPTION value=ERCP>ERCP</OPTION>
- <OPTION value=GEF>GEF</OPTION> <OPTION value=GMT>GMT</OPTION> <OPTION
- value=Hyades>Hyades</OPTION> <OPTION value=JDT>JDT</OPTION> <OPTION
- value=OMELET>OMELET</OPTION> <OPTION value=PDE>PDE</OPTION> <OPTION
- value=Platform selected>Platform</OPTION> <OPTION
- value=Pollinate>Pollinate</OPTION> <OPTION
- value=Stellation>Stellation</OPTION> <OPTION value=UML2>UML2</OPTION>
- <OPTION value=VE>VE</OPTION> <OPTION value="Web Tools">Web
- Tools</OPTION> <OPTION value=WSVT>WSVT</OPTION> <OPTION
- value=XSD>XSD</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD>
- <TD align=right><B>OS:</B> </TD>
- <TD><SELECT name=op_sys> <OPTION value=All selected>All</OPTION> <OPTION
- value="AIX Motif">AIX Motif</OPTION> <OPTION value="Windows 95">Windows
- 95</OPTION> <OPTION value="Windows 98">Windows 98</OPTION> <OPTION
- value="Windows CE">Windows CE</OPTION> <OPTION
- value="Windows ME">Windows ME</OPTION> <OPTION
- value="Windows 2000">Windows 2000</OPTION> <OPTION
- value="Windows NT">Windows NT</OPTION> <OPTION
- value="Windows XP">Windows XP</OPTION> <OPTION
- value="Windows All">Windows All</OPTION> <OPTION value="MacOS X">MacOS
- X</OPTION> <OPTION value=Linux>Linux</OPTION> <OPTION
- value=Linux-GTK>Linux-GTK</OPTION> <OPTION
- value=Linux-Motif>Linux-Motif</OPTION> <OPTION
- value=HP-UX>HP-UX</OPTION> <OPTION value=Neutrino>Neutrino</OPTION>
- <OPTION value=QNX-Photon>QNX-Photon</OPTION> <OPTION
- value=Solaris>Solaris</OPTION> <OPTION value="Unix All">Unix
- All</OPTION> <OPTION value=other>other</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD>
- <TD align=right><B>Add&nbsp;CC:</B> </TD>
- <TD><INPUT size=30 name=newcc> </TD></TR>
- <TR>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/describecomponents.cgi?product=Platform">Component</A>:
- </B></TD>
- <TD><SELECT name=component> <OPTION value=Ant>Ant</OPTION> <OPTION
- value=Compare>Compare</OPTION> <OPTION value=CVS>CVS</OPTION> <OPTION
- value=Debug>Debug</OPTION> <OPTION value=Doc>Doc</OPTION> <OPTION
- value=Help>Help</OPTION> <OPTION value=Intro>Intro</OPTION> <OPTION
- value=Releng>Releng</OPTION> <OPTION value=Resources>Resources</OPTION>
- <OPTION value=Runtime>Runtime</OPTION> <OPTION
- value=Scripting>Scripting</OPTION> <OPTION value=Search>Search</OPTION>
- <OPTION value=SWT selected>SWT</OPTION> <OPTION value=Team>Team</OPTION>
- <OPTION value=Text>Text</OPTION> <OPTION value=UI>UI</OPTION> <OPTION
- value=Update>Update</OPTION> <OPTION value=WebDAV>WebDAV</OPTION></SELECT>
- </TD>
- <TD>&nbsp;</TD>
- <TD align=right><B>Version:</B> </TD>
- <TD><SELECT name=version> <OPTION value=1.0>1.0</OPTION> <OPTION
- value=2.0 selected>2.0</OPTION> <OPTION value=2.0.1>2.0.1</OPTION>
- <OPTION value=2.0.2>2.0.2</OPTION> <OPTION value=2.1>2.1</OPTION>
- <OPTION value=2.1.1>2.1.1</OPTION> <OPTION value=2.1.2>2.1.2</OPTION>
- <OPTION value=2.1.3>2.1.3</OPTION> <OPTION value=3.0>3.0</OPTION>
- <OPTION value=3.0.1>3.0.1</OPTION> <OPTION value=3.1>3.1</OPTION></SELECT>
- </TD>
- <TD>&nbsp;</TD>
- <TD vAlign=top align=right rowSpan=4><B>CC:</B> </TD>
- <TD vAlign=top rowSpan=4><SELECT multiple size=5 name=cc> <OPTION
- value=steve_northover@ca.ibm.com>steve_northover@ca.ibm.com</OPTION></SELECT>
- <BR><INPUT type=checkbox name=removecc>Remove selected CCs <BR></TD></TR>
- <TR>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/bug_status.html">Status</A>: </B></TD>
- <TD>NEW</TD>
- <TD>&nbsp;</TD>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/bug_status.html#priority">Priority</A>:</B>
- </TD>
- <TD><SELECT name=priority> <OPTION value=P1>P1</OPTION> <OPTION
- value=P2>P2</OPTION> <OPTION value=P3 selected>P3</OPTION> <OPTION
- value=P4>P4</OPTION> <OPTION value=P5>P5</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD></TR>
- <TR>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/bug_status.html">Resolution</A>:
- </B></TD>
- <TD></TD>
- <TD>&nbsp;</TD>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/bug_status.html#severity">Severity</A>:</B>
- </TD>
- <TD><SELECT name=bug_severity> <OPTION value=blocker>blocker</OPTION>
- <OPTION value=critical>critical</OPTION> <OPTION
- value=major>major</OPTION> <OPTION value=normal selected>normal</OPTION>
- <OPTION value=minor>minor</OPTION> <OPTION
- value=trivial>trivial</OPTION> <OPTION
- value=enhancement>enhancement</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD></TR>
- <TR>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/bug_status.html#assigned_to">Assigned&nbsp;To</A>:
- </B></TD>
- <TD>Silenio_Quarti@ca.ibm.com (Silenio Quarti)</TD>
- <TD>&nbsp;</TD>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/notargetmilestone.html">Target
- Milestone</A>: </B></TD>
- <TD><SELECT name=target_milestone> <OPTION value="2.0 M1">2.0
- M1</OPTION> <OPTION value="2.0 M2">2.0 M2</OPTION> <OPTION
- value="2.0 M3">2.0 M3</OPTION> <OPTION value="2.0 M4">2.0 M4</OPTION>
- <OPTION value="2.0 M5">2.0 M5</OPTION> <OPTION value="2.0 M6">2.0
- M6</OPTION> <OPTION value="2.0 F1">2.0 F1</OPTION> <OPTION
- value="2.0 F2">2.0 F2</OPTION> <OPTION value="2.0 F3">2.0 F3</OPTION>
- <OPTION value="2.0 F4">2.0 F4</OPTION> <OPTION
- value=2.0.1>2.0.1</OPTION> <OPTION value=2.0.2>2.0.2</OPTION> <OPTION
- value=2.1>2.1</OPTION> <OPTION value="2.1 M1">2.1 M1</OPTION> <OPTION
- value="2.1 M2">2.1 M2</OPTION> <OPTION value="2.1 M3">2.1 M3</OPTION>
- <OPTION value="2.1 M4">2.1 M4</OPTION> <OPTION value="2.1 M5">2.1
- M5</OPTION> <OPTION value="2.1 RC1">2.1 RC1</OPTION> <OPTION
- value="2.1 RC2">2.1 RC2</OPTION> <OPTION value="2.1 RC3">2.1
- RC3</OPTION> <OPTION value="2.1 RC4">2.1 RC4</OPTION> <OPTION
- value=2.1.1>2.1.1</OPTION> <OPTION value=2.1.2>2.1.2</OPTION> <OPTION
- value=2.1.3>2.1.3</OPTION> <OPTION value=3.0>3.0</OPTION> <OPTION
- value="3.0 M1">3.0 M1</OPTION> <OPTION value="3.0 M2">3.0 M2</OPTION>
- <OPTION value="3.0 M3">3.0 M3</OPTION> <OPTION value="3.0 M4">3.0
- M4</OPTION> <OPTION value="3.0 M5">3.0 M5</OPTION> <OPTION
- value="3.0 M6">3.0 M6</OPTION> <OPTION value="3.0 M7">3.0 M7</OPTION>
- <OPTION value="3.0 M8">3.0 M8</OPTION> <OPTION value="3.0 M9">3.0
- M9</OPTION> <OPTION value="3.0 RC1">3.0 RC1</OPTION> <OPTION
- value="3.0 RC2">3.0 RC2</OPTION> <OPTION value="3.0 RC3">3.0
- RC3</OPTION> <OPTION value="3.0 RC4">3.0 RC4</OPTION> <OPTION
- value=3.0.1>3.0.1</OPTION> <OPTION value=3.0.2>3.0.2</OPTION> <OPTION
- value=3.1>3.1</OPTION> <OPTION value="3.1 M1">3.1 M1</OPTION> <OPTION
- value="3.1 M2">3.1 M2</OPTION> <OPTION value="3.1 M3">3.1 M3</OPTION>
- <OPTION value="3.1 M4">3.1 M4</OPTION> <OPTION value="3.1 M5">3.1
- M5</OPTION> <OPTION value="3.1 M6">3.1 M6</OPTION> <OPTION value=---
- selected>---</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD></TR>
- <TR>
- <TD align=right><B>URL: </B></TD>
- <TD colSpan=7><INPUT size=60 name=bug_file_loc> </TD></TR>
- <TR>
- <TD align=right><B>Summary:</B> </TD>
- <TD colSpan=7><INPUT size=60
- value="Check for isDisposed() in dispose after sending Dispose Calback (1GLC25X)"
- name=short_desc> </TD></TR>
- <TR>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/describekeywords.cgi">Keywords</A>:
- </B>
- <TD colSpan=7><INPUT size=60 name=keywords> </TD></TR></TBODY></TABLE><!-- 1.0@bugzilla.org --><BR>
-<TABLE cellSpacing=0 cellPadding=4 border=1>
- <TBODY>
- <TR>
- <TH align=left bgColor=#cccccc>Attachment</TH>
- <TH align=left bgColor=#cccccc>Type</TH>
- <TH align=left bgColor=#cccccc>Modified</TH>
- <TH align=left bgColor=#cccccc>Status</TH>
- <TH align=left bgColor=#cccccc>Actions</TH></TR>
- <TR>
- <TD colSpan=4><A
- href="https://bugs.eclipse.org/bugs/attachment.cgi?bugid=4862&amp;action=enter">Create
- a New Attachment</A> (proposed patch, testcase, etc.) </TD>
- <TD><A
- href="https://bugs.eclipse.org/bugs/attachment.cgi?bugid=4862&amp;action=viewall">View
- All</A> </TD></TR></TBODY></TABLE><BR>
-<TABLE>
- <TBODY>
- <TR>
- <TH align=right>Bug 4862 depends on:</TH>
- <TD></TD>
- <TD><INPUT name=dependson> </TD>
- <TD rowSpan=2><A
- href="https://bugs.eclipse.org/bugs/showdependencytree.cgi?id=4862">Show
- dependency tree</A> </TD></TR>
- <TR>
- <TH align=right>Bug 4862 blocks:</TH>
- <TD></TD>
- <TD><INPUT name=blocked> </TD></TR></TBODY></TABLE>
-<TABLE>
- <TBODY>
- <TR>
- <TH><A href="https://bugs.eclipse.org/bugs/votehelp.html">Votes</A>: </TH>
- <TD>0&nbsp;&nbsp;&nbsp; <A
- href="https://bugs.eclipse.org/bugs/votes.cgi?action=show_bug&amp;bug_id=4862">Show
- votes for this bug</A>&nbsp;&nbsp;&nbsp; <A
- href="https://bugs.eclipse.org/bugs/votes.cgi?action=show_user&amp;bug_id=4862">Vote
- for this bug</A> </TD></TR></TBODY></TABLE><BR><B>Additional Comments:</B> <BR><TEXTAREA accessKey=c name=comment rows=10 wrap=hard cols=80></TEXTAREA>
-<BR><BR><INPUT type=radio CHECKED value=none name=knob> Leave as
-<B>NEW&nbsp;</B> <BR><INPUT type=radio value=accept name=knob> Accept bug
-(change status to <B>ASSIGNED</B>) <BR><INPUT type=radio value=resolve
-name=knob> Resolve bug, changing <A
-href="https://bugs.eclipse.org/bugs/bug_status.html">resolution</A> to <SELECT
-onchange=document.changeform.knob[2].checked=true name=resolution> <OPTION
- value=FIXED selected>FIXED</OPTION> <OPTION value=INVALID>INVALID</OPTION>
- <OPTION value=WONTFIX>WONTFIX</OPTION> <OPTION value=LATER>LATER</OPTION>
- <OPTION value=REMIND>REMIND</OPTION> <OPTION
- value=WORKSFORME>WORKSFORME</OPTION></SELECT> <BR><INPUT type=radio
-value=duplicate name=knob> Resolve bug, mark it as duplicate of bug # <INPUT
-onchange="if (this.value != '')&#10; {document.changeform.knob[3].checked=true}"
-size=6 name=dup_id> <BR><INPUT type=radio value=reassign name=knob> <A
-href="https://bugs.eclipse.org/bugs/bug_status.html#assigned_to">Reassign</A>
-bug to <INPUT
-onchange="if ((this.value != 'Silenio_Quarti@ca.ibm.com') &amp;&amp; &#10; (this.value != '')) {&#10; document.changeform.knob[4].checked=true; &#10; }"
-size=32 value=Silenio_Quarti@ca.ibm.com name=assigned_to> <BR><INPUT type=radio
-value=reassignbycomponent name=knob> Reassign bug to owner of selected component
-<BR><INPUT type=submit value=Commit> <INPUT type=hidden value=process_bug
-name=form_name>
-<P><FONT size=+1><B><A
-href="https://bugs.eclipse.org/bugs/show_activity.cgi?id=4862">View Bug
-Activity</A> &nbsp; | &nbsp; <A
-href="https://bugs.eclipse.org/bugs/long_list.cgi?buglist=4862">Format For
-Printing</A> </B></FONT></P></FORM>
-<TABLE>
- <TBODY>
- <TR>
- <TD align=left><B><A
- href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=4862#c0"
- name=c0>Description</A>: </B></TD>
- <TD align=right width="100%">Opened: 2001-10-11 14:24 </TD></TR></TBODY></TABLE>
-<HR>
-<!-- 1.0@bugzilla.org --><PRE>Run the following example, click on the button and you get the SWT Exception wdiget is disposed.
-See Stack trace below.
-In the dispose method of a widget, we need to check that the widget has not been disposed in the Dispose callback.
-
-public static void main(String args[]){
- Display display = new Display ();
- Shell shell = new Shell();
- shell.setLayout(new org.eclipse.swt.layout.GridLayout());
- shell.setBounds(100,30, 800,600);
- shell.open();
-
- final Composite panel = new Composite(shell, SWT.BORDER);
- panel.setBounds(20,430,100,100);
-
- final Button button = new Button(panel, 0);
- button.setText("dispose button");
- button.setBounds(7,7,80,70);
- final SelectionAdapter[] selectionListener = new SelectionAdapter[1];
- selectionListener[0] = new SelectionAdapter(){
- public void widgetSelected (org.eclipse.swt.events.SelectionEvent e){
- button.dispose();
- }
- };
- button.addSelectionListener(selectionListener[0]);
-
- final DisposeListener[] disposeListener = new DisposeListener[1];
- disposeListener[0] = new DisposeListener(){
- public void widgetDisposed(org.eclipse.swt.events.DisposeEvent e){
- button.removeDisposeListener(disposeListener[0]);
- panel.dispose();
- }
- };
- button.addDisposeListener(disposeListener[0]);
-
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
-}
-
-
-org.eclipse.swt.SWTException: Widget is disposed
- at org.eclipse.swt.SWT.error(SWT.java:1818)
- at org.eclipse.swt.SWT.error(SWT.java:1750)
- at org.eclipse.swt.widgets.Widget.error(Widget.java:379)
- at org.eclipse.swt.widgets.Control.getDisplay(Control.java:597)
- at org.eclipse.swt.widgets.Control.unsubclass(Control.java:2365)
- at org.eclipse.swt.widgets.Control.releaseWidget(Control.java:1247)
- at org.eclipse.swt.widgets.Button.releaseWidget(Button.java:344)
- at org.eclipse.swt.widgets.Widget.dispose(Widget.java:366)
- at veronika._Scrapbook$1.widgetSelected(_Scrapbook.java:43)
- at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:85)
- at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:54)
- at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:645)
- at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1359)
- at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1160)
- at veronika._Scrapbook.main(_Scrapbook.java:58)
-Exception in thread "main"
-
-NOTES:</PRE><BR><I>------- Additional Comment <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=4862#c1" name=c1>#1</A> From
-<A href="mailto:dj_houghton@ca.ibm.com">DJ Houghton</A> 2001-10-29 16:44 -------
-</I><PRE>PRODUCT VERSION:
-2.0 007
-
-</PRE><BR><I>------- Additional Comment <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=4862#c2" name=c2>#2</A> From
-<A href="mailto:veronika_irvine@ca.ibm.com">Veronika Irvine</A> 2004-09-24 10:09
-------- </I><PRE>In 3.1, I get a different error now on Windows:
-
-java.lang.NullPointerException
- at org.eclipse.swt.widgets.Control.deregister(Control.java:498)
- at org.eclipse.swt.widgets.Control.releaseWidget(Control.java:1496)
- at org.eclipse.swt.widgets.Button.releaseWidget(Button.java:364)
- at org.eclipse.swt.widgets.Widget.dispose(Widget.java:368)
- at veronika.Newsgroup$1.widgetSelected(Newsgroup.java:25)
- at org.eclipse.swt.widgets.TypedListener.handleEvent
-(TypedListener.java:89)
- at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
- at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
- at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2783)
- at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2442)
- at veronika.Newsgroup.main(Newsgroup.java:40)
-</PRE>
-<HR>
-<!-- 1.0@bugzilla.org --><B>Bug List:</B> <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=36310">First</A> <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=76101">Last</A> (This bug is
-not in your list) &nbsp;&nbsp;<A
-href="https://bugs.eclipse.org/bugs/buglist.cgi?regetlastlist=1">Show list</A>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A
-href="https://bugs.eclipse.org/bugs/query.cgi">Query page</A>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A
-href="https://bugs.eclipse.org/bugs/enter_bug.cgi">Enter new bug</A> <BR><!-- 1.0@bugzilla.org -->
-<TABLE border=0>
- <TBODY>
- <TR>
- <TD vAlign=top bgColor=#000000>
- <TABLE cellSpacing=0 cellPadding=10 width="100%" bgColor=lightyellow
- border=0>
- <TBODY>
- <TR>
- <TD>This is <B>Bugzilla</B>: the Mozilla bug system. For more
- information about what Bugzilla is and what it can do, see <A
- href="http://www.bugzilla.org/">bugzilla.org</A>. <BR><!-- 1.0@bugzilla.org -->
- <FORM action=show_bug.cgi method=get>
- <TABLE width="100%">
- <TBODY>
- <TR>
- <TD>Actions: </TD>
- <TD vAlign=center noWrap><A
- href="https://bugs.eclipse.org/bugs/enter_bug.cgi">New</A> |
- <A href="https://bugs.eclipse.org/bugs/query.cgi">Query</A> | <INPUT type=submit value=Find> bug # <INPUT size=6 name=id> |
- <A
- href="https://bugs.eclipse.org/bugs/reports.cgi">Reports</A>
- </TD>
- <TD>&nbsp;</TD>
- <TD vAlign=center align=right><A
- href="https://bugs.eclipse.org/bugs/createaccount.cgi">New&nbsp;Account</A>
- | <A
- href="https://bugs.eclipse.org/bugs/query.cgi?GoAheadAndLogIn=1">Log&nbsp;In</A>
- </TD></TR></TBODY></TABLE></FORM></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></BODY></HTML>
diff --git a/org.eclipse.mylyn.bugzilla.tests/testdata/reports-stacktrace/67395.html b/org.eclipse.mylyn.bugzilla.tests/testdata/reports-stacktrace/67395.html
deleted file mode 100644
index ec9911002..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/testdata/reports-stacktrace/67395.html
+++ /dev/null
@@ -1,390 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<!-- saved from url=(0051)https://bugs.eclipse.org/bugs/show_bug.cgi?id=67395 -->
-<!-- 1.0@bugzilla.org --><!-- 1.0@bugzilla.org --><HTML><HEAD><TITLE>Bug 67395 - NullPointerException @ org.eclipse.jdt.internal.debug.eval.ast.engine.ASTInstructionCompiler.containsALocalType</TITLE>
-<META http-equiv=Content-Type content="text/html; charset=iso-8859-1"><LINK
-href="show_bug.cgi?id=36310" rel=Next><LINK href="show_bug.cgi?id=76101"
-rel=Last><LINK href="buglist.cgi?regetlastlist=1" rel=Up><LINK
-href="buglist.cgi?regetlastlist=1" rel=Contents>
-<META content="MSHTML 6.00.2800.1476" name=GENERATOR></HEAD>
-<BODY text=#000000 vLink=#551a8b aLink=#ff0000 link=#0000ee bgColor=#ffffff
-onload=""><!-- 1.0@bugzilla.org -->
-<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
- <TBODY>
- <TR>
- <TD width="100%">
- <TABLE cellSpacing=0 cellPadding=0 width="100%" bgColor=#006699
- border=0><TBODY>
- <TR>
- <TD width=116 bgColor=#000000><IMG height=50
- src="67395_files/EclipseBannerPic.jpg" width=115></TD>
- <TD width=637><A href="http://www.eclipse.org/"><IMG height=50
- src="67395_files/gradient.jpg" width=282 border=0></A></TD>
- <TD width=250><IMG height=48 src="67395_files/eproject-simple.gif"
- width=250></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
-<TABLE cellSpacing=0 border=0>
- <TBODY>
- <TR>
- <TD vAlign=top align=left>
- <TABLE cellSpacing=2 cellPadding=0 border=0>
- <TBODY>
- <TR>
- <TD vAlign=top noWrap align=left><FONT size=+1><B>Bugzilla Bug
- 67395</B></FONT> </TD></TR></TBODY></TABLE></TD>
- <TD vAlign=center>&nbsp;</TD>
- <TD vAlign=center align=left>NullPointerException @
- org.eclipse.jdt.internal.debug.eval.ast.engine.ASTInstructionCompiler.containsALocalType</TD></TR></TBODY></TABLE><!-- 1.0@bugzilla.org --><B>Bug
-List:</B> <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=36310">First</A> <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=76101">Last</A> (This bug is
-not in your list) &nbsp;&nbsp;<A
-href="https://bugs.eclipse.org/bugs/buglist.cgi?regetlastlist=1">Show list</A>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A
-href="https://bugs.eclipse.org/bugs/query.cgi">Query page</A>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A
-href="https://bugs.eclipse.org/bugs/enter_bug.cgi">Enter new bug</A>
-<HR>
-
-<FORM name=changeform action=process_bug.cgi method=post><INPUT type=hidden
-value=20041108112414 name=delta_ts> <INPUT type=hidden value=10
-name=longdesclength> <INPUT type=hidden value=67395 name=id>
-<TABLE cellSpacing=1 cellPadding=1 border=0>
- <TBODY>
- <TR>
- <TD align=right><B>Bug#:</B> </TD>
- <TD><A
- href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=67395">67395</A> </TD>
- <TD>&nbsp;</TD>
- <TD align=right><B>Platform:</B> </TD>
- <TD><SELECT name=rep_platform> <OPTION value=All>All</OPTION> <OPTION
- value=Macintosh>Macintosh</OPTION> <OPTION value=PC selected>PC</OPTION>
- <OPTION value="Power PC">Power PC</OPTION> <OPTION
- value=Sun>Sun</OPTION> <OPTION value=Other>Other</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD>
- <TD align=right><B>Reporter:</B> </TD>
- <TD>Leo.Kuznetsov@windriver.com (Leo Kuznetsov) </TD></TR>
- <TR>
- <TD align=right><B>Product:</B> </TD>
- <TD><SELECT name=product> <OPTION value=AJDT>AJDT</OPTION> <OPTION
- value=AspectJ>AspectJ</OPTION> <OPTION value=Birt>Birt</OPTION> <OPTION
- value=CDT>CDT</OPTION> <OPTION value=CME>CME</OPTION> <OPTION
- value=Community>Community</OPTION> <OPTION value=ECESIS>ECESIS</OPTION>
- <OPTION value=ECF>ECF</OPTION> <OPTION value=EMF>EMF</OPTION> <OPTION
- value=Equinox>Equinox</OPTION> <OPTION value=ERCP>ERCP</OPTION> <OPTION
- value=GEF>GEF</OPTION> <OPTION value=GMT>GMT</OPTION> <OPTION
- value=Hyades>Hyades</OPTION> <OPTION value=JDT selected>JDT</OPTION>
- <OPTION value=OMELET>OMELET</OPTION> <OPTION value=PDE>PDE</OPTION>
- <OPTION value=Platform>Platform</OPTION> <OPTION
- value=Pollinate>Pollinate</OPTION> <OPTION
- value=Stellation>Stellation</OPTION> <OPTION value=UML2>UML2</OPTION>
- <OPTION value=VE>VE</OPTION> <OPTION value="Web Tools">Web
- Tools</OPTION> <OPTION value=WSVT>WSVT</OPTION> <OPTION
- value=XSD>XSD</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD>
- <TD align=right><B>OS:</B> </TD>
- <TD><SELECT name=op_sys> <OPTION value=All>All</OPTION> <OPTION
- value="AIX Motif">AIX Motif</OPTION> <OPTION value="Windows 95">Windows
- 95</OPTION> <OPTION value="Windows 98">Windows 98</OPTION> <OPTION
- value="Windows CE">Windows CE</OPTION> <OPTION
- value="Windows ME">Windows ME</OPTION> <OPTION
- value="Windows 2000">Windows 2000</OPTION> <OPTION
- value="Windows NT">Windows NT</OPTION> <OPTION value="Windows XP"
- selected>Windows XP</OPTION> <OPTION value="Windows All">Windows
- All</OPTION> <OPTION value="MacOS X">MacOS X</OPTION> <OPTION
- value=Linux>Linux</OPTION> <OPTION value=Linux-GTK>Linux-GTK</OPTION>
- <OPTION value=Linux-Motif>Linux-Motif</OPTION> <OPTION
- value=HP-UX>HP-UX</OPTION> <OPTION value=Neutrino>Neutrino</OPTION>
- <OPTION value=QNX-Photon>QNX-Photon</OPTION> <OPTION
- value=Solaris>Solaris</OPTION> <OPTION
- value=Solaris-GTK>Solaris-GTK</OPTION> <OPTION
- value=Solaris-Motif>Solaris-Motif</OPTION> <OPTION value="Unix All">Unix
- All</OPTION> <OPTION value=other>other</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD>
- <TD align=right><B>Add&nbsp;CC:</B> </TD>
- <TD><INPUT size=30 name=newcc> </TD></TR>
- <TR>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/describecomponents.cgi?product=JDT">Component</A>:
- </B></TD>
- <TD><SELECT name=component> <OPTION value=Core>Core</OPTION> <OPTION
- value=Debug selected>Debug</OPTION> <OPTION value=Doc>Doc</OPTION>
- <OPTION value=Text>Text</OPTION> <OPTION value=UI>UI</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD>
- <TD align=right><B>Version:</B> </TD>
- <TD><SELECT name=version> <OPTION value=1.0>1.0</OPTION> <OPTION
- value=2.0>2.0</OPTION> <OPTION value=2.0.1>2.0.1</OPTION> <OPTION
- value=2.0.2>2.0.2</OPTION> <OPTION value=2.1>2.1</OPTION> <OPTION
- value=2.1.1>2.1.1</OPTION> <OPTION value=2.1.2>2.1.2</OPTION> <OPTION
- value=3.0 selected>3.0</OPTION> <OPTION value=3.0.1>3.0.1</OPTION>
- <OPTION value=3.1>3.1</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD>
- <TD vAlign=top align=right rowSpan=4><B>CC:</B> </TD>
- <TD vAlign=top rowSpan=4><SELECT multiple size=5 name=cc> <OPTION
- value=christof_marti@ch.ibm.com>christof_marti@ch.ibm.com</OPTION>
- <OPTION value=Darin_Wright@ca.ibm.com>Darin_Wright@ca.ibm.com</OPTION>
- <OPTION
- value=Michael.Scharf@windriver.com>Michael.Scharf@windriver.com</OPTION></SELECT>
- <BR><INPUT type=checkbox name=removecc>Remove selected CCs <BR></TD></TR>
- <TR>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/bug_status.html">Status</A>: </B></TD>
- <TD>ASSIGNED</TD>
- <TD>&nbsp;</TD>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/bug_status.html#priority">Priority</A>:</B>
- </TD>
- <TD><SELECT name=priority> <OPTION value=P1>P1</OPTION> <OPTION
- value=P2>P2</OPTION> <OPTION value=P3 selected>P3</OPTION> <OPTION
- value=P4>P4</OPTION> <OPTION value=P5>P5</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD></TR>
- <TR>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/bug_status.html">Resolution</A>:
- </B></TD>
- <TD></TD>
- <TD>&nbsp;</TD>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/bug_status.html#severity">Severity</A>:</B>
- </TD>
- <TD><SELECT name=bug_severity> <OPTION value=blocker>blocker</OPTION>
- <OPTION value=critical>critical</OPTION> <OPTION
- value=major>major</OPTION> <OPTION value=normal selected>normal</OPTION>
- <OPTION value=minor>minor</OPTION> <OPTION
- value=trivial>trivial</OPTION> <OPTION
- value=enhancement>enhancement</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD></TR>
- <TR>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/bug_status.html#assigned_to">Assigned&nbsp;To</A>:
- </B></TD>
- <TD>luc_bourlier@us.ibm.com (Luc Bourlier)</TD>
- <TD>&nbsp;</TD>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/notargetmilestone.html">Target
- Milestone</A>: </B></TD>
- <TD><SELECT name=target_milestone> <OPTION value="2.0 M1">2.0
- M1</OPTION> <OPTION value="2.0 M2">2.0 M2</OPTION> <OPTION
- value="2.0 M3">2.0 M3</OPTION> <OPTION value="2.0 M4">2.0 M4</OPTION>
- <OPTION value="2.0 M5">2.0 M5</OPTION> <OPTION value="2.0 M6">2.0
- M6</OPTION> <OPTION value="2.0 F1">2.0 F1</OPTION> <OPTION
- value="2.0 F2">2.0 F2</OPTION> <OPTION value="2.0 F3">2.0 F3</OPTION>
- <OPTION value="2.0 F4">2.0 F4</OPTION> <OPTION
- value=2.0.1>2.0.1</OPTION> <OPTION value=2.0.2>2.0.2</OPTION> <OPTION
- value=2.1>2.1</OPTION> <OPTION value="2.1 M1">2.1 M1</OPTION> <OPTION
- value="2.1 M2">2.1 M2</OPTION> <OPTION value="2.1 M3">2.1 M3</OPTION>
- <OPTION value="2.1 M4">2.1 M4</OPTION> <OPTION value="2.1 M5">2.1
- M5</OPTION> <OPTION value="2.1 RC1">2.1 RC1</OPTION> <OPTION
- value="2.1 RC2">2.1 RC2</OPTION> <OPTION value="2.1 RC3">2.1
- RC3</OPTION> <OPTION value="2.1 RC4">2.1 RC4</OPTION> <OPTION
- value=2.1.1>2.1.1</OPTION> <OPTION value=2.1.2>2.1.2</OPTION> <OPTION
- value=2.1.3>2.1.3</OPTION> <OPTION value=3.0>3.0</OPTION> <OPTION
- value="3.0 M1">3.0 M1</OPTION> <OPTION value="3.0 M2">3.0 M2</OPTION>
- <OPTION value="3.0 M3">3.0 M3</OPTION> <OPTION value="3.0 M4">3.0
- M4</OPTION> <OPTION value="3.0 M5">3.0 M5</OPTION> <OPTION
- value="3.0 M6">3.0 M6</OPTION> <OPTION value="3.0 M7">3.0 M7</OPTION>
- <OPTION value="3.0 M8">3.0 M8</OPTION> <OPTION value="3.0 M9">3.0
- M9</OPTION> <OPTION value="3.0 RC1">3.0 RC1</OPTION> <OPTION
- value="3.0 RC2">3.0 RC2</OPTION> <OPTION value="3.0 RC3">3.0
- RC3</OPTION> <OPTION value="3.0 RC4">3.0 RC4</OPTION> <OPTION
- value=3.0.1>3.0.1</OPTION> <OPTION value=3.0.2>3.0.2</OPTION> <OPTION
- value=3.1>3.1</OPTION> <OPTION value="3.1 M1">3.1 M1</OPTION> <OPTION
- value="3.1 M2">3.1 M2</OPTION> <OPTION value="3.1 M3">3.1 M3</OPTION>
- <OPTION value="3.1 M4" selected>3.1 M4</OPTION> <OPTION
- value="3.1 M5">3.1 M5</OPTION> <OPTION value="3.1 M6">3.1 M6</OPTION>
- <OPTION value=--->---</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD></TR>
- <TR>
- <TD align=right><B>URL: </B></TD>
- <TD colSpan=7><INPUT size=60 name=bug_file_loc> </TD></TR>
- <TR>
- <TD align=right><B>Summary:</B> </TD>
- <TD colSpan=7><INPUT size=60
- value="NullPointerException @ org.eclipse.jdt.internal.debug.eval.ast.engine.ASTInstructionCompiler.containsALocalType"
- name=short_desc> </TD></TR>
- <TR>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/describekeywords.cgi">Keywords</A>:
- </B>
- <TD colSpan=7><INPUT size=60 name=keywords> </TD></TR></TBODY></TABLE><!-- 1.0@bugzilla.org --><BR>
-<TABLE cellSpacing=0 cellPadding=4 border=1>
- <TBODY>
- <TR>
- <TH align=left bgColor=#cccccc>Attachment</TH>
- <TH align=left bgColor=#cccccc>Type</TH>
- <TH align=left bgColor=#cccccc>Modified</TH>
- <TH align=left bgColor=#cccccc>Status</TH>
- <TH align=left bgColor=#cccccc>Actions</TH></TR>
- <TR>
- <TD colSpan=4><A
- href="https://bugs.eclipse.org/bugs/attachment.cgi?bugid=67395&amp;action=enter">Create
- a New Attachment</A> (proposed patch, testcase, etc.) </TD>
- <TD><A
- href="https://bugs.eclipse.org/bugs/attachment.cgi?bugid=67395&amp;action=viewall">View
- All</A> </TD></TR></TBODY></TABLE><BR>
-<TABLE>
- <TBODY>
- <TR>
- <TH align=right>Bug 67395 depends on:</TH>
- <TD></TD>
- <TD><INPUT name=dependson> </TD>
- <TD rowSpan=2><A
- href="https://bugs.eclipse.org/bugs/showdependencytree.cgi?id=67395">Show
- dependency tree</A> </TD></TR>
- <TR>
- <TH align=right>Bug 67395 blocks:</TH>
- <TD></TD>
- <TD><INPUT name=blocked> </TD></TR></TBODY></TABLE>
-<TABLE>
- <TBODY>
- <TR>
- <TH><A href="https://bugs.eclipse.org/bugs/votehelp.html">Votes</A>: </TH>
- <TD>0&nbsp;&nbsp;&nbsp; <A
- href="https://bugs.eclipse.org/bugs/votes.cgi?action=show_bug&amp;bug_id=67395">Show
- votes for this bug</A>&nbsp;&nbsp;&nbsp; <A
- href="https://bugs.eclipse.org/bugs/votes.cgi?action=show_user&amp;bug_id=67395">Vote
- for this bug</A> </TD></TR></TBODY></TABLE><BR><B>Additional Comments:</B> <BR><TEXTAREA accessKey=c name=comment rows=10 wrap=hard cols=80></TEXTAREA>
-<BR><BR><INPUT type=radio CHECKED value=none name=knob> Leave as
-<B>ASSIGNED&nbsp;</B> <BR><INPUT type=radio value=resolve name=knob> Resolve
-bug, changing <A
-href="https://bugs.eclipse.org/bugs/bug_status.html">resolution</A> to <SELECT
-onchange=document.changeform.knob[1].checked=true name=resolution> <OPTION
- value=FIXED selected>FIXED</OPTION> <OPTION value=INVALID>INVALID</OPTION>
- <OPTION value=WONTFIX>WONTFIX</OPTION> <OPTION value=LATER>LATER</OPTION>
- <OPTION value=REMIND>REMIND</OPTION> <OPTION
- value=WORKSFORME>WORKSFORME</OPTION></SELECT> <BR><INPUT type=radio
-value=duplicate name=knob> Resolve bug, mark it as duplicate of bug # <INPUT
-onchange="if (this.value != '')&#10; {document.changeform.knob[2].checked=true}"
-size=6 name=dup_id> <BR><INPUT type=radio value=reassign name=knob> <A
-href="https://bugs.eclipse.org/bugs/bug_status.html#assigned_to">Reassign</A>
-bug to <INPUT
-onchange="if ((this.value != 'luc_bourlier@us.ibm.com') &amp;&amp; &#10; (this.value != '')) {&#10; document.changeform.knob[3].checked=true; &#10; }"
-size=32 value=luc_bourlier@us.ibm.com name=assigned_to> <BR><INPUT type=radio
-value=reassignbycomponent name=knob> Reassign bug to owner of selected component
-<BR><INPUT type=submit value=Commit> <INPUT type=hidden value=process_bug
-name=form_name>
-<P><FONT size=+1><B><A
-href="https://bugs.eclipse.org/bugs/show_activity.cgi?id=67395">View Bug
-Activity</A> &nbsp; | &nbsp; <A
-href="https://bugs.eclipse.org/bugs/long_list.cgi?buglist=67395">Format For
-Printing</A> </B></FONT></P></FORM>
-<TABLE>
- <TBODY>
- <TR>
- <TD align=left><B><A
- href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=67395#c0"
- name=c0>Description</A>: </B></TD>
- <TD align=right width="100%">Opened: 2004-06-15 18:14 </TD></TR></TBODY></TABLE>
-<HR>
-<!-- 1.0@bugzilla.org --><PRE>java.lang.NullPointerException
-at
-org.eclipse.jdt.internal.debug.eval.ast.engine.ASTInstructionCompiler.containsA
-LocalType(ASTInstructionCompiler.java:331)
-at org.eclipse.jdt.internal.debug.eval.ast.engine.ASTInstructionCompiler.visit
-(ASTInstructionCompiler.java:2075)
-at org.eclipse.jdt.core.dom.MethodInvocation.accept0(MethodInvocation.java:234)
-at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2456)
-at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2503)
-at org.eclipse.jdt.core.dom.ReturnStatement.accept0(ReturnStatement.java:133)
-at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2456)
-at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2526)
-at org.eclipse.jdt.core.dom.Block.accept0(Block.java:133)
-at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2456)
-at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2503)
-at org.eclipse.jdt.core.dom.MethodDeclaration.accept0
-(MethodDeclaration.java:499)
-at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2456)
-at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2526)
-at org.eclipse.jdt.core.dom.TypeDeclaration.accept0(TypeDeclaration.java:474)
-at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2456)
-at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2526)
-at org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java:290)
-at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2456)
-at
-org.eclipse.jdt.internal.debug.eval.ast.engine.ASTEvaluationEngine.createExpres
-sionFromAST(ASTEvaluationEngine.java:251)
-at
-org.eclipse.jdt.internal.debug.eval.ast.engine.ASTEvaluationEngine.getCompiledE
-xpression(ASTEvaluationEngine.java:156)
-at org.eclipse.jdt.internal.debug.eval.ast.engine.ASTEvaluationEngine.evaluate
-(ASTEvaluationEngine.java:73)
-at
-org.eclipse.jdt.internal.debug.ui.JavaWatchExpressionDelegate$EvaluationRunnabl
-e.run(JavaWatchExpressionDelegate.java:144)
-at org.eclipse.jdt.internal.debug.core.model.JDIThread$ThreadJob.run
-(JDIThread.java:2510)
-at org.eclipse.core.internal.jobs.Worker.run(Worker.java:66)</PRE><BR><I>-------
-Additional Comment <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=67395#c1" name=c1>#1</A>
-From <A href="mailto:john_arthorne@ca.ibm.com">John Arthorne</A> 2004-06-15
-18:17 ------- </I><PRE>Please include the Eclipse build number in the bug report. Also, it looks like
-you are evaluating a watch expression. Please include/describe the expression,
-and say if it is reproducible.</PRE><BR><I>------- Additional Comment <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=67395#c2" name=c2>#2</A>
-From <A href="mailto:Darin_Wright@ca.ibm.com">Darin Wright</A> 2004-06-16 13:38
-------- </I><PRE>Do you have the expression that caused this problem?</PRE><BR><I>-------
-Additional Comment <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=67395#c3" name=c3>#3</A>
-From <A href="mailto:Darin_Wright@ca.ibm.com">Darin Wright</A> 2004-06-17 12:26
-------- </I><PRE>*** <STRIKE><A title="RESOLVED DUPLICATE - NPE while evaluating watch expression" href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=67664">Bug 67664</A></STRIKE> has been marked as a duplicate of this bug. ***</PRE><BR><I>-------
-Additional Comment <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=67395#c4" name=c4>#4</A>
-From <A href="mailto:Leo.Kuznetsov@windriver.com">Leo Kuznetsov</A> 2004-06-17
-15:53 ------- </I><PRE>This was a function call:
-
-Sequent.getCurrent().toDebugString()
-
-where toDebugString() returns String</PRE><BR><I>------- Additional Comment <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=67395#c5" name=c5>#5</A>
-From <A href="mailto:Darin_Wright@ca.ibm.com">Darin Wright</A> 2004-06-23 09:24
-------- </I><PRE>Deferred</PRE><BR><I>------- Additional Comment <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=67395#c6" name=c6>#6</A>
-From <A href="mailto:Darin_Wright@ca.ibm.com">Darin Wright</A> 2004-08-03 14:57
-------- </I><PRE>*** <STRIKE><A title="RESOLVED DUPLICATE - NPE from watch expression evaluation" href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=70615">Bug 70615</A></STRIKE> has been marked as a duplicate of this bug. ***</PRE><BR><I>-------
-Additional Comment <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=67395#c7" name=c7>#7</A>
-From <A href="mailto:Darin_Wright@ca.ibm.com">Darin Wright</A> 2004-08-03 14:57
-------- </I><PRE>open for 3.1</PRE><BR><I>------- Additional Comment <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=67395#c8" name=c8>#8</A>
-From <A href="mailto:Darin_Wright@ca.ibm.com">Darin Wright</A> 2004-08-03 14:58
-------- </I><PRE>Luc, please advise if this should be fixed in 3.0.1</PRE><BR><I>-------
-Additional Comment <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=67395#c9" name=c9>#9</A>
-From <A href="mailto:Darin_Wright@ca.ibm.com">Darin Wright</A> 2004-08-12 09:26
-------- </I><PRE>*** <STRIKE><A title="RESOLVED DUPLICATE - NPE in ASTInstructionCompiler.containsALocalType" href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=71851">Bug 71851</A></STRIKE> has been marked as a duplicate of this bug. ***</PRE>
-<HR>
-<!-- 1.0@bugzilla.org --><B>Bug List:</B> <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=36310">First</A> <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=76101">Last</A> (This bug is
-not in your list) &nbsp;&nbsp;<A
-href="https://bugs.eclipse.org/bugs/buglist.cgi?regetlastlist=1">Show list</A>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A
-href="https://bugs.eclipse.org/bugs/query.cgi">Query page</A>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A
-href="https://bugs.eclipse.org/bugs/enter_bug.cgi">Enter new bug</A> <BR><!-- 1.0@bugzilla.org -->
-<TABLE border=0>
- <TBODY>
- <TR>
- <TD vAlign=top bgColor=#000000>
- <TABLE cellSpacing=0 cellPadding=10 width="100%" bgColor=lightyellow
- border=0>
- <TBODY>
- <TR>
- <TD>This is <B>Bugzilla</B>: the Mozilla bug system. For more
- information about what Bugzilla is and what it can do, see <A
- href="http://www.bugzilla.org/">bugzilla.org</A>. <BR><!-- 1.0@bugzilla.org -->
- <FORM action=show_bug.cgi method=get>
- <TABLE width="100%">
- <TBODY>
- <TR>
- <TD>Actions: </TD>
- <TD vAlign=center noWrap><A
- href="https://bugs.eclipse.org/bugs/enter_bug.cgi">New</A> |
- <A href="https://bugs.eclipse.org/bugs/query.cgi">Query</A> | <INPUT type=submit value=Find> bug # <INPUT size=6 name=id> |
- <A
- href="https://bugs.eclipse.org/bugs/reports.cgi">Reports</A>
- </TD>
- <TD>&nbsp;</TD>
- <TD vAlign=center align=right><A
- href="https://bugs.eclipse.org/bugs/createaccount.cgi">New&nbsp;Account</A>
- | <A
- href="https://bugs.eclipse.org/bugs/query.cgi?GoAheadAndLogIn=1">Log&nbsp;In</A>
- </TD></TR></TBODY></TABLE></FORM></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></BODY></HTML>
diff --git a/org.eclipse.mylyn.bugzilla.tests/testdata/reports-stacktrace/76146.html b/org.eclipse.mylyn.bugzilla.tests/testdata/reports-stacktrace/76146.html
deleted file mode 100644
index f806fe8aa..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/testdata/reports-stacktrace/76146.html
+++ /dev/null
@@ -1,406 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<!-- saved from url=(0051)https://bugs.eclipse.org/bugs/show_bug.cgi?id=76146 -->
-<!-- 1.0@bugzilla.org --><!-- 1.0@bugzilla.org --><HTML><HEAD><TITLE>Bug 76146 - NPE using quickfix in Aspect opened with java editor</TITLE>
-<META http-equiv=Content-Type content="text/html; charset=iso-8859-1"><LINK
-href="show_bug.cgi?id=36310" rel=Next><LINK href="show_bug.cgi?id=76101"
-rel=Last><LINK href="buglist.cgi?regetlastlist=1" rel=Up><LINK
-href="buglist.cgi?regetlastlist=1" rel=Contents>
-<META content="MSHTML 6.00.2800.1476" name=GENERATOR></HEAD>
-<BODY text=#000000 vLink=#551a8b aLink=#ff0000 link=#0000ee bgColor=#ffffff
-onload=""><!-- 1.0@bugzilla.org -->
-<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
- <TBODY>
- <TR>
- <TD width="100%">
- <TABLE cellSpacing=0 cellPadding=0 width="100%" bgColor=#006699
- border=0><TBODY>
- <TR>
- <TD width=116 bgColor=#000000><IMG height=50
- src="76146_files/EclipseBannerPic.jpg" width=115></TD>
- <TD width=637><A href="http://www.eclipse.org/"><IMG height=50
- src="76146_files/gradient.jpg" width=282 border=0></A></TD>
- <TD width=250><IMG height=48 src="76146_files/eproject-simple.gif"
- width=250></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
-<TABLE cellSpacing=0 border=0>
- <TBODY>
- <TR>
- <TD vAlign=top align=left>
- <TABLE cellSpacing=2 cellPadding=0 border=0>
- <TBODY>
- <TR>
- <TD vAlign=top noWrap align=left><FONT size=+1><B>Bugzilla Bug
- 76146</B></FONT> </TD></TR></TBODY></TABLE></TD>
- <TD vAlign=center>&nbsp;</TD>
- <TD vAlign=center align=left>NPE using quickfix in Aspect opened with java
- editor</TD></TR></TBODY></TABLE><!-- 1.0@bugzilla.org --><B>Bug List:</B> <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=36310">First</A> <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=76101">Last</A> (This bug is
-not in your list) &nbsp;&nbsp;<A
-href="https://bugs.eclipse.org/bugs/buglist.cgi?regetlastlist=1">Show list</A>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A
-href="https://bugs.eclipse.org/bugs/query.cgi">Query page</A>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A
-href="https://bugs.eclipse.org/bugs/enter_bug.cgi">Enter new bug</A>
-<HR>
-
-<FORM name=changeform action=process_bug.cgi method=post><INPUT type=hidden
-value=20041013045125 name=delta_ts> <INPUT type=hidden value=1
-name=longdesclength> <INPUT type=hidden value=76146 name=id>
-<TABLE cellSpacing=1 cellPadding=1 border=0>
- <TBODY>
- <TR>
- <TD align=right><B>Bug#:</B> </TD>
- <TD><A
- href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=76146">76146</A> </TD>
- <TD>&nbsp;</TD>
- <TD align=right><B>Platform:</B> </TD>
- <TD><SELECT name=rep_platform> <OPTION value=All>All</OPTION> <OPTION
- value=Macintosh>Macintosh</OPTION> <OPTION value=PC selected>PC</OPTION>
- <OPTION value="Power PC">Power PC</OPTION> <OPTION
- value=Sun>Sun</OPTION> <OPTION value=Other>Other</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD>
- <TD align=right><B>Reporter:</B> </TD>
- <TD>hawkinsh@uk.ibm.com (Helen Hawkins) </TD></TR>
- <TR>
- <TD align=right><B>Product:</B> </TD>
- <TD><SELECT name=product> <OPTION value=AJDT selected>AJDT</OPTION>
- <OPTION value=AspectJ>AspectJ</OPTION> <OPTION value=Birt>Birt</OPTION>
- <OPTION value=CDT>CDT</OPTION> <OPTION value=CME>CME</OPTION> <OPTION
- value=Community>Community</OPTION> <OPTION value=ECESIS>ECESIS</OPTION>
- <OPTION value=ECF>ECF</OPTION> <OPTION value=EMF>EMF</OPTION> <OPTION
- value=Equinox>Equinox</OPTION> <OPTION value=ERCP>ERCP</OPTION> <OPTION
- value=GEF>GEF</OPTION> <OPTION value=GMT>GMT</OPTION> <OPTION
- value=Hyades>Hyades</OPTION> <OPTION value=JDT>JDT</OPTION> <OPTION
- value=OMELET>OMELET</OPTION> <OPTION value=PDE>PDE</OPTION> <OPTION
- value=Platform>Platform</OPTION> <OPTION
- value=Pollinate>Pollinate</OPTION> <OPTION
- value=Stellation>Stellation</OPTION> <OPTION value=UML2>UML2</OPTION>
- <OPTION value=VE>VE</OPTION> <OPTION value="Web Tools">Web
- Tools</OPTION> <OPTION value=WSVT>WSVT</OPTION> <OPTION
- value=XSD>XSD</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD>
- <TD align=right><B>OS:</B> </TD>
- <TD><SELECT name=op_sys> <OPTION value=All>All</OPTION> <OPTION
- value="AIX Motif">AIX Motif</OPTION> <OPTION value="Windows 95">Windows
- 95</OPTION> <OPTION value="Windows 98">Windows 98</OPTION> <OPTION
- value="Windows CE">Windows CE</OPTION> <OPTION
- value="Windows ME">Windows ME</OPTION> <OPTION
- value="Windows 2000">Windows 2000</OPTION> <OPTION
- value="Windows NT">Windows NT</OPTION> <OPTION value="Windows XP"
- selected>Windows XP</OPTION> <OPTION value="Windows All">Windows
- All</OPTION> <OPTION value="MacOS X">MacOS X</OPTION> <OPTION
- value=Linux>Linux</OPTION> <OPTION value=Linux-GTK>Linux-GTK</OPTION>
- <OPTION value=Linux-Motif>Linux-Motif</OPTION> <OPTION
- value=HP-UX>HP-UX</OPTION> <OPTION value=Neutrino>Neutrino</OPTION>
- <OPTION value=QNX-Photon>QNX-Photon</OPTION> <OPTION
- value=Solaris>Solaris</OPTION> <OPTION
- value=Solaris-GTK>Solaris-GTK</OPTION> <OPTION
- value=Solaris-Motif>Solaris-Motif</OPTION> <OPTION value="Unix All">Unix
- All</OPTION> <OPTION value=other>other</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD>
- <TD align=right><B>Add&nbsp;CC:</B> </TD>
- <TD><INPUT size=30 name=newcc> </TD></TR>
- <TR>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/describecomponents.cgi?product=AJDT">Component</A>:
- </B></TD>
- <TD><SELECT name=component> <OPTION value=Core>Core</OPTION> <OPTION
- value=Doc>Doc</OPTION> <OPTION value=UI selected>UI</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD>
- <TD align=right><B>Version:</B> </TD>
- <TD><SELECT name=version> <OPTION value=1.1.11>1.1.11</OPTION> <OPTION
- value=1.1.12 selected>1.1.12</OPTION> <OPTION value=1.1.3>1.1.3</OPTION>
- <OPTION value=1.1.4>1.1.4</OPTION> <OPTION value=1.1.7>1.1.7</OPTION>
- <OPTION value=1.2.0>1.2.0</OPTION> <OPTION value="1.2.0 M1">1.2.0
- M1</OPTION> <OPTION value=unspecified>unspecified</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD>
- <TD vAlign=top align=right rowSpan=4><B>CC:</B> </TD>
- <TD vAlign=top rowSpan=4><INPUT type=hidden name=cc> </TD></TR>
- <TR>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/bug_status.html">Status</A>: </B></TD>
- <TD>NEW</TD>
- <TD>&nbsp;</TD>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/bug_status.html#priority">Priority</A>:</B>
- </TD>
- <TD><SELECT name=priority> <OPTION value=P1>P1</OPTION> <OPTION
- value=P2>P2</OPTION> <OPTION value=P3 selected>P3</OPTION> <OPTION
- value=P4>P4</OPTION> <OPTION value=P5>P5</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD></TR>
- <TR>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/bug_status.html">Resolution</A>:
- </B></TD>
- <TD></TD>
- <TD>&nbsp;</TD>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/bug_status.html#severity">Severity</A>:</B>
- </TD>
- <TD><SELECT name=bug_severity> <OPTION value=blocker>blocker</OPTION>
- <OPTION value=critical>critical</OPTION> <OPTION
- value=major>major</OPTION> <OPTION value=normal selected>normal</OPTION>
- <OPTION value=minor>minor</OPTION> <OPTION
- value=trivial>trivial</OPTION> <OPTION
- value=enhancement>enhancement</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD></TR>
- <TR>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/bug_status.html#assigned_to">Assigned&nbsp;To</A>:
- </B></TD>
- <TD>mchapman@uk.ibm.com (Matt Chapman)</TD>
- <TD>&nbsp;</TD>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/notargetmilestone.html">Target
- Milestone</A>: </B></TD>
- <TD><SELECT name=target_milestone> <OPTION value=---
- selected>---</OPTION> <OPTION value=1.1.12>1.1.12</OPTION> <OPTION
- value=1.1.13>1.1.13</OPTION> <OPTION value=1.1.3>1.1.3</OPTION> <OPTION
- value=1.1.4>1.1.4</OPTION> <OPTION value=1.2.0>1.2.0</OPTION> <OPTION
- value="1.2.0 M1">1.2.0 M1</OPTION> <OPTION value="1.2.0 M2">1.2.0
- M2</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD></TR>
- <TR>
- <TD align=right><B>URL: </B></TD>
- <TD colSpan=7><INPUT size=60 name=bug_file_loc> </TD></TR>
- <TR>
- <TD align=right><B>Summary:</B> </TD>
- <TD colSpan=7><INPUT size=60
- value="NPE using quickfix in Aspect opened with java editor"
- name=short_desc> </TD></TR>
- <TR>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/describekeywords.cgi">Keywords</A>:
- </B>
- <TD colSpan=7><INPUT size=60 name=keywords> </TD></TR></TBODY></TABLE><!-- 1.0@bugzilla.org --><BR>
-<TABLE cellSpacing=0 cellPadding=4 border=1>
- <TBODY>
- <TR>
- <TH align=left bgColor=#cccccc>Attachment</TH>
- <TH align=left bgColor=#cccccc>Type</TH>
- <TH align=left bgColor=#cccccc>Modified</TH>
- <TH align=left bgColor=#cccccc>Status</TH>
- <TH align=left bgColor=#cccccc>Actions</TH></TR>
- <TR>
- <TD colSpan=4><A
- href="https://bugs.eclipse.org/bugs/attachment.cgi?bugid=76146&amp;action=enter">Create
- a New Attachment</A> (proposed patch, testcase, etc.) </TD>
- <TD><A
- href="https://bugs.eclipse.org/bugs/attachment.cgi?bugid=76146&amp;action=viewall">View
- All</A> </TD></TR></TBODY></TABLE><BR>
-<TABLE>
- <TBODY>
- <TR>
- <TH align=right>Bug 76146 depends on:</TH>
- <TD></TD>
- <TD><INPUT name=dependson> </TD>
- <TD rowSpan=2><A
- href="https://bugs.eclipse.org/bugs/showdependencytree.cgi?id=76146">Show
- dependency tree</A> </TD></TR>
- <TR>
- <TH align=right>Bug 76146 blocks:</TH>
- <TD></TD>
- <TD><INPUT name=blocked> </TD></TR></TBODY></TABLE><BR><B>Additional
-Comments:</B> <BR><TEXTAREA accessKey=c name=comment rows=10 wrap=hard cols=80></TEXTAREA>
-<BR><BR><INPUT type=radio CHECKED value=none name=knob> Leave as
-<B>NEW&nbsp;</B> <BR><INPUT type=radio value=accept name=knob> Accept bug
-(change status to <B>ASSIGNED</B>) <BR><INPUT type=radio value=resolve
-name=knob> Resolve bug, changing <A
-href="https://bugs.eclipse.org/bugs/bug_status.html">resolution</A> to <SELECT
-onchange=document.changeform.knob[2].checked=true name=resolution> <OPTION
- value=FIXED selected>FIXED</OPTION> <OPTION value=INVALID>INVALID</OPTION>
- <OPTION value=WONTFIX>WONTFIX</OPTION> <OPTION value=LATER>LATER</OPTION>
- <OPTION value=REMIND>REMIND</OPTION> <OPTION
- value=WORKSFORME>WORKSFORME</OPTION></SELECT> <BR><INPUT type=radio
-value=duplicate name=knob> Resolve bug, mark it as duplicate of bug # <INPUT
-onchange="if (this.value != '')&#10; {document.changeform.knob[3].checked=true}"
-size=6 name=dup_id> <BR><INPUT type=radio value=reassign name=knob> <A
-href="https://bugs.eclipse.org/bugs/bug_status.html#assigned_to">Reassign</A>
-bug to <INPUT
-onchange="if ((this.value != 'mchapman@uk.ibm.com') &amp;&amp; &#10; (this.value != '')) {&#10; document.changeform.knob[4].checked=true; &#10; }"
-size=32 value=mchapman@uk.ibm.com name=assigned_to> <BR><INPUT type=radio
-value=reassignbycomponent name=knob> Reassign bug to owner of selected component
-<BR><INPUT type=submit value=Commit> <INPUT type=hidden value=process_bug
-name=form_name>
-<P><FONT size=+1><B><A
-href="https://bugs.eclipse.org/bugs/show_activity.cgi?id=76146">View Bug
-Activity</A> &nbsp; | &nbsp; <A
-href="https://bugs.eclipse.org/bugs/long_list.cgi?buglist=76146">Format For
-Printing</A> </B></FONT></P></FORM>
-<TABLE>
- <TBODY>
- <TR>
- <TD align=left><B><A
- href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=76146#c0"
- name=c0>Description</A>: </B></TD>
- <TD align=right width="100%">Opened: 2004-10-13 04:51 </TD></TR></TBODY></TABLE>
-<HR>
-<!-- 1.0@bugzilla.org --><PRE>To recreate:
-
-- Check out the QuickFix project from ajdt.test project
-- Open TestAspect.java in the Java Editor (right click &gt; open with &gt; Java
-Editor)
-- Click on the lightbulb with the error marker (the same line as File f = new
-File("tmp");
-- An Internal Error appear in the Error log with the following stack trace:
-
-
-
-java.lang.NullPointerException
-at
-org.eclipse.jdt.internal.ui.text.correction.UnresolvedElementsSubProcessor.getT
-ypeProposals(UnresolvedElementsSubProcessor.java:395)
-at org.eclipse.jdt.internal.ui.text.correction.QuickFixProcessor.process
-(QuickFixProcessor.java:270)
-at org.eclipse.jdt.internal.ui.text.correction.QuickFixProcessor.getCorrections
-(QuickFixProcessor.java:202)
-at
-org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor.collectCorr
-ections(JavaCorrectionProcessor.java:240)
-at
-org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor.processAnno
-tations(JavaCorrectionProcessor.java:208)
-at
-org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor.computeComp
-letionProposals(JavaCorrectionProcessor.java:177)
-at
-org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposal
-s(ContentAssistant.java:1472)
-at
-org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals
-(CompletionProposalPopup.java:242)
-at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$7
-(CompletionProposalPopup.java:238)
-at org.eclipse.jface.text.contentassist.CompletionProposalPopup$1.run
-(CompletionProposalPopup.java:197)
-at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
-at org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals
-(CompletionProposalPopup.java:192)
-at
-org.eclipse.jface.text.contentassist.ContentAssistant.showPossibleCompletions
-(ContentAssistant.java:1320)
-at
-org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionAssistant.showPossibl
-eCompletions(JavaCorrectionAssistant.java:159)
-at
-org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor$AdaptedSourceViewe
-r.doOperation(CompilationUnitEditor.java:184)
-at org.eclipse.jdt.internal.ui.javaeditor.JavaSelectAnnotationRulerAction.run
-(JavaSelectAnnotationRulerAction.java:78)
-at org.eclipse.ui.texteditor.AbstractRulerActionDelegate.run
-(AbstractRulerActionDelegate.java:99)
-at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:276)
-at org.eclipse.ui.internal.PluginAction.run(PluginAction.java:238)
-at org.eclipse.ui.texteditor.AbstractTextEditor$11.triggerAction
-(AbstractTextEditor.java:2110)
-at org.eclipse.ui.texteditor.AbstractTextEditor$11.mouseUp
-(AbstractTextEditor.java:2117)
-at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:136)
-at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
-at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
-at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2772)
-at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2431)
-at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1377)
-at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348)
-at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:254)
-at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141)
-at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:96)
-at org.eclipse.core.internal.runtime.PlatformActivator$1.run
-(PlatformActivator.java:335)
-at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:273)
-at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:129)
-at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
-at sun.reflect.NativeMethodAccessorImpl.invoke
-(NativeMethodAccessorImpl.java:39)
-at sun.reflect.DelegatingMethodAccessorImpl.invoke
-(DelegatingMethodAccessorImpl.java:25)
-at java.lang.reflect.Method.invoke(Method.java:324)
-at org.eclipse.core.launcher.Main.basicRun(Main.java:183)
-at org.eclipse.core.launcher.Main.run(Main.java:644)
-at org.eclipse.core.launcher.Main.main(Main.java:628)
-
-
-Looking at the jdt code in UnresolvedElementsSubProcessor.java, at line 395,
-the parent field is null:
-
- ASTNode parent= selectedNode.getParent();
- while (parent.getLength() == selectedNode.getLength()) { // line 395
- parent= parent.getParent();
- }
-
-There just needs to be a null check as there is above:
-
-
- ASTNode selectedNode= problem.getCoveringNode(context.getASTRoot());
- if (selectedNode == null) {
- return;
- }
- int kind= SimilarElementsRequestor.ALL_TYPES;
-
- ASTNode parent= selectedNode.getParent();
- while (parent.getLength() == selectedNode.getLength()) {
- parent= parent.getParent();
- }
-
-should become:
-
-
- ASTNode selectedNode= problem.getCoveringNode(context.getASTRoot());
- if (selectedNode == null) {
- return;
- }
- int kind= SimilarElementsRequestor.ALL_TYPES;
-
- ASTNode parent= selectedNode.getParent();
- if (parent == null) {
- return;
- }
- while (parent.getLength() == selectedNode.getLength()) {
- parent= parent.getParent();
- }
-
-
-This needs to be raised as a jdt bug, since we don't pass through any ajdt
-code in order to get here.
-
-Raising this bug against ajdt is just for tracking.
-
-(note this happens on 1.1.12, but also on the latest AJDT dev build).</PRE>
-<HR>
-<!-- 1.0@bugzilla.org --><B>Bug List:</B> <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=36310">First</A> <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=76101">Last</A> (This bug is
-not in your list) &nbsp;&nbsp;<A
-href="https://bugs.eclipse.org/bugs/buglist.cgi?regetlastlist=1">Show list</A>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A
-href="https://bugs.eclipse.org/bugs/query.cgi">Query page</A>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A
-href="https://bugs.eclipse.org/bugs/enter_bug.cgi">Enter new bug</A> <BR><!-- 1.0@bugzilla.org -->
-<TABLE border=0>
- <TBODY>
- <TR>
- <TD vAlign=top bgColor=#000000>
- <TABLE cellSpacing=0 cellPadding=10 width="100%" bgColor=lightyellow
- border=0>
- <TBODY>
- <TR>
- <TD>This is <B>Bugzilla</B>: the Mozilla bug system. For more
- information about what Bugzilla is and what it can do, see <A
- href="http://www.bugzilla.org/">bugzilla.org</A>. <BR><!-- 1.0@bugzilla.org -->
- <FORM action=show_bug.cgi method=get>
- <TABLE width="100%">
- <TBODY>
- <TR>
- <TD>Actions: </TD>
- <TD vAlign=center noWrap><A
- href="https://bugs.eclipse.org/bugs/enter_bug.cgi">New</A> |
- <A href="https://bugs.eclipse.org/bugs/query.cgi">Query</A> | <INPUT type=submit value=Find> bug # <INPUT size=6 name=id> |
- <A
- href="https://bugs.eclipse.org/bugs/reports.cgi">Reports</A>
- </TD>
- <TD>&nbsp;</TD>
- <TD vAlign=center align=right><A
- href="https://bugs.eclipse.org/bugs/createaccount.cgi">New&nbsp;Account</A>
- | <A
- href="https://bugs.eclipse.org/bugs/query.cgi?GoAheadAndLogIn=1">Log&nbsp;In</A>
- </TD></TR></TBODY></TABLE></FORM></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></BODY></HTML>
diff --git a/org.eclipse.mylyn.bugzilla.tests/testdata/reports-stacktrace/76388.html b/org.eclipse.mylyn.bugzilla.tests/testdata/reports-stacktrace/76388.html
deleted file mode 100644
index 1e2c41aa0..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/testdata/reports-stacktrace/76388.html
+++ /dev/null
@@ -1,426 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<!-- saved from url=(0051)https://bugs.eclipse.org/bugs/show_bug.cgi?id=76388 -->
-<!-- 1.0@bugzilla.org --><!-- 1.0@bugzilla.org --><HTML><HEAD><TITLE>Bug 76388 - Assertion failed during pull up refactoring</TITLE>
-<META http-equiv=Content-Type content="text/html; charset=iso-8859-1"><LINK
-href="show_bug.cgi?id=36310" rel=Next><LINK href="show_bug.cgi?id=76101"
-rel=Last><LINK href="buglist.cgi?regetlastlist=1" rel=Up><LINK
-href="buglist.cgi?regetlastlist=1" rel=Contents>
-<META content="MSHTML 6.00.2800.1476" name=GENERATOR></HEAD>
-<BODY text=#000000 vLink=#551a8b aLink=#ff0000 link=#0000ee bgColor=#ffffff
-onload=""><!-- 1.0@bugzilla.org -->
-<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
- <TBODY>
- <TR>
- <TD width="100%">
- <TABLE cellSpacing=0 cellPadding=0 width="100%" bgColor=#006699
- border=0><TBODY>
- <TR>
- <TD width=116 bgColor=#000000><IMG height=50
- src="76388_files/EclipseBannerPic.jpg" width=115></TD>
- <TD width=637><A href="http://www.eclipse.org/"><IMG height=50
- src="76388_files/gradient.jpg" width=282 border=0></A></TD>
- <TD width=250><IMG height=48 src="76388_files/eproject-simple.gif"
- width=250></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
-<TABLE cellSpacing=0 border=0>
- <TBODY>
- <TR>
- <TD vAlign=top align=left>
- <TABLE cellSpacing=2 cellPadding=0 border=0>
- <TBODY>
- <TR>
- <TD vAlign=top noWrap align=left><FONT size=+1><B>Bugzilla Bug
- 76388</B></FONT> </TD></TR></TBODY></TABLE></TD>
- <TD vAlign=center>&nbsp;</TD>
- <TD vAlign=center align=left>Assertion failed during pull up
- refactoring</TD></TR></TBODY></TABLE><!-- 1.0@bugzilla.org --><B>Bug List:</B>
-<A href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=36310">First</A> <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=76101">Last</A> (This bug is
-not in your list) &nbsp;&nbsp;<A
-href="https://bugs.eclipse.org/bugs/buglist.cgi?regetlastlist=1">Show list</A>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A
-href="https://bugs.eclipse.org/bugs/query.cgi">Query page</A>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A
-href="https://bugs.eclipse.org/bugs/enter_bug.cgi">Enter new bug</A>
-<HR>
-
-<FORM name=changeform action=process_bug.cgi method=post><INPUT type=hidden
-value=20041019085725 name=delta_ts> <INPUT type=hidden value=3
-name=longdesclength> <INPUT type=hidden value=76388 name=id>
-<TABLE cellSpacing=1 cellPadding=1 border=0>
- <TBODY>
- <TR>
- <TD align=right><B>Bug#:</B> </TD>
- <TD><A
- href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=76388">76388</A> </TD>
- <TD>&nbsp;</TD>
- <TD align=right><B>Platform:</B> </TD>
- <TD><SELECT name=rep_platform> <OPTION value=All>All</OPTION> <OPTION
- value=Macintosh>Macintosh</OPTION> <OPTION value=PC selected>PC</OPTION>
- <OPTION value="Power PC">Power PC</OPTION> <OPTION
- value=Sun>Sun</OPTION> <OPTION value=Other>Other</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD>
- <TD align=right><B>Reporter:</B> </TD>
- <TD>silvio_boehler@ca.ibm.com (Silvio Böhler) </TD></TR>
- <TR>
- <TD align=right><B>Product:</B> </TD>
- <TD><SELECT name=product> <OPTION value=AJDT>AJDT</OPTION> <OPTION
- value=AspectJ>AspectJ</OPTION> <OPTION value=Birt>Birt</OPTION> <OPTION
- value=CDT>CDT</OPTION> <OPTION value=CME>CME</OPTION> <OPTION
- value=Community>Community</OPTION> <OPTION value=ECESIS>ECESIS</OPTION>
- <OPTION value=ECF>ECF</OPTION> <OPTION value=EMF>EMF</OPTION> <OPTION
- value=Equinox>Equinox</OPTION> <OPTION value=ERCP>ERCP</OPTION> <OPTION
- value=GEF>GEF</OPTION> <OPTION value=GMT>GMT</OPTION> <OPTION
- value=Hyades>Hyades</OPTION> <OPTION value=JDT selected>JDT</OPTION>
- <OPTION value=OMELET>OMELET</OPTION> <OPTION value=PDE>PDE</OPTION>
- <OPTION value=Platform>Platform</OPTION> <OPTION
- value=Pollinate>Pollinate</OPTION> <OPTION
- value=Stellation>Stellation</OPTION> <OPTION value=UML2>UML2</OPTION>
- <OPTION value=VE>VE</OPTION> <OPTION value="Web Tools">Web
- Tools</OPTION> <OPTION value=WSVT>WSVT</OPTION> <OPTION
- value=XSD>XSD</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD>
- <TD align=right><B>OS:</B> </TD>
- <TD><SELECT name=op_sys> <OPTION value=All>All</OPTION> <OPTION
- value="AIX Motif">AIX Motif</OPTION> <OPTION value="Windows 95">Windows
- 95</OPTION> <OPTION value="Windows 98">Windows 98</OPTION> <OPTION
- value="Windows CE">Windows CE</OPTION> <OPTION
- value="Windows ME">Windows ME</OPTION> <OPTION
- value="Windows 2000">Windows 2000</OPTION> <OPTION
- value="Windows NT">Windows NT</OPTION> <OPTION value="Windows XP"
- selected>Windows XP</OPTION> <OPTION value="Windows All">Windows
- All</OPTION> <OPTION value="MacOS X">MacOS X</OPTION> <OPTION
- value=Linux>Linux</OPTION> <OPTION value=Linux-GTK>Linux-GTK</OPTION>
- <OPTION value=Linux-Motif>Linux-Motif</OPTION> <OPTION
- value=HP-UX>HP-UX</OPTION> <OPTION value=Neutrino>Neutrino</OPTION>
- <OPTION value=QNX-Photon>QNX-Photon</OPTION> <OPTION
- value=Solaris>Solaris</OPTION> <OPTION
- value=Solaris-GTK>Solaris-GTK</OPTION> <OPTION
- value=Solaris-Motif>Solaris-Motif</OPTION> <OPTION value="Unix All">Unix
- All</OPTION> <OPTION value=other>other</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD>
- <TD align=right><B>Add&nbsp;CC:</B> </TD>
- <TD><INPUT size=30 name=newcc> </TD></TR>
- <TR>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/describecomponents.cgi?product=JDT">Component</A>:
- </B></TD>
- <TD><SELECT name=component> <OPTION value=Core>Core</OPTION> <OPTION
- value=Debug>Debug</OPTION> <OPTION value=Doc>Doc</OPTION> <OPTION
- value=Text>Text</OPTION> <OPTION value=UI selected>UI</OPTION></SELECT>
-</TD>
- <TD>&nbsp;</TD>
- <TD align=right><B>Version:</B> </TD>
- <TD><SELECT name=version> <OPTION value=1.0>1.0</OPTION> <OPTION
- value=2.0>2.0</OPTION> <OPTION value=2.0.1>2.0.1</OPTION> <OPTION
- value=2.0.2>2.0.2</OPTION> <OPTION value=2.1>2.1</OPTION> <OPTION
- value=2.1.1>2.1.1</OPTION> <OPTION value=2.1.2>2.1.2</OPTION> <OPTION
- value=3.0 selected>3.0</OPTION> <OPTION value=3.0.1>3.0.1</OPTION>
- <OPTION value=3.1>3.1</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD>
- <TD vAlign=top align=right rowSpan=4><B>CC:</B> </TD>
- <TD vAlign=top rowSpan=4><INPUT type=hidden name=cc> </TD></TR>
- <TR>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/bug_status.html">Status</A>: </B></TD>
- <TD>NEW</TD>
- <TD>&nbsp;</TD>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/bug_status.html#priority">Priority</A>:</B>
- </TD>
- <TD><SELECT name=priority> <OPTION value=P1>P1</OPTION> <OPTION
- value=P2>P2</OPTION> <OPTION value=P3 selected>P3</OPTION> <OPTION
- value=P4>P4</OPTION> <OPTION value=P5>P5</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD></TR>
- <TR>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/bug_status.html">Resolution</A>:
- </B></TD>
- <TD></TD>
- <TD>&nbsp;</TD>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/bug_status.html#severity">Severity</A>:</B>
- </TD>
- <TD><SELECT name=bug_severity> <OPTION value=blocker>blocker</OPTION>
- <OPTION value=critical>critical</OPTION> <OPTION
- value=major>major</OPTION> <OPTION value=normal selected>normal</OPTION>
- <OPTION value=minor>minor</OPTION> <OPTION
- value=trivial>trivial</OPTION> <OPTION
- value=enhancement>enhancement</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD></TR>
- <TR>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/bug_status.html#assigned_to">Assigned&nbsp;To</A>:
- </B></TD>
- <TD>dirk_baeumer@ch.ibm.com (Dirk Baeumer)</TD>
- <TD>&nbsp;</TD>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/notargetmilestone.html">Target
- Milestone</A>: </B></TD>
- <TD><SELECT name=target_milestone> <OPTION value="2.0 M1">2.0
- M1</OPTION> <OPTION value="2.0 M2">2.0 M2</OPTION> <OPTION
- value="2.0 M3">2.0 M3</OPTION> <OPTION value="2.0 M4">2.0 M4</OPTION>
- <OPTION value="2.0 M5">2.0 M5</OPTION> <OPTION value="2.0 M6">2.0
- M6</OPTION> <OPTION value="2.0 F1">2.0 F1</OPTION> <OPTION
- value="2.0 F2">2.0 F2</OPTION> <OPTION value="2.0 F3">2.0 F3</OPTION>
- <OPTION value="2.0 F4">2.0 F4</OPTION> <OPTION
- value=2.0.1>2.0.1</OPTION> <OPTION value=2.0.2>2.0.2</OPTION> <OPTION
- value=2.1>2.1</OPTION> <OPTION value="2.1 M1">2.1 M1</OPTION> <OPTION
- value="2.1 M2">2.1 M2</OPTION> <OPTION value="2.1 M3">2.1 M3</OPTION>
- <OPTION value="2.1 M4">2.1 M4</OPTION> <OPTION value="2.1 M5">2.1
- M5</OPTION> <OPTION value="2.1 RC1">2.1 RC1</OPTION> <OPTION
- value="2.1 RC2">2.1 RC2</OPTION> <OPTION value="2.1 RC3">2.1
- RC3</OPTION> <OPTION value="2.1 RC4">2.1 RC4</OPTION> <OPTION
- value=2.1.1>2.1.1</OPTION> <OPTION value=2.1.2>2.1.2</OPTION> <OPTION
- value=2.1.3>2.1.3</OPTION> <OPTION value=3.0>3.0</OPTION> <OPTION
- value="3.0 M1">3.0 M1</OPTION> <OPTION value="3.0 M2">3.0 M2</OPTION>
- <OPTION value="3.0 M3">3.0 M3</OPTION> <OPTION value="3.0 M4">3.0
- M4</OPTION> <OPTION value="3.0 M5">3.0 M5</OPTION> <OPTION
- value="3.0 M6">3.0 M6</OPTION> <OPTION value="3.0 M7">3.0 M7</OPTION>
- <OPTION value="3.0 M8">3.0 M8</OPTION> <OPTION value="3.0 M9">3.0
- M9</OPTION> <OPTION value="3.0 RC1">3.0 RC1</OPTION> <OPTION
- value="3.0 RC2">3.0 RC2</OPTION> <OPTION value="3.0 RC3">3.0
- RC3</OPTION> <OPTION value="3.0 RC4">3.0 RC4</OPTION> <OPTION
- value=3.0.1>3.0.1</OPTION> <OPTION value=3.0.2>3.0.2</OPTION> <OPTION
- value=3.1>3.1</OPTION> <OPTION value="3.1 M1">3.1 M1</OPTION> <OPTION
- value="3.1 M2">3.1 M2</OPTION> <OPTION value="3.1 M3">3.1 M3</OPTION>
- <OPTION value="3.1 M4">3.1 M4</OPTION> <OPTION value="3.1 M5">3.1
- M5</OPTION> <OPTION value="3.1 M6">3.1 M6</OPTION> <OPTION value=---
- selected>---</OPTION></SELECT> </TD>
- <TD>&nbsp;</TD></TR>
- <TR>
- <TD align=right><B>URL: </B></TD>
- <TD colSpan=7><INPUT size=60 name=bug_file_loc> </TD></TR>
- <TR>
- <TD align=right><B>Summary:</B> </TD>
- <TD colSpan=7><INPUT size=60
- value="Assertion failed during pull up refactoring" name=short_desc>
-</TD></TR>
- <TR>
- <TD align=right><B><A
- href="https://bugs.eclipse.org/bugs/describekeywords.cgi">Keywords</A>:
- </B>
- <TD colSpan=7><INPUT size=60 name=keywords> </TD></TR></TBODY></TABLE><!-- 1.0@bugzilla.org --><BR>
-<TABLE cellSpacing=0 cellPadding=4 border=1>
- <TBODY>
- <TR>
- <TH align=left bgColor=#cccccc>Attachment</TH>
- <TH align=left bgColor=#cccccc>Type</TH>
- <TH align=left bgColor=#cccccc>Modified</TH>
- <TH align=left bgColor=#cccccc>Status</TH>
- <TH align=left bgColor=#cccccc>Actions</TH></TR>
- <TR>
- <TD colSpan=4><A
- href="https://bugs.eclipse.org/bugs/attachment.cgi?bugid=76388&amp;action=enter">Create
- a New Attachment</A> (proposed patch, testcase, etc.) </TD>
- <TD><A
- href="https://bugs.eclipse.org/bugs/attachment.cgi?bugid=76388&amp;action=viewall">View
- All</A> </TD></TR></TBODY></TABLE><BR>
-<TABLE>
- <TBODY>
- <TR>
- <TH align=right>Bug 76388 depends on:</TH>
- <TD></TD>
- <TD><INPUT name=dependson> </TD>
- <TD rowSpan=2><A
- href="https://bugs.eclipse.org/bugs/showdependencytree.cgi?id=76388">Show
- dependency tree</A> </TD></TR>
- <TR>
- <TH align=right>Bug 76388 blocks:</TH>
- <TD></TD>
- <TD><INPUT name=blocked> </TD></TR></TBODY></TABLE>
-<TABLE>
- <TBODY>
- <TR>
- <TH><A href="https://bugs.eclipse.org/bugs/votehelp.html">Votes</A>: </TH>
- <TD>0&nbsp;&nbsp;&nbsp; <A
- href="https://bugs.eclipse.org/bugs/votes.cgi?action=show_bug&amp;bug_id=76388">Show
- votes for this bug</A>&nbsp;&nbsp;&nbsp; <A
- href="https://bugs.eclipse.org/bugs/votes.cgi?action=show_user&amp;bug_id=76388">Vote
- for this bug</A> </TD></TR></TBODY></TABLE><BR><B>Additional Comments:</B> <BR><TEXTAREA accessKey=c name=comment rows=10 wrap=hard cols=80></TEXTAREA>
-<BR><BR><INPUT type=radio CHECKED value=none name=knob> Leave as
-<B>NEW&nbsp;</B> <BR><INPUT type=radio value=accept name=knob> Accept bug
-(change status to <B>ASSIGNED</B>) <BR><INPUT type=radio value=resolve
-name=knob> Resolve bug, changing <A
-href="https://bugs.eclipse.org/bugs/bug_status.html">resolution</A> to <SELECT
-onchange=document.changeform.knob[2].checked=true name=resolution> <OPTION
- value=FIXED selected>FIXED</OPTION> <OPTION value=INVALID>INVALID</OPTION>
- <OPTION value=WONTFIX>WONTFIX</OPTION> <OPTION value=LATER>LATER</OPTION>
- <OPTION value=REMIND>REMIND</OPTION> <OPTION
- value=WORKSFORME>WORKSFORME</OPTION></SELECT> <BR><INPUT type=radio
-value=duplicate name=knob> Resolve bug, mark it as duplicate of bug # <INPUT
-onchange="if (this.value != '')&#10; {document.changeform.knob[3].checked=true}"
-size=6 name=dup_id> <BR><INPUT type=radio value=reassign name=knob> <A
-href="https://bugs.eclipse.org/bugs/bug_status.html#assigned_to">Reassign</A>
-bug to <INPUT
-onchange="if ((this.value != 'dirk_baeumer@ch.ibm.com') &amp;&amp; &#10; (this.value != '')) {&#10; document.changeform.knob[4].checked=true; &#10; }"
-size=32 value=dirk_baeumer@ch.ibm.com name=assigned_to> <BR><INPUT type=radio
-value=reassignbycomponent name=knob> Reassign bug to owner of selected component
-<BR><INPUT type=submit value=Commit> <INPUT type=hidden value=process_bug
-name=form_name>
-<P><FONT size=+1><B><A
-href="https://bugs.eclipse.org/bugs/show_activity.cgi?id=76388">View Bug
-Activity</A> &nbsp; | &nbsp; <A
-href="https://bugs.eclipse.org/bugs/long_list.cgi?buglist=76388">Format For
-Printing</A> </B></FONT></P></FORM>
-<TABLE>
- <TBODY>
- <TR>
- <TD align=left><B><A
- href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=76388#c0"
- name=c0>Description</A>: </B></TD>
- <TD align=right width="100%">Opened: 2004-10-15 15:30 </TD></TR></TBODY></TABLE>
-<HR>
-<!-- 1.0@bugzilla.org --><PRE>I was doing some pull up refactorings.
-
-!SESSION Oct 15, 2004 15:08:42.572 ---------------------------------------------
-eclipse.buildId=I200410130800
-java.fullversion=J2RE 1.4.2 IBM J9 2.2 Windows XP x86-32 j9n142-20040831 (JIT
-enabled)
-J9VM - 20040827_2136_lHdSMR
-JIT - r7_level20040827_1801
-BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
-
-!ENTRY org.eclipse.core.runtime 4 2 Oct 15, 2004 15:08:42.572
-!MESSAGE Problems occurred when invoking code from plug-in:
-"org.eclipse.core.runtime".
-!STACK 0
-org.eclipse.jface.text.Assert$AssertionFailedException: Assertion failed:
- at org.eclipse.jface.text.Assert.isTrue(Assert.java:177)
- at org.eclipse.jface.text.Assert.isTrue(Assert.java:162)
- at org.eclipse.text.edits.TextEdit.internalSetLength(TextEdit.java:712)
- at org.eclipse.text.edits.MultiTextEdit.defineRegion(MultiTextEdit.java:194)
- at org.eclipse.text.edits.TextEditProcessor.&lt;init&gt;(TextEditProcessor.java:65)
- at org.eclipse.text.edits.TextEditProcessor.&lt;init&gt;(TextEditProcessor.java:56)
- at
-org.eclipse.ltk.core.refactoring.TextChange.createTextEditProcessor(TextChange.java:638)
- at
-org.eclipse.ltk.core.refactoring.TextChange.getPreviewDocument(TextChange.java:611)
- at
-org.eclipse.ltk.core.refactoring.TextChange.getPreviewDocument(TextChange.java:538)
- at
-org.eclipse.ltk.core.refactoring.TextChange.getPreviewContent(TextChange.java:553)
- at
-org.eclipse.ltk.internal.ui.refactoring.TextChangePreviewViewer.setInput(TextChangePreviewViewer.java:190)
- at
-org.eclipse.ltk.internal.ui.refactoring.DefaultChangeElement.feedInput(DefaultChangeElement.java:57)
- at
-org.eclipse.ltk.internal.ui.refactoring.PreviewWizardPage.showPreview(PreviewWizardPage.java:370)
- at
-org.eclipse.ltk.internal.ui.refactoring.PreviewWizardPage.access$2(PreviewWizardPage.java:355)
- at
-org.eclipse.ltk.internal.ui.refactoring.PreviewWizardPage$2.selectionChanged(PreviewWizardPage.java:346)
- at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:163)
- at
-org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:616)
- at org.eclipse.core.runtime.Platform.run(Platform.java:747)
- at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:161)
- at
-org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:1613)
- at
-org.eclipse.jface.viewers.StructuredViewer.setSelection(StructuredViewer.java:1304)
- at org.eclipse.jface.viewers.Viewer.setSelection(Viewer.java:380)
- at
-org.eclipse.ltk.internal.ui.refactoring.PreviewWizardPage.setVisible(PreviewWizardPage.java:283)
- at org.eclipse.jface.wizard.WizardDialog.updateForPage(WizardDialog.java:1024)
- at org.eclipse.jface.wizard.WizardDialog.access$2(WizardDialog.java:1007)
- at org.eclipse.jface.wizard.WizardDialog$4.run(WizardDialog.java:997)
- at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
- at org.eclipse.jface.wizard.WizardDialog.showPage(WizardDialog.java:995)
- at org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDialog.java:747)
- at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:338)
- at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:543)
- at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:89)
- at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
- at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:800)
- at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2784)
- at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2443)
- at org.eclipse.jface.window.Window.runEventLoop(Window.java:706)
- at org.eclipse.jface.window.Window.open(Window.java:684)
- at
-org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation$1.run(RefactoringWizardOpenOperation.java:125)
- at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
- at
-org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation.run(RefactoringWizardOpenOperation.java:138)
- at
-org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate(RefactoringStarter.java:40)
- at org.eclipse.jdt.ui.actions.PullUpAction.startRefactoring(PullUpAction.java:209)
- at org.eclipse.jdt.ui.actions.PullUpAction.run(PullUpAction.java:151)
- at
-org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:216)
- at
-org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:188)
- at org.eclipse.jface.action.Action.runWithEvent(Action.java:988)
- at
-org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:946)
- at
-org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:896)
- at
-org.eclipse.jface.action.ActionContributionItem$7.handleEvent(ActionContributionItem.java:810)
- at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
- at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:800)
- at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2784)
- at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2443)
- at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1443)
- at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1414)
- at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:271)
- at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:144)
- at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:102)
- at
-org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:335)
- at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:273)
- at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:129)
- at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
- at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
- at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
- at
-sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
- at java.lang.reflect.Method.invoke(Method.java:391)
- at org.eclipse.core.launcher.Main.basicRun(Main.java:185)
- at org.eclipse.core.launcher.Main.run(Main.java:704)
- at org.eclipse.core.launcher.Main.main(Main.java:688)</PRE><BR><I>-------
-Additional Comment <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=76388#c1" name=c1>#1</A>
-From <A href="mailto:dirk_baeumer@ch.ibm.com">Dirk Baeumer</A> 2004-10-19 06:06
-------- </I><PRE>Silvio, any steps to reproduce or any additional entries in the log that
-contain exceptions from text edits ?</PRE><BR><I>------- Additional Comment <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=76388#c2" name=c2>#2</A>
-From <A href="mailto:silvio_boehler@ca.ibm.com">Silvio Böhler</A> 2004-10-19
-08:57 ------- </I><PRE>No further entries and no reproducable steps unfortunately, sorry.</PRE>
-<HR>
-<!-- 1.0@bugzilla.org --><B>Bug List:</B> <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=36310">First</A> <A
-href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=76101">Last</A> (This bug is
-not in your list) &nbsp;&nbsp;<A
-href="https://bugs.eclipse.org/bugs/buglist.cgi?regetlastlist=1">Show list</A>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A
-href="https://bugs.eclipse.org/bugs/query.cgi">Query page</A>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A
-href="https://bugs.eclipse.org/bugs/enter_bug.cgi">Enter new bug</A> <BR><!-- 1.0@bugzilla.org -->
-<TABLE border=0>
- <TBODY>
- <TR>
- <TD vAlign=top bgColor=#000000>
- <TABLE cellSpacing=0 cellPadding=10 width="100%" bgColor=lightyellow
- border=0>
- <TBODY>
- <TR>
- <TD>This is <B>Bugzilla</B>: the Mozilla bug system. For more
- information about what Bugzilla is and what it can do, see <A
- href="http://www.bugzilla.org/">bugzilla.org</A>. <BR><!-- 1.0@bugzilla.org -->
- <FORM action=show_bug.cgi method=get>
- <TABLE width="100%">
- <TBODY>
- <TR>
- <TD>Actions: </TD>
- <TD vAlign=center noWrap><A
- href="https://bugs.eclipse.org/bugs/enter_bug.cgi">New</A> |
- <A href="https://bugs.eclipse.org/bugs/query.cgi">Query</A> | <INPUT type=submit value=Find> bug # <INPUT size=6 name=id> |
- <A
- href="https://bugs.eclipse.org/bugs/reports.cgi">Reports</A>
- </TD>
- <TD>&nbsp;</TD>
- <TD vAlign=center align=right><A
- href="https://bugs.eclipse.org/bugs/createaccount.cgi">New&nbsp;Account</A>
- | <A
- href="https://bugs.eclipse.org/bugs/query.cgi?GoAheadAndLogIn=1">Log&nbsp;In</A>
- </TD></TR></TBODY></TABLE></FORM></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></BODY></HTML>
diff --git a/org.eclipse.mylyn.bugzilla.ui/.classpath b/org.eclipse.mylyn.bugzilla.ui/.classpath
deleted file mode 100644
index 8dae74326..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/.classpath
+++ /dev/null
@@ -1,17 +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="accessible" pattern="**/TasksUiImages"/>
- <accessrule kind="accessible" pattern="**/TaskListColorsAndFonts"/>
- <accessrule kind="accessible" pattern="**/TaskListPreferenceConstants"/>
- </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.ui/.cvsignore b/org.eclipse.mylyn.bugzilla.ui/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/org.eclipse.mylyn.bugzilla.ui/.project b/org.eclipse.mylyn.bugzilla.ui/.project
deleted file mode 100644
index 78cc25136..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.mylyn.bugzilla.ui</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.ui/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.mylyn.bugzilla.ui/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 8b08f1b8b..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,340 +0,0 @@
-#Thu Apr 24 21:03:23 PDT 2008
-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=ignore
-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,NORMAL
-org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,API
-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=false
-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.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.ui/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.mylyn.bugzilla.ui/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 5e70d0848..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,63 +0,0 @@
-#Sat Mar 01 03:38:47 PST 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">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*******************************************************************************\n * Copyright (c) 2004, 2007 Mylyn project committers and others.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *******************************************************************************/\n\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ignore\n${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ignore</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created JavaScript files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for vars" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Jsdoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created function stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated function stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_methods=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=true
-sp_cleanup.correct_indentation=true
-sp_cleanup.format_source_code=true
-sp_cleanup.format_source_code_changes_only=false
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=true
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=true
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=true
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=true
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=true
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/org.eclipse.mylyn.bugzilla.ui/.settings/org.eclipse.ltk.core.refactoring.prefs b/org.eclipse.mylyn.bugzilla.ui/.settings/org.eclipse.ltk.core.refactoring.prefs
deleted file mode 100644
index 7ab03bdac..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/.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.ui/.settings/org.eclipse.mylyn.tasklist.prefs b/org.eclipse.mylyn.bugzilla.ui/.settings/org.eclipse.mylyn.tasklist.prefs
deleted file mode 100644
index 0a2cc0b30..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/.settings/org.eclipse.mylyn.tasklist.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Mon Jun 18 17:14:59 PDT 2007
-eclipse.preferences.version=1
-project.repository.kind=bugzilla
-project.repository.url=https\://bugs.eclipse.org/bugs
diff --git a/org.eclipse.mylyn.bugzilla.ui/.settings/org.eclipse.mylyn.tasks.ui.prefs b/org.eclipse.mylyn.bugzilla.ui/.settings/org.eclipse.mylyn.tasks.ui.prefs
deleted file mode 100644
index d8c6d26af..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/.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.ui/.settings/org.eclipse.pde.prefs b/org.eclipse.mylyn.bugzilla.ui/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index e8f2d5620..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/.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.ui/META-INF/MANIFEST.MF b/org.eclipse.mylyn.bugzilla.ui/META-INF/MANIFEST.MF
deleted file mode 100644
index e4603abf6..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,29 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Mylyn Bugzilla Connector UI
-Bundle-SymbolicName: org.eclipse.mylyn.bugzilla.ui; singleton:=true
-Bundle-Version: 3.0.0.qualifier
-Bundle-Activator: org.eclipse.mylyn.internal.bugzilla.ui.BugzillaUiPlugin
-Bundle-Vendor: Eclipse.org
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.core.resources,
- org.eclipse.compare,
- org.eclipse.ui.views,
- org.eclipse.ui.forms,
- org.eclipse.jface.text,
- org.eclipse.ui.editors,
- org.eclipse.ui.workbench.texteditor,
- org.eclipse.mylyn.bugzilla.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.mylyn.commons.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.mylyn.tasks.ui;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.mylyn.tasks.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.mylyn.commons.ui;bundle-version="[3.0.0,4.0.0)"
-Bundle-ActivationPolicy: lazy
-Export-Package: org.eclipse.mylyn.internal.bugzilla.ui;x-internal:=true,
- org.eclipse.mylyn.internal.bugzilla.ui.editor;x-internal:=true,
- org.eclipse.mylyn.internal.bugzilla.ui.search;x-internal:=true,
- org.eclipse.mylyn.internal.bugzilla.ui.tasklist;x-internal:=true,
- org.eclipse.mylyn.internal.bugzilla.ui.wizard;x-internal:=true
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Bundle-ClassPath: .
diff --git a/org.eclipse.mylyn.bugzilla.ui/about.html b/org.eclipse.mylyn.bugzilla.ui/about.html
deleted file mode 100644
index 0dd939c09..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/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 7, 2007</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.ui/build-user.xml b/org.eclipse.mylyn.bugzilla.ui/build-user.xml
deleted file mode 100644
index 6097713f2..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/build-user.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-<target name="help">
- <echo message="Please run: $ ant -v -projecthelp"/>
-</target> \ No newline at end of file
diff --git a/org.eclipse.mylyn.bugzilla.ui/build.properties b/org.eclipse.mylyn.bugzilla.ui/build.properties
deleted file mode 100644
index 1736ad964..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/build.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2007 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 = META-INF/,\
- plugin.xml,\
- icons/,\
- about.html,\
- .
-src.includes = META-INF/,\
- about.html
-jre.compilation.profile = J2SE-1.5
-source.. = src/
diff --git a/org.eclipse.mylyn.bugzilla.ui/icons/elcl16/bug-comment.gif b/org.eclipse.mylyn.bugzilla.ui/icons/elcl16/bug-comment.gif
deleted file mode 100644
index 97bbdf7dd..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/icons/elcl16/bug-comment.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.bugzilla.ui/icons/elcl16/bug-dirty.gif b/org.eclipse.mylyn.bugzilla.ui/icons/elcl16/bug-dirty.gif
deleted file mode 100644
index 8628881c7..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/icons/elcl16/bug-dirty.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.bugzilla.ui/icons/elcl16/bug-favorite.gif b/org.eclipse.mylyn.bugzilla.ui/icons/elcl16/bug-favorite.gif
deleted file mode 100644
index 6830e3348..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/icons/elcl16/bug-favorite.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.bugzilla.ui/icons/elcl16/bug-new.gif b/org.eclipse.mylyn.bugzilla.ui/icons/elcl16/bug-new.gif
deleted file mode 100644
index 312ca8f9d..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/icons/elcl16/bug-new.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.bugzilla.ui/icons/elcl16/bug-search-new.gif b/org.eclipse.mylyn.bugzilla.ui/icons/elcl16/bug-search-new.gif
deleted file mode 100644
index 8ac5e5706..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/icons/elcl16/bug-search-new.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.bugzilla.ui/icons/elcl16/bug-search.gif b/org.eclipse.mylyn.bugzilla.ui/icons/elcl16/bug-search.gif
deleted file mode 100644
index b70606376..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/icons/elcl16/bug-search.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.bugzilla.ui/icons/elcl16/bug-small.gif b/org.eclipse.mylyn.bugzilla.ui/icons/elcl16/bug-small.gif
deleted file mode 100644
index 761b283ff..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/icons/elcl16/bug-small.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.bugzilla.ui/icons/elcl16/bug.gif b/org.eclipse.mylyn.bugzilla.ui/icons/elcl16/bug.gif
deleted file mode 100644
index 54525a775..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/icons/elcl16/bug.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.bugzilla.ui/icons/elcl16/overlay-conflicting.gif b/org.eclipse.mylyn.bugzilla.ui/icons/elcl16/overlay-conflicting.gif
deleted file mode 100644
index d13a35640..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/icons/elcl16/overlay-conflicting.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.bugzilla.ui/icons/elcl16/overlay-incoming.gif b/org.eclipse.mylyn.bugzilla.ui/icons/elcl16/overlay-incoming.gif
deleted file mode 100644
index f74cffb45..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/icons/elcl16/overlay-incoming.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.bugzilla.ui/icons/elcl16/overlay-outgoing.gif b/org.eclipse.mylyn.bugzilla.ui/icons/elcl16/overlay-outgoing.gif
deleted file mode 100644
index 0c5a35cfa..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/icons/elcl16/overlay-outgoing.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.bugzilla.ui/icons/etool16/task-bug-new.gif b/org.eclipse.mylyn.bugzilla.ui/icons/etool16/task-bug-new.gif
deleted file mode 100644
index 04f3028c2..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/icons/etool16/task-bug-new.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.bugzilla.ui/icons/etool16/task-bug-refresh.gif b/org.eclipse.mylyn.bugzilla.ui/icons/etool16/task-bug-refresh.gif
deleted file mode 100644
index bb8538b39..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/icons/etool16/task-bug-refresh.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.bugzilla.ui/icons/etool16/task-bug.gif b/org.eclipse.mylyn.bugzilla.ui/icons/etool16/task-bug.gif
deleted file mode 100644
index 71b1baba1..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/icons/etool16/task-bug.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.bugzilla.ui/icons/etool16/task-remote.gif b/org.eclipse.mylyn.bugzilla.ui/icons/etool16/task-remote.gif
deleted file mode 100644
index d0d46a007..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/icons/etool16/task-remote.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.bugzilla.ui/icons/etool16/task-repository-new.gif b/org.eclipse.mylyn.bugzilla.ui/icons/etool16/task-repository-new.gif
deleted file mode 100644
index 5f3396137..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/icons/etool16/task-repository-new.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.bugzilla.ui/icons/etool16/task-repository.gif b/org.eclipse.mylyn.bugzilla.ui/icons/etool16/task-repository.gif
deleted file mode 100644
index 78470a36f..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/icons/etool16/task-repository.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.bugzilla.ui/icons/eview16/bugzilla-logo.gif b/org.eclipse.mylyn.bugzilla.ui/icons/eview16/bugzilla-logo.gif
deleted file mode 100644
index 1c78494f3..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/icons/eview16/bugzilla-logo.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-bug.gif b/org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-bug.gif
deleted file mode 100644
index 692d2facd..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-bug.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-bugzilla.gif b/org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-bugzilla.gif
deleted file mode 100644
index 6d61e73ce..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-bugzilla.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-critical.gif b/org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-critical.gif
deleted file mode 100644
index 41497b1df..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-critical.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-enhancement.gif b/org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-enhancement.gif
deleted file mode 100644
index 9a75b1efe..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-enhancement.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-feature.gif b/org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-feature.gif
deleted file mode 100644
index 45f7a7644..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-feature.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-major.gif b/org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-major.gif
deleted file mode 100644
index 2ec19fb9d..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-major.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-minor.gif b/org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-minor.gif
deleted file mode 100644
index 376dbb403..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-minor.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-normal.gif b/org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-normal.gif
deleted file mode 100644
index d582fe0de..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-normal.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.bugzilla.ui/icons/find.gif b/org.eclipse.mylyn.bugzilla.ui/icons/find.gif
deleted file mode 100644
index 2b645a88f..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/icons/find.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.bugzilla.ui/icons/wizban/bug-wizard.gif b/org.eclipse.mylyn.bugzilla.ui/icons/wizban/bug-wizard.gif
deleted file mode 100644
index ec6d66ce3..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/icons/wizban/bug-wizard.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.bugzilla.ui/plugin.xml b/org.eclipse.mylyn.bugzilla.ui/plugin.xml
deleted file mode 100644
index 176eabe7c..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/plugin.xml
+++ /dev/null
@@ -1,69 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
-
- <extension
- id="org.eclipse.mylyn.bugzilla.repository"
- name="Bugzilla Repository"
- point="org.eclipse.mylyn.tasks.ui.repositories">
-
- <connectorCore
- class="org.eclipse.mylyn.internal.bugzilla.core.BugzillaRepositoryConnector"
- id="org.eclipse.mylyn.bugzilla.tasklist.repositories"
- name="Bugzilla Repository Connector"/>
-
- <connectorUi
- brandingIcon="icons/eview16/bugzilla-logo.gif"
- class="org.eclipse.mylyn.internal.bugzilla.ui.tasklist.BugzillaConnectorUi"
- name="Bugzilla Repository Ui"
- overlayIcon="icons/eview16/overlay-bugzilla.gif"/>
-
- <taskListMigrator
- class="org.eclipse.mylyn.internal.bugzilla.ui.tasklist.BugzillaTaskListMigrator"/>
- </extension>
- <extension
- point="org.eclipse.mylyn.bugzilla.core.languages">
- <!-- <language
- name="en">
- <languageAttribute command="error_login" response="Login"/>
- <languageAttribute command="error_login" response="log in"/>
- <languageAttribute command="error_login" response="check e-mail"/>
- <languageAttribute command="error_login" response="Invalid Username Or Password"/>
- <languageAttribute command="error_collision" response="Mid-air collision!"/>
- <languageAttribute command="error_comment_required" response="Comment Required"/>
- <languageAttribute command="error_logged_out" response="logged out"/>
- <languageAttribute command="bad_login" response="Login"/>
- <languageAttribute command="bad_login" response="log in"/>
- <languageAttribute command="bad_login" response="check e-mail"/>
- <languageAttribute command="bad_login" response="Invalid Username Or Password"/>
- <languageAttribute command="bad_login" response="error"/>
- <languageAttribute command="processed" response="processed"/>
- <languageAttribute command="changes_submitted" response="Changes submitted"/>
- </language>
- -->
- <language
- name="de">
- <languageAttribute command="error_login" response="Anmeldename erforderlich"/>
- <languageAttribute command="error_login" response="check e-mail"/>
- <languageAttribute command="error_login" response="Ungültiger Benutzername oder ungültiges Passwort"/>
- <languageAttribute command="error_collision" response="Kollision!"/>
- <languageAttribute command="error_comment_required" response="Kommentar erforderlich"/>
- <languageAttribute command="error_logged_out" response="Abgemeldet"/>
- <languageAttribute command="bad_login" response="Anmeldename erforderlich"/>
- <languageAttribute command="bad_login" response="check e-mail"/>
- <languageAttribute command="bad_login" response="Ungültiger Benutzername oder ungültiges Passwort"/>
- <languageAttribute command="bad_login" response="error"/>
- <languageAttribute command="processed" response="processed"/>
- <languageAttribute command="changes_submitted" response="Changes submitted"/>
- </language>
- </extension>
-
- <extension
- point="org.eclipse.mylyn.tasks.ui.editors">
- <pageFactory
- class="org.eclipse.mylyn.internal.bugzilla.ui.editor.BugzillaTaskEditorPageFactory"
- id="org.eclipse.mylyn.bugzilla.ui.pageFactory">
- </pageFactory>
- </extension>
-
-</plugin>
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaCompareInput.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaCompareInput.java
deleted file mode 100644
index c34a95456..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaCompareInput.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.ui;
-
-import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.compare.CompareEditorInput;
-import org.eclipse.compare.structuremergeviewer.Differencer;
-import org.eclipse.compare.structuremergeviewer.IStructureComparator;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-
-/**
- * A two-way or three-way compare for <code>BugReport</code> objects.
- *
- * @author Shawn Minto
- * @author Mik Kersten
- */
-public class BugzillaCompareInput extends CompareEditorInput {
-
- private boolean threeWay = false;
-
- private Object root;
-
- private IStructureComparator ancestor = null;
-
- private IStructureComparator left = null;
-
- private IStructureComparator right = null;
-
- /**
- * Constructor.
- *
- * @param configuration
- * The compare configuration used in this compare input.
- * @see CompareConfiguration
- */
- public BugzillaCompareInput(CompareConfiguration configuration) {
- super(configuration);
- }
-
- @Override
- protected Object prepareInput(IProgressMonitor monitor) {
- if (left == null || right == null) {
- return null;
- }
- Differencer d = new Differencer();
- root = d.findDifferences(threeWay, monitor, null, ancestor, left, right);
- return root;
- }
-
- /**
- * @return The original object that's to be compared (appears on the top of the compare view).
- */
- public IStructureComparator getAncestor() {
- return ancestor;
- }
-
- /**
- * Sets the original object that's to be compared (appears on the top of the compare view).
- *
- * @param newAncestor
- * The new original object.
- */
- public void setAncestor(RepositoryTaskData newAncestor) {
- threeWay = (newAncestor != null);
- BugzillaCompareStructureCreator structureCreator = new BugzillaCompareStructureCreator();
- ancestor = structureCreator.getStructure(newAncestor);
- }
-
- /**
- * @return The local object that's to be compared (appears on the left side of the compare view).
- */
- public IStructureComparator getLeft() {
- return left;
- }
-
- /**
- * Sets the local object that's to be compared (appears on the left side of the compare view).
- *
- * @param newLeft
- * The new local object.
- */
- public void setLeft(RepositoryTaskData newLeft) {
- BugzillaCompareStructureCreator structureCreator = new BugzillaCompareStructureCreator();
- left = structureCreator.getStructure(newLeft);
- }
-
- /**
- * @return The online object that's to be compared (appears on the right side of the compare view).
- */
- public IStructureComparator getRight() {
- return right;
- }
-
- /**
- * Sets the online object that's to be compared (appears on the right side of the compare view).
- *
- * @param newRight
- * The new online object.
- */
- public void setRight(RepositoryTaskData newRight) {
- BugzillaCompareStructureCreator structureCreator = new BugzillaCompareStructureCreator();
- right = structureCreator.getStructure(newRight);
- }
-
- /**
- * @return <code>true</code> if a three-way comparison is to be done.
- */
- public boolean isThreeWay() {
- return threeWay;
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaCompareNode.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaCompareNode.java
deleted file mode 100644
index a3b10d185..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaCompareNode.java
+++ /dev/null
@@ -1,280 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.ui;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.util.ArrayList;
-
-import org.eclipse.compare.IStreamContentAccessor;
-import org.eclipse.compare.ITypedElement;
-import org.eclipse.compare.structuremergeviewer.IStructureComparator;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaAttribute;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskAttribute;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.TaskComment;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * A node for the tree used to compare bugs in the compare viewer.
- */
-public class BugzillaCompareNode implements IStreamContentAccessor, IStructureComparator, ITypedElement {
-
- /** The label for this piece of data. */
- private String key;
-
- /** The data for this node. */
- private String value;
-
- /** The children of this node. */
- private ArrayList<BugzillaCompareNode> nodeChildren;
-
- /** This node's image. */
- private Image image;
-
- /**
- * Constructor. The image for this node is set to <code>null</code>.
- *
- * @param key
- * The label for this node.
- * @param value
- * The data for this node.
- */
- public BugzillaCompareNode(String key, String value) {
- this(key, value, null);
- }
-
- /**
- * Constructor.
- *
- * @param key
- * The label for this node.
- * @param value
- * The data for this node.
- * @param image
- * The image for this node.
- */
- public BugzillaCompareNode(String key, String value, Image image) {
- super();
- this.key = key;
- this.value = checkText(value);
- this.nodeChildren = null;
- this.image = image;
- }
-
- /**
- * This function checks to make sure the given string is not <code>null</code>. If it is, the empty string is
- * returned instead.
- *
- * @param newValue
- * The string to be checked.
- * @return If the text is <code>null</code>, then return the null string (<code>""</code>). Otherwise, return the
- * text.
- */
- private String checkText(String newValue) {
- return ((newValue == null) ? "" : newValue);
- }
-
- public Object[] getChildren() {
- return (nodeChildren == null) ? new Object[0] : nodeChildren.toArray();
- }
-
- /**
- * Adds a node to this node's list of children.
- *
- * @param bugNode
- * The new child.
- */
- public void addChild(BugzillaCompareNode bugNode) {
- if (nodeChildren == null) {
- nodeChildren = new ArrayList<BugzillaCompareNode>();
- }
- nodeChildren.add(bugNode);
- }
-
- public InputStream getContents() throws CoreException {
- return new ByteArrayInputStream(getValue().getBytes());
- }
-
- /**
- * @return The label for this node.
- */
- public String getKey() {
- return key;
- }
-
- /**
- * Set the label for this node.
- *
- * @param key
- * The new label.
- */
- public void setKey(String key) {
- this.key = key;
- }
-
- /**
- * @return The data for this node.
- */
- public String getValue() {
- return value;
- }
-
- /**
- * Set the data for this node.
- *
- * @param value
- * The new data.
- */
- public void setValue(String value) {
- this.value = checkText(value);
- }
-
- public Image getImage() {
- return image;
- }
-
- /**
- * Sets the image for this object. This image is used when displaying this object in the UI.
- *
- * @param newImage
- * The new image.
- */
- public void setImage(Image newImage) {
- this.image = newImage;
- }
-
- @Override
- public boolean equals(Object arg0) {
- if (arg0 instanceof BugzillaCompareNode) {
- BugzillaCompareNode bugNode = (BugzillaCompareNode) arg0;
- return getKey().equals(bugNode.getKey());
- }
- return super.equals(arg0);
- }
-
- @Override
- public int hashCode() {
- return getKey().hashCode();
- }
-
- public String getName() {
- return getKey();
- }
-
- public String getType() {
- return "bug report";
- }
-
- /**
- * Parses the given <code>BugReport</code> into a tree of <code>BugzillaCompareNode</code>'s suitable for use in a
- * compare viewer.
- *
- * @param bug
- * The <code>BugReport</code> that needs parsing.
- * @return The tree of <code>BugzillaCompareNode</code>'s.
- */
- public static BugzillaCompareNode parseBugReport(RepositoryTaskData bug) {
- Image defaultImage = PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_DEF_VIEW);
- BugzillaCompareNode topNode = new BugzillaCompareNode("Bug #" + bug.getTaskId(), null, defaultImage);
-
- Image attributeImage = PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_ELEMENT);
- BugzillaCompareNode attributes = new BugzillaCompareNode("Attributes", null, attributeImage);
- for (RepositoryTaskAttribute attribute : bug.getAttributes()) {
- BugzillaCompareNode child = new BugzillaCompareNode(attribute.toString(), attribute.getValue(),
- defaultImage);
- attributes.addChild(child);
- }
-
- BugzillaCompareNode comments = new BugzillaCompareNode("Comments", null, defaultImage);
- for (TaskComment taskComment : bug.getComments()) {
- String bodyString = "Comment from " + taskComment.getAuthorName() + ":\n\n" + taskComment.getText();
- comments.addChild(new BugzillaCompareNode(
- taskComment.getAttributeValue(BugzillaAttribute.BUG_WHEN.getKey()), bodyString,
- defaultImage));
- }
- topNode.addChild(comments);
-
- topNode.addChild(new BugzillaCompareNode("New Comment", bug.getNewComment(), defaultImage));
-
- BugzillaCompareNode ccList = new BugzillaCompareNode("CC List", null, defaultImage);
- for (String cc : bug.getCc()) {
- ccList.addChild(new BugzillaCompareNode("CC", cc, defaultImage));
- }
- topNode.addChild(ccList);
-
- BugzillaCompareNode titleNode = new BugzillaCompareNode("BugReport Object", null, defaultImage);
- titleNode.addChild(topNode);
-
- return titleNode;
- }
-
-// public static BugzillaCompareNode parseBugReport(BugzillaReport bug) {
-// Image defaultImage = PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_DEF_VIEW);
-// BugzillaCompareNode topNode = new BugzillaCompareNode("Bug #" + bug.getId(), null, defaultImage);
-// Date creationDate = bug.getCreated();
-// if (creationDate == null) {
-// // XXX: this could be backwards
-// creationDate = Calendar.getInstance().getTime();
-// }
-// BugzillaCompareNode child = new BugzillaCompareNode("Creation Date", creationDate.toString(), defaultImage);
-// topNode.addChild(child);
-//
-// String keywords = "";
-// if (bug.getKeywords() != null) {
-// for (Iterator<String> iter = bug.getKeywords().iterator(); iter.hasNext();) {
-// keywords += iter.next() + " ";
-// }
-// }
-// topNode.addChild(new BugzillaCompareNode("Keywords", keywords, defaultImage));
-//
-// Image attributeImage = PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_ELEMENT);
-// BugzillaCompareNode attributes = new BugzillaCompareNode("Attributes", null, attributeImage);
-// for (Iterator<RepositoryTaskAttribute> iter = bug.getAttributes().iterator(); iter.hasNext();) {
-// RepositoryTaskAttribute attribute = iter.next();
-// if (attribute.getName().compareTo("delta_ts") == 0 || attribute.getName().compareTo("Last Modified") == 0
-// || attribute.getName().compareTo("longdesclength") == 0)
-// continue;
-// // Since the bug report may not be saved offline, get the
-// // attribute's new
-// // value, which is what is in the submit viewer.
-//
-// attributes.addChild(new BugzillaCompareNode(attribute.getName(), attribute.getValue(), attributeImage));
-// }
-// topNode.addChild(attributes);
-//
-// topNode.addChild(new BugzillaCompareNode("Description", bug.getDescription(), defaultImage));
-//
-// BugzillaCompareNode comments = new BugzillaCompareNode("Comments", null, defaultImage);
-// for (Iterator<Comment> iter = bug.getComments().iterator(); iter.hasNext();) {
-// Comment comment = iter.next();
-// String bodyString = "Comment from " + comment.getAuthorName() + ":\n\n" + comment.getText();
-// comments.addChild(new BugzillaCompareNode(comment.getAttributeValue(BugzillaReportElement.CREATION_TS), bodyString, defaultImage));
-// }
-// topNode.addChild(comments);
-//
-// topNode.addChild(new BugzillaCompareNode("New Comment", bug.getNewComment(), defaultImage));
-//
-// BugzillaCompareNode ccList = new BugzillaCompareNode("CC List", null, defaultImage);
-// for (Iterator<String> iter = bug.getCC().iterator(); iter.hasNext();) {
-// String cc = iter.next();
-// ccList.addChild(new BugzillaCompareNode("CC", cc, defaultImage));
-// }
-// topNode.addChild(ccList);
-//
-// BugzillaCompareNode titleNode = new BugzillaCompareNode("BugReport Object", null, defaultImage);
-// titleNode.addChild(topNode);
-//
-// return titleNode;
-// }
-
-}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaCompareStructureCreator.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaCompareStructureCreator.java
deleted file mode 100644
index ebe13dc69..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaCompareStructureCreator.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.ui;
-
-import org.eclipse.compare.structuremergeviewer.IStructureComparator;
-import org.eclipse.compare.structuremergeviewer.IStructureCreator;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-
-/**
- * This implementation of the <code>IStructureCreator</code> interface makes the contents of a <code>BugReport</code>
- * object available as a hierarchical structure of <code>IStructureComparator</code>s.
- * <p>
- * It is used when comparing a modified bug report to the one on the corresponding server.
- */
-public class BugzillaCompareStructureCreator implements IStructureCreator {
-
- /**
- * Create a new BugzillaStructureCreator.
- */
- public BugzillaCompareStructureCreator() {
- super();
- }
-
- public String getName() {
- return "Bugzilla Structure Creator";
- }
-
- public IStructureComparator getStructure(Object input) {
- if (input instanceof RepositoryTaskData) {
- RepositoryTaskData bugReport = (RepositoryTaskData) input;
- return BugzillaCompareNode.parseBugReport(bugReport);
- } else {
- return null;
- }
- }
-
- public IStructureComparator locate(Object path, Object input) {
- return null;
- }
-
- public String getContents(Object node, boolean ignoreWhitespace) {
- if (node instanceof BugzillaCompareNode) {
- String s = ((BugzillaCompareNode) node).getValue();
- if (ignoreWhitespace) {
- s = s.trim();
- }
- return s;
- }
- return null;
- }
-
- /**
- * Called whenever a copy operation has been performed on a tree node. This implementation throws an
- * <code>AssertionFailedException</code> since we cannot update a bug report object.
- *
- * @param structure
- * the node for which to save the new content
- * @param input
- * the object from which the structure tree was created in <code>getStructure</code>
- */
- public void save(IStructureComparator node, Object input) {
- // ignore
- }
-
-}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaImages.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaImages.java
deleted file mode 100644
index 64bbc3dac..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaImages.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.bugzilla.ui;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * @author Shawn Minto
- * @author Mik Kersten
- */
-public class BugzillaImages {
-
- private static ImageRegistry imageRegistry;
-
- private static final URL baseURL = BugzillaUiPlugin.getDefault().getBundle().getEntry("/icons/");
-
- public static final String T_ELCL = "elcl16";
-
- public static final String T_TOOL = "etool16";
-
- public static final String T_VIEW = "eview16";
-
- public static final ImageDescriptor OVERLAY_BUGZILLA = create(T_VIEW, "overlay-bugzilla.gif");
-
- public static final ImageDescriptor BUG = create(T_ELCL, "bug.gif");
-
- public static final ImageDescriptor BUG_COMMENT = create(T_ELCL, "bug-comment.gif");
-
- public static final ImageDescriptor REMOVE_ALL = create("", "remove-all.gif");
-
- public static final ImageDescriptor REMOVE = create("", "remove.gif");
-
- public static final ImageDescriptor SELECT_ALL = create("", "selectAll.gif");
-
- public static final ImageDescriptor OPEN = create("", "openresult.gif");
-
- public static final ImageDescriptor OVERLAY_CRITICAL = create(T_VIEW, "overlay-critical.gif");
-
- public static final ImageDescriptor OVERLAY_MAJOR = create(T_VIEW, "overlay-major.gif");
-
- public static final ImageDescriptor OVERLAY_ENHANCEMENT = create(T_VIEW, "overlay-enhancement.gif");
-
- public static final ImageDescriptor OVERLAY_MINOR = create(T_VIEW, "overlay-minor.gif");
-
- private static ImageDescriptor create(String prefix, String name) {
- try {
- return ImageDescriptor.createFromURL(makeIconFileURL(prefix, name));
- } catch (MalformedURLException e) {
- return ImageDescriptor.getMissingImageDescriptor();
- }
- }
-
- private static URL makeIconFileURL(String prefix, String name) throws MalformedURLException {
- if (baseURL == null) {
- throw new MalformedURLException();
- }
-
- StringBuffer buffer = new StringBuffer(prefix);
- if (prefix != "") {
- buffer.append('/');
- }
- buffer.append(name);
- return new URL(baseURL, buffer.toString());
- }
-
- private static ImageRegistry getImageRegistry() {
- if (imageRegistry == null) {
- imageRegistry = new ImageRegistry();
- }
-
- return imageRegistry;
- }
-
- /**
- * Lazily initializes image map.
- */
- public static Image getImage(ImageDescriptor imageDescriptor) {
- ImageRegistry imageRegistry = getImageRegistry();
- Image image = imageRegistry.get("" + imageDescriptor.hashCode());
- if (image == null) {
- image = imageDescriptor.createImage();
- imageRegistry.put("" + imageDescriptor.hashCode(), image);
- }
- return image;
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiExtensionReader.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiExtensionReader.java
deleted file mode 100644
index 6b7713cb3..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiExtensionReader.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.ui;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaLanguageSettings;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaRepositoryConnector;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-
-/**
- * @author Frank Becker
- */
-public class BugzillaUiExtensionReader {
-
- public static final String EXTENSION_LANGUAGES = "org.eclipse.mylyn.bugzilla.core.languages";
-
- public static final String EXTENSION_TMPL_LANGUAGE = "language";
-
- public static final String ATTR_LANG_VALUE = "value";
-
- public static final String ELMNT_LANG_NAME = "name";
-
- public static final String ELMNT_LANG_ERROR_LOGIN = "error_login";
-
- public static final String ELMNT_LANG_ERROR_COLLISION = "error_collision";
-
- public static final String ELMNT_LANG_ERROR_COMMENT_REQIRED = "error_comment_required";
-
- public static final String ELMNT_LANG_ERROR_LOGGED_OUT = "error_logged_out";
-
- public static final String ELMNT_LANG_BAD_LOGIN = "bad_login";
-
- public static final String ELMNT_LANG_PROCESSED = "processed";
-
- public static final String ELMNT_LANG_CHANGES_SUBMITTED = "changes_submitted";
-
- private static boolean coreExtensionsRead = false;
-
- public static void initStartupExtensions() {
- if (!coreExtensionsRead) {
- IExtensionRegistry registry = Platform.getExtensionRegistry();
-
- IExtensionPoint templatesExtensionPoint = registry.getExtensionPoint(EXTENSION_LANGUAGES);
- IExtension[] templateExtensions = templatesExtensionPoint.getExtensions();
- for (IExtension templateExtension : templateExtensions) {
- IConfigurationElement[] elements = templateExtension.getConfigurationElements();
- for (IConfigurationElement element : elements) {
- if (element.getName().equals(EXTENSION_TMPL_LANGUAGE)) {
- readLanguageTemplate(element);
- }
- }
- }
-
- coreExtensionsRead = true;
- }
-
- }
-
- private static void readLanguageTemplate(IConfigurationElement element) {
- String languageName = element.getAttribute(ELMNT_LANG_NAME);
-
- if (languageName != null) {
- BugzillaRepositoryConnector connector = (BugzillaRepositoryConnector) TasksUi.getRepositoryManager()
- .getRepositoryConnector(BugzillaCorePlugin.CONNECTOR_KIND);
-
- BugzillaLanguageSettings bugzillaLanguageSettings = new BugzillaLanguageSettings(languageName);
-
- for (IConfigurationElement configElement : element.getChildren()) {
- String name = configElement.getName();
- if (name != null && name.equals("languageAttribute")) {
- String command = configElement.getAttribute("command");
- String response = configElement.getAttribute("response");
- bugzillaLanguageSettings.addLanguageAttribute(command, response);
- }
- }
- connector.addLanguageSetting(bugzillaLanguageSettings);
- } else {
- StatusHandler.log(new Status(IStatus.WARNING, BugzillaUiPlugin.PLUGIN_ID,
- "Could not load language template extension " + element.getName()));
- }
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiPlugin.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiPlugin.java
deleted file mode 100644
index 826e0d0ae..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiPlugin.java
+++ /dev/null
@@ -1,232 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.bugzilla.ui;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaRepositoryConnector;
-import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants;
-import org.eclipse.mylyn.internal.bugzilla.core.RepositoryConfiguration;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- *
- * @author Mik Kersten
- */
-public class BugzillaUiPlugin extends AbstractUIPlugin {
-
- public static final String PLUGIN_ID = "org.eclipse.mylyn.bugzilla.ui";
-
- public static final String SEARCH_PAGE_ID = BugzillaUiPlugin.PLUGIN_ID + ".search.bugzillaSearchPage";
-
- public static final String SEARCH_PAGE_CONTEXT = BugzillaUiPlugin.PLUGIN_ID + ".bugzillaSearchContext";
-
- public static final String EDITOR_PAGE_CONTEXT = BugzillaUiPlugin.PLUGIN_ID + ".bugzillaEditorContext";
-
- // The is's for hit markers used in the label provider and sorters
- public static final String HIT_MARKER_ATTR_ID = "taskId";
-
- public static final String HIT_MARKER_ATTR_REPOSITORY = "repository";
-
- public static final String HIT_MARKER_ATTR_HREF = "href";
-
- public static final String HIT_MARKER_ATTR_DESC = "summary";
-
- public static final String HIT_MARKER_ATTR_LABEL = "label";
-
- public static final String HIT_MARKER_ATTR_SEVERITY = "severity";
-
- public static final String HIT_MARKER_ATTR_PRIORITY = "priority";
-
- public static final String HIT_MARKER_ATTR_PLATFORM = "platform";
-
- public static final String HIT_MARKER_ATTR_STATE = "state";
-
- public static final String HIT_MARKER_ATTR_RESULT = "result";
-
- public static final String HIT_MARKER_ATTR_OWNER = "owner";
-
- public static final String HIT_MARKER_ATTR_QUERY = "query";
-
- /**
- * XXX: remove?
- */
- public static final String HIT_MARKER_ID = BugzillaUiPlugin.PLUGIN_ID + ".searchHit";
-
- private static BugzillaUiPlugin plugin;
-
- public static final char PREF_DELIM_REPOSITORY = ':';
-
- private static final int WRAP_LENGTH = 90;
-
- public BugzillaUiPlugin() {
- plugin = this;
- }
-
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- getPreferenceStore().setDefault(IBugzillaConstants.MAX_RESULTS, 100);
-
- IPath repConfigCacheFile = getProductConfigurationCachePath();
- if (repConfigCacheFile != null) {
- BugzillaCorePlugin.setConfigurationCacheFile(repConfigCacheFile.toFile());
- }
-
- BugzillaRepositoryConnector bugzillaConnector = (BugzillaRepositoryConnector) TasksUi.getRepositoryManager()
- .getRepositoryConnector(BugzillaCorePlugin.CONNECTOR_KIND);
-
- TasksUi.getRepositoryManager().addListener(bugzillaConnector.getClientManager());
-
- // NOTE: initializing extensions in start(..) has caused race
- // conditions previously
- BugzillaUiExtensionReader.initStartupExtensions();
- }
-
- /**
- * Returns the path to the file cacheing the product configuration.
- */
- private static IPath getProductConfigurationCachePath() {
- IPath stateLocation = Platform.getStateLocation(BugzillaCorePlugin.getDefault().getBundle());
- IPath configFile = stateLocation.append("repositoryConfigurations");
- return configFile;
- }
-
- public int getMaxResults() {
- return getPreferenceStore().getInt(IBugzillaConstants.MAX_RESULTS);
- }
-
- /**
- * This method is called when the plug-in is stopped
- */
- @Override
- public void stop(BundleContext context) throws Exception {
-
- BugzillaRepositoryConnector bugzillaConnector = (BugzillaRepositoryConnector) TasksUi.getRepositoryManager()
- .getRepositoryConnector(BugzillaCorePlugin.CONNECTOR_KIND);
-
- TasksUi.getRepositoryManager().removeListener(bugzillaConnector.getClientManager());
-
- super.stop(context);
- plugin = null;
- }
-
- /**
- * Returns the shared instance.
- */
- public static BugzillaUiPlugin getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given plug-in relative path.
- *
- * @param path
- * the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-
- public static String[] getQueryOptions(String prefId, String[] selectedProducts,
- RepositoryConfiguration repositoryConfiguration) {
- List<String> options = new ArrayList<String>();
- if ((prefId.equals(IBugzillaConstants.VALUES_COMPONENT) || prefId.equals(IBugzillaConstants.VALUES_VERSION) || prefId.equals(IBugzillaConstants.VALUES_TARGET))
- && selectedProducts != null) {
- for (String product : selectedProducts) {
- if (prefId.equals(IBugzillaConstants.VALUES_COMPONENT)) {
- for (String option : repositoryConfiguration.getComponents(product)) {
- if (!options.contains(option)) {
- options.add(option);
- }
- }
- }
- if (prefId.equals(IBugzillaConstants.VALUES_VERSION)) {
- for (String option : repositoryConfiguration.getVersions(product)) {
- if (!options.contains(option)) {
- options.add(option);
- }
- }
- }
- if (prefId.equals(IBugzillaConstants.VALUES_TARGET)) {
- for (String option : repositoryConfiguration.getTargetMilestones(product)) {
- if (!options.contains(option)) {
- options.add(option);
- }
- }
- }
- }
- } else {
- if (prefId.equals(IBugzillaConstants.VALUES_COMPONENT)) {
- options = repositoryConfiguration.getComponents();
- }
- if (prefId.equals(IBugzillaConstants.VALUES_VERSION)) {
- options = repositoryConfiguration.getVersions();
- }
- if (prefId.equals(IBugzillaConstants.VALUES_TARGET)) {
- options = repositoryConfiguration.getTargetMilestones();
- }
- }
- return options.toArray(new String[options.size()]);
- }
-
- public static String getMostRecentQuery() {
- return plugin.getPreferenceStore().getString(IBugzillaConstants.MOST_RECENT_QUERY);
- }
-
- /**
- * Break text up into lines so that it is displayed properly in bugzilla
- */
- public static String formatTextToLineWrap(String origText, boolean hardWrap) {
- // BugzillaServerVersion bugzillaServerVersion =
- // IBugzillaConstants.BugzillaServerVersion.fromString(repository
- // .getVersion());
- // if (bugzillaServerVersion != null &&
- // bugzillaServerVersion.compareTo(BugzillaServerVersion.SERVER_220) >=
- // 0) {
- // return origText;
- if (!hardWrap) {
- return origText;
- } else {
- String[] textArray = new String[(origText.length() / WRAP_LENGTH + 1) * 2];
- for (int i = 0; i < textArray.length; i++) {
- textArray[i] = null;
- }
- int j = 0;
- while (true) {
- int spaceIndex = origText.indexOf(" ", WRAP_LENGTH - 5);
- if (spaceIndex == origText.length() || spaceIndex == -1) {
- textArray[j] = origText;
- break;
- }
- textArray[j] = origText.substring(0, spaceIndex);
- origText = origText.substring(spaceIndex + 1, origText.length());
- j++;
- }
-
- String newText = "";
-
- for (String element : textArray) {
- if (element == null) {
- break;
- }
- newText += element + "\n";
- }
- return newText;
- }
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaCcAttributeEditor.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaCcAttributeEditor.java
deleted file mode 100644
index e038be21a..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaCcAttributeEditor.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.ui.editor;
-
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaAttribute;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaTaskDataHandler;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.mylyn.tasks.core.data.TaskDataModel;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractAttributeEditor;
-import org.eclipse.mylyn.tasks.ui.editors.LayoutHint;
-import org.eclipse.mylyn.tasks.ui.editors.LayoutHint.ColumnSpan;
-import org.eclipse.mylyn.tasks.ui.editors.LayoutHint.RowSpan;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.List;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-
-/**
- * @author Rob Elves
- */
-public class BugzillaCcAttributeEditor extends AbstractAttributeEditor {
-
- private List list;
-
- private TaskAttribute attrRemoveCc;
-
- public BugzillaCcAttributeEditor(TaskDataModel manager, TaskAttribute taskAttribute) {
- super(manager, taskAttribute);
- setLayoutHint(new LayoutHint(RowSpan.MULTIPLE, ColumnSpan.SINGLE));
- }
-
- @Override
- public void createControl(Composite parent, FormToolkit toolkit) {
- list = new List(parent, SWT.FLAT | SWT.MULTI | SWT.V_SCROLL);
- toolkit.adapt(list, true, true);
- list.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
- list.setFont(TEXT_FONT);
- GridDataFactory.fillDefaults().grab(true, true).align(SWT.FILL, SWT.FILL).applyTo(list);
-
- TaskAttribute attrUserCC = getTaskAttribute();
- if (attrUserCC != null) {
- for (String value : attrUserCC.getValues()) {
- list.add(value);
- }
- }
-
- attrRemoveCc = getModel().getTaskData().getRoot().getMappedAttribute(BugzillaAttribute.REMOVECC.getKey());
-
- if (attrRemoveCc == null) {
- attrRemoveCc = BugzillaTaskDataHandler.createAttribute(getModel().getTaskData(), BugzillaAttribute.REMOVECC);
- }
-
- for (String item : attrRemoveCc.getValues()) {
- int i = list.indexOf(item);
- if (i != -1) {
- list.select(i);
- }
- }
-
- list.addSelectionListener(new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- for (String cc : list.getItems()) {
- int index = list.indexOf(cc);
- if (list.isSelected(index)) {
- java.util.List<String> remove = attrRemoveCc.getValues();
- if (!remove.contains(cc)) {
- attrRemoveCc.addValue(cc);
- }
- } else {
- attrRemoveCc.removeValue(cc);
- }
- }
- getModel().attributeChanged(attrRemoveCc);
- }
- });
-
- list.showSelection();
-
- setControl(list);
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaKeywordAttributeEditor.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaKeywordAttributeEditor.java
deleted file mode 100644
index ba027f833..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaKeywordAttributeEditor.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.ui.editor;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.window.Window;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.mylyn.tasks.core.data.TaskDataModel;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractAttributeEditor;
-import org.eclipse.mylyn.tasks.ui.editors.LayoutHint;
-import org.eclipse.mylyn.tasks.ui.editors.LayoutHint.ColumnSpan;
-import org.eclipse.mylyn.tasks.ui.editors.LayoutHint.RowSpan;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-
-/**
- * @author Rob Elves
- */
-public class BugzillaKeywordAttributeEditor extends AbstractAttributeEditor {
-
- private Text keywordsText;
-
- public BugzillaKeywordAttributeEditor(TaskDataModel manager, TaskAttribute taskAttribute) {
- super(manager, taskAttribute);
- setLayoutHint(new LayoutHint(RowSpan.SINGLE, ColumnSpan.MULTIPLE));
- }
-
- @Override
- public void createControl(Composite parent, FormToolkit toolkit) {
- Composite keywordComposite = toolkit.createComposite(parent);
- GridLayout layout = new GridLayout(2, false);
- layout.marginWidth = 1;
- keywordComposite.setLayout(layout);
-
- keywordsText = toolkit.createText(keywordComposite, getTaskAttribute().getValue());
- GridData keywordsData = new GridData(GridData.FILL_HORIZONTAL);
- keywordsText.setLayoutData(keywordsData);
- keywordsText.setEditable(false);
-
- Button changeKeywordsButton = toolkit.createButton(keywordComposite, "Edit...", SWT.FLAT);
- GridData keyWordsButtonData = new GridData();
- changeKeywordsButton.setLayoutData(keyWordsButtonData);
- changeKeywordsButton.addSelectionListener(new SelectionListener() {
-
- public void widgetDefaultSelected(SelectionEvent e) {
- }
-
- public void widgetSelected(SelectionEvent e) {
-
- String keywords = getTaskAttribute().getValue();
-
- Shell shell = null;
- if (PlatformUI.getWorkbench().getActiveWorkbenchWindow() != null) {
- shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- } else {
- shell = new Shell(PlatformUI.getWorkbench().getDisplay());
- }
-
- List<String> validKeywords = new ArrayList<String>();
- try {
- validKeywords = BugzillaCorePlugin.getRepositoryConfiguration(getModel().getTaskRepository(),
- false, new NullProgressMonitor()).getKeywords();
- } catch (Exception ex) {
- // ignore
- }
-
- KeywordsDialog keywordsDialog = new KeywordsDialog(shell, keywords, validKeywords);
- int responseCode = keywordsDialog.open();
-
- String newKeywords = keywordsDialog.getSelectedKeywordsString();
- if (responseCode == Window.OK && keywords != null) {
- keywordsText.setText(newKeywords);
- getAttributeMapper().setValue(getTaskAttribute(), newKeywords);
- attributeChanged();
- } else {
- return;
- }
-
- }
-
- });
- setControl(keywordComposite);
- }
-
- @Override
- protected void decorateIncoming(Color color) {
- if (keywordsText != null && !keywordsText.isDisposed()) {
- keywordsText.setBackground(color);
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaPeoplePart.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaPeoplePart.java
deleted file mode 100644
index cf9986abe..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaPeoplePart.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.ui.editor;
-
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaAttribute;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaTaskDataHandler;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractAttributeEditor;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPart;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-import org.eclipse.ui.forms.widgets.Section;
-
-/**
- * @author Robert Elves
- */
-public class BugzillaPeoplePart extends AbstractTaskEditorPart {
-
- private static final int COLUMN_MARGIN = 5;
-
- public BugzillaPeoplePart() {
- setPartName("People");
- }
-
- private void addAttribute(Composite composite, FormToolkit toolkit, TaskAttribute attribute) {
- AbstractAttributeEditor editor = createAttributeEditor(attribute);
- if (editor != null) {
- editor.createLabelControl(composite, toolkit);
- GridDataFactory.defaultsFor(editor.getLabelControl()).indent(COLUMN_MARGIN, 0).applyTo(
- editor.getLabelControl());
- editor.createControl(composite, toolkit);
- getTaskEditorPage().getAttributeEditorToolkit().adapt(editor);
- if (attribute.getId().equals(BugzillaAttribute.CC.getKey())) {
- GridDataFactory.fillDefaults().grab(true, true).align(SWT.FILL, SWT.FILL).hint(150, 95).applyTo(
- editor.getControl());
- } else {
- GridDataFactory.fillDefaults().grab(true, false).align(SWT.FILL, SWT.TOP).applyTo(editor.getControl());
- }
- }
- }
-
- @Override
- public void createControl(Composite parent, FormToolkit toolkit) {
- Section section = createSection(parent, toolkit, true);
- Composite peopleComposite = toolkit.createComposite(section);
- GridLayout layout = new GridLayout(2, false);
- layout.marginWidth = 5;
- peopleComposite.setLayout(layout);
-
- addAttribute(peopleComposite, toolkit, getTaskData().getRoot().getMappedAttribute(TaskAttribute.USER_ASSIGNED));
- addAttribute(peopleComposite, toolkit, getTaskData().getRoot().getMappedAttribute(TaskAttribute.USER_REPORTER));
- addAttribute(peopleComposite, toolkit, getTaskData().getRoot().getMappedAttribute(
- BugzillaAttribute.QA_CONTACT.getKey()));
- addAttribute(peopleComposite, toolkit, getTaskData().getRoot().getMappedAttribute(
- BugzillaAttribute.NEWCC.getKey()));
- addSelfToCC(peopleComposite);
- TaskAttribute cc = getTaskData().getRoot().getMappedAttribute(BugzillaAttribute.CC.getKey());
- if (cc != null) {
- addAttribute(peopleComposite, toolkit, cc);
- toolkit.createLabel(peopleComposite, "");
- Label label = toolkit.createLabel(peopleComposite, "(Select to remove)");
- GridDataFactory.fillDefaults().indent(0, 5).align(SWT.CENTER, SWT.CENTER).applyTo(label);
- }
-
- toolkit.paintBordersFor(peopleComposite);
- section.setClient(peopleComposite);
- setSection(toolkit, section);
- }
-
- /**
- * Creates a check box for adding the repository user to the cc list. Does nothing if the repository does not have a
- * valid username, the repository user is the assignee, reporter or already on the the cc list.
- */
- protected void addSelfToCC(Composite composite) {
-
- TaskRepository repository = this.getTaskEditorPage().getTaskRepository();
-
- if (repository.getUserName() == null) {
- return;
- }
-
- TaskAttribute root = getTaskData().getRoot();
- TaskAttribute owner = root.getMappedAttribute(TaskAttribute.USER_ASSIGNED);
- if (owner != null && owner.getValue().indexOf(repository.getUserName()) != -1) {
- return;
- }
-
- TaskAttribute reporter = root.getMappedAttribute(TaskAttribute.USER_REPORTER);
- if (reporter != null && reporter.getValue().indexOf(repository.getUserName()) != -1) {
- return;
- }
-
- TaskAttribute ccAttribute = root.getMappedAttribute(TaskAttribute.USER_CC);
- if (ccAttribute != null && ccAttribute.getValues().contains(repository.getUserName())) {
- return;
- }
-
- FormToolkit toolkit = getManagedForm().getToolkit();
- TaskAttribute attrAddToCC = getTaskData().getRoot().getMappedAttribute(TaskAttribute.ADD_SELF_CC);
- if (attrAddToCC == null) {
- attrAddToCC = BugzillaTaskDataHandler.createAttribute(getTaskData(), BugzillaAttribute.ADDSELFCC);
- }
- addAttribute(composite, toolkit, attrAddToCC);
- }
-
-// protected void addCCList(Composite attributesComposite) {
-//
-// RepositoryTaskAttribute addCCattribute = taskData.getAttribute(RepositoryTaskAttribute.NEW_CC);
-// if (addCCattribute == null) {
-// // TODO: remove once TRAC is priming taskData with NEW_CC attribute
-// taskData.setAttributeValue(RepositoryTaskAttribute.NEW_CC, "");
-// addCCattribute = taskData.getAttribute(RepositoryTaskAttribute.NEW_CC);
-// }
-// if (addCCattribute != null) {
-// Label label = createLabel(attributesComposite, addCCattribute);
-// GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(label);
-// Text text = createTextField(attributesComposite, addCCattribute, SWT.FLAT);
-// GridDataFactory.fillDefaults().hint(150, SWT.DEFAULT).applyTo(text);
-//
-// if (hasContentAssist(addCCattribute)) {
-// ContentAssistCommandAdapter adapter = applyContentAssist(text,
-// createContentProposalProvider(addCCattribute));
-// ILabelProvider propsalLabelProvider = createProposalLabelProvider(addCCattribute);
-// if (propsalLabelProvider != null) {
-// adapter.setLabelProvider(propsalLabelProvider);
-// }
-// adapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
-// }
-// }
-//
-// TaskAttribute CCattribute = getTaskData().getAttribute(TaskAttribute.USER_CC);
-// if (CCattribute != null) {
-// Label label = createLabel(attributesComposite, CCattribute);
-// GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.TOP).applyTo(label);
-// ccList = new org.eclipse.swt.widgets.List(attributesComposite, SWT.MULTI | SWT.V_SCROLL);// SWT.BORDER
-// ccList.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
-// ccList.setFont(TEXT_FONT);
-// GridData ccListData = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
-// ccListData.horizontalSpan = 1;
-// ccListData.widthHint = 150;
-// ccListData.heightHint = 95;
-// ccList.setLayoutData(ccListData);
-// if (hasChanged(taskData.getAttribute(RepositoryTaskAttribute.USER_CC))) {
-// ccList.setBackground(colorIncoming);
-// }
-// java.util.List<String> ccs = taskData.getCc();
-// if (ccs != null) {
-// for (String cc : ccs) {
-// ccList.add(cc);
-// }
-// }
-// java.util.List<String> removedCCs = taskData.getAttributeValues(RepositoryTaskAttribute.REMOVE_CC);
-// if (removedCCs != null) {
-// for (String item : removedCCs) {
-// int i = ccList.indexOf(item);
-// if (i != -1) {
-// ccList.select(i);
-// }
-// }
-// }
-// ccList.addSelectionListener(new SelectionListener() {
-//
-// public void widgetSelected(SelectionEvent e) {
-// for (String cc : ccList.getItems()) {
-// int index = ccList.indexOf(cc);
-// if (ccList.isSelected(index)) {
-// List<String> remove = taskData.getAttributeValues(RepositoryTaskAttribute.REMOVE_CC);
-// if (!remove.contains(cc)) {
-// taskData.addAttributeValue(RepositoryTaskAttribute.REMOVE_CC, cc);
-// }
-// } else {
-// taskData.removeAttributeValue(RepositoryTaskAttribute.REMOVE_CC, cc);
-// }
-// }
-// attributeChanged(taskData.getAttribute(RepositoryTaskAttribute.REMOVE_CC));
-// }
-//
-// public void widgetDefaultSelected(SelectionEvent e) {
-// }
-// });
-// toolkit.createLabel(attributesComposite, "");
-// label = toolkit.createLabel(attributesComposite, "(Select to remove)");
-// GridDataFactory.fillDefaults().align(SWT.CENTER, SWT.CENTER).applyTo(label);
-// }
-
-// }
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditor.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditor.java
deleted file mode 100644
index d40e030a7..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditor.java
+++ /dev/null
@@ -1,820 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.bugzilla.ui.editor;
-
-import java.io.IOException;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.List;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.fieldassist.ContentProposalAdapter;
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.jface.layout.GridLayoutFactory;
-import org.eclipse.jface.text.ITextListener;
-import org.eclipse.jface.text.TextEvent;
-import org.eclipse.jface.text.TextViewer;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.window.Window;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCustomField;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaAttribute;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaOperation;
-import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants;
-import org.eclipse.mylyn.internal.bugzilla.core.RepositoryConfiguration;
-import org.eclipse.mylyn.internal.bugzilla.ui.BugzillaUiPlugin;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.provisional.commons.ui.DatePicker;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryOperation;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskAttribute;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.deprecated.AbstractRepositoryTaskEditor;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CCombo;
-import org.eclipse.swt.custom.StyledText;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.layout.RowLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.fieldassist.ContentAssistCommandAdapter;
-import org.eclipse.ui.forms.IFormColors;
-import org.eclipse.ui.forms.editor.FormEditor;
-import org.eclipse.ui.forms.events.HyperlinkAdapter;
-import org.eclipse.ui.forms.events.HyperlinkEvent;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-import org.eclipse.ui.forms.widgets.Hyperlink;
-import org.eclipse.ui.forms.widgets.ImageHyperlink;
-import org.eclipse.ui.forms.widgets.Section;
-
-/**
- * An editor used to view a bug report that exists on a server. It uses a <code>BugReport</code> object to store the
- * data.
- *
- * @author Mik Kersten (hardening of prototype)
- * @author Rob Elves
- * @author Jeff Pound (Attachment work)
- */
-public class BugzillaTaskEditor extends AbstractRepositoryTaskEditor {
-
- private static final String LABEL_TIME_TRACKING = "Bugzilla Time Tracking";
-
- private static final String LABEL_CUSTOM_FIELD = "Custom Fields";
-
- protected Text keywordsText;
-
- protected Text estimateText;
-
- protected Text actualText;
-
- protected Text remainingText;
-
- protected Text addTimeText;
-
- protected Text deadlineText;
-
- protected DatePicker deadlinePicker;
-
- protected Text votesText;
-
- protected Text assignedTo;
-
- /**
- * Creates a new <code>ExistingBugEditor</code>.
- */
- public BugzillaTaskEditor(FormEditor editor) {
- super(editor);
- // Set up the input for comparing the bug report to the server
- // CompareConfiguration config = new CompareConfiguration();
- // config.setLeftEditable(false);
- // config.setRightEditable(false);
- // config.setLeftLabel("Local Bug Report");
- // config.setRightLabel("Remote Bug Report");
- // config.setLeftImage(PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_ELEMENT));
- // config.setRightImage(PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_ELEMENT));
- // compareInput = new BugzillaCompareInput(config);
- }
-
- @Override
- protected boolean supportsCommentSort() {
- return false;
- }
-
- @Override
- protected void createCustomAttributeLayout(Composite composite) {
- RepositoryTaskAttribute attribute = null;
- try {
- RepositoryConfiguration configuration = BugzillaCorePlugin.getRepositoryConfiguration(this.repository,
- false, new NullProgressMonitor());
-
- if (configuration != null) {
- List<BugzillaCustomField> customFields = configuration.getCustomFields();
- if (!customFields.isEmpty()) {
- for (BugzillaCustomField bugzillaCustomField : customFields) {
- List<String> optionList = bugzillaCustomField.getOptions();
- attribute = this.taskData.getAttribute(bugzillaCustomField.getName());
- if (attribute == null) {
- RepositoryTaskAttribute newattribute = new RepositoryTaskAttribute(
- bugzillaCustomField.getName(), bugzillaCustomField.getDescription(), false);
- newattribute.setReadOnly(false);
- this.taskData.addAttribute(bugzillaCustomField.getName(), newattribute);
- }
- final RepositoryTaskAttribute cfattribute = this.taskData.getAttribute(bugzillaCustomField.getName());
- Label label = createLabel(composite, cfattribute);
- GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(label);
- if (optionList != null && !optionList.isEmpty()) {
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- data.horizontalSpan = 1;
- final CCombo attributeCombo = new CCombo(composite, SWT.FLAT | SWT.READ_ONLY);
- getManagedForm().getToolkit().adapt(attributeCombo, true, true);
- attributeCombo.setFont(TEXT_FONT);
- attributeCombo.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
- if (hasChanged(cfattribute)) {
- attributeCombo.setBackground(getColorIncoming());
- }
- attributeCombo.setLayoutData(data);
-
- for (String val : optionList) {
- if (val != null) {
- attributeCombo.add(val);
- }
- }
- String value = cfattribute.getValue();
- if (value == null) {
- value = "";
- }
- if (attributeCombo.indexOf(value) != -1) {
- attributeCombo.select(attributeCombo.indexOf(value));
- }
- attributeCombo.clearSelection();
- attributeCombo.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent event) {
- if (attributeCombo.getSelectionIndex() > -1) {
- String sel = attributeCombo.getItem(attributeCombo.getSelectionIndex());
- cfattribute.setValue(sel);
- attributeChanged(cfattribute);
- attributeCombo.clearSelection();
- }
- }
- });
- } else {
- Text cfField = createTextField(composite, cfattribute, SWT.FLAT);
- GridDataFactory.fillDefaults().hint(135, SWT.DEFAULT).applyTo(cfField);
- }
- }
-
- getManagedForm().getToolkit().paintBordersFor(composite);
- }
- }
- } catch (CoreException e) {
- // ignore
- }
-
- attribute = this.taskData.getAttribute(BugzillaAttribute.DEPENDSON.getKey());
- if (attribute != null && !attribute.isReadOnly()) {
- Label label = createLabel(composite, attribute);
- GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(label);
-
- Composite textFieldComposite = getManagedForm().getToolkit().createComposite(composite);
- GridDataFactory.swtDefaults().align(SWT.FILL, SWT.CENTER).applyTo(textFieldComposite);
- GridLayoutFactory.swtDefaults().margins(1, 3).spacing(0, 3).applyTo(textFieldComposite);
-
- GridData textData = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
- textData.horizontalSpan = 1;
- textData.widthHint = 135;
-
- final Text text = createTextField(textFieldComposite, attribute, SWT.FLAT);
- text.setLayoutData(textData);
- getManagedForm().getToolkit().paintBordersFor(textFieldComposite);
- }
-
- attribute = this.taskData.getAttribute(BugzillaAttribute.BLOCKED.getKey());
- if (attribute != null && !attribute.isReadOnly()) {
- Label label = createLabel(composite, attribute);
- GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(label);
- Composite textFieldComposite = getManagedForm().getToolkit().createComposite(composite);
- GridLayout textLayout = new GridLayout();
- textLayout.marginWidth = 1;
- textLayout.marginHeight = 3;
- textLayout.verticalSpacing = 3;
- textFieldComposite.setLayout(textLayout);
- GridData textData = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- textData.horizontalSpan = 1;
- textData.widthHint = 135;
- final Text text = createTextField(textFieldComposite, attribute, SWT.FLAT);
- text.setLayoutData(textData);
- getManagedForm().getToolkit().paintBordersFor(textFieldComposite);
- }
-
- String dependson = taskData.getAttributeValue(BugzillaAttribute.DEPENDSON.getKey());
- String blocked = taskData.getAttributeValue(BugzillaAttribute.BLOCKED.getKey());
- boolean addHyperlinks = (dependson != null && dependson.length() > 0)
- || (blocked != null && blocked.length() > 0);
-
- if (addHyperlinks) {
- getManagedForm().getToolkit().createLabel(composite, "");
- addBugHyperlinks(composite, BugzillaAttribute.DEPENDSON.getKey());
- }
-
- if (addHyperlinks) {
- getManagedForm().getToolkit().createLabel(composite, "");
- addBugHyperlinks(composite, BugzillaAttribute.BLOCKED.getKey());
- }
-
- // NOTE: urlText should not be back ported to 3.3 due to background color failure
- attribute = this.taskData.getAttribute(BugzillaAttribute.BUG_FILE_LOC.getKey());
- if (attribute != null && !attribute.isReadOnly()) {
- Label label = createLabel(composite, attribute);
- GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(label);
- TextViewer urlTextViewer = addTextEditor(repository, composite, attribute.getValue(), //
- false, SWT.FLAT);
- final StyledText urlText = urlTextViewer.getTextWidget();
- urlText.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
- urlText.setIndent(2);
- final RepositoryTaskAttribute urlAttribute = attribute;
-
- urlTextViewer.setEditable(true);
- urlTextViewer.addTextListener(new ITextListener() {
- public void textChanged(TextEvent event) {
- String newValue = urlText.getText();
- if (!newValue.equals(urlAttribute.getValue())) {
- urlAttribute.setValue(newValue);
- attributeChanged(urlAttribute);
- }
- }
- });
- GridData textData = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- textData.horizontalSpan = 1;
- textData.widthHint = 135;
- urlText.setLayoutData(textData);
- if (hasChanged(attribute)) {
- urlText.setBackground(getColorIncoming());
- }
- }
-
- attribute = this.taskData.getAttribute(BugzillaAttribute.STATUS_WHITEBOARD.getKey());
- if (attribute == null) {
- this.taskData.setAttributeValue(BugzillaAttribute.STATUS_WHITEBOARD.getKey(), "");
- attribute = this.taskData.getAttribute(BugzillaAttribute.STATUS_WHITEBOARD.getKey());
- }
- if (attribute != null && !attribute.isReadOnly()) {
- Label label = createLabel(composite, attribute);
- GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(label);
- Text whiteboardField = createTextField(composite, attribute, SWT.FLAT);
- GridDataFactory.fillDefaults().hint(135, SWT.DEFAULT).applyTo(whiteboardField);
- }
-
- try {
- addKeywordsList(composite);
- } catch (IOException e) {
- MessageDialog.openInformation(null, "Attribute Display Error",
- "Could not retrieve keyword list, ensure proper configuration in "
- + TasksUiPlugin.LABEL_VIEW_REPOSITORIES + "\n\nError reported: " + e.getMessage());
- }
-
- addVoting(composite);
-
- // If groups is available add roles
- if (taskData.getAttribute(BugzillaAttribute.GROUP.getKey()) != null) {
- addRoles(composite);
- }
-
- if (taskData.getAttribute(BugzillaAttribute.ESTIMATED_TIME.getKey()) != null) {
- addBugzillaTimeTracker(getManagedForm().getToolkit(), composite);
- }
- }
-
- private boolean hasCustomAttributeChanges() {
- if (taskData == null) {
- return false;
- }
- String customAttributeKeys[] = { BugzillaAttribute.BUG_FILE_LOC.getKey(),
- BugzillaAttribute.DEPENDSON.getKey(), BugzillaAttribute.BLOCKED.getKey(),
- BugzillaAttribute.KEYWORDS.getKey(), BugzillaAttribute.VOTES.getKey(),
- BugzillaAttribute.REPORTER_ACCESSIBLE.getKey(),
- BugzillaAttribute.CCLIST_ACCESSIBLE.getKey(),
- BugzillaAttribute.ESTIMATED_TIME.getKey(),
- BugzillaAttribute.REMAINING_TIME.getKey(), BugzillaAttribute.ACTUAL_TIME.getKey(),
- BugzillaAttribute.DEADLINE.getKey(), BugzillaAttribute.STATUS_WHITEBOARD.getKey() };
- for (String key : customAttributeKeys) {
- RepositoryTaskAttribute attribute = taskData.getAttribute(key);
- if (hasChanged(attribute)) {
- return true;
- }
- }
- return false;
- }
-
- @Override
- protected boolean hasVisibleAttributeChanges() {
- return super.hasVisibleAttributeChanges() || this.hasCustomAttributeChanges();
-
- }
-
- private void addBugHyperlinks(Composite composite, String key) {
- Composite hyperlinksComposite = getManagedForm().getToolkit().createComposite(composite);
- RowLayout rowLayout = new RowLayout();
- rowLayout.marginBottom = 0;
- rowLayout.marginLeft = 0;
- rowLayout.marginRight = 0;
- rowLayout.marginTop = 0;
- rowLayout.spacing = 0;
- hyperlinksComposite.setLayout(new RowLayout());
- String values = taskData.getAttributeValue(key);
-
- if (values != null && values.length() > 0) {
- for (String bugNumber : values.split(",")) {
- final String bugId = bugNumber.trim();
- final String bugUrl = repository.getRepositoryUrl() + IBugzillaConstants.URL_GET_SHOW_BUG + bugId;
- final AbstractTask task = (AbstractTask) TasksUiInternal.getTaskList().getTask(
- repository.getRepositoryUrl(), bugId);
- createTaskListHyperlink(hyperlinksComposite, bugId, bugUrl, task);
- }
- }
- }
-
- protected void addRoles(Composite parent) {
- Section rolesSection = getManagedForm().getToolkit().createSection(parent, ExpandableComposite.SHORT_TITLE_BAR);
- rolesSection.setText("Users in the roles selected below can always view this bug");
- rolesSection.setDescription("(The assignee can always see a bug, and this section does not take effect unless the bug is restricted to at least one group.)");
- GridLayout gl = new GridLayout();
- GridData gd = new GridData(SWT.FILL, SWT.NONE, false, false);
- gd.horizontalSpan = 4;
- rolesSection.setLayout(gl);
- rolesSection.setLayoutData(gd);
-
- Composite rolesComposite = getManagedForm().getToolkit().createComposite(rolesSection);
- GridLayout attributesLayout = new GridLayout();
- attributesLayout.numColumns = 4;
- attributesLayout.horizontalSpacing = 5;
- attributesLayout.verticalSpacing = 4;
- rolesComposite.setLayout(attributesLayout);
- GridData attributesData = new GridData(GridData.FILL_BOTH);
- attributesData.horizontalSpan = 1;
- attributesData.grabExcessVerticalSpace = false;
- rolesComposite.setLayoutData(attributesData);
- rolesSection.setClient(rolesComposite);
-
- RepositoryTaskAttribute attribute = taskData.getAttribute(BugzillaAttribute.REPORTER_ACCESSIBLE.getKey());
- if (attribute == null) {
- taskData.setAttributeValue(BugzillaAttribute.REPORTER_ACCESSIBLE.getKey(), "0");
- attribute = taskData.getAttribute(BugzillaAttribute.REPORTER_ACCESSIBLE.getKey());
- }
- Button button = addButtonField(rolesComposite, attribute, SWT.CHECK);
- if (hasChanged(attribute)) {
- button.setBackground(getColorIncoming());
- }
-
- attribute = null;
- attribute = taskData.getAttribute(BugzillaAttribute.CCLIST_ACCESSIBLE.getKey());
- if (attribute == null) {
- taskData.setAttributeValue(BugzillaAttribute.CCLIST_ACCESSIBLE.getKey(), "0");
- attribute = taskData.getAttribute(BugzillaAttribute.CCLIST_ACCESSIBLE.getKey());
- }
- button = addButtonField(rolesComposite, attribute, SWT.CHECK);
- if (hasChanged(attribute)) {
- button.setBackground(getColorIncoming());
- }
- }
-
- @Override
- protected boolean hasContentAssist(RepositoryTaskAttribute attribute) {
- return BugzillaAttribute.NEWCC.getKey().equals(attribute.getId());
- }
-
- @Override
- protected boolean hasContentAssist(RepositoryOperation repositoryOperation) {
- BugzillaOperation operation;
- try {
- operation = BugzillaOperation.valueOf(repositoryOperation.getKnobName());
- } catch (RuntimeException e) {
- // FIXME: ?
- StatusHandler.log(new Status(IStatus.INFO, BugzillaUiPlugin.PLUGIN_ID, "Unrecognized operation: "
- + repositoryOperation.getKnobName(), e));
- operation = null;
- }
-
- if (operation != null && operation == BugzillaOperation.reassign) {
- return true;
- } else {
- return false;
- }
- }
-
- private Button addButtonField(Composite rolesComposite, RepositoryTaskAttribute attribute, int style) {
- if (attribute == null) {
- return null;
- }
- String name = attribute.getName();
- if (hasOutgoingChange(attribute)) {
- name += "*";
- }
-
- final Button button = getManagedForm().getToolkit().createButton(rolesComposite, name, style);
- if (!attribute.isReadOnly()) {
- button.setData(attribute);
- button.setSelection(attribute.getValue().equals("1"));
- button.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
- button.addSelectionListener(new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- String sel = "1";
- if (!button.getSelection()) {
- sel = "0";
- }
- RepositoryTaskAttribute a = (RepositoryTaskAttribute) button.getData();
- a.setValue(sel);
- attributeChanged(a);
- }
- });
- }
- return button;
- }
-
- protected void addBugzillaTimeTracker(FormToolkit toolkit, Composite parent) {
-
- Section timeSection = toolkit.createSection(parent, ExpandableComposite.SHORT_TITLE_BAR);
- timeSection.setText(LABEL_TIME_TRACKING);
- GridLayout gl = new GridLayout();
- GridData gd = new GridData(SWT.FILL, SWT.NONE, false, false);
- gd.horizontalSpan = 4;
- timeSection.setLayout(gl);
- timeSection.setLayoutData(gd);
-
- Composite timeComposite = toolkit.createComposite(timeSection);
- gl = new GridLayout(4, false);
- timeComposite.setLayout(gl);
- gd = new GridData();
- gd.horizontalSpan = 5;
- timeComposite.setLayoutData(gd);
-
- RepositoryTaskAttribute attribute = this.taskData.getAttribute(BugzillaAttribute.ESTIMATED_TIME.getKey());
- if (attribute != null && !attribute.isReadOnly()) {
- createLabel(timeComposite, attribute);
- estimateText = createTextField(timeComposite, attribute, SWT.FLAT);
- estimateText.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
- }
-
- Label label = toolkit.createLabel(timeComposite, "Current Estimate:");
- label.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
- float total = 0;
- try {
- total = (Float.parseFloat(taskData.getAttributeValue(BugzillaAttribute.ACTUAL_TIME.getKey())) + Float.parseFloat(taskData.getAttributeValue(BugzillaAttribute.REMAINING_TIME.getKey())));
- } catch (Exception e) {
- // ignore likely NumberFormatException
- }
-
- Text currentEstimate = toolkit.createText(timeComposite, "" + total);
- currentEstimate.setFont(TEXT_FONT);
- currentEstimate.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
- currentEstimate.setEditable(false);
-
- attribute = this.taskData.getAttribute(BugzillaAttribute.ACTUAL_TIME.getKey());
- if (attribute != null) {
-
- createLabel(timeComposite, attribute);
- Text actualText = createTextField(timeComposite, attribute, SWT.FLAT);
- actualText.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
- actualText.setEditable(false);
- }
-
- // Add Time
- taskData.setAttributeValue(BugzillaAttribute.WORK_TIME.getKey(), "0");
- final RepositoryTaskAttribute addTimeAttribute = this.taskData.getAttribute(BugzillaAttribute.WORK_TIME.getKey());
- if (addTimeAttribute != null) {
-
- createLabel(timeComposite, addTimeAttribute);
- addTimeText = toolkit.createText(timeComposite,
- taskData.getAttributeValue(BugzillaAttribute.WORK_TIME.getKey()), SWT.BORDER);
- addTimeText.setFont(TEXT_FONT);
- addTimeText.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
- addTimeText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- addTimeAttribute.setValue(addTimeText.getText());
- attributeChanged(addTimeAttribute);
- }
- });
- }
- attribute = this.taskData.getAttribute(BugzillaAttribute.REMAINING_TIME.getKey());
- if (attribute != null) {
- createLabel(timeComposite, attribute);
- createTextField(timeComposite, attribute, SWT.FLAT);
- }
-
- attribute = this.taskData.getAttribute(BugzillaAttribute.DEADLINE.getKey());
- if (attribute != null) {
- createLabel(timeComposite, attribute);
-
- Composite dateWithClear = toolkit.createComposite(timeComposite);
- GridLayout layout = new GridLayout(2, false);
- layout.marginWidth = 1;
- dateWithClear.setLayout(layout);
-
- deadlinePicker = new DatePicker(dateWithClear, /* SWT.NONE */SWT.BORDER,
- taskData.getAttributeValue(BugzillaAttribute.DEADLINE.getKey()), false, 0);
- deadlinePicker.setFont(TEXT_FONT);
- deadlinePicker.setDatePattern("yyyy-MM-dd");
- if (hasChanged(attribute)) {
- deadlinePicker.setBackground(getColorIncoming());
- }
- deadlinePicker.addPickerSelectionListener(new SelectionListener() {
-
- public void widgetDefaultSelected(SelectionEvent e) {
- // ignore
- }
-
- public void widgetSelected(SelectionEvent e) {
- Calendar cal = deadlinePicker.getDate();
- if (cal != null) {
- Date d = cal.getTime();
- SimpleDateFormat f = (SimpleDateFormat) DateFormat.getDateInstance();
- f.applyPattern("yyyy-MM-dd");
-
- taskData.setAttributeValue(BugzillaAttribute.DEADLINE.getKey(), f.format(d));
- attributeChanged(taskData.getAttribute(BugzillaAttribute.DEADLINE.getKey()));
- // TODO goes dirty even if user presses cancel
- // markDirty(true);
- } else {
- taskData.setAttributeValue(BugzillaAttribute.DEADLINE.getKey(), "");
- attributeChanged(taskData.getAttribute(BugzillaAttribute.DEADLINE.getKey()));
- deadlinePicker.setDate(null);
- }
- }
- });
-
- ImageHyperlink clearDeadlineDate = toolkit.createImageHyperlink(dateWithClear, SWT.NONE);
- clearDeadlineDate.setImage(CommonImages.getImage(CommonImages.REMOVE));
- clearDeadlineDate.setToolTipText("Clear");
- clearDeadlineDate.addHyperlinkListener(new HyperlinkAdapter() {
-
- @Override
- public void linkActivated(HyperlinkEvent e) {
- taskData.setAttributeValue(BugzillaAttribute.DEADLINE.getKey(), "");
- attributeChanged(taskData.getAttribute(BugzillaAttribute.DEADLINE.getKey()));
- deadlinePicker.setDate(null);
- }
- });
-
- }
-
- timeSection.setClient(timeComposite);
- }
-
- protected void addKeywordsList(Composite attributesComposite) throws IOException {
- // newLayout(attributesComposite, 1, "Keywords:", PROPERTY);
- final RepositoryTaskAttribute attribute = taskData.getAttribute(RepositoryTaskAttribute.KEYWORDS);
- if (attribute == null) {
- return;
- }
- Label label = createLabel(attributesComposite, attribute);
- GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(label);
-
- // toolkit.createText(attributesComposite, keywords)
- keywordsText = createTextField(attributesComposite, attribute, SWT.FLAT);
- keywordsText.setFont(TEXT_FONT);
- GridData keywordsData = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- keywordsData.horizontalSpan = 2;
- keywordsData.widthHint = 200;
- keywordsText.setLayoutData(keywordsData);
-
- Button changeKeywordsButton = getManagedForm().getToolkit().createButton(attributesComposite, "Edit...",
- SWT.FLAT);
- GridData keyWordsButtonData = new GridData();
- changeKeywordsButton.setLayoutData(keyWordsButtonData);
- changeKeywordsButton.addSelectionListener(new SelectionListener() {
-
- public void widgetDefaultSelected(SelectionEvent e) {
- }
-
- public void widgetSelected(SelectionEvent e) {
-
- String keywords = attribute.getValue();
-
- Shell shell = null;
- if (PlatformUI.getWorkbench().getActiveWorkbenchWindow() != null) {
- shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- } else {
- shell = new Shell(PlatformUI.getWorkbench().getDisplay());
- }
-
- List<String> validKeywords = new ArrayList<String>();
- try {
- validKeywords = BugzillaCorePlugin.getRepositoryConfiguration(repository, false,
- new NullProgressMonitor()).getKeywords();
- } catch (Exception ex) {
- // ignore
- }
-
- KeywordsDialog keywordsDialog = new KeywordsDialog(shell, keywords, validKeywords);
- int responseCode = keywordsDialog.open();
-
- String newKeywords = keywordsDialog.getSelectedKeywordsString();
- if (responseCode == Window.OK && keywords != null) {
- keywordsText.setText(newKeywords);
- attribute.setValue(newKeywords);
- attributeChanged(attribute);
- } else {
- return;
- }
-
- }
-
- });
- }
-
- protected void addVoting(Composite attributesComposite) {
- Label label = getManagedForm().getToolkit().createLabel(attributesComposite, "Votes:");
- label.setForeground(getManagedForm().getToolkit().getColors().getColor(IFormColors.TITLE));
- GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(label);
- Composite votingComposite = getManagedForm().getToolkit().createComposite(attributesComposite);
- GridLayout layout = new GridLayout(3, false);
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- votingComposite.setLayout(layout);
-
- RepositoryTaskAttribute votesAttribute = taskData.getAttribute(BugzillaAttribute.VOTES.getKey());
-
- votesText = createTextField(votingComposite, votesAttribute, SWT.FLAT | SWT.READ_ONLY);
- votesText.setFont(TEXT_FONT);
- GridDataFactory.fillDefaults().minSize(30, SWT.DEFAULT).hint(30, SWT.DEFAULT).applyTo(votesText);
-
- if (votesAttribute != null && hasChanged(votesAttribute)) {
- votesText.setBackground(getColorIncoming());
- }
- votesText.setEditable(false);
-
- Hyperlink showVotesHyperlink = getManagedForm().getToolkit().createHyperlink(votingComposite, "Show votes",
- SWT.NONE);
- showVotesHyperlink.addHyperlinkListener(new HyperlinkAdapter() {
- @Override
- public void linkActivated(HyperlinkEvent e) {
- if (BugzillaTaskEditor.this.getEditor() instanceof TaskEditor) {
- TasksUiUtil.openUrl(repository.getRepositoryUrl() + IBugzillaConstants.URL_SHOW_VOTES
- + taskData.getTaskId());
- }
- }
- });
-
- Hyperlink voteHyperlink = getManagedForm().getToolkit().createHyperlink(votingComposite, "Vote", SWT.NONE);
- voteHyperlink.addHyperlinkListener(new HyperlinkAdapter() {
- @Override
- public void linkActivated(HyperlinkEvent e) {
- if (BugzillaTaskEditor.this.getEditor() instanceof TaskEditor) {
- TasksUiUtil.openUrl(repository.getRepositoryUrl() + IBugzillaConstants.URL_VOTE
- + taskData.getTaskId());
- }
- }
- });
- }
-
- @Override
- protected void validateInput() {
-
- }
-
- @Override
- protected String getHistoryUrl() {
- if (repository != null && taskData != null) {
- return repository.getRepositoryUrl() + IBugzillaConstants.URL_BUG_ACTIVITY + taskData.getTaskId();
- } else {
- return null;
- }
- }
-
- /**
- * @author Frank Becker (bug 198027) FIXME: A lot of duplicated code here between this and NewBugzillataskEditor
- */
- @Override
- protected void addAssignedTo(Composite peopleComposite) {
- RepositoryTaskAttribute assignedAttribute = taskData.getAttribute(RepositoryTaskAttribute.USER_ASSIGNED);
- if (assignedAttribute != null) {
- String bugzillaVersion;
- try {
- bugzillaVersion = BugzillaCorePlugin.getRepositoryConfiguration(repository, false,
- new NullProgressMonitor()).getInstallVersion();
- } catch (CoreException e1) {
- // ignore
- bugzillaVersion = "2.18";
- }
- if (bugzillaVersion.compareTo("3.1") < 0) {
- // old bugzilla workflow is used
- super.addAssignedTo(peopleComposite);
- return;
- }
- Label label = createLabel(peopleComposite, assignedAttribute);
- GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(label);
- assignedTo = createTextField(peopleComposite, assignedAttribute, SWT.FLAT);
- GridDataFactory.fillDefaults().hint(150, SWT.DEFAULT).applyTo(assignedTo);
- assignedTo.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- String sel = assignedTo.getText();
- RepositoryTaskAttribute a = taskData.getAttribute(RepositoryTaskAttribute.USER_ASSIGNED);
- if (!(a.getValue().equals(sel))) {
- a.setValue(sel);
- markDirty(true);
- }
- }
- });
- ContentAssistCommandAdapter adapter = applyContentAssist(assignedTo,
- createContentProposalProvider(assignedAttribute));
- ILabelProvider propsalLabelProvider = createProposalLabelProvider(assignedAttribute);
- if (propsalLabelProvider != null) {
- adapter.setLabelProvider(propsalLabelProvider);
- }
- adapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
-
- FormToolkit toolkit = getManagedForm().getToolkit();
- Label dummylabel = toolkit.createLabel(peopleComposite, "");
- GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(dummylabel);
- RepositoryTaskAttribute attribute = taskData.getAttribute(BugzillaAttribute.SET_DEFAULT_ASSIGNEE.getKey());
- if (attribute == null) {
- taskData.setAttributeValue(BugzillaAttribute.SET_DEFAULT_ASSIGNEE.getKey(), "0");
- attribute = taskData.getAttribute(BugzillaAttribute.SET_DEFAULT_ASSIGNEE.getKey());
- }
- addButtonField(peopleComposite, attribute, SWT.CHECK);
- }
- }
-
- @Override
- protected boolean attributeChanged(RepositoryTaskAttribute attribute) {
- if (attribute == null) {
- return false;
- }
-
- // Support comment wrapping for bugzilla 2.18
- if (attribute.getId().equals(BugzillaAttribute.NEW_COMMENT.getKey())) {
- if (repository.getVersion().startsWith("2.18")) {
- attribute.setValue(BugzillaUiPlugin.formatTextToLineWrap(attribute.getValue(), true));
- }
- }
- return super.attributeChanged(attribute);
- }
-
- @Override
- protected void addSelfToCC(Composite composite) {
-
- // XXX: Work around for adding QAContact to People section. Update once bug#179254 is complete
- boolean haveRealName = false;
- RepositoryTaskAttribute qaContact = taskData.getAttribute(BugzillaAttribute.QA_CONTACT_NAME.getKey());
- if (qaContact == null) {
- qaContact = taskData.getAttribute(BugzillaAttribute.QA_CONTACT.getKey());
- } else {
- haveRealName = true;
- }
- if (qaContact != null) {
- Label label = createLabel(composite, qaContact);
- GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(label);
- Text textField;
- if (qaContact.isReadOnly()) {
- textField = createTextField(composite, qaContact, SWT.FLAT | SWT.READ_ONLY);
- } else {
- textField = createTextField(composite, qaContact, SWT.FLAT);
- ContentAssistCommandAdapter adapter = applyContentAssist(textField,
- createContentProposalProvider(qaContact));
- ILabelProvider propsalLabelProvider = createProposalLabelProvider(qaContact);
- if (propsalLabelProvider != null) {
- adapter.setLabelProvider(propsalLabelProvider);
- }
- adapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
- }
- GridDataFactory.fillDefaults().grab(true, false).applyTo(textField);
- if (haveRealName) {
- textField.setText(textField.getText() + " <"
- + taskData.getAttributeValue(BugzillaAttribute.QA_CONTACT.getKey()) + ">");
- }
- }
-
- super.addSelfToCC(composite);
-
- }
-
-}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPage.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPage.java
deleted file mode 100644
index 4887e9d9c..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPage.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.ui.editor;
-
-import java.util.Set;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin;
-import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.mylyn.tasks.core.data.TaskDataModel;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractAttributeEditor;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPage;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPart;
-import org.eclipse.mylyn.tasks.ui.editors.AttributeEditorFactory;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditorInput;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditorPartDescriptor;
-
-/**
- * @author Rob Elves
- * @since 3.0
- */
-public class BugzillaTaskEditorPage extends AbstractTaskEditorPage {
-
- public BugzillaTaskEditorPage(TaskEditor editor) {
- super(editor, BugzillaCorePlugin.CONNECTOR_KIND);
- }
-
- @Override
- protected Set<TaskEditorPartDescriptor> createPartDescriptors() {
- Set<TaskEditorPartDescriptor> descriptors = super.createPartDescriptors();
-
- // remove unnecessary default editor parts
- for (TaskEditorPartDescriptor taskEditorPartDescriptor : descriptors) {
- if (taskEditorPartDescriptor.getId().equals(ID_PART_PEOPLE)) {
- descriptors.remove(taskEditorPartDescriptor);
- break;
- }
- }
-
- // Add the updated Bugzilla people part
- descriptors.add(new TaskEditorPartDescriptor(ID_PART_PEOPLE) {
- @Override
- public AbstractTaskEditorPart createPart() {
- return new BugzillaPeoplePart();
- }
- }.setPath(PATH_PEOPLE));
-
- return descriptors;
- }
-
- @Override
- protected AttributeEditorFactory createAttributeEditorFactory() {
- AttributeEditorFactory factory = new AttributeEditorFactory(getModel(), getTaskRepository()) {
- @Override
- public AbstractAttributeEditor createEditor(String type, TaskAttribute taskAttribute) {
- AbstractAttributeEditor editor;
- if (IBugzillaConstants.EDITOR_TYPE_KEYWORDS.equals(type)) {
- editor = new BugzillaKeywordAttributeEditor(getModel(), taskAttribute);
- } else if (IBugzillaConstants.EDITOR_TYPE_REMOVECC.equals(type)) {
- editor = new BugzillaCcAttributeEditor(getModel(), taskAttribute);
- } else {
- editor = super.createEditor(type, taskAttribute);
- if (TaskAttribute.TYPE_BOOLEAN.equals(type)) {
- editor.setDecorationEnabled(false);
- }
- }
-
- return editor;
- }
- };
- return factory;
- }
-
- @Override
- protected TaskDataModel createModel(TaskEditorInput input) throws CoreException {
- TaskDataModel model = super.createModel(input);
- if (model.getTaskData().isNew()) {
- TaskAttribute attrDescription = model.getTaskData().getRoot().getMappedAttribute(TaskAttribute.DESCRIPTION);
- if (attrDescription != null) {
- attrDescription.getMetaData().setReadOnly(false);
- }
- TaskAttribute attrOwner = model.getTaskData().getRoot().getMappedAttribute(TaskAttribute.USER_ASSIGNED);
- if (attrOwner != null) {
- attrOwner.getMetaData().setReadOnly(false);
- }
- TaskAttribute attrAddSelfToCc = model.getTaskData().getRoot().getMappedAttribute(TaskAttribute.ADD_SELF_CC);
- if (attrAddSelfToCc != null) {
- attrAddSelfToCc.getMetaData().setKind(null);
- }
- }
- return model;
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPageFactory.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPageFactory.java
deleted file mode 100644
index 415f022df..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPageFactory.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.ui.editor;
-
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.tasks.ui.ITasksUiConstants;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPageFactory;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditorInput;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.forms.editor.FormPage;
-
-/**
- * @author Rob Elves
- */
-public class BugzillaTaskEditorPageFactory extends AbstractTaskEditorPageFactory {
-
- @Override
- public boolean canCreatePageFor(TaskEditorInput input) {
- if (input.getTask().getConnectorKind().equals(BugzillaCorePlugin.CONNECTOR_KIND)
- || TasksUiUtil.isOutgoingNewTask(input.getTask(), BugzillaCorePlugin.CONNECTOR_KIND)) {
- return true;
- }
- return false;
- }
-
- @Override
- public FormPage createPage(TaskEditor parentEditor) {
- return new BugzillaTaskEditorPage(parentEditor);
- }
-
- @Override
- public String[] getConflictingIds(TaskEditorInput input) {
- if (!input.getTask().getConnectorKind().equals(BugzillaCorePlugin.CONNECTOR_KIND)) {
- return new String[] { ITasksUiConstants.ID_PAGE_PLANNING };
- }
- return null;
- }
-
- @Override
- public int getPriority() {
- return PRIORITY_TASK;
- }
-
- @Override
- public Image getPageImage() {
- return CommonImages.getImage(TasksUiImages.REPOSITORY);
- }
-
- @Override
- public String getPageText() {
- return "Bugzilla";
- }
-
-}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/DummySearchHitProvider.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/DummySearchHitProvider.java
deleted file mode 100644
index 419ab24a6..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/DummySearchHitProvider.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.ui.editor;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.ITaskList;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.ITaskFactory;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.QueryHitCollector;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-
-public class DummySearchHitProvider extends QueryHitCollector {
-
- public DummySearchHitProvider(ITaskList tasklist) {
- super(new ITaskFactory() {
-
- public AbstractTask createTask(RepositoryTaskData taskData, IProgressMonitor monitor) throws CoreException {
- return null;
- }
- });
- // ignore
- }
-
-}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/KeywordsDialog.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/KeywordsDialog.java
deleted file mode 100644
index a94a778a8..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/KeywordsDialog.java
+++ /dev/null
@@ -1,153 +0,0 @@
-package org.eclipse.mylyn.internal.bugzilla.ui.editor;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.StringTokenizer;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.CheckboxTableViewer;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * @author Shawn Minto
- */
-public class KeywordsDialog extends Dialog {
-
- private final List<String> selectedKeywords;
-
- private final List<String> validKeywords;
-
- private CheckboxTableViewer keyWordsList;
-
- public KeywordsDialog(Shell shell, String selectedKeywords, java.util.List<String> validKeywords) {
- super(shell);
- setShellStyle(getShellStyle() | SWT.RESIZE);
- StringTokenizer st = new StringTokenizer(selectedKeywords, ",", false);
- this.selectedKeywords = new ArrayList<String>();
- while (st.hasMoreTokens()) {
- String s = st.nextToken().trim();
- this.selectedKeywords.add(s);
- }
-
- this.validKeywords = validKeywords;
- }
-
- @Override
- protected Control createDialogArea(Composite parent) {
- getShell().setText("Select Keywords");
-
- Composite composite = new Composite(parent, SWT.NONE);
- composite.setLayout(new GridLayout());
- GridData gd = new GridData(GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL | GridData.FILL_BOTH);
- composite.setLayoutData(gd);
-
- keyWordsList = CheckboxTableViewer.newCheckList(composite, SWT.MULTI | SWT.V_SCROLL | SWT.BORDER);
- GridData keyWordsTextData = new GridData(GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL | GridData.FILL_BOTH);
- keyWordsTextData.heightHint = 175;
- keyWordsTextData.widthHint = 160;
- keyWordsList.getTable().setLayoutData(keyWordsTextData);
-
- if (validKeywords != null) {
-
- keyWordsList.setContentProvider(new ITreeContentProvider() {
-
- public Object[] getChildren(Object parentElement) {
- if (parentElement instanceof Collection) {
- return ((Collection<?>) parentElement).toArray();
- }
- return null;
- }
-
- public Object getParent(Object element) {
- // TODO Auto-generated method stub
- return null;
- }
-
- public boolean hasChildren(Object element) {
- // TODO Auto-generated method stub
- return false;
- }
-
- public Object[] getElements(Object inputElement) {
- return getChildren(inputElement);
- }
-
- public void dispose() {
- // TODO Auto-generated method stub
-
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- // TODO Auto-generated method stub
-
- }
-
- });
-
- Set<String> invalidKeywords = new HashSet<String>();
-
- keyWordsList.setInput(validKeywords);
-
- for (String keyword : selectedKeywords) {
- if (!keyWordsList.setChecked(keyword, true)) {
- invalidKeywords.add(keyword);
- }
- }
-
- selectedKeywords.removeAll(invalidKeywords);
-
- }
-
- keyWordsList.addCheckStateListener(new KeywordListener());
-
- parent.pack();
-
- return composite;
- }
-
- protected class KeywordListener implements ICheckStateListener {
-
- public void checkStateChanged(CheckStateChangedEvent event) {
- if (event.getChecked()) {
- selectedKeywords.add((String) event.getElement());
- } else {
- selectedKeywords.remove(event.getElement());
- }
- }
-
- }
-
- public List<String> getSelectedKeywords() {
- return selectedKeywords;
- }
-
- public String getSelectedKeywordsString() {
- StringBuffer keywords = new StringBuffer();
-
- for (String sel : selectedKeywords) {
- keywords.append(sel);
- keywords.append(",");
- }
-
- String keywordsString = keywords.toString();
-
- if (keywordsString.endsWith(",")) {
- keywordsString = keywordsString.substring(0, keywordsString.length() - 1);
- }
-
- return keywordsString;
- }
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/NewBugzillaTaskEditor.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/NewBugzillaTaskEditor.java
deleted file mode 100644
index a88a5c1d0..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/NewBugzillaTaskEditor.java
+++ /dev/null
@@ -1,248 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.bugzilla.ui.editor;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.fieldassist.ContentProposalAdapter;
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaAttribute;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin;
-import org.eclipse.mylyn.internal.bugzilla.ui.BugzillaUiPlugin;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskAttribute;
-import org.eclipse.mylyn.internal.tasks.ui.deprecated.AbstractNewRepositoryTaskEditor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.fieldassist.ContentAssistCommandAdapter;
-import org.eclipse.ui.forms.editor.FormEditor;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-import org.eclipse.ui.forms.widgets.Section;
-
-/**
- * An editor used to view a locally created bug that does not yet exist on a repository.
- *
- * @author Rob Elves
- */
-public class NewBugzillaTaskEditor extends AbstractNewRepositoryTaskEditor {
-
- protected Text assignedTo;
-
- public NewBugzillaTaskEditor(FormEditor editor) {
- super(editor);
- }
-
- @Override
- public void init(IEditorSite site, IEditorInput input) {
- super.init(site, input);
-
- setExpandAttributeSection(true);
- }
-
- @Override
- protected void saveTaskOffline(IProgressMonitor progressMonitor) {
- String text = descriptionTextViewer.getTextWidget().getText();
- if (repository.getVersion().startsWith("2.18")) {
- text = BugzillaUiPlugin.formatTextToLineWrap(text, true);
- descriptionTextViewer.getTextWidget().setText(text);
- }
- super.saveTaskOffline(progressMonitor);
- }
-
- @Override
- protected void createPeopleLayout(Composite composite) {
- FormToolkit toolkit = getManagedForm().getToolkit();
- Section peopleSection = createSection(composite, getSectionLabel(SECTION_NAME.PEOPLE_SECTION));
- GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL).grab(true, true).applyTo(peopleSection);
- Composite peopleComposite = toolkit.createComposite(peopleSection);
- GridLayout layout = new GridLayout(2, false);
- layout.marginRight = 5;
- peopleComposite.setLayout(layout);
- GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL).grab(true, true).applyTo(peopleComposite);
-
- addAssignedTo(peopleComposite);
- //addSelfToCC(peopleComposite);
- addCCList(peopleComposite);
- getManagedForm().getToolkit().paintBordersFor(peopleComposite);
- peopleSection.setClient(peopleComposite);
- peopleSection.setEnabled(true);
- }
-
- @Override
- public void submitToRepository() {
- if (summaryText.getText().equals("")) {
- MessageDialog.openInformation(this.getSite().getShell(), "Submit Error",
- "Please provide a brief summary with new reports.");
- summaryText.setFocus();
- return;
- } else if (descriptionTextViewer.getTextWidget().getText().equals("")) {
- MessageDialog.openInformation(this.getSite().getShell(), "Submit Error",
- "Please proved a detailed description with new reports");
- descriptionTextViewer.getTextWidget().setFocus();
- return;
- }
- RepositoryTaskAttribute attribute = taskData.getAttribute(BugzillaAttribute.COMPONENT.getKey());
- String componentValue = attribute.getValue();
- if (componentValue.equals("")) {
- MessageDialog.openInformation(this.getSite().getShell(), "Submit Error",
- "Please select a component with new reports");
- descriptionTextViewer.getTextWidget().setFocus();
- return;
- }
- super.submitToRepository();
- }
-
- @Override
- protected void createCustomAttributeLayout(Composite composite) {
-
- RepositoryTaskAttribute attribute = this.taskData.getAttribute(BugzillaAttribute.DEPENDSON.getKey());
- if (attribute != null && !attribute.isReadOnly()) {
- Label label = createLabel(composite, attribute);
- GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(label);
- Composite textFieldComposite = getManagedForm().getToolkit().createComposite(composite);
- GridLayout textLayout = new GridLayout();
- textLayout.marginWidth = 1;
- textLayout.marginHeight = 3;
- textLayout.verticalSpacing = 3;
- textFieldComposite.setLayout(textLayout);
- GridData textData = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- textData.horizontalSpan = 1;
- textData.widthHint = 135;
-
- final Text text = createTextField(textFieldComposite, attribute, SWT.FLAT);
- text.setLayoutData(textData);
- getManagedForm().getToolkit().paintBordersFor(textFieldComposite);
- }
-
- attribute = this.taskData.getAttribute(BugzillaAttribute.BLOCKED.getKey());
- if (attribute != null && !attribute.isReadOnly()) {
- Label label = createLabel(composite, attribute);
- GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(label);
- Composite textFieldComposite = getManagedForm().getToolkit().createComposite(composite);
- GridLayout textLayout = new GridLayout();
- textLayout.marginWidth = 1;
- textLayout.marginHeight = 3;
- textLayout.verticalSpacing = 3;
- textFieldComposite.setLayout(textLayout);
- GridData textData = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- textData.horizontalSpan = 1;
- textData.widthHint = 135;
- final Text text = createTextField(textFieldComposite, attribute, SWT.FLAT);
- text.setLayoutData(textData);
- getManagedForm().getToolkit().paintBordersFor(textFieldComposite);
- }
- }
-
- @Override
- protected boolean hasContentAssist(RepositoryTaskAttribute attribute) {
- return BugzillaAttribute.NEWCC.getKey().equals(attribute.getId());
- }
-
- /**
- * FIXME: A lot of duplicated code here between this and BugzillaTaskEditor
- */
- @Override
- protected void addAssignedTo(Composite peopleComposite) {
- RepositoryTaskAttribute assignedAttribute = taskData.getAttribute(RepositoryTaskAttribute.USER_ASSIGNED);
- if (assignedAttribute != null) {
- String bugzillaVersion;
- try {
- bugzillaVersion = BugzillaCorePlugin.getRepositoryConfiguration(repository, false,
- new NullProgressMonitor()).getInstallVersion();
- } catch (CoreException e1) {
- // ignore
- bugzillaVersion = "2.18";
- }
- if (bugzillaVersion.compareTo("3.1") < 0) {
- // old bugzilla workflow is used
- super.addAssignedTo(peopleComposite);
- return;
- }
- Label label = createLabel(peopleComposite, assignedAttribute);
- GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(label);
- if (assignedAttribute.isReadOnly()) {
- assignedTo = createTextField(peopleComposite, assignedAttribute, SWT.FLAT | SWT.READ_ONLY);
- } else {
- assignedTo = createTextField(peopleComposite, assignedAttribute, SWT.FLAT);
- }
- GridDataFactory.fillDefaults().hint(150, SWT.DEFAULT).applyTo(assignedTo);
- assignedTo.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- String sel = assignedTo.getText();
- RepositoryTaskAttribute a = taskData.getAttribute(RepositoryTaskAttribute.USER_ASSIGNED);
- if (!(a.getValue().equals(sel))) {
- a.setValue(sel);
- markDirty(true);
- }
- }
- });
- ContentAssistCommandAdapter adapter = applyContentAssist(assignedTo,
- createContentProposalProvider(assignedAttribute));
- ILabelProvider propsalLabelProvider = createProposalLabelProvider(assignedAttribute);
- if (propsalLabelProvider != null) {
- adapter.setLabelProvider(propsalLabelProvider);
- }
- adapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
-
- FormToolkit toolkit = getManagedForm().getToolkit();
- Label dummylabel = toolkit.createLabel(peopleComposite, "");
- GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(dummylabel);
- RepositoryTaskAttribute attribute = taskData.getAttribute(BugzillaAttribute.SET_DEFAULT_ASSIGNEE.getKey());
- if (attribute == null) {
- taskData.setAttributeValue(BugzillaAttribute.SET_DEFAULT_ASSIGNEE.getKey(), "0");
- attribute = taskData.getAttribute(BugzillaAttribute.SET_DEFAULT_ASSIGNEE.getKey());
- }
- addButtonField(peopleComposite, attribute, SWT.CHECK);
- }
- }
-
- private Button addButtonField(Composite rolesComposite, RepositoryTaskAttribute attribute, int style) {
- if (attribute == null) {
- return null;
- }
- String name = attribute.getName();
- if (hasOutgoingChange(attribute)) {
- name += "*";
- }
-
- final Button button = getManagedForm().getToolkit().createButton(rolesComposite, name, style);
- if (!attribute.isReadOnly()) {
- button.setData(attribute);
- button.setSelection(attribute.getValue().equals("1"));
- button.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
- button.addSelectionListener(new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- String sel = "1";
- if (!button.getSelection()) {
- sel = "0";
- }
- RepositoryTaskAttribute a = (RepositoryTaskAttribute) button.getData();
- a.setValue(sel);
- attributeChanged(a);
- }
- });
- }
- return button;
- }
-
-}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java
deleted file mode 100644
index 781f9c490..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java
+++ /dev/null
@@ -1,1925 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.bugzilla.ui.search;
-
-import java.io.UnsupportedEncodingException;
-import java.lang.reflect.InvocationTargetException;
-import java.net.URLDecoder;
-import java.net.URLEncoder;
-import java.util.ArrayList;
-import java.util.Arrays;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.fieldassist.ComboContentAdapter;
-import org.eclipse.jface.fieldassist.ContentProposalAdapter;
-import org.eclipse.jface.fieldassist.ControlDecoration;
-import org.eclipse.jface.fieldassist.FieldDecoration;
-import org.eclipse.jface.fieldassist.FieldDecorationRegistry;
-import org.eclipse.jface.fieldassist.IContentProposalProvider;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.window.Window;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin;
-import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants;
-import org.eclipse.mylyn.internal.bugzilla.core.RepositoryConfiguration;
-import org.eclipse.mylyn.internal.bugzilla.ui.BugzillaUiPlugin;
-import org.eclipse.mylyn.internal.bugzilla.ui.editor.KeywordsDialog;
-import org.eclipse.mylyn.internal.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.internal.tasks.ui.PersonProposalLabelProvider;
-import org.eclipse.mylyn.internal.tasks.ui.PersonProposalProvider;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.util.WebBrowserDialog;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.RepositoryStatus;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.wizards.AbstractRepositoryQueryPage;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.SashForm;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.List;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.fieldassist.ContentAssistCommandAdapter;
-import org.eclipse.ui.internal.help.WorkbenchHelpSystem;
-import org.eclipse.ui.keys.IBindingService;
-import org.eclipse.ui.progress.IProgressService;
-
-/**
- * Bugzilla search page
- *
- * @author Mik Kersten (hardening of prototype)
- * @author Frank Becker
- */
-public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements Listener {
-
- private static final int LABEL_WIDTH = 58;
-
- private static final String NUM_DAYS_POSITIVE = "Number of days must be a positive integer. ";
-
- private static final String TITLE_BUGZILLA_QUERY = "Bugzilla Query";
-
- private static final int HEIGHT_ATTRIBUTE_COMBO = 70;
-
- // protected Combo repositoryCombo = null;
-
- private static ArrayList<BugzillaSearchData> previousSummaryPatterns = new ArrayList<BugzillaSearchData>(20);
-
- private static ArrayList<BugzillaSearchData> previousEmailPatterns = new ArrayList<BugzillaSearchData>(20);
-
- private static ArrayList<BugzillaSearchData> previousEmailPatterns2 = new ArrayList<BugzillaSearchData>(20);
-
- private static ArrayList<BugzillaSearchData> previousCommentPatterns = new ArrayList<BugzillaSearchData>(20);
-
- private static ArrayList<BugzillaSearchData> previousKeywords = new ArrayList<BugzillaSearchData>(20);
-
- private boolean firstTime = true;
-
- private IDialogSettings fDialogSettings;
-
- private static final String[] patternOperationText = { "all words", "any word", "regexp", "notregexp" };
-
- private static final String[] patternOperationValues = { "allwordssubstr", "anywordssubstr", "regexp", "notregexp" };
-
- private static final String[] emailOperationText = { "substring", "exact", "regexp", "notregexp" };
-
- private static final String[] emailOperationValues = { "substring", "exact", "regexp", "notregexp" };
-
- private static final String[] keywordOperationText = { "all", "any", "none" };
-
- private static final String[] keywordOperationValues = { "allwords", "anywords", "nowords" };
-
- private static final String[] emailRoleValues = { "emailassigned_to1", "emailreporter1", "emailcc1",
- "emaillongdesc1" };
-
- private static final String[] emailRoleValues2 = { "emailassigned_to2", "emailreporter2", "emailcc2",
- "emaillongdesc2" };
-
- private IRepositoryQuery originalQuery = null;
-
- protected boolean restoring = false;
-
- private boolean restoreQueryOptions = true;
-
- protected Combo summaryPattern;
-
- protected Combo summaryOperation;
-
- protected List product;
-
- protected List os;
-
- protected List hardware;
-
- protected List priority;
-
- protected List severity;
-
- protected List resolution;
-
- protected List status;
-
- protected Combo commentOperation;
-
- protected Combo commentPattern;
-
- protected List component;
-
- protected List version;
-
- protected List target;
-
- protected Combo emailOperation;
-
- protected Combo emailOperation2;
-
- protected Combo emailPattern;
-
- protected Combo emailPattern2;
-
- protected Button[] emailButtons;
-
- protected Button[] emailButtons2;
-
- private Combo keywords;
-
- private Combo keywordsOperation;
-
- protected Text daysText;
-
- // /** File containing saved queries */
- // protected static SavedQueryFile input;
-
- // /** "Remember query" button */
- // protected Button saveButton;
-
- // /** "Saved queries..." button */
- // protected Button loadButton;
-
- // /** Run a remembered query */
- // protected boolean rememberedQuery = false;
-
- /** Index of the saved query to run */
- protected int selIndex;
-
- // --------------- Configuration handling --------------
-
- // Dialog store taskId constants
- protected final static String PAGE_NAME = "BugzillaSearchPage"; //$NON-NLS-1$
-
- private static final String STORE_PRODUCT_ID = PAGE_NAME + ".PRODUCT";
-
- private static final String STORE_COMPONENT_ID = PAGE_NAME + ".COMPONENT";
-
- private static final String STORE_VERSION_ID = PAGE_NAME + ".VERSION";
-
- private static final String STORE_MSTONE_ID = PAGE_NAME + ".MILESTONE";
-
- private static final String STORE_STATUS_ID = PAGE_NAME + ".STATUS";
-
- private static final String STORE_RESOLUTION_ID = PAGE_NAME + ".RESOLUTION";
-
- private static final String STORE_SEVERITY_ID = PAGE_NAME + ".SEVERITY";
-
- private static final String STORE_PRIORITY_ID = PAGE_NAME + ".PRIORITY";
-
- private static final String STORE_HARDWARE_ID = PAGE_NAME + ".HARDWARE";
-
- private static final String STORE_OS_ID = PAGE_NAME + ".OS";
-
- private static final String STORE_SUMMARYMATCH_ID = PAGE_NAME + ".SUMMARYMATCH";
-
- private static final String STORE_COMMENTMATCH_ID = PAGE_NAME + ".COMMENTMATCH";
-
- private static final String STORE_EMAILMATCH_ID = PAGE_NAME + ".EMAILMATCH";
-
- private static final String STORE_EMAIL2MATCH_ID = PAGE_NAME + ".EMAIL2MATCH";
-
- private static final String STORE_EMAILBUTTON_ID = PAGE_NAME + ".EMAILATTR";
-
- private static final String STORE_EMAIL2BUTTON_ID = PAGE_NAME + ".EMAIL2ATTR";
-
- private static final String STORE_SUMMARYTEXT_ID = PAGE_NAME + ".SUMMARYTEXT";
-
- private static final String STORE_COMMENTTEXT_ID = PAGE_NAME + ".COMMENTTEXT";
-
- private static final String STORE_EMAILADDRESS_ID = PAGE_NAME + ".EMAILADDRESS";
-
- private static final String STORE_EMAIL2ADDRESS_ID = PAGE_NAME + ".EMAIL2ADDRESS";
-
- private static final String STORE_KEYWORDS_ID = PAGE_NAME + ".KEYWORDS";
-
- private static final String STORE_KEYWORDSMATCH_ID = PAGE_NAME + ".KEYWORDSMATCH";
-
- // private static final String STORE_REPO_ID = PAGE_NAME + ".REPO";
-
- private RepositoryConfiguration repositoryConfiguration;
-
- private final SelectionAdapter updateActionSelectionAdapter = new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (isControlCreated()) {
- setPageComplete(isPageComplete());
- }
- }
- };
-
- private Text queryTitle;
-
- private final class ModifyListenerImplementation implements ModifyListener {
- public void modifyText(ModifyEvent e) {
- if (isControlCreated()) {
- setPageComplete(isPageComplete());
- }
- }
- }
-
- @Override
- public void setPageComplete(boolean complete) {
- super.setPageComplete(complete);
- if (getSearchContainer() != null) {
- getSearchContainer().setPerformActionEnabled(complete);
- }
- }
-
- private static class BugzillaSearchData {
- /** Pattern to match on */
- String pattern;
-
- /** Pattern matching criterion */
- int operation;
-
- BugzillaSearchData(String pattern, int operation) {
- this.pattern = pattern;
- this.operation = operation;
- }
- }
-
- public BugzillaSearchPage(TaskRepository repository) {
- super(TITLE_BUGZILLA_QUERY, repository);
- // setTitle(TITLE);
- // setDescription(DESCRIPTION);
- // setImageDescriptor(TaskListImages.BANNER_REPOSITORY);
- // setPageComplete(false);
-// try {
-// repositoryConfiguration = BugzillaCorePlugin.getRepositoryConfiguration(repository, false);
-// } catch (final CoreException e) {
-// PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
-// public void run() {
-// MessageDialog.openError(Display.getDefault().getActiveShell(), "Bugzilla Search Page",
-// "Unable to get configuration. Ensure proper repository configuration in "
-// + TasksUiPlugin.LABEL_VIEW_REPOSITORIES + ".\n\n");
-// }
-// });
-// }
- }
-
- public BugzillaSearchPage(TaskRepository repository, IRepositoryQuery origQuery) {
- super(TITLE_BUGZILLA_QUERY, repository, origQuery);
- originalQuery = origQuery;
- setDescription("Select the Bugzilla query parameters. Use the Update Attributes button to retrieve "
- + "updated values from the repository.");
- // setTitle(TITLE);
- // setDescription(DESCRIPTION);
- // setPageComplete(false);
-// try {
-// repositoryConfiguration = BugzillaCorePlugin.getRepositoryConfiguration(repository, false);
-// } catch (final CoreException e) {
-// PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
-// public void run() {
-// MessageDialog.openError(Display.getDefault().getActiveShell(), "Bugzilla Search Page",
-// "Unable to get configuration. Ensure proper repository configuration in "
-// + TasksUiPlugin.LABEL_VIEW_REPOSITORIES + ".\n\n");
-// }
-// });
-// }
- }
-
- public void createControl(Composite parent) {
- readConfiguration();
-
- Composite control = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout(1, false);
- layout.marginHeight = 0;
- control.setLayout(layout);
- control.setLayoutData(new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL));
-
-// if (scontainer == null) {
- // Not presenting in search pane so want query title
-// super.createControl(control);
-// Label lblName = new Label(control, SWT.NONE);
-// final GridData gridData = new GridData();
-// lblName.setLayoutData(gridData);
-// lblName.setText("Query Title:");
-//
-// title = new Text(control, SWT.BORDER);
-// title.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1));
-// title.addModifyListener(new ModifyListener() {
-// public void modifyText(ModifyEvent e) {
-// setPageComplete(isPageComplete());
-// }
-// });
-// }
-
- // else {
- // // if (repository == null) {
- // // search pane so add repository selection
- // createRepositoryGroup(control);
- // }
- createOptionsGroup(control);
- createSearchGroup(control);
-
- // createSaveQuery(control);
- // createMaxHits(control);
- // input = new SavedQueryFile(BugzillaPlugin.getDefault().getStateLocation().toString(), "/queries");
- // createUpdate(control);
- // if (originalQuery != null) {
- // try {
- // updateDefaults(originalQuery.getQueryUrl(), String.valueOf(originalQuery.getMaxHits()));
- // } catch (UnsupportedEncodingException e) {
- // // ignore
- // }
- // }
- setControl(control);
- WorkbenchHelpSystem.getInstance().setHelp(control, BugzillaUiPlugin.SEARCH_PAGE_CONTEXT);
- }
-
- protected void createOptionsGroup(Composite control) {
- GridLayout sashFormLayout = new GridLayout();
- sashFormLayout.numColumns = 4;
- sashFormLayout.marginHeight = 5;
- sashFormLayout.marginWidth = 5;
- sashFormLayout.horizontalSpacing = 5;
-
- final Composite composite = new Composite(control, SWT.NONE);
- composite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
- final GridLayout gridLayout = new GridLayout();
- gridLayout.marginBottom = 8;
- gridLayout.marginHeight = 0;
- gridLayout.marginWidth = 0;
- gridLayout.numColumns = 4;
- composite.setLayout(gridLayout);
-
- if (!inSearchContainer()) {
- final Label queryTitleLabel = new Label(composite, SWT.NONE);
- queryTitleLabel.setText("&Query Title:");
-
- queryTitle = new Text(composite, SWT.BORDER);
- queryTitle.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 3, 1));
- if (originalQuery != null) {
- queryTitle.setText(originalQuery.getSummary());
- }
- queryTitle.addModifyListener(new ModifyListenerImplementation());
- queryTitle.setFocus();
- }
-
- // Info text
- Label labelSummary = new Label(composite, SWT.LEFT);
- labelSummary.setText("Summar&y:");
- labelSummary.setLayoutData(new GridData(LABEL_WIDTH, SWT.DEFAULT));
- //labelSummary.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-
- // Pattern combo
- summaryPattern = new Combo(composite, SWT.SINGLE | SWT.BORDER);
- summaryPattern.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
- summaryPattern.addModifyListener(new ModifyListenerImplementation());
- summaryPattern.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- handleWidgetSelected(summaryPattern, summaryOperation, previousSummaryPatterns);
- }
- });
-
- summaryOperation = new Combo(composite, SWT.SINGLE | SWT.READ_ONLY | SWT.BORDER);
- summaryOperation.setItems(patternOperationText);
- summaryOperation.setText(patternOperationText[0]);
- summaryOperation.select(0);
-
- // Info text
- Label labelComment = new Label(composite, SWT.LEFT);
- labelComment.setText("&Comment:");
- //labelComment.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-
- // Comment pattern combo
- commentPattern = new Combo(composite, SWT.SINGLE | SWT.BORDER);
- commentPattern.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 2, 1));
- commentPattern.addModifyListener(new ModifyListenerImplementation());
- commentPattern.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- handleWidgetSelected(commentPattern, commentOperation, previousCommentPatterns);
- }
- });
-
- commentOperation = new Combo(composite, SWT.SINGLE | SWT.READ_ONLY | SWT.BORDER);
- commentOperation.setItems(patternOperationText);
- commentOperation.setText(patternOperationText[0]);
- commentOperation.select(0);
-
- Label labelEmail = new Label(composite, SWT.LEFT);
- labelEmail.setText("&Email:");
- //labelEmail.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-
- // pattern combo
- emailPattern = new Combo(composite, SWT.SINGLE | SWT.BORDER);
- emailPattern.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
- emailPattern.addModifyListener(new ModifyListenerImplementation());
- emailPattern.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- handleWidgetSelected(emailPattern, emailOperation, previousEmailPatterns);
- }
- });
- ContentAssistCommandAdapter adapter = applyContentAssist(emailPattern, createContentProposalProvider());
- ILabelProvider propsalLabelProvider = createProposalLabelProvider();
- if (propsalLabelProvider != null) {
- adapter.setLabelProvider(propsalLabelProvider);
- }
- adapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
-
- Composite emailComposite = new Composite(composite, SWT.NONE);
- emailComposite.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
- GridLayout emailLayout = new GridLayout();
- emailLayout.marginWidth = 0;
- emailLayout.marginHeight = 0;
- emailLayout.horizontalSpacing = 2;
- emailLayout.numColumns = 4;
- emailComposite.setLayout(emailLayout);
-
- Button button0 = new Button(emailComposite, SWT.CHECK);
- button0.setText("owner");
-
- Button button1 = new Button(emailComposite, SWT.CHECK);
- button1.setText("reporter");
-
- Button button2 = new Button(emailComposite, SWT.CHECK);
- button2.setText("cc");
-
- Button button3 = new Button(emailComposite, SWT.CHECK);
- button3.setText("commenter");
-
- emailButtons = new Button[] { button0, button1, button2, button3 };
-
- // operation combo
- emailOperation = new Combo(composite, SWT.SINGLE | SWT.READ_ONLY | SWT.BORDER);
- emailOperation.setItems(emailOperationText);
- emailOperation.setText(emailOperationText[0]);
- emailOperation.select(0);
-
- // Email2
-
- Label labelEmail2 = new Label(composite, SWT.LEFT);
- labelEmail2.setText("Email &2:");
- //labelEmail.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-
- // pattern combo
- emailPattern2 = new Combo(composite, SWT.SINGLE | SWT.BORDER);
- emailPattern2.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
- emailPattern2.addModifyListener(new ModifyListenerImplementation());
- emailPattern2.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- handleWidgetSelected(emailPattern2, emailOperation2, previousEmailPatterns2);
- }
- });
- ContentAssistCommandAdapter adapter2 = applyContentAssist(emailPattern2, createContentProposalProvider());
- ILabelProvider propsalLabelProvider2 = createProposalLabelProvider();
- if (propsalLabelProvider2 != null) {
- adapter2.setLabelProvider(propsalLabelProvider2);
- }
- adapter2.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
-
- Composite emailComposite2 = new Composite(composite, SWT.NONE);
- emailComposite2.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
- GridLayout emailLayout2 = new GridLayout();
- emailLayout2.marginWidth = 0;
- emailLayout2.marginHeight = 0;
- emailLayout2.horizontalSpacing = 2;
- emailLayout2.numColumns = 4;
- emailComposite2.setLayout(emailLayout2);
-
- Button e2button0 = new Button(emailComposite2, SWT.CHECK);
- e2button0.setText("owner");
-
- Button e2button1 = new Button(emailComposite2, SWT.CHECK);
- e2button1.setText("reporter");
-
- Button e2button2 = new Button(emailComposite2, SWT.CHECK);
- e2button2.setText("cc");
-
- Button e2button3 = new Button(emailComposite2, SWT.CHECK);
- e2button3.setText("commenter");
-
- emailButtons2 = new Button[] { e2button0, e2button1, e2button2, e2button3 };
-
- // operation combo
- emailOperation2 = new Combo(composite, SWT.SINGLE | SWT.READ_ONLY | SWT.BORDER);
- emailOperation2.setItems(emailOperationText);
- emailOperation2.setText(emailOperationText[0]);
- emailOperation2.select(0);
-
- /////
-
- Label labelKeywords = new Label(composite, SWT.NONE);
- labelKeywords.setText("&Keywords:");
- labelKeywords.setLayoutData(new GridData(LABEL_WIDTH, SWT.DEFAULT));
- //labelKeywords.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-
- Composite keywordsComposite = new Composite(composite, SWT.NONE);
- keywordsComposite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 3, 1));
- GridLayout keywordsLayout = new GridLayout();
- keywordsLayout.marginWidth = 0;
- keywordsLayout.marginHeight = 0;
- keywordsLayout.numColumns = 3;
- keywordsComposite.setLayout(keywordsLayout);
-
- keywordsOperation = new Combo(keywordsComposite, SWT.READ_ONLY);
- keywordsOperation.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
- keywordsOperation.setItems(keywordOperationText);
- keywordsOperation.setText(keywordOperationText[0]);
- keywordsOperation.select(0);
-
- keywords = new Combo(keywordsComposite, SWT.NONE);
- keywords.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
- keywords.addModifyListener(new ModifyListenerImplementation());
- keywords.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- handleWidgetSelected(keywords, keywordsOperation, previousKeywords);
- }
- });
-
- Button keywordsSelectButton = new Button(keywordsComposite, SWT.NONE);
- keywordsSelectButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (repositoryConfiguration != null) {
- KeywordsDialog dialog = new KeywordsDialog(getShell(), keywords.getText(), //
- repositoryConfiguration.getKeywords());
- if (dialog.open() == Window.OK) {
- keywords.setText(dialog.getSelectedKeywordsString());
- }
- }
- }
- });
- keywordsSelectButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
- keywordsSelectButton.setText("Select...");
- SashForm sashForm = new SashForm(control, SWT.VERTICAL);
- sashForm.setLayout(sashFormLayout);
- final GridData gd_sashForm = new GridData(SWT.FILL, SWT.FILL, true, true);
- gd_sashForm.widthHint = 500;
- sashForm.setLayoutData(gd_sashForm);
-
- GridLayout topLayout = new GridLayout();
- topLayout.numColumns = 4;
- SashForm topForm = new SashForm(sashForm, SWT.NONE);
- GridData topLayoutData = new GridData(SWT.FILL, SWT.FILL, true, true, 3, 1);
- topLayoutData.widthHint = 500;
- topForm.setLayoutData(topLayoutData);
- topForm.setLayout(topLayout);
-
- GridLayout productLayout = new GridLayout();
- productLayout.marginWidth = 0;
- productLayout.marginHeight = 0;
- productLayout.horizontalSpacing = 0;
- Composite productComposite = new Composite(topForm, SWT.NONE);
- productComposite.setLayout(productLayout);
-
- Label productLabel = new Label(productComposite, SWT.LEFT);
- productLabel.setText("&Product:");
-
- GridData productLayoutData = new GridData(SWT.FILL, SWT.FILL, true, true);
- productLayoutData.heightHint = HEIGHT_ATTRIBUTE_COMBO;
- product = new List(productComposite, SWT.MULTI | SWT.V_SCROLL | SWT.BORDER);
- product.setLayoutData(productLayoutData);
- product.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (product.getSelectionIndex() != -1) {
- String[] selectedProducts = product.getSelection();
- updateAttributesFromConfiguration(selectedProducts);
- } else {
- updateAttributesFromConfiguration(null);
- }
- if (restoring) {
- restoring = false;
- restoreWidgetValues();
- }
- setPageComplete(isPageComplete());
- }
- });
-
- GridLayout componentLayout = new GridLayout();
- componentLayout.marginWidth = 0;
- componentLayout.marginHeight = 0;
- componentLayout.horizontalSpacing = 0;
- Composite componentComposite = new Composite(topForm, SWT.NONE);
- componentComposite.setLayout(componentLayout);
-
- Label componentLabel = new Label(componentComposite, SWT.LEFT);
- componentLabel.setText("Compo&nent:");
-
- component = new List(componentComposite, SWT.MULTI | SWT.V_SCROLL | SWT.BORDER);
- GridData componentLayoutData = new GridData(SWT.FILL, SWT.FILL, true, true);
- componentLayoutData.heightHint = HEIGHT_ATTRIBUTE_COMBO;
- component.setLayoutData(componentLayoutData);
- component.addSelectionListener(updateActionSelectionAdapter);
-
- Composite versionComposite = new Composite(topForm, SWT.NONE);
- GridLayout versionLayout = new GridLayout();
- versionLayout.marginWidth = 0;
- versionLayout.marginHeight = 0;
- versionLayout.horizontalSpacing = 0;
- versionComposite.setLayout(versionLayout);
-
- Label versionLabel = new Label(versionComposite, SWT.LEFT);
- versionLabel.setText("Vers&ion:");
-
- version = new List(versionComposite, SWT.MULTI | SWT.V_SCROLL | SWT.BORDER);
- GridData versionLayoutData = new GridData(SWT.FILL, SWT.FILL, true, true);
- versionLayoutData.heightHint = HEIGHT_ATTRIBUTE_COMBO;
- version.setLayoutData(versionLayoutData);
- version.addSelectionListener(updateActionSelectionAdapter);
-
- Composite milestoneComposite = new Composite(topForm, SWT.NONE);
- GridLayout milestoneLayout = new GridLayout();
- milestoneLayout.marginWidth = 0;
- milestoneLayout.marginHeight = 0;
- milestoneLayout.horizontalSpacing = 0;
- milestoneComposite.setLayout(milestoneLayout);
-
- Label milestoneLabel = new Label(milestoneComposite, SWT.LEFT);
- milestoneLabel.setText("&Milestone:");
-
- target = new List(milestoneComposite, SWT.MULTI | SWT.V_SCROLL | SWT.BORDER);
- GridData targetLayoutData = new GridData(SWT.FILL, SWT.FILL, true, true);
- targetLayoutData.heightHint = HEIGHT_ATTRIBUTE_COMBO;
- target.setLayoutData(targetLayoutData);
- target.addSelectionListener(updateActionSelectionAdapter);
-
- SashForm bottomForm = new SashForm(sashForm, SWT.NONE);
- GridLayout bottomLayout = new GridLayout();
- bottomLayout.numColumns = 6;
- bottomForm.setLayout(bottomLayout);
- GridData bottomLayoutData = new GridData(SWT.FILL, SWT.FILL, true, true, 4, 1);
- bottomLayoutData.heightHint = 119;
- bottomLayoutData.widthHint = 400;
- bottomForm.setLayoutData(bottomLayoutData);
-
- Composite statusComposite = new Composite(bottomForm, SWT.NONE);
- GridLayout statusLayout = new GridLayout();
- statusLayout.marginTop = 7;
- statusLayout.marginWidth = 0;
- statusLayout.horizontalSpacing = 0;
- statusLayout.marginHeight = 0;
- statusComposite.setLayout(statusLayout);
-
- Label statusLabel = new Label(statusComposite, SWT.LEFT);
- statusLabel.setText("Stat&us:");
-
- status = new List(statusComposite, SWT.MULTI | SWT.V_SCROLL | SWT.BORDER);
- final GridData gd_status = new GridData(SWT.FILL, SWT.FILL, true, true);
- gd_status.heightHint = 60;
- status.setLayoutData(gd_status);
- status.addSelectionListener(updateActionSelectionAdapter);
-
- Composite resolutionComposite = new Composite(bottomForm, SWT.NONE);
- GridLayout resolutionLayout = new GridLayout();
- resolutionLayout.marginTop = 7;
- resolutionLayout.marginWidth = 0;
- resolutionLayout.marginHeight = 0;
- resolutionLayout.horizontalSpacing = 0;
- resolutionComposite.setLayout(resolutionLayout);
-
- Label resolutionLabel = new Label(resolutionComposite, SWT.LEFT);
- resolutionLabel.setText("&Resolution:");
-
- resolution = new List(resolutionComposite, SWT.MULTI | SWT.V_SCROLL | SWT.BORDER);
- final GridData gd_resolution = new GridData(SWT.FILL, SWT.FILL, true, true);
- gd_resolution.heightHint = 60;
- resolution.setLayoutData(gd_resolution);
- resolution.addSelectionListener(updateActionSelectionAdapter);
-
- Composite priorityComposite = new Composite(bottomForm, SWT.NONE);
- GridLayout priorityLayout = new GridLayout();
- priorityLayout.marginTop = 7;
- priorityLayout.marginWidth = 0;
- priorityLayout.marginHeight = 0;
- priorityLayout.horizontalSpacing = 0;
- priorityComposite.setLayout(priorityLayout);
-
- Label priorityLabel = new Label(priorityComposite, SWT.LEFT);
- priorityLabel.setText("Priori&ty:");
-
- priority = new List(priorityComposite, SWT.MULTI | SWT.V_SCROLL | SWT.BORDER);
- final GridData gd_priority = new GridData(SWT.FILL, SWT.FILL, true, true);
- gd_priority.heightHint = 60;
- priority.setLayoutData(gd_priority);
- priority.addSelectionListener(updateActionSelectionAdapter);
-
- Composite severityComposite = new Composite(bottomForm, SWT.NONE);
- GridLayout severityLayout = new GridLayout();
- severityLayout.marginTop = 7;
- severityLayout.marginWidth = 0;
- severityLayout.marginHeight = 0;
- severityLayout.horizontalSpacing = 0;
- severityComposite.setLayout(severityLayout);
-
- Label severityLabel = new Label(severityComposite, SWT.LEFT);
- severityLabel.setText("Se&verity:");
-
- severity = new List(severityComposite, SWT.MULTI | SWT.V_SCROLL | SWT.BORDER);
- final GridData gd_severity = new GridData(SWT.FILL, SWT.FILL, true, true);
- gd_severity.heightHint = 60;
- severity.setLayoutData(gd_severity);
- severity.addSelectionListener(updateActionSelectionAdapter);
-
- Composite hardwareComposite = new Composite(bottomForm, SWT.NONE);
- GridLayout hardwareLayout = new GridLayout();
- hardwareLayout.marginTop = 7;
- hardwareLayout.marginWidth = 0;
- hardwareLayout.marginHeight = 0;
- hardwareLayout.horizontalSpacing = 0;
- hardwareComposite.setLayout(hardwareLayout);
-
- Label hardwareLabel = new Label(hardwareComposite, SWT.LEFT);
- hardwareLabel.setText("Hard&ware:");
-
- hardware = new List(hardwareComposite, SWT.MULTI | SWT.V_SCROLL | SWT.BORDER);
- final GridData gd_hardware = new GridData(SWT.FILL, SWT.FILL, true, true);
- gd_hardware.heightHint = 60;
- hardware.setLayoutData(gd_hardware);
- hardware.addSelectionListener(updateActionSelectionAdapter);
-
- Composite osComposite = new Composite(bottomForm, SWT.NONE);
- GridLayout osLayout = new GridLayout();
- osLayout.marginTop = 7;
- osLayout.marginWidth = 0;
- osLayout.marginHeight = 0;
- osLayout.horizontalSpacing = 0;
- osComposite.setLayout(osLayout);
-
- Label osLabel = new Label(osComposite, SWT.LEFT);
- osLabel.setText("&Operating System:");
-
- os = new List(osComposite, SWT.MULTI | SWT.V_SCROLL | SWT.BORDER);
- final GridData gd_os = new GridData(SWT.FILL, SWT.FILL, true, true);
- gd_os.heightHint = 60;
- os.setLayoutData(gd_os);
- os.addSelectionListener(updateActionSelectionAdapter);
- bottomForm.setWeights(new int[] { 88, 90, 50, 77, 88, 85 });
- }
-
- private void createSearchGroup(Composite control) {
- Composite composite = new Composite(control, SWT.NONE);
- composite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
- GridLayout gridLayout = new GridLayout();
- gridLayout.marginTop = 7;
- gridLayout.marginHeight = 0;
- gridLayout.marginWidth = 0;
- gridLayout.numColumns = 2;
- composite.setLayout(gridLayout);
-
- Label changedInTheLabel = new Label(composite, SWT.LEFT);
- changedInTheLabel.setLayoutData(new GridData());
- changedInTheLabel.setText("Ch&anged in:");
-
- Composite updateComposite = new Composite(composite, SWT.NONE);
- updateComposite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
- GridLayout updateLayout = new GridLayout(3, false);
- updateLayout.marginWidth = 0;
- updateLayout.horizontalSpacing = 0;
- updateLayout.marginHeight = 0;
- updateComposite.setLayout(updateLayout);
-
- daysText = new Text(updateComposite, SWT.BORDER);
- daysText.setLayoutData(new GridData(40, SWT.DEFAULT));
- daysText.setTextLimit(5);
- daysText.addListener(SWT.Modify, this);
-
- Label label = new Label(updateComposite, SWT.LEFT);
- label.setText(" days.");
-
- Button updateButton = new Button(updateComposite, SWT.PUSH);
- updateButton.setText("Up&date Attributes from Repository");
- updateButton.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false));
- updateButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (getTaskRepository() != null) {
-// try {
-
- updateConfiguration(true);
-
-// } catch (final CoreException e1) {
-// PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
-// public void run() {
-// MessageDialog.openError(Display.getDefault().getActiveShell(), "Bugzilla Search Page",
-// "Unable to get configuration. Ensure proper repository configuration in "
-// + TasksUiPlugin.LABEL_VIEW_REPOSITORIES + ".\n\n");
-// }
-// });
-// }
- } else {
- MessageDialog.openInformation(Display.getCurrent().getActiveShell(),
- IBugzillaConstants.TITLE_MESSAGE_DIALOG, TaskRepositoryManager.MESSAGE_NO_REPOSITORY);
- }
- }
- });
- }
-
- /**
- * Creates the buttons for remembering a query and accessing previously saved queries.
- */
- protected Control createSaveQuery(Composite control) {
- GridLayout layout;
- GridData gd;
-
- Group group = new Group(control, SWT.NONE);
- layout = new GridLayout(3, false);
- group.setLayout(layout);
- group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- gd = new GridData(GridData.BEGINNING | GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
- gd.horizontalSpan = 2;
- group.setLayoutData(gd);
-
- // loadButton = new Button(group, SWT.PUSH | SWT.LEFT);
- // loadButton.setText("Saved Queries...");
- // final BugzillaSearchPage bsp = this;
- // loadButton.addSelectionListener(new SelectionAdapter() {
- //
- // @Override
- // public void widgetSelected(SelectionEvent event) {
- // GetQueryDialog qd = new GetQueryDialog(getShell(), "Saved Queries",
- // input);
- // if (qd.open() == InputDialog.OK) {
- // selIndex = qd.getSelected();
- // if (selIndex != -1) {
- // rememberedQuery = true;
- // performAction();
- // bsp.getShell().close();
- // }
- // }
- // }
- // });
- // loadButton.setEnabled(true);
- // loadButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
- //
- // saveButton = new Button(group, SWT.PUSH | SWT.LEFT);
- // saveButton.setText("Remember...");
- // saveButton.addSelectionListener(new SelectionAdapter() {
- //
- // @Override
- // public void widgetSelected(SelectionEvent event) {
- // SaveQueryDialog qd = new SaveQueryDialog(getShell(), "Remember Query");
- // if (qd.open() == InputDialog.OK) {
- // String qName = qd.getText();
- // if (qName != null && qName.compareTo("") != 0) {
- // try {
- // input.add(getQueryParameters().toString(), qName, summaryPattern.getText());
- // } catch (UnsupportedEncodingException e) {
- // /*
- // * Do nothing. Every implementation of the Java
- // * platform is required to support the standard
- // * charset "UTF-8"
- // */
- // }
- // }
- // }
- // }
- // });
- // saveButton.setEnabled(true);
- // saveButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
-
- return group;
- }
-
- // public static SavedQueryFile getInput() {
- // return input;
- // }
-
- private void handleWidgetSelected(Combo widget, Combo operation, ArrayList<BugzillaSearchData> history) {
- if (widget.getSelectionIndex() < 0) {
- return;
- }
- int index = history.size() - 1 - widget.getSelectionIndex();
- BugzillaSearchData patternData = history.get(index);
- if (patternData == null || !widget.getText().equals(patternData.pattern)) {
- return;
- }
- widget.setText(patternData.pattern);
- operation.setText(operation.getItem(patternData.operation));
- }
-
- // TODO: avoid overriding?
- @Override
- public boolean performSearch() {
- if (restoreQueryOptions) {
- saveState();
- }
-
- getPatternData(summaryPattern, summaryOperation, previousSummaryPatterns);
- getPatternData(commentPattern, commentOperation, previousCommentPatterns);
- getPatternData(emailPattern, emailOperation, previousEmailPatterns);
- getPatternData(emailPattern2, emailOperation2, previousEmailPatterns2);
- getPatternData(keywords, keywordsOperation, previousKeywords);
-
- String summaryText = summaryPattern.getText();
- BugzillaUiPlugin.getDefault().getPreferenceStore().setValue(IBugzillaConstants.MOST_RECENT_QUERY, summaryText);
-
- return super.performSearch();
- }
-
- @Override
- public void setVisible(boolean visible) {
- if (visible && summaryPattern != null) {
- if (firstTime) {
- // Set<TaskRepository> repositories = TasksUiPlugin.getRepositoryManager().getRepositories(BugzillaCorePlugin.REPOSITORY_KIND);
- // String[] repositoryUrls = new String[repositories.size()];
- // int i = 0;
- // int indexToSelect = 0;
- // for (Iterator<TaskRepository> iter = repositories.iterator(); iter.hasNext();) {
- // TaskRepository currRepsitory = iter.next();
- // // if (i == 0 && repository == null) {
- // // repository = currRepsitory;
- // // indexToSelect = 0;
- // // }
- // if (repository != null && repository.equals(currRepsitory)) {
- // indexToSelect = i;
- // }
- // repositoryUrls[i] = currRepsitory.getUrl();
- // i++;
- // }
-
- // IDialogSettings settings = getDialogSettings();
- // if (repositoryCombo != null) {
- // repositoryCombo.setItems(repositoryUrls);
- // if (repositoryUrls.length == 0) {
- // MessageDialog.openInformation(Display.getCurrent().getActiveShell(), IBugzillaConstants.TITLE_MESSAGE_DIALOG,
- // TaskRepositoryManager.MESSAGE_NO_REPOSITORY);
- // } else {
- // String selectRepo = settings.get(STORE_REPO_ID);
- // if (selectRepo != null && repositoryCombo.indexOf(selectRepo) > -1) {
- // repositoryCombo.setText(selectRepo);
- // repository = TasksUiPlugin.getRepositoryManager().getRepository(
- // BugzillaCorePlugin.REPOSITORY_KIND, repositoryCombo.getText());
- // if (repository == null) {
- // repository = TasksUiPlugin.getRepositoryManager().getDefaultRepository( BugzillaCorePlugin.REPOSITORY_KIND);
- // }
- // } else {
- // repositoryCombo.select(indexToSelect);
- // }
- // updateAttributesFromRepository(repositoryCombo.getText(), null, false);
- // }
- // }
-
- firstTime = false;
- // Set item and text here to prevent page from resizing
- for (String searchPattern : getPreviousPatterns(previousSummaryPatterns)) {
- summaryPattern.add(searchPattern);
- }
- // summaryPattern.setItems(getPreviousPatterns(previousSummaryPatterns));
- for (String comment : getPreviousPatterns(previousCommentPatterns)) {
- commentPattern.add(comment);
- }
- // commentPattern.setItems(getPreviousPatterns(previousCommentPatterns));
- for (String email : getPreviousPatterns(previousEmailPatterns)) {
- emailPattern.add(email);
- }
-
- for (String email : getPreviousPatterns(previousEmailPatterns2)) {
- emailPattern2.add(email);
- }
-
- // emailPattern.setItems(getPreviousPatterns(previousEmailPatterns));
- for (String keyword : getPreviousPatterns(previousKeywords)) {
- keywords.add(keyword);
- }
-
- // TODO: update status, resolution, severity etc if possible...
- if (getTaskRepository() != null) {
- updateAttributesFromConfiguration(null);
- if (product.getItemCount() == 0) {
- try {
- repositoryConfiguration = BugzillaCorePlugin.getRepositoryConfiguration(
- getTaskRepository(), true, new NullProgressMonitor());
- updateAttributesFromConfiguration(null);
- } catch (final CoreException e1) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- MessageDialog.openError(Display.getDefault().getActiveShell(),
- "Bugzilla Search Page",
- "Unable to get configuration. Ensure proper repository configuration in "
- + TasksUiPlugin.LABEL_VIEW_REPOSITORIES + ".\n\n");
- }
- });
- }
- }
- }
- if (originalQuery != null) {
- try {
- updateDefaults(originalQuery.getUrl());
- } catch (UnsupportedEncodingException e) {
- // ignore
- }
- }
- }
-
- /*
- * hack: we have to select the correct product, then update the
- * attributes so the component/version/milestone lists have the
- * proper values, then we can restore all the widget selections.
- */
- if (getTaskRepository() != null) {
- IDialogSettings settings = getDialogSettings();
- String repoId = "." + getTaskRepository().getRepositoryUrl();
- if (getWizard() == null && restoreQueryOptions && settings.getArray(STORE_PRODUCT_ID + repoId) != null
- && product != null) {
- product.setSelection(nonNullArray(settings, STORE_PRODUCT_ID + repoId));
- if (product.getSelection().length > 0) {
- updateAttributesFromConfiguration(product.getSelection());
- }
- restoreWidgetValues();
- }
- }
- setPageComplete(isPageComplete());
- if (getWizard() == null) {
- // TODO: wierd check
- summaryPattern.setFocus();
- }
- }
- super.setVisible(visible);
- }
-
- /**
- * Returns <code>true</code> if at least some parameter is given to query on.
- */
- private boolean canQuery() {
- if (isControlCreated()) {
- return product.getSelectionCount() > 0 || component.getSelectionCount() > 0
- || version.getSelectionCount() > 0 || target.getSelectionCount() > 0
- || status.getSelectionCount() > 0 || resolution.getSelectionCount() > 0
- || severity.getSelectionCount() > 0 || priority.getSelectionCount() > 0
- || hardware.getSelectionCount() > 0 || os.getSelectionCount() > 0
- || summaryPattern.getText().length() > 0 || commentPattern.getText().length() > 0
- || emailPattern.getText().length() > 0 || emailPattern2.getText().length() > 0
- || keywords.getText().length() > 0;
- } else {
- return false;
- }
- }
-
- @Override
- public boolean isPageComplete() {
- String message = null;
- if (daysText != null) {
- String days = daysText.getText();
- if (days.length() > 0) {
- try {
- if (Integer.parseInt(days) < 0) {
- message = NUM_DAYS_POSITIVE + days + " is invalid.";
- setErrorMessage(message);
- return false;
- }
- } catch (NumberFormatException ex) {
- message = NUM_DAYS_POSITIVE + days + " is invalid.";
- setErrorMessage(message);
- return false;
- }
- }
- }
- return getWizard() == null ? canQuery() : canQuery() && super.isPageComplete();
- }
-
- /**
- * Return search pattern data and update search history list. An existing entry will be updated or a new one
- * created.
- */
- private BugzillaSearchData getPatternData(Combo widget, Combo operation,
- ArrayList<BugzillaSearchData> previousSearchQueryData) {
- String pattern = widget.getText();
- if (pattern == null || pattern.trim().equals("")) {
- return null;
- }
- BugzillaSearchData match = null;
- int i = previousSearchQueryData.size() - 1;
- while (i >= 0) {
- match = previousSearchQueryData.get(i);
- if (pattern.equals(match.pattern)) {
- break;
- }
- i--;
- }
- if (i >= 0 && match != null) {
- match.operation = operation.getSelectionIndex();
- // remove - will be added last (see below)
- previousSearchQueryData.remove(match);
- } else {
- match = new BugzillaSearchData(widget.getText(), operation.getSelectionIndex());
- }
- previousSearchQueryData.add(match);
- return match;
- }
-
- /**
- * Returns an array of previous summary patterns
- */
- private String[] getPreviousPatterns(ArrayList<BugzillaSearchData> patternHistory) {
- int size = patternHistory.size();
- String[] patterns = new String[size];
- for (int i = 0; i < size; i++) {
- patterns[i] = (patternHistory.get(size - 1 - i)).pattern;
- }
- return patterns;
- }
-
- public String getSearchURL(TaskRepository repository) {
- return getQueryURL(repository, getQueryParameters());
- }
-
- protected String getQueryURL(TaskRepository repository, StringBuilder params) {
- StringBuilder url = new StringBuilder(getQueryURLStart(repository).toString());
- url.append(params);
-
- // HACK make sure that the searches come back sorted by priority. This
- // should be a search option though
- url.append("&order=Importance");
- // url.append(BugzillaRepositoryUtil.contentTypeRDF);
- return url.toString();
- }
-
- /**
- * Creates the bugzilla query URL start.
- *
- * Example: https://bugs.eclipse.org/bugs/buglist.cgi?
- */
- private StringBuilder getQueryURLStart(TaskRepository repository) {
- StringBuilder sb = new StringBuilder(repository.getRepositoryUrl());
-
- if (sb.charAt(sb.length() - 1) != '/') {
- sb.append('/');
- }
- sb.append("buglist.cgi?");
- return sb;
- }
-
- /**
- * Goes through the query form and builds up the query parameters.
- *
- * Example: short_desc_type=substring&amp;short_desc=bla&amp; ... TODO: The encoding here should match
- * TaskRepository.getCharacterEncoding()
- *
- * @throws UnsupportedEncodingException
- */
- protected StringBuilder getQueryParameters() {
- StringBuilder sb = new StringBuilder();
-
- sb.append("short_desc_type=");
- sb.append(patternOperationValues[summaryOperation.getSelectionIndex()]);
- appendToBuffer(sb, "&short_desc=", summaryPattern.getText());
-
- int[] selected = product.getSelectionIndices();
- for (int element : selected) {
- appendToBuffer(sb, "&product=", product.getItem(element));
- }
-
- selected = component.getSelectionIndices();
- for (int element : selected) {
- appendToBuffer(sb, "&component=", component.getItem(element));
- }
-
- selected = version.getSelectionIndices();
- for (int element : selected) {
- appendToBuffer(sb, "&version=", version.getItem(element));
- }
-
- selected = target.getSelectionIndices();
- for (int element : selected) {
- appendToBuffer(sb, "&target_milestone=", target.getItem(element));
- }
-
- sb.append("&long_desc_type=");
- sb.append(patternOperationValues[commentOperation.getSelectionIndex()]);
- appendToBuffer(sb, "&long_desc=", commentPattern.getText());
-
- selected = status.getSelectionIndices();
- for (int element : selected) {
- appendToBuffer(sb, "&bug_status=", status.getItem(element));
- }
-
- selected = resolution.getSelectionIndices();
- for (int element : selected) {
- appendToBuffer(sb, "&resolution=", resolution.getItem(element));
- }
-
- selected = severity.getSelectionIndices();
- for (int element : selected) {
- appendToBuffer(sb, "&bug_severity=", severity.getItem(element));
- }
-
- selected = priority.getSelectionIndices();
- for (int element : selected) {
- appendToBuffer(sb, "&priority=", priority.getItem(element));
- }
-
- selected = hardware.getSelectionIndices();
- for (int element : selected) {
- appendToBuffer(sb, "&ref_platform=", hardware.getItem(element));
- }
-
- selected = os.getSelectionIndices();
- for (int element : selected) {
- appendToBuffer(sb, "&op_sys=", os.getItem(element));
- }
-
- if (emailPattern.getText() != null && !emailPattern.getText().trim().equals("")) {
- boolean selectionMade = false;
- for (Button button : emailButtons) {
- if (button.getSelection()) {
- selectionMade = true;
- break;
- }
- }
- if (selectionMade) {
- for (int i = 0; i < emailButtons.length; i++) {
- if (emailButtons[i].getSelection()) {
- sb.append("&");
- sb.append(emailRoleValues[i]);
- sb.append("=1");
- }
- }
- sb.append("&emailtype1=");
- sb.append(emailOperationValues[emailOperation.getSelectionIndex()]);
- appendToBuffer(sb, "&email1=", emailPattern.getText());
- }
- }
-
- if (emailPattern2.getText() != null && !emailPattern2.getText().trim().equals("")) {
- boolean selectionMade = false;
- for (Button button : emailButtons2) {
- if (button.getSelection()) {
- selectionMade = true;
- break;
- }
- }
- if (selectionMade) {
- for (int i = 0; i < emailButtons2.length; i++) {
- if (emailButtons2[i].getSelection()) {
- sb.append("&");
- sb.append(emailRoleValues2[i]);
- sb.append("=1");
- }
- }
- sb.append("&emailtype2=");
- sb.append(emailOperationValues[emailOperation2.getSelectionIndex()]);
- appendToBuffer(sb, "&email2=", emailPattern2.getText());
- }
- }
-
- if (daysText.getText() != null && !daysText.getText().equals("")) {
- try {
- Integer.parseInt(daysText.getText());
- appendToBuffer(sb, "&changedin=", daysText.getText());
- } catch (NumberFormatException ignored) {
- // this means that the days is not a number, so don't worry
- }
- }
-
- if (keywords.getText() != null && !keywords.getText().trim().equals("")) {
- sb.append("&keywords_type=");
- sb.append(keywordOperationValues[keywordsOperation.getSelectionIndex()]);
- appendToBuffer(sb, "&keywords=", keywords.getText().replace(',', ' '));
- }
-
- return sb;
- }
-
- private void appendToBuffer(StringBuilder sb, String key, String value) {
- sb.append(key);
- try {
- sb.append(URLEncoder.encode(value, getTaskRepository().getCharacterEncoding()));
- } catch (UnsupportedEncodingException e) {
- sb.append(value);
- }
- }
-
- public IDialogSettings getDialogSettings() {
- IDialogSettings settings = BugzillaUiPlugin.getDefault().getDialogSettings();
- fDialogSettings = settings.getSection(PAGE_NAME);
- if (fDialogSettings == null) {
- fDialogSettings = settings.addNewSection(PAGE_NAME);
- }
- return fDialogSettings;
- }
-
- /**
- * Initializes itself from the stored page settings.
- */
- private void readConfiguration() {
- getDialogSettings();
- }
-
- private void updateAttributesFromConfiguration(String[] selectedProducts) {
- if (repositoryConfiguration == null) {
- updateConfiguration(false);
- }
- if (repositoryConfiguration != null) {
- String[] saved_product = product.getSelection();
- String[] saved_component = component.getSelection();
- String[] saved_version = version.getSelection();
- String[] saved_target = target.getSelection();
- String[] saved_status = status.getSelection();
- String[] saved_resolution = resolution.getSelection();
- String[] saved_severity = severity.getSelection();
- String[] saved_priority = priority.getSelection();
- String[] saved_hardware = hardware.getSelection();
- String[] saved_os = os.getSelection();
-
- if (selectedProducts == null) {
- java.util.List<String> products = repositoryConfiguration.getProducts();
- String[] productsList = products.toArray(new String[products.size()]);
- Arrays.sort(productsList, String.CASE_INSENSITIVE_ORDER);
- product.setItems(productsList);
- }
-
- String[] componentsList = BugzillaUiPlugin.getQueryOptions(IBugzillaConstants.VALUES_COMPONENT,
- selectedProducts, repositoryConfiguration);
- Arrays.sort(componentsList, String.CASE_INSENSITIVE_ORDER);
- component.setItems(componentsList);
-
- version.setItems(BugzillaUiPlugin.getQueryOptions(IBugzillaConstants.VALUES_VERSION, selectedProducts,
- repositoryConfiguration));
- target.setItems(BugzillaUiPlugin.getQueryOptions(IBugzillaConstants.VALUES_TARGET, selectedProducts,
- repositoryConfiguration));
- status.setItems(convertStringListToArray(repositoryConfiguration.getStatusValues()));
- resolution.setItems(convertStringListToArray(repositoryConfiguration.getResolutions()));
- severity.setItems(convertStringListToArray(repositoryConfiguration.getSeverities()));
- priority.setItems(convertStringListToArray(repositoryConfiguration.getPriorities()));
- hardware.setItems(convertStringListToArray(repositoryConfiguration.getPlatforms()));
- os.setItems(convertStringListToArray(repositoryConfiguration.getOSs()));
-
- setSelection(product, saved_product);
- setSelection(component, saved_component);
- setSelection(version, saved_version);
- setSelection(target, saved_target);
- setSelection(status, saved_status);
- setSelection(resolution, saved_resolution);
- setSelection(severity, saved_severity);
- setSelection(priority, saved_priority);
- setSelection(hardware, saved_hardware);
- setSelection(os, saved_os);
- }
- }
-
- public boolean canFlipToNextPage() {
- // if (getErrorMessage() != null)
- // return false;
- //
- // return true;
- return false;
- }
-
- public void handleEvent(Event event) {
- if (getWizard() != null) {
- getWizard().getContainer().updateButtons();
- }
- }
-
- /**
- * TODO: get rid of this?
- */
- public void updateDefaults(String startingUrl) throws UnsupportedEncodingException {
- // String serverName = startingUrl.substring(0,
- // startingUrl.indexOf("?"));
-
- startingUrl = startingUrl.substring(startingUrl.indexOf("?") + 1);
- String[] options = startingUrl.split("&");
- for (String option : options) {
- String key = option.substring(0, option.indexOf("="));
- String value = URLDecoder.decode(option.substring(option.indexOf("=") + 1),
- getTaskRepository().getCharacterEncoding());
- if (key == null) {
- continue;
- }
-
- if (key.equals("short_desc")) {
- summaryPattern.setText(value);
- } else if (key.equals("short_desc_type")) {
- if (value.equals("allwordssubstr")) {
- value = "all words";
- } else if (value.equals("anywordssubstr")) {
- value = "any word";
- }
- int index = 0;
- for (String item : summaryOperation.getItems()) {
- if (item.compareTo(value) == 0) {
- break;
- }
- index++;
- }
- if (index < summaryOperation.getItemCount()) {
- summaryOperation.select(index);
- }
- } else if (key.equals("product")) {
- String[] sel = product.getSelection();
- java.util.List<String> selList = Arrays.asList(sel);
- selList = new ArrayList<String>(selList);
- selList.add(value);
- sel = new String[selList.size()];
- product.setSelection(selList.toArray(sel));
- updateAttributesFromConfiguration(selList.toArray(sel));
- } else if (key.equals("component")) {
- String[] sel = component.getSelection();
- java.util.List<String> selList = Arrays.asList(sel);
- selList = new ArrayList<String>(selList);
- selList.add(value);
- sel = new String[selList.size()];
- component.setSelection(selList.toArray(sel));
- } else if (key.equals("version")) {
- String[] sel = version.getSelection();
- java.util.List<String> selList = Arrays.asList(sel);
- selList = new ArrayList<String>(selList);
- selList.add(value);
- sel = new String[selList.size()];
- version.setSelection(selList.toArray(sel));
- } else if (key.equals("target_milestone")) { // XXX
- String[] sel = target.getSelection();
- java.util.List<String> selList = Arrays.asList(sel);
- selList = new ArrayList<String>(selList);
- selList.add(value);
- sel = new String[selList.size()];
- target.setSelection(selList.toArray(sel));
- } else if (key.equals("version")) {
- String[] sel = version.getSelection();
- java.util.List<String> selList = Arrays.asList(sel);
- selList = new ArrayList<String>(selList);
- selList.add(value);
- sel = new String[selList.size()];
- version.setSelection(selList.toArray(sel));
- } else if (key.equals("long_desc_type")) {
- if (value.equals("allwordssubstr")) {
- value = "all words";
- } else if (value.equals("anywordssubstr")) {
- value = "any word";
- }
- int index = 0;
- for (String item : commentOperation.getItems()) {
- if (item.compareTo(value) == 0) {
- break;
- }
- index++;
- }
- if (index < commentOperation.getItemCount()) {
- commentOperation.select(index);
- }
- } else if (key.equals("long_desc")) {
- commentPattern.setText(value);
- } else if (key.equals("bug_status")) {
- String[] sel = status.getSelection();
- java.util.List<String> selList = Arrays.asList(sel);
- selList = new ArrayList<String>(selList);
- selList.add(value);
- sel = new String[selList.size()];
- status.setSelection(selList.toArray(sel));
- } else if (key.equals("resolution")) {
- String[] sel = resolution.getSelection();
- java.util.List<String> selList = Arrays.asList(sel);
- selList = new ArrayList<String>(selList);
- selList.add(value);
- sel = new String[selList.size()];
- resolution.setSelection(selList.toArray(sel));
- } else if (key.equals("bug_severity")) {
- String[] sel = severity.getSelection();
- java.util.List<String> selList = Arrays.asList(sel);
- selList = new ArrayList<String>(selList);
- selList.add(value);
- sel = new String[selList.size()];
- severity.setSelection(selList.toArray(sel));
- } else if (key.equals("priority")) {
- String[] sel = priority.getSelection();
- java.util.List<String> selList = Arrays.asList(sel);
- selList = new ArrayList<String>(selList);
- selList.add(value);
- sel = new String[selList.size()];
- priority.setSelection(selList.toArray(sel));
- } else if (key.equals("ref_platform")) {
- String[] sel = hardware.getSelection();
- java.util.List<String> selList = Arrays.asList(sel);
- selList = new ArrayList<String>(selList);
- selList.add(value);
- sel = new String[selList.size()];
- hardware.setSelection(selList.toArray(sel));
- } else if (key.equals("op_sys")) {
- String[] sel = os.getSelection();
- java.util.List<String> selList = Arrays.asList(sel);
- selList = new ArrayList<String>(selList);
- selList.add(value);
- sel = new String[selList.size()];
- os.setSelection(selList.toArray(sel));
- } else if (key.equals("emailassigned_to1")) { // HACK: email
- // buttons
- // assumed to be
- // in same
- // position
- if (value.equals("1")) {
- emailButtons[0].setSelection(true);
- } else {
- emailButtons[0].setSelection(false);
- }
- } else if (key.equals("emailreporter1")) { // HACK: email
- // buttons assumed
- // to be in same
- // position
- if (value.equals("1")) {
- emailButtons[1].setSelection(true);
- } else {
- emailButtons[1].setSelection(false);
- }
- } else if (key.equals("emailcc1")) { // HACK: email buttons
- // assumed to be in same
- // position
- if (value.equals("1")) {
- emailButtons[2].setSelection(true);
- } else {
- emailButtons[2].setSelection(false);
- }
- } else if (key.equals("emaillongdesc1")) { // HACK: email
- // buttons assumed
- // to be in same
- // position
- if (value.equals("1")) {
- emailButtons[3].setSelection(true);
- } else {
- emailButtons[3].setSelection(false);
- }
- } else if (key.equals("emailtype1")) {
- int index = 0;
- for (String item : emailOperation.getItems()) {
- if (item.compareTo(value) == 0) {
- break;
- }
- index++;
- }
- if (index < emailOperation.getItemCount()) {
- emailOperation.select(index);
- }
- } else if (key.equals("email1")) {
- emailPattern.setText(value);
- } else if (key.equals("emailassigned_to2")) { // HACK: email
- // buttons
- // assumed to be
- // in same
- // position
- if (value.equals("1")) {
- emailButtons2[0].setSelection(true);
- } else {
- emailButtons2[0].setSelection(false);
- }
- } else if (key.equals("emailreporter2")) { // HACK: email
- // buttons assumed
- // to be in same
- // position
- if (value.equals("1")) {
- emailButtons2[1].setSelection(true);
- } else {
- emailButtons2[1].setSelection(false);
- }
- } else if (key.equals("emailcc2")) { // HACK: email buttons
- // assumed to be in same
- // position
- if (value.equals("1")) {
- emailButtons2[2].setSelection(true);
- } else {
- emailButtons2[2].setSelection(false);
- }
- } else if (key.equals("emaillongdesc2")) { // HACK: email
- // buttons assumed
- // to be in same
- // position
- if (value.equals("1")) {
- emailButtons2[3].setSelection(true);
- } else {
- emailButtons2[3].setSelection(false);
- }
- } else if (key.equals("emailtype2")) {
- int index = 0;
- for (String item : emailOperation2.getItems()) {
- if (item.compareTo(value) == 0) {
- break;
- }
- index++;
- }
- if (index < emailOperation2.getItemCount()) {
- emailOperation2.select(index);
- }
- } else if (key.equals("email2")) {
- emailPattern2.setText(value);
- } else if (key.equals("changedin")) {
- daysText.setText(value);
- } else if (key.equals("keywords")) {
- keywords.setText(value.replace(' ', ','));
- } else if (key.equals("keywords_type")) {
- int index = 0;
- for (String item : keywordOperationValues) {
- if (item.equals(value)) {
- keywordsOperation.select(index);
- break;
- }
- index++;
- }
- }
- }
- }
-
- private String[] nonNullArray(IDialogSettings settings, String id) {
- String[] value = settings.getArray(id);
- if (value == null) {
- return new String[] {};
- }
- return value;
- }
-
- private void restoreWidgetValues() {
- try {
- IDialogSettings settings = getDialogSettings();
- String repoId = "." + getTaskRepository().getRepositoryUrl();
- if (!restoreQueryOptions || settings.getArray(STORE_PRODUCT_ID + repoId) == null || product == null) {
- return;
- }
-
- // set widgets to stored values
- product.setSelection(nonNullArray(settings, STORE_PRODUCT_ID + repoId));
- component.setSelection(nonNullArray(settings, STORE_COMPONENT_ID + repoId));
- version.setSelection(nonNullArray(settings, STORE_VERSION_ID + repoId));
- target.setSelection(nonNullArray(settings, STORE_MSTONE_ID + repoId));
- status.setSelection(nonNullArray(settings, STORE_STATUS_ID + repoId));
- resolution.setSelection(nonNullArray(settings, STORE_RESOLUTION_ID + repoId));
- severity.setSelection(nonNullArray(settings, STORE_SEVERITY_ID + repoId));
- priority.setSelection(nonNullArray(settings, STORE_PRIORITY_ID + repoId));
- hardware.setSelection(nonNullArray(settings, STORE_HARDWARE_ID + repoId));
- os.setSelection(nonNullArray(settings, STORE_OS_ID + repoId));
- summaryOperation.select(settings.getInt(STORE_SUMMARYMATCH_ID + repoId));
- commentOperation.select(settings.getInt(STORE_COMMENTMATCH_ID + repoId));
- emailOperation.select(settings.getInt(STORE_EMAILMATCH_ID + repoId));
- for (int i = 0; i < emailButtons.length; i++) {
- emailButtons[i].setSelection(settings.getBoolean(STORE_EMAILBUTTON_ID + i + repoId));
- }
- summaryPattern.setText(settings.get(STORE_SUMMARYTEXT_ID + repoId));
- commentPattern.setText(settings.get(STORE_COMMENTTEXT_ID + repoId));
- emailPattern.setText(settings.get(STORE_EMAILADDRESS_ID + repoId));
- try {
- emailOperation2.select(settings.getInt(STORE_EMAIL2MATCH_ID + repoId));
- } catch (Exception e) {
- //ignore
- }
- for (int i = 0; i < emailButtons2.length; i++) {
- emailButtons2[i].setSelection(settings.getBoolean(STORE_EMAIL2BUTTON_ID + i + repoId));
- }
- emailPattern2.setText(settings.get(STORE_EMAIL2ADDRESS_ID + repoId));
- if (settings.get(STORE_KEYWORDS_ID + repoId) != null) {
- keywords.setText(settings.get(STORE_KEYWORDS_ID + repoId));
- keywordsOperation.select(settings.getInt(STORE_KEYWORDSMATCH_ID + repoId));
- }
- } catch (IllegalArgumentException e) {
- //ignore
- }
- }
-
- public void saveState() {
- String repoId = "." + getTaskRepository().getRepositoryUrl();
- IDialogSettings settings = getDialogSettings();
- settings.put(STORE_PRODUCT_ID + repoId, product.getSelection());
- settings.put(STORE_COMPONENT_ID + repoId, component.getSelection());
- settings.put(STORE_VERSION_ID + repoId, version.getSelection());
- settings.put(STORE_MSTONE_ID + repoId, target.getSelection());
- settings.put(STORE_STATUS_ID + repoId, status.getSelection());
- settings.put(STORE_RESOLUTION_ID + repoId, resolution.getSelection());
- settings.put(STORE_SEVERITY_ID + repoId, severity.getSelection());
- settings.put(STORE_PRIORITY_ID + repoId, priority.getSelection());
- settings.put(STORE_HARDWARE_ID + repoId, hardware.getSelection());
- settings.put(STORE_OS_ID + repoId, os.getSelection());
- settings.put(STORE_SUMMARYMATCH_ID + repoId, summaryOperation.getSelectionIndex());
- settings.put(STORE_COMMENTMATCH_ID + repoId, commentOperation.getSelectionIndex());
- settings.put(STORE_EMAILMATCH_ID + repoId, emailOperation.getSelectionIndex());
- for (int i = 0; i < emailButtons.length; i++) {
- settings.put(STORE_EMAILBUTTON_ID + i + repoId, emailButtons[i].getSelection());
- }
- settings.put(STORE_SUMMARYTEXT_ID + repoId, summaryPattern.getText());
- settings.put(STORE_COMMENTTEXT_ID + repoId, commentPattern.getText());
- settings.put(STORE_EMAILADDRESS_ID + repoId, emailPattern.getText());
- settings.put(STORE_EMAIL2ADDRESS_ID + repoId, emailPattern2.getText());
- settings.put(STORE_EMAIL2MATCH_ID + repoId, emailOperation2.getSelectionIndex());
- for (int i = 0; i < emailButtons2.length; i++) {
- settings.put(STORE_EMAIL2BUTTON_ID + i + repoId, emailButtons2[i].getSelection());
- }
-
- settings.put(STORE_KEYWORDS_ID + repoId, keywords.getText());
- settings.put(STORE_KEYWORDSMATCH_ID + repoId, keywordsOperation.getSelectionIndex());
- // settings.put(STORE_REPO_ID, repositoryCombo.getText());
- }
-
- /* Testing hook to see if any products are present */
- public int getProductCount() throws Exception {
- return product.getItemCount();
- }
-
- public boolean isRestoreQueryOptions() {
- return restoreQueryOptions;
- }
-
- public void setRestoreQueryOptions(boolean restoreQueryOptions) {
- this.restoreQueryOptions = restoreQueryOptions;
- }
-
- /**
- * Adds content assist to the given text field.
- *
- * @param text
- * text field to decorate.
- * @param proposalProvider
- * instance providing content proposals
- * @return the ContentAssistCommandAdapter for the field.
- */
- // API 3.0 get this from the AttributeEditorToolkit
- private ContentAssistCommandAdapter applyContentAssist(Combo text, IContentProposalProvider proposalProvider) {
- ControlDecoration controlDecoration = new ControlDecoration(text, (SWT.TOP | SWT.LEFT));
- controlDecoration.setMarginWidth(0);
- controlDecoration.setShowHover(true);
- controlDecoration.setShowOnlyOnFocus(true);
-
- FieldDecoration contentProposalImage = FieldDecorationRegistry.getDefault().getFieldDecoration(
- FieldDecorationRegistry.DEC_CONTENT_PROPOSAL);
- controlDecoration.setImage(contentProposalImage.getImage());
-
- ComboContentAdapter textContentAdapter = new ComboContentAdapter();
-
- ContentAssistCommandAdapter adapter = new ContentAssistCommandAdapter(text, textContentAdapter,
- proposalProvider, "org.eclipse.ui.edit.text.contentAssist.proposals", new char[0]);
-
- IBindingService bindingService = (IBindingService) PlatformUI.getWorkbench().getService(IBindingService.class);
- controlDecoration.setDescriptionText(NLS.bind("Content Assist Available ({0})",
- bindingService.getBestActiveBindingFormattedFor(adapter.getCommandId())));
-
- return adapter;
- }
-
- /**
- * Creates an IContentProposalProvider to provide content assist proposals for the given attribute.
- *
- * @param attribute
- * attribute for which to provide content assist.
- * @return the IContentProposalProvider.
- */
- // API 3.0 get this from the AttributeEditorToolkit?
- private IContentProposalProvider createContentProposalProvider() {
- return new PersonProposalProvider(getTaskRepository().getRepositoryUrl(),
- getTaskRepository().getConnectorKind());
- }
-
- // API 3.0 get this from the AttributeEditorToolkit?
- private ILabelProvider createProposalLabelProvider() {
- return new PersonProposalLabelProvider();
- }
-
- private String[] convertStringListToArray(java.util.List<String> stringList) {
- return stringList.toArray(new String[stringList.size()]);
- }
-
- private void updateConfiguration(final boolean force) {
- if (getTaskRepository() != null) {
- IRunnableWithProgress updateRunnable = new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- if (monitor == null) {
- monitor = new NullProgressMonitor();
- }
- try {
- monitor.beginTask("Updating search options...", IProgressMonitor.UNKNOWN);
- repositoryConfiguration = BugzillaCorePlugin.getRepositoryConfiguration(getTaskRepository(),
- force, monitor);
- } catch (final Exception e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
- };
-
- try {
- // TODO: make cancelable (bug 143011)
- if (getContainer() != null) {
- getContainer().run(true, true, updateRunnable);
- } else if (getSearchContainer() != null) {
- getSearchContainer().getRunnableContext().run(true, true, updateRunnable);
- } else {
- IProgressService service = PlatformUI.getWorkbench().getProgressService();
- service.busyCursorWhile(updateRunnable);
- }
-
- } catch (InvocationTargetException ex) {
- Shell shell = null;
- if (getWizard() != null && getWizard().getContainer() != null) {
- shell = getWizard().getContainer().getShell();
- }
- if (shell == null && getControl() != null) {
- shell = getControl().getShell();
- }
- if (ex.getCause() instanceof CoreException) {
- CoreException cause = ((CoreException) ex.getCause());
- if (cause.getStatus() instanceof RepositoryStatus
- && ((RepositoryStatus) cause.getStatus()).isHtmlMessage()) {
- // TOOD: use StatusManager
-
-// this.setControlsEnabled(false);
-// scontainer.setPerformActionEnabled(false);
- if (shell != null) {
- shell.setEnabled(false);
- }
- WebBrowserDialog dialog = new WebBrowserDialog(shell, "Error updating search options", null,
- cause.getStatus().getMessage(), NONE, new String[] { IDialogConstants.OK_LABEL }, 0,
- ((RepositoryStatus) cause.getStatus()).getHtmlMessage());
- dialog.setBlockOnOpen(true);
- dialog.open();
- if (shell != null) {
- shell.setEnabled(true);
- }
- return;
-// this.setPageComplete(this.isPageComplete());
-// this.setControlsEnabled(true);
- } else {
- StatusHandler.log(new Status(IStatus.ERROR, BugzillaUiPlugin.PLUGIN_ID, cause.getMessage(),
- cause));
- }
- }
- if (ex.getCause() instanceof OperationCanceledException) {
- return;
- }
-
- MessageDialog.openError(shell, "Error updating search options", "Error was: "
- + ex.getCause().getMessage());
- return;
-
- } catch (InterruptedException ex) {
- return;
- }
-
- updateAttributesFromConfiguration(null);
- }
- }
-
- @Override
- public String getQueryTitle() {
- return (queryTitle != null) ? queryTitle.getText() : "";
- }
-
- private void setSelection(List listControl, String[] selection) {
- for (String item : selection) {
- int index = listControl.indexOf(item);
- if (index > -1) {
- listControl.select(index);
- }
- }
- if (listControl.getSelectionCount() > 0) {
- listControl.showSelection();
- } else {
- listControl.select(0);
- listControl.showSelection();
- listControl.deselectAll();
- }
-
- }
-
- @Override
- public void applyTo(IRepositoryQuery query) {
- query.setUrl(getQueryURL(getTaskRepository(), getQueryParameters()));
- query.setSummary(getQueryTitle());
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSeveritySearchSorter.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSeveritySearchSorter.java
deleted file mode 100644
index 3a26d4c5d..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSeveritySearchSorter.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.ui.search;
-
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.mylyn.internal.bugzilla.ui.BugzillaUiPlugin;
-
-/**
- * Sorts results of Bugzilla search by bug severity.
- */
-public class BugzillaSeveritySearchSorter extends ViewerSorter {
-
- /**
- * Returns a negative, zero, or positive number depending on whether the first bug's severity goes before, is the
- * same as, or goes after the second element's severity.
- * <p>
- *
- * @see org.eclipse.jface.viewers.ViewerSorter#compare(org.eclipse.jface.viewers.Viewer, java.lang.Object,
- * java.lang.Object)
- */
- @Override
- public int compare(Viewer viewer, Object e1, Object e2) {
- try {
- // cast the object and get its severity
- IMarker entry1 = (IMarker) e1;
- Integer severity1 = (Integer) entry1.getAttribute(BugzillaUiPlugin.HIT_MARKER_ATTR_SEVERITY);
-
- // cast the other object and get its severity
- IMarker entry2 = (IMarker) e2;
- Integer severity2 = (Integer) entry2.getAttribute(BugzillaUiPlugin.HIT_MARKER_ATTR_SEVERITY);
-
- // if neither is null, compare the bugs severities
- if (severity1 != null && severity2 != null) {
- return severity1.compareTo(severity2);
- }
- } catch (Exception ignored) {
- // ignore if there is a problem
- }
-
- // if that didn't work, use the default compare method
- return super.compare(viewer, e1, e2);
- }
-
- /**
- * Returns the category of the given element. The category is a number used to allocate elements to bins; the bins
- * are arranged in ascending numeric order. The elements within a bin are arranged via a second level sort
- * criterion.
- * <p>
- *
- * @see org.eclipse.jface.viewers.ViewerSorter#category(Object)
- */
- @Override
- public int category(Object element) {
- try {
- IMarker marker = (IMarker) element;
-
- // return the bugs id
- if (marker.getType().equals(BugzillaUiPlugin.HIT_MARKER_ID)) {
- return ((Integer) marker.getAttribute(BugzillaUiPlugin.HIT_MARKER_ATTR_ID)).intValue();
- }
- } catch (Exception ignored) {
- // ignore if there is a problem
- }
-
- // if that didn't work, use the default category method
- return super.category(element);
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaStateSearchSorter.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaStateSearchSorter.java
deleted file mode 100644
index cb9715516..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaStateSearchSorter.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.ui.search;
-
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.mylyn.internal.bugzilla.ui.BugzillaUiPlugin;
-
-/**
- * Sorts results of Bugzilla search by bug state.
- */
-public class BugzillaStateSearchSorter extends ViewerSorter {
-
- /**
- * Returns a negative, zero, or positive number depending on whether the first bug's state goes before, is the same
- * as, or goes after the second element's state.
- * <p>
- *
- * @see org.eclipse.jface.viewers.ViewerSorter#compare(org.eclipse.jface.viewers.Viewer, java.lang.Object,
- * java.lang.Object)
- */
- @Override
- public int compare(Viewer viewer, Object e1, Object e2) {
- try {
- // cast the object and get its state
- IMarker entry1 = (IMarker) e1;
- Integer state1 = (Integer) entry1.getAttribute(BugzillaUiPlugin.HIT_MARKER_ATTR_STATE);
-
- // cast the other object and get its state
- IMarker entry2 = (IMarker) e2;
- Integer state2 = (Integer) entry2.getAttribute(BugzillaUiPlugin.HIT_MARKER_ATTR_STATE);
-
- // if neither is null, compare the bugs states
- if (state1 != null && state2 != null) {
- // compare the states
- int rc = state1.compareTo(state2);
-
- // compare the resolution if the states are the same
- if (rc == 0) {
- // get the resolution of the bug
- Integer result1 = (Integer) entry1.getAttribute(BugzillaUiPlugin.HIT_MARKER_ATTR_RESULT);
-
- // get the resolution of the other bug
- Integer result2 = (Integer) entry2.getAttribute(BugzillaUiPlugin.HIT_MARKER_ATTR_RESULT);
-
- // if neither state is null, compare them
- if (result1 != null && result2 != null) {
- rc = result1.compareTo(result2);
- }
- }
- return rc;
- }
-
- } catch (Exception ignored) {
- // ignore if there is a problem
- }
-
- // if that didn't work, use the default compare method
- return super.compare(viewer, e1, e2);
- }
-
- /**
- * Returns the category of the given element. The category is a number used to allocate elements to bins; the bins
- * are arranged in ascending numeric order. The elements within a bin are arranged via a second level sort
- * criterion.
- * <p>
- *
- * @see org.eclipse.jface.viewers.ViewerSorter#category(Object)
- */
- @Override
- public int category(Object element) {
- try {
- IMarker marker = (IMarker) element;
-
- // return the bugs id
- if (marker.getType().equals(BugzillaUiPlugin.HIT_MARKER_ID)) {
- return ((Integer) marker.getAttribute(BugzillaUiPlugin.HIT_MARKER_ATTR_ID)).intValue();
- }
- } catch (Exception ignored) {
- // ignore if there is a problem
- }
-
- // if that didn't work, use the default category method
- return super.category(element);
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaConnectorUi.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaConnectorUi.java
deleted file mode 100644
index 379fe9c62..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaConnectorUi.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.ui.tasklist;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.Region;
-import org.eclipse.jface.text.hyperlink.IHyperlink;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaAttribute;
-import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants;
-import org.eclipse.mylyn.internal.bugzilla.ui.BugzillaImages;
-import org.eclipse.mylyn.internal.bugzilla.ui.search.BugzillaSearchPage;
-import org.eclipse.mylyn.internal.bugzilla.ui.wizard.NewBugzillaTaskWizard;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITaskComment;
-import org.eclipse.mylyn.tasks.core.ITaskMapping;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.LegendElement;
-import org.eclipse.mylyn.tasks.ui.TaskHyperlink;
-import org.eclipse.mylyn.tasks.ui.wizards.AbstractRepositoryQueryPage;
-import org.eclipse.mylyn.tasks.ui.wizards.ITaskRepositoryPage;
-import org.eclipse.mylyn.tasks.ui.wizards.RepositoryQueryWizard;
-
-/**
- * @author Mik Kersten
- * @author Eugene Kuleshov
- * @author Rob Elves
- */
-public class BugzillaConnectorUi extends AbstractRepositoryConnectorUi {
-
- private static final String regexp = "(duplicate of|bug|task)(\\s#|#|#\\s|\\s|)(\\s\\d+|\\d+)";
-
- private static final Pattern PATTERN = Pattern.compile(regexp, Pattern.CASE_INSENSITIVE);
-
- @Override
- public String getAccountCreationUrl(TaskRepository taskRepository) {
- return taskRepository.getRepositoryUrl() + "/createaccount.cgi";
- }
-
- @Override
- public String getAccountManagementUrl(TaskRepository taskRepository) {
- return taskRepository.getRepositoryUrl() + "/userprefs.cgi";
- }
-
- @Override
- public String getTaskHistoryUrl(TaskRepository taskRepository, ITask task) {
- return taskRepository.getRepositoryUrl() + IBugzillaConstants.URL_BUG_ACTIVITY + task.getTaskId();
- }
-
- @Override
- public String getReplyText(TaskRepository taskRepository, ITask task, ITaskComment taskComment, boolean includeTask) {
- if (taskComment == null) {
- return "(In reply to comment #0)";
- } else if (includeTask) {
- return "(In reply to " + task.getTaskKey() + " comment #" + taskComment.getNumber() + ")";
- } else {
- return "(In reply to comment #" + taskComment.getNumber() + ")";
- }
- }
-
- private static final int TASK_NUM_GROUP = 3;
-
- @Override
- public List<LegendElement> getLegendElements() {
- List<LegendElement> legendItems = new ArrayList<LegendElement>();
- legendItems.add(LegendElement.createTask("blocker", BugzillaImages.OVERLAY_CRITICAL));
- legendItems.add(LegendElement.createTask("critical", BugzillaImages.OVERLAY_CRITICAL));
- legendItems.add(LegendElement.createTask("major", BugzillaImages.OVERLAY_MAJOR));
- legendItems.add(LegendElement.createTask("enhancement", BugzillaImages.OVERLAY_ENHANCEMENT));
- legendItems.add(LegendElement.createTask("trivial", BugzillaImages.OVERLAY_MINOR));
- return legendItems;
- }
-
- @Override
- public ImageDescriptor getTaskKindOverlay(ITask task) {
- String severity = task.getAttribute(BugzillaAttribute.BUG_SEVERITY.getKey());
- if (severity != null) {
- // XXX: refactor to use configuration
- if ("blocker".equals(severity) || "critical".equals(severity)) {
- return BugzillaImages.OVERLAY_CRITICAL;
- } else if ("major".equals(severity)) {
- return BugzillaImages.OVERLAY_MAJOR;
- } else if ("enhancement".equals(severity)) {
- return BugzillaImages.OVERLAY_ENHANCEMENT;
- } else if ("trivial".equals(severity) || "minor".equals(severity)) {
- return BugzillaImages.OVERLAY_MINOR;
- } else {
- return null;
- }
- }
- return super.getTaskKindOverlay(task);
- }
-
- @Override
- public IHyperlink[] findHyperlinks(TaskRepository repository, String text, int lineOffset, int regionOffset) {
- ArrayList<IHyperlink> hyperlinksFound = new ArrayList<IHyperlink>();
-
- Matcher m = PATTERN.matcher(text);
- while (m.find()) {
- if (lineOffset >= m.start() && lineOffset <= m.end()) {
- IHyperlink link = extractHyperlink(repository, regionOffset, m);
- if (link != null) {
- hyperlinksFound.add(link);
- }
- }
- }
-
- if (hyperlinksFound.size() > 0) {
- return hyperlinksFound.toArray(new IHyperlink[1]);
- }
- return null;
- }
-
- @Override
- public String getTaskKindLabel(ITask repositoryTask) {
- return IBugzillaConstants.BUGZILLA_TASK_KIND;
- }
-
- @Override
- public ITaskRepositoryPage getSettingsPage(TaskRepository taskRepository) {
- return new BugzillaRepositorySettingsPage(taskRepository);
- }
-
- @Override
- public AbstractRepositoryQueryPage getSearchPage(TaskRepository repository, IStructuredSelection selection) {
- return new BugzillaSearchPage(repository);
- }
-
- @Override
- public IWizard getNewTaskWizard(TaskRepository taskRepository, ITaskMapping selection) {
- return new NewBugzillaTaskWizard(taskRepository, selection);
- }
-
- @Override
- public IWizard getQueryWizard(TaskRepository repository, IRepositoryQuery query) {
- RepositoryQueryWizard wizard = new RepositoryQueryWizard(repository);
- if (query == null) {
- wizard.addPage(new BugzillaQueryTypeWizardPage(repository));
- } else {
- if (isCustomQuery(query)) {
- wizard.addPage(new BugzillaCustomQueryWizardPage(repository, query));
- } else {
- wizard.addPage(new BugzillaSearchPage(repository, query));
- }
- }
- return wizard;
- }
-
- @Override
- public boolean hasSearchPage() {
- return true;
- }
-
- @Override
- public String getConnectorKind() {
- return BugzillaCorePlugin.CONNECTOR_KIND;
- }
-
- private boolean isCustomQuery(IRepositoryQuery query2) {
- String custom = query2.getAttribute(IBugzillaConstants.ATTRIBUTE_BUGZILLA_QUERY_CUSTOM);
- return custom != null && custom.equals(Boolean.TRUE.toString());
- }
-
- private static IHyperlink extractHyperlink(TaskRepository repository, int regionOffset, Matcher m) {
-
- int start = -1;
-
- if (m.group().startsWith("duplicate")) {
- start = m.start() + m.group().indexOf(m.group(TASK_NUM_GROUP));
- } else {
- start = m.start();
- }
-
- int end = m.end();
-
- if (end == -1) {
- end = m.group().length();
- }
-
- try {
-
- String bugId = m.group(TASK_NUM_GROUP).trim();
- start += regionOffset;
- end += regionOffset;
-
- IRegion sregion = new Region(start, end - start);
- return new TaskHyperlink(sregion, repository, bugId);
-
- } catch (NumberFormatException e) {
- return null;
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaCustomQueryDialog.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaCustomQueryDialog.java
deleted file mode 100644
index 54b4f44cd..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaCustomQueryDialog.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.bugzilla.ui.tasklist;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-/**
- *
- * @author Shawn Minto
- * @author Mik Kersten (some hardening of prototype)
- */
-public class BugzillaCustomQueryDialog extends Dialog {
- private String url;
-
- private String name = "";
-
- private String startingUrl = null;
-
- private String maxHits;
-
- private Text maxHitsText;
-
- private Text nameText;
-
- private Text queryText;
-
- public BugzillaCustomQueryDialog(Shell parentShell, String queryString, String description, String maxHits) {
- super(parentShell);
- this.startingUrl = queryString;
- this.maxHits = maxHits;
- this.name = description;
- }
-
- public String getName() {
- return name;
- }
-
- public String getUrl() {
- return url;
- }
-
- public String getMaxHits() {
- return maxHits;
- }
-
- @Override
- protected Control createContents(Composite parent) {
- Composite custom = new Composite(parent, SWT.NONE);
- GridLayout gl = new GridLayout(2, false);
- custom.setLayout(gl);
-
- Label l = new Label(custom, SWT.NONE);
- l.setText("Bugzilla Query Category Name");
-
- nameText = new Text(custom, SWT.BORDER | SWT.SINGLE);
- if (name != null) {
- nameText.setText(name);
- }
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.widthHint = 300;
- nameText.setLayoutData(gd);
-
- l = new Label(custom, SWT.NONE);
- l.setText("Max Hits Returned (-1 means all)");
-
- maxHitsText = new Text(custom, SWT.BORDER | SWT.SINGLE);
- if (maxHits != null) {
- maxHitsText.setText(maxHits);
- }
- gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.widthHint = 300;
- maxHitsText.setLayoutData(gd);
-
- l = new Label(custom, SWT.NONE);
- l.setText("Query URL");
-
- queryText = new Text(custom, SWT.BORDER | SWT.SINGLE);
- if (startingUrl != null) {
- queryText.setText(startingUrl);
- }
- gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.widthHint = 300;
- queryText.setLayoutData(gd);
-
- Control c = super.createContents(parent);
-
- return c;
- }
-
- @Override
- protected void okPressed() {
- // TODO validate the values
- url = queryText.getText();
- name = nameText.getText();
- maxHits = maxHitsText.getText();
- super.okPressed();
- }
-
-}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaCustomQueryWizardPage.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaCustomQueryWizardPage.java
deleted file mode 100644
index acafe4946..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaCustomQueryWizardPage.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.ui.tasklist;
-
-import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.ui.wizards.AbstractRepositoryQueryPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * @author Rob Elves
- * @author Mik Kersten
- * @author Eugene Kuleshov
- */
-public class BugzillaCustomQueryWizardPage extends AbstractRepositoryQueryPage {
-
- private static final String LABEL_CUSTOM_TITLE = "&Query Title:";
-
- private static final String LABEL_CUSTOM_QUERY = "Query &URL";
-
- private static final String TITLE = "Create query from URL";
-
- private static final String DESCRIPTION = "Enter the title and URL for the query";
-
- private Text queryText;
-
- private final IRepositoryQuery query;
-
- private Text queryTitle;
-
- public BugzillaCustomQueryWizardPage(TaskRepository repository, IRepositoryQuery query) {
- super(TITLE, repository);
- this.query = query;
- setTitle(TITLE);
- setDescription(DESCRIPTION);
- setImageDescriptor(TasksUiImages.BANNER_REPOSITORY);
- }
-
- public BugzillaCustomQueryWizardPage(TaskRepository repository) {
- this(repository, null);
- }
-
- public void createControl(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- composite.setLayout(new GridLayout(2, false));
- setControl(composite);
-
- ModifyListener modifyListener = new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- setPageComplete(isPageComplete());
- }
- };
-
- final Label queryTitleLabel = new Label(composite, SWT.NONE);
- queryTitleLabel.setText(LABEL_CUSTOM_TITLE);
-
- queryTitle = new Text(composite, SWT.BORDER);
- queryTitle.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
- queryTitle.addModifyListener(modifyListener);
- queryTitle.setFocus();
-
- final Label queryUrlLabel = new Label(composite, SWT.NONE);
- queryUrlLabel.setText(LABEL_CUSTOM_QUERY);
-
- queryText = new Text(composite, SWT.BORDER);
- final GridData gd_queryText = new GridData(SWT.FILL, SWT.CENTER, true, false);
- gd_queryText.widthHint = 300;
- queryText.setLayoutData(gd_queryText);
- queryText.addModifyListener(modifyListener);
-
- if (query != null) {
- queryTitle.setText(query.getSummary());
- queryText.setText(query.getUrl());
- }
- }
-
- @Override
- public String getQueryTitle() {
- return queryTitle.getText();
- }
-
- @Override
- public boolean canFlipToNextPage() {
- return false;
- }
-
- @Override
- public boolean isPageComplete() {
- if (super.isPageComplete()) {
- if (queryText.getText().length() > 0) {
- return true;
- }
- setErrorMessage("Please specify Query URL");
- }
- return false;
- }
-
- @Override
- public void applyTo(IRepositoryQuery query) {
- query.setSummary(this.getQueryTitle());
- query.setUrl(queryText.getText());
- query.setAttribute(IBugzillaConstants.ATTRIBUTE_BUGZILLA_QUERY_CUSTOM, Boolean.TRUE.toString());
- }
-
-}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaQueryTypeWizardPage.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaQueryTypeWizardPage.java
deleted file mode 100644
index ab41c0a6c..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaQueryTypeWizardPage.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.ui.tasklist;
-
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.mylyn.internal.bugzilla.ui.search.BugzillaSearchPage;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * @author Rob Elves
- */
-public class BugzillaQueryTypeWizardPage extends WizardPage {
-
- private static final String BUTTON_LABEL_QUERY = "&Create query from existing URL";
-
- private static final String BUTTON_LABEL_FORM = "Cre&ate query using form";
-
- private static final String TITLE = "Choose query type";
-
- private static final String DESCRIPTION = "Select from the available query types.";
-
- private Button buttonCustom;
-
- private Button buttonForm;
-
- private Composite composite;
-
- private final BugzillaCustomQueryWizardPage customPage;
-
- private final BugzillaSearchPage searchPage;
-
- public BugzillaQueryTypeWizardPage(TaskRepository repository) {
- super(TITLE);
- setTitle(TITLE);
- setDescription(DESCRIPTION);
- setImageDescriptor(TasksUiImages.BANNER_REPOSITORY);
- customPage = new BugzillaCustomQueryWizardPage(repository);
- searchPage = new BugzillaSearchPage(repository);
- searchPage.setRestoreQueryOptions(false);
- }
-
- public void createControl(Composite parent) {
- composite = new Composite(parent, SWT.NONE);
- GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
- gridData.grabExcessVerticalSpace = false;
- composite.setLayoutData(gridData);
- composite.setLayout(new GridLayout(1, false));
-
- buttonForm = new Button(composite, SWT.RADIO);
- buttonForm.setText(BUTTON_LABEL_FORM);
- buttonForm.setSelection(true);
-
- buttonCustom = new Button(composite, SWT.RADIO);
- buttonCustom.setText(BUTTON_LABEL_QUERY);
-
- setPageComplete(true);
- setControl(composite);
- }
-
- @Override
- public IWizardPage getNextPage() {
- if (buttonForm.getSelection()) {
- searchPage.setWizard(this.getWizard());
- return searchPage;
- }
- customPage.setWizard(this.getWizard());
- return customPage;
- }
-
-}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositorySettingsPage.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositorySettingsPage.java
deleted file mode 100644
index 187eb17b1..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositorySettingsPage.java
+++ /dev/null
@@ -1,541 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.ui.tasklist;
-
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.List;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaClient;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaClientFactory;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaLanguageSettings;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaStatus;
-import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants;
-import org.eclipse.mylyn.internal.bugzilla.core.RepositoryConfiguration;
-import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants.BugzillaServerVersion;
-import org.eclipse.mylyn.internal.bugzilla.ui.BugzillaUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.core.RepositoryStatus;
-import org.eclipse.mylyn.tasks.core.RepositoryTemplate;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.wizards.AbstractRepositorySettingsPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Mik Kersten
- * @author Rob Elves
- */
-public class BugzillaRepositorySettingsPage extends AbstractRepositorySettingsPage {
-
- private static final String TOOLTIP_AUTODETECTION_ENABLED = "Override auto detection of Platform and OS for new bug reports.";
-
- private static final String TOOLTIP_AUTODETECTION_DISABLED = "Available once repository has been created.";
-
- //private static final String TOOLTIP_CACHED_CONFIGURATION = "Use for repositories that explicitly state that they support this customization.";
-
- //private static final String LABEL_CACHED_CONFIGURATION = "Cached configuration:";
-
- private static final String LABEL_SHORT_LOGINS = "Local users enabled:";
-
- public static final String LABEL_AUTOMATIC_VERSION = "Automatic (Use Validate Settings)";
-
- private static final String TITLE = "Bugzilla Repository Settings";
-
- private static final String DESCRIPTION = "Example: https://bugs.eclipse.org/bugs (do not include index.cgi)";
-
- protected Combo repositoryVersionCombo;
-
- protected Button autodetectPlatformOS;
-
- protected Combo defaultPlatformCombo;
-
- protected Combo defaultOSCombo;
-
- private Button cleanQAContact;
-
- //private Button cachedConfigButton;
-
- private RepositoryConfiguration repositoryConfiguration = null;
-
- private String platform = null;
-
- private String os = null;
-
- private Combo languageSettingCombo;
-
- public BugzillaRepositorySettingsPage(TaskRepository taskRepository) {
- super(TITLE, DESCRIPTION, taskRepository);
- setNeedsAnonymousLogin(true);
- setNeedsEncoding(true);
- setNeedsTimeZone(false);
- setNeedsHttpAuth(true);
- }
-
- @Override
- protected void repositoryTemplateSelected(RepositoryTemplate template) {
- repositoryLabelEditor.setStringValue(template.label);
- setUrl(template.repositoryUrl);
- // setAnonymous(info.anonymous);
- setBugzillaVersion(template.version);
- if (template.characterEncoding != null) {
- setEncoding(template.characterEncoding);
- }
- getContainer().updateButtons();
-
- }
-
- @Override
- protected void createAdditionalControls(Composite parent) {
- addRepositoryTemplatesToServerUrlCombo();
-
- Label repositoryVersionLabel = new Label(parent, SWT.NONE);
- repositoryVersionLabel.setText("Repository version: ");
- repositoryVersionCombo = new Combo(parent, SWT.READ_ONLY);
-
- repositoryVersionCombo.add(LABEL_AUTOMATIC_VERSION);
-
- for (BugzillaServerVersion version : BugzillaServerVersion.values()) {
- repositoryVersionCombo.add(version.toString());
- }
- if (repository != null && repositoryVersionCombo.indexOf(repository.getVersion()) >= 0) {
- repositoryVersionCombo.select(repositoryVersionCombo.indexOf(repository.getVersion()));
- } else {
-
- int defaultIndex = repositoryVersionCombo.indexOf(IBugzillaConstants.SERVER_VERSION_DEFAULT.toString());
- if (defaultIndex != -1) {
- repositoryVersionCombo.select(defaultIndex);
- setVersion(IBugzillaConstants.SERVER_VERSION_DEFAULT.toString());
- } else {
- defaultIndex = repositoryVersionCombo.getItemCount() - 1;
- }
- repositoryVersionCombo.select(defaultIndex);
- setVersion(repositoryVersionCombo.getItem(defaultIndex));
- isPageComplete();
- if (getWizard() != null) {
- getWizard().getContainer().updateButtons();
- }
- }
-
- repositoryVersionCombo.addSelectionListener(new SelectionListener() {
-
- public void widgetSelected(SelectionEvent e) {
- if (repositoryVersionCombo.getSelectionIndex() >= 0) {
- setVersion(repositoryVersionCombo.getItem(repositoryVersionCombo.getSelectionIndex()));
- isPageComplete();
- if (getWizard() != null) {
- getWizard().getContainer().updateButtons();
- }
- }
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- // ignore
- }
- });
-
- Label shortLoginLabel = new Label(parent, SWT.NONE);
- shortLoginLabel.setText(LABEL_SHORT_LOGINS);
- cleanQAContact = new Button(parent, SWT.CHECK | SWT.LEFT);
- if (repository != null) {
- boolean shortLogin = Boolean.parseBoolean(repository.getProperty(IBugzillaConstants.REPOSITORY_SETTING_SHORT_LOGIN));
- cleanQAContact.setSelection(shortLogin);
- }
-
-// Label cachedConfigLabel = new Label(parent, SWT.NONE);
-// cachedConfigLabel.setText(LABEL_CACHED_CONFIGURATION);
-// cachedConfigLabel.setToolTipText(TOOLTIP_CACHED_CONFIGURATION);
-// cachedConfigButton = new Button(parent, SWT.CHECK | SWT.LEFT);
-// if (repository != null) {
-// boolean isCached = true;
-// String oldTimestamp = repository.getProperty(IBugzillaConstants.PROPERTY_CONFIGTIMESTAMP);
-// if (oldTimestamp != null && oldTimestamp.equals(IBugzillaConstants.TIMESTAMP_NOT_AVAILABLE)) {
-// isCached = false;
-// }
-// cachedConfigButton.setSelection(isCached);
-// }
-
- if (null != repository) {
- repositoryConfiguration = BugzillaCorePlugin.getRepositoryConfiguration(repository.getRepositoryUrl());
- platform = repository.getProperty(IBugzillaConstants.BUGZILLA_DEF_PLATFORM);
- os = repository.getProperty(IBugzillaConstants.BUGZILLA_DEF_OS);
- }
-
- Label defaultPlatformLabel = new Label(parent, SWT.NONE);
- defaultPlatformLabel.setText("Autodetect platform and os");
- if (null == repository) {
- defaultPlatformLabel.setToolTipText(TOOLTIP_AUTODETECTION_DISABLED);
- } else {
- defaultPlatformLabel.setToolTipText(TOOLTIP_AUTODETECTION_ENABLED);
- }
-
- Composite platformOSContainer = new Composite(parent, SWT.NONE);
- GridLayout gridLayout = new GridLayout(3, false);
- gridLayout.marginWidth = 0;
- gridLayout.marginHeight = 0;
- platformOSContainer.setLayout(gridLayout);
-
- autodetectPlatformOS = new Button(platformOSContainer, SWT.CHECK);
- autodetectPlatformOS.addSelectionListener(new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (autodetectPlatformOS.isEnabled() && repositoryConfiguration == null
- && !autodetectPlatformOS.getSelection()) {
- try {
- getWizard().getContainer().run(true, false, new IRunnableWithProgress() {
-
- public void run(IProgressMonitor monitor) throws InvocationTargetException,
- InterruptedException {
- try {
- monitor.beginTask("Retrieving repository configuration", IProgressMonitor.UNKNOWN);
- repositoryConfiguration = BugzillaCorePlugin.getRepositoryConfiguration(repository,
- false, monitor);
- if (repositoryConfiguration != null) {
- platform = repository.getProperty(IBugzillaConstants.BUGZILLA_DEF_PLATFORM);
- os = repository.getProperty(IBugzillaConstants.BUGZILLA_DEF_OS);
- PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
-
- public void run() {
- populatePlatformCombo();
- populateOsCombo();
- }
- });
- }
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
-
- }
-
- });
- } catch (InvocationTargetException e1) {
- if (e1.getCause() != null) {
- setErrorMessage(e1.getCause().getMessage());
- }
- } catch (InterruptedException e1) {
- // ignore
- }
- }
- defaultPlatformCombo.setEnabled(!autodetectPlatformOS.getSelection());
- defaultOSCombo.setEnabled(!autodetectPlatformOS.getSelection());
- }
-
- });
- autodetectPlatformOS.setEnabled(null != repository);
- if (null == repository) {
- autodetectPlatformOS.setToolTipText(TOOLTIP_AUTODETECTION_DISABLED);
- } else {
- autodetectPlatformOS.setToolTipText(TOOLTIP_AUTODETECTION_ENABLED);
- }
- autodetectPlatformOS.setSelection(null == platform && null == os);
-
- defaultPlatformCombo = new Combo(platformOSContainer, SWT.READ_ONLY);
- populatePlatformCombo();
-
- defaultOSCombo = new Combo(platformOSContainer, SWT.READ_ONLY);
- populateOsCombo();
-
- new Label(parent, SWT.NONE).setText("Language: ");
- languageSettingCombo = new Combo(parent, SWT.DROP_DOWN);
-
- for (BugzillaLanguageSettings bugzillaLanguageSettings : BugzillaCorePlugin.getDefault().getLanguageSettings()) {
- languageSettingCombo.add(bugzillaLanguageSettings.getLanguageName());
- }
- if (repository != null) {
- String language = repository.getProperty(IBugzillaConstants.BUGZILLA_LANGUAGE_SETTING);
- if (language != null && !language.equals("") && languageSettingCombo.indexOf(language) >= 0) {
- languageSettingCombo.select(languageSettingCombo.indexOf(language));
- }
- }
- if (languageSettingCombo.getSelectionIndex() == -1) {
- if (languageSettingCombo.indexOf(IBugzillaConstants.DEFAULT_LANG) >= 0) {
- languageSettingCombo.select(languageSettingCombo.indexOf(IBugzillaConstants.DEFAULT_LANG));
- }
- }
- }
-
- private void populateOsCombo() {
- if (null != repositoryConfiguration && defaultOSCombo != null) {
- defaultOSCombo.removeAll();
- List<String> optionValues = repositoryConfiguration.getOSs();
- for (String option : optionValues) {
- defaultOSCombo.add(option.toString());
- }
- if (null != os && defaultOSCombo.indexOf(os) >= 0) {
- defaultOSCombo.select(defaultOSCombo.indexOf(os));
- } else {
- // remove value if no longer exists and set to All!
- repository.removeProperty(IBugzillaConstants.BUGZILLA_DEF_OS);
- defaultOSCombo.select(0);
- }
- } else {
- defaultOSCombo.add("All");
- defaultOSCombo.select(0);
- }
- defaultOSCombo.getParent().pack(true);
- defaultOSCombo.setEnabled(!autodetectPlatformOS.getSelection());
- }
-
- private void populatePlatformCombo() {
- if (null != repositoryConfiguration && defaultPlatformCombo != null) {
- defaultPlatformCombo.removeAll();
- List<String> optionValues = repositoryConfiguration.getPlatforms();
- for (String option : optionValues) {
- defaultPlatformCombo.add(option.toString());
- }
- if (null != platform && defaultPlatformCombo.indexOf(platform) >= 0) {
- defaultPlatformCombo.select(defaultPlatformCombo.indexOf(platform));
- } else {
- // remove value if no longer exists and set to All!
- repository.removeProperty(IBugzillaConstants.BUGZILLA_DEF_PLATFORM);
- defaultPlatformCombo.select(0);
- }
- } else {
- defaultPlatformCombo.add("All");
- defaultPlatformCombo.select(0);
- }
- defaultPlatformCombo.getParent().pack(true);
- defaultPlatformCombo.setEnabled(!autodetectPlatformOS.getSelection());
- }
-
- public void setBugzillaVersion(String version) {
- if (version == null) {
- repositoryVersionCombo.select(0);
- } else {
- int i = repositoryVersionCombo.indexOf(version.toString());
- if (i != -1) {
- repositoryVersionCombo.select(i);
- setVersion(version);
- } else {
- for (IBugzillaConstants.BugzillaServerVersion serverVersion : IBugzillaConstants.BugzillaServerVersion.values()) {
- if (version.startsWith(serverVersion.toString())) {
- i = repositoryVersionCombo.indexOf(serverVersion.toString());
- if (i != -1) {
- repositoryVersionCombo.select(i);
- setVersion(serverVersion.toString());
- break;
- }
- }
- }
- if (i == -1) {
- StatusHandler.log(new Status(IStatus.INFO, BugzillaUiPlugin.PLUGIN_ID,
- "Could not resolve repository version: " + version));
- i = repositoryVersionCombo.indexOf(IBugzillaConstants.SERVER_VERSION_DEFAULT.toString());
- if (i != -1) {
- repositoryVersionCombo.select(i);
- setVersion(IBugzillaConstants.SERVER_VERSION_DEFAULT.toString());
- }
- }
- }
- }
- }
-
- @Override
- public void applyTo(TaskRepository repository) {
- super.applyTo(repository);
- repository.setProperty(IBugzillaConstants.REPOSITORY_SETTING_SHORT_LOGIN,
- String.valueOf(cleanQAContact.getSelection()));
- repository.setProperty(IBugzillaConstants.BUGZILLA_LANGUAGE_SETTING, languageSettingCombo.getText());
-
-// if (cachedConfigButton.getSelection()) {
-// repository.setProperty(IBugzillaConstants.PROPERTY_CONFIGTIMESTAMP, "");
-// } else {
-// repository.setProperty(IBugzillaConstants.PROPERTY_CONFIGTIMESTAMP,
-// IBugzillaConstants.TIMESTAMP_NOT_AVAILABLE);
-// }
- if (!autodetectPlatformOS.getSelection()) {
- repository.setProperty(IBugzillaConstants.BUGZILLA_DEF_PLATFORM,
- String.valueOf(defaultPlatformCombo.getItem(defaultPlatformCombo.getSelectionIndex())));
- repository.setProperty(IBugzillaConstants.BUGZILLA_DEF_OS,
- String.valueOf(defaultOSCombo.getItem(defaultOSCombo.getSelectionIndex())));
- } else {
- repository.removeProperty(IBugzillaConstants.BUGZILLA_DEF_PLATFORM);
- repository.removeProperty(IBugzillaConstants.BUGZILLA_DEF_OS);
- }
- }
-
- @Override
- public boolean isPageComplete() {
- boolean erg = super.isPageComplete();
- if (erg) {
- if (getVersion().compareTo(LABEL_AUTOMATIC_VERSION) == 0) {
- setErrorMessage("Validate Settings or select repository version under Additional Settings section.");
- erg = false;
- }
- }
- return erg;
- }
-
- @Override
- protected boolean isValidUrl(String name) {
- if (name.startsWith(URL_PREFIX_HTTPS) || name.startsWith(URL_PREFIX_HTTP)) {
- try {
- new URL(name);
- return true;
- } catch (MalformedURLException e) {
- }
- }
- return false;
- }
-
- @Override
- protected Validator getValidator(TaskRepository repository) {
-
- if (repositoryVersionCombo.getSelectionIndex() != 0) {
- return new BugzillaValidator(repository,
- repositoryVersionCombo.getItem(repositoryVersionCombo.getSelectionIndex()));
- } else {
- return new BugzillaValidator(repository, null);
- }
- }
-
- @Override
- protected void applyValidatorResult(Validator validator) {
- super.applyValidatorResult(validator);
-
- if (((BugzillaValidator) validator).getResult() != null && ((BugzillaValidator) validator).getResult() != null) {
- setBugzillaVersion(((BugzillaValidator) validator).getResult());
- }
- }
-
- public class BugzillaValidator extends Validator {
-
-// final String serverUrl;
-//
-// final String newUserId;
-//
-// final String newPassword;
-//
-// final boolean isAnonymous;
-//
-// final String newEncoding;
-//
-// final String httpAuthUser;
-//
-// final String httpAuthPass;
-//
-// final Proxy proxy;
-
- final TaskRepository repository;
-
- private final String[] versions = new String[1];;
-
- public BugzillaValidator(TaskRepository repository, String version) {
-// serverUrl = getServerUrl();
-// newUserId = getUserName();
-// newPassword = getPassword();
-// isAnonymous = isAnonymousAccess();
-// newEncoding = getCharacterEncoding();
-// httpAuthUser = getHttpAuthUserId();
-// httpAuthPass = getHttpAuthPassword();
-// proxy = repository.getProxy();
- versions[0] = version;
- this.repository = repository;
- }
-
- @Override
- public void run(IProgressMonitor monitor) throws CoreException {
- try {
- validate(monitor);
- } catch (Exception e) {
- displayError(repository.getRepositoryUrl(), e);
- }
- }
-
- private void displayError(final String serverUrl, Throwable e) {
- IStatus status;
- if (e instanceof MalformedURLException) {
- status = new BugzillaStatus(IStatus.WARNING, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_NETWORK, "Server URL is invalid.");
- } else if (e instanceof CoreException) {
- status = ((CoreException) e).getStatus();
- } else if (e instanceof IOException) {
- status = new BugzillaStatus(IStatus.WARNING, BugzillaCorePlugin.PLUGIN_ID, RepositoryStatus.ERROR_IO,
- serverUrl, e.getMessage());
- } else {
- status = new BugzillaStatus(IStatus.WARNING, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_NETWORK, serverUrl, e.getMessage());
- }
- TasksUiInternal.displayStatus("Validation failed", status);
- setStatus(status);
- }
-
- public void validate(IProgressMonitor monitor) throws IOException, CoreException {
-
- if (monitor == null) {
- monitor = new NullProgressMonitor();
- }
- try {
- monitor.beginTask("Validating server settings", IProgressMonitor.UNKNOWN);
- BugzillaClient client = null;
-
-// Proxy tempProxy = Proxy.NO_PROXY;
-//
-// if (getUseDefaultProxy()) {
-// tempProxy = TaskRepository.getSystemProxy();
-// } else {
-// tempProxy = WebClientUtil.getProxy(getProxyHostname(), getProxyPort(), getProxyUsername(),
-// getProxyPassword());
-// }
- boolean checkVersion = versions[0] == null;
-
-// if (isAnonymous) {
-// client = BugzillaClientFactory.createClient(serverUrl, newUserId, newPassword, httpAuthUser,
-// httpAuthPass, proxy, newEncoding);
-// client.logout();
-// } else
- if (versions != null) {
- client = BugzillaClientFactory.createClient(repository);
- client.validate(monitor);
- }
- if (checkVersion && client != null) {
- RepositoryConfiguration config = client.getRepositoryConfiguration();
- if (config != null) {
- versions[0] = config.getInstallVersion();
- }
- }
-
- } finally {
- monitor.done();
- }
- }
-
- public String getResult() {
- return versions[0];
- }
-
- }
-
- @Override
- public String getConnectorKind() {
- return BugzillaCorePlugin.CONNECTOR_KIND;
- }
-
-}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskEditorFactory.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskEditorFactory.java
deleted file mode 100644
index f64a31ea3..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskEditorFactory.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.ui.tasklist;
-
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaTask;
-import org.eclipse.mylyn.internal.bugzilla.ui.editor.BugzillaTaskEditor;
-import org.eclipse.mylyn.internal.bugzilla.ui.editor.NewBugzillaTaskEditor;
-import org.eclipse.mylyn.internal.tasks.ui.deprecated.AbstractRepositoryTaskEditor;
-import org.eclipse.mylyn.internal.tasks.ui.deprecated.AbstractTaskEditorFactory;
-import org.eclipse.mylyn.internal.tasks.ui.deprecated.RepositoryTaskEditorInput;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditorInput;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.part.EditorPart;
-
-/**
- * @author Mik Kersten
- * @author Rob Elves
- */
-public class BugzillaTaskEditorFactory extends AbstractTaskEditorFactory {
-
- private static final String TITLE = "Bugzilla";
-
- @Override
- public EditorPart createEditor(TaskEditor parentEditor, IEditorInput editorInput) {
- AbstractRepositoryTaskEditor editor = null;
- if (editorInput instanceof RepositoryTaskEditorInput) {
- RepositoryTaskEditorInput taskInput = (RepositoryTaskEditorInput) editorInput;
- if (taskInput.getTaskData().isNew()) {
- editor = new NewBugzillaTaskEditor(parentEditor);
- } else {
- editor = new BugzillaTaskEditor(parentEditor);
- }
- } else if (editorInput instanceof TaskEditorInput) {
- editor = new BugzillaTaskEditor(parentEditor);
- }
- return editor;
- }
-
- @Override
- public IEditorInput createEditorInput(ITask task) {
- if (task instanceof BugzillaTask) {
- BugzillaTask bugzillaTask = (BugzillaTask) task;
- final TaskRepository repository = TasksUi.getRepositoryManager().getRepository(
- BugzillaCorePlugin.CONNECTOR_KIND, bugzillaTask.getRepositoryUrl());
- BugzillaTaskEditorInput input = new BugzillaTaskEditorInput(repository, bugzillaTask, true);
- return input;
- }
- return null;
- }
-
- @Override
- public String getTitle() {
- return TITLE;
- }
-
- @Override
- public boolean canCreateEditorFor(ITask task) {
- return task instanceof BugzillaTask;
- }
-
- @Override
- public boolean providesOutline() {
- return true;
- }
-
- @Override
- public boolean canCreateEditorFor(IEditorInput input) {
- if (input instanceof RepositoryTaskEditorInput) {
- return BugzillaCorePlugin.CONNECTOR_KIND.equals(((RepositoryTaskEditorInput) input).getRepository()
- .getConnectorKind());
- }
- return false;
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskEditorInput.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskEditorInput.java
deleted file mode 100644
index 5b35e31f4..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskEditorInput.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-/*
- * Created on 1-Feb-2005
- */
-package org.eclipse.mylyn.internal.bugzilla.ui.tasklist;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaTask;
-import org.eclipse.mylyn.internal.bugzilla.core.RepositoryConfiguration;
-import org.eclipse.mylyn.internal.tasks.ui.deprecated.RepositoryTaskEditorInput;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.data.TaskData;
-import org.eclipse.ui.IPersistableElement;
-
-/**
- * @author Eric Booth
- * @author Mik Kersten
- * @author Rob Elves
- */
-public class BugzillaTaskEditorInput extends RepositoryTaskEditorInput {
-
- private String bugTitle = "";
-
- private final BugzillaTask bugTask;
-
- public BugzillaTaskEditorInput(TaskRepository repository, BugzillaTask bugzillaTask, boolean offline) {
- super(repository, bugzillaTask.getTaskId(), bugzillaTask.getUrl());
- this.bugTask = bugzillaTask;
-// updateOptions(getTaskData());
-// updateOptions(getOldTaskData());
- }
-
- protected void setBugTitle(String str) {
- // 03-20-03 Allows editor to store title (once it is known)
- bugTitle = str;
- }
-
- @Override
- public boolean exists() {
- return true;
- }
-
- @Override
- public IPersistableElement getPersistable() {
- return null;
- }
-
- @Override
- public String getToolTipText() {
- return bugTitle;
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public Object getAdapter(Class adapter) {
- return null;
- }
-
- /**
- * @return Returns the <code>BugzillaTask</code>
- */
- public BugzillaTask getBugTask() {
- return bugTask;
- }
-
- private void updateOptions(TaskData taskData) {
- try {
- if (taskData != null) {
- RepositoryConfiguration config = BugzillaCorePlugin.getRepositoryConfiguration(repository, false,
- new NullProgressMonitor());
- config.updateAttributeOptions(taskData);
- }
- } catch (Exception e) {
- // ignore
- }
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskListFactory.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskListFactory.java
deleted file mode 100644
index c41545059..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskListFactory.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.ui.tasklist;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaRepositoryQuery;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaTask;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractTaskListFactory;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.w3c.dom.Element;
-
-/**
- * @author Mik Kersten
- * @deprecated see BugzillaTaskListMigrator
- */
-@Deprecated
-public class BugzillaTaskListFactory extends AbstractTaskListFactory {
-
- private static final String KEY_SEVERITY = "bugzilla.severity";
-
- private static final String KEY_PRODUCT = "bugzilla.product";
-
- private static final String TAG_BUGZILLA = "Bugzilla";
-
- private static final String TAG_BUGZILLA_QUERY = TAG_BUGZILLA + KEY_QUERY;
-
- private static final String TAG_BUGZILLA_CUSTOM_QUERY = "BugzillaCustom" + KEY_QUERY;
-
- private static final String TAG_BUGZILLA_REPORT = "BugzillaReport";
-
- @Override
- public String getTaskElementName() {
- return TAG_BUGZILLA_REPORT;
- }
-
- @Override
- public Set<String> getQueryElementNames() {
- Set<String> names = new HashSet<String>();
- names.add(TAG_BUGZILLA_QUERY);
- names.add(TAG_BUGZILLA_CUSTOM_QUERY);
- return names;
- }
-
- @Override
- public boolean canCreate(IRepositoryQuery category) {
- return category instanceof BugzillaRepositoryQuery;
- }
-
- @Override
- public boolean canCreate(ITask task) {
- return task instanceof BugzillaTask;
- }
-
- @Override
- public String getQueryElementName(IRepositoryQuery query) {
- if (query instanceof BugzillaRepositoryQuery) {
- if (((BugzillaRepositoryQuery) query).isCustomQuery()) {
- return TAG_BUGZILLA_CUSTOM_QUERY;
- } else {
- return TAG_BUGZILLA_QUERY;
- }
- }
- return null;
- }
-
- @Override
- public RepositoryQuery createQuery(String repositoryUrl, String queryString, String label, Element element) {
- BugzillaRepositoryQuery query = new BugzillaRepositoryQuery(repositoryUrl, queryString, label);
- if (element.getNodeName().equals(TAG_BUGZILLA_CUSTOM_QUERY)) {
- query.setCustomQuery(true);
- }
- return query;
- }
-
- @Override
- public void setAdditionalAttributes(ITask task, Element element) {
- element.setAttribute(KEY_SEVERITY, ((BugzillaTask) task).getSeverity());
- element.setAttribute(KEY_PRODUCT, ((BugzillaTask) task).getProduct());
- }
-
- @Override
- public AbstractTask createTask(String repositoryUrl, String taskId, String summary, Element element) {
- BugzillaTask task = new BugzillaTask(repositoryUrl, taskId, summary);
- if (element.hasAttribute(KEY_SEVERITY)) {
- task.setSeverity(element.getAttribute(KEY_SEVERITY));
- }
- if (element.hasAttribute(KEY_PRODUCT)) {
- task.setProduct(element.getAttribute(KEY_PRODUCT));
- }
- return task;
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskListMigrator.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskListMigrator.java
deleted file mode 100644
index 678ef0595..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskListMigrator.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.ui.tasklist;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaAttribute;
-import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants;
-import org.eclipse.mylyn.tasks.core.AbstractTaskListMigrator;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.w3c.dom.Element;
-
-/**
- * @author Rob Elves
- * @since 3.0
- */
-public class BugzillaTaskListMigrator extends AbstractTaskListMigrator {
-
- private static final String TAG_BUGZILLA_REPORT = "BugzillaReport";
-
- private static final String KEY_SEVERITY = "bugzilla.severity";
-
- private static final String KEY_PRODUCT = "bugzilla.product";
-
- @Override
- public String getConnectorKind() {
- return BugzillaCorePlugin.CONNECTOR_KIND;
- }
-
- @Override
- public Set<String> getQueryElementNames() {
- Set<String> names = new HashSet<String>();
- names.add(IBugzillaConstants.TAG_BUGZILLA_QUERY);
- names.add(IBugzillaConstants.TAG_BUGZILLA_CUSTOM_QUERY);
- return names;
- }
-
- @Override
- public String getTaskElementName() {
- return TAG_BUGZILLA_REPORT;
- }
-
- @Override
- public void migrateQuery(IRepositoryQuery query, Element element) {
- if (element.getNodeName().equals(IBugzillaConstants.TAG_BUGZILLA_CUSTOM_QUERY)) {
- query.setAttribute(IBugzillaConstants.ATTRIBUTE_BUGZILLA_QUERY_CUSTOM, Boolean.TRUE.toString());
- }
- }
-
- @Override
- public void migrateTask(ITask task, Element element) {
-
- if (element.hasAttribute(KEY_SEVERITY)) {
- task.setAttribute(BugzillaAttribute.BUG_SEVERITY.getKey(),
- element.getAttribute(BugzillaAttribute.BUG_SEVERITY.getKey()));
- }
- if (element.hasAttribute(KEY_PRODUCT)) {
- task.setAttribute(BugzillaAttribute.PRODUCT.getKey(),
- element.getAttribute(BugzillaAttribute.PRODUCT.getKey()));
- }
- if (element.hasAttribute(KEY_LAST_MOD_DATE)) {
- task.setAttribute(BugzillaAttribute.DELTA_TS.getKey(), element.getAttribute(KEY_LAST_MOD_DATE));
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/StackTrace.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/StackTrace.java
deleted file mode 100644
index a5e909e9e..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/StackTrace.java
+++ /dev/null
@@ -1,370 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.ui.tasklist;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Class to hold all of the information about a stack trace
- *
- * @author Shawn Minto
- */
-public class StackTrace {
-
- /** The length of the stack trace in the original string */
- private final int length;
-
- /** The offset of the stack trace in the orignal string */
- private final int offset;
-
- /** The string of the stack trace */
- private final String stackTrace;
-
- /**
- * This is the comment that the stack trace appeared in. String if desciption else Comment
- */
- private final Object comment;
-
- /**
- * Constructor
- *
- * @param stackTrace
- * The stack trace string
- * @param offset
- * The offset of the stack trace in the original string
- * @param length
- * The length of the stack trace in the original string
- * @param comment
- * The comment that the stack trace came from
- */
- public StackTrace(String stackTrace, int offset, int length, Object comment) {
- this.stackTrace = stackTrace;
- this.offset = offset;
- this.length = length;
- this.comment = comment;
- }
-
- /**
- * Get the offset for the stack trace
- *
- * @return Returns the offset.
- */
- public int getOffset() {
- return offset;
- }
-
- /**
- * Get the stack trace for the bug
- *
- * @return Returns the stackTrace.
- */
- public String getStackTrace() {
- return stackTrace;
- }
-
- /**
- * Get the length of the bug
- *
- * @return Returns the length.
- */
- public int getLength() {
- return length;
- }
-
- /**
- * Get the Comment that this stack trace came from
- *
- * @return Returns the Comment if it was a comment else a String if it was the summary
- */
- public Object getComment() {
- return comment;
- }
-
- /**
- * Find a standard java stack trace in the given string
- *
- *
- * @param s
- * The string to search for stack traces
- * @param comment
- * The comment that the text came from.<br>
- * Comment if a comment else a String
- * @return String[] of stack traces - each element is 1 trace
- */
- public static StackTrace[] getStackTrace(String s, Object comment) {
-
- // setup the regex used to determine if it looks like we are at a
- // stack trace and whether it is something that should be skipped
- String regexExceptionType = "^(.*\\.)+.+(Exception|Error|Throwable).*";
- String regexSkip = ".*\\.\\..*";
-
- // get all of the individual lines for the string
- String[] lines = s.split("\r\n|\n");
-
- // the character start of the current stack trace
- int charStackStart = 0;
-
- // the current character in the string - used for the start and the
- // offset
- int[] charPos = { 0 }; // array so pass by reference
-
- boolean inStackTrace = false;
- List<String> stackTrace = null;
- List<StackTrace> stackTraces = new ArrayList<StackTrace>();
-
- // go through each of the lines of the string
- for (int i = 0; i < lines.length; i++) {
-
- if (lines[i].matches(regexSkip)) {
-
- // update the current character position
- charPos[0] += lines[i].length() + 2;
-
- } else if (lines[i].trim().matches(regexExceptionType) && !inStackTrace) {
-
- // we have matched the stack trace and we are not already in one
-
- // add the old stack trace to the list of stack traces
- if (stackTrace != null && stackTrace.size() > 1) {
- stackTraces.add(getStackTrace(stackTrace, charStackStart, charPos[0] - charStackStart, comment));
- }
-
- // prepare for a new stack trace
- stackTrace = new ArrayList<String>();
- inStackTrace = true;
-
- // the current line is the start of our stack trace
- stackTrace.add(lines[i]);
- charStackStart = charPos[0];
- charPos[0] += lines[i].length() + 2;
- } else if (inStackTrace) {
- // we are in a stack trace
-
- int[] pos = { i }; // array so pass by reference
-
- // get the next at clause of the stack trace
- String stack = getNextAt(lines, pos, charPos);
-
- // check if there was an at
- if (stack == null) {
-
- // there wasn't so we are done this stack trace
- inStackTrace = false;
- if (stackTrace != null && stackTrace.size() > 1) {
- stackTraces.add(getStackTrace(stackTrace, charStackStart, charPos[0] - charStackStart, comment));
- }
- stackTrace = null;
- } else if (stackTrace != null) {
-
- // we had one, so add it to this stack trace
- stackTrace.add(stack);
- }
-
- // update the position
- i = pos[0];
- } else {
- // update the current character position
- charPos[0] += lines[i].length() + 2;
- }
- }
-
- // make sure to add the stack trace if it was the last in the string
- if (stackTrace != null && stackTrace.size() > 1) {
- stackTraces.add(getStackTrace(stackTrace, charStackStart, charPos[0] - charStackStart, comment));
- }
-
- if (stackTraces.size() == 0) {
- return null;
- }
-
- // get the string values of the stack traces and return it
- return getTracesFromList(stackTraces);
- }
-
- /**
- * Get the next at clause from a potential stack trace -- looks ahead 4 lines
- *
- * @param lines
- * The array of all of the lines in the bug
- * @param i
- * The current position to start at
- * @param charPos
- * The current character position in the original string
- * @return The next at clause, or <code>null</code><br>
- * If an at line is matched, but the end isn't within the 4 lines, only the first line is returned. Also, charPos
- * is updated as well as i
- */
- private static String getNextAt(String[] lines, int[] i, int[] charPos) {
- String regexAtString = "^at.*";
- String regexEndString = ".*:\\d+\\)$";
- int index = i[0];
- String l1, l2, l3, l4;
- l1 = l2 = l3 = l4 = null;
- String res = null;
-
- // get the first line to look at
- if (lines.length > index) {
- l1 = lines[index];
- } else {
- // if the first line doesn't exist, we are done and should
- // return
- return null;
- }
-
- // get the next 3 lines
- if (lines.length > index + 1) {
- l2 = lines[index + 1];
- }
- if (lines.length > index + 2) {
- l3 = lines[index + 2];
- }
- if (lines.length > index + 3) {
- l4 = lines[index + 3];
- }
-
- // make sure that the first line is the start of an at
- // if not, return null
- if (l1.trim().matches(regexAtString)) {
- charPos[0] += l1.length() + 2;
- res = l1;
- } else {
- return null;
- }
-
- // now determine where the end is if it wasn't on 1 line
- if (!res.trim().matches(regexEndString)) {
-
- if (l2 != null && l2.trim().matches(regexEndString)) {
-
- // it was on the second line
- // update the current position and the result string
- i[0] = index + 1;
- charPos[0] += l2.length() + 2;
- res += l2.trim();
- } else if (l2 != null && l3 != null && l3.trim().matches(regexEndString)) {
-
- // it was on the third line
- // update the current position and the result string
- i[0] = index + 2;
- charPos[0] += l2.length() + l3.length() + 4;
- res += l2.trim();
- res += l3.trim();
- } else if (l2 != null && l3 != null && l4 != null && l4.trim().matches(regexEndString)) {
-
- // it was on the fourth line
- // update the current position and the result string
- i[0] = index + 3;
- charPos[0] += l2.length() + l3.length() + l4.length() + 6;
- res += l2.trim();
- res += l3.trim();
- res += l4.trim();
- }
- }
-
- // return the result
- return res;
- }
-
- /**
- * Get the StackTrace
- *
- * @param l
- * the list of lines that contain the trace
- * @param start
- * the start of the stack trace
- * @param offset
- * the offset of the stack trace
- * @param comment
- * The comment that the stack trace came from
- * @return The StackTrace for the given data
- */
- private static StackTrace getStackTrace(List<String> l, int offset, int length, Object comment) {
- String s = "";
- for (String s2 : l) {
- s += s2 + "\r\n";
- }
-
- return new StackTrace(s, offset, length, comment);
- }
-
- /**
- * Convert a List StackTraces to a StackTrace[] <br>
- *
- * @param l
- * The List of StackTraces
- * @return StackTrace[] of the List
- */
- private static StackTrace[] getTracesFromList(List<StackTrace> l) {
-
- // make sure that there is something to convert, else return null
- if (l == null || l.size() == 0) {
- return null;
- }
-
- // convert the list of strings to an array of strings
- int i = 0;
- StackTrace[] s = new StackTrace[l.size()];
-
- for (StackTrace st : l) {
- s[i] = st;
- i++;
- }
-
- // return the string array
- return s;
- }
-
- /**
- * Escape all of the special regex characters from the string
- *
- * @param s
- * The string to escape the characters for
- * @return A string with all of the special characters escaped <br>
- * <code>
- * . => \.<br>
- * $ => \$<br>
- * ? => \?<br>
- * { => \{<br>
- * } => \}<br>
- * ( => \(<br>
- * ) => \)<br>
- * [ => \[<br>
- * ] => \]<br>
- * + => \+<br>
- * * => \*<br>
- * | => \|<br>
- * ^ => \^<br>
- * \ => \\<br>
- * / => \/<br>
- * </code>
- */
- public static String escapeForRegex(String s) {
- String sFixed = s;
-
- // replace all special regex characters
- sFixed = sFixed.replaceAll("\\\\", "\\\\\\\\");
- sFixed = sFixed.replaceAll("\\$", "\\\\\\$");
- sFixed = sFixed.replaceAll("\\.", "\\\\.");
- sFixed = sFixed.replaceAll("\\?", "\\\\?");
- sFixed = sFixed.replaceAll("\\{", "\\\\{");
- sFixed = sFixed.replaceAll("\\}", "\\\\}");
- sFixed = sFixed.replaceAll("\\(", "\\\\(");
- sFixed = sFixed.replaceAll("\\)", "\\\\)");
- sFixed = sFixed.replaceAll("\\[", "\\\\[");
- sFixed = sFixed.replaceAll("\\]", "\\\\]");
- sFixed = sFixed.replaceAll("\\+", "\\\\+");
- sFixed = sFixed.replaceAll("\\*", "\\\\*");
- sFixed = sFixed.replaceAll("\\|", "\\\\|");
- sFixed = sFixed.replaceAll("\\^", "\\\\^");
- sFixed = sFixed.replaceAll("\\/", "\\\\/");
-
- return sFixed;
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/BugzillaProductPage.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/BugzillaProductPage.java
deleted file mode 100644
index ee9cf67ca..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/BugzillaProductPage.java
+++ /dev/null
@@ -1,442 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.bugzilla.ui.wizard;
-
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.lang.reflect.InvocationTargetException;
-import java.net.URLDecoder;
-import java.security.GeneralSecurityException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.IMessageProvider;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.viewers.IOpenListener;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.OpenEvent;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaRepositoryQuery;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaTask;
-import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants;
-import org.eclipse.mylyn.internal.bugzilla.core.RepositoryConfiguration;
-import org.eclipse.mylyn.internal.bugzilla.ui.BugzillaUiPlugin;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.FilteredTree;
-import org.eclipse.ui.dialogs.PatternFilter;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.eclipse.ui.progress.UIJob;
-
-/**
- * @author Shawn Minto
- * @author Rob Elves
- * @author Mik Kersten
- * @author Eugene Kuleshov
- * @author Willian Mitsuda
- *
- * Product selection page of new bug wizard
- */
-public class BugzillaProductPage extends WizardPage {
-
- private static final String NEW_BUGZILLA_TASK_ERROR_TITLE = "New Bugzilla Task Error";
-
- private static final String DESCRIPTION = "Pick a product to open the new bug editor.\n"
- + "Press the Update button if the product is not in the list.";
-
- private static final String LABEL_UPDATE = "Update Products from Repository";
-
- /** The list of products to submit a bug report for */
- private List<String> products = null;
-
- /**
- * Reference to the bug wizard which created this page so we can create the second page
- */
- private final NewBugzillaTaskWizard bugWizard;
-
- /**
- * Handle product selection
- */
- private FilteredTree productList;
-
- private final TaskRepository repository;
-
- protected IPreferenceStore prefs = BugzillaUiPlugin.getDefault().getPreferenceStore();
-
- /**
- * Constructor for BugzillaProductPage
- *
- * @param workbench
- * The instance of the workbench
- * @param bugWiz
- * The bug wizard which created this page
- * @param repository
- * The repository the data is coming from
- * @param selection
- */
- public BugzillaProductPage(NewBugzillaTaskWizard bugWiz, TaskRepository repository) {
- super("Page1");
- setTitle(IBugzillaConstants.TITLE_NEW_BUG);
- setDescription(DESCRIPTION);
- this.bugWizard = bugWiz;
- this.repository = repository;
- setImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.mylyn.bugzilla.ui",
- "icons/wizban/bug-wizard.gif"));
-
- }
-
- public void createControl(Composite parent) {
- // create the composite to hold the widgets
- Composite composite = new Composite(parent, SWT.NULL);
-
- // create the desired layout for this wizard page
- composite.setLayout(new GridLayout());
-
- // create the list of bug reports
- productList = new FilteredTree(composite, SWT.SINGLE | SWT.BORDER, new PatternFilter());
- productList.setLayoutData(GridDataFactory.swtDefaults().align(SWT.FILL, SWT.FILL).grab(true, true).hint(
- SWT.DEFAULT, 200).create());
- final TreeViewer productViewer = productList.getViewer();
- productViewer.setLabelProvider(new LabelProvider());
- productViewer.setContentProvider(new ITreeContentProvider() {
-
- public Object[] getChildren(Object parentElement) {
- if (parentElement instanceof Collection) {
- return ((Collection<?>) parentElement).toArray();
- }
- return null;
- }
-
- public Object getParent(Object element) {
- return null;
- }
-
- public boolean hasChildren(Object element) {
- return false;
- }
-
- public Object[] getElements(Object inputElement) {
- return getChildren(inputElement);
- }
-
- public void dispose() {
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
- });
-
- productViewer.addOpenListener(new IOpenListener() {
- public void open(OpenEvent event) {
- if (getWizard().canFinish()) {
- if (getWizard().performFinish()) {
- ((WizardDialog) getContainer()).close();
- }
- }
- }
- });
-
- initProducts();
- productViewer.setInput(products);
- productViewer.addPostSelectionChangedListener(new ISelectionChangedListener() {
-
- public void selectionChanged(SelectionChangedEvent event) {
- // Initialize a variable with the no error status
- Status status = new Status(IStatus.OK, BugzillaUiPlugin.PLUGIN_ID, 0, "", null);
- if (productViewer.getSelection().isEmpty()) {
- status = new Status(IStatus.ERROR, BugzillaUiPlugin.PLUGIN_ID, 0, "You must select a product", null);
- }
-
- // Show the most serious error
- applyToStatusLine(status);
- isPageComplete();
- getWizard().getContainer().updateButtons();
- }
-
- });
-
- // HACK: waiting on delayed refresh of filtered tree
- final String[] selectedProducts = getSelectedProducts();
- if (selectedProducts.length > 0) {
- new UIJob("") {
- @Override
- public IStatus runInUIThread(IProgressMonitor monitor) {
- if (BugzillaProductPage.this.getControl() != null
- && BugzillaProductPage.this.getControl().isDisposed()) {
- return Status.OK_STATUS;
- }
- productViewer.setSelection(new StructuredSelection(selectedProducts), true);
- productViewer.getControl().setFocus();
- return Status.OK_STATUS;
- }
- }.schedule(300L);
- } else {
- productList.setFocus();
- }
-
- Button updateButton = new Button(composite, SWT.LEFT | SWT.PUSH);
- updateButton.setText(LABEL_UPDATE);
- updateButton.setLayoutData(new GridData());
-
- updateButton.addSelectionListener(new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- try {
- final AbstractRepositoryConnector connector = TasksUi.getRepositoryManager()
- .getRepositoryConnector(repository.getConnectorKind());
-
- getContainer().run(true, false, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException,
- InterruptedException {
- monitor.beginTask("Updating repository report options...", IProgressMonitor.UNKNOWN);
- try {
- connector.updateRepositoryConfiguration(repository, monitor);
- } catch (CoreException e) {
- // TODO: remove exceptions from communication of connectivity errors to the user
- if (e.getStatus().getException() instanceof GeneralSecurityException) {
- TasksUiInternal.displayStatus("Error", new Status(IStatus.WARNING,
- BugzillaUiPlugin.PLUGIN_ID,
- "Bugzilla could not log you in to get the information you requested since login name or password is incorrect.\n"
- + "Please ensure proper configuration in "
- + TasksUiPlugin.LABEL_VIEW_REPOSITORIES + ". ", e));
- } else if (e.getStatus().getException() instanceof IOException) {
- TasksUiInternal.displayStatus("Error", new Status(IStatus.WARNING,
- BugzillaUiPlugin.PLUGIN_ID,
- "Connection Error, please ensure proper configuration in "
- + TasksUiPlugin.LABEL_VIEW_REPOSITORIES + ".", e));
- } else {
- TasksUiInternal.displayStatus("Error", new Status(IStatus.WARNING,
- BugzillaUiPlugin.PLUGIN_ID, "Error updating repository attributes for "
- + repository.getRepositoryUrl(), e));
- }
- return;
- }
-
- RepositoryConfiguration repositoryConfiguration = null;
- try {
- repositoryConfiguration = BugzillaCorePlugin.getRepositoryConfiguration(repository,
- false, monitor);
- } catch (final CoreException e) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- MessageDialog.openError(Display.getDefault().getActiveShell(),
- "Bugzilla Search Page",
- "Unable to get configuration. Ensure proper repository configuration in "
- + TasksUiPlugin.LABEL_VIEW_REPOSITORIES + ".\n\n");
- }
- });
- }
- products = new ArrayList<String>();
- if (repositoryConfiguration != null) {
- for (String product : repositoryConfiguration.getProducts()) {
- products.add(product);
- }
- }
- }
- });
- productViewer.setInput(products);
- } catch (InvocationTargetException ex) {
- MessageDialog.openError(null, "Error updating product list", "Error reported:\n"
- + ex.getCause().getMessage());
- } catch (InterruptedException ex) {
- // Was cancelled...
- }
- }
- });
-
- // set the composite as the control for this page
- setControl(composite);
-
- isPageComplete();
- getWizard().getContainer().updateButtons();
- }
-
- private void initProducts() {
- // try to get the list of products from the server
- try {
- products = BugzillaCorePlugin.getRepositoryConfiguration(repository, false, new NullProgressMonitor())
- .getProducts();
-
- } catch (final CoreException e) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- MessageDialog.openError(Display.getDefault().getActiveShell(), NEW_BUGZILLA_TASK_ERROR_TITLE,
- "Unable to get products. Ensure proper repository configuration in "
- + TasksUiPlugin.LABEL_VIEW_REPOSITORIES + ".\n\n");
- }
- });
- }
- }
-
- private String[] getSelectedProducts() {
- IStructuredSelection selection = getSelection();
- if (selection == null) {
- return new String[0];
- }
-
- ArrayList<String> products = new ArrayList<String>();
-
- Object element = selection.getFirstElement();
- if (element instanceof BugzillaTask) {
- BugzillaTask bugzillaTask = (BugzillaTask) element;
- if (bugzillaTask.getProduct() != null) {
- products.add(bugzillaTask.getProduct());
- }
- } else {
- BugzillaRepositoryQuery query = null;
- if (element instanceof BugzillaRepositoryQuery) {
- query = (BugzillaRepositoryQuery) element;
-
- }
-
- if (query != null) {
- String queryUrl = query.getUrl();
- queryUrl = queryUrl.substring(queryUrl.indexOf("?") + 1);
- String[] options = queryUrl.split("&");
-
- for (String option : options) {
- String key = option.substring(0, option.indexOf("="));
- if ("product".equals(key)) {
- try {
- products.add(URLDecoder.decode(option.substring(option.indexOf("=") + 1),
- repository.getCharacterEncoding()));
- // TODO: list box only accepts a single selection so
- // we break on first found
- break;
- } catch (UnsupportedEncodingException ex) {
- // ignore
- }
- }
- }
- } else {
- if (element instanceof IAdaptable) {
- IAdaptable adaptable = (IAdaptable) element;
- ITask task = (ITask) adaptable.getAdapter(AbstractTask.class);
- if (task instanceof BugzillaTask) {
- BugzillaTask bugzillaTask = (BugzillaTask) task;
- if (bugzillaTask.getProduct() != null) {
- products.add(bugzillaTask.getProduct());
- }
- }
- }
- }
- }
-
- return products.toArray(new String[products.size()]);
- }
-
- private IStructuredSelection getSelection() {
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- ISelection selection = window.getSelectionService().getSelection();
- if (selection instanceof IStructuredSelection) {
- return (IStructuredSelection) selection;
- }
- return null;
- }
-
- /**
- * Applies the status to the status line of a dialog page.
- *
- * @param status
- * The status to apply to the status line
- */
- protected void applyToStatusLine(IStatus status) {
- String message = status.getMessage();
- if (message.length() == 0) {
- message = null;
- }
- switch (status.getSeverity()) {
- case IStatus.OK:
- setErrorMessage(null);
- setMessage(message);
- break;
- case IStatus.WARNING:
- setErrorMessage(null);
- setMessage(message, IMessageProvider.WARNING);
- break;
- case IStatus.INFO:
- setErrorMessage(null);
- setMessage(message, IMessageProvider.INFORMATION);
- break;
- default:
- setErrorMessage(null);
- setMessage(message, IMessageProvider.ERROR);
- break;
- }
- }
-
-// /**
-// * Save the currently selected product to the taskData when next is clicked
-// */
-// public void saveDataToModel() throws CoreException {
-// RepositoryTaskData model = bugWizard.taskData;
-// model.setAttributeValue(BugzillaReportElement.PRODUCT.getKey(), getSelectedProduct());
-// AbstractLegacyRepositoryConnector connector = (AbstractLegacyRepositoryConnector) TasksUi.getRepositoryManager()
-// .getRepositoryConnector(repository.getConnectorKind());
-// if (connector == null) {
-// throw new CoreException(new Status(IStatus.ERROR, BugzillaUiPlugin.PLUGIN_ID,
-// "Error AbstractRepositoryConnector could not been retrieved.\n\n"));
-// }
-// AbstractTaskDataHandler taskDataHandler = connector.getLegacyTaskDataHandler();
-// if (taskDataHandler == null) {
-// throw new CoreException(new Status(IStatus.ERROR, BugzillaUiPlugin.PLUGIN_ID,
-// "Error AbstractTaskDataHandler could not been retrieved.\n\n"));
-// }
-// taskDataHandler.initializeTaskData(repository, model, null);
-//
-// // platform/os are now set to All/All
-// BugzillaCorePlugin.getDefault().setPlatformDefaultsOrGuess(repository, model);
-// }
-
- public String getSelectedProduct() {
- return (String) ((IStructuredSelection) productList.getViewer().getSelection()).getFirstElement();
- }
-
- @Override
- public boolean isPageComplete() {
- return !productList.getViewer().getSelection().isEmpty();
-// return bugWizard.completed;
- }
-
-}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/NewBugzillaTaskWizard.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/NewBugzillaTaskWizard.java
deleted file mode 100644
index 1252b8a84..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/NewBugzillaTaskWizard.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.bugzilla.ui.wizard;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.mylyn.tasks.core.ITaskMapping;
-import org.eclipse.mylyn.tasks.core.TaskMapping;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.wizards.NewTaskWizard;
-import org.eclipse.ui.INewWizard;
-import org.eclipse.ui.IWorkbench;
-
-/**
- * @author Mik Kersten
- * @author Rob Elves
- */
-public class NewBugzillaTaskWizard extends NewTaskWizard implements INewWizard {
-
- private BugzillaProductPage projectPage;
-
- public NewBugzillaTaskWizard(TaskRepository taskRepository, ITaskMapping taskSelection) {
- super(taskRepository, taskSelection);
- }
-
- @Override
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- }
-
- @Override
- public void addPages() {
- projectPage = new BugzillaProductPage(this, getTaskRepository());
- addPage(projectPage);
- }
-
- @Override
- protected ITaskMapping getInitializationData() {
- final String product = projectPage.getSelectedProduct();
- return new TaskMapping() {
- @Override
- public String getProduct() {
- return product;
- }
- };
- }
-
-// private static final String TITLE = "New Bugzilla Task";
-//
-// private IWorkbench workbenchInstance;
-//
-// private final TaskRepository repository;
-//
-// private final BugzillaProductPage productPage;
-//
-// /**
-// * Flag to indicate if the wizard can be completed (finish button enabled)
-// */
-// protected boolean completed = false;
-//
-// /** The taskData used to store all of the data for the wizard */
-// protected RepositoryTaskData taskData;
-//
-// private TaskSelection taskSelection;
-//
-// // TODO: Change taskData to a RepositoryTaskData
-// // protected RepositoryTaskData taskData;
-//
-// public NewBugzillaTaskWizard(TaskRepository repository) {
-// this(false, repository);
-// taskData = new TaskData(new BugzillaAttributeFactory(), BugzillaCorePlugin.CONNECTOR_KIND,
-// repository.getRepositoryUrl(), TasksUiPlugin.getDefault().getNextNewRepositoryTaskId());
-// taskData.setNew(true);
-// super.setDefaultPageImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin(
-// "org.eclipse.mylyn.internal.bugzilla.ui", "icons/wizban/bug-wizard.gif"));
-// super.setWindowTitle(TITLE);
-// setNeedsProgressMonitor(true);
-// }
-//
-// public NewBugzillaTaskWizard(boolean fromDialog, TaskRepository repository) {
-// super();
-// this.repository = repository;
-// this.productPage = new BugzillaProductPage(workbenchInstance, this, repository);
-// }
-//
-// /**
-// * @since 2.2
-// */
-// public NewBugzillaTaskWizard(TaskRepository taskRepository, TaskSelection taskSelection) {
-// this(taskRepository);
-// this.taskSelection = taskSelection;
-// }
-//
-// @Override
-// public void init(IWorkbench workbench, IStructuredSelection selection) {
-// this.workbenchInstance = workbench;
-// }
-//
-// @Override
-// public void addPages() {
-// super.addPages();
-// addPage(productPage);
-// }
-//
-// @Override
-// public boolean canFinish() {
-// return completed;
-// }
-//
-// @Override
-// public boolean performFinish() {
-// try {
-// productPage.saveDataToModel();
-//
-// if (taskSelection != null) {
-// AbstractRepositoryConnector connector = TasksUi.getRepositoryManager()
-// .getRepositoryConnector(repository.getConnectorKind());
-// AbstractTaskDataHandler taskDataHandler = connector.getTaskDataHandler();
-// if (taskDataHandler != null) {
-// taskDataHandler.cloneTaskData(taskSelection.getLegacyTaskData(), taskData);
-// }
-// }
-//
-// NewTaskEditorInput editorInput = new NewTaskEditorInput(repository, taskData);
-// IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
-// TasksUiUtil.openEditor(editorInput, TaskEditor.ID_EDITOR, page);
-// return true;
-// } catch (Exception e) {
-// Status status = new Status(IStatus.ERROR, "not_used", 0,
-// "Problem occurred retrieving repository configuration from " + repository.getRepositoryUrl(), e)
-// productPage.applyToStatusLine(status);
-// StatusHandler.log(status);
-// }
-// return false;
-// }
-}
diff --git a/org.eclipse.mylyn.help.ui/.classpath b/org.eclipse.mylyn.help.ui/.classpath
deleted file mode 100644
index 094104736..000000000
--- a/org.eclipse.mylyn.help.ui/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
- </classpathentry>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/org.eclipse.mylyn.help.ui/.cvsignore b/org.eclipse.mylyn.help.ui/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/org.eclipse.mylyn.help.ui/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/org.eclipse.mylyn.help.ui/.externalToolBuilders/org.eclipse.jdt.core.javabuilder.launch b/org.eclipse.mylyn.help.ui/.externalToolBuilders/org.eclipse.jdt.core.javabuilder.launch
deleted file mode 100644
index 6ae599b1f..000000000
--- a/org.eclipse.mylyn.help.ui/.externalToolBuilders/org.eclipse.jdt.core.javabuilder.launch
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
-<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="false"/>
-<mapAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_DISABLED_BUILDER" value="org.eclipse.jdt.core.javabuilder"/>
-<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
-</launchConfiguration>
diff --git a/org.eclipse.mylyn.help.ui/.project b/org.eclipse.mylyn.help.ui/.project
deleted file mode 100644
index 2eaa28006..000000000
--- a/org.eclipse.mylyn.help.ui/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.mylyn.help.ui</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.help.ui/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.mylyn.help.ui/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 8b08f1b8b..000000000
--- a/org.eclipse.mylyn.help.ui/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,340 +0,0 @@
-#Thu Apr 24 21:03:23 PDT 2008
-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=ignore
-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,NORMAL
-org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,API
-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=false
-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.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.help.ui/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.mylyn.help.ui/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 5e70d0848..000000000
--- a/org.eclipse.mylyn.help.ui/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,63 +0,0 @@
-#Sat Mar 01 03:38:47 PST 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">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*******************************************************************************\n * Copyright (c) 2004, 2007 Mylyn project committers and others.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *******************************************************************************/\n\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ignore\n${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ignore</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created JavaScript files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for vars" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Jsdoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created function stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated function stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_methods=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=true
-sp_cleanup.correct_indentation=true
-sp_cleanup.format_source_code=true
-sp_cleanup.format_source_code_changes_only=false
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=true
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=true
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=true
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=true
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=true
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/org.eclipse.mylyn.help.ui/.settings/org.eclipse.ltk.core.refactoring.prefs b/org.eclipse.mylyn.help.ui/.settings/org.eclipse.ltk.core.refactoring.prefs
deleted file mode 100644
index 7ab03bdac..000000000
--- a/org.eclipse.mylyn.help.ui/.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.help.ui/.settings/org.eclipse.mylyn.tasklist.prefs b/org.eclipse.mylyn.help.ui/.settings/org.eclipse.mylyn.tasklist.prefs
deleted file mode 100644
index 0a2cc0b30..000000000
--- a/org.eclipse.mylyn.help.ui/.settings/org.eclipse.mylyn.tasklist.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Mon Jun 18 17:14:59 PDT 2007
-eclipse.preferences.version=1
-project.repository.kind=bugzilla
-project.repository.url=https\://bugs.eclipse.org/bugs
diff --git a/org.eclipse.mylyn.help.ui/.settings/org.eclipse.mylyn.tasks.ui.prefs b/org.eclipse.mylyn.help.ui/.settings/org.eclipse.mylyn.tasks.ui.prefs
deleted file mode 100644
index d8c6d26af..000000000
--- a/org.eclipse.mylyn.help.ui/.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.help.ui/.settings/org.eclipse.pde.prefs b/org.eclipse.mylyn.help.ui/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index e8f2d5620..000000000
--- a/org.eclipse.mylyn.help.ui/.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.help.ui/META-INF/MANIFEST.MF b/org.eclipse.mylyn.help.ui/META-INF/MANIFEST.MF
deleted file mode 100644
index 3e0cd46ec..000000000
--- a/org.eclipse.mylyn.help.ui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,16 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Mylyn Help
-Bundle-SymbolicName: org.eclipse.mylyn.help.ui;singleton:=true
-Bundle-Version: 3.0.0.qualifier
-Bundle-ActivationPolicy: lazy
-Bundle-Vendor: Eclipse.org
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.ui,
- org.eclipse.ui.forms,
- org.eclipse.mylyn.tasks.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.mylyn.tasks.ui;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.mylyn.commons.ui;bundle-version="[3.0.0,4.0.0)"
-Export-Package: org.eclipse.mylyn.internal.help.ui.actions;x-internal:=true,
- org.eclipse.mylyn.internal.help.ui.dialogs;x-internal:=true
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/org.eclipse.mylyn.help.ui/about.html b/org.eclipse.mylyn.help.ui/about.html
deleted file mode 100644
index 0dd939c09..000000000
--- a/org.eclipse.mylyn.help.ui/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 7, 2007</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.help.ui/build-user.xml b/org.eclipse.mylyn.help.ui/build-user.xml
deleted file mode 100644
index 6097713f2..000000000
--- a/org.eclipse.mylyn.help.ui/build-user.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-<target name="help">
- <echo message="Please run: $ ant -v -projecthelp"/>
-</target> \ No newline at end of file
diff --git a/org.eclipse.mylyn.help.ui/build.properties b/org.eclipse.mylyn.help.ui/build.properties
deleted file mode 100644
index 5a55d706b..000000000
--- a/org.eclipse.mylyn.help.ui/build.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-###############################################################################
-# Copyright (c) 2004, 2007 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 = plugin.xml,\
- META-INF/,\
- doc/,\
- about.html,\
- .,\
- icons/,\
- intro/,\
- images/,\
- cheatsheets/
-src.includes = about.html
-source.. = src/
-jars.compile.order = .
-source.. = src/
-
diff --git a/org.eclipse.mylyn.help.ui/cheatsheets/Query.xml b/org.eclipse.mylyn.help.ui/cheatsheets/Query.xml
deleted file mode 100644
index 5c33de0e5..000000000
--- a/org.eclipse.mylyn.help.ui/cheatsheets/Query.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<cheatsheet title="Create a query from bugs.eclipse.org">
- <intro>
- <description>
- This cheat sheet shows you how to create a query from bugs.eclipse.org.<br/>
- </description>
- </intro>
- <item title="Open the Task List view" dialog="true" skip="false">
- <description>
- If the Task List view is not opened, select in the main menu <b>Window &gt; Show View &gt; Task List</b> or click on the &quot;Click to Perform&quot; link below.
- </description>
- <command serialization="org.eclipse.ui.views.showView(org.eclipse.ui.views.showView.viewId=org.eclipse.mylyn.tasks.ui.views.tasks)" confirm="true">
- </command>
- </item>
- <item title="Setup Task Repository" dialog="true" skip="true">
- <description>
- In this step you can learn how to setup your Bugzilla account, but you can skip it.
-<br/><br/>
-If the Task Repositories view isn&apos;t opened, select in the main menu <b>Window &gt; Show View &gt; Other... &gt; Mylyn &gt; Task Repositry</b>.
-<br/><br/>
-In the Task Repositories view you can see <b>Eclipse.org</b>. Right click on it and select <b>Properties</b>.<br/>
-Check out the <b>Anonymous Access</b> checkbox.<br/>
-Enter your user id for the <b>User ID</b> and password for the <b>Password</b>. <br/>
-Click on the <b>Validate Settings</b> button to check your given parameters.<br/>
-If you do not have an account you can register one, if you click on the <b>Create new accout</b> link.<br/>
-Click on the <b>Finish</b> button to save the values and close the dialog.
- </description>
- </item>
- <item title="Create a new Query" dialog="true" skip="false">
- <description>
- In the Task List view, click on the right mouse button then select <b>New &gt; Query</b> or click on the &quot;Click to Perform&quot; link below.
- </description>
- <command serialization="org.eclipse.ui.newWizard(newWizardId=org.eclipse.mylyn.tasks.ui.wizards.new.query)" confirm="true">
- </command>
- </item>
- <item title="Setup the query" dialog="true" skip="false">
- <description>
- Select <b>Eclipse.org</b> then click on the <b>Next</b> button.<br/>
- Select <b>Create a query using form</b> then click on the <b>Next</b> button.<br/>
- Enter <b>Mylyn bugs</b> for the query&apos;s title.
- Select <b>Mylyn</b> from the Product and <b>P1, P2</b> from the Priority then click on the <b>Finish</b> button.
- </description>
- </item>
-</cheatsheet>
diff --git a/org.eclipse.mylyn.help.ui/cheatsheets/TaskFocus.xml b/org.eclipse.mylyn.help.ui/cheatsheets/TaskFocus.xml
deleted file mode 100644
index 6c941ff0f..000000000
--- a/org.eclipse.mylyn.help.ui/cheatsheets/TaskFocus.xml
+++ /dev/null
@@ -1,86 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<cheatsheet title="Use Task-Focused UI">
- <intro>
- <description>
- This cheat sheet shows you how to handle a task lifecycle and how to use task-focused UI.
-<br/>
-You need an existing project for this sheet.
- </description>
- </intro>
- <item title="Open the Task List view" dialog="true" skip="false">
- <description>
- If the Task List view is not opened, select in the main menu <b>Window &gt; Show View &gt; Other... &gt; Mylyn &gt; Task List</b> or click on the &quot;Click to Perform&quot; link below.
- </description>
- <command serialization="org.eclipse.ui.views.showView(org.eclipse.ui.views.showView.viewId=org.eclipse.mylyn.tasks.ui.views.tasks)" confirm="true">
- </command>
- </item>
- <item title="Create and activate a task" dialog="true" skip="false">
- <description>
- In the Task List view, click on the right mouse button, then select <b>New &gt; Category</b>. Enter <b>Tutorials</b> for the category&apos;s name.
-<br/><br/>
-Then right click on the <b>Tutorials</b> category and select <b>New &gt; Task</b>. In the <b>New Task</b> dialog select <b>Local</b> then click on the <b>Finish</b> button.
- Enter <b>Learn task-focus</b> for the task&apos;s title and change the priority to <b>High</b>. You can add some notes, too.
-<br/><br/>
-Right click on the new task and select <b>Activate</b> to activate the task.
- </description>
- </item>
- <item title="Focus on the task" dialog="true" skip="false">
- <description>
- In the <b>Package Explorer</b> the task-focus turns on automatically if you activate a task.<br/>
-You can turn on or off this function if you click on the <b>Focus on Active Task</b> toogle button in the view&apos;s toolbar.<br/>
-You can use this function in the <b>Outline</b> view too. Turn it on in this view as well.
- </description>
- </item>
- <item title="Open the file" dialog="true" skip="false">
- <description>
- Press down the <b>Alt</b> button and click on the <b>left</b> mouse button on the <b>Package Explorer</b> view. Now you can see all of your projects in the view.
-<br/><br/>
-Next <b>Alt+click</b> on an arbitrary project and you can see the files wich are in the project.
-<br/><br/>
-With this method, select a class from the project.<br/>
-After the file is opened you can see the class both in the <b>Package Explorer</b> and in the <b>Outline</b> view.
- </description>
- </item>
- <item title="Add method to focus" dialog="true" skip="false">
- <description>
- Select in the Editor a method then you can see this method in the <b>Outline</b> view and in the <b>Package Explorer</b> under the class file.
-<br/><br/>
-Next press the Alt button and click on the class in the <b>Outline</b> view.<br/>
-Now you can see all methods. Methods which aren&apos;t in the focus are in <b>grey</b> color. Select another method from the list. After that all methods will disappear which aren&apos;t in the focus.
- </description>
- </item>
- <item title="Landmark" dialog="true" skip="false">
- <description>
- If an element&apos;s interest rank is high enough, it becomes a landmark, which is an implicitly created bookmark. Landmarks are showed in bold font.
-<br/><br/>
-Select the a method in the <b>Outline</b> view or in the <b>Package Explorer</b>. Right click on the method and select <b>Mark as Landmark</b>. After then this method becomes a landmark.
-<br/><br/>
-Also you can use key bindings. <b>Ctrl+Shift+Alt+UpArrow</b> to mark the element as landmark or <b>Ctrl+Shift+Alt+DownArrow</b> to mark less interesting for the element.
- </description>
- </item>
- <item title="Remove method from focus" dialog="true" skip="false">
- <description>
- Right click on a method which is in the focus and select <b>Remove from Focus</b>. After then this method will disappear from the list.
- </description>
- </item>
- <item title="Open another file" dialog="true" skip="false">
- <description>
- Press down the <b>Alt</b> button and <b>click</b> on the <b>project</b>. Select an arbitrary file from the list with <b>Alt+click</b>. After you open the new file you can see it in the focus and all files will disappear which aren&apos;t in the focus.
-<br/>
-You can use <b>Alt+RightArrow</b> instead of <b>Alt+click</b>.
- </description>
- </item>
- <item title="Quick Context View" dialog="true" skip="false">
- <description>
- Press down <b>Ctrl+Shift+Alt+RightArrow</b> buttons, then you can see all elements which are in the focus.
- </description>
- </item>
- <item title="Complete task" dialog="true" skip="false">
- <description>
- In the Task List view, click on the right mouse button on the <b>Learn task-focus</b> task and select deactivate.
-<br/>
-Click again on the task with the right mouse button and select <b>Mark &gt; Complete</b>. <br/>
-After then the task&apos;s name will be struck through.
- </description>
- </item>
-</cheatsheet>
diff --git a/org.eclipse.mylyn.help.ui/doc/book.css b/org.eclipse.mylyn.help.ui/doc/book.css
deleted file mode 100644
index faa4199fe..000000000
--- a/org.eclipse.mylyn.help.ui/doc/book.css
+++ /dev/null
@@ -1 +0,0 @@
-@import "../../PRODUCT_PLUGIN/book.css";
diff --git a/org.eclipse.mylyn.help.ui/doc/images/2.0/ui-legend.gif b/org.eclipse.mylyn.help.ui/doc/images/2.0/ui-legend.gif
deleted file mode 100644
index 6778787af..000000000
--- a/org.eclipse.mylyn.help.ui/doc/images/2.0/ui-legend.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/doc/images/2.0/welcome.gif b/org.eclipse.mylyn.help.ui/doc/images/2.0/welcome.gif
deleted file mode 100644
index 3fe38ce0b..000000000
--- a/org.eclipse.mylyn.help.ui/doc/images/2.0/welcome.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/doc/images/2.0/working-sets-edit.gif b/org.eclipse.mylyn.help.ui/doc/images/2.0/working-sets-edit.gif
deleted file mode 100644
index d33b015f5..000000000
--- a/org.eclipse.mylyn.help.ui/doc/images/2.0/working-sets-edit.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/doc/images/2.0/working-sets-switch.gif b/org.eclipse.mylyn.help.ui/doc/images/2.0/working-sets-switch.gif
deleted file mode 100644
index 986cdae4e..000000000
--- a/org.eclipse.mylyn.help.ui/doc/images/2.0/working-sets-switch.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/doc/images/2.0M1/bugzilla-local-users.gif b/org.eclipse.mylyn.help.ui/doc/images/2.0M1/bugzilla-local-users.gif
deleted file mode 100644
index a81f8f035..000000000
--- a/org.eclipse.mylyn.help.ui/doc/images/2.0M1/bugzilla-local-users.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/doc/images/2.0M1/bugzilla-time-tracking.gif b/org.eclipse.mylyn.help.ui/doc/images/2.0M1/bugzilla-time-tracking.gif
deleted file mode 100644
index 2e947ea43..000000000
--- a/org.eclipse.mylyn.help.ui/doc/images/2.0M1/bugzilla-time-tracking.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/doc/images/2.0M1/java-editor-hyperlink.gif b/org.eclipse.mylyn.help.ui/doc/images/2.0M1/java-editor-hyperlink.gif
deleted file mode 100644
index 0b5b39202..000000000
--- a/org.eclipse.mylyn.help.ui/doc/images/2.0M1/java-editor-hyperlink.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/doc/images/2.0M1/jira-editor-hyperlink.gif b/org.eclipse.mylyn.help.ui/doc/images/2.0M1/jira-editor-hyperlink.gif
deleted file mode 100644
index cbbf01185..000000000
--- a/org.eclipse.mylyn.help.ui/doc/images/2.0M1/jira-editor-hyperlink.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/doc/images/2.0M1/task-context-editor.gif b/org.eclipse.mylyn.help.ui/doc/images/2.0M1/task-context-editor.gif
deleted file mode 100644
index d7e9eea00..000000000
--- a/org.eclipse.mylyn.help.ui/doc/images/2.0M1/task-context-editor.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/doc/images/2.0M1/task-editor-progress.gif b/org.eclipse.mylyn.help.ui/doc/images/2.0M1/task-editor-progress.gif
deleted file mode 100644
index 2ed5c86b4..000000000
--- a/org.eclipse.mylyn.help.ui/doc/images/2.0M1/task-editor-progress.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/doc/images/2.0M2/bugzilla-due-dates.gif b/org.eclipse.mylyn.help.ui/doc/images/2.0M2/bugzilla-due-dates.gif
deleted file mode 100644
index 7218936d4..000000000
--- a/org.eclipse.mylyn.help.ui/doc/images/2.0M2/bugzilla-due-dates.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/doc/images/2.0M2/context-apply-attachments.gif b/org.eclipse.mylyn.help.ui/doc/images/2.0M2/context-apply-attachments.gif
deleted file mode 100644
index 2313d4dc6..000000000
--- a/org.eclipse.mylyn.help.ui/doc/images/2.0M2/context-apply-attachments.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/doc/images/2.0M2/context-quick-view.gif b/org.eclipse.mylyn.help.ui/doc/images/2.0M2/context-quick-view.gif
deleted file mode 100644
index 1a96ed3cd..000000000
--- a/org.eclipse.mylyn.help.ui/doc/images/2.0M2/context-quick-view.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/doc/images/2.0M2/hyperlinks-text.gif b/org.eclipse.mylyn.help.ui/doc/images/2.0M2/hyperlinks-text.gif
deleted file mode 100644
index 319712ab3..000000000
--- a/org.eclipse.mylyn.help.ui/doc/images/2.0M2/hyperlinks-text.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/doc/images/2.0M2/jira-java-hyperlinks.gif b/org.eclipse.mylyn.help.ui/doc/images/2.0M2/jira-java-hyperlinks.gif
deleted file mode 100644
index b0f02ff45..000000000
--- a/org.eclipse.mylyn.help.ui/doc/images/2.0M2/jira-java-hyperlinks.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/doc/images/2.0M2/repository-settings-proxy.gif b/org.eclipse.mylyn.help.ui/doc/images/2.0M2/repository-settings-proxy.gif
deleted file mode 100644
index 1d4fd8dc5..000000000
--- a/org.eclipse.mylyn.help.ui/doc/images/2.0M2/repository-settings-proxy.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/doc/images/2.0M2/synchronize-view-add.gif b/org.eclipse.mylyn.help.ui/doc/images/2.0M2/synchronize-view-add.gif
deleted file mode 100644
index 011daf256..000000000
--- a/org.eclipse.mylyn.help.ui/doc/images/2.0M2/synchronize-view-add.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/doc/images/2.0M2/task-editor-warning.gif b/org.eclipse.mylyn.help.ui/doc/images/2.0M2/task-editor-warning.gif
deleted file mode 100644
index 14b638e8e..000000000
--- a/org.eclipse.mylyn.help.ui/doc/images/2.0M2/task-editor-warning.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/doc/images/2.0M2/tasklist-schedule.gif b/org.eclipse.mylyn.help.ui/doc/images/2.0M2/tasklist-schedule.gif
deleted file mode 100644
index babced6fc..000000000
--- a/org.eclipse.mylyn.help.ui/doc/images/2.0M2/tasklist-schedule.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/doc/images/2.0M2/trac-hyperlinks.gif b/org.eclipse.mylyn.help.ui/doc/images/2.0M2/trac-hyperlinks.gif
deleted file mode 100644
index ff8c1d142..000000000
--- a/org.eclipse.mylyn.help.ui/doc/images/2.0M2/trac-hyperlinks.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/doc/images/2.0M3/annotation-hyperlinks.gif b/org.eclipse.mylyn.help.ui/doc/images/2.0M3/annotation-hyperlinks.gif
deleted file mode 100644
index b62aeaab5..000000000
--- a/org.eclipse.mylyn.help.ui/doc/images/2.0M3/annotation-hyperlinks.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/doc/images/2.0M3/bugzilla-subtasks.gif b/org.eclipse.mylyn.help.ui/doc/images/2.0M3/bugzilla-subtasks.gif
deleted file mode 100644
index f5043b0b0..000000000
--- a/org.eclipse.mylyn.help.ui/doc/images/2.0M3/bugzilla-subtasks.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/doc/images/2.0M3/jira-attachments.gif b/org.eclipse.mylyn.help.ui/doc/images/2.0M3/jira-attachments.gif
deleted file mode 100644
index fbb0aa98f..000000000
--- a/org.eclipse.mylyn.help.ui/doc/images/2.0M3/jira-attachments.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/doc/images/2.0M3/task-editor-error.gif b/org.eclipse.mylyn.help.ui/doc/images/2.0M3/task-editor-error.gif
deleted file mode 100644
index 38d20f8de..000000000
--- a/org.eclipse.mylyn.help.ui/doc/images/2.0M3/task-editor-error.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/doc/images/2.0M3/task-tooltip-incoming.gif b/org.eclipse.mylyn.help.ui/doc/images/2.0M3/task-tooltip-incoming.gif
deleted file mode 100644
index 3392effdb..000000000
--- a/org.eclipse.mylyn.help.ui/doc/images/2.0M3/task-tooltip-incoming.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/doc/images/2.0M3/tasklist-tree.gif b/org.eclipse.mylyn.help.ui/doc/images/2.0M3/tasklist-tree.gif
deleted file mode 100644
index e80931f49..000000000
--- a/org.eclipse.mylyn.help.ui/doc/images/2.0M3/tasklist-tree.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/doc/images/2.0M3/tasks-content-assist.gif b/org.eclipse.mylyn.help.ui/doc/images/2.0M3/tasks-content-assist.gif
deleted file mode 100644
index 169ae903d..000000000
--- a/org.eclipse.mylyn.help.ui/doc/images/2.0M3/tasks-content-assist.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/doc/images/2.0M3/tasks-working-sets.gif b/org.eclipse.mylyn.help.ui/doc/images/2.0M3/tasks-working-sets.gif
deleted file mode 100644
index 6030cbcc1..000000000
--- a/org.eclipse.mylyn.help.ui/doc/images/2.0M3/tasks-working-sets.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/doc/images/2.0M3/team-hyperlinks-annotations.gif b/org.eclipse.mylyn.help.ui/doc/images/2.0M3/team-hyperlinks-annotations.gif
deleted file mode 100644
index d3e8c8d2c..000000000
--- a/org.eclipse.mylyn.help.ui/doc/images/2.0M3/team-hyperlinks-annotations.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/doc/images/2.0M3/team-hyperlinks-history.gif b/org.eclipse.mylyn.help.ui/doc/images/2.0M3/team-hyperlinks-history.gif
deleted file mode 100644
index e9888c226..000000000
--- a/org.eclipse.mylyn.help.ui/doc/images/2.0M3/team-hyperlinks-history.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/doc/images/2.0M3/ui-legend-connectors.gif b/org.eclipse.mylyn.help.ui/doc/images/2.0M3/ui-legend-connectors.gif
deleted file mode 100644
index 696ef1ece..000000000
--- a/org.eclipse.mylyn.help.ui/doc/images/2.0M3/ui-legend-connectors.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/doc/images/2.0M3/ui-usage-report.gif b/org.eclipse.mylyn.help.ui/doc/images/2.0M3/ui-usage-report.gif
deleted file mode 100644
index c7402cb92..000000000
--- a/org.eclipse.mylyn.help.ui/doc/images/2.0M3/ui-usage-report.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/doc/images/2.1M1/bugzilla-cached-config.png b/org.eclipse.mylyn.help.ui/doc/images/2.1M1/bugzilla-cached-config.png
deleted file mode 100644
index 9bfa3a31d..000000000
--- a/org.eclipse.mylyn.help.ui/doc/images/2.1M1/bugzilla-cached-config.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/doc/images/2.1M1/bugzilla-custom-resolutions.png b/org.eclipse.mylyn.help.ui/doc/images/2.1M1/bugzilla-custom-resolutions.png
deleted file mode 100644
index 6f77eda5b..000000000
--- a/org.eclipse.mylyn.help.ui/doc/images/2.1M1/bugzilla-custom-resolutions.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/doc/images/2.1M1/bugzilla-search-keywords.png b/org.eclipse.mylyn.help.ui/doc/images/2.1M1/bugzilla-search-keywords.png
deleted file mode 100644
index bcac354d8..000000000
--- a/org.eclipse.mylyn.help.ui/doc/images/2.1M1/bugzilla-search-keywords.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/doc/images/2.1M1/screenshot-capture.png b/org.eclipse.mylyn.help.ui/doc/images/2.1M1/screenshot-capture.png
deleted file mode 100644
index 66e35cd00..000000000
--- a/org.eclipse.mylyn.help.ui/doc/images/2.1M1/screenshot-capture.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/doc/images/2.1M1/spelling-corrections.png b/org.eclipse.mylyn.help.ui/doc/images/2.1M1/spelling-corrections.png
deleted file mode 100644
index 8f90c06fa..000000000
--- a/org.eclipse.mylyn.help.ui/doc/images/2.1M1/spelling-corrections.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/doc/images/2.1M1/task-editor-hyperlinks.png b/org.eclipse.mylyn.help.ui/doc/images/2.1M1/task-editor-hyperlinks.png
deleted file mode 100644
index df97d0f52..000000000
--- a/org.eclipse.mylyn.help.ui/doc/images/2.1M1/task-editor-hyperlinks.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/doc/images/2.1M1/tasklist-search.png b/org.eclipse.mylyn.help.ui/doc/images/2.1M1/tasklist-search.png
deleted file mode 100644
index 08acba8c6..000000000
--- a/org.eclipse.mylyn.help.ui/doc/images/2.1M1/tasklist-search.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/doc/images/mylyn-2.0.png b/org.eclipse.mylyn.help.ui/doc/images/mylyn-2.0.png
deleted file mode 100644
index 566b2eb4f..000000000
--- a/org.eclipse.mylyn.help.ui/doc/images/mylyn-2.0.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/doc/new.html b/org.eclipse.mylyn.help.ui/doc/new.html
deleted file mode 100644
index 0e8fa9ba8..000000000
--- a/org.eclipse.mylyn.help.ui/doc/new.html
+++ /dev/null
@@ -1,916 +0,0 @@
-<html>
-<body bgcolor="FFFFFF">
-
-<p><b><a href="http://www.eclipse.org/mylyn/new/">The up-to-date New &amp;
-Noteworthy for Mylyn 2.3 is available online</a>
- </b>along with other Mylyn documentation.</p>
-
-<table border="1" style="border-collapse: collapse" width="100%" id="table128" cellpadding="4" bordercolor="#FFFFFF">
- <tr>
- <td bgcolor="#595791" width="7%" align="center"><b>
- <font color="#FFFFFF" size="1">Release</font></b></td>
- <td bgcolor="#595791" width="5%" align="center"><b>
- <font color="#FFFFFF" size="1">Resolved
- </font></b></td>
- <td bgcolor="#595791" width="*" align="center"><b>
- <font color="#FFFFFF" size="1">Community Contributions</font></b></td>
- </tr>
- <tr>
- <td bgcolor="#E0D0E6"><font size="1">2.3<br>
- <i>Feb 27, 2008</i></font></td>
- <td bgcolor="#E0D0E6" align="center">
- <a href="https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&classification=Tools&product=Mylyn&component=Bugzilla&component=Core&component=Doc&component=Java&component=Jira&component=Monitor&component=Tasks&component=Trac&component=UI&component=Web&component=XML&component=XPlanner&long_desc_type=allwordssubstr&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&status_whiteboard_type=allwordssubstr&status_whiteboard=&keywords_type=allwords&keywords=&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&emailtype1=substring&email1=&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=2007-12-21&chfieldto=2008-02-28&chfield=resolution&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=noop&type0-0-0=noop&value0-0-0=">
- <font size="1"><i>384</i></font></a></td>
- <td bgcolor="#E0D0E6"><font size="1">David Green helped with task editor layout performance</font></td>
- </tr>
- <tr>
- <td bgcolor="#FAF7FB"><font size="1">2.2<br>
- <i>Dec 19, 2007</i></font></td>
- <td bgcolor="#FAF7FB" align="center">
- <a href="https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&classification=Tools&product=Mylyn&component=Bugzilla&component=Core&component=Doc&component=Java&component=Jira&component=Monitor&component=Tasks&component=Trac&component=UI&component=Web&component=XML&component=XPlanner&long_desc_type=allwordssubstr&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&status_whiteboard_type=allwordssubstr&status_whiteboard=&keywords_type=allwords&keywords=&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&emailtype1=substring&email1=&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=2007-09-29&chfieldto=2007-12-20&chfield=resolution&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=noop&type0-0-0=noop&value0-0-0=">
- <font size="1"><i>384</i></font></a><i><a href="https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&classification=Tools&product=Mylyn&component=Bugzilla&component=Core&component=Doc&component=Java&component=Jira&component=Monitor&component=Tasks&component=Trac&component=UI&component=Web&component=XML&component=XPlanner&long_desc_type=allwordssubstr&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&status_whiteboard_type=allwordssubstr&status_whiteboard=&keywords_type=allwords&keywords=&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&emailtype1=substring&email1=&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=2007-09-29&chfieldto=2007-12-20&chfield=resolution&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=noop&type0-0-0=noop&value0-0-0="><br><font size="1">bugs</font></a></i></td>
- <td bgcolor="#FAF7FB"><font size="1">Frank Becker resolved a total of 19
- bugs with Bugzilla and the task editor. Willian Mitsuda contributed to
- screenshot capture and provided several other improvements. Maarten
- Meijer provided performance improvements and tests. Shawn Minto provided
- task context and UI fixes.&nbsp; Benjamin Pasero provided the
- notification popup shell rendering. Additional useful contributions, fixes
- and patches were provided by Helen Bershadskaya, Leo Dos Santos, Michael
- Valenta, Kevin Bracey, Chris Aniszczyk, George Lindholm, Jakum
- Jurkiewicz, Ketan Padegoankar and Nathan Hapke.</font></td>
- </tr>
- <tr>
- <td bgcolor="#FAF7FB"><font size="1">2.1<br>
- <i>Sep 28, 2007</i></font></td>
- <td bgcolor="#FAF7FB" align="center">
- <a href="https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&classification=Tools&product=Mylyn&component=Bugzilla&component=Core&component=Doc&component=Java&component=Jira&component=Monitor&component=Tasks&component=Trac&component=UI&component=Web&component=XML&component=XPlanner&long_desc_type=allwordssubstr&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&status_whiteboard_type=allwordssubstr&status_whiteboard=&keywords_type=allwords&keywords=&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&emailtype1=substring&email1=&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=2007-08-29&chfieldto=2007-09-28&chfield=resolution&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=noop&type0-0-0=noop&value0-0-0=">
- <font size="1">167</font><br><font size="1">bugs</font></a></td>
- <td bgcolor="#FAF7FB"><font size="1">Jevgeni Holodkov added new import
- and export functionality. Shawn Minto provided several fixes for the
- Task List.&nbsp; Maarten Meijer added task cloning support. Helen
- Bershadskaya improved the XPlanner connector and Leo Dos Santos fixed
- export for Mac.</font></td>
- </tr>
- <tr>
- <td bgcolor="#FAF7FB"><font size="1">2.1M<br>
- <i>Aug 27, 2007</i></font></td>
- <td bgcolor="#FAF7FB" align="center">
- <a href="https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&classification=Tools&product=Mylyn&component=Bugzilla&component=Core&component=Doc&component=Java&component=Jira&component=Monitor&component=Tasks&component=Trac&component=UI&component=Web&component=XML&component=XPlanner&long_desc_type=allwordssubstr&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&status_whiteboard_type=allwordssubstr&status_whiteboard=&keywords_type=allwords&keywords=&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&emailtype1=substring&email1=&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=2007-07-01&chfieldto=2007-08-28&chfield=resolution&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=noop&type0-0-0=noop&value0-0-0=">
- <font size="1">295</font><br><font size="1">bugs</font></a></td>
- <td bgcolor="#FAF7FB"><font size="1">Balazs Brinkus contributed the
- screenshot attachment and provided new user experience improvements.
- Xiaoyang Guan provided prototype wiki integration for Trac.&nbsp; Frank
- Becker provided numerous improvements including custom resolutions for
- Bugzilla. Jevgeni Holodkov contributed prototype task and query import
- export facilities.&nbsp; Helen Bershadskaya contributed several XPlanner
- connector improvements including the new task editor. Raphael Ackermann
- provided several improvements including spell checking in task
- summaries.&nbsp; Shawn Minto provided over a dozen useful bug fixes.
- Additional useful patches were provided by George Lindholm, Leo Dos
- Santos, Maarten Meijer, Toomas Romer, David Green, Willian Mitsuda,
- Meghan Allen and Jacek Pospychala.</font></td>
- </tr>
- </table>
-
-<p><b>Also see the New &amp; Noteworthy for:
-<a href="http://eclipse.org/mylyn/new/new-2.0.html">Mylyn 2.0</a>,
-<a href="http://eclipse.org/mylyn/new/new-1.0.html">Mylyn 1.0-0.6</a>, <a href="http://eclipse.org/mylyn/new/new-0.5.html">
-Mylyn 0.5</a>,&nbsp;
-<a href="http://eclipse.org/mylyn/new/new-0.4.html">Mylyn 0.4</a>, <a href="http://eclipse.org/mylyn/new/new-0.3.html">
-Mylyn 0.3</a></b></p>
-<p><b>Updating</b>:&nbsp; If using a version prior to 2.0, must upgrade to 2.0
-before installing Mylyn 2.2.</p>
-
-<!--
-
-<p><b>Update Notes</b> <br>
-&nbsp;&nbsp;&nbsp; - We recommend using the Eclipse 3.3M7 release due to the
-numerous UI improvements (see Eclipse 3.3 only items below).<br>
-&nbsp;&nbsp;&nbsp; - 2.0M2 and later releases will reset your task activity
-timings (Mylyn now uses a new and much more robust timing mechanism).<br>
-&nbsp;&nbsp;&nbsp; - The offline task data cache will be reset, so submit outgoing changes before
- updating.<br>
-&nbsp;&nbsp;&nbsp; - If upgrading from a 0.x version, first update to Mylyn 1.0
-and see the corresponding <a href="http://eclipse.org/mylyn/doc/new-1.0.html">
-update notes</a>.<br>
-&nbsp;&nbsp;&nbsp; - Trac xml-rpc users: you will
-<a href="http://wiki.eclipse.org/index.php/Mylyn_FAQ#Trac_Connector">need the
-latest</a> XmlRpcPlugin.<br>&nbsp;</p>
-
-<p><b>Mylar -&gt; Mylyn Migration</b></p>
-<ul>
- <li>No uninstall necessary during the update, the old plug-ins will
- automatically be disabled.</li>
- <li>Can delete all old plug-ins/features either manually or via the Update
- Manager.</li>
- <li>All Mylyn preferences will need to be reset.&nbsp; If you set a custom
- data directory this will need to be reset on start.</li>
- <li>Project to Task Repository associations will need to be reset.</li>
-</ul>
-<p><b>UI Cleanup</b></p>
-<p>The following things have moved into the Sandbox either because they are not
-at the 2.0 quality level or because they are experimental features.</p>
-<ul>
- <li>Pause Context Capture</li>
- <li>Active Task on open</li>
- <li>Synchronize view style overlays</li>
- <li>Task Activity report</li>
- <li>Legend moved to view menu</li>
-</ul>
--->
-<hr>
-
-<table cellpadding="10" cellspacing="0" id="table392">
- <tr>
- <td align="left" valign="top" width="15%" bgcolor=#E0D0E6>
- <p align="right"><b>IN PROGRESS</b></p>
- </td>
- <td valign="top" width="70%">
- Need UI review:<ul>
- <li>Revised task scheduling</li>
- <li>Reversing of comment ordering</li>
- <li>Minor: report as bug includes sub-entries if present</li>
- <li>JIRA: wiki markup supported</li>
- <li>Focusing of All Markers view is supported (should we
- suppress showing empty grouping nodes?)</li>
- <li>Attachment can be compared (add icon?)</li>
- <li>Screenshot markup and preview</li>
- <li>Linking with editor improved</li>
- </ul>
- <p>Done:</p>
- <ul>
- <li>Major Task Editor performance improvements, especially for
- editor open</li>
- <li>Warnings when attempting to commit resources across task
- repositories</li>
- <li>Strikethrough fonts for dependent bugs and in task editor
- comments</li>
- <li>Bugzilla: improved synchronization performance</li>
- <li>Bugzilla: query on multiple email fields</li>
- <li>Task Search: groupings show number [should we make this show
- up in lighter color?]</li>
- <li>Local tasks can be promoted to repository tasks via clone</li>
- <li>Bugzilla: file sizes are shown</li>
- </ul>
- <p>XPlanner:</p>
- <ul>
- <li>The XPlanner connector now allows using Mylyn's automatic
- time tracking to be incorporated in the actual time setting for
- an XPlanner task. The XPlanner Task editor actions section has a
- checkbox that allows the user to turn automatic time tracking on
- or off (default is off). There are also options for allowing the
- automatically tracked time to be added to or replace the current
- actual time (default is adding -- actual update is done when the
- Submit button is pressed), and rounding the automatically
- tracked time to the nearest half hour (default is to round). The
- user still has the option of putting in actual time manually,
- however, if automatic actual time tracking is enabled, the last
- entered user value will be overridden with the latest tracked
- time.<br>
- <a href="https://bugs.eclipse.org/bugs/attachment.cgi?id=87934">
- https://bugs.eclipse.org/bugs/attachment.cgi?id=87934</a> </li>
- </ul>
- </td>
- </tr>
-</table>
-
-<p>See <span style="background-color: #E0D0E6">what's new</span> for: </p>
-<ul>
- <li><a href="#task-list">Task List</a></li>
- <li><a href="#task-editor">Task Editor</a></li>
- <li><a href="#focused-ui">Task-Focused UI</a></li>
- <li><a href="#bugzilla">Bugzilla Connector</a></li>
- <li><a href="#trac">Trac Connector</a></li>
- <li><a href="#jira">JIRA Connector</a></li>
-</ul>
-<h2><a name="task-list">Task List</a><br>
-&nbsp;</h2>
-
-<table cellpadding="10" cellspacing="0" id="table393">
- <tr>
- <td align="left" valign="top" width="15%" bgcolor=#E0D0E6>
- <p align="right"><b>...</b></p>
- </td>
- <td valign="top" width="70%">
- <p align="left">...</p>
- <p class="MsoPlainText">
- <img border="0" src="../../mylyn/new/images/2.2/tasklist-archive.png"></td>
- </tr>
- <tr>
- <td colspan="2">
- <hr>
- </td>
- </tr>
-</table>
-
-<table cellpadding="10" cellspacing="0" id="table380">
- <tr>
- <td align="left" valign="top" width="15%" bgcolor=#FAF7FB>
- <p align="right"><b>Task Archive is Gone</b></p>
- </td>
- <td valign="top" width="70%">
- <p align="left">The problematic <i>Archive </i>category is finally
- gone.&nbsp; It has been replaced by<i> Unmatched </i>containers,
- which will contain every task that you have accessed, but that's not
- currently matched by a query or has not been added to a category.&nbsp;
- If you notice a large number of tasks in an<i> Unmatched</i>
- container, you have the following options:</p>
- <ul>
- <li>
- <p align="left">Update your queries so that the unmatched tasks
- are matched by a query.&nbsp; For example, if querying per
- person, we recommend including all closed tasks so that these
- don't drop into the <i>Unmatched</i> container.</p></li>
- <li>
- <p align="left">Delete tasks from the <i>Unmatched</i>
- container.&nbsp; These will be permanently removed from the <i>
- Task List</i> and will not participate in synchronization.</p>
- </li>
- </ul>
- <p class="MsoPlainText">
- <img border="0" src="../../mylyn/new/images/2.2/tasklist-archive.png"></td>
- </tr>
- <tr>
- <td colspan="2">
- <hr>
- </td>
- </tr>
-</table>
-
-<table cellpadding="10" cellspacing="0" id="table376">
- <tr>
- <td align="left" valign="top" width="15%" bgcolor=#FAF7FB>
- <p align="right"><b>New Notification Popups</b></p>
- </td>
- <td valign="top" width="70%">
- <p align="left">The rendering of the notification popups has been
- improved, and on Eclipse 3.4 the popups fade into and out of view
- (Compositing window manager required on Linux).&nbsp; The popups can
- be interacted with and will not disappear when the mouse is over
- them.&nbsp; Click the incoming arrow to mark the task read, or the
- hyperlink to open the task.&nbsp;&nbsp; </p><p class="MsoPlainText">
- <img border="0" src="../../mylyn/new/images/2.2/tasklist-notification.png"></td>
- </tr>
- <tr>
- <td colspan="2">
- <hr>
- </td>
- </tr>
-</table>
-
-<table cellpadding="10" cellspacing="0" id="table378">
- <tr>
- <td align="left" valign="top" width="15%" bgcolor=#FAF7FB>
- <p align="right"><b>Create Task from JUnit Failure</b></p>
- </td>
- <td valign="top" width="70%">
- <p align="left">A new task can be created from a JUnit test failure.&nbsp;
- The failure trace will populate the description of the task.</p>
- <p class="MsoPlainText">
- <img border="0" src="../../mylyn/new/images/2.2/task-from-junit.png"><p class="MsoPlainText">
- &nbsp;</td>
- </tr>
- <tr>
- <td colspan="2">
- <hr>
- </td>
- </tr>
-</table>
-
-<table cellpadding="10" cellspacing="0" id="table379">
- <tr>
- <td align="left" valign="top" width="15%" bgcolor=#FAF7FB>
- <p align="right"><b>Easier Working Set Creation</b></p>
- </td>
- <td valign="top" width="70%">
- <p align="left">Mylyn's task and resource working sets can now be
- created and edited more easily if you map projects to task
- repositories (<i>Project -&gt; Properties -&gt; Task Repository</i>).&nbsp;
- In the screenshot below, we see that every Mylyn project is
- associated with the Eclipse task repository, and that all Mylyn
- projects can be added to the &quot;Mylyn&quot; working set with a single
- click.</p>
- <p class="MsoPlainText">
- <img border="0" src="../../mylyn/new/images/2.2/working-set-creation.png"></td>
- </tr>
- <tr>
- <td colspan="2">
- <hr>
- </td>
- </tr>
-</table>
-
-<table cellpadding="10" cellspacing="0" id="table382">
- <tr>
- <td align="left" valign="top" width="15%" bgcolor=#FAF7FB>
- <p align="right"><b>Open Task Dialog Improved</b></p>
- </td>
- <td valign="top" width="70%">
- <p align="left">The filtering, layout and performance of the <i>Open
- Task</i> (Ctrl+F12) dialog have been improved.</p>
- <p class="MsoPlainText">
- <img border="0" src="../../mylyn/new/images/2.2/open-task.png"></td>
- </tr>
- <tr>
- <td colspan="2">
- <hr>
- </td>
- </tr>
-</table>
-
-<table cellpadding="10" cellspacing="0" id="table383">
- <tr>
- <td align="left" valign="top" width="15%" bgcolor=#FAF7FB>
- <p align="right"><b>Search Results Grouping by Owner</b></p>
- </td>
- <td valign="top" width="70%">
- <p align="left">Task search results can now be grouped by owner, via
- the popup menu in the <i>Search</i> view. </p>
- <p class="MsoPlainText">
- <img border="0" src="../../mylyn/new/images/2.2/search-grouping.png"></td>
- </tr>
- <tr>
- <td colspan="2">
- <hr>
- </td>
- </tr>
-</table>
-
-<table cellpadding="10" cellspacing="0" id="table377">
- <tr>
- <td align="left" valign="top" width="15%" bgcolor=#FAF7FB>
- <p align="right"><b>Task Navigation Key Bindings</b></p>
- </td>
- <td valign="top" width="70%">
- <p align="left">The Task List now provides
- <a href="http://wiki.eclipse.org/Mylyn_User_Guide#Keybindings">
- additional key bindings</a> for task reading and navigation.</p></td>
- </tr>
- <tr>
- <td colspan="2">
- <hr>
- </td>
- </tr>
-</table>
-
-<table cellpadding="10" cellspacing="0" id="table365">
- <tr>
- <td align="left" valign="top" width="15%" bgcolor=#FAF7FB>
- <p align="right"><b>Subtask Improvements</b></p>
- </td>
- <td valign="top" width="70%">
- <p class="MsoPlainText">Support for subtasks has been improved and
- is now on by default for all connectors including Bugzilla.&nbsp;
- Note that for Bugzilla the &quot;depends on&quot; attribute is used for
- subtask grouping.<p class="MsoPlainText">
- <img border="0" src="../../mylyn/new/images/2.1/subtasks-option.png"></td>
- </tr>
- <tr>
- <td colspan="2">
- <hr>
- </td>
- </tr>
-</table>
-
-<table cellpadding="10" cellspacing="0" id="table367">
- <tr>
- <td align="left" valign="top" width="15%" bgcolor=#FAF7FB>
- <p align="right"><b>Import, Export and Cloning</b></p>
- </td>
- <td valign="top" width="70%">
- <p class="MsoPlainText">In addition to being able to Import/Export
- your entire<i> Task List</i>, individual tasks and queries can now
- be imported and exported to a zip file.&nbsp; Exported tasks will
- include task contexts, and importing a repository task or query will
- automatically import the corresponding<i> Task Repository</i> if it
- does not exist.&nbsp; Import and Export can also be performed via
- drag-and-drop to and from external windows.&nbsp; <p class="MsoPlainText">
- <img border="0" src="../../mylyn/new/images/2.1/tasklist-import-export.png"><p class="MsoPlainText">
- Both tasks and queries can now be cloned.&nbsp; Cloning of queries
- allows you to easily modify an existing query.&nbsp; Cloning of
- tasks will bring up a new <i>Task Editor </i>that contains
- information about the task being cloned.&nbsp; Note that this can be
- done across repositories (e.g., from Bugzilla to JIRA,
- as visible below).<p class="MsoPlainText">
- <img border="0" src="../../mylyn/new/images/2.1/tasks-clone.png"></td>
- </tr>
- <tr>
- <td colspan="2">
- <hr>
- </td>
- </tr>
-</table>
-
-<table cellpadding="10" cellspacing="0" id="table371">
- <tr>
- <td align="left" valign="top" width="15%" bgcolor=#FAF7FB>
- <p align="right"><b>Popup Menu Improvements</b></p>
- </td>
- <td valign="top" width="70%">
- <p class="MsoPlainText">The <i>Schedule for</i> menu now uses <i>Not
- Scheduled</i> instead of <i>Clear</i> action so that it can indicate
- when a task has not been scheduled. The <i>New</i> menu now provides
- a shortcut for creating local tasks without a wizard.&nbsp; The
- keyboard shortcut creating new local tasks is the Insert key on Platforms that
- support it, or Alt+Shift+N, T on all platforms (note that this might
- require resetting the <i>Perspective</i> in order to see the new
- Mylyn actions). </td>
- </tr>
- <tr>
- <td colspan="2">
- <hr>
- </td>
- </tr>
-</table>
-
-<table cellpadding="10" cellspacing="0" id="table355">
- <tr>
- <td align="left" valign="top" width="15%" bgcolor=#FAF7FB>
- <p align="right"><b>Open Repository Tasks</b></p>
- </td>
- <td valign="top" width="70%">
- <p class="MsoPlainText">The opening of repository tasks has been
- streamlined and integrated into the top of the <i>Task Search</i> (Ctrl+H)
- dialog, and facilitates opening tasks that are not in the <i>
- Task List</i> by their key/ID.&nbsp; Entering text into the<i> Find</i> box of the <i>
- Task List</i> will cause a hyperlink to the search dialog to appear
- just below the box.&nbsp;
- If the contents of the <i>Find</i> box look like a task key/ID, they
- will be used to populate
- the <i>Task Search</i> dialog.&nbsp; The Ctrl+Shift+F12 shortcut can
- also be used to invoke this action, and will additionally inspect the contents of
- the clipboard to look for a task key/ID to populate the <i>Task Search</i>
- dialog with.&nbsp; The Ctrl+F12 <i>Open Task</i> dialog also
- provides a link to the <i>Task Search </i>page. <p class="MsoPlainText">
- <img border="0" src="../../mylyn/new/images/2.1M1/tasklist-search.png" width="531" height="341"><p class="MsoPlainText">
- Note that off a task
- is selected in the active editor or the <i>Task List,</i> the repository in the <i>Search </i>dialog
- will be now automatically set to the corresponding repository,
- otherwise the previous repository will be used.&nbsp;
- The previous <i>Open Repository Task</i> dialog, disabled by default
- in Mylyn 2.0, can still be accessed via Ctrl+Shift+F12.&nbsp; Since
- the new functionality replaces this dialog the plan is to remove the
- old dialog for Mylyn 2.1 (see
- <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=193423">bug
- 193423</a>).</td>
- </tr>
- <tr>
- <td colspan="2">
- <hr>
- </td>
- </tr>
-</table>
-
-<h2>&nbsp;</h2>
-<h2><a name="task-editor">Task Editor</a></h2>
-
-<table cellpadding="10" cellspacing="0" id="table390">
- <tr>
- <td align="left" valign="top" width="15%" bgcolor=#FAF7FB>
- <p align="right"><b>Create Task from Text Selection</b></p>
- </td>
- <td valign="top" width="70%">
- <p align="left">A new task can be created from any selection in the
- task editor.</p>
- <p class="MsoPlainText">
- <img border="0" src="../../mylyn/new/images/2.2/task-from-comment.png"><p class="MsoPlainText">
- &nbsp;</td>
- </tr>
- <tr>
- <td colspan="2">
- <hr>
- </td>
- </tr>
-</table>
-
-<table cellpadding="10" cellspacing="0" id="table385">
- <tr>
- <td align="left" valign="top" width="15%" bgcolor=#FAF7FB>
- <p align="right"><b>Comment Coloring</b></p>
- </td>
- <td valign="top" width="70%">
- <p align="left">Quoted comments are colored to make them stand out
- from other comment text.</p>
- <p class="MsoPlainText">
- <img border="0" src="../../mylyn/new/images/2.2/comment-coloring.png"></td>
- </tr>
- <tr>
- <td colspan="2">
- <hr>
- </td>
- </tr>
-</table>
-
-<table cellpadding="10" cellspacing="0" id="table384">
- <tr>
- <td align="left" valign="top" width="15%" bgcolor=#FAF7FB>
- <p align="right"><b>Screenshot Capture Improved</b></p>
- </td>
- <td valign="top" width="70%">
- <p align="left">Screenshot capture has been improved, and now uses a
- non-modal wizard, so that you can interact with Eclipse in order to
- prepare the screenshot.&nbsp; In order to attach a screenshot to a
- repository task, use <i>Task Editor -&gt; Attachments -&gt; Attach File...
- </i>and choose <i>Screenshot</i> as the attachment source.&nbsp;
- You can then use the <i>Capture</i> button one or more times in
- order to grab your entire desktop.&nbsp; In order to only submit a
- part of the desktop, create a crop rectangle by dragging the mouse,
- then submit the screenshot.&nbsp; Use the<i> Fit image </i>button in
- order to zoom in to see the screenshot at its native resolution.&nbsp;
- Screenshots are attached in the JPEG format.</p>
- <p class="MsoPlainText">
- <img border="0" src="../../mylyn/new/images/2.2/screenshot-capture.png"></td>
- </tr>
- <tr>
- <td colspan="2">
- <hr>
- </td>
- </tr>
-</table>
-
-<table cellpadding="10" cellspacing="0" id="table357">
- <tr>
- <td align="left" valign="top" width="15%" bgcolor=#FAF7FB>
- <p align="right"><b>Spelling Proposals</b></p>
- </td>
- <td valign="top" width="70%">
- <p class="MsoPlainText">Spelling proposals and dictionary additions
- can now be invoked via Ctrl+1 in the <i>Task Editor</i>.<p class="MsoPlainText">
- <img border="0" src="../../mylyn/new/images/2.1M1/spelling-corrections.png"></td>
- </tr>
- <tr>
- <td colspan="2">
- <hr>
- </td>
- </tr>
-</table>
-
-<table cellpadding="10" cellspacing="0" id="table359">
- <tr>
- <td align="left" valign="top" width="15%" bgcolor=#FAF7FB>
- <p align="right"><b>Hyperlink Hovers</b></p>
- </td>
- <td valign="top" width="70%">
- <p class="MsoPlainText">Hyperlink hovers showing task descriptions
- are now available in more places than previously, including in the
- <i>New Comment</i> area of the task editor.&nbsp; Hyperlinks are now
- available from task summary fields, along with spell checking.<p class="MsoPlainText">
- <img border="0" src="../../mylyn/new/images/2.1M1/task-editor-hyperlinks.png"></td>
- </tr>
- <tr>
- <td colspan="2">
- <hr>
- </td>
- </tr>
-</table>
-
-<p class="MsoPlainText">&nbsp; </p>
-<h2><a name="focused-ui">Task-Focused UI</a></h2>
-
-<table cellpadding="10" cellspacing="0" id="table373">
- <tr>
- <td align="left" valign="top" width="15%" bgcolor=#FAF7FB>
- <p align="right"><b>Task Context</b></p>
- </td>
- <td valign="top" width="70%">
- The slider <i>Context</i> tab on the Task Editor can now be used to
- view all elements still present in the workspace that have at any
- point been a part of the task context. This can be useful for
- pruning the task context before sharing it, for example, in order to
- remove private files that have been accessed.&nbsp; In addition,
- removing large numbers of elements from the task context is now
- instant.&nbsp;
- <p class="MsoPlainText">
- <img border="0" src="../../mylyn/new/images/2.2/context-slider.png"></td>
- </tr>
- <tr>
- <td colspan="2">
- <hr>
- </td>
- </tr>
-</table>
-
-<table cellpadding="10" cellspacing="0" id="table375">
- <tr>
- <td align="left" valign="top" width="15%" bgcolor=#FAF7FB>
- <p align="right"><b>Focus for Bookmarks</b></p>
- </td>
- <td valign="top" width="70%">
- <p align="left">The <i>Bookmarks</i> view now has a <i>Focus on
- Active Task</i> action, along with the two other Eclipse views that
- show markers (<i>Problems</i> and <i>Tasks</i>).</p>
- <p class="MsoPlainText">
- <img border="0" src="../../mylyn/new/images/2.2/focus-bookmarks.png"></td>
- </tr>
- <tr>
- <td colspan="2">
- <hr>
- </td>
- </tr>
-</table>
-
-<table cellpadding="10" cellspacing="0" id="table389">
- <tr>
- <td align="left" valign="top" width="15%" bgcolor=#FAF7FB>
- <p align="right"><b>Commit Comment Templates</b></p>
- </td>
- <td valign="top" width="70%">
- In addition to being configurable globally for the workspace (<i>Preferences
- -&gt; Mylyn -&gt; Team</i>), commit comment templates can now be
- configured per-project and checked in to source control.<p class="MsoPlainText">
- <img border="0" src="../../mylyn/new/images/2.2/team-templates-project.png"></td>
- </tr>
- <tr>
- <td colspan="2">
- <hr>
- </td>
- </tr>
-</table>
-
-<table cellpadding="10" cellspacing="0" id="table374">
- <tr>
- <td align="left" valign="top" width="15%" bgcolor=#FAF7FB>
- <p align="right"><b>Alt+click Navigation</b></p>
- </td>
- <td valign="top" width="70%">
- <p align="left">
- <a href="http://wiki.eclipse.org/Mylyn_User_Guide#Alt.2BClick_navigation">
- Alt+click navigation</a>, used for quick access to filtered items,
- now supports Ctrl+clicking items to bring multiple items into the
- task context.&nbsp; Additional improvements include support for
- single click to make the temporarily unfiltered items to disappear,
- and Alt+click then double-click for quickly opening files.</td>
- </tr>
- <tr>
- <td colspan="2">
- <hr>
- </td>
- </tr>
-</table>
-
-<table cellpadding="10" cellspacing="0" id="table369">
- <tr>
- <td align="left" valign="top" width="15%" bgcolor=#FAF7FB>
- <p align="right"><b>Alt+click and Popup Menu Improvements</b></p>
- </td>
- <td valign="top" width="70%">
- <p class="MsoPlainText">Since the
- <a href="http://wiki.eclipse.org/index.php/Mylyn_User_Guide#Alt.2BClick_navigation">
- Alt+click navigation</a> mechanism is a new concept and has not been
- discoverable enough, showing the filtered children of an element can now be invoked via the popup
- menu as well.&nbsp; Note that this action is only visible when a
- task is active.&nbsp; It is currently limited to Java elements.&nbsp;<p class="MsoPlainText">In addition, the <i>Remove from Context</i> and <i>Mark as Landmark</i>
- actions have moved to a more appropriate position in the popup menu,
- and will only show when a task is active, and only on the elements
- that they can be applied to.&nbsp; For example, a project cannot be made a
- landmark, and as visible below no longer shows this action. <p class="MsoPlainText">
- <img border="0" src="../../mylyn/new/images/2.1/show-filtered.png"></td>
- </tr>
- <tr>
- <td colspan="2">
- <hr>
- </td>
- </tr>
-</table>
-
-<table cellpadding="10" cellspacing="0" id="table370">
- <tr>
- <td align="left" valign="top" width="15%" bgcolor=#FAF7FB>
- <p align="right"><b>Filtering and Linking Management</b></p>
- </td>
- <td valign="top" width="70%">
- <p class="MsoPlainText">When a view is focused on the active task,
- it's manual linking and filtering facilities get disabled.&nbsp;
- This is now made explicit in the UI of views including the <i>Package
- Explorer</i>, <i>Project Explorer</i> and <i>Navigator </i>by the
- corresponding actions getting grayed out.&nbsp; Doing so also ensures
- that the view cannot be put into an inconsistent state by having
- some of it's filters enabled when in Focused mode.&nbsp; When Focus
- is toggled off or the task is deactivated the manual linking and
- filtering will be re-enabled and restored to their previous state.<p class="MsoPlainText">
- <img border="0" src="../../mylyn/new/images/2.1/focus-linking-disable.png"></td>
- </tr>
- <tr>
- <td colspan="2">
- <hr>
- </td>
- </tr>
-</table>
-
-<table cellpadding="10" cellspacing="0" id="table368">
- <tr>
- <td align="left" valign="top" width="15%" bgcolor=#FAF7FB>
- <p align="right"><b>Editor Management Configuration</b></p>
- </td>
- <td valign="top" width="70%">
- <p class="MsoPlainText">A frequent new user confusion of the
- Task-Focused UI was the fact that files are automatically removed
- from the task context when they are closed. This facility will now
- show a popup the first time it is invoked, and prompt that it can disabled
- via the preferences.&nbsp; Previously it could only be disabled by
- disabling all editor management (which restores
- editors and ensures that elements whose interest had decayed have
- their editors closed, preventing open editor bloat).&nbsp; However,
- removing files from context on close is still recommended because it
- ensures that the open editors match the task context.<p class="MsoPlainText">
- <img border="0" src="../../mylyn/new/images/2.1/context-preferences.png"></td>
- </tr>
- <tr>
- <td colspan="2">
- <hr>
- </td>
- </tr>
-</table>
-
-<h2>&nbsp;</h2>
-
-<h2><a name="bugzilla">Bugzilla Connector</a></h2>
-
-<table cellpadding="10" cellspacing="0" id="table381">
- <tr>
- <td align="left" valign="top" width="15%" bgcolor=#FAF7FB>
- <p align="right"><b>Subtask Creation</b></p>
- </td>
- <td valign="top" width="70%">
- <p align="left">Subtasks can be created from the editor's toolbar,
- bypassing the new task creation wizard.</p>
- <p class="MsoPlainText">
- <img border="0" src="../../mylyn/new/images/2.2/bugzilla-subtasks.png"></td>
- </tr>
- <tr>
- <td colspan="2">
- <hr>
- </td>
- </tr>
-</table>
-
-<table cellpadding="10" cellspacing="0" id="table386">
- <tr>
- <td align="left" valign="top" width="15%" bgcolor=#FAF7FB>
- <p align="right"><b>Support for Real Names</b></p>
- </td>
- <td valign="top" width="70%">
- Real names are now support for Bugzilla versions of 3.0 and later.&nbsp;
- Hover over the name to see the email address.<p class="MsoPlainText">
- <img border="0" src="../../mylyn/new/images/2.2/bugzilla-real-names.png"></td>
- </tr>
- <tr>
- <td colspan="2">
- <hr>
- </td>
- </tr>
-</table>
-
-<table cellpadding="10" cellspacing="0" id="table361">
- <tr>
- <td align="left" valign="top" width="15%" bgcolor=#FAF7FB>
- <p align="right"><b>Custom Resolutions</b></p>
- </td>
- <td valign="top" width="70%">
- <p class="MsoPlainText">Custom resolutions are now supported by the
- <i>Task Editor</i>.<p class="MsoPlainText">
- <img border="0" src="../../mylyn/new/images/2.1M1/bugzilla-custom-resolutions.png"></td>
- </tr>
- <tr>
- <td colspan="2">
- <hr>
- </td>
- </tr>
-</table>
-
-<table cellpadding="10" cellspacing="0" id="table358">
- <tr>
- <td align="left" valign="top" width="15%" bgcolor=#FAF7FB>
- <p align="right"><b>Keyword Search</b></p>
- </td>
- <td valign="top" width="70%">
- <p class="MsoPlainText">Bugzilla Search now supports keywords,
- invoked via the <i>Select...</i> button visible below.<p class="MsoPlainText">
- <img border="0" src="../../mylyn/new/images/2.1M1/bugzilla-search-keywords.png"></td>
- </tr>
- <tr>
- <td colspan="2">
- <hr>
- </td>
- </tr>
-</table>
-
-<table cellpadding="10" cellspacing="0" id="table360">
- <tr>
- <td align="left" valign="top" width="15%" bgcolor=#FAF7FB>
- <p align="right"><b>Configuration Caching</b></p>
- </td>
- <td valign="top" width="70%">
- <p class="MsoPlainText">If
- <a href="http://wiki.eclipse.org/Mylyn_User_Guide#Tips_for_server_administrators">
- supported by the server</a>, the Bugzilla configuration is retrieved
- from a cached copy.&nbsp; This can significantly reduce network
- traffic on very large repositories such as bugs.eclipse.org.</td>
- </tr>
- <tr>
- <td colspan="2">
- <hr>
- </td>
- </tr>
-</table>
-
-<p class="MsoPlainText">&nbsp; </p>
-<h2><a name="trac">Trac Connector</a></h2>
-
-<table cellpadding="10" cellspacing="0" id="table362">
- <tr>
- <td align="left" valign="top" width="15%" bgcolor=#FAF7FB>
- <p align="right"><b>Wiki Formatting</b></p>
- </td>
- <td valign="top" width="70%">
- <p class="MsoPlainText">Trac comments can be created with wiki
- markup and previewed before submission.&nbsp; When preview use the
- <i>Edit</i> button to switch back into plain text editing mode.<p class="MsoPlainText">
- <img border="0" src="../../mylyn/new/images/2.1M1/trac-wiki-preview.png"></td>
- </tr>
- <tr>
- <td colspan="2">
- <hr>
- </td>
- </tr>
-</table>
-
-<p class="MsoPlainText">&nbsp;</p>
-<h2><a name="jira">JIRA Connector</a></h2>
-
-<table cellpadding="10" cellspacing="0" id="table388">
- <tr>
- <td align="left" valign="top" width="15%" bgcolor=#FAF7FB>
- <p align="right"><b>Change Assignee on Creation</b></p>
- </td>
- <td valign="top" width="70%">
- Issue assignees can be set on creation.&nbsp; Use the Ctrl+Space
- content assist to choose from assignees.<p class="MsoPlainText">
- <img border="0" src="../../mylyn/new/images/2.2/jira-assign.png"></td>
- </tr>
- <tr>
- <td colspan="2">
- <hr>
- </td>
- </tr>
-</table>
-
-<table cellpadding="10" cellspacing="0" id="table391">
- <tr>
- <td align="left" valign="top" width="15%" bgcolor=#FAF7FB>
- <p align="right"><b>Password Prompting</b></p>
- </td>
- <td valign="top" width="70%">
- If a Trac or JIRA repository is missing a password, but a
- synchronization is requested, a dialog will pop up.&nbsp; In
- addition, storing the password is now optional.<p class="MsoPlainText">
- <img border="0" src="../../mylyn/new/images/2.2/password-prompting.png"></td>
- </tr>
- <tr>
- <td colspan="2">
- <hr>
- </td>
- </tr>
-</table>
-
-<table cellpadding="10" cellspacing="0" id="table366">
- <tr>
- <td align="left" valign="top" width="15%" bgcolor=#FAF7FB>
- <p align="right"><b>Subtask Creation</b></p>
- </td>
- <td valign="top" width="70%">
- <p class="MsoPlainText">Support for JIRA subtasks has been improved,
- and these can be created both from the<i> Task Editor</i> toolbar.<p class="MsoPlainText">
- <img border="0" src="../../mylyn/new/images/2.1/jira-subtask-create-editor.png"><p class="MsoPlainText">
- and from the popup menu in the <i>Task List</i>:<p class="MsoPlainText">
- <img border="0" src="../../mylyn/new/images/2.1/jira-subtask-create.png"></td>
- </tr>
- <tr>
- <td colspan="2">
- <hr>
- </td>
- </tr>
-</table>
-
-<p class="MsoPlainText">&nbsp;</p>
-<h2><a name="xplanner">XPlanner Connector</a></h2>
-
-<table cellpadding="10" cellspacing="0" id="table356">
- <tr>
- <td align="left" valign="top" width="15%" bgcolor=#FAF7FB>
- <p align="right"><b>New Task Editor</b></p>
- </td>
- <td valign="top" width="70%">
- <p class="MsoPlainText">The XPlanner connector now provides a rich
- editor for creating new tasks.<p class="MsoPlainText">
- <img border="0" src="../../mylyn/new/images/2.1M1/xplanner-new-task-editor.jpg"></td>
- </tr>
- <tr>
- <td colspan="2">
- <hr>
- </td>
- </tr>
-</table>
-
-</body>
-</html> \ No newline at end of file
diff --git a/org.eclipse.mylyn.help.ui/doc/overview.html b/org.eclipse.mylyn.help.ui/doc/overview.html
deleted file mode 100644
index 7c81f1e04..000000000
--- a/org.eclipse.mylyn.help.ui/doc/overview.html
+++ /dev/null
@@ -1,63 +0,0 @@
-<html>
-<head>
-<meta name="copyright"
- content="Copyright (c) IBM Corporation and others 2000, 2007. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
-<meta http-equiv="Content-Language" content="en-us">
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<link rel="STYLESHEET" href="book.css" charset="ISO-8859-1"
- type="text/css">
-<style>
-td {
- border-top: solid thin black;
-}
-
-img[alt] {
- background-color: #ffdddd;
-}
-
-tr {
- vertical-align: top;
-}
-</style>
-<title>Mylyn Overview</title>
-<script language="JavaScript"
- src="PLUGINS_ROOT/org.eclipse.help/livehelp.js"> </script>
-</head>
-
-<body>
-
-<h2>Mylyn Overview</h2>
-
-<p>Mylyn documentation is available online at: <b>
-<a href="http://eclipse.org/mylyn/start/">http://eclipse.org/mylyn/start</a>
-</b></p>
-<p>The New &amp; Noteworthy for Mylyn 2.3 is at: <b>
-<a href="http://www.eclipse.org/mylyn/new">http://eclipse.org/mylyn/new</a> </b> </p>
-<p>Mylyn is a task-focused UI for Eclipse that makes working with very large
-workspaces as easy as working with small ones. Mylyn extends Eclipse with rich
-facilities for keeping track of the tasks that you work and collaborate on. A
-task is defined as any unit of work that you want to recall or share with
-others, such as a bug reported by a user or a note to yourself about improving a
-feature. You can store tasks locally in your workspace, or they can come from
-one or more task repositories. To connect to a task repository, for example a
-bug tracker such as Bugzilla, you must have a connector that supports that
-repository. </p>
-<p>Once your tasks are integrated, Mylyn monitors your work activity
-on those tasks to identify information relevant to the task-at-hand.
-System artifacts such as files, types, methods, and fields get assigned
-a degree-of-interest based on how recently and frequently you interact
-with them. This results in uninteresting elements being filtered from
-view within Eclipse, allowing you to focus on on what is important. From
-this, Mylyn creates a task context, which is the set of all artifacts
-related to your task. These can include methods you have edited, APIs
-you have referred to, and documents you have browsed. Mylyn uses this
-task context to focus the Eclipse UI on interesting information, hide
-what's uninteresting, and automatically find what's related. Having the
-information you need to get your work done at your fingertips improves
-your productivity by reducing the time you spend searching, scrolling,
-and navigating. By making task context explicit, Mylyn also facilitates
-multitasking, planning, reusing past efforts, and sharing expertise.</p>
-
-<img src=images/mylyn-2.0.png>
-</body>
-</html>
diff --git a/org.eclipse.mylyn.help.ui/doc/toc.xml b/org.eclipse.mylyn.help.ui/doc/toc.xml
deleted file mode 100644
index 10ad48327..000000000
--- a/org.eclipse.mylyn.help.ui/doc/toc.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?NLS TYPE="org.eclipse.help.toc"?>
-
-<toc label="Mylyn" topic="doc/overview.html">
- <topic label="Overview" href="doc/overview.html" />
- <!--
- <topic label="What's new" href="doc/new.html" />
- <topic label="Tips and tricks" href="doc/tips.html"/>-->
-</toc>
-
-
diff --git a/org.eclipse.mylyn.help.ui/icons/etool16/icons-legend.gif b/org.eclipse.mylyn.help.ui/icons/etool16/icons-legend.gif
deleted file mode 100644
index f40ce6b17..000000000
--- a/org.eclipse.mylyn.help.ui/icons/etool16/icons-legend.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/images/mylyn-overview-small.gif b/org.eclipse.mylyn.help.ui/images/mylyn-overview-small.gif
deleted file mode 100644
index 2e88b0b6f..000000000
--- a/org.eclipse.mylyn.help.ui/images/mylyn-overview-small.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/images/mylyn-overview.gif b/org.eclipse.mylyn.help.ui/images/mylyn-overview.gif
deleted file mode 100644
index 74409455d..000000000
--- a/org.eclipse.mylyn.help.ui/images/mylyn-overview.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/images/topiclabel/ov_legend48.gif b/org.eclipse.mylyn.help.ui/images/topiclabel/ov_legend48.gif
deleted file mode 100644
index 5a37f3ae8..000000000
--- a/org.eclipse.mylyn.help.ui/images/topiclabel/ov_legend48.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/images/topiclabel/ov_legend48_hov.gif b/org.eclipse.mylyn.help.ui/images/topiclabel/ov_legend48_hov.gif
deleted file mode 100644
index 5a37f3ae8..000000000
--- a/org.eclipse.mylyn.help.ui/images/topiclabel/ov_legend48_hov.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/images/topiclabel/ov_mylyn48.gif b/org.eclipse.mylyn.help.ui/images/topiclabel/ov_mylyn48.gif
deleted file mode 100644
index 5a37f3ae8..000000000
--- a/org.eclipse.mylyn.help.ui/images/topiclabel/ov_mylyn48.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/images/topiclabel/ov_mylyn48_hov.gif b/org.eclipse.mylyn.help.ui/images/topiclabel/ov_mylyn48_hov.gif
deleted file mode 100644
index 5a37f3ae8..000000000
--- a/org.eclipse.mylyn.help.ui/images/topiclabel/ov_mylyn48_hov.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/images/topiclabel/tu_query48.gif b/org.eclipse.mylyn.help.ui/images/topiclabel/tu_query48.gif
deleted file mode 100644
index d6c5de214..000000000
--- a/org.eclipse.mylyn.help.ui/images/topiclabel/tu_query48.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/images/topiclabel/tu_query48_hov.gif b/org.eclipse.mylyn.help.ui/images/topiclabel/tu_query48_hov.gif
deleted file mode 100644
index d6c5de214..000000000
--- a/org.eclipse.mylyn.help.ui/images/topiclabel/tu_query48_hov.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/images/topiclabel/tu_task48.gif b/org.eclipse.mylyn.help.ui/images/topiclabel/tu_task48.gif
deleted file mode 100644
index 5a37f3ae8..000000000
--- a/org.eclipse.mylyn.help.ui/images/topiclabel/tu_task48.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/images/topiclabel/tu_task48_hov.gif b/org.eclipse.mylyn.help.ui/images/topiclabel/tu_task48_hov.gif
deleted file mode 100644
index 5a37f3ae8..000000000
--- a/org.eclipse.mylyn.help.ui/images/topiclabel/tu_task48_hov.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/images/topiclabel/wn_mylyn48.gif b/org.eclipse.mylyn.help.ui/images/topiclabel/wn_mylyn48.gif
deleted file mode 100644
index 5a37f3ae8..000000000
--- a/org.eclipse.mylyn.help.ui/images/topiclabel/wn_mylyn48.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/images/topiclabel/wn_mylyn48_hov.gif b/org.eclipse.mylyn.help.ui/images/topiclabel/wn_mylyn48_hov.gif
deleted file mode 100644
index 5a37f3ae8..000000000
--- a/org.eclipse.mylyn.help.ui/images/topiclabel/wn_mylyn48_hov.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.help.ui/intro/css/overview.css b/org.eclipse.mylyn.help.ui/intro/css/overview.css
deleted file mode 100644
index e0148136f..000000000
--- a/org.eclipse.mylyn.help.ui/intro/css/overview.css
+++ /dev/null
@@ -1,15 +0,0 @@
-a#mylyn-overview img {
- background-image: url(../../images/topiclabel/ov_mylyn48.gif);
-}
-
-a#mylyn-overview:hover img {
- background-image: url(../../images/topiclabel/ov_mylyn48_hov.gif);
-}
-
-a#mylyn-legend img {
- background-image: url(../../images/topiclabel/ov_legend48.gif);
-}
-
-a#mylyn-legend:hover img {
- background-image: url(../../images/topiclabel/ov_legend48_hov.gif);
-}
diff --git a/org.eclipse.mylyn.help.ui/intro/css/tutorials.css b/org.eclipse.mylyn.help.ui/intro/css/tutorials.css
deleted file mode 100644
index f2d361603..000000000
--- a/org.eclipse.mylyn.help.ui/intro/css/tutorials.css
+++ /dev/null
@@ -1,15 +0,0 @@
-a#mylyn-query img {
- background-image: url(../../images/topiclabel/tu_query48.gif);
-}
-
-a#mylyn-query:hover img {
- background-image: url(../../images/topiclabel/tu_query48_hov.gif);
-}
-
-a#mylyn-task img {
- background-image: url(../../images/topiclabel/tu_task48.gif);
-}
-
-a#mylyn-task:hover img {
- background-image: url(../../images/topiclabel/tu_task48_hov.gif);
-}
diff --git a/org.eclipse.mylyn.help.ui/intro/css/whatsnew.css b/org.eclipse.mylyn.help.ui/intro/css/whatsnew.css
deleted file mode 100644
index 3bcb8da0f..000000000
--- a/org.eclipse.mylyn.help.ui/intro/css/whatsnew.css
+++ /dev/null
@@ -1,7 +0,0 @@
-a#mylyn-noteworthy img {
- background-image: url(../../images/topiclabel/wn_mylyn48.gif);
-}
-
-a#mylyn-noteworthy:hover img {
- background-image: url(../../images/topiclabel/wn_mylyn48_hov.gif);
-}
diff --git a/org.eclipse.mylyn.help.ui/intro/overviewExtensionContent.xml b/org.eclipse.mylyn.help.ui/intro/overviewExtensionContent.xml
deleted file mode 100644
index 7d5510bfd..000000000
--- a/org.eclipse.mylyn.help.ui/intro/overviewExtensionContent.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<introContent>
- <extensionContent id="org.eclipse.mylyn" name="Mylyn"
- style="css/overview.css" path="overview/@">
- <group id="content-group" style-id="content-group">
- <!--
- <link label="Mylyn"
- url="http://org.eclipse.ui.intro/showHelpTopic?id=/org.eclipse.mylyn.help.ui/doc/overview.html"
- id="mylyn-overview" style-id="content-link">
- <text>Learn more about Mylyn's Task-Focused UI</text>
- </link>
- -->
- <link label="Mylyn Overview"
- url="http://org.eclipse.ui.intro/runAction?pluginId=org.eclipse.mylyn.help.ui&amp;class=org.eclipse.mylyn.internal.help.ui.actions.ShowMylynLegendAction&amp;id=org.eclipse.mylyn.doc.legend.show.action"
- id="mylyn-overview" style-id="content-link">
- <text>See a summary of Mylyn's Task-Focused UI and open the Task List</text>
- </link>
- </group>
- </extensionContent>
-</introContent>
diff --git a/org.eclipse.mylyn.help.ui/intro/tutorialsExtensionContent.xml b/org.eclipse.mylyn.help.ui/intro/tutorialsExtensionContent.xml
deleted file mode 100644
index 6f0b0a3c0..000000000
--- a/org.eclipse.mylyn.help.ui/intro/tutorialsExtensionContent.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<introContent>
- <extensionContent id="org.eclipse.mylyn" name="Mylyn"
- style="css/tutorials.css" path="tutorials/@">
- <group label="Mylyn" id="mylyn" style-id="content-group">
- <link
- url="http://org.eclipse.ui.intro/showStandby?partId=org.eclipse.platform.cheatsheet&amp;input=org.eclipse.mylyn.cheatsheet.query"
- label="Use the Task List" id="mylyn-query" style-id="content-link">
- <text>Learn how to create tasks and task repository queries.</text>
- </link>
- <link
- url="http://org.eclipse.ui.intro/showStandby?partId=org.eclipse.platform.cheatsheet&amp;input=org.eclipse.mylyn.cheatsheet.taskfocus"
- label="Use the Task-Focused UI" id="mylyn-task" style-id="content-link">
- <text>Learn how to reduce information overload and multitask with ease.</text>
- </link>
- </group>
- </extensionContent>
-</introContent>
diff --git a/org.eclipse.mylyn.help.ui/intro/whatsnewExtensionContent.xml b/org.eclipse.mylyn.help.ui/intro/whatsnewExtensionContent.xml
deleted file mode 100644
index d988cc4e5..000000000
--- a/org.eclipse.mylyn.help.ui/intro/whatsnewExtensionContent.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<introContent>
- <extensionContent id="org.eclipse.mylyn" name="Mylyn"
- style="css/whatsnew.css" path="whatsnew/@">
- <group id="content-group" style-id="content-group">
- <link label="Mylyn"
- url="http://org.eclipse.ui.intro/showHelpTopic?id=/org.eclipse.mylyn.help.ui/doc/new.html"
- id="mylyn-noteworthy" style-id="content-link">
- <text>
- Find out the significant changes made to Mylyn
- </text>
- </link>
- </group>
- </extensionContent>
-</introContent>
diff --git a/org.eclipse.mylyn.help.ui/plugin.xml b/org.eclipse.mylyn.help.ui/plugin.xml
deleted file mode 100644
index 6036791cb..000000000
--- a/org.eclipse.mylyn.help.ui/plugin.xml
+++ /dev/null
@@ -1,93 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<?eclipse version="3.0"?>
-<plugin>
- <extension
- id="org.eclipse.mylyn.helpDocs"
- name="Mylyn"
- point="org.eclipse.help.toc">
- <toc
- file="doc/toc.xml"
- primary="true">
- </toc>
- </extension>
-
- <extension point="org.eclipse.ui.commands">
- <category
- id="org.eclipse.mylyn.help.ui.commands"
- name="Mylyn Help">
- </category>
- <command
- categoryId="org.eclipse.mylyn.help.ui.commands"
- description="Show Mylyn UI Legend"
- id="org.eclipse.mylyn.doc.legend.show"
- name="Show Mylyn UI Legend">
- </command>
- </extension>
-
- <extension point="org.eclipse.ui.bindings">
- <key
- sequence="M1+M2+M3+?"
- commandId="org.eclipse.mylyn.doc.legend.show"
- schemeId ="org.eclipse.ui.defaultAcceleratorConfiguration">
- </key>
- </extension>
-
- <extension
- point="org.eclipse.ui.intro.configExtension">
- <configExtension
- configId="org.eclipse.ui.intro.universalConfig"
- content="intro/overviewExtensionContent.xml">
- </configExtension>
- <configExtension
- configId="org.eclipse.ui.intro.universalConfig"
- content="intro/whatsnewExtensionContent.xml">
- </configExtension>
- <configExtension
- configId="org.eclipse.ui.intro.universalConfig"
- content="intro/tutorialsExtensionContent.xml">
- </configExtension>
- </extension>
- <extension
- point="org.eclipse.ui.cheatsheets.cheatSheetContent">
- <category
- id="org.eclipse.mylyn.cheatsheet"
- name="Mylyn">
- </category>
- <cheatsheet
- category="org.eclipse.mylyn.cheatsheet"
- contentFile="cheatsheets/Query.xml"
- id="org.eclipse.mylyn.cheatsheet.query"
- name="Create a task repository query">
- <description>
- Learn how to work with task and queries using the Task List
- </description>
- </cheatsheet>
- <cheatsheet
- category="org.eclipse.mylyn.cheatsheet"
- contentFile="cheatsheets/TaskFocus.xml"
- id="org.eclipse.mylyn.cheatsheet.taskfocus"
- name="Work with task context">
- <description>
- Learn how to activate tasks and use the Task-Focused UI
- </description>
- </cheatsheet>
- </extension>
- <extension
- point="org.eclipse.ui.viewActions">
- <viewContribution
- id="org.eclipse.mylyn.tasks.ui.views.tasks.help.contribution"
- targetID="org.eclipse.mylyn.tasks.ui.views.tasks">
- <action
- class="org.eclipse.mylyn.internal.help.ui.actions.ShowMylynLegendAction"
- icon="icons/etool16/icons-legend.gif"
- id="org.eclipse.mylyn.doc.legend.show.action"
- label="Show UI Legend"
- menubarPath="additions"
- style="push"
- tooltip="Show UI Legend">
- </action>
- </viewContribution>
- </extension>
-
-</plugin>
diff --git a/org.eclipse.mylyn.help.ui/src/org/eclipse/mylyn/internal/help/ui/actions/ShowMylynLegendAction.java b/org.eclipse.mylyn.help.ui/src/org/eclipse/mylyn/internal/help/ui/actions/ShowMylynLegendAction.java
deleted file mode 100644
index 1ef290e39..000000000
--- a/org.eclipse.mylyn.help.ui/src/org/eclipse/mylyn/internal/help/ui/actions/ShowMylynLegendAction.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.help.ui.actions;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.mylyn.internal.help.ui.dialogs.UiLegendDialog;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.intro.IIntroManager;
-import org.eclipse.ui.intro.IIntroPart;
-
-/**
- * @author Mik Kersten
- * @author Leo Dos Santos
- */
-public class ShowMylynLegendAction implements IWorkbenchWindowActionDelegate, IViewActionDelegate {
-
- private IWorkbenchWindow wbWindow;
-
- public void dispose() {
- // ignore
- }
-
- public void init(IWorkbenchWindow window) {
- wbWindow = window;
- }
-
- public void run(IAction action) {
- IIntroManager introMgr = wbWindow.getWorkbench().getIntroManager();
- IIntroPart intro = introMgr.getIntro();
- if (intro != null) {
- introMgr.setIntroStandby(intro, true);
- }
-
- TasksUiUtil.openTasksViewInActivePerspective();
- Shell parentShell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- UiLegendDialog uiLegendDialog = new UiLegendDialog(parentShell);
- uiLegendDialog.open();
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- // ignore
- }
-
- public void init(IViewPart view) {
- wbWindow = view.getViewSite().getWorkbenchWindow();
- }
-}
diff --git a/org.eclipse.mylyn.help.ui/src/org/eclipse/mylyn/internal/help/ui/dialogs/UiLegendDialog.java b/org.eclipse.mylyn.help.ui/src/org/eclipse/mylyn/internal/help/ui/dialogs/UiLegendDialog.java
deleted file mode 100644
index ea93653d5..000000000
--- a/org.eclipse.mylyn.help.ui/src/org/eclipse/mylyn/internal/help/ui/dialogs/UiLegendDialog.java
+++ /dev/null
@@ -1,543 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.help.ui.dialogs;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.PopupDialog;
-import org.eclipse.jface.preference.PreferenceDialog;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonFonts;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonThemes;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.ITasksUiConstants;
-import org.eclipse.mylyn.tasks.ui.LegendElement;
-import org.eclipse.mylyn.tasks.ui.TaskElementLabelProvider;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.PreferencesUtil;
-import org.eclipse.ui.forms.events.HyperlinkEvent;
-import org.eclipse.ui.forms.events.IHyperlinkListener;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-import org.eclipse.ui.forms.widgets.Hyperlink;
-import org.eclipse.ui.forms.widgets.ScrolledForm;
-import org.eclipse.ui.forms.widgets.Section;
-import org.eclipse.ui.forms.widgets.TableWrapData;
-import org.eclipse.ui.forms.widgets.TableWrapLayout;
-import org.eclipse.ui.themes.IThemeManager;
-
-/**
- * @author Mik Kersten
- * @author Leo Dos Santos
- */
-public class UiLegendDialog extends PopupDialog {
-
- public static final String TITLE = "Mylyn UI Overview";
-
- private FormToolkit toolkit;
-
- private ScrolledForm form;
-
- private final TaskElementLabelProvider labelProvider = new TaskElementLabelProvider(false);
-
- private final IThemeManager themeManager = PlatformUI.getWorkbench().getThemeManager();
-
- private final ArrayList<LegendElement> legendElements = new ArrayList<LegendElement>();
-
- // TODO e3.4 move to new api
- @SuppressWarnings("deprecation")
- public UiLegendDialog(Shell parent) {
- super(parent, PopupDialog.INFOPOPUP_SHELLSTYLE | SWT.ON_TOP, false, false, false, false, null, null);
- }
-
- @Override
- protected Control createContents(Composite parent) {
- getShell().setBackground(getShell().getDisplay().getSystemColor(SWT.COLOR_DARK_GRAY));
- return createDialogArea(parent);
- }
-
- @Override
- public int open() {
- int open = super.open();
-// getShell().setLocation(getShell().getLocation().x, getShell().getLocation().y+20);
- getShell().setFocus();
- return open;
- }
-
- @Override
- public boolean close() {
- for (LegendElement element : legendElements) {
- element.dispose();
- }
- if (toolkit != null) {
- if (toolkit.getColors() != null) {
- toolkit.dispose();
- }
- }
- return super.close();
- }
-
- @Override
- protected Control createDialogArea(Composite parent) {
- toolkit = new FormToolkit(parent.getDisplay());
- form = toolkit.createScrolledForm(parent);
- form.setText(TITLE);
- form.getToolBarManager().add(new CloseDialogAction());
- form.getToolBarManager().update(true);
- form.getBody().setLayout(new TableWrapLayout());
- toolkit.decorateFormHeading(form.getForm());
-
- createTasksPrioritiesSection(form.getBody());
- createActivitySection(form.getBody());
- createContextSection(form.getBody());
- createSynchronizationSection(form.getBody());
- createConnectorsSection(form.getBody());
- createGettingStartedSection(form.getBody());
-
- return parent;
- }
-
- private void createTasksPrioritiesSection(Composite parent) {
- TableWrapLayout layout = new TableWrapLayout();
- layout.numColumns = 2;
- layout.makeColumnsEqualWidth = true;
- layout.leftMargin = 0;
- layout.rightMargin = 0;
- layout.topMargin = 0;
- layout.bottomMargin = 0;
-
- Composite composite = toolkit.createComposite(parent);
- composite.setLayout(layout);
- composite.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
-
- createTasksSection(composite);
- createPrioritiesSection(composite);
- }
-
- private void createTasksSection(Composite parent) {
- Section tasksSection = toolkit.createSection(parent, ExpandableComposite.TITLE_BAR);
- tasksSection.setText("Tasks");
- tasksSection.setLayout(new TableWrapLayout());
- tasksSection.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
-
- TableWrapLayout layout = new TableWrapLayout();
- layout.numColumns = 2;
- layout.makeColumnsEqualWidth = false;
- layout.verticalSpacing = 1;
- layout.topMargin = 1;
- layout.bottomMargin = 1;
-
- Composite tasksClient = toolkit.createComposite(tasksSection);
- tasksClient.setLayout(layout);
- tasksClient.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
- tasksSection.setClient(tasksClient);
-
- Label imageLabel;
- imageLabel = toolkit.createLabel(tasksClient, "");
- imageLabel.setImage(CommonImages.getImage(TasksUiImages.TASK));
- toolkit.createLabel(tasksClient, "Task");
-
- imageLabel = toolkit.createLabel(tasksClient, "");
- imageLabel.setImage(CommonImages.getImage(TasksUiImages.CATEGORY));
- toolkit.createLabel(tasksClient, "Category");
-
- imageLabel = toolkit.createLabel(tasksClient, "");
- imageLabel.setImage(CommonImages.getImage(TasksUiImages.QUERY));
- toolkit.createLabel(tasksClient, "Query");
-
- imageLabel = toolkit.createLabel(tasksClient, "");
- imageLabel.setImage(CommonImages.getImage(CommonImages.CALENDAR));
- toolkit.createLabel(tasksClient, "Date range");
-
- imageLabel = toolkit.createLabel(tasksClient, "");
- imageLabel.setImage(CommonImages.getImage(CommonImages.BLANK));
-
- Hyperlink openView = toolkit.createHyperlink(tasksClient, "Open Task List...", SWT.WRAP);
- openView.addHyperlinkListener(new IHyperlinkListener() {
- public void linkActivated(HyperlinkEvent e) {
- close();
- TasksUiUtil.openTasksViewInActivePerspective();
- }
-
- public void linkEntered(HyperlinkEvent e) {
- // ignore
- }
-
- public void linkExited(HyperlinkEvent e) {
- // ignore
- }
- });
- }
-
- private void createPrioritiesSection(Composite parent) {
- Section prioritiesSection = toolkit.createSection(parent, ExpandableComposite.TITLE_BAR);
- prioritiesSection.setText("Priorities");
- prioritiesSection.setLayout(new TableWrapLayout());
- prioritiesSection.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
-
- TableWrapLayout layout = new TableWrapLayout();
- layout.numColumns = 2;
- layout.makeColumnsEqualWidth = false;
- layout.verticalSpacing = 1;
- layout.topMargin = 1;
- layout.bottomMargin = 1;
-
- Composite prioritiesClient = toolkit.createComposite(prioritiesSection);
- prioritiesClient.setLayout(layout);
- prioritiesClient.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
- prioritiesSection.setClient(prioritiesClient);
-
- Label imageLabel;
- imageLabel = toolkit.createLabel(prioritiesClient, "");
- imageLabel.setImage(CommonImages.getImage(CommonImages.PRIORITY_1));
- toolkit.createLabel(prioritiesClient, PriorityLevel.P1.getDescription());
-
- imageLabel = toolkit.createLabel(prioritiesClient, "");
- imageLabel.setImage(CommonImages.getImage(CommonImages.PRIORITY_2));
- toolkit.createLabel(prioritiesClient, PriorityLevel.P2.getDescription());
-
- imageLabel = toolkit.createLabel(prioritiesClient, "");
- imageLabel.setImage(CommonImages.getImage(CommonImages.PRIORITY_3));
- toolkit.createLabel(prioritiesClient, PriorityLevel.P3.getDescription() + " (default)");
-
- imageLabel = toolkit.createLabel(prioritiesClient, "");
- imageLabel.setImage(CommonImages.getImage(CommonImages.PRIORITY_4));
- toolkit.createLabel(prioritiesClient, PriorityLevel.P4.getDescription());
-
- imageLabel = toolkit.createLabel(prioritiesClient, "");
- imageLabel.setImage(CommonImages.getImage(CommonImages.PRIORITY_5));
- toolkit.createLabel(prioritiesClient, PriorityLevel.P5.getDescription());
- }
-
- private void createActivitySection(Composite parent) {
- Section activitySection = toolkit.createSection(parent, ExpandableComposite.TITLE_BAR);
- activitySection.setText("Task Activity");
- activitySection.setLayout(new TableWrapLayout());
- activitySection.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
-
- TableWrapLayout layout = new TableWrapLayout();
- layout.numColumns = 2;
- layout.makeColumnsEqualWidth = false;
- layout.verticalSpacing = 1;
- layout.topMargin = 1;
- layout.bottomMargin = 1;
-
- Composite activityClient = toolkit.createComposite(activitySection);
- activityClient.setLayout(layout);
- activityClient.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
- activitySection.setClient(activityClient);
-
- Label imageLabel = toolkit.createLabel(activityClient, "");
- imageLabel.setImage(CommonImages.getImage(TasksUiImages.TASK));
- Label labelToday = toolkit.createLabel(activityClient, "Scheduled for today");
- labelToday.setForeground(themeManager.getCurrentTheme().getColorRegistry().get(
- CommonThemes.COLOR_SCHEDULED_TODAY));
-
- imageLabel = toolkit.createLabel(activityClient, "");
- imageLabel.setImage(CommonImages.getImage(TasksUiImages.TASK));
- Label labelOverdue = toolkit.createLabel(activityClient, "Past scheduled date");
- labelOverdue.setForeground(themeManager.getCurrentTheme().getColorRegistry().get(
- CommonThemes.COLOR_SCHEDULED_PAST));
-
-// imageLabel = toolkit.createLabel(activityClient, "");
-// imageLabel.setImage(TasksUiImages.getImage(TasksUiImages.TASK));
-// Label labelThisWeek = toolkit.createLabel(activityClient, "Scheduled for this
-// week");
-// labelThisWeek.setForeground(themeManager.getCurrentTheme().getColorRegistry().get(
-// TaskListColorsAndFonts.THEME_COLOR_TASK_THISWEEK_SCHEDULED));
-
- imageLabel = toolkit.createLabel(activityClient, "");
- imageLabel.setImage(CommonImages.getImage(TasksUiImages.TASK));
- Label labelCompleted = toolkit.createLabel(activityClient, "Completed");
- labelCompleted.setFont(CommonFonts.STRIKETHROUGH);
-// labelCompleted.setForeground(TaskListColorsAndFonts.COLOR_TASK_COMPLETED);
- labelCompleted.setForeground(themeManager.getCurrentTheme()
- .getColorRegistry()
- .get(CommonThemes.COLOR_COMPLETED));
-
- imageLabel = toolkit.createLabel(activityClient, "");
- imageLabel.setImage(CommonImages.getImage(TasksUiImages.TASK));
- Label labelCompletedToday = toolkit.createLabel(activityClient, "Completed today");
- labelCompletedToday.setFont(CommonFonts.STRIKETHROUGH);
- labelCompletedToday.setForeground(themeManager.getCurrentTheme().getColorRegistry().get(
- CommonThemes.COLOR_COMPLETED_TODAY));
-
- imageLabel = toolkit.createLabel(activityClient, "");
- imageLabel.setImage(CommonImages.getImage(CommonImages.OVERLAY_DATE_DUE));
- toolkit.createLabel(activityClient, "Has due date");
-
- imageLabel = toolkit.createLabel(activityClient, "");
- imageLabel.setImage(CommonImages.getImage(CommonImages.OVERLAY_DATE_OVERDUE));
- Label textLabel = toolkit.createLabel(activityClient, "Past Due date");
- textLabel.setForeground(themeManager.getCurrentTheme().getColorRegistry().get(CommonThemes.COLOR_OVERDUE));
-
- imageLabel = toolkit.createLabel(activityClient, "");
- imageLabel.setImage(CommonImages.getImage(CommonImages.BLANK));
- Hyperlink adjust = toolkit.createHyperlink(activityClient, "Adjust Colors and Fonts...", SWT.WRAP);
- adjust.addHyperlinkListener(new IHyperlinkListener() {
- public void linkActivated(HyperlinkEvent e) {
- PreferenceDialog dlg = PreferencesUtil.createPreferenceDialogOn(PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow()
- .getShell(), ITasksUiConstants.ID_PREFERENCES_COLORS_AND_FONTS,
- new String[] { ITasksUiConstants.ID_PREFERENCES_COLORS_AND_FONTS }, null);
- dlg.open();
- }
-
- public void linkEntered(HyperlinkEvent e) {
- // ignore
- }
-
- public void linkExited(HyperlinkEvent e) {
- // ignore
- }
- });
- }
-
- private void createContextSection(Composite parent) {
- Section contextSection = toolkit.createSection(parent, ExpandableComposite.TITLE_BAR);
- contextSection.setText("Task Context");
- contextSection.setLayout(new TableWrapLayout());
- contextSection.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
-
- TableWrapLayout layout = new TableWrapLayout();
- layout.numColumns = 2;
- layout.makeColumnsEqualWidth = false;
- layout.verticalSpacing = 1;
- layout.topMargin = 1;
- layout.bottomMargin = 1;
-
- Composite contextClient = toolkit.createComposite(contextSection);
- contextClient.setLayout(layout);
- contextClient.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
- contextSection.setClient(contextClient);
-
- Label imageLabel;
- imageLabel = toolkit.createLabel(contextClient, "");
- imageLabel.setImage(CommonImages.getImage(TasksUiImages.CONTEXT_FOCUS));
- toolkit.createLabel(contextClient, "Focus view on active task");
-
- imageLabel = toolkit.createLabel(contextClient, "");
- imageLabel.setImage(CommonImages.getImage(TasksUiImages.CONTEXT_INACTIVE_EMPTY));
- toolkit.createLabel(contextClient, "Inactive task with no context");
-
- imageLabel = toolkit.createLabel(contextClient, "");
- imageLabel.setImage(CommonImages.getImage(TasksUiImages.CONTEXT_INACTIVE));
- toolkit.createLabel(contextClient, "Inactive task with context");
-
- imageLabel = toolkit.createLabel(contextClient, "");
- imageLabel.setImage(CommonImages.getImage(TasksUiImages.CONTEXT_ACTIVE));
- toolkit.createLabel(contextClient, "Active task");
- }
-
- private void createSynchronizationSection(Composite parent) {
- Section synchroSection = toolkit.createSection(parent, ExpandableComposite.TITLE_BAR);
- synchroSection.setText("Synchronization");
- synchroSection.setLayout(new TableWrapLayout());
- synchroSection.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
-
- TableWrapLayout layout = new TableWrapLayout();
- layout.numColumns = 2;
- layout.makeColumnsEqualWidth = false;
- layout.verticalSpacing = 3;
- layout.topMargin = 1;
- layout.bottomMargin = 1;
-
- Composite synchroClient = toolkit.createComposite(synchroSection);
- synchroClient.setLayout(layout);
- synchroClient.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
- synchroSection.setClient(synchroClient);
-
- Label imageLabel;
- imageLabel = toolkit.createLabel(synchroClient, "");
- imageLabel.setImage(CommonImages.getImage(CommonImages.OVERLAY_SYNC_INCOMMING_NEW));
- toolkit.createLabel(synchroClient, "New task, open to view");
-
- imageLabel = toolkit.createLabel(synchroClient, "");
- imageLabel.setImage(CommonImages.getImage(CommonImages.OVERLAY_SYNC_INCOMMING));
- toolkit.createLabel(synchroClient, "Incoming changes, open to view");
-
- imageLabel = toolkit.createLabel(synchroClient, "");
- imageLabel.setImage(CommonImages.getImage(CommonImages.OVERLAY_SYNC_OUTGOING));
- toolkit.createLabel(synchroClient, "Outgoing changes");
-
- imageLabel = toolkit.createLabel(synchroClient, "");
- imageLabel.setImage(CommonImages.getImage(CommonImages.OVERLAY_SYNC_WARNING));
- toolkit.createLabel(synchroClient, "Synchronization failed, mouse over for details");
-
- imageLabel = toolkit.createLabel(synchroClient, "");
- imageLabel.setImage(CommonImages.getImage(CommonImages.OVERLAY_SYNC_CONFLICT));
- toolkit.createLabel(synchroClient, "Conflicting changes, need to synchronize");
- }
-
- @SuppressWarnings("deprecation")
- private void createConnectorsSection(Composite parent) {
- TableWrapLayout layout = new TableWrapLayout();
- layout.numColumns = 3;
- layout.makeColumnsEqualWidth = true;
- layout.leftMargin = 0;
- layout.rightMargin = 0;
- layout.topMargin = 0;
- layout.bottomMargin = 0;
-
- Composite composite = toolkit.createComposite(parent);
- composite.setLayout(layout);
- composite.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
-
- Collection<AbstractRepositoryConnector> connectors = TasksUi.getRepositoryManager().getRepositoryConnectors();
- for (AbstractRepositoryConnector connector : connectors) {
- AbstractRepositoryConnectorUi connectorUi = TasksUi.getRepositoryConnectorUi(connector.getConnectorKind());
- if (connectorUi != null) {
- List<LegendElement> elements = connectorUi.getLegendElements();
- if (elements != null && elements.size() > 0) {
- legendElements.addAll(elements);
- addLegendElements(composite, connector, elements);
- } else {
- List<ITask> items = connectorUi.getLegendItems();
- if (items != null && !items.isEmpty()) {
- addLegacyLegendItems(composite, connector, items);
- }
- }
- }
- }
- }
-
- private void addLegendElements(Composite composite, AbstractRepositoryConnector connector,
- List<LegendElement> elements) {
- Section connectorSection = toolkit.createSection(composite, ExpandableComposite.TITLE_BAR);
- connectorSection.setLayout(new TableWrapLayout());
- connectorSection.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
-
- String label = connector.getLabel();
- int parenIndex = label.indexOf('(');
- if (parenIndex != -1) {
- label = label.substring(0, parenIndex);
- }
- connectorSection.setText(label);
-
- TableWrapLayout clientLayout = new TableWrapLayout();
- clientLayout.numColumns = 2;
- clientLayout.makeColumnsEqualWidth = false;
- clientLayout.verticalSpacing = 1;
- clientLayout.topMargin = 1;
- clientLayout.bottomMargin = 1;
-
- Composite connectorClient = toolkit.createComposite(connectorSection);
- connectorClient.setLayout(clientLayout);
- connectorClient.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
- connectorSection.setClient(connectorClient);
-
- Label imageLabel;
- for (LegendElement element : elements) {
- imageLabel = toolkit.createLabel(connectorClient, "");
- imageLabel.setImage(element.getImage());
- toolkit.createLabel(connectorClient, element.getLabel());
- }
-
- if (elements.size() < 4) {
- imageLabel = toolkit.createLabel(connectorClient, "");
- toolkit.createLabel(connectorClient, "");
- }
- }
-
- private void addLegacyLegendItems(Composite composite, AbstractRepositoryConnector connector, List<ITask> elements) {
- Section connectorSection = toolkit.createSection(composite, ExpandableComposite.TITLE_BAR);
- connectorSection.setLayout(new TableWrapLayout());
- connectorSection.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
-
- String label = connector.getLabel();
- int parenIndex = label.indexOf('(');
- if (parenIndex != -1) {
- label = label.substring(0, parenIndex);
- }
- connectorSection.setText(label);
-
- TableWrapLayout clientLayout = new TableWrapLayout();
- clientLayout.numColumns = 2;
- clientLayout.makeColumnsEqualWidth = false;
- clientLayout.verticalSpacing = 1;
- clientLayout.topMargin = 1;
- clientLayout.bottomMargin = 1;
-
- Composite connectorClient = toolkit.createComposite(connectorSection);
- connectorClient.setLayout(clientLayout);
- connectorClient.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
- connectorSection.setClient(connectorClient);
-
- Label imageLabel;
- for (IRepositoryElement taskListElement : elements) {
- imageLabel = toolkit.createLabel(connectorClient, "");
- imageLabel.setImage(labelProvider.getImage(taskListElement));
- toolkit.createLabel(connectorClient, taskListElement.getSummary());
- }
-
- if (elements.size() < 4) {
- imageLabel = toolkit.createLabel(connectorClient, "");
- toolkit.createLabel(connectorClient, "");
- }
- }
-
- private void createGettingStartedSection(Composite parent) {
- TableWrapLayout layout = new TableWrapLayout();
- layout.verticalSpacing = 0;
- layout.leftMargin = 0;
- layout.rightMargin = 0;
- layout.topMargin = 0;
- layout.bottomMargin = 0;
-
- Composite hyperlinkClient = toolkit.createComposite(parent);
- hyperlinkClient.setLayout(layout);
- hyperlinkClient.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
-
- Hyperlink gettingStartedLink = toolkit.createHyperlink(hyperlinkClient,
- "Also see the Getting Started documentation online", SWT.WRAP);
- gettingStartedLink.addHyperlinkListener(new IHyperlinkListener() {
- public void linkActivated(HyperlinkEvent e) {
- close();
- TasksUiUtil.openUrl("http://www.eclipse.org/mylyn/start/");
- }
-
- public void linkEntered(HyperlinkEvent e) {
- // ignore
- }
-
- public void linkExited(HyperlinkEvent e) {
- // ignore
- }
- });
- }
-
- private class CloseDialogAction extends Action {
-
- private CloseDialogAction() {
- setImageDescriptor(CommonImages.NOTIFICATION_CLOSE);
- setText("Close Dialog");
- }
-
- @Override
- public void run() {
- close();
- }
-
- }
-}
diff --git a/org.eclipse.mylyn.sdk-feature/build.properties b/org.eclipse.mylyn.sdk-feature/build.properties
deleted file mode 100644
index 8935806ac..000000000
--- a/org.eclipse.mylyn.sdk-feature/build.properties
+++ /dev/null
@@ -1,54 +0,0 @@
-###############################################################################
-# Copyright (c) 2004, 2007 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.xml,\
- about.ini,\
- about.properties,\
- eclipse32.gif,\
- epl-v10.html,\
- license.html,\
- about.html
-src.includes = eclipse32.gif,\
- about.properties,\
- about.ini,\
- about.html
-
-generate.plugin@org.eclipse.mylyn.help.ui.source=org.eclipse.mylyn.help.ui
-generate.plugin@org.eclipse.mylyn.source=org.eclipse.mylyn
-generate.plugin@org.eclipse.mylyn.context.core.source=org.eclipse.mylyn.context.core
-generate.plugin@org.eclipse.mylyn.tasks.ui.source=org.eclipse.mylyn.tasks.ui
-generate.plugin@org.eclipse.mylyn.monitor.ui.source=org.eclipse.mylyn.monitor.ui
-generate.plugin@org.eclipse.mylyn.tasks.core.source=org.eclipse.mylyn.tasks.core
-generate.plugin@org.eclipse.mylyn.monitor.core.source=org.eclipse.mylyn.monitor.core
-generate.plugin@org.eclipse.mylyn.compatibility.source=org.eclipse.mylyn.compatibility
-generate.plugin@org.eclipse.mylyn.commons.core.source=org.eclipse.mylyn.commons.core
-generate.plugin@org.eclipse.mylyn.commons.ui.source=org.eclipse.mylyn.commons.ui
-generate.plugin@org.eclipse.mylyn.commons.net.source=org.eclipse.mylyn.commons.net
-
-generate.plugin@org.eclipse.mylyn.context.ui.source=org.eclipse.mylyn.context.ui
-generate.plugin@org.eclipse.mylyn.resources.ui.source=org.eclipse.mylyn.resources.ui
-generate.plugin@org.eclipse.mylyn.web.ui.source=org.eclipse.mylyn.web.ui
-
-generate.plugin@org.eclipse.mylyn.ide.ui.source=org.eclipse.mylyn.ide.ui
-generate.plugin@org.eclipse.mylyn.team.cvs.source=org.eclipse.mylyn.team.cvs
-generate.plugin@org.eclipse.mylyn.ide.ant.source=org.eclipse.mylyn.ide.ant
-generate.plugin@org.eclipse.mylyn.bugzilla.ide.source=org.eclipse.mylyn.bugzilla.ide
-generate.plugin@org.eclipse.mylyn.tasks.bugs.source=org.eclipse.mylyn.tasks.bugs
-
-generate.plugin@org.eclipse.mylyn.java.ui.source=org.eclipse.mylyn.java.ui
-generate.plugin@org.eclipse.mylyn.java.tasks.source=org.eclipse.mylyn.java.tasks
-
-generate.plugin@org.eclipse.mylyn.pde.ui.source=org.eclipse.mylyn.pde.ui
-
-generate.plugin@org.eclipse.mylyn.team.ui.source=org.eclipse.mylyn.team.ui
-
-generate.plugin@org.eclipse.mylyn.bugzilla.core.source=org.eclipse.mylyn.bugzilla.core
-generate.plugin@org.eclipse.mylyn.bugzilla.ui.source=org.eclipse.mylyn.bugzilla.ui
-
-generate.plugin@org.eclipse.mylyn.trac.ui.source=org.eclipse.mylyn.trac.ui
-generate.plugin@org.eclipse.mylyn.trac.core.source=org.eclipse.mylyn.trac.core
-
diff --git a/org.eclipse.mylyn.sdk-feature/feature.xml b/org.eclipse.mylyn.sdk-feature/feature.xml
deleted file mode 100644
index 6d750f6db..000000000
--- a/org.eclipse.mylyn.sdk-feature/feature.xml
+++ /dev/null
@@ -1,256 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.mylyn.sdk_feature"
- label="Mylyn SDK"
- version="3.0.0.qualifier"
- provider-name="Eclipse.org"
- plugin="org.eclipse.mylyn">
-
- <description url="http://eclipse.org/mylyn">
- Provides sources for the Mylyn Task List, Focused UI and Integration
-features.
- </description>
-
- <copyright>
- Copyright (c) 2004 - 2007 Mylyn project committers and others.
- </copyright>
-
- <license url="license.html">
- Eclipse Foundation Software User Agreement
-
-March 17, 2005
-Usage Of Content
-
-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.
-Applicable Licenses
-
-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 http://www.eclipse.org/legal/epl-v10.html. For purposes of the EPL, &quot;Program&quot; will mean the Content.
-
-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;).
-
- * 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;).
- * Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Javaâ„¢ ARchive) in a directory named &quot;plugins&quot;.
- * 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.
- * 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.
-
-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:
-
- * The top-level (root) directory
- * Plug-in and Fragment directories
- * Inside Plug-ins and Fragments packaged as JARs
- * Sub-directories of the directory named &quot;src&quot; of certain Plug-ins
- * Feature directories
-
-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.
-
-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):
-
- * Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)
- * Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)
- * Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)
- * IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)
- * Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)
- * Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)
-
-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.
-Cryptography
-
-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.
-
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.
- </license>
-
- <url>
- <update label="Mylyn for Eclipse 3.4" url="http://download.eclipse.org/tools/mylyn/update/e3.4"/>
- </url>
-
- <plugin
- id="org.eclipse.mylyn.help.ui.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.context.core.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.tasks.ui.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.monitor.ui.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.tasks.core.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.monitor.core.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.compatibility.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.commons.core.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.commons.ui.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.commons.net.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.context.ui.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.resources.ui.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.web.ui.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.ide.ui.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.team.cvs.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.ide.ant.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.bugzilla.ide.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.tasks.bugs.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.java.ui.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.java.tasks.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.pde.ui.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.team.ui.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.bugzilla.core.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.bugzilla.ui.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.trac.ui.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.trac.core.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/org.eclipse.mylyn.tasks.core/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.mylyn.tasks.core/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index a398f671e..000000000
--- a/org.eclipse.mylyn.tasks.core/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,340 +0,0 @@
-#Wed May 28 17:24:58 PDT 2008
-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=ignore
-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,NORMAL
-org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,API
-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=false
-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.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.tasks.core/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.mylyn.tasks.core/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 5e70d0848..000000000
--- a/org.eclipse.mylyn.tasks.core/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,63 +0,0 @@
-#Sat Mar 01 03:38:47 PST 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">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*******************************************************************************\n * Copyright (c) 2004, 2007 Mylyn project committers and others.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *******************************************************************************/\n\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ignore\n${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ignore</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created JavaScript files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for vars" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Jsdoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created function stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated function stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_methods=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=true
-sp_cleanup.correct_indentation=true
-sp_cleanup.format_source_code=true
-sp_cleanup.format_source_code_changes_only=false
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=true
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=true
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=true
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=true
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=true
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/org.eclipse.mylyn.tasks.core/.settings/org.eclipse.mylyn.tasklist.prefs b/org.eclipse.mylyn.tasks.core/.settings/org.eclipse.mylyn.tasklist.prefs
deleted file mode 100644
index 0a2cc0b30..000000000
--- a/org.eclipse.mylyn.tasks.core/.settings/org.eclipse.mylyn.tasklist.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Mon Jun 18 17:14:59 PDT 2007
-eclipse.preferences.version=1
-project.repository.kind=bugzilla
-project.repository.url=https\://bugs.eclipse.org/bugs
diff --git a/org.eclipse.mylyn.tasks.core/META-INF/MANIFEST.MF b/org.eclipse.mylyn.tasks.core/META-INF/MANIFEST.MF
deleted file mode 100644
index 15bbd9ed9..000000000
--- a/org.eclipse.mylyn.tasks.core/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,19 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Mylyn Tasks Core
-Bundle-SymbolicName: org.eclipse.mylyn.tasks.core;singleton:=true
-Bundle-Version: 3.0.0.qualifier
-Bundle-Vendor: Eclipse.org
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.core.net,
- org.eclipse.mylyn.commons.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.mylyn.commons.net;bundle-version="[3.0.0,4.0.0)"
-Export-Package: org.eclipse.mylyn.internal.tasks.core;x-friends:="org.eclipse.mylyn.tasks.ui,org.eclipse.mylyn.tasks.bugs",
- org.eclipse.mylyn.internal.tasks.core.data;x-friends:="org.eclipse.mylyn.tasks.ui,org.eclipse.mylyn.tasks.bugs",
- org.eclipse.mylyn.internal.tasks.core.deprecated;x-internal:=true,
- org.eclipse.mylyn.internal.tasks.core.externalization;x-friends:="org.eclipse.mylyn.tasks.ui,org.eclipse.mylyn.tasks.bugs",
- org.eclipse.mylyn.internal.tasks.core.sync;x-friends:="org.eclipse.mylyn.tasks.ui,org.eclipse.mylyn.tasks.bugs",
- org.eclipse.mylyn.tasks.core,
- org.eclipse.mylyn.tasks.core.data,
- org.eclipse.mylyn.tasks.core.sync
diff --git a/org.eclipse.mylyn.tasks.core/about.html b/org.eclipse.mylyn.tasks.core/about.html
deleted file mode 100644
index 0dd939c09..000000000
--- a/org.eclipse.mylyn.tasks.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 7, 2007</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.tasks.core/build.properties b/org.eclipse.mylyn.tasks.core/build.properties
deleted file mode 100644
index 812285c52..000000000
--- a/org.eclipse.mylyn.tasks.core/build.properties
+++ /dev/null
@@ -1,15 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2006 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 = META-INF/,\
- plugin.xml,\
- .,\
- about.html
-src.includes = about.html,\
- schema/
-jre.compilation.profile = J2SE-1.5
-source.. = src/
diff --git a/org.eclipse.mylyn.tasks.core/plugin.xml b/org.eclipse.mylyn.tasks.core/plugin.xml
deleted file mode 100644
index 523691648..000000000
--- a/org.eclipse.mylyn.tasks.core/plugin.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<?eclipse version="3.0"?>
-<plugin>
- <extension-point id="templates" name="templates" schema="schema/templates.exsd"/>
-
- <!--
- <extension
- point="org.eclipse.ui.workbench.texteditor.hyperlinkDetectors">
- <hyperlinkDetector class="org.eclipse.mylyn.internal.bugs.java.BugzillaHyperLinkDetector"/>
- </extension>
- -->
-
-<!--
- <extension
- point="org.eclipse.mylyn.core.context">
- <structureBridge
- activeSearchIcon="icons/elcl16/edge-ref-bug.gif"
- activeSearchLabel="Bugzilla References"
- class="org.eclipse.mylyn.bugs.BugzillaStructureBridge"
- name="Bugzilla Structure Bridge"/>
- </extension>
-
- <extension
- point="org.eclipse.mylyn.ui.context">
- <uiBridge
- class="org.eclipse.mylyn.bugs.BugzillaUiBridge"
- contentType="bugzilla"/>
- </extension>
--->
-</plugin>
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/AbstractSearchHandler.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/AbstractSearchHandler.java
deleted file mode 100644
index bb9dd7ff3..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/AbstractSearchHandler.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core;
-
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.data.TaskData;
-
-/**
- * @author Steffen Pingel
- */
-public abstract class AbstractSearchHandler {
-
- public abstract String getConnectorKind();
-
- public abstract boolean queryForText(TaskRepository taskRepository, IRepositoryQuery query, TaskData taskData,
- String searchString);
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/AbstractTask.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/AbstractTask.java
deleted file mode 100644
index a9cc5a438..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/AbstractTask.java
+++ /dev/null
@@ -1,530 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core;
-
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-import org.eclipse.mylyn.tasks.core.ITask;
-
-/**
- * Encapsulates tasks that reside on a repository or local computer and participate in synchronization with the source
- * that contains their data.
- *
- * @author Mik Kersten
- * @author Rob Elves
- * @since 2.0
- */
-public abstract class AbstractTask extends AbstractTaskContainer implements ITask {
-
- public static final String DEFAULT_TASK_KIND = "task";
-
- private String repositoryUrl;
-
- private String taskKind = DEFAULT_TASK_KIND;
-
- private final String taskId;
-
- private String owner;
-
- private boolean active = false;
-
- private String summary;
-
- private String priority = PriorityLevel.getDefault().toString();
-
- private boolean isNotifiedIncoming = false;
-
- private boolean reminded = false;
-
- private final Set<AbstractTaskContainer> containers = new HashSet<AbstractTaskContainer>();
-
- // ************ Synch ****************
-
- /** The last time this task's bug report was in a synchronized (read?) state. */
- private String lastReadTimeStamp;
-
- private boolean synchronizing;
-
- private boolean submitting;
-
- private SynchronizationState synchronizationState = SynchronizationState.SYNCHRONIZED;
-
- // transient
- private IStatus errorStatus = null;
-
- private boolean stale = false;
-
- private Date completionDate = null;
-
- private Date creationDate = null;
-
- private Date modificationDate = null;
-
- private DateRange scheduledForDate = null;
-
- private Date dueDate = null;
-
- private String notes = "";
-
- private int estimatedTimeHours = 1;
-
- private boolean markReadPending;
-
- // TODO 3.0 make private
- protected String taskKey;
-
- private Map<String, String> attributes;
-
- private boolean changed;
-
- public AbstractTask(String repositoryUrl, String taskId, String summary) {
- super(RepositoryTaskHandleUtil.getHandle(repositoryUrl, taskId));
- this.repositoryUrl = repositoryUrl;
- this.taskId = taskId;
- this.summary = summary;
- }
-
- /**
- * Final to preserve the handle identifier format required by the framework.
- */
- @Override
- public final String getHandleIdentifier() {
- return super.getHandleIdentifier();
- }
-
- /**
- * True for tasks that can be modified without a round-trip to a server. For example, such a task can be marked
- * completed via the Task List.
- *
- * @deprecated use <code>task instanceof LocalTask</code> instead
- */
- @Deprecated
- public abstract boolean isLocal();
-
- public abstract String getConnectorKind();
-
- @Deprecated
- public String getLastReadTimeStamp() {
- return lastReadTimeStamp;
- }
-
- @Deprecated
- public void setLastReadTimeStamp(String lastReadTimeStamp) {
- this.lastReadTimeStamp = lastReadTimeStamp;
- }
-
- /**
- * @since 3.0
- */
- public void setSynchronizationState(SynchronizationState syncState) {
- Assert.isNotNull(syncState);
- this.synchronizationState = syncState;
- }
-
- /**
- * @since 3.0
- */
- public SynchronizationState getSynchronizationState() {
- return synchronizationState;
- }
-
- public boolean isSynchronizing() {
- return synchronizing;
- }
-
- public void setSynchronizing(boolean sychronizing) {
- this.synchronizing = sychronizing;
- }
-
- public boolean isNotified() {
- return isNotifiedIncoming;
- }
-
- public void setNotified(boolean notified) {
- isNotifiedIncoming = notified;
- }
-
- public String getOwner() {
- return owner;
- }
-
- public void setOwner(String owner) {
- if (!areEqual(this.owner, owner)) {
- String oldValue = this.owner;
- this.owner = owner;
- firePropertyChange("owner", oldValue, owner);
- }
- }
-
- /**
- * Return the status, such as an error or warning, associated with this task.
- */
- public IStatus getStatus() {
- return errorStatus;
- }
-
- public void setErrorStatus(IStatus status) {
- this.errorStatus = status;
- }
-
- public final String getTaskId() {
- return taskId;
- }
-
- public final String getRepositoryUrl() {
- return repositoryUrl;
- }
-
- @Override
- public final void setHandleIdentifier(String handleIdentifier) {
- throw new RuntimeException("Cannot set the handle identifier of a task, set repository URL instead.");
- }
-
- public final void setRepositoryUrl(String repositoryUrl) {
- this.repositoryUrl = repositoryUrl;
- super.setHandleIdentifier(RepositoryTaskHandleUtil.getHandle(repositoryUrl, taskId));
- }
-
- /**
- * User identifiable key for the task to be used in UI facilities such as label displays and hyperlinked references.
- * Can return the same as the ID (e.g. in the case of Bugzilla). Can return null if no such label exists.
- */
- public String getTaskKey() {
- return (taskKey == null) ? taskId : taskKey;
- }
-
- public boolean isSubmitting() {
- return submitting;
- }
-
- public void setSubmitting(boolean submitting) {
- this.submitting = submitting;
- }
-
- @Override
- public String toString() {
- return summary;
- }
-
- public void setActive(boolean active) {
- this.active = active;
- }
-
- public boolean isActive() {
- return active;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (obj instanceof AbstractTask) {
- return this.getHandleIdentifier().equals(((ITask) obj).getHandleIdentifier());
- } else {
- return false;
- }
- }
-
- @Override
- public int hashCode() {
- return taskId.hashCode();
- }
-
- public boolean isCompleted() {
- return completionDate != null;
- }
-
- /**
- * @deprecated use setCompletionDate()
- */
- @Deprecated
- public void setCompleted(boolean completed) {
- if (completed) {
- completionDate = new Date();
- } else {
- completionDate = null;
- }
- }
-
- @Override
- public String getPriority() {
- return priority;
- }
-
- public void setPriority(String priority) {
- if (!areEqual(this.priority, priority)) {
- String oldValue = this.priority;
- this.priority = priority;
- firePropertyChange("priority", oldValue, priority);
- }
- }
-
- public String getNotes() {
- // TODO: removed check for null once xml updated.
- if (notes == null) {
- notes = "";
- }
- return notes;
- }
-
- public void setNotes(String notes) {
- this.notes = notes;
- }
-
- /**
- * @deprecated Use {@link #getEstimatedTimeHours()} instead
- */
- @Deprecated
- public int getEstimateTimeHours() {
- return getEstimatedTimeHours();
- }
-
- /**
- * @since 3.0
- */
- public int getEstimatedTimeHours() {
- return estimatedTimeHours;
- }
-
- public void setEstimatedTimeHours(int estimated) {
- this.estimatedTimeHours = estimated;
- }
-
- /**
- * @API 3.0: Rename to internalAddParentContainer
- */
- public void addParentContainer(AbstractTaskContainer container) {
- containers.add(container);
- }
-
- /**
- * @API 3.0: Rename to internalremoveParentContainer
- * @since 3.0
- */
- public void removeParentContainer(AbstractTaskContainer container) {
- containers.remove(container);
- }
-
- public Set<AbstractTaskContainer> getParentContainers() {
- return new HashSet<AbstractTaskContainer>(containers);
- }
-
- @Override
- public String getSummary() {
- return summary;
- }
-
- public Date getCompletionDate() {
- return completionDate;
- }
-
- public void setScheduledForDate(DateRange reminderDate) {
- scheduledForDate = reminderDate;
- }
-
- public DateRange getScheduledForDate() {
- return scheduledForDate;
- }
-
- public boolean isReminded() {
- return reminded;
- }
-
- public void setReminded(boolean reminded) {
- this.reminded = reminded;
- }
-
- public Date getCreationDate() {
- if (creationDate == null) {
- creationDate = new Date();
- }
- return creationDate;
- }
-
- public void setCreationDate(Date creationDate) {
- if (!areEqual(this.creationDate, creationDate)) {
- Date oldValue = this.creationDate;
- this.creationDate = creationDate;
- firePropertyChange("creationDate", oldValue, creationDate);
- }
- }
-
- public void setSummary(String summary) {
- Assert.isNotNull(summary);
- if (!areEqual(this.summary, summary)) {
- String oldValue = this.summary;
- this.summary = summary;
- firePropertyChange("summary", oldValue, summary);
- }
- }
-
- public void setCompletionDate(Date completionDate) {
- if (!areEqual(this.completionDate, completionDate)) {
- Date oldValue = this.completionDate;
- this.completionDate = completionDate;
- firePropertyChange("completionDate", oldValue, completionDate);
- }
- }
-
- private boolean areEqual(Object oldValue, Object newValue) {
- return (oldValue != null) ? oldValue.equals(newValue) : oldValue == newValue;
- }
-
- private void firePropertyChange(String key, Object oldValue, Object newValue) {
-// PropertyChangeEvent event = new PropertyChangeEvent(this, key, oldValue, newValue);
-// for (PropertyChangeListener listener : propertyChangeListeners) {
-// listener.propertyChange(event);
-// }
- changed = true;
- }
-
- public boolean isChanged() {
- return changed;
- }
-
- public void setChanged(boolean changed) {
- this.changed = changed;
- }
-
- /**
- * @deprecated use {@link TaskActivityManager#isPastReminder(AbstractTask)} instead
- */
- @Deprecated
- public boolean isPastReminder() {
- if (isCompleted() || scheduledForDate == null) {
- return false;
- } else {
- if (/*!internalIsFloatingScheduledDate() && */scheduledForDate.getEndDate().compareTo(
- TaskActivityUtil.getCalendar()) < 0) {
- return true;
- } else {
- return false;
- }
- }
- }
-
- public String getTaskKind() {
- return taskKind;
- }
-
- public void setTaskKind(String taskKind) {
- if (!areEqual(this.taskKind, taskKind)) {
- String oldValue = this.taskKind;
- this.taskKind = taskKind;
- firePropertyChange("taskKind", oldValue, taskKind);
- }
- }
-
- @Override
- public int compareTo(IRepositoryElement taskListElement) {
- return summary.compareTo(((AbstractTask) taskListElement).summary);
- }
-
- public Date getDueDate() {
- return dueDate;
- }
-
- public void setDueDate(Date date) {
- if (!areEqual(this.dueDate, date)) {
- Date oldValue = this.dueDate;
- this.dueDate = date;
- firePropertyChange("dueDate", oldValue, date);
- }
- }
-
- @Deprecated
- public boolean isStale() {
- return stale;
- }
-
- @Deprecated
- public void setStale(boolean stale) {
- this.stale = stale;
- }
-
- /**
- * @since 3.0
- */
- public Date getModificationDate() {
- return modificationDate;
- }
-
- /**
- * @since 3.0
- */
- public void setModificationDate(Date modificationDate) {
- if (!areEqual(this.modificationDate, modificationDate)) {
- Date oldValue = this.modificationDate;
- this.modificationDate = modificationDate;
- firePropertyChange("modificationDate", oldValue, modificationDate);
- }
- }
-
- /**
- * @since 3.0
- */
- public boolean isMarkReadPending() {
- return markReadPending;
- }
-
- /**
- * @since 3.0
- */
- public void setMarkReadPending(boolean markReadPending) {
- this.markReadPending = markReadPending;
- }
-
- public void setTaskKey(String taskKey) {
- if (!areEqual(this.taskKey, taskKey)) {
- String oldValue = this.taskKey;
- this.taskKey = taskKey;
- firePropertyChange("taskKey", oldValue, taskKey);
- }
- }
-
- public synchronized String getAttribute(String key) {
- return (attributes != null) ? attributes.get(key) : null;
- }
-
- public synchronized Map<String, String> getAttributes() {
- if (attributes != null) {
- return new HashMap<String, String>(attributes);
- } else {
- return Collections.emptyMap();
- }
- }
-
- public synchronized void setAttribute(String key, String value) {
- Assert.isNotNull(key);
- if (attributes == null) {
- attributes = new HashMap<String, String>();
- }
- String oldValue = attributes.get(key);
- if (!areEqual(oldValue, value)) {
- attributes.put(key, value);
- firePropertyChange(key, oldValue, value);
- }
- }
-
- @Override
- public void setUrl(String url) {
- String oldValue = getUrl();
- if (!areEqual(oldValue, url)) {
- super.setUrl(url);
- firePropertyChange("url", oldValue, url);
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/AbstractTaskCategory.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/AbstractTaskCategory.java
deleted file mode 100644
index 7dea4ce32..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/AbstractTaskCategory.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core;
-
-/**
- * A container that stores tasks from any repository. A task can only have a single AbstractTaskCategory parent (only be
- * in one category at a time).
- *
- * @author Mik Kersten
- */
-public abstract class AbstractTaskCategory extends AbstractTaskContainer {
-
- public AbstractTaskCategory(String handleAndDescription) {
- super(handleAndDescription);
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/AbstractTaskContainer.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/AbstractTaskContainer.java
deleted file mode 100644
index 3e349271b..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/AbstractTaskContainer.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.core;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.concurrent.CopyOnWriteArrayList;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITaskContainer;
-import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
-
-/**
- * Top-level Task List element that can contain other Task List elements.
- *
- * @author Mik Kersten
- */
-public abstract class AbstractTaskContainer extends PlatformObject implements IRepositoryElement, ITaskContainer {
-
- private String handleIdentifier = "";
-
- private final Collection<ITask> children = new CopyOnWriteArrayList<ITask>();
-
- /**
- * Optional URL corresponding to the web resource associated with this container.
- */
- private String url;
-
- public AbstractTaskContainer(String handleAndDescription) {
- Assert.isNotNull(handleAndDescription);
- this.handleIdentifier = handleAndDescription;
- }
-
- /**
- * Use {@link TaskList} methods instead.
- */
- public void internalAddChild(AbstractTask task) {
- Assert.isNotNull(task);
- children.add(task);
- }
-
- /**
- * Use {@link TaskList} methods instead.
- *
- * @return
- * @since 3.0
- */
- public boolean internalRemoveChild(ITask task) {
- return children.remove(task);
- }
-
- /**
- * Removes any cyclic dependencies in children.
- *
- * TODO: review to make sure that this is too expensive, or move to creation.
- *
- * @since 3.0
- */
- public Collection<ITask> getChildren() {
- return Collections.unmodifiableCollection(children);
- }
-
- /**
- * Maxes out at a depth of 10.
- *
- * TODO: review policy
- */
- public boolean contains(String handle) {
- Assert.isNotNull(handle);
- return containsHelper(children, handle, new HashSet<IRepositoryElement>());
- }
-
- private boolean containsHelper(Collection<ITask> children, String handle, Set<IRepositoryElement> visitedContainers) {
- for (ITask child : children) {
- if (visitedContainers.contains(child)) {
- continue;
- }
- visitedContainers.add(child);
- if (child instanceof ITaskContainer) {
- if (handle.equals(child.getHandleIdentifier())
- || containsHelper(((ITaskContainer) child).getChildren(), handle, visitedContainers)) {
- return true;
- }
- }
- }
- return false;
- }
-
- public String getSummary() {
- return handleIdentifier;
- }
-
- public boolean isEmpty() {
- return children.isEmpty();
- }
-
- public String getHandleIdentifier() {
- return handleIdentifier;
- }
-
- public void setHandleIdentifier(String handleIdentifier) {
- this.handleIdentifier = handleIdentifier;
- }
-
- @Override
- public int hashCode() {
- return handleIdentifier.hashCode();
- }
-
- public void setUrl(String url) {
- this.url = url;
- }
-
- /**
- * @return can be null
- */
- public String getUrl() {
- return url;
- }
-
- @Override
- public boolean equals(Object object) {
- if (object == null) {
- return false;
- }
- if (object instanceof AbstractTaskContainer) {
- IRepositoryElement compare = (IRepositoryElement) object;
- return this.getHandleIdentifier().equals(compare.getHandleIdentifier());
- } else {
- return false;
- }
- }
-
- @Override
- public String toString() {
- return "container: " + handleIdentifier;
- }
-
- public String getPriority() {
- String highestPriority = PriorityLevel.P5.toString();
- Collection<ITask> tasks = getChildren();
- if (tasks.isEmpty()) {
- return PriorityLevel.P1.toString();
- }
- for (ITask task : tasks) {
- if (highestPriority.compareTo(task.getPriority()) > 0) {
- highestPriority = task.getPriority();
- }
- }
- return highestPriority;
- }
-
- /**
- * The handle for most containers is their summary. Override to specify a different natural ordering.
- */
- public int compareTo(IRepositoryElement taskListElement) {
- return getHandleIdentifier().compareTo(taskListElement.getHandleIdentifier());
- }
-
- /**
- * If false, user is unable to manipulate (i.e. rename/delete), no preferences are available.
- *
- * @since 2.3
- */
- public boolean isUserManaged() {
- return true;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/CommentQuoter.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/CommentQuoter.java
deleted file mode 100644
index d887d821d..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/CommentQuoter.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core;
-
-/**
- * Utility class to handle many text quoting scenarios
- * <p>
- * Each line of text is quoted individually and wrapped, according to the {@link lineSize} attribute
- * <p>
- * The wrapping policy is the following:
- * <p>
- * <ol>
- * <li>A substring of {@link lineSize} characters is extracted and examined
- * <li>If the next character after the substring is a blank space, the substring is quoted
- * <li>If don't, the substring is searched backwards for a blank space; if one is found, the substring until the blank
- * space is quoted
- * <li>If no blank space is found, the entire substring is quoted
- * <li>The remaining of substring + line are reevaluated on step 1
- * </ol>
- *
- * @author Willian Mitsuda
- */
-public class CommentQuoter {
-
- public static final int DEFAULT_WRAP_SIZE = 80;
-
- private final int lineSize;
-
- public CommentQuoter() {
- this(DEFAULT_WRAP_SIZE);
- }
-
- public CommentQuoter(int lineSize) {
- this.lineSize = lineSize;
- }
-
- /**
- * Quote a text, wrapping if necessary
- */
- public String quote(String text) {
- StringBuilder sb = new StringBuilder(text.length() + text.length() / lineSize);
-
- String[] lines = text.split("\n");
- for (String line : lines) {
- if (line.trim().equals("")) {
- sb.append("> \n");
- continue;
- }
-
- int pos = 0;
- while (pos < line.length()) {
- int wrapPos = pos + lineSize;
- if (wrapPos < line.length()) {
- // Try to find a space to wrap the line
- while (wrapPos > pos) {
- char wrapChar = line.charAt(wrapPos);
- if (Character.isSpaceChar(wrapChar)) {
- break;
- }
- wrapPos--;
- }
- if (wrapPos == pos) {
- // There is no space; don't break the line and find the
- // next space after the limit...
- wrapPos = pos + lineSize;
- while (wrapPos < line.length()) {
- if (Character.isSpaceChar(line.charAt(wrapPos))) {
- break;
- }
- wrapPos++;
- }
- }
-
- // Extract the substring and recalculate the next search
- // start point
- String wrappedLine = line.substring(pos, wrapPos).trim();
- sb.append("> " + wrappedLine + "\n");
- pos = wrapPos + 1;
- } else {
- sb.append("> " + line.substring(pos).trim() + "\n");
- break;
- }
- }
- }
-
- return sb.toString();
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/DateRange.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/DateRange.java
deleted file mode 100644
index a126d14b9..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/DateRange.java
+++ /dev/null
@@ -1,235 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core;
-
-import java.text.DateFormat;
-import java.util.Calendar;
-
-import org.eclipse.core.runtime.Assert;
-
-/**
- * @author Rob Elves
- * @since 3.0
- */
-public class DateRange implements Comparable<DateRange> {
-
- private static final long DAY = 1000 * 60 * 60 * 24;
-
- private static final String DESCRIPTION_PREVIOUS_WEEK = "Previous Week";
-
- private static final String DESCRIPTION_THIS_WEEK = "This Week";
-
- private static final String DESCRIPTION_NEXT_WEEK = "Next Week";
-
- private final Calendar startDate;
-
- private final Calendar endDate;
-
- /**
- * create an instance of a date range that represents a finite point in time
- */
- public DateRange(Calendar time) {
- startDate = time;
- endDate = time;
- }
-
- public DateRange(Calendar startDate, Calendar endDate) {
- Assert.isNotNull(startDate);
- Assert.isNotNull(endDate);
- this.startDate = startDate;
- this.endDate = endDate;
- }
-
- public boolean includes(DateRange range) {
- return (startDate.getTimeInMillis() <= range.getStartDate().getTimeInMillis())
- && (endDate.getTimeInMillis() >= range.getEndDate().getTimeInMillis());
- }
-
- public boolean includes(Calendar cal) {
- return (startDate.getTimeInMillis() <= cal.getTimeInMillis())
- && (endDate.getTimeInMillis() >= cal.getTimeInMillis());
- }
-
- public Calendar getStartDate() {
- return startDate;
- }
-
- public Calendar getEndDate() {
- return endDate;
- }
-
- /**
- * TODO: Move into label provider
- */
- @Override
- public String toString() {
- boolean isThisWeek = TaskActivityUtil.getCurrentWeek().includes(this);
- boolean isNextWeek = TaskActivityUtil.getNextWeek().includes(this);
- if (isDay() && (isThisWeek || isNextWeek)) {
- String day = "";
- switch (getStartDate().get(Calendar.DAY_OF_WEEK)) {
- case Calendar.MONDAY:
- day = "Monday";
- break;
- case Calendar.TUESDAY:
- day = "Tuesday";
- break;
- case Calendar.WEDNESDAY:
- day = "Wednesday";
- break;
- case Calendar.THURSDAY:
- day = "Thursday";
- break;
- case Calendar.FRIDAY:
- day = "Friday";
- break;
- case Calendar.SATURDAY:
- day = "Saturday";
- break;
- case Calendar.SUNDAY:
- day = "Sunday";
- break;
- }
- if (Calendar.getInstance().get(Calendar.DAY_OF_WEEK) == getStartDate().get(Calendar.DAY_OF_WEEK)) {
- return day + " - Today";
- } else {
- return day;
- }
- } else if (isThisWeek()) {
- return DESCRIPTION_THIS_WEEK;
- } else if (isNextWeek()) {
- return DESCRIPTION_NEXT_WEEK;
- } else if (isPreviousWeek()) {
- return DESCRIPTION_PREVIOUS_WEEK;
- }
- return DateFormat.getDateInstance(DateFormat.MEDIUM).format(startDate.getTime());
- /* + " to "+ DateFormat.getDateInstance(DateFormat.MEDIUM).format(endDate.getTime());*/
- }
-
- public DateRange next() {
- if (isDay()) {
- return create(Calendar.DAY_OF_YEAR, 1);
- } else if (isWeek()) {
- return create(Calendar.WEEK_OF_YEAR, 1);
- }
- return null;
- }
-
- public DateRange previous() {
- if (isDay()) {
- return create(Calendar.DAY_OF_YEAR, -1);
- } else if (isWeek()) {
- return create(Calendar.WEEK_OF_YEAR, -1);
- }
- return null;
- }
-
- private DateRange create(int field, int multiplier) {
- Calendar previousStart = (Calendar) getStartDate().clone();
- Calendar previousEnd = (Calendar) getEndDate().clone();
- previousStart.add(field, 1 * multiplier);
- previousEnd.add(field, 1 * multiplier);
- return new DateRange(previousStart, previousEnd);
- }
-
- private boolean isNextWeek() {
- return TaskActivityUtil.getCurrentWeek().next().compareTo(this) == 0;
- }
-
- private boolean isThisWeek() {
- if (isWeek()) {
- return this.includes(Calendar.getInstance());
- }
- return false;
- }
-
- private boolean isPreviousWeek() {
- if (isWeek()) {
- Calendar cal = Calendar.getInstance();
- cal.add(Calendar.WEEK_OF_YEAR, -1);
- return this.includes(cal);
- }
- return false;
- }
-
- public boolean isDay() {
- return ((getEndDate().getTimeInMillis() - getStartDate().getTimeInMillis()) == DAY - 1);
- }
-
- public boolean isWeek() {
- return ((getEndDate().getTimeInMillis() - getStartDate().getTimeInMillis()) == (DAY * 7) - 1);
- }
-
- public boolean isPast() {
- return getEndDate().compareTo(Calendar.getInstance()) < 0;
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((endDate == null) ? 0 : endDate.hashCode());
- result = prime * result + ((startDate == null) ? 0 : startDate.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (!(obj instanceof DateRange)) {
- return false;
- }
- if (this == obj) {
- return true;
- }
- if (obj == null) {
- return false;
- }
-// if (getClass() != obj.getClass()) {
-// return false;
-// }
- DateRange other = (DateRange) obj;
- if (endDate == null) {
- if (other.endDate != null) {
- return false;
- }
- } else if (!endDate.equals(other.endDate)) {
- return false;
- }
- if (startDate == null) {
- if (other.startDate != null) {
- return false;
- }
- } else if (!startDate.equals(other.startDate)) {
- return false;
- }
- return true;
- }
-
- public boolean before(Calendar cal) {
- return getEndDate().before(cal);
- }
-
- public boolean after(Calendar cal) {
- return cal.before(getEndDate());
- }
-
- public int compareTo(DateRange range) {
- if (range.getStartDate().equals(startDate) && range.getEndDate().equals(endDate)) {
- return 0;
- } else if (includes(range)) {
- return 1;
- } else if (before(range.getStartDate())) {
- return -1;
- } else if (after(range.getEndDate())) {
- return 1;
- }
- return -1;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/IRepositoryConstants.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/IRepositoryConstants.java
deleted file mode 100644
index b411e436e..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/IRepositoryConstants.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core;
-
-/**
- * @author Mik Kersten
- * @since 2.0
- */
-public interface IRepositoryConstants {
-
- public static final String OLD_PROPERTY_SYNCTIME = "synctime";
-
- public static final String PROPERTY_SYNCTIMESTAMP = "lastsynctimestamp";
-
- public static final String PROPERTY_TIMEZONE = "timezone";
-
- public static final String PROPERTY_ENCODING = "encoding";
-
- public static final String PROPERTY_VERSION = "version";
-
- public static final String PROPERTY_CONNECTOR_KIND = "kind";
-
- public static final String PROPERTY_URL = "url";
-
- public static final String PROPERTY_LABEL = "label";
-
- public static final String PROPERTY_DELIM = ":";
-
- public static final String KIND_UNKNOWN = "<unknown>";
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/IRepositoryModelListener.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/IRepositoryModelListener.java
deleted file mode 100644
index 62f9e64e0..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/IRepositoryModelListener.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core;
-
-/**
- * @author Mik Kersten
- * @author Steffen Pingel
- * @noimplement This interface is not intended to be implemented by clients.
- */
-public interface IRepositoryModelListener {
-
- public void loaded();
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ITaskDataStorage.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ITaskDataStorage.java
deleted file mode 100644
index 6e74f685a..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ITaskDataStorage.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core;
-
-/**
- * @author Rob Elves
- */
-public interface ITaskDataStorage {
-
- /**
- * Perform any initialization necessary storage
- *
- * @throws Exception
- */
- public void start() throws Exception;
-
- public void stop() throws Exception;
-
- public void put(TaskDataState taskDataState);
-
- public TaskDataState get(String repositoryUrl, String id);
-
- /**
- * if last id remove folder (i.e. in case of refactoring urls)
- */
- public void remove(String repositoryUrl, String id);
-
- /**
- * persist any unsaved data
- */
- public void flush();
-
- /**
- * DESTROY ALL OFFLINE DATA
- */
- public void clear();
-
- // Methods for NEW unsubmitted task data, currently not used
-
-// public void putNew(TaskDataState newTaskDataState);
-//
-// public Set<TaskDataState> getNew(String repositoryUrl);
-//
-// public removeNew(id);
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ITaskJobFactory.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ITaskJobFactory.java
deleted file mode 100644
index 1471435aa..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ITaskJobFactory.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core;
-
-import java.util.Set;
-
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.data.AbstractTaskAttachmentSource;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.mylyn.tasks.core.data.TaskData;
-import org.eclipse.mylyn.tasks.core.sync.SubmitJob;
-import org.eclipse.mylyn.tasks.core.sync.SynchronizationJob;
-import org.eclipse.mylyn.tasks.core.sync.TaskJob;
-
-/**
- * @author Steffen Pingel
- * @author Mik Kersten
- */
-public interface ITaskJobFactory {
-
- public abstract SynchronizationJob createSynchronizeTasksJob(AbstractRepositoryConnector connector,
- TaskRepository taskRepository, Set<ITask> tasks);
-
- public abstract SynchronizationJob createSynchronizeQueriesJob(AbstractRepositoryConnector connector,
- TaskRepository repository, Set<RepositoryQuery> queries);
-
- public abstract SynchronizationJob createSynchronizeRepositoriesJob(Set<TaskRepository> repositories);
-
- public abstract SubmitJob createSubmitTaskJob(AbstractRepositoryConnector connector, TaskRepository taskRepository,
- ITask task, TaskData taskData, Set<TaskAttribute> changedAttributes);
-
- public abstract TaskJob createUpdateRepositoryConfigurationJob(AbstractRepositoryConnector connector,
- TaskRepository taskRepository);
-
- public abstract SubmitJob createSubmitTaskAttachmentJob(AbstractRepositoryConnector connector,
- TaskRepository taskRepository, ITask task, AbstractTaskAttachmentSource source, String comment,
- TaskAttribute attachmentAttribute);
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ITaskList.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ITaskList.java
deleted file mode 100644
index 3cef26e37..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ITaskList.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core;
-
-import java.util.Set;
-
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-
-/**
- * @author Steffen Pingel
- * @author Robert Elves
- * @author Mik Kersten
- * @since 3.0
- */
-public interface ITaskList {
-
- public abstract void addChangeListener(ITaskListChangeListener listener);
-
- public abstract void addQuery(RepositoryQuery query) throws IllegalArgumentException;
-
- /**
- * Add orphaned task to the task list
- */
- public abstract void addTask(ITask task) throws IllegalArgumentException;
-
- /**
- * Precondition: {@code container} already exists in tasklist (be it a parent task, category, or query) If the
- * parentContainer is null the task is considered an orphan and added to the appropriate repository's orphaned tasks
- * container.
- *
- * @param task
- * to be added
- * @param container
- * task container, query or parent task must not be null
- */
- public abstract boolean addTask(ITask task, AbstractTaskContainer parentContainer);
-
- public abstract void deleteCategory(AbstractTaskCategory category);
-
- public abstract void deleteQuery(RepositoryQuery query);
-
- /**
- * TODO: refactor around querying containers for their tasks
- *
- * Task is removed from all containers: root, archive, category, and orphan bin
- *
- * Currently subtasks are not deleted but rather are rather potentially orphaned
- */
- public abstract void deleteTask(ITask task);
-
- public abstract Set<AbstractTaskCategory> getCategories();
-
- public abstract Set<RepositoryQuery> getQueries();
-
- /**
- * @since 2.0
- */
- public abstract ITask getTask(String repositoryUrl, String taskId);
-
- /**
- * @param task
- * list element
- */
- public abstract void notifyElementChanged(IRepositoryElement element);
-
- public abstract void notifySynchronizationStateChanged(IRepositoryElement element);
-
- public abstract void removeChangeListener(ITaskListChangeListener listener);
-
- /**
- * @since 3.0
- */
- public abstract void removeFromContainer(AbstractTaskContainer container, ITask task);
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ITaskListChangeListener.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ITaskListChangeListener.java
deleted file mode 100644
index dc8147397..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ITaskListChangeListener.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core;
-
-import java.util.Set;
-
-
-/**
- * Listener for task list modifications and task content modifications.
- *
- * @author Mik Kersten
- * @since 2.0
- */
-public interface ITaskListChangeListener {
-
- public abstract void containersChanged(Set<TaskContainerDelta> containers);
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ITaskListRunnable.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ITaskListRunnable.java
deleted file mode 100644
index 9f13114d3..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ITaskListRunnable.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * @author Rob Elves
- */
-public interface ITaskListRunnable {
-
- public void execute(IProgressMonitor monitor) throws CoreException;
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ITaskRepositoryFilter.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ITaskRepositoryFilter.java
deleted file mode 100644
index a3a8b6693..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ITaskRepositoryFilter.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core;
-
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-/**
- * Task repository filter to build list of repositories with required capabilities.
- *
- * @author Eugene Kleshov
- * @since 2.0
- */
-public interface ITaskRepositoryFilter {
-
- public static ITaskRepositoryFilter ALL = new ITaskRepositoryFilter() {
- public boolean accept(TaskRepository repository, AbstractRepositoryConnector connector) {
- return true;
- }
- };
-
- public static ITaskRepositoryFilter CAN_QUERY = new ITaskRepositoryFilter() {
- public boolean accept(TaskRepository repository, AbstractRepositoryConnector connector) {
- return !(connector instanceof LocalRepositoryConnector) && !repository.isOffline()
- && connector.canQuery(repository);
- }
- };
-
- public static ITaskRepositoryFilter CAN_CREATE_NEW_TASK = new ITaskRepositoryFilter() {
- public boolean accept(TaskRepository repository, AbstractRepositoryConnector connector) {
- return connector.canCreateNewTask(repository) && !repository.isOffline();
- }
- };
-
- public static ITaskRepositoryFilter CAN_CREATE_TASK_FROM_KEY = new ITaskRepositoryFilter() {
- public boolean accept(TaskRepository repository, AbstractRepositoryConnector connector) {
- return connector.canCreateTaskFromKey(repository) && !repository.isOffline();
- }
- };
-
- public static ITaskRepositoryFilter IS_USER_MANAGED = new ITaskRepositoryFilter() {
- public boolean accept(TaskRepository repository, AbstractRepositoryConnector connector) {
- return connector.isUserManaged();
- }
- };
-
- public abstract boolean accept(TaskRepository repository, AbstractRepositoryConnector connector);
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ITasksCoreConstants.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ITasksCoreConstants.java
deleted file mode 100644
index 4a45ef451..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ITasksCoreConstants.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core;
-
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-
-/**
- * @author Rob Elves
- */
-public interface ITasksCoreConstants {
-
- public static final int MAX_SUBTASK_DEPTH = 10;
-
- public static final String ID_PLUGIN = "org.eclipse.mylyn.tasks.core";
-
- public static final String OLD_TASK_LIST_FILE = "tasklist.xml";
-
- public static final String FILENAME_ENCODING = "UTF-8";
-
- public static final String PREFIX_TASKLIST = "tasklist";
-
- public static final String DEFAULT_BACKUP_FOLDER_NAME = "backup";
-
- public static final String FILE_EXTENSION = ".xml.zip";
-
- public static final String FILENAME_TIMESTAMP_FORMAT = "yyyy-MM-dd-HHmmss";
-
- public static final String DEFAULT_TASK_LIST_FILE = PREFIX_TASKLIST + FILE_EXTENSION;
-
- public static final String CONTEXTS_DIRECTORY = "contexts";
-
- public static final TaskListSchedulingRule ACTIVITY_SCHEDULING_RULE = new TaskListSchedulingRule();
-
- public static final TaskListSchedulingRule TASKLIST_SCHEDULING_RULE = new TaskListSchedulingRule();
-
- public static final ISchedulingRule ROOT_SCHEDULING_RULE = new RootSchedulingRule();
-
- static class ActivityContextSchedulingRule extends RootSchedulingRule {
- @Override
- public boolean contains(ISchedulingRule rule) {
- return rule instanceof ActivityContextSchedulingRule;
- }
-
- @Override
- public boolean isConflicting(ISchedulingRule rule) {
- return rule instanceof ActivityContextSchedulingRule;
- }
- }
-
- static class TaskListSchedulingRule extends RootSchedulingRule {
-
- @Override
- public boolean contains(ISchedulingRule rule) {
- return rule instanceof TaskListSchedulingRule;
- }
-
- @Override
- public boolean isConflicting(ISchedulingRule rule) {
- return rule instanceof TaskListSchedulingRule;
- }
- }
-
- static class RootSchedulingRule implements ISchedulingRule {
-
- public boolean contains(ISchedulingRule rule) {
- return rule instanceof RootSchedulingRule;
- }
-
- public boolean isConflicting(ISchedulingRule rule) {
- return rule instanceof RootSchedulingRule;
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/IdentityAttributeFactory.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/IdentityAttributeFactory.java
deleted file mode 100644
index 6eb365db0..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/IdentityAttributeFactory.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core;
-
-import java.util.Date;
-
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractAttributeFactory;
-
-/**
- * @since 3.0
- * @author Steffen Pingel
- */
-@Deprecated
-public class IdentityAttributeFactory extends AbstractAttributeFactory {
-
- private static final IdentityAttributeFactory INSTANCE = new IdentityAttributeFactory();
-
- private static final long serialVersionUID = 1L;
-
- public static AbstractAttributeFactory getInstance() {
- return INSTANCE;
- }
-
- private IdentityAttributeFactory() {
- }
-
- @Override
- public Date getDateForAttributeType(String attributeKey, String dateString) {
- return null;
- }
-
- @Override
- public String getName(String key) {
- return null;
- }
-
- @Override
- public boolean isHidden(String key) {
- return false;
- }
-
- @Override
- public boolean isReadOnly(String key) {
- return false;
- }
-
- @Override
- public String mapCommonAttributeKey(String key) {
- return key;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/LocalAttachment.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/LocalAttachment.java
deleted file mode 100644
index c8305a44c..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/LocalAttachment.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core;
-
-import java.io.ByteArrayInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.Serializable;
-
-import org.eclipse.mylyn.internal.tasks.core.deprecated.ITaskAttachment;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-
-/**
- * A class representing a local attachment.
- *
- * @author Jeff Pound
- * @since 2.0
- */
-@Deprecated
-public class LocalAttachment implements Serializable, ITaskAttachment {
-
- private static final long serialVersionUID = -4477699536552617389L;
-
- /** The report to which this attachment will be attached */
- private RepositoryTaskData repositoryTaskData;
-
- private String filePath;
-
- private String comment = "";
-
- private String description = "";
-
- private String contentType = "";
-
- private boolean isPatch = false;
-
- private String filename;
-
- private byte[] content;
-
- private File file;
-
- public String getComment() {
- return comment;
- }
-
- public void setComment(String comment) {
- this.comment = comment;
- }
-
- public String getContentType() {
- return contentType;
- }
-
- public void setContentType(String contentType) {
- this.contentType = contentType;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public boolean isPatch() {
- return isPatch;
- }
-
- public void setPatch(boolean isPatch) {
- this.isPatch = isPatch;
- }
-
- public RepositoryTaskData getReport() {
- return repositoryTaskData;
- }
-
- public void setReport(RepositoryTaskData report) {
- this.repositoryTaskData = report;
- }
-
- public String getFilePath() {
- return filePath;
- }
-
- public void setFilePath(String filePath) {
- this.filePath = filePath;
- }
-
- public String getFilename() {
- return this.filename;
- }
-
- public void setFilename(String filename) {
- this.filename = filename;
- }
-
- public InputStream createInputStream() throws IOException {
- assert file != null || content != null;
- return (file != null) ? new FileInputStream(file) : new ByteArrayInputStream(content);
- }
-
- public long getLength() {
- assert file != null || content != null;
- return (file != null) ? file.length() : content.length;
- }
-
- public void setFile(File file) {
- this.file = file;
- }
-
- public void setContent(byte[] content) {
- this.content = content;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/LocalRepositoryConnector.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/LocalRepositoryConnector.java
deleted file mode 100644
index ecb097e39..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/LocalRepositoryConnector.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-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.TaskData;
-import org.eclipse.mylyn.tasks.core.data.TaskDataCollector;
-import org.eclipse.mylyn.tasks.core.sync.ISynchronizationSession;
-
-/**
- * @author Rob Elves
- */
-public class LocalRepositoryConnector extends AbstractRepositoryConnector {
-
- public static final String REPOSITORY_LABEL = "Local";
-
- public static final String CONNECTOR_KIND = "local";
-
- public static final String REPOSITORY_URL = "local";
-
- public static final String REPOSITORY_VERSION = "1";
-
- public static final String DEFAULT_SUMMARY = "New Task";
-
- @Override
- public boolean canCreateNewTask(TaskRepository repository) {
- return true;
- }
-
- @Override
- public boolean canCreateTaskFromKey(TaskRepository repository) {
- return false;
- }
-
- @Override
- public String getLabel() {
- return "Local Task Repository";
- }
-
- @Override
- public String getConnectorKind() {
- return CONNECTOR_KIND;
- }
-
- @Override
- public String getRepositoryUrlFromTaskUrl(String taskFullUrl) {
- // ignore
- return null;
- }
-
- @Override
- public String getTaskIdFromTaskUrl(String taskFullUrl) {
- // ignore
- return null;
- }
-
- @Override
- public String getTaskUrl(String repositoryUrl, String taskId) {
- // ignore
- return null;
- }
-
- @Override
- public IStatus performQuery(TaskRepository repository, IRepositoryQuery query, TaskDataCollector resultCollector,
- ISynchronizationSession event, IProgressMonitor monitor) {
- // ignore
- return null;
- }
-
- @Override
- public void updateRepositoryConfiguration(TaskRepository repository, IProgressMonitor monitor) throws CoreException {
- // ignore
- }
-
- @Override
- public boolean isUserManaged() {
- return false;
- }
-
- @Override
- public TaskData getTaskData(TaskRepository taskRepository, String taskId, IProgressMonitor monitor)
- throws CoreException {
- // ignore
- return null;
- }
-
- @Override
- public boolean hasChanged(TaskRepository taskRepository, ITask task, TaskData taskData) {
- // ignore
- return false;
- }
-
- @Override
- public void updateTaskFromTaskData(TaskRepository repository, ITask task, TaskData taskData) {
- // ignore
- }
-
- @Override
- public boolean hasLocalCompletionState(TaskRepository taskRepository, ITask task) {
- return true;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/LocalTask.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/LocalTask.java
deleted file mode 100644
index cf32a94d1..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/LocalTask.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core;
-
-
-/**
- * @author Rob Elves
- */
-public class LocalTask extends AbstractTask {
-
- public static final String SYNC_DATE_NOW = "now";
-
- public LocalTask(String taskId, String summary) {
- super(LocalRepositoryConnector.REPOSITORY_URL, taskId, summary);
- }
-
- @Override
- public boolean isLocal() {
- return true;
- }
-
- @Override
- public String getConnectorKind() {
- return LocalRepositoryConnector.CONNECTOR_KIND;
- }
-
- @Override
- public boolean isNotified() {
- return true;
- }
-
- @Override
- public String getLastReadTimeStamp() {
- return SYNC_DATE_NOW;
- }
-
- @Override
- public String getOwner() {
- return LocalRepositoryConnector.CONNECTOR_KIND;
- }
-
- @Override
- public String getTaskKey() {
- return null;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/LocalTaskListFactory.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/LocalTaskListFactory.java
deleted file mode 100644
index 0acf48978..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/LocalTaskListFactory.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core;
-
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractTaskListFactory;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.w3c.dom.Element;
-
-/**
- * @author Rob Elves
- */
-public class LocalTaskListFactory extends AbstractTaskListFactory {
-
- @Override
- public boolean canCreate(ITask task) {
- return task instanceof LocalTask;
- }
-
- @Override
- public AbstractTask createTask(String repositoryUrl, String taskId, String summary, Element element) {
- LocalTask task = new LocalTask(taskId, summary);
- return task;
- }
-
- @Override
- public String getTaskElementName() {
- return AbstractTaskListFactory.KEY_TASK;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/OfflineDataStore.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/OfflineDataStore.java
deleted file mode 100644
index 03b0ed4f2..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/OfflineDataStore.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core;
-
-import java.io.Serializable;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskAttribute;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-
-/**
- * This object holds RepositoryTaskData and is serialized to disk for offline storage.
- *
- * @author Rob Elves
- */
-@Deprecated
-class OfflineDataStore implements Serializable {
-
- private static final long serialVersionUID = -3909632088254980426L;
-
- /** Last new repository task taskId */
- private int lastNewRepositoryTaskId = 0;
-
- // Local changes to existing reports
- private final Map<String, Set<RepositoryTaskAttribute>> localEdits = new ConcurrentHashMap<String, Set<RepositoryTaskAttribute>>();
-
- /** Older version of Task Data */
- private final Map<String, RepositoryTaskData> oldTaskDataMap = new ConcurrentHashMap<String, RepositoryTaskData>();
-
- /** Newest version of the task data */
- private final Map<String, RepositoryTaskData> newTaskDataMap = new ConcurrentHashMap<String, RepositoryTaskData>();
-
- /** New unsubmitted repository task data */
- private final Map<String, RepositoryTaskData> unsubmittedTaskData = new ConcurrentHashMap<String, RepositoryTaskData>();
-
- public void setLastNewTaskId(int lastNumber) {
- lastNewRepositoryTaskId = new Integer(lastNumber);
- }
-
- public int getNextTaskId() {
- lastNewRepositoryTaskId++;
- return lastNewRepositoryTaskId;
- }
-
- public Map<String, RepositoryTaskData> getOldDataMap() {
- return oldTaskDataMap;
- }
-
- public Map<String, RepositoryTaskData> getNewDataMap() {
- return newTaskDataMap;
- }
-
- public Map<String, RepositoryTaskData> getUnsubmittedTaskData() {
- return unsubmittedTaskData;
- }
-
- public Map<String, Set<RepositoryTaskAttribute>> getLocalEdits() {
- return localEdits;
- }
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/Person.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/Person.java
deleted file mode 100644
index 92f80669d..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/Person.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core;
-
-
-/**
- * @author Rob Elves
- */
-public class Person extends AbstractTaskContainer {
-
- private final String connectorKind;
-
- private final String repositoryUrl;
-
- public Person(String email, String connectorKind, String repositoryUrl) {
- super(email);
- this.connectorKind = connectorKind;
- this.repositoryUrl = repositoryUrl;
- }
-
- public String getConnectorKind() {
- return connectorKind;
- }
-
- public String getRepositoryUrl() {
- return repositoryUrl;
- }
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/RepositoryExternalizationParticipant.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/RepositoryExternalizationParticipant.java
deleted file mode 100644
index f0bc39e81..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/RepositoryExternalizationParticipant.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core;
-
-import java.io.File;
-
-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.jobs.ISchedulingRule;
-import org.eclipse.mylyn.internal.tasks.core.externalization.AbstractExternalizationParticipant;
-import org.eclipse.mylyn.internal.tasks.core.externalization.ExternalizationManager;
-import org.eclipse.mylyn.tasks.core.IRepositoryListener;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-/**
- * @author Rob Elves
- * @since 3.0
- */
-public class RepositoryExternalizationParticipant extends AbstractExternalizationParticipant implements
- IRepositoryListener {
-
- private static final String DESCRIPTION = "Task Repositories";
-
- private final TaskRepositoryManager repositoryManager;
-
- private final ExternalizationManager externalizationManager;
-
- private boolean dirty = false;
-
- public RepositoryExternalizationParticipant(ExternalizationManager exManager, TaskRepositoryManager manager) {
- this.repositoryManager = manager;
- this.externalizationManager = exManager;
- this.repositoryManager.addListener(this);
- }
-
- @Override
- public String getDescription() {
- return DESCRIPTION;
- }
-
- @Override
- public ISchedulingRule getSchedulingRule() {
- return ITasksCoreConstants.TASKLIST_SCHEDULING_RULE;
- }
-
- @Override
- public boolean isDirty() {
- return dirty;
- }
-
- private void requestSave() {
- synchronized (RepositoryExternalizationParticipant.this) {
- dirty = true;
- }
- externalizationManager.requestSave();
- }
-
- @Override
- public void load(String rootPath, IProgressMonitor monitor) throws CoreException {
- File repositoriesFile = getFile(rootPath);
- try {
- repositoryManager.readRepositories(repositoriesFile.getAbsolutePath());
- } catch (Exception e) {
- if (restoreSnapshot(repositoriesFile)) {
- repositoryManager.readRepositories(repositoriesFile.getAbsolutePath());
- } else {
- throw new CoreException(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN,
- "Failed to load repositories", e));
- }
- }
- }
-
- @Override
- public void save(String rootPath, IProgressMonitor monitor) throws CoreException {
- File repositoriesFile = getFile(rootPath);
- repositoryManager.saveRepositories(repositoriesFile.getAbsolutePath());
- synchronized (RepositoryExternalizationParticipant.this) {
- dirty = false;
- }
- }
-
- @Override
- public String getFileName() {
- return TaskRepositoryManager.DEFAULT_REPOSITORIES_FILE;
- }
-
- public void repositoryUrlChanged(TaskRepository repository, String oldUrl) {
- requestSave();
- }
-
- public void repositoriesRead() {
- // ignore
- }
-
- public void repositoryAdded(TaskRepository repository) {
- requestSave();
- }
-
- public void repositoryRemoved(TaskRepository repository) {
- requestSave();
- }
-
- public void repositorySettingsChanged(TaskRepository repository) {
- requestSave();
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/RepositoryPerson.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/RepositoryPerson.java
deleted file mode 100644
index 8c4e2393d..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/RepositoryPerson.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core;
-
-import org.eclipse.mylyn.tasks.core.IRepositoryPerson;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-/**
- * @author Steffen Pingel
- */
-public class RepositoryPerson implements IRepositoryPerson {
-
- private String name;
-
- private final String personId;
-
- private final TaskRepository taskRepository;
-
- public RepositoryPerson(TaskRepository taskRepository, String personId) {
- this.taskRepository = taskRepository;
- this.personId = personId;
- }
-
- public String getConnectorKind() {
- return taskRepository.getConnectorKind();
- }
-
- public String getName() {
- return name;
- }
-
- public String getPersonId() {
- return personId;
- }
-
- public String getRepositoryUrl() {
- return taskRepository.getRepositoryUrl();
- }
-
- public TaskRepository getTaskRepository() {
- return taskRepository;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- @Override
- public String toString() {
- if (getName() == null) {
- return getPersonId();
- } else {
- return getName() + " <" + getPersonId() + ">";
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/RepositoryQuery.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/RepositoryQuery.java
deleted file mode 100644
index a14d8e3f5..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/RepositoryQuery.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.core;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
-
-/**
- * @author Mik Kersten
- * @author Eugene Kuleshov
- * @author Rob Elves
- */
-public class RepositoryQuery extends AbstractTaskContainer implements IRepositoryQuery {
-
- private final String connectorKind;
-
- protected String lastSynchronizedStamp = "<never>";
-
- protected String repositoryUrl;
-
- protected IStatus status;
-
- private boolean synchronizing;
-
- private String summary;
-
- private Map<String, String> attributes;
-
- @Deprecated
- public RepositoryQuery(String description) {
- this("", description);
- }
-
- public RepositoryQuery(String connectorKind, String handle) {
- super(handle);
- this.connectorKind = connectorKind;
- setSummary(handle);
- }
-
- /**
- * @since 3.0
- */
- public String getConnectorKind() {
- return connectorKind;
- }
-
- // TODO: should be a date
- public String getLastSynchronizedTimeStamp() {
- return lastSynchronizedStamp;
- }
-
- @Override
- public String getPriority() {
- if (super.isEmpty()) {
- return PriorityLevel.P1.toString();
- }
- String highestPriority = PriorityLevel.P5.toString();
- for (ITask hit : getChildren()) {
- if (highestPriority.compareTo(hit.getPriority()) > 0) {
- highestPriority = hit.getPriority();
- }
- }
- return highestPriority;
- }
-
- public String getRepositoryUrl() {
- return repositoryUrl;
- }
-
- public IStatus getStatus() {
- return status;
- }
-
- // TODO: move higher up and merge with AbstractTask
- public boolean isSynchronizing() {
- return synchronizing;
- }
-
- public void setLastSynchronizedStamp(String lastRefreshTimeStamp) {
- this.lastSynchronizedStamp = lastRefreshTimeStamp;
- }
-
- public void setRepositoryUrl(String newRepositoryUrl) {
- String url = getUrl();
- if (repositoryUrl != null && url != null && url.startsWith(repositoryUrl)) {
- // change corresponding part of the query URL
- setUrl(newRepositoryUrl + url.substring(repositoryUrl.length()));
- }
- this.repositoryUrl = newRepositoryUrl;
- }
-
- public void setStatus(IStatus status) {
- this.status = status;
- }
-
- public void setSynchronizing(boolean synchronizing) {
- this.synchronizing = synchronizing;
- }
-
- @Override
- public String getSummary() {
- return summary;
- }
-
- public void setSummary(String summary) {
- this.summary = summary;
- }
-
- public synchronized String getAttribute(String key) {
- return (attributes != null) ? attributes.get(key) : null;
- }
-
- public synchronized Map<String, String> getAttributes() {
- if (attributes != null) {
- return new HashMap<String, String>(attributes);
- } else {
- return Collections.emptyMap();
- }
- }
-
- public synchronized void setAttribute(String key, String value) {
- Assert.isNotNull(key);
- if (attributes == null) {
- attributes = new HashMap<String, String>();
- }
- attributes.put(key, value);
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/RepositoryTaskHandleUtil.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/RepositoryTaskHandleUtil.java
deleted file mode 100644
index 9006728a5..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/RepositoryTaskHandleUtil.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core;
-
-/**
- * @author Mik Kersten
- */
-public class RepositoryTaskHandleUtil {
-
- public static final String HANDLE_DELIM = "-";
-
- private static final String MISSING_REPOSITORY = "norepository";
-
- public static String getHandle(String repositoryUrl, String taskId) {
- if (!isValidTaskId(taskId)) {
- throw new RuntimeException("invalid handle for task, can not contain: " + HANDLE_DELIM + ", was: " + taskId);
- }
-
- if (repositoryUrl == null) {
- return MISSING_REPOSITORY + HANDLE_DELIM + taskId;
- } else {
- return repositoryUrl + HANDLE_DELIM + taskId;
- }
- }
-
- public static String getRepositoryUrl(String taskHandle) {
- int index = taskHandle.lastIndexOf(RepositoryTaskHandleUtil.HANDLE_DELIM);
- String url = null;
- if (index != -1) {
- url = taskHandle.substring(0, index);
- }
- return url;
- }
-
- public static String getTaskId(String taskHandle) {
- int index = taskHandle.lastIndexOf(HANDLE_DELIM);
- if (index != -1) {
- String id = taskHandle.substring(index + 1);
- return id;
- }
- return null;
- }
-
- public static boolean isValidTaskId(String taskId) {
- return !taskId.contains(HANDLE_DELIM);
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/RepositoryTemplateManager.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/RepositoryTemplateManager.java
deleted file mode 100644
index 13f53d18a..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/RepositoryTemplateManager.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core;
-
-import java.util.HashMap;
-import java.util.LinkedHashSet;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.mylyn.tasks.core.RepositoryTemplate;
-
-/**
- * @author Steffen Pingel
- */
-public class RepositoryTemplateManager {
-
- private Map<String, Set<RepositoryTemplate>> templateByConnectorKind;
-
- public synchronized void addTemplate(String connectorKind, RepositoryTemplate template) {
- getTemplates(connectorKind).add(template);
- }
-
- public synchronized Set<RepositoryTemplate> getTemplates(String connectorKind) {
- if (templateByConnectorKind == null) {
- templateByConnectorKind = new HashMap<String, Set<RepositoryTemplate>>();
- }
- Set<RepositoryTemplate> templates = templateByConnectorKind.get(connectorKind);
- if (templates == null) {
- templates = new LinkedHashSet<RepositoryTemplate>();
- templateByConnectorKind.put(connectorKind, templates);
- }
- return templates;
- }
-
- public synchronized void removeTemplate(String connectorKind, RepositoryTemplate template) {
- getTemplates(connectorKind).remove(template);
- }
-
- /**
- * Returns null if template not found.
- */
- public synchronized RepositoryTemplate getTemplate(String connectorKind, String label) {
- for (RepositoryTemplate template : getTemplates(connectorKind)) {
- if (template.label.equals(label)) {
- return template;
- }
- }
- return null;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/SaxRepositoriesContentHandler.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/SaxRepositoriesContentHandler.java
deleted file mode 100644
index 37e415f86..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/SaxRepositoriesContentHandler.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.core;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- * Adapted from SaxContextContentHandler
- *
- * @author Rob Elves
- */
-public class SaxRepositoriesContentHandler extends DefaultHandler {
-
- static final String ATTRIBUTE_INTERACTION_EVENT = "InteractionEvent";
-
- private final Set<TaskRepository> taskRepositories = new HashSet<TaskRepository>();
-
- @SuppressWarnings( { "deprecation", "restriction" })
- @Override
- public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
- try {
- if (localName.equals(TaskRepositoriesExternalizer.ELEMENT_TASK_REPOSITORY) && attributes != null) {
- String kind = org.eclipse.mylyn.internal.commons.core.XmlStringConverter.convertXmlToString(attributes.getValue(IRepositoryConstants.PROPERTY_CONNECTOR_KIND));
- String url = org.eclipse.mylyn.internal.commons.core.XmlStringConverter.convertXmlToString(attributes.getValue(IRepositoryConstants.PROPERTY_URL));
- if (kind != null && kind.length() > 0 && url != null && url.length() > 0) {
- TaskRepository repository = new TaskRepository(kind, url);
- for (int index = 0; index < attributes.getLength(); index++) {
- String key = org.eclipse.mylyn.internal.commons.core.XmlStringConverter.convertXmlToString(attributes.getLocalName(index));
- String value = org.eclipse.mylyn.internal.commons.core.XmlStringConverter.convertXmlToString(attributes.getValue(index));
- repository.setProperty(key, value);
- }
- taskRepositories.add(repository);
- }
- }
- } catch (Exception e) {
- e.printStackTrace();
- }
-
- }
-
- public Set<TaskRepository> getRepositories() {
- return taskRepositories;
- }
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/SaxRepositoriesWriter.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/SaxRepositoriesWriter.java
deleted file mode 100644
index 38a5c5590..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/SaxRepositoriesWriter.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.ArrayList;
-import java.util.Collection;
-
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.sax.SAXSource;
-import javax.xml.transform.stream.StreamResult;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.DTDHandler;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXNotRecognizedException;
-import org.xml.sax.SAXNotSupportedException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.helpers.AttributesImpl;
-
-/**
- * Adapted from SaxContextWriter
- *
- * @author Rob Elves
- */
-public class SaxRepositoriesWriter {
-
- private OutputStream outputStream;
-
- public void setOutputStream(OutputStream outputStream) {
- this.outputStream = outputStream;
- }
-
- public void writeRepositoriesToStream(Collection<TaskRepository> repositories) throws IOException {
- if (outputStream == null) {
- IOException ioe = new IOException("OutputStream not set");
- throw ioe;
- }
-
- try {
- Transformer transformer = TransformerFactory.newInstance().newTransformer();
- transformer.transform(
- new SAXSource(new RepositoriesWriter(), new TaskRepositoriesInputSource(repositories)),
- new StreamResult(outputStream));
- } catch (TransformerException e) {
- StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN, "Could not write repositories",
- e));
- throw new IOException(e.getMessage());
- }
-
- }
-
- private static class TaskRepositoriesInputSource extends InputSource {
- private final Collection<TaskRepository> repositories;
-
- public TaskRepositoriesInputSource(Collection<TaskRepository> repositories) {
- this.repositories = repositories;
- }
-
- public Collection<TaskRepository> getRepositories() {
- return this.repositories;
- }
-
- }
-
- private static class RepositoriesWriter implements XMLReader {
-
-// private static final String ELEMENT_TASK_REPOSITORIES = "TaskRepositories";
-//
-// public static final String ELEMENT_TASK_REPOSITORY = "TaskRepository";
-//
-// private static final String ATTRIBUTE_VERSION = "xmlVersion";
-
-// private static final String ATTRIBUTE_URL = "Url";
-//
-// private static final String ATTRIBUTE_KIND = "Kind";
-
- private ContentHandler handler;
-
- private ErrorHandler errorHandler;
-
- public boolean getFeature(String name) throws SAXNotRecognizedException, SAXNotSupportedException {
- return false;
- }
-
- public void setFeature(String name, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException {
-
- }
-
- public Object getProperty(String name) throws SAXNotRecognizedException, SAXNotSupportedException {
- return null;
- }
-
- public void setProperty(String name, Object value) throws SAXNotRecognizedException, SAXNotSupportedException {
- }
-
- public void setEntityResolver(EntityResolver resolver) {
- }
-
- public EntityResolver getEntityResolver() {
- return null;
- }
-
- public void setDTDHandler(DTDHandler handler) {
- }
-
- public DTDHandler getDTDHandler() {
- return null;
- }
-
- public void setContentHandler(ContentHandler handler) {
- this.handler = handler;
-
- }
-
- public ContentHandler getContentHandler() {
- return handler;
- }
-
- public void setErrorHandler(ErrorHandler handler) {
- this.errorHandler = handler;
-
- }
-
- public ErrorHandler getErrorHandler() {
- return errorHandler;
- }
-
- @SuppressWarnings( { "deprecation", "restriction" })
- public void parse(InputSource input) throws IOException, SAXException {
- if (!(input instanceof TaskRepositoriesInputSource)) {
- throw new SAXException("Can only parse writable input sources");
- }
-
- Collection<TaskRepository> repositories = ((TaskRepositoriesInputSource) input).getRepositories();
-
- handler.startDocument();
- AttributesImpl rootAttributes = new AttributesImpl();
- rootAttributes.addAttribute("", TaskRepositoriesExternalizer.ATTRIBUTE_VERSION,
- TaskRepositoriesExternalizer.ATTRIBUTE_VERSION, "", "1");
-
- handler.startElement("", TaskRepositoriesExternalizer.ELEMENT_TASK_REPOSITORIES,
- TaskRepositoriesExternalizer.ELEMENT_TASK_REPOSITORIES, rootAttributes);
-
- for (TaskRepository repository : new ArrayList<TaskRepository>(repositories)) {
-
- AttributesImpl ieAttributes = new AttributesImpl();
- for (String key : repository.getProperties().keySet()) {
- ieAttributes.addAttribute(
- "",
- key,
- key,
- "",
- org.eclipse.mylyn.internal.commons.core.XmlStringConverter.convertToXmlString(repository.getProperties()
- .get(key)));
- }
-
- handler.startElement("", TaskRepositoriesExternalizer.ELEMENT_TASK_REPOSITORY,
- TaskRepositoriesExternalizer.ELEMENT_TASK_REPOSITORY, ieAttributes);
- handler.endElement("", TaskRepositoriesExternalizer.ELEMENT_TASK_REPOSITORY,
- TaskRepositoriesExternalizer.ELEMENT_TASK_REPOSITORY);
- }
- handler.endElement("", TaskRepositoriesExternalizer.ELEMENT_TASK_REPOSITORIES,
- TaskRepositoriesExternalizer.ELEMENT_TASK_REPOSITORIES);
-
- handler.endDocument();
- }
-
- public void parse(String systemId) throws IOException, SAXException {
- throw new SAXException("Can only parse writable input sources");
- }
-
- }
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ScheduledTaskContainer.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ScheduledTaskContainer.java
deleted file mode 100644
index 702881a80..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ScheduledTaskContainer.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core;
-
-import java.util.Calendar;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-
-/**
- * @author Rob Elves
- * @author Mik Kersten
- */
-public class ScheduledTaskContainer extends AbstractTaskContainer {
-
- private final TaskActivityManager activityManager;
-
- private final String summary;
-
- private final DateRange range;
-
- public ScheduledTaskContainer(TaskActivityManager activityManager, DateRange range, String summary) {
- super(summary == null ? range.toString() : summary);
- this.activityManager = activityManager;
- this.range = range;
- if (summary == null) {
- this.summary = range.toString();
- } else {
- this.summary = summary;
- }
- }
-
- public ScheduledTaskContainer(TaskActivityManager taskActivityManager, DateRange day) {
- this(taskActivityManager, day, null);
- }
-
- public boolean isFuture() {
- return !isPresent() && range.getStartDate().after(Calendar.getInstance());
- }
-
- public boolean isPresent() {
- return range.getStartDate().before(Calendar.getInstance()) && range.getEndDate().after(Calendar.getInstance());
- }
-
- public boolean isWeekDay() {
- return TaskActivityUtil.getCurrentWeek().isCurrentWeekDay(range);
- }
-
- public boolean isToday() {
- return isPresent()
- && range.getStartDate().get(Calendar.DAY_OF_YEAR) == range.getEndDate().get(Calendar.DAY_OF_YEAR);
- }
-
-// public Collection<ITask> getChildren() {
-// Set<ITask> children = new HashSet<ITask>();
-// Calendar beginning = TaskActivityUtil.getCalendar();
-// beginning.setTimeInMillis(0);
-// if (isFloating() && !isFuture()) {
-// for (ITask task : activityManager.getScheduledTasks(rangebeginning, getEndDate())) {
-// if (task.internalIsFloatingScheduledDate()) {
-// children.add(task);
-// }
-// }
-// } else if (isPresent()) {
-// // add all due/overdue
-// Calendar end = TaskActivityUtil.getCalendar();
-// end.set(5000, 12, 1);
-// for (ITask task : activityManager.getDueTasks(beginning, getEndDate())) {
-// if (activityManager.isOwnedByUser(task)) {
-// children.add(task);
-// }
-// }
-//
-// // add all scheduled/overscheduled
-// for (ITask task : activityManager.getScheduledTasks(beginning, getEndDate())) {
-// if (!task.internalIsFloatingScheduledDate() && !task.isCompleted()) {
-// children.add(task);
-// }
-// }
-//
-// // if not scheduled or due in future, and is active, place in today bin
-// ITask activeTask = activityManager.getActiveTask();
-// if (activeTask != null && !children.contains(activeTask)) {
-// Set<ITask> futureScheduled = activityManager.getScheduledTasks(getStartDate(), end);
-// for (ITask task : activityManager.getDueTasks(getStartDate(), end)) {
-// if (activityManager.isOwnedByUser(task)) {
-// futureScheduled.add(task);
-// }
-// }
-// if (!futureScheduled.contains(activeTask)) {
-// children.add(activeTask);
-// }
-// }
-// } else if (isFuture()) {
-// children.addAll(activityManager.getScheduledTasks(getStartDate(), getEndDate()));
-// for (ITask task : activityManager.getDueTasks(getStartDate(), getEndDate())) {
-// if (activityManager.isOwnedByUser(task)) {
-// children.add(task);
-// }
-// }
-// } else {
-// children.addAll(activityManager.getActiveTasks(range.getStartDate(), range.getEndDate()));
-// }
-// return children;
-// }
-
- @Override
- public Collection<ITask> getChildren() {
-
- // TODO: Cache this information until the next modificaiton to pertinent data
-
- Set<ITask> children = new HashSet<ITask>();
-
- // All tasks scheduled for this date range
- for (ITask task : activityManager.getScheduledTasks(range)) {
- if (!task.isCompleted()) {
- children.add(task);
- }
- }
-
- // Add due tasks if not the This Week container
- if (!(range instanceof WeekDateRange && isPresent())) {
- for (ITask task : activityManager.getDueTasks(range.getStartDate(), range.getEndDate())) {
- if (activityManager.isOwnedByUser(task)) {
- children.add(task);
- }
- }
- }
-
- // All over due/scheduled tasks are present in the Today folder
- if (isToday()) {
- children.addAll(activityManager.getOverScheduledTasks());
- children.addAll(activityManager.getOverDueTasks());
-
- // if not scheduled or due in future, and is active, place in today bin
- ITask activeTask = activityManager.getActiveTask();
- if (activeTask != null && !children.contains(activeTask)) {
- children.add(activeTask);
- }
-
- }
-
- return children;
- }
-
- @Override
- public String getSummary() {
- if (summary != null) {
- return summary;
- }
- return range.toString();
- }
-
- @Override
- public String getHandleIdentifier() {
- return summary;
- }
-
- @Override
- public String getPriority() {
- return "";
- }
-
- @Override
- public String getUrl() {
- return "";
- }
-
- @Override
- public int compareTo(IRepositoryElement element) {
- if (element instanceof ScheduledTaskContainer) {
- ScheduledTaskContainer container = ((ScheduledTaskContainer) element);
- return range.compareTo(container.getDateRange());
- }
- return 0;
- }
-
- public DateRange getDateRange() {
- return range;
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public Object getAdapter(Class adapter) {
- return null;
- }
-
- public Calendar getEnd() {
- return range.getEndDate();
- }
-
- public Calendar getStart() {
- return range.getStartDate();
- }
-
- public boolean includes(Calendar pastWeeksTaskStart) {
- return range.includes(pastWeeksTaskStart);
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskActivationHistory.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskActivationHistory.java
deleted file mode 100644
index de6d78417..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskActivationHistory.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.core;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITaskContainer;
-
-/**
- * @author Ken Sueda (original prototype)
- * @author Wesley Coelho (Added persistent tasks)
- * @author Mik Kersten (hardening)
- * @author Rob Elves
- */
-public class TaskActivationHistory {
-
- private final List<AbstractTask> history = new ArrayList<AbstractTask>();
-
- private int currentIndex = -1;
-
- public void addTask(AbstractTask task) {
- history.remove(task);
- history.add(task);
- currentIndex = history.size() - 1;
- }
-
- public boolean containsTask(ITask task) {
- return history.contains(task);
- }
-
- public boolean removeTask(ITask task) {
- return history.remove(task);
- }
-
- public AbstractTask getPreviousTask() {
- boolean active = false;
- for (AbstractTask task : history) {
- if (task.isActive()) {
- active = true;
- break;
- }
- }
-
- if (hasPrevious()) {
- if (!active) {
- return history.get(currentIndex);
- }
-
- if (currentIndex < history.size() - 1 && ((currentIndex == 0 && !history.get(currentIndex).isActive()))) {
- return history.get(currentIndex);
- } else if (currentIndex > 0 && currentIndex < history.size()) {
- return history.get(--currentIndex);
- }
- }
- return null;
- }
-
- public List<AbstractTask> getPreviousTasks() {
- return Collections.unmodifiableList(new ArrayList<AbstractTask>(history));
- }
-
- /**
- * Returns task activation history for tasks present in <code>containers</code>
- */
- public List<AbstractTask> getPreviousTasks(Set<AbstractTaskContainer> containers) {
- if (containers.isEmpty()) {
- return getPreviousTasks();
- }
- Set<ITask> allWorkingSetTasks = new HashSet<ITask>();
- for (ITaskContainer container : containers) {
- allWorkingSetTasks.addAll(container.getChildren());
- }
- List<AbstractTask> allScopedTasks = new ArrayList<AbstractTask>(getPreviousTasks());
- for (Iterator<AbstractTask> it = allScopedTasks.iterator(); it.hasNext();) {
- AbstractTask task = it.next();
- if (!allWorkingSetTasks.contains(task)) {
- it.remove();
- }
- }
- return Collections.unmodifiableList(allScopedTasks);
- }
-
- public boolean hasPrevious() {
- return (currentIndex == 0 && !history.get(currentIndex).isActive()) || currentIndex > 0;
- }
-
- public void clear() {
- history.clear();
- currentIndex = -1;
- }
-
- public int indexOf(ITask task) {
- return history.indexOf(task);
-
- }
-
- public int getSize() {
- return history.size();
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskActivityManager.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskActivityManager.java
deleted file mode 100644
index d2b06124b..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskActivityManager.java
+++ /dev/null
@@ -1,796 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core;
-
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.SortedMap;
-import java.util.TreeMap;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.CopyOnWriteArraySet;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITaskActivationListener;
-import org.eclipse.mylyn.tasks.core.ITaskActivityListener;
-import org.eclipse.mylyn.tasks.core.ITaskActivityManager;
-
-/**
- * Manages task elapsed time, scheduling, due dates, and the date ranges
- *
- * @since 2.1
- * @author Rob Elves
- */
-public class TaskActivityManager implements ITaskActivityManager {
-
- // From ActivityContextManager (not visible)
- private static final char WORKINGSET_DELIMETER = '\u200B'; // unicode zero width space
-
- private final TaskActivationHistory taskActivationHistory = new TaskActivationHistory();
-
- private final List<ITaskActivityListener> activityListeners = new ArrayList<ITaskActivityListener>();
-
- private final List<ITaskActivationListener> activationListeners = new ArrayList<ITaskActivationListener>();
-
- private final Set<ITask> allScheduledTasks = new HashSet<ITask>();
-
- private final Set<ITask> allDueTasks = new HashSet<ITask>();
-
- private final SortedMap<DateRange, Set<ITask>> scheduledTasks = Collections.synchronizedSortedMap(new TreeMap<DateRange, Set<ITask>>());
-
- private final SortedMap<Calendar, Set<ITask>> dueTasks = Collections.synchronizedSortedMap(new TreeMap<Calendar, Set<ITask>>());
-
- // Map of Calendar (hour) to Tasks active during that hour
- private final SortedMap<Calendar, Set<AbstractTask>> activeTasks = Collections.synchronizedSortedMap(new TreeMap<Calendar, Set<AbstractTask>>());
-
- // For a given task maps Calendar Hour to duration of time spent (milliseconds) with task active
- private final Map<AbstractTask, SortedMap<Calendar, Long>> taskElapsedTimeMap = new ConcurrentHashMap<AbstractTask, SortedMap<Calendar, Long>>();
-
- private final SortedMap<Calendar, Long> noTaskActiveMap = Collections.synchronizedSortedMap(new TreeMap<Calendar, Long>());
-
- private final TaskList taskList;
-
- private final TaskRepositoryManager repositoryManager;
-
- private ITask activeTask;
-
- private int startDay = Calendar.MONDAY;
-
- private final ITaskListChangeListener TASKLIST_CHANGE_LISTENER = new ITaskListChangeListener() {
-
- public void containersChanged(Set<TaskContainerDelta> containers) {
- for (TaskContainerDelta taskContainerDelta : containers) {
- if (taskContainerDelta.getKind() == TaskContainerDelta.Kind.ROOT) {
- reloadPlanningData();
- }
- }
- }
- };
-
- public TaskActivityManager(TaskRepositoryManager repositoryManager, TaskList taskList) {
- this.taskList = taskList;
- this.repositoryManager = repositoryManager;
- this.taskList.addChangeListener(TASKLIST_CHANGE_LISTENER);
- clear();
- }
-
- /**
- * Get the user specified first day of the week (Calendar.SUNDAY | Calendar.MONDAY)
- *
- * @see http://en.wikipedia.org/wiki/Days_of_the_week#First_day_of_the_week
- */
- public int getWeekStartDay() {
- return startDay;
- }
-
- /**
- * Set the first day of the week (Calendar.SUNDAY | Calendar.MONDAY)
- *
- * @see http://en.wikipedia.org/wiki/Days_of_the_week#First_day_of_the_week
- *
- * @param startDay
- * (Calendar.SUNDAY | Calendar.MONDAY)
- */
- public void setWeekStartDay(int startDay) {
- TaskActivityUtil.setStartDay(startDay);
- this.startDay = startDay;
- for (ITaskActivityListener listener : activityListeners) {
- listener.activityReset();
- }
- }
-
- public void addActivityListener(ITaskActivityListener listener) {
- activityListeners.add(listener);
- }
-
- public void removeActivityListener(ITaskActivityListener listener) {
- activityListeners.remove(listener);
- }
-
- public void addActivationListener(ITaskActivationListener listener) {
- activationListeners.add(listener);
- }
-
- public void removeActivationListener(ITaskActivationListener listener) {
- activationListeners.remove(listener);
- }
-
- public void clear() {
- dueTasks.clear();
- allDueTasks.clear();
- scheduledTasks.clear();
- allScheduledTasks.clear();
- clearActivity();
- }
-
- public void clearActivity() {
- activeTasks.clear();
- taskActivationHistory.clear();
- taskElapsedTimeMap.clear();
- noTaskActiveMap.clear();
- }
-
- public void reloadPlanningData() {
- reloadScheduledData();
- for (ITaskActivityListener listener : activityListeners) {
- listener.activityReset();
- }
- }
-
- public void removeElapsedTime(ITask task, Date startDate, Date endDate) {
- Assert.isNotNull(task);
- Assert.isNotNull(startDate);
- Assert.isNotNull(endDate);
- // remove any time that has already accumulated in data structures
- SortedMap<Calendar, Long> activityMap = taskElapsedTimeMap.get(task);
- if (activityMap != null) {
- Calendar start = TaskActivityUtil.getCalendar();
- start.setTime(startDate);
- TaskActivityUtil.snapStartOfHour(start);
- Calendar end = TaskActivityUtil.getCalendar();
- end.setTime(endDate);
- TaskActivityUtil.snapEndOfHour(end);
- activityMap = activityMap.subMap(start, end);
- for (Calendar cal : new HashSet<Calendar>(activityMap.keySet())) {
- activityMap.remove(cal);
- }
- for (ITaskActivityListener listener : new ArrayList<ITaskActivityListener>(activityListeners)) {
- try {
- listener.elapsedTimeUpdated(task, getElapsedTime(task));
- } catch (Throwable t) {
- StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN,
- "Task activity listener failed: \"" + listener + "\"", t));
- }
- }
- }
-
- }
-
- public void addElapsedNoTaskActive(String handle, Date startDate, Date endDate) {
-
- // 3.0 TODO: break out working set ids and store time per working set
-// if (handle != null && !handle.equals("none")) {
-// String[] parts = handle.split("" + WORKINGSET_DELIMETER);
-// }
-
- long attentionSpan = endDate.getTime() - startDate.getTime();
-
- // Ignore any potential negative or zero times
- if (attentionSpan <= 0) {
- return;
- }
-
- // granularity to the hour
- Calendar hourOfDay = TaskActivityUtil.getCalendar();
- hourOfDay.setTime(startDate);
- snapToStartOfHour(hourOfDay);
- Long daysActivity = noTaskActiveMap.get(hourOfDay);
- if (daysActivity == null) {
- daysActivity = new Long(0);
- }
-
- daysActivity = daysActivity.longValue() + attentionSpan;
-
- noTaskActiveMap.put(hourOfDay, daysActivity);
- }
-
- public long getElapsedNoTaskActive(Calendar startDate, Calendar endDate) {
-
- Calendar startRange = snapToStartOfHour(getNewInstance(startDate));
-
- Calendar endRange = snapToEndOfHour(getNewInstance(endDate));
- long result = 0;
- Map<Calendar, Long> subMap = noTaskActiveMap.subMap(startRange, endRange);
- for (Long time : subMap.values()) {
- if (time != null && time > 0) {
- result += time.longValue();
- }
- }
- return result;
- }
-
- public void addElapsedTime(AbstractTask task, Date startDate, Date endDate) {
- Assert.isNotNull(task);
- Assert.isNotNull(startDate);
- Assert.isNotNull(endDate);
-
- SortedMap<Calendar, Long> activityMap = taskElapsedTimeMap.get(task);
- if (activityMap == null) {
- activityMap = Collections.synchronizedSortedMap(new TreeMap<Calendar, Long>());
- taskElapsedTimeMap.put(task, activityMap);
- }
-
- long attentionSpan = endDate.getTime() - startDate.getTime();
-
- // Ignore any potential negative or zero times
- if (attentionSpan <= 0) {
- return;
- }
-
- // granularity to the hour
- Calendar hourOfDay = TaskActivityUtil.getCalendar();
- hourOfDay.setTime(startDate);
- snapToStartOfHour(hourOfDay);
- Long daysActivity = activityMap.get(hourOfDay);
- if (daysActivity == null) {
- daysActivity = new Long(0);
- }
-
- daysActivity = daysActivity.longValue() + attentionSpan;
-
- activityMap.put(hourOfDay, daysActivity);
-
- Set<AbstractTask> active = activeTasks.get(hourOfDay);
- if (active == null) {
- active = new HashSet<AbstractTask>();
- activeTasks.put(hourOfDay, active);
- }
- active.add(task);
-
- long totalElapsed = getElapsedTime(activityMap);
-
- for (ITaskActivityListener listener : new ArrayList<ITaskActivityListener>(activityListeners)) {
- try {
- listener.elapsedTimeUpdated(task, totalElapsed);
- } catch (Throwable t) {
- StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN,
- "Task activity listener failed: \"" + listener + "\"", t));
- }
- }
- }
-
- private Calendar getNewInstance(Calendar cal) {
- Calendar newCal = TaskActivityUtil.getCalendar();
- newCal.setTimeInMillis(cal.getTimeInMillis());
- return newCal;
- }
-
- public void addScheduledTask(AbstractTask task) {
- DateRange range = task.getScheduledForDate();
- if (range != null) {
- Set<ITask> tasks = scheduledTasks.get(range);
- if (tasks == null) {
- tasks = new CopyOnWriteArraySet<ITask>();
- scheduledTasks.put(range, tasks);
- }
- tasks.add(task);
- allScheduledTasks.add(task);
- } else {
- removeScheduledTask(task);
- }
- }
-
- public void removeScheduledTask(ITask task) {
- synchronized (scheduledTasks) {
- for (Set<ITask> setOfTasks : scheduledTasks.values()) {
- setOfTasks.remove(task);
- }
- allScheduledTasks.remove(task);
- }
- }
-
- public Set<ITask> getScheduledTasks(DateRange range) {
- Set<ITask> resultingTasks = new HashSet<ITask>();
- synchronized (scheduledTasks) {
- Set<ITask> result = scheduledTasks.get(range);
- if (result != null && !result.isEmpty()) {
- resultingTasks.addAll(result);
- }
- }
- return resultingTasks;
- }
-
- public Set<ITask> getScheduledTasks(Calendar start, Calendar end) {
- Set<ITask> resultingTasks = new HashSet<ITask>();
- synchronized (scheduledTasks) {
- DateRange startRange = new DateRange(start);
- DateRange endRange = new DateRange(end);
- SortedMap<DateRange, Set<ITask>> result = scheduledTasks.subMap(startRange, endRange);
- for (Set<ITask> set : result.values()) {
- resultingTasks.addAll(set);
- }
- }
- return resultingTasks;
- }
-
- public void addDueTask(ITask task) {
- if (task.getDueDate() == null) {
- removeDueTask(task);
- return;
- }
- Calendar time = TaskActivityUtil.getCalendar();
- time.setTime(task.getDueDate());
- snapToStartOfHour(time);
- synchronized (dueTasks) {
- Set<ITask> tasks = dueTasks.get(time);
- if (tasks == null) {
- tasks = new CopyOnWriteArraySet<ITask>();
- dueTasks.put(time, tasks);
- }
- tasks.add(task);
- allDueTasks.add(task);
- }
-
- }
-
- public void removeDueTask(ITask task) {
- synchronized (dueTasks) {
- for (Set<ITask> setOfTasks : dueTasks.values()) {
- setOfTasks.remove(task);
- }
- allDueTasks.remove(task);
- }
- }
-
- public Set<ITask> getDueTasks(Calendar start, Calendar end) {
- Set<ITask> resultingTasks = new HashSet<ITask>();
- SortedMap<Calendar, Set<ITask>> result = dueTasks.subMap(start, end);
- synchronized (dueTasks) {
- for (Set<ITask> set : result.values()) {
- resultingTasks.addAll(set);
- }
- }
- return resultingTasks;
- }
-
- public void activateTask(ITask task) {
- deactivateActiveTask();
-
- // notify that a task is about to be activated
- for (ITaskActivationListener listener : new ArrayList<ITaskActivationListener>(activationListeners)) {
- try {
- listener.preTaskActivated(task);
- } catch (Throwable t) {
- StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN,
- "Task activity listener failed: " + listener, t));
- }
- }
-
- activeTask = task;
- ((AbstractTask) activeTask).setActive(true);
-
- for (ITaskActivationListener listener : new ArrayList<ITaskActivationListener>(activationListeners)) {
- try {
- listener.taskActivated(task);
- } catch (Throwable t) {
- StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN,
- "Task activity listener failed: " + listener, t));
- }
- }
- }
-
- public void deactivateActiveTask() {
- if (activeTask != null) {
- deactivateTask(activeTask);
- }
- }
-
- public void deactivateTask(ITask task) {
- if (task == null) {
- return;
- }
-
- if (task.isActive() && task == activeTask) {
- // notify that a task is about to be deactivated
- for (ITaskActivationListener listener : new ArrayList<ITaskActivationListener>(activationListeners)) {
- try {
- listener.preTaskDeactivated(task);
- } catch (Throwable t) {
- StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN,
- "Notification failed for: " + listener, t));
- }
- }
-
- ((AbstractTask) activeTask).setActive(false);
- activeTask = null;
-
- for (ITaskActivationListener listener : new ArrayList<ITaskActivationListener>(activationListeners)) {
- try {
- listener.taskDeactivated(task);
- } catch (Throwable t) {
- StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN,
- "Notification failed for: " + listener, t));
- }
- }
- }
- }
-
- /**
- * returns active tasks from start to end (exclusive) where both are snapped to the beginning of the hour
- */
- public Set<AbstractTask> getActiveTasks(Calendar start, Calendar end) {
- Set<AbstractTask> resultingTasks = new HashSet<AbstractTask>();
- Calendar startInternal = TaskActivityUtil.getCalendar();
- startInternal.setTimeInMillis(start.getTimeInMillis());
- TaskActivityUtil.snapStartOfHour(startInternal);
-
- Calendar endInternal = TaskActivityUtil.getCalendar();
- endInternal.setTimeInMillis(end.getTimeInMillis());
- TaskActivityUtil.snapStartOfHour(endInternal);
-
- synchronized (activeTasks) {
- SortedMap<Calendar, Set<AbstractTask>> result = activeTasks.subMap(startInternal, endInternal);
- for (Set<AbstractTask> set : result.values()) {
- resultingTasks.addAll(set);
- }
- }
- return resultingTasks;
- }
-
- /** total elapsed time based on activation history */
- public long getElapsedTime(ITask task) {
- SortedMap<Calendar, Long> activityMap = taskElapsedTimeMap.get(task);
- return getElapsedTime(activityMap);
- }
-
- private long getElapsedTime(SortedMap<Calendar, Long> activityMap) {
- // TODO: Keep a running total instead of recalculating all the time
- long result = 0;
- if (activityMap != null) {
- synchronized (activityMap) {
- for (Long time : activityMap.values()) {
- if (time != null) {
- result += time.longValue();
- }
- }
- }
- }
- return result;
- }
-
- /**
- * total elapsed time based on activation history passing null for the task will return all active time with no task
- * active
- */
- public long getElapsedTime(ITask task, Calendar start, Calendar end) {
-
- if (task == null) {
- return getElapsedNoTaskActive(start, end);
- }
-
- long result = 0;
-
- Calendar startRange = snapToStartOfHour(getNewInstance(start));
-
- Calendar endRange = snapToEndOfHour(getNewInstance(end));
-
- SortedMap<Calendar, Long> activityMap = taskElapsedTimeMap.get(task);
- if (activityMap != null) {
- synchronized (activityMap) {
- activityMap = activityMap.subMap(startRange, endRange);
- for (Long time : activityMap.values()) {
- if (time != null) {
- result += time.longValue();
- }
- }
- }
- }
- return result;
- }
-
- /** total elapsed time based on activation history */
- public long getElapsedTime(ITask task, DateRange range) {
- return getElapsedTime(task, range.getStartDate(), range.getEndDate());
- }
-
- // TODO: remove, copied from TaskListManager
- private Calendar snapToStartOfHour(Calendar cal) {
- cal.set(Calendar.MINUTE, 0);
- cal.set(Calendar.SECOND, 0);
- cal.set(Calendar.MILLISECOND, 0);
- cal.getTime();
- return cal;
- }
-
- // TODO: remove, copied from TaskListManager
- private Calendar snapToEndOfHour(Calendar cal) {
- cal.set(Calendar.MINUTE, cal.getMaximum(Calendar.MINUTE));
- cal.set(Calendar.SECOND, cal.getMaximum(Calendar.SECOND));
- cal.set(Calendar.MILLISECOND, cal.getMaximum(Calendar.MILLISECOND));
- cal.getTime();
- return cal;
- }
-
- public ITask getActiveTask() {
- return activeTask;
- }
-
- private void reloadScheduledData() {
- for (AbstractTask task : taskList.getAllTasks()) {
- if (task.getScheduledForDate() != null) {
- addScheduledTask(task);
- }
- if (task.getDueDate() != null) {
- addDueTask(task);
- }
- }
- }
-
- public void setScheduledFor(AbstractTask task, DateRange reminderDate) {
- Assert.isNotNull(task);
- if (reminderDate != null && !reminderDate.equals(task.getScheduledForDate())) {
- (task).setReminded(false);
- }
-
- (task).setScheduledForDate(reminderDate);
- if (reminderDate == null) {
- removeScheduledTask(task);
- } else {
- removeScheduledTask(task);
- addScheduledTask(task);
- }
- taskList.notifyElementChanged(task);
- }
-
- public void setDueDate(ITask task, Date dueDate) {
- task.setDueDate(dueDate);
- if (dueDate == null) {
- removeDueTask(task);
- } else {
- removeDueTask(task);
- addDueTask(task);
- }
- taskList.notifyElementChanged(task);
- }
-
- /**
- * @return if a repository task, will only return true if the user is a
- */
- public boolean isCompletedToday(ITask task) {
- if (task != null) {
- boolean isOwnedByUser = repositoryManager.isOwnedByUser(task);
- if (!isOwnedByUser) {
- return false;
- } else {
-
- Date completionDate = task.getCompletionDate();
- if (completionDate != null) {
- Calendar completedTime = TaskActivityUtil.getCalendar();
- completedTime.setTime(completionDate);
- return TaskActivityUtil.isToday(completedTime);
- }
- }
- }
- return false;
- }
-
- public boolean isPastReminder(AbstractTask task) {
- if (task == null || task.isCompleted() || task.getScheduledForDate() == null) {
- return false;
- } else {
- return isPastReminder(task.getScheduledForDate(), task.isCompleted());
- }
- }
-
- public boolean isPastReminder(DateRange date, boolean isComplete) {
- if (date == null || isComplete) {
- return false;
- } else {
- if (date.getEndDate().compareTo(TaskActivityUtil.getCalendar()) < 0) {
- return true;
- } else {
- return false;
- }
- }
- }
-
- public boolean isDueToday(ITask task) {
- if (repositoryManager.isOwnedByUser(task) && !task.isCompleted() && task.getDueDate() != null) {
- Calendar cal = TaskActivityUtil.getCalendar();
- cal.setTimeInMillis(task.getDueDate().getTime());
- if (TaskActivityUtil.isToday(cal)) {
- return true;
- }
- }
- return false;
- }
-
- public boolean isOverdue(ITask task) {
- return (!task.isCompleted() && task.getDueDate() != null && new Date().after(task.getDueDate()))
- && repositoryManager.isOwnedByUser(task);
- }
-
- public boolean isOwnedByUser(ITask task) {
- return repositoryManager.isOwnedByUser(task);
- }
-
- public boolean isActiveThisWeek(ITask task) {
- Calendar calStart = TaskActivityUtil.getCalendar();
- TaskActivityUtil.snapStartOfWorkWeek(calStart);
- Calendar calEnd = TaskActivityUtil.getCalendar();
- TaskActivityUtil.snapEndOfWeek(calEnd);
- return getElapsedTime(task, calStart, calEnd) > 0;
- }
-
- public boolean isScheduledForToday(AbstractTask task) {
- if (task != null && task.getScheduledForDate() != null) {
- return isScheduledForToday(task.getScheduledForDate());
- }
- return false;
- }
-
- public boolean isScheduledForToday(DateRange range) {
- if (range != null) {
- return TaskActivityUtil.getCurrentWeek().getToday().compareTo(range) == 0;
- }
- return false;
- }
-
- public boolean isScheduledAfterThisWeek(AbstractTask task) {
- if (task != null && task.getScheduledForDate() != null) {
- return isScheduledAfterThisWeek(task.getScheduledForDate());
- }
-
- return false;
- }
-
- public boolean isScheduledAfterThisWeek(DateRange range) {
- if (range != null) {
- return TaskActivityUtil.isAfterCurrentWeek(range.getStartDate());
- }
- return false;
- }
-
- public boolean isScheduledForFuture(AbstractTask task) {
- if (task != null && task.getScheduledForDate() != null) {
- return isScheduledForFuture(task.getScheduledForDate());
- }
- return false;
- }
-
- public boolean isScheduledForFuture(DateRange reminder) {
- if (reminder != null) {
- return TaskActivityUtil.isFuture(reminder.getStartDate());
- }
- return false;
- }
-
- public boolean isScheduledForThisWeek(AbstractTask task) {
- boolean result = false;
- if (task != null && task.getScheduledForDate() != null) {
- result = isScheduledForThisWeek(task.getScheduledForDate());
- }
- return result;
- }
-
- public boolean isScheduledForThisWeek(DateRange range) {
- if (range != null) {
-
- return TaskActivityUtil.getCurrentWeek().isCurrentWeekDay(range)
- || TaskActivityUtil.getCurrentWeek().compareTo(range) == 0;
- }
- return false;
- }
-
- public boolean isScheduledForNextWeek(AbstractTask task) {
- if (task != null) {
- DateRange range = task.getScheduledForDate();
- if (range != null) {
- return TaskActivityUtil.isNextWeek(range.getStartDate());
- }
- }
- return false;
- }
-
- public void scheduleNewTask(AbstractTask newTask) {
- newTask.setCreationDate(new Date());
- // TODO: set based on preference? see bug#158461
- setScheduledFor(newTask, TaskActivityUtil.getCurrentWeek());
- }
-
- public boolean isDueThisWeek(ITask task) {
- Date due = task.getDueDate();
- if (due != null && repositoryManager.isOwnedByUser(task)) {
- Calendar cal = TaskActivityUtil.getCalendar();
- cal.setTime(due);
- return TaskActivityUtil.isThisWeek(cal);
- }
- return false;
- }
-
- public Set<ITask> getScheduledForThisWeek() {
- return getScheduledTasks(TaskActivityUtil.getCurrentWeek());
- }
-
- public TaskActivationHistory getTaskActivationHistory() {
- return taskActivationHistory;
- }
-
- public Set<ITask> getAllScheduledTasks() {
- return new HashSet<ITask>(allScheduledTasks);
- }
-
- public Set<AbstractTask> getAllScheduledTasksInternal() {
- Set<AbstractTask> tasks = new HashSet<AbstractTask>();
- synchronized (scheduledTasks) {
- for (ITask task : allScheduledTasks) {
- if (task instanceof AbstractTask) {
- tasks.add((AbstractTask) task);
- }
- }
- }
- return tasks;
- }
-
- public Set<ITask> getAllDueTasks() {
- return new HashSet<ITask>(allDueTasks);
- }
-
- public Set<ITask> getOverScheduledTasks() {
- Set<ITask> children = new HashSet<ITask>();
- Calendar start = TaskActivityUtil.getCalendar();
- start.setTimeInMillis(0);
- Calendar end = TaskActivityUtil.getCalendar();
- TaskActivityUtil.snapStartOfDay(end);
- for (ITask task : getScheduledTasks(start, end)) {
- if (!task.isCompleted()) {
- children.add(task);
- }
- }
- return children;
-
- }
-
- public Collection<? extends ITask> getOverDueTasks() {
- Set<ITask> children = new HashSet<ITask>();
- Calendar start = TaskActivityUtil.getCalendar();
- start.setTimeInMillis(0);
- Calendar end = TaskActivityUtil.getCalendar();
- TaskActivityUtil.snapStartOfHour(end);
- for (ITask task : getDueTasks(start, end)) {
- if (!task.isCompleted() && repositoryManager.isOwnedByUser(task)) {
- children.add(task);
- }
- }
- return children;
- }
-
- public Collection<AbstractTask> getUnscheduled() {
- Set<AbstractTask> allTasks = new HashSet<AbstractTask>(taskList.getAllTasks());
- for (ITask abstractTask : getAllScheduledTasks()) {
- allTasks.remove(abstractTask);
- }
- return allTasks;
- }
-
- public boolean isActive(ITask task) {
- Assert.isNotNull(task);
- return task.equals(getActiveTask());
- }
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskActivityUtil.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskActivityUtil.java
deleted file mode 100644
index f3208cd02..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskActivityUtil.java
+++ /dev/null
@@ -1,257 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core;
-
-import java.util.Calendar;
-import java.util.Date;
-
-/**
- * @author Rob Elves
- */
-public class TaskActivityUtil {
-
- private static int startDay = Calendar.MONDAY;
-
- private static int endHour = 17;
-
- public static Calendar snapStartOfDay(Calendar cal) {
- cal.set(Calendar.HOUR_OF_DAY, 0);
- cal.set(Calendar.MINUTE, 0);
- cal.set(Calendar.SECOND, 0);
- cal.set(Calendar.MILLISECOND, 0);
- cal.getTime();
- return cal;
- }
-
- public static Calendar snapStartOfHour(Calendar cal) {
- cal.set(Calendar.MINUTE, 0);
- cal.set(Calendar.SECOND, 0);
- cal.set(Calendar.MILLISECOND, 0);
- cal.getTime();
- return cal;
- }
-
- public static Calendar snapEndOfHour(Calendar cal) {
- cal.set(Calendar.MINUTE, cal.getActualMaximum(Calendar.MINUTE));
- cal.set(Calendar.SECOND, cal.getActualMaximum(Calendar.SECOND));
- cal.set(Calendar.MILLISECOND, cal.getActualMaximum(Calendar.MILLISECOND));
- cal.getTime();
- return cal;
- }
-
- public static Calendar snapEndOfDay(Calendar cal) {
- cal.set(Calendar.HOUR_OF_DAY, cal.getActualMaximum(Calendar.HOUR_OF_DAY));
- cal.set(Calendar.MINUTE, cal.getActualMaximum(Calendar.MINUTE));
- cal.set(Calendar.SECOND, cal.getActualMaximum(Calendar.SECOND));
- cal.set(Calendar.MILLISECOND, cal.getActualMaximum(Calendar.MILLISECOND));
- cal.getTime();
- return cal;
- }
-
- public static void snapToNextDay(Calendar cal) {
- cal.add(Calendar.DAY_OF_MONTH, 1);
- TaskActivityUtil.snapStartOfDay(cal);
- }
-
- public static Calendar snapNextDay(Calendar cal) {
- cal.add(Calendar.DAY_OF_MONTH, 1);
- snapStartOfDay(cal);
- return cal;
- }
-
- public static Calendar snapStartOfWorkWeek(Calendar cal) {
- cal.set(Calendar.DAY_OF_WEEK, startDay);
- snapStartOfDay(cal);
- return cal;
- }
-
- public static Calendar snapEndOfWeek(Calendar cal) {
- if (cal.getFirstDayOfWeek() == Calendar.MONDAY) {
- cal.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY);
- } else {
- cal.set(Calendar.DAY_OF_WEEK, Calendar.SATURDAY);
- }
- snapEndOfDay(cal);
- return cal;
- }
-
- public static Calendar snapEndOfNextWeek(Calendar cal) {
- if (cal.getFirstDayOfWeek() == Calendar.MONDAY) {
- cal.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY);
- } else {
- cal.set(Calendar.DAY_OF_WEEK, Calendar.SATURDAY);
- }
- snapEndOfWeek(cal);
- cal.add(Calendar.WEEK_OF_MONTH, 1);
- return cal;
- }
-
- public static Calendar snapForwardNumDays(Calendar calendar, int days) {
- calendar.add(Calendar.DAY_OF_MONTH, days);
- calendar.set(Calendar.HOUR_OF_DAY, endHour);
- calendar.set(Calendar.MINUTE, 0);
- calendar.set(Calendar.SECOND, 0);
- calendar.set(Calendar.MILLISECOND, 0);
- return calendar;
- }
-
- public static Calendar snapEndOfWorkDay(Calendar calendar) {
- calendar.set(Calendar.HOUR_OF_DAY, endHour);
- calendar.set(Calendar.MINUTE, 0);
- calendar.set(Calendar.SECOND, 0);
- calendar.set(Calendar.MILLISECOND, 0);
- return calendar;
- }
-
- public static Calendar snapNextWorkWeek(Calendar calendar) {
- calendar.add(Calendar.WEEK_OF_MONTH, 1);
- snapStartOfWorkWeek(calendar);
- return calendar;
- }
-
- public static boolean isAfterCurrentWeek(Calendar time) {
- if (time != null) {
- Calendar cal = getCalendar();
- return time.compareTo(snapNextWorkWeek(cal)) > -1;
- }
- return false;
- }
-
- /**
- * @return true if time is in or past Future bin
- */
- public static boolean isFuture(Calendar time) {
- if (time != null) {
- Calendar cal = getCalendar();
- cal.add(Calendar.WEEK_OF_MONTH, 2);
- snapStartOfWorkWeek(cal);
- return time.compareTo(cal) > -1;
- }
- return false;
- }
-
- public static boolean isThisWeek(Calendar time) {
- if (time != null) {
- Calendar weekStart = getCalendar();
- snapStartOfWorkWeek(weekStart);
- Calendar weekEnd = getCalendar();
- snapEndOfWeek(weekEnd);
- return (time.compareTo(weekStart) >= 0 && time.compareTo(weekEnd) <= 0);
- }
- return false;
- }
-
- public static boolean isNextWeek(Calendar time) {
- if (time != null) {
- Calendar weekStart = getCalendar();
- snapNextWorkWeek(weekStart);
- Calendar weekEnd = getCalendar();
- snapNextWorkWeek(weekEnd);
- snapEndOfWeek(weekEnd);
- return (time.compareTo(weekStart) >= 0 && time.compareTo(weekEnd) <= 0);
- }
- return false;
- }
-
- public static boolean isToday(Calendar time) {
- if (time != null) {
- Calendar dayStart = getCalendar();
- snapStartOfDay(dayStart);
- Calendar midnight = getCalendar();
- snapEndOfDay(midnight);
- return (time.compareTo(dayStart) >= 0 && time.compareTo(midnight) <= 0);
- }
- return false;
- }
-
- public static boolean isToday(DateRange time) {
- if (time != null) {
- return getCurrentWeek().getToday().compareTo(time) == 0;
- }
- return false;
- }
-
- public static Calendar getCalendar() {
- Calendar cal = Calendar.getInstance();
- cal.setFirstDayOfWeek(startDay);
- cal.getTime();
- return cal;
- }
-
- public static Calendar getStartOfCurrentWeek() {
- Calendar cal = getCalendar();
- return snapStartOfWorkWeek(cal);
- }
-
- public static Calendar getStartOfNextWeek() {
- Calendar cal = getCalendar();
- snapNextWorkWeek(cal);
- return snapStartOfWorkWeek(cal);
- }
-
- public static Calendar getEndOfCurrentWeek() {
- Calendar cal = getCalendar();
- return snapEndOfWeek(cal);
- }
-
- public static boolean isBetween(Calendar time, Calendar start, Calendar end) {
- return (time.compareTo(start) >= 0 && time.compareTo(end) <= 0);
- }
-
- protected static void setStartDay(int startDay) {
- TaskActivityUtil.startDay = startDay;
- }
-
- protected static int getStartDay() {
- return TaskActivityUtil.startDay;
- }
-
- public static void setEndHour(int endHour) {
- TaskActivityUtil.endHour = endHour;
- }
-
- public static WeekDateRange getCurrentWeek() {
- Calendar weekStart = getCalendar();
- snapStartOfWorkWeek(weekStart);
- Calendar weekEnd = getCalendar();
- snapEndOfWeek(weekEnd);
- return new WeekDateRange(weekStart, weekEnd);
- }
-
- public static WeekDateRange getNextWeek() {
- Calendar weekStart = getCalendar();
- snapNextWorkWeek(weekStart);
- Calendar weekEnd = getCalendar();
- weekEnd.setTimeInMillis(weekStart.getTimeInMillis());
- snapEndOfWeek(weekEnd);
- return new WeekDateRange(weekStart, weekEnd);
- }
-
- public static DateRange getWeekOf(Date date) {
- Calendar weekStart = getCalendar();
- weekStart.setTime(date);
- Calendar weekEnd = getCalendar();
- weekEnd.setTime(date);
-
- snapStartOfWorkWeek(weekStart);
- snapEndOfWeek(weekEnd);
- return new WeekDateRange(weekStart, weekEnd);
- }
-
- public static DateRange getDayOf(Date date) {
- Calendar dayStart = getCalendar();
- dayStart.setTime(date);
- Calendar dayEnd = getCalendar();
- dayEnd.setTime(date);
-
- snapStartOfDay(dayStart);
- snapEndOfDay(dayEnd);
- return new DateRange(dayStart, dayEnd);
- }
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskAttachment.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskAttachment.java
deleted file mode 100644
index 61257e177..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskAttachment.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core;
-
-import java.util.Date;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.mylyn.tasks.core.IRepositoryPerson;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITaskAttachment;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-
-/**
- * @author Steffen Pingel
- */
-public class TaskAttachment implements ITaskAttachment {
-
- private IRepositoryPerson author;
-
- private String comment;
-
- private String contentType;
-
- private Date creationDate;
-
- private boolean deprecated;
-
- private String description;
-
- private String fileName;
-
- private long length;
-
- private boolean patch;
-
- private final ITask task;
-
- private final TaskAttribute taskAttribute;
-
- private final TaskRepository taskRepository;
-
- private String url;
-
- public TaskAttachment(TaskRepository taskRepository, ITask task, TaskAttribute taskAttribute) {
- Assert.isNotNull(taskRepository);
- Assert.isNotNull(task);
- Assert.isNotNull(taskAttribute);
- this.taskRepository = taskRepository;
- this.task = task;
- this.taskAttribute = taskAttribute;
- }
-
- public IRepositoryPerson getAuthor() {
- return author;
- }
-
- public String getComment() {
- return comment;
- }
-
- public String getConnectorKind() {
- return taskRepository.getConnectorKind();
- }
-
- public String getContentType() {
- return contentType;
- }
-
- public Date getCreationDate() {
- return creationDate;
- }
-
- public String getDescription() {
- return description;
- }
-
- public String getFileName() {
- return fileName;
- }
-
- public long getLength() {
- return length;
- }
-
- public String getRepositoryUrl() {
- return taskRepository.getRepositoryUrl();
- }
-
- public ITask getTask() {
- return task;
- }
-
- public TaskAttribute getTaskAttribute() {
- return taskAttribute;
- }
-
- public TaskRepository getTaskRepository() {
- return taskRepository;
- }
-
- public String getUrl() {
- return url;
- }
-
- public boolean isDeprecated() {
- return deprecated;
- }
-
- public boolean isPatch() {
- return patch;
- }
-
- public void setAuthor(IRepositoryPerson author) {
- this.author = author;
- }
-
- public void setComment(String comment) {
- this.comment = comment;
- }
-
- public void setContentType(String contentType) {
- this.contentType = contentType;
- }
-
- public void setCreationDate(Date creationDate) {
- this.creationDate = creationDate;
- }
-
- public void setDeprecated(boolean deprecated) {
- this.deprecated = deprecated;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public void setFileName(String fileName) {
- this.fileName = fileName;
- }
-
- public void setLength(long length) {
- this.length = length;
- }
-
- public void setPatch(boolean patch) {
- this.patch = patch;
- }
-
- public void setUrl(String url) {
- this.url = url;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskCategory.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskCategory.java
deleted file mode 100644
index 026b88abe..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskCategory.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-/*
- * Created on Dec 26, 2004
- */
-package org.eclipse.mylyn.internal.tasks.core;
-
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITaskContainer;
-
-/**
- * @author Mik Kersten
- */
-public final class TaskCategory extends AbstractTaskCategory {
-
- private String summary;
-
- public TaskCategory(String handleAndDescription) {
- super(handleAndDescription);
- setSummary(handleAndDescription);
- }
-
- /**
- * null if no parent category
- */
- public static AbstractTaskCategory getParentTaskCategory(ITask task) {
- AbstractTaskCategory category = null;
- if (task != null) {
- for (ITaskContainer container : ((AbstractTask) task).getParentContainers()) {
- if (container instanceof AbstractTaskCategory) {
- category = (AbstractTaskCategory) container;
- }
- }
- }
- return category;
- }
-
- @Override
- public String getSummary() {
- return summary;
- }
-
- public void setSummary(String summary) {
- this.summary = summary;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskComment.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskComment.java
deleted file mode 100644
index 322c47be8..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskComment.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core;
-
-import java.util.Date;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.mylyn.tasks.core.IRepositoryPerson;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITaskComment;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-
-/**
- * A comment posted by a user on a task.
- *
- * @author Steffen Pingel
- */
-public class TaskComment implements ITaskComment {
-
- private IRepositoryPerson author;
-
- private Date creationDate;
-
- private int number;
-
- private final ITask task;
-
- private final TaskAttribute taskAttribute;
-
- private final TaskRepository taskRepository;
-
- private String text;
-
- private String url;
-
- public TaskComment(TaskRepository taskRepository, ITask task, TaskAttribute taskAttribute) {
- Assert.isNotNull(taskRepository);
- Assert.isNotNull(task);
- Assert.isNotNull(taskAttribute);
- this.taskRepository = taskRepository;
- this.task = task;
- this.taskAttribute = taskAttribute;
- }
-
- public IRepositoryPerson getAuthor() {
- return author;
- }
-
- public String getConnectorKind() {
- return taskRepository.getConnectorKind();
- }
-
- public Date getCreationDate() {
- return creationDate;
- }
-
- public int getNumber() {
- return number;
- }
-
- public String getRepositoryUrl() {
- return taskRepository.getRepositoryUrl();
- }
-
- public ITask getTask() {
- return task;
- }
-
- public TaskAttribute getTaskAttribute() {
- return taskAttribute;
- }
-
- public TaskRepository getTaskRepository() {
- return taskRepository;
- }
-
- public String getText() {
- return text;
- }
-
- public String getUrl() {
- return url;
- }
-
- public void setAuthor(IRepositoryPerson author) {
- this.author = author;
- }
-
- public void setCreationDate(Date creationDate) {
- this.creationDate = creationDate;
- }
-
- public void setNumber(int number) {
- this.number = number;
- }
-
- public void setText(String text) {
- this.text = text;
- }
-
- public void setUrl(String url) {
- this.url = url;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskContainerDelta.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskContainerDelta.java
deleted file mode 100644
index 15030f604..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskContainerDelta.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core;
-
-import org.eclipse.mylyn.tasks.core.ITaskContainer;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-
-/**
- * Immutable. Defines changes to Task List elements.
- *
- * @author Mik Kersten
- * @since 2.0
- */
-public final class TaskContainerDelta {
-
- public enum Kind {
- /**
- * One container (source) added to another (target)
- */
- ADDED,
-
- /**
- * One container (source) removed from another (target)
- */
- REMOVED,
-
- /**
- * The internal state of the container (target) has changed, e.g. attributes, summary, priority, etc
- */
- CONTENT,
-
- /**
- * The root of the data structure has changed.
- */
- ROOT
- }
-
- private final ITaskContainer parent;
-
- private final IRepositoryElement element;
-
- private final Kind kind;
-
- private boolean isTransient;
-
- /**
- * @param element
- * - object being moved/added/removed, source assumed to be root
- * @since 3.0
- */
- public TaskContainerDelta(IRepositoryElement element, Kind kind) {
- this.element = element;
- this.parent = null;
- this.kind = kind;
- }
-
- /**
- * @since 3.0
- */
- public TaskContainerDelta(IRepositoryElement element, ITaskContainer parent, Kind kind) {
- this.element = element;
- this.parent = parent;
- this.kind = kind;
- }
-
- /**
- * The <code>target</code> is the container that the <code>source</code> is being moved from/to
- *
- * @since 3.0
- */
- public ITaskContainer getParent() {
- return parent;
- }
-
- /**
- * The element being ADDED or REMOVED wrt the <code>target</code>
- *
- * @since 3.0
- */
- public IRepositoryElement getElement() {
- return element;
- }
-
- public Kind getKind() {
- return kind;
- }
-
- /**
- * @since 3.0
- */
- public void setTransient(boolean isTransient) {
- this.isTransient = isTransient;
- }
-
- /**
- * @since 3.0
- */
- public boolean isTransient() {
- return isTransient;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskDataState.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskDataState.java
deleted file mode 100644
index 5b2bfa882..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskDataState.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core;
-
-import java.util.HashSet;
-import java.util.Set;
-import java.util.concurrent.CopyOnWriteArraySet;
-
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskAttribute;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-
-/**
- * @author Rob Elves
- */
-public class TaskDataState {
-
- private RepositoryTaskData newTaskData;
-
- private RepositoryTaskData oldTaskData;
-
- private Set<RepositoryTaskAttribute> edits = new CopyOnWriteArraySet<RepositoryTaskAttribute>();
-
- private final String url;
-
- private final String id;
-
- public TaskDataState(String repositoryUrl, String id) {
- this.url = repositoryUrl;
- this.id = id;
- }
-
- public RepositoryTaskData getNewTaskData() {
- return newTaskData;
- }
-
- public void setNewTaskData(RepositoryTaskData newTaskData) {
- this.newTaskData = newTaskData;
- }
-
- public RepositoryTaskData getOldTaskData() {
- return oldTaskData;
- }
-
- public void setOldTaskData(RepositoryTaskData oldTaskData) {
- this.oldTaskData = oldTaskData;
- }
-
- public Set<RepositoryTaskAttribute> getEdits() {
- return edits;
- }
-
- public void setEdits(Set<RepositoryTaskAttribute> edits) {
- if (edits == null) {
- edits = new HashSet<RepositoryTaskAttribute>();
- } else {
- this.edits = edits;
- }
- }
-
- public void discardEdits() {
- if (edits != null) {
- this.edits.clear();
- } else {
- setEdits(null);
- }
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((id == null) ? 0 : id.hashCode());
- result = prime * result + ((url == null) ? 0 : url.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;
- }
- final TaskDataState other = (TaskDataState) obj;
- if (id == null) {
- if (other.id != null) {
- return false;
- }
- } else if (!id.equals(other.id)) {
- return false;
- }
- if (url == null) {
- if (other.url != null) {
- return false;
- }
- } else if (!url.equals(other.url)) {
- return false;
- }
- return true;
- }
-
- public String getUrl() {
- return url;
- }
-
- public String getId() {
- return id;
- }
-
-// void discardEdits();
-// Set<RepositoryTaskAttribute> getChanged();
-// isStateModified();
-// hasIncomingChanges();
-// hasChanged(RepositoryTaskAttribute attribute);
-// public init(); // Perform constructor specific initialization (i.e. calc changed attributes etc)
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskDataStorageManager.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskDataStorageManager.java
deleted file mode 100644
index 128af1568..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskDataStorageManager.java
+++ /dev/null
@@ -1,354 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.core;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.util.Collections;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractAttributeFactory;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractLegacyRepositoryConnector;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskAttribute;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.IRepositoryManager;
-
-/**
- * Manager for persisting RepositoryTaskData offline
- *
- * @author Rob Elves
- */
-public class TaskDataStorageManager {
-
- private final IRepositoryManager taskRepositoryManager;
-
- private final ITaskDataStorage storage;
-
- private int nextNewId = 1;
-
- public TaskDataStorageManager(IRepositoryManager taskRepositoryManager, ITaskDataStorage storage) {
- this.taskRepositoryManager = taskRepositoryManager;
- this.storage = storage;
- }
-
- /**
- * Add a RepositoryTaskData to the offline reports file.
- */
- public void setNewTaskData(RepositoryTaskData data) {
- if (data == null || data.getRepositoryUrl() == null || data.getTaskId() == null) {
- return;
- }
-
- TaskDataState state = retrieveState(data);
- if (state != null) {
- state.setNewTaskData(data);
- } else {
- state = new TaskDataState(data.getRepositoryUrl(), data.getTaskId());
- state.setNewTaskData(data);
- }
- saveState(state);
- }
-
- /**
- * @since 2.3
- */
- public void setNewTaskData(String repositoryUrl, String taskId, RepositoryTaskData data) {
- TaskDataState state = retrieveState(repositoryUrl, taskId);
- if (state != null) {
- state.setNewTaskData(data);
- } else {
- state = new TaskDataState(repositoryUrl, taskId);
- state.setNewTaskData(data);
- }
- saveState(state);
- }
-
- public void setOldTaskData(RepositoryTaskData data) {
- if (data == null || data.getRepositoryUrl() == null || data.getTaskId() == null) {
- return;
- }
- TaskDataState state = retrieveState(data);
- if (state != null) {
- state.setOldTaskData(data);
- } else {
- StatusHandler.log(new Status(IStatus.WARNING, ITasksCoreConstants.ID_PLUGIN,
- "Attempt to save old data when no new data exists", new Exception()));
- }
- saveState(state);
- }
-
- /**
- * Returns the most recent copy of the task data.
- *
- * @return offline task data, null if no data found
- */
- public RepositoryTaskData getNewTaskData(String repositoryUrl, String id) {
- if (repositoryUrl == null || id == null) {
- return null;
- }
- TaskDataState state = retrieveState(repositoryUrl, id);
- if (state != null) {
- return state.getNewTaskData();
- }
- return null;
- }
-
- /**
- * Returns the old copy if exists, null otherwise.
- */
- public RepositoryTaskData getOldTaskData(String repositoryUrl, String id) {
- if (repositoryUrl == null || id == null) {
- return null;
- }
- TaskDataState state = retrieveState(repositoryUrl, id);
- if (state != null) {
- return state.getOldTaskData();
- }
- return null;
- }
-
- /**
- * @return Get the next available temporary taskId. This taskId is given to new unsubmitted repository tasks.
- * Incremented each time this method is called.
- */
- public synchronized String getNewRepositoryTaskId() {
- // TODO: generate based on values of unsubmitted offline report ids
- nextNewId++;
- if (nextNewId == Integer.MAX_VALUE) {
- nextNewId = 1;
- }
- return "" + nextNewId;
- }
-
- /**
- *
- * @return editable copy of task data with any edits applied
- */
- public RepositoryTaskData getEditableCopy(String repositoryUrl, String id) {
- if (repositoryUrl == null || id == null) {
- return null;
- }
- TaskDataState state = retrieveState(repositoryUrl, id);
- RepositoryTaskData clone = null;
- if (state != null) {
- if (state.getNewTaskData() != null) {
- try {
- clone = (RepositoryTaskData) ObjectCloner.deepCopy(state.getNewTaskData());
- updateAttributeFactory(clone);
- } catch (Exception e) {
- StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN,
- "Error constructing modifiable task", e));
- return null;
- }
- }
- if (clone != null) {
- for (RepositoryTaskAttribute attribute : state.getEdits()) {
- if (attribute == null) {
- continue;
- }
- RepositoryTaskAttribute existing = clone.getAttribute(attribute.getId());
- if (existing != null) {
- existing.clearValues();
- List<String> options = existing.getOptions();
-
- for (String value : attribute.getValues()) {
- if (options.size() > 0) {
- if (options.contains(value)) {
- existing.addValue(value);
- }
- } else {
- existing.addValue(value);
- }
- }
-
- } else {
- clone.addAttribute(attribute.getId(), attribute);
- }
- }
- }
- }
- return clone;
-
- }
-
- // API 3.0 review: the state of the elements of changedAttribues could change between this call and the time state is written to disk, might need to make a full copy
- public void saveEdits(String repositoryUrl, String id, Set<RepositoryTaskAttribute> changedAttributes) {
- TaskDataState state = retrieveState(repositoryUrl, id);
- if (state != null) {
- Set<RepositoryTaskAttribute> edits = state.getEdits();
- if (edits == null) {
- // Copy here?
- state.setEdits(changedAttributes);
- } else {
- edits.removeAll(changedAttributes);
- edits.addAll(changedAttributes);
- }
- try {
- storage.put(state);
- } catch (Exception e) {
- // FIXME what exception is caught here?
- StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN, "Error saving edits", e));
- }
- }
-
- }
-
- public Set<RepositoryTaskAttribute> getEdits(String repositoryUrl, String id) {
- if (repositoryUrl == null || id == null) {
- return Collections.emptySet();
- }
- TaskDataState state = retrieveState(repositoryUrl, id);
- if (state != null) {
- if (state.getEdits() != null) {
- return Collections.unmodifiableSet(state.getEdits());
- }
- }
- return Collections.emptySet();
- }
-
- public void discardEdits(String repositoryUrl, String id) {
- if (repositoryUrl == null || id == null) {
- return;
- }
- TaskDataState state = retrieveState(repositoryUrl, id);
- if (state != null) {
- state.discardEdits();
- try {
- storage.put(state);
- } catch (Exception e) {
- // FIXME what exception is caught here?
- StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN, "Error discarding edits", e));
- }
- }
- }
-
- public void remove(String repositoryUrl, String id) {
- if (repositoryUrl == null || id == null) {
- return;
- }
- storage.remove(repositoryUrl, id);
- }
-
- /**
- * DESTROY ALL OFFLINE TASK DATA Public for testing only Forces a reset of all data maps Does not signal data
- * changed (doesn't request save)
- */
- public void clear() {
- nextNewId = 0;
- storage.clear();
- }
-
- /**
- * After deserialization process the attributeFactory needs to be reset on each RepositoryTaskData.
- */
- private void updateAttributeFactory(RepositoryTaskData taskData) {
- if (taskData == null) {
- return;
- }
- taskData.refresh();
- AbstractLegacyRepositoryConnector connector = (AbstractLegacyRepositoryConnector) taskRepositoryManager.getRepositoryConnector(taskData.getConnectorKind());
- if (connector != null && connector.getLegacyTaskDataHandler() != null) {
- AbstractAttributeFactory factory = connector.getLegacyTaskDataHandler().getAttributeFactory(taskData);
- if (factory != null) {
- taskData.setAttributeFactory(factory);
- }
- }
- }
-
- // XXX: review if task data cloning can be done without using serialization
- // Reference:
- // http://www.javaworld.com/javaworld/javatips/jw-javatip76.html?page=2
- public static class ObjectCloner {
-
- private ObjectCloner() {
- // can not instantiate
- }
-
- static public Object deepCopy(Object oldObj) throws Exception {
- ObjectOutputStream outputStream = null;
- ObjectInputStream inputStream = null;
- try {
- ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
- outputStream = new ObjectOutputStream(byteArrayOutputStream);
-
- outputStream.writeObject(oldObj);
- outputStream.flush();
- ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(
- byteArrayOutputStream.toByteArray());
- inputStream = new ObjectInputStream(byteArrayInputStream);
- return inputStream.readObject();
- } catch (Exception e) {
- throw (e);
- } finally {
- if (outputStream != null) {
- outputStream.close();
- }
- if (inputStream != null) {
- inputStream.close();
- }
- }
- }
-
- }
-
- public void start() {
- try {
- storage.start();
- } catch (Exception e) {
- StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN, "Offline storage start failed",
- e));
- }
- }
-
- public void stop() {
- try {
- storage.stop();
- } catch (Exception e) {
- StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN, "Offline storage stop failed", e));
- }
- }
-
- public void saveNow() {
- storage.flush();
- }
-
- private TaskDataState retrieveState(RepositoryTaskData data) {
- return retrieveState(data.getRepositoryUrl(), data.getTaskId());
- }
-
- private TaskDataState retrieveState(String repositoryUrl, String id) {
- TaskDataState state = null;
- try {
- state = storage.get(repositoryUrl, id);
- if (state != null) {
- // TODO: Get rid of attribute factory on containers!!!
- if (state.getNewTaskData() != null) {
- updateAttributeFactory(state.getNewTaskData());
- }
- if (state.getOldTaskData() != null) {
- updateAttributeFactory(state.getOldTaskData());
- }
- }
- } catch (Exception e) {
- // FIXME what Exception is caught here?
- StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN, "Error saving offline data", e));
- }
- return state;
- }
-
- private void saveState(TaskDataState state) {
- storage.put(state);
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskExternalizationException.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskExternalizationException.java
deleted file mode 100644
index bd67c0ed6..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskExternalizationException.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.core;
-
-/**
- * @author Mik Kersten
- * @author Ken Sueda
- */
-public class TaskExternalizationException extends Exception {
-
- private static final long serialVersionUID = 5804522104992031907L;
-
- public TaskExternalizationException() {
- super();
- }
-
- public TaskExternalizationException(String detailMessage) {
- super(detailMessage);
- }
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskGroup.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskGroup.java
deleted file mode 100644
index a87c46fdd..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskGroup.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.core;
-
-
-/**
- * NOTE: this class is likely to change or become API for 3.0
- *
- * @author Eugene Kuleshov
- * @since 2.1
- */
-public class TaskGroup extends AbstractTaskContainer {
-
- private final String summary;
-
- private final String groupBy;
-
- public TaskGroup(String parentHandle, String summary, String groupBy) {
- super(parentHandle + summary);
- this.summary = summary;
- this.groupBy = groupBy;
- }
-
- @Override
- public String getSummary() {
- return summary;
- }
-
- @Override
- public boolean isUserManaged() {
- return false;
- }
-
- public String getGroupBy() {
- return groupBy;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskList.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskList.java
deleted file mode 100644
index 04f592b8d..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskList.java
+++ /dev/null
@@ -1,653 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.CopyOnWriteArraySet;
-
-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.OperationCanceledException;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.ILock;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.commons.net.Policy;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.ITask;
-
-/**
- * Stores and manages task list elements and their containment hierarchy.
- *
- * @author Mik Kersten
- * @author Rob Elves
- * @since 3.0
- */
-public class TaskList implements ITaskList {
-
- private static ILock lock = Job.getJobManager().newLock();
-
- private Map<String, AbstractTaskCategory> categories;
-
- private final Set<ITaskListChangeListener> changeListeners = new CopyOnWriteArraySet<ITaskListChangeListener>();
-
- private UncategorizedTaskContainer defaultCategory;
-
- private int maxLocalTaskId;
-
- private Map<String, RepositoryQuery> queries;
-
- private Map<String, UnmatchedTaskContainer> repositoryOrphansMap;
-
- private Map<String, AbstractTask> tasks;
-
- private Set<TaskContainerDelta> delta;
-
- public TaskList() {
- reset();
- }
-
- public void addCategory(TaskCategory category) throws IllegalArgumentException {
- Assert.isNotNull(category);
- try {
- lock();
- categories.put(category.getHandleIdentifier(), category);
- delta.add(new TaskContainerDelta(category, TaskContainerDelta.Kind.ADDED));
- } finally {
- unlock();
- }
- }
-
- public void addChangeListener(ITaskListChangeListener listener) {
- changeListeners.add(listener);
- }
-
- /**
- * precondition: task must not be null and must exist in the task list
- */
- private void addOrphan(AbstractTask task, Set<TaskContainerDelta> delta) {
- if (!task.getParentContainers().isEmpty()) {
- // Current policy is not to archive/orphan if the task exists in some other container
- return;
- }
-
- AbstractTaskContainer orphans = getUnmatchedContainer(task.getRepositoryUrl());
- if (orphans != null) {
- task.addParentContainer(orphans);
- orphans.internalAddChild(task);
- delta.add(new TaskContainerDelta(task, orphans, TaskContainerDelta.Kind.ADDED));
- }
- }
-
- public void addQuery(RepositoryQuery query) throws IllegalArgumentException {
- Assert.isNotNull(query);
- try {
- lock();
- queries.put(query.getHandleIdentifier(), query);
- delta.add(new TaskContainerDelta(query, TaskContainerDelta.Kind.ADDED));
- } finally {
- unlock();
- }
- }
-
- /**
- * Add orphaned task to the task list
- */
- public void addTask(ITask task) {
- addTask(task, null);
- }
-
- public boolean addTask(ITask itask, AbstractTaskContainer container) {
- AbstractTask task = (AbstractTask) itask;
- Assert.isNotNull(task);
- Assert.isLegal(!(container instanceof UnmatchedTaskContainer));
-
- try {
- lock();
- task = getOrCreateTask(task);
- if (container == null) {
- container = getUnmatchedContainer(task.getRepositoryUrl());
- } else {
- container = getValidElement(container);
- }
-
- // ensure parent is valid and does not contain task already
- if (container == null || task.equals(container) || task.getParentContainers().contains(container)) {
- return false;
- }
-
- // ensure that we don't create cycles
- if ((task).contains(container.getHandleIdentifier())) {
- return false;
- }
-
- if (task instanceof LocalTask && task.getParentContainers().size() > 0) {
- // local tasks should only have 1 parent
- for (AbstractTaskContainer parent : task.getParentContainers()) {
- removeFromContainerInternal(parent, task, delta);
- }
- } else if (container instanceof AbstractTaskCategory) {
- // tasks can only be in one task category at a time
- AbstractTaskCategory tempCat = TaskCategory.getParentTaskCategory(task);
- if (tempCat != null) {
- removeFromContainerInternal(tempCat, task, delta);
- }
- }
-
- removeOrphan(task, delta);
-
- (task).addParentContainer(container);
- container.internalAddChild(task);
- delta.add(new TaskContainerDelta(task, container, TaskContainerDelta.Kind.ADDED));
- } finally {
- unlock();
- }
-
- return true;
- }
-
- public void addUnmatchedContainer(UnmatchedTaskContainer orphanedTasksContainer) {
- repositoryOrphansMap.put(orphanedTasksContainer.getRepositoryUrl(), orphanedTasksContainer);
- }
-
- public void deleteCategory(AbstractTaskCategory category) {
- try {
- lock();
- categories.remove(category.getHandleIdentifier());
- for (ITask task : category.getChildren()) {
- ((AbstractTask) task).removeParentContainer(category);
- addOrphan((AbstractTask) task, delta);
- }
- delta.add(new TaskContainerDelta(category, TaskContainerDelta.Kind.REMOVED));
- } finally {
- unlock();
- }
- }
-
- public void deleteQuery(RepositoryQuery query) {
- try {
- lock();
- queries.remove(query.getHandleIdentifier());
- for (ITask task : query.getChildren()) {
- ((AbstractTask) task).removeParentContainer(query);
- addOrphan((AbstractTask) task, delta);
- }
- delta.add(new TaskContainerDelta(query, TaskContainerDelta.Kind.REMOVED));
- } finally {
- unlock();
- }
- }
-
- /**
- * Task is removed from all containers. Currently subtasks are not deleted but rather are rather potentially
- * orphaned.
- */
- public void deleteTask(ITask itask) {
- Assert.isNotNull(itask);
- AbstractTask task = (AbstractTask) itask;
- try {
- lock();
-
- // remove task from all parent containers
- for (AbstractTaskContainer container : task.getParentContainers()) {
- removeFromContainerInternal(container, task, delta);
- }
-
- // remove this task as a parent for all subtasks
- for (ITask child : task.getChildren()) {
- removeFromContainerInternal(task, child, delta);
- addOrphan((AbstractTask) child, delta);
- }
-
- tasks.remove(task.getHandleIdentifier());
- delta.add(new TaskContainerDelta(task, TaskContainerDelta.Kind.REMOVED));
- } finally {
- unlock();
- }
- }
-
- private void fireDelta(HashSet<TaskContainerDelta> deltasToFire) {
- for (ITaskListChangeListener listener : changeListeners) {
- try {
- listener.containersChanged(Collections.unmodifiableSet(deltasToFire));
- } catch (Throwable t) {
- StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN, "Notification failed for: "
- + listener, t));
- }
- }
- }
-
- public Collection<AbstractTask> getAllTasks() {
- return Collections.unmodifiableCollection(tasks.values());
- }
-
- public Set<AbstractTaskCategory> getCategories() {
- return Collections.unmodifiableSet(new HashSet<AbstractTaskCategory>(categories.values()));
- }
-
- /**
- * Exposed for unit testing
- *
- * @return unmodifiable collection of ITaskActivityListeners
- */
- public Set<ITaskListChangeListener> getChangeListeners() {
- return Collections.unmodifiableSet(changeListeners);
- }
-
- public AbstractTaskCategory getContainerForHandle(String categoryHandle) {
- Assert.isNotNull(categoryHandle);
-
- for (AbstractTaskCategory cat : categories.values()) {
- if (cat.getHandleIdentifier().equals(categoryHandle)) {
- return cat;
- }
- }
- return null;
- }
-
- public AbstractTaskCategory getDefaultCategory() {
- return defaultCategory;
- }
-
- public int getLastLocalTaskId() {
- return maxLocalTaskId;
- }
-
- public int getNextLocalTaskId() {
- try {
- lock();
- return ++maxLocalTaskId;
- } finally {
- unlock();
- }
- }
-
- private AbstractTask getOrCreateTask(AbstractTask taskListElement) {
- AbstractTask task = tasks.get(taskListElement.getHandleIdentifier());
- if (task == null) {
- tasks.put(taskListElement.getHandleIdentifier(), taskListElement);
- task = taskListElement;
- if (task instanceof LocalTask) {
- try {
- int taskId = Integer.parseInt(task.getTaskId());
- maxLocalTaskId = Math.max(maxLocalTaskId, taskId);
- } catch (NumberFormatException e) {
- // ignore
- }
- }
- }
- return task;
- }
-
- public Set<RepositoryQuery> getQueries() {
- return Collections.unmodifiableSet(new HashSet<RepositoryQuery>(queries.values()));
- }
-
- /**
- * return all queries for the given repository url
- */
- public Set<RepositoryQuery> getRepositoryQueries(String repositoryUrl) {
- Assert.isNotNull(repositoryUrl);
-
- Set<RepositoryQuery> repositoryQueries = new HashSet<RepositoryQuery>();
- for (RepositoryQuery query : queries.values()) {
- if (query.getRepositoryUrl().equals(repositoryUrl)) {
- repositoryQueries.add(query);
- }
- }
- return repositoryQueries;
- }
-
- public Set<AbstractTaskContainer> getRootElements() {
- Set<AbstractTaskContainer> roots = new HashSet<AbstractTaskContainer>();
- roots.add(defaultCategory);
- for (AbstractTaskCategory cat : categories.values()) {
- roots.add(cat);
- }
- for (RepositoryQuery query : queries.values()) {
- roots.add(query);
- }
- for (UnmatchedTaskContainer orphanContainer : repositoryOrphansMap.values()) {
- roots.add(orphanContainer);
- }
- return roots;
- }
-
- /**
- * TODO: consider removing, if everything becomes a repository task
- *
- * @return null if no such task.
- */
- public AbstractTask getTask(String handleIdentifier) {
- if (handleIdentifier == null) {
- return null;
- } else {
- return tasks.get(handleIdentifier);
- }
- }
-
- public ITask getTask(String repositoryUrl, String taskId) {
- if (!RepositoryTaskHandleUtil.isValidTaskId(taskId)) {
- return null;
- }
-
- String handle = RepositoryTaskHandleUtil.getHandle(repositoryUrl, taskId);
- return getTask(handle);
- }
-
- public AbstractTask getTaskByKey(String repositoryUrl, String taskKey) {
- for (AbstractTask task : tasks.values()) {
- String currentTaskKey = task.getTaskKey();
- if (currentTaskKey != null && currentTaskKey.equals(taskKey)
- && task.getRepositoryUrl().equals(repositoryUrl)) {
- return task;
- }
- }
- return null;
- }
-
- public Set<AbstractTaskCategory> getTaskCategories() {
- Set<AbstractTaskCategory> containers = new HashSet<AbstractTaskCategory>();
- for (AbstractTaskCategory container : categories.values()) {
- if (container instanceof TaskCategory) {
- containers.add(container);
- }
- }
- return containers;
- }
-
- /**
- * Returns all tasks for the given repository url.
- */
- public Set<ITask> getTasks(String repositoryUrl) {
- Set<ITask> repositoryTasks = new HashSet<ITask>();
- if (repositoryUrl != null) {
- for (ITask task : tasks.values()) {
- if (task.getRepositoryUrl().equals(repositoryUrl)) {
- repositoryTasks.add(task);
- }
- }
- }
- return repositoryTasks;
- }
-
- public AbstractTaskContainer getUnmatchedContainer(String repositoryUrl) {
- if (LocalRepositoryConnector.REPOSITORY_URL.equals(repositoryUrl)) {
- return defaultCategory;
- } else {
- UnmatchedTaskContainer orphans = repositoryOrphansMap.get(repositoryUrl);
- if (orphans == null) {
- StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN,
- "Failed to find unmatched container for repository \"" + repositoryUrl + "\""));
- }
- return orphans;
- }
- }
-
- public Set<UnmatchedTaskContainer> getUnmatchedContainers() {
- return Collections.unmodifiableSet(new HashSet<UnmatchedTaskContainer>(repositoryOrphansMap.values()));
- }
-
- /**
- * Task added if does not exist already. Ensures the element exists in the task list
- *
- * @throws IllegalAgumentException
- * if null argument passed or element does not exist in task list
- * @return element as passed in or instance from task list with same handle if exists
- */
- private AbstractTaskContainer getValidElement(IRepositoryElement taskListElement) {
- AbstractTaskContainer result = null;
- if (taskListElement instanceof ITask) {
- result = tasks.get(taskListElement.getHandleIdentifier());
- } else if (taskListElement instanceof UncategorizedTaskContainer) {
- result = defaultCategory;
- } else if (taskListElement instanceof UnmatchedTaskContainer) {
- result = repositoryOrphansMap.get(((UnmatchedTaskContainer) taskListElement).getRepositoryUrl());
- } else if (taskListElement instanceof TaskCategory) {
- result = categories.get(taskListElement.getHandleIdentifier());
- } else if (taskListElement instanceof IRepositoryQuery) {
- result = queries.get(taskListElement.getHandleIdentifier());
- }
-
- if (result == null) {
- throw new IllegalArgumentException("Element " + taskListElement.getHandleIdentifier()
- + " does not exist in the task list.");
- } else {
- return result;
- }
- }
-
- public void notifyElementsChanged(Set<? extends IRepositoryElement> elements) {
- HashSet<TaskContainerDelta> deltas = new HashSet<TaskContainerDelta>();
- if (elements == null) {
- deltas.add(new TaskContainerDelta(null, TaskContainerDelta.Kind.ROOT));
- } else {
- for (IRepositoryElement element : elements) {
- deltas.add(new TaskContainerDelta(element, TaskContainerDelta.Kind.CONTENT));
- }
- }
-
- fireDelta(deltas);
- }
-
- public void notifySynchronizationStateChanged(Set<? extends IRepositoryElement> elements) {
- HashSet<TaskContainerDelta> taskChangeDeltas = new HashSet<TaskContainerDelta>();
- for (IRepositoryElement abstractTaskContainer : elements) {
- TaskContainerDelta delta = new TaskContainerDelta(abstractTaskContainer, TaskContainerDelta.Kind.CONTENT);
- delta.setTransient(true);
- taskChangeDeltas.add(delta);
- }
-
- fireDelta(taskChangeDeltas);
- }
-
- public void notifySynchronizationStateChanged(IRepositoryElement element) {
- notifySynchronizationStateChanged(Collections.singleton(element));
- }
-
- public void notifyElementChanged(IRepositoryElement element) {
- notifyElementsChanged(Collections.singleton(element));
- }
-
- public void refactorRepositoryUrl(String oldRepositoryUrl, String newRepositoryUrl) {
- Assert.isNotNull(oldRepositoryUrl);
- Assert.isNotNull(newRepositoryUrl);
-
- try {
- lock();
- for (AbstractTask task : tasks.values()) {
- if (oldRepositoryUrl.equals(RepositoryTaskHandleUtil.getRepositoryUrl(task.getHandleIdentifier()))) {
- tasks.remove(task.getHandleIdentifier());
- task.setRepositoryUrl(newRepositoryUrl);
- tasks.put(task.getHandleIdentifier(), task);
- String taskUrl = task.getUrl();
- if (taskUrl != null && taskUrl.startsWith(oldRepositoryUrl)) {
- task.setUrl(newRepositoryUrl + taskUrl.substring(oldRepositoryUrl.length()));
- }
- }
- }
-
- for (RepositoryQuery query : queries.values()) {
- if (query.getRepositoryUrl().equals(oldRepositoryUrl)) {
- query.setRepositoryUrl(newRepositoryUrl);
- delta.add(new TaskContainerDelta(query, TaskContainerDelta.Kind.CONTENT));
- }
- }
-
- for (UnmatchedTaskContainer orphans : repositoryOrphansMap.values()) {
- if (orphans.getRepositoryUrl().equals(oldRepositoryUrl)) {
- repositoryOrphansMap.remove(oldRepositoryUrl);
- //categories.remove(orphans.getHandleIdentifier());
- orphans.setRepositoryUrl(newRepositoryUrl);
- repositoryOrphansMap.put(newRepositoryUrl, orphans);
- //categories.put(orphans.getHandleIdentifier(), orphans);
- delta.add(new TaskContainerDelta(orphans, TaskContainerDelta.Kind.CONTENT));
- }
- }
- } finally {
- unlock();
- }
- }
-
- public void removeChangeListener(ITaskListChangeListener listener) {
- changeListeners.remove(listener);
- }
-
- public void removeFromContainer(AbstractTaskContainer container, ITask task) {
- Assert.isNotNull(container);
- Assert.isNotNull(task);
-
- removeFromContainer(container, Collections.singleton(task));
- }
-
- public void removeFromContainer(AbstractTaskContainer container, Set<ITask> tasks) {
- Assert.isNotNull(container);
- Assert.isNotNull(tasks);
- try {
- lock();
- for (ITask task : tasks) {
- removeFromContainerInternal(container, task, delta);
- addOrphan((AbstractTask) task, delta);
- }
- } finally {
- unlock();
- }
- }
-
- /**
- * Note: does not add <code>task</code> to the unmatched container.
- */
- private void removeFromContainerInternal(AbstractTaskContainer container, ITask task, Set<TaskContainerDelta> delta) {
- assert container.getChildren().contains(task);
-
- container.internalRemoveChild(task);
- ((AbstractTask) task).removeParentContainer(container);
-
- delta.add(new TaskContainerDelta(task, container, TaskContainerDelta.Kind.REMOVED));
- }
-
- private void removeOrphan(AbstractTask task, Set<TaskContainerDelta> delta) {
- AbstractTaskContainer orphans = getUnmatchedContainer(task.getRepositoryUrl());
- if (orphans != null) {
- if (orphans.internalRemoveChild(task)) {
- delta.add(new TaskContainerDelta(task, orphans, TaskContainerDelta.Kind.REMOVED));
- task.removeParentContainer(orphans);
- }
- }
- }
-
- /**
- * TODO separate category/query handle from name
- *
- * @deprecated
- */
- @Deprecated
- public void renameContainer(AbstractTaskContainer container, String newDescription) {
- Assert.isLegal(!(container instanceof ITask));
- Assert.isLegal(!(container instanceof UnmatchedTaskContainer));
- try {
- lock();
- if (container instanceof TaskCategory) {
- ((TaskCategory) container).setSummary(newDescription);
- } else if (container instanceof RepositoryQuery) {
- ((RepositoryQuery) container).setSummary(newDescription);
- }
- delta.add(new TaskContainerDelta(container, TaskContainerDelta.Kind.CONTENT));
- } finally {
- unlock();
- }
- }
-
- /**
- * Public for testing.
- */
- public void reset() {
- try {
- lock();
- tasks = new ConcurrentHashMap<String, AbstractTask>();
-
- repositoryOrphansMap = new ConcurrentHashMap<String, UnmatchedTaskContainer>();
-
- categories = new ConcurrentHashMap<String, AbstractTaskCategory>();
- queries = new ConcurrentHashMap<String, RepositoryQuery>();
-
- defaultCategory = new UncategorizedTaskContainer();
-
- maxLocalTaskId = 0;
- categories.put(defaultCategory.getHandleIdentifier(), defaultCategory);
- } finally {
- unlock();
- }
- }
-
- public void run(ITaskListRunnable runnable) throws CoreException {
- run(runnable, null);
- }
-
- public void run(ITaskListRunnable runnable, IProgressMonitor monitor) throws CoreException {
- monitor = Policy.monitorFor(monitor);
- try {
- lock(monitor);
-
- runnable.execute(monitor);
-
- } finally {
- unlock();
- }
-
- }
-
- private void lock() {
- lock.acquire();
- if (lock.getDepth() == 1) {
- delta = new HashSet<TaskContainerDelta>();
- }
- }
-
- private void lock(IProgressMonitor monitor) throws CoreException {
- while (!monitor.isCanceled()) {
- try {
- if (lock.acquire(3000)) {
- if (lock.getDepth() == 1) {
- delta = new HashSet<TaskContainerDelta>();
- }
- return;
- }
- } catch (InterruptedException e) {
- throw new OperationCanceledException();
- }
- }
- throw new OperationCanceledException();
- }
-
- private void unlock() {
- HashSet<TaskContainerDelta> toFire = null;
- if (lock.getDepth() == 1) {
- toFire = new HashSet<TaskContainerDelta>(delta);
- }
- lock.release();
- if (toFire != null && toFire.size() > 0) {
- fireDelta(toFire);
- }
- }
-
- public static ISchedulingRule getSchedulingRule() {
- return ITasksCoreConstants.TASKLIST_SCHEDULING_RULE;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskRepositoriesExternalizer.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskRepositoriesExternalizer.java
deleted file mode 100644
index c7de378b8..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskRepositoriesExternalizer.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Collection;
-import java.util.Set;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipInputStream;
-import java.util.zip.ZipOutputStream;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.xml.sax.InputSource;
-import org.xml.sax.XMLReader;
-import org.xml.sax.helpers.XMLReaderFactory;
-
-/**
- * @author Rob Elves
- * @author Jevgeni Holodkov
- */
-public class TaskRepositoriesExternalizer {
-
- private final SaxRepositoriesWriter writer = new SaxRepositoriesWriter();
-
- public static final String ELEMENT_TASK_REPOSITORIES = "TaskRepositories";
-
- public static final String ELEMENT_TASK_REPOSITORY = "TaskRepository";
-
- public static final String ATTRIBUTE_VERSION = "OutputVersion";
-
- public void writeRepositoriesToXML(Collection<TaskRepository> repositories, File file) {
- ZipOutputStream outputStream = null;
- try {
- if (!file.exists()) {
- file.createNewFile();
- }
-
- outputStream = new ZipOutputStream(new FileOutputStream(file));
- writeRepositories(repositories, outputStream);
- outputStream.close();
-
- } catch (IOException e) {
- StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN, "Could not write: "
- + file.getAbsolutePath(), e));
- } finally {
- if (outputStream != null) {
- try {
- outputStream.close();
- } catch (IOException e) {
- StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN, "Could not close: "
- + file.getAbsolutePath(), e));
- }
- }
- }
- }
-
- /**
- * @param repositories
- * @param outputStream
- * @throws IOException
- */
- public void writeRepositories(Collection<TaskRepository> repositories, ZipOutputStream outputStream)
- throws IOException {
- ZipEntry zipEntry = new ZipEntry(TaskRepositoryManager.OLD_REPOSITORIES_FILE);
- outputStream.putNextEntry(zipEntry);
- outputStream.setMethod(ZipOutputStream.DEFLATED);
-
- // OutputStream stream = new FileOutputStream(file);
- writer.setOutputStream(outputStream);
- writer.writeRepositoriesToStream(repositories);
- outputStream.flush();
- outputStream.closeEntry();
- }
-
- public Set<TaskRepository> readRepositoriesFromXML(File file) {
-
- if (!file.exists()) {
- return null;
- }
- InputStream inputStream = null;
- try {
- inputStream = new ZipInputStream(new FileInputStream(file));
-
- // search for REPOSITORIES entry
- ZipEntry entry = ((ZipInputStream) inputStream).getNextEntry();
- while (entry != null) {
- if (TaskRepositoryManager.OLD_REPOSITORIES_FILE.equals(entry.getName())) {
- break;
- }
- entry = ((ZipInputStream) inputStream).getNextEntry();
- }
-
- if (entry == null) {
- return null;
- }
-
- SaxRepositoriesContentHandler contentHandler = new SaxRepositoriesContentHandler();
- XMLReader reader = XMLReaderFactory.createXMLReader();
- reader.setContentHandler(contentHandler);
- reader.parse(new InputSource(inputStream));
- return contentHandler.getRepositories();
- } catch (Throwable e) {
- file.renameTo(new File(file.getAbsolutePath() + "-save"));
- StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN, "Error reading context file", e));
- return null;
- } finally {
- if (inputStream != null) {
- try {
- inputStream.close();
- } catch (IOException e) {
- StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN,
- "Error closing context file", e));
- }
- }
- }
- }
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskRepositoryAdapter.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskRepositoryAdapter.java
deleted file mode 100644
index d86a377e4..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskRepositoryAdapter.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core;
-
-import org.eclipse.mylyn.tasks.core.IRepositoryListener;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-/**
- * @author Rob Elves
- * @since 3.0
- */
-public class TaskRepositoryAdapter implements IRepositoryListener {
-
- public void repositoryAdded(TaskRepository repository) {
- // ignore
- }
-
- public void repositoryRemoved(TaskRepository repository) {
- // ignore
- }
-
- public void repositorySettingsChanged(TaskRepository repository) {
- // ignore
- }
-
- public void repositoryUrlChanged(TaskRepository repository, String oldUrl) {
- // ignore
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskRepositoryLocation.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskRepositoryLocation.java
deleted file mode 100644
index ce4c23188..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskRepositoryLocation.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core;
-
-import java.net.InetSocketAddress;
-import java.net.Proxy;
-import java.net.Proxy.Type;
-
-import org.eclipse.core.net.proxy.IProxyData;
-import org.eclipse.core.net.proxy.IProxyService;
-import org.eclipse.mylyn.commons.net.AbstractWebLocation;
-import org.eclipse.mylyn.commons.net.AuthenticatedProxy;
-import org.eclipse.mylyn.commons.net.AuthenticationCredentials;
-import org.eclipse.mylyn.commons.net.AuthenticationType;
-import org.eclipse.mylyn.internal.commons.net.CommonsNetPlugin;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-/**
- * @author Steffen Pingel
- */
-public class TaskRepositoryLocation extends AbstractWebLocation {
-
- protected final TaskRepository taskRepository;
-
- public TaskRepositoryLocation(TaskRepository taskRepository) {
- super(taskRepository.getRepositoryUrl());
-
- this.taskRepository = taskRepository;
- }
-
- @Override
- public Proxy getProxyForHost(String host, String proxyType) {
- if (!taskRepository.isDefaultProxyEnabled()) {
- return taskRepository.getProxy();
- }
-
- IProxyService service = CommonsNetPlugin.getProxyService();
- if (service != null && service.isProxiesEnabled()) {
- IProxyData data = service.getProxyDataForHost(host, proxyType);
- if (data != null && data.getHost() != null) {
- String proxyHost = data.getHost();
- int proxyPort = data.getPort();
- // change the IProxyData default port to the Java default port
- if (proxyPort == -1) {
- proxyPort = 0;
- }
-
- InetSocketAddress sockAddr = new InetSocketAddress(proxyHost, proxyPort);
- if (data.isRequiresAuthentication()) {
- return new AuthenticatedProxy(getJavaProxyType(proxyType), sockAddr, data.getUserId(),
- data.getPassword());
- } else {
- return new Proxy(getJavaProxyType(proxyType), sockAddr);
- }
- }
- }
- return null;
- }
-
- private Type getJavaProxyType(String type) {
- return (IProxyData.SOCKS_PROXY_TYPE.equals(type)) ? Proxy.Type.SOCKS : Proxy.Type.HTTP;
- }
-
- @Override
- public AuthenticationCredentials getCredentials(AuthenticationType type) {
- return taskRepository.getCredentials(type);
- }
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskRepositoryManager.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskRepositoryManager.java
deleted file mode 100644
index f62137ff9..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskRepositoryManager.java
+++ /dev/null
@@ -1,389 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core;
-
-import java.beans.PropertyChangeEvent;
-import java.beans.PropertyChangeListener;
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.IRepositoryListener;
-import org.eclipse.mylyn.tasks.core.IRepositoryManager;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-/**
- * Provides facilities for managing the lifecycle of and access to task repositories.
- *
- * @author Mik Kersten
- * @author Rob Elves
- * @author Jevgeni Holodkov
- * @since 3.0
- */
-public class TaskRepositoryManager implements IRepositoryManager {
-
- public static final String OLD_REPOSITORIES_FILE = "repositories.xml";
-
- public static final String DEFAULT_REPOSITORIES_FILE = "repositories.xml.zip";
-
- public static final String PREF_REPOSITORIES = "org.eclipse.mylyn.tasklist.repositories.";
-
- private final Map<String, AbstractRepositoryConnector> repositoryConnectors = new HashMap<String, AbstractRepositoryConnector>();
-
- private final Map<String, Set<TaskRepository>> repositoryMap = new HashMap<String, Set<TaskRepository>>();
-
- private final Set<IRepositoryListener> listeners = new HashSet<IRepositoryListener>();
-
- private final Set<TaskRepository> orphanedRepositories = new HashSet<TaskRepository>();
-
- public static final String MESSAGE_NO_REPOSITORY = "No repository available, please add one using the Task Repositories view.";
-
- public static final String PREFIX_LOCAL = "local-";
-
- private final PropertyChangeListener PROPERTY_CHANGE_LISTENER = new PropertyChangeListener() {
-
- public void propertyChange(PropertyChangeEvent evt) {
- TaskRepositoryManager.this.notifyRepositorySettingsChanged((TaskRepository) evt.getSource());
- }
- };
-
- private final TaskRepositoriesExternalizer externalizer = new TaskRepositoriesExternalizer();
-
- public TaskRepositoryManager() {
- }
-
- public Collection<AbstractRepositoryConnector> getRepositoryConnectors() {
- return Collections.unmodifiableCollection(repositoryConnectors.values());
- }
-
- public AbstractRepositoryConnector getRepositoryConnector(String connectorKind) {
- return repositoryConnectors.get(connectorKind);
- }
-
- public void addRepositoryConnector(AbstractRepositoryConnector repositoryConnector) {
- if (!repositoryConnectors.values().contains(repositoryConnector)) {
- repositoryConnectors.put(repositoryConnector.getConnectorKind(), repositoryConnector);
- }
- }
-
- public boolean hasUserManagedRepositoryConnectors() {
- for (AbstractRepositoryConnector connector : repositoryConnectors.values()) {
- if (connector.isUserManaged()) {
- return true;
- }
- }
- return false;
- }
-
- public void addRepository(TaskRepository repository) {
- Set<TaskRepository> repositories;
- if (!repositoryMap.containsKey(repository.getConnectorKind())) {
- repositories = new HashSet<TaskRepository>();
- repositoryMap.put(repository.getConnectorKind(), repositories);
- } else {
- repositories = repositoryMap.get(repository.getConnectorKind());
- }
- repositories.add(repository);
- repository.addChangeListener(PROPERTY_CHANGE_LISTENER);
- for (IRepositoryListener listener : listeners) {
- listener.repositoryAdded(repository);
- }
- }
-
- public void removeRepository(TaskRepository repository, String repositoryFilePath) {
- Set<TaskRepository> repositories = repositoryMap.get(repository.getConnectorKind());
- if (repositories != null) {
- repository.flushAuthenticationCredentials();
- repositories.remove(repository);
- }
- repository.removeChangeListener(PROPERTY_CHANGE_LISTENER);
- saveRepositories(repositoryFilePath);
- for (IRepositoryListener listener : listeners) {
- listener.repositoryRemoved(repository);
- }
- }
-
- public void addListener(IRepositoryListener listener) {
- listeners.add(listener);
- }
-
- public void removeListener(IRepositoryListener listener) {
- listeners.remove(listener);
- }
-
- /* Public for testing. */
- public static String stripSlashes(String url) {
- Assert.isNotNull(url);
- StringBuilder sb = new StringBuilder(url.trim());
- while (sb.length() > 0 && sb.charAt(sb.length() - 1) == '/') {
- sb.deleteCharAt(sb.length() - 1);
- }
- return sb.toString();
- }
-
- public TaskRepository getRepository(String kind, String urlString) {
- Assert.isNotNull(kind);
- Assert.isNotNull(urlString);
- urlString = stripSlashes(urlString);
- if (repositoryMap.containsKey(kind)) {
- for (TaskRepository repository : repositoryMap.get(kind)) {
- if (stripSlashes(repository.getRepositoryUrl()).equals(urlString)) {
- return repository;
- }
- }
- }
- return null;
- }
-
- /**
- * @return first repository that matches the given url
- */
- public TaskRepository getRepository(String urlString) {
- Assert.isNotNull(urlString);
- urlString = stripSlashes(urlString);
- for (String kind : repositoryMap.keySet()) {
- for (TaskRepository repository : repositoryMap.get(kind)) {
- if (stripSlashes(repository.getRepositoryUrl()).equals(urlString)) {
- return repository;
- }
- }
- }
- return null;
- }
-
- /**
- * @return the first connector to accept the URL
- */
- public AbstractRepositoryConnector getConnectorForRepositoryTaskUrl(String url) {
- Assert.isNotNull(url);
- for (AbstractRepositoryConnector connector : getRepositoryConnectors()) {
- if (connector.getRepositoryUrlFromTaskUrl(url) != null) {
- for (TaskRepository repository : getRepositories(connector.getConnectorKind())) {
- if (url.startsWith(repository.getRepositoryUrl())) {
- return connector;
- }
- }
- }
- }
- return null;
- }
-
- public Set<TaskRepository> getRepositories(String kind) {
- Assert.isNotNull(kind);
- if (repositoryMap.containsKey(kind)) {
- return repositoryMap.get(kind);
- } else {
- return Collections.emptySet();
- }
- }
-
- public List<TaskRepository> getAllRepositories() {
- List<TaskRepository> repositories = new ArrayList<TaskRepository>();
- for (AbstractRepositoryConnector repositoryConnector : repositoryConnectors.values()) {
- if (repositoryMap.containsKey(repositoryConnector.getConnectorKind())) {
- repositories.addAll(repositoryMap.get(repositoryConnector.getConnectorKind()));
- }
- }
- return repositories;
- }
-
- /**
- * TODO: implement default support, this just returns first found
- */
- public TaskRepository getDefaultRepository(String kind) {
- // HACK: returns first repository found
- if (repositoryMap.containsKey(kind)) {
- for (TaskRepository repository : repositoryMap.get(kind)) {
- return repository;
- }
- } else {
- Collection<Set<TaskRepository>> values = repositoryMap.values();
- if (!values.isEmpty()) {
- Set<TaskRepository> repoistorySet = values.iterator().next();
- return repoistorySet.iterator().next();
- }
- }
- return null;
- }
-
- Map<String, Set<TaskRepository>> readRepositories(String repositoriesFilePath) {
-
- repositoryMap.clear();
- orphanedRepositories.clear();
-
- loadRepositories(repositoriesFilePath);
-
-// for (IRepositoryListener listener : listeners) {
-// try {
-// listener.repositoriesRead();
-// } catch (Throwable t) {
-// StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN,
-// "Repository listener failed", t));
-// }
-// }
- return repositoryMap;
- }
-
- private void loadRepositories(String repositoriesFilePath) {
- boolean migration = false;
- // String dataDirectory =
- // TasksUiPlugin.getDefault().getDataDirectory();
- File repositoriesFile = new File(repositoriesFilePath);
-
- // Will only load repositories for which a connector exists
- for (AbstractRepositoryConnector repositoryConnector : repositoryConnectors.values()) {
- repositoryMap.put(repositoryConnector.getConnectorKind(), new HashSet<TaskRepository>());
- }
- if (repositoriesFile.exists()) {
- Set<TaskRepository> repositories = externalizer.readRepositoriesFromXML(repositoriesFile);
- if (repositories != null && repositories.size() > 0) {
- for (TaskRepository repository : repositories) {
-
- if (removeHttpAuthMigration(repository)) {
- migration = true;
- }
-
- if (migrateAnonymousRepository(repository)) {
- migration = true;
- }
-
- if (repositoryMap.containsKey(repository.getConnectorKind())) {
- repositoryMap.get(repository.getConnectorKind()).add(repository);
- repository.addChangeListener(PROPERTY_CHANGE_LISTENER);
- } else {
- orphanedRepositories.add(repository);
- }
- }
- }
- if (migration) {
- saveRepositories(repositoriesFilePath);
- }
- }
- }
-
- @SuppressWarnings("deprecation")
- private boolean removeHttpAuthMigration(TaskRepository repository) {
- String httpusername = repository.getProperty(TaskRepository.AUTH_HTTP_USERNAME);
- String httppassword = repository.getProperty(TaskRepository.AUTH_HTTP_PASSWORD);
- if (httpusername != null && httppassword != null) {
- repository.removeProperty(TaskRepository.AUTH_HTTP_USERNAME);
- repository.removeProperty(TaskRepository.AUTH_HTTP_PASSWORD);
- if (httpusername.length() > 0 && httppassword.length() > 0) {
- repository.setHttpAuthenticationCredentials(httpusername, httppassword);
- }
- return true;
- }
- return false;
- }
-
- // Migration 2.0M1 - 2.0M2
- private boolean migrateAnonymousRepository(TaskRepository repository) {
- if (repository.getProperty(TaskRepository.ANONYMOUS_LOGIN) == null) {
- if ((repository.getUserName() == null || repository.getPassword() == null)
- || ("".equals(repository.getUserName()) && "".equals(repository.getPassword()))) {
- repository.setAnonymous(true);
- } else {
- repository.setAnonymous(false);
- }
- return true;
- }
- return false;
- }
-
- @Deprecated
- public void setSynchronizationTime(TaskRepository repository, String syncTime, String repositoriesFilePath) {
- repository.setSynchronizationTimeStamp(syncTime);
- saveRepositories(repositoriesFilePath);
- }
-
- protected synchronized boolean saveRepositories(String destinationPath) {
-// if (!Platform.isRunning()) {// || TasksUiPlugin.getDefault() == null) {
-// return false;
-// }
- Set<TaskRepository> repositoriesToWrite = new HashSet<TaskRepository>(getAllRepositories());
- // if for some reason a repository is added/changed to equal one in the
- // orphaned set the orphan is discarded
- for (TaskRepository repository : orphanedRepositories) {
- if (!repositoriesToWrite.contains(repository)) {
- repositoriesToWrite.add(repository);
- }
- }
-
- try {
- File repositoriesFile = new File(destinationPath);
- externalizer.writeRepositoriesToXML(repositoriesToWrite, repositoriesFile);
- } catch (Throwable t) {
- StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN, "Could not save repositories", t));
- return false;
- }
- return true;
- }
-
- /**
- * For testing.
- */
- public void clearRepositories(String repositoriesFilePath) {
- repositoryMap.clear();
- orphanedRepositories.clear();
- saveRepositories(repositoriesFilePath);
- }
-
- public void notifyRepositorySettingsChanged(TaskRepository repository) {
- for (IRepositoryListener listener : listeners) {
- listener.repositorySettingsChanged(repository);
- }
- }
-
- public void insertRepositories(Set<TaskRepository> repositories, String repositoryFilePath) {
- for (TaskRepository repository : repositories) {
- if (getRepository(repository.getConnectorKind(), repository.getRepositoryUrl()) == null) {
- addRepository(repository);
- }
- }
- }
-
- public boolean isOwnedByUser(ITask task) {
- if (task instanceof LocalTask) {
- return true;
- }
-
- ITask repositoryTask = task;
- TaskRepository repository = getRepository(repositoryTask.getConnectorKind(), repositoryTask.getRepositoryUrl());
- if (repository != null && repositoryTask.getOwner() != null) {
- return repositoryTask.getOwner().equals(repository.getUserName());
- }
-
- return false;
- }
-
- /**
- * @param repository
- * with new url
- * @param oldUrl
- * previous url for this repository
- */
- public void notifyRepositoryUrlChanged(TaskRepository repository, String oldUrl) {
- for (IRepositoryListener listener : listeners) {
- listener.repositoryUrlChanged(repository, oldUrl);
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskTask.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskTask.java
deleted file mode 100644
index 972df31aa..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskTask.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core;
-
-/**
- * @author Steffen Pingel
- */
-public class TaskTask extends AbstractTask {
-
- private final String connectorKind;
-
- public TaskTask(String connectorKind, String repositoryUrl, String taskId) {
- super(repositoryUrl, taskId, "");
- this.connectorKind = connectorKind;
- this.taskKey = taskId;
- }
-
- @Override
- public String getConnectorKind() {
- return connectorKind;
- }
-
- @Override
- public String getTaskKey() {
- return taskKey;
- }
-
- @Override
- public boolean isLocal() {
- return false;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TasksModel.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TasksModel.java
deleted file mode 100644
index 8e367ca1e..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TasksModel.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core;
-
-import java.util.Map;
-import java.util.WeakHashMap;
-
-import org.eclipse.mylyn.tasks.core.IRepositoryManager;
-import org.eclipse.mylyn.tasks.core.IRepositoryModel;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITaskAttachment;
-import org.eclipse.mylyn.tasks.core.ITaskComment;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.mylyn.tasks.core.data.TaskData;
-
-/**
- * @author Steffen Pingel
- */
-public class TasksModel implements IRepositoryModel {
-
- private int queryCount;
-
- private final IRepositoryManager repositoryManager;
-
- private final Map<String, ITask> taskByHandle = new WeakHashMap<String, ITask>();
-
- private final TaskList taskList;
-
- public TasksModel(TaskList taskList, IRepositoryManager repositoryManager) {
- this.taskList = taskList;
- this.repositoryManager = repositoryManager;
- initialize();
- }
-
- private void initialize() {
- repositoryManager.addListener(new TaskRepositoryAdapter() {
- @Override
- public void repositoryAdded(TaskRepository repository) {
- taskList.addUnmatchedContainer(new UnmatchedTaskContainer(repository.getConnectorKind(),
- repository.getRepositoryUrl()));
- }
-
- @Override
- public void repositoryRemoved(TaskRepository repository) {
- // TODO
- //taskList.removeUnmatchedContainer(taskList.getUnmatchedContainer(repository.getRepositoryUrl()));
- }
- });
- }
-
- public IRepositoryQuery createQuery(TaskRepository taskRepository) {
- String handle = "query-" + ++queryCount;
- RepositoryQuery query = new RepositoryQuery(taskRepository.getConnectorKind(), handle);
- query.setRepositoryUrl(taskRepository.getRepositoryUrl());
- return query;
- }
-
- public synchronized ITask createTask(TaskRepository taskRepository, String taskId) {
- String handle = getTaskHandle(taskRepository, taskId);
- ITask task = taskByHandle.get(handle);
- if (task == null) {
- task = new TaskTask(taskRepository.getConnectorKind(), taskRepository.getRepositoryUrl(), taskId);
- taskByHandle.put(handle, task);
- }
- return task;
- }
-
- public ITaskAttachment createTaskAttachment(TaskAttribute taskAttribute) {
- TaskData taskData = taskAttribute.getTaskData();
- TaskRepository taskRepository = repositoryManager.getRepository(taskData.getConnectorKind(),
- taskData.getRepositoryUrl());
- ITask task = getTask(taskRepository, taskData.getTaskId());
- TaskAttachment taskAttachment = new TaskAttachment(taskRepository, task, taskAttribute);
- taskData.getAttributeMapper().updateTaskAttachment(taskAttachment, taskAttribute);
- return taskAttachment;
- }
-
- public ITaskComment createTaskComment(TaskAttribute taskAttribute) {
- TaskData taskData = taskAttribute.getTaskData();
- TaskRepository taskRepository = repositoryManager.getRepository(taskData.getConnectorKind(),
- taskData.getRepositoryUrl());
- ITask task = getTask(taskRepository, taskData.getTaskId());
- TaskComment taskComment = new TaskComment(taskRepository, task, taskAttribute);
- taskData.getAttributeMapper().updateTaskComment(taskComment, taskAttribute);
- return taskComment;
- }
-
- public synchronized ITask getTask(String handleIdentifier) {
- ITask task = taskByHandle.get(handleIdentifier);
- if (task == null) {
- task = taskList.getTask(handleIdentifier);
- }
- return task;
- }
-
- public synchronized ITask getTask(TaskRepository taskRepository, String taskId) {
- return getTask(getTaskHandle(taskRepository, taskId));
- }
-
- private String getTaskHandle(TaskRepository taskRepository, String taskId) {
- return RepositoryTaskHandleUtil.getHandle(taskRepository.getRepositoryUrl(), taskId);
- }
-
- public TaskRepository getTaskRepository(String connectorKind, String repositoryUrl) {
- TaskRepository taskRepository = repositoryManager.getRepository(connectorKind, repositoryUrl);
- if (taskRepository == null) {
- taskRepository = new TaskRepository(connectorKind, repositoryUrl);
- repositoryManager.addRepository(taskRepository);
- }
- return taskRepository;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/UncategorizedTaskContainer.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/UncategorizedTaskContainer.java
deleted file mode 100644
index 9ddf63baf..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/UncategorizedTaskContainer.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core;
-
-import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
-
-/**
- * Category created for the user to hold uncategorized tasks.
- *
- * @author Rob Elves
- */
-public class UncategorizedTaskContainer extends AbstractTaskCategory {
-
- public static final String LABEL = "Uncategorized";
-
- public static final String HANDLE = LABEL;
-
- public UncategorizedTaskContainer() {
- super(HANDLE);
- }
-
- @Override
- public String getPriority() {
- return PriorityLevel.P1.toString();
- }
-
- @Override
- public String getHandleIdentifier() {
- return HANDLE;
- }
-
- @Override
- public String getSummary() {
- return LABEL;
- }
-
- @Override
- public boolean isUserManaged() {
- return false;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/UnmatchedTaskContainer.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/UnmatchedTaskContainer.java
deleted file mode 100644
index 184dbbb29..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/UnmatchedTaskContainer.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core;
-
-import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
-
-/**
- * Holds orphaned or uncategorized tasks for a given repository
- *
- * @author Rob Elves
- */
-public class UnmatchedTaskContainer extends AbstractTaskCategory {
-
- public static final String LABEL = "Uncategorized";
-
- public static final String HANDLE = "orphans";
-
- private String repositoryUrl;
-
- private final String connectorKind;
-
- public UnmatchedTaskContainer(String connectorKind, String repositoryUrl) {
- super(repositoryUrl + "-" + HANDLE);
- this.repositoryUrl = repositoryUrl;
- this.connectorKind = connectorKind;
- }
-
- @Override
- public String getPriority() {
- return PriorityLevel.P1.toString();
- }
-
- @Override
- public String getSummary() {
- return "Unmatched [" + getRepositoryUrl() + "]";
- }
-
- @Override
- public boolean isUserManaged() {
- return false;
- }
-
- public String getRepositoryUrl() {
- return repositoryUrl;
- }
-
- public String getConnectorKind() {
- return connectorKind;
- }
-
- /**
- * setting will also refactor handle
- */
- public void setRepositoryUrl(String repositoryUrl) {
- this.repositoryUrl = repositoryUrl;
- this.setHandleIdentifier(repositoryUrl + "-" + HANDLE);
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/WeekDateRange.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/WeekDateRange.java
deleted file mode 100644
index e56a29f1e..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/WeekDateRange.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core;
-
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.List;
-
-/**
- * @author Rob Elves
- */
-public class WeekDateRange extends DateRange {
-
- private final List<DateRange> days = new ArrayList<DateRange>();
-
- public WeekDateRange(Calendar startDate, Calendar endDate) {
- super(startDate, endDate);
- }
-
- public List<DateRange> getRemainingDays() {
- List<DateRange> remainingDays = new ArrayList<DateRange>();
- for (DateRange dayDateRange : getDaysOfWeek()) {
- if (!dayDateRange.isPast()) {
- remainingDays.add(dayDateRange);
- }
- }
- return remainingDays;
- }
-
- public List<DateRange> getDaysOfWeek() {
- if (days.isEmpty()) {
- for (int x = TaskActivityUtil.getStartDay(); x < (TaskActivityUtil.getStartDay() + 7); x++) {
- Calendar dayStart = TaskActivityUtil.getCalendar();
- dayStart.setTime(getStartDate().getTime());
- TaskActivityUtil.snapStartOfDay(dayStart);
-
- Calendar dayEnd = TaskActivityUtil.getCalendar();
- dayEnd.setTime(getStartDate().getTime());
- TaskActivityUtil.snapEndOfDay(dayEnd);
-
- if (x > 7) {
- dayStart.set(Calendar.DAY_OF_WEEK, x % 7);
- dayEnd.set(Calendar.DAY_OF_WEEK, x % 7);
- } else {
- dayStart.set(Calendar.DAY_OF_WEEK, x);
- dayEnd.set(Calendar.DAY_OF_WEEK, x);
- }
-
- days.add(new DateRange(dayStart, dayEnd));
- }
- }
- return days;
- }
-
- /**
- * @return today's DayDateRange, null if does not exist (now > endDate)
- */
- public DateRange getToday() {
- DateRange today = null;
- Calendar now = TaskActivityUtil.getCalendar();
- for (DateRange range : getDaysOfWeek()) {
- if (range.includes(now)) {
- today = range;
- break;
- }
- }
- if (today == null) {
- Calendar todayStart = TaskActivityUtil.getCalendar();
- TaskActivityUtil.snapStartOfDay(todayStart);
- Calendar todayEnd = TaskActivityUtil.getCalendar();
- TaskActivityUtil.snapEndOfDay(todayEnd);
- today = new DateRange(todayStart, todayEnd);
- }
- return today;
- }
-
- public boolean isCurrentWeekDay(DateRange range) {
- if (range == null) {
- return false;
- }
- return getDaysOfWeek().contains(range);
- }
-
- public DateRange getDayOfWeek(int dayNum) {
- if (dayNum > 0 && dayNum <= 7) {
- for (DateRange day : getDaysOfWeek()) {
- if (day.getStartDate().get(Calendar.DAY_OF_WEEK) == dayNum) {
- return day;
- }
- }
- }
- return null;
- }
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/ElementHandler.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/ElementHandler.java
deleted file mode 100644
index 15ac6d455..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/ElementHandler.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core.data;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
-
-class ElementHandler extends DefaultHandler {
-
- protected final StringBuilder currentElementText;
-
- private ElementHandler currentHandler;
-
- private final String elementName;
-
- private final Map<String, ElementHandler> handlers;
-
- private final ElementHandler parent;
-
- public ElementHandler(ElementHandler parent, String elementName) {
- this.parent = parent;
- this.elementName = elementName;
- this.handlers = new HashMap<String, ElementHandler>();
- this.currentElementText = new StringBuilder();
- }
-
- public void addElementHandler(ElementHandler handler) {
- handlers.put(handler.getElementName(), handler);
- }
-
- @Override
- public void characters(char[] ch, int start, int length) throws SAXException {
- if (currentHandler != null) {
- currentHandler.characters(ch, start, length);
- } else {
- currentElementText.append(ch, start, length);
- }
- }
-
- protected void done(ElementHandler elementHandler) {
- currentHandler = null;
- }
-
- protected void end(String uri, String localName, String name) {
- }
-
- @Override
- public void endElement(String uri, String localName, String name) throws SAXException {
- if (currentHandler != null) {
- currentHandler.endElement(uri, localName, name);
- } else if (elementName.equals(localName)) {
- end(uri, localName, name);
- if (parent != null) {
- parent.done(this);
- }
- }
- }
-
- protected void clearCurrentElementText() {
- currentElementText.setLength(0);
- }
-
- protected String getCurrentElementText() {
- return currentElementText.toString();
- }
-
- public String getElementName() {
- return elementName;
- }
-
- protected String getOptionalValue(Attributes attributes, String name) throws SAXException {
- String value = attributes.getValue(name);
- if (value == null) {
- return "";
- }
- return value;
- }
-
- public ElementHandler getParent() {
- return parent;
- }
-
- protected String getValue(Attributes attributes, String name) throws SAXException {
- String value = attributes.getValue(name);
- if (value == null) {
- throw new SAXException("Missing required attribute \"" + name + "\"");
- }
- return value;
- }
-
- public void removeElementHandler(ElementHandler handler) {
- handlers.remove(handler.getElementName());
- }
-
- protected void start(String uri, String localName, String name, Attributes attributes) throws SAXException {
- }
-
- @Override
- public void startElement(String uri, String localName, String name, Attributes attributes) throws SAXException {
- if (currentHandler == null) {
- ElementHandler handler = handlers.get(name);
- if (handler != null) {
- currentHandler = handler;
- currentHandler.start(uri, localName, name, attributes);
- }
- } else if (currentHandler != null) {
- currentHandler.startElement(uri, localName, name, attributes);
- }
- }
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/FileTaskAttachmentSource.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/FileTaskAttachmentSource.java
deleted file mode 100644
index a6c9dab1b..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/FileTaskAttachmentSource.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core.data;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.InputStream;
-
-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.internal.tasks.core.ITasksCoreConstants;
-import org.eclipse.mylyn.tasks.core.data.AbstractTaskAttachmentSource;
-
-/**
- * @author Steffen Pingel
- */
-public class FileTaskAttachmentSource extends AbstractTaskAttachmentSource {
-
- private static final String CONTENT_TYPE_BINARY = "application/octet-stream";
-
- private String contentType = CONTENT_TYPE_BINARY;
-
- private String description;
-
- private final File file;
-
- private String name;
-
- public FileTaskAttachmentSource(File file) {
- this.file = file;
- this.name = file.getName();
- }
-
- @Override
- public InputStream createInputStream(IProgressMonitor monitor) throws CoreException {
- try {
- return new FileInputStream(file);
- } catch (FileNotFoundException e) {
- throw new CoreException(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN, e.getMessage(), e));
- }
- }
-
- @Override
- public String getContentType() {
- return contentType;
- }
-
- @Override
- public String getDescription() {
- return description;
- }
-
- @Override
- public long getLength() {
- return file.length();
- }
-
- @Override
- public String getName() {
- return name;
- }
-
- @Override
- public boolean isLocal() {
- return true;
- }
-
- public void setContentType(String contentType) {
- this.contentType = contentType;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/ITaskDataConstants.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/ITaskDataConstants.java
deleted file mode 100644
index 40230cf98..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/ITaskDataConstants.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core.data;
-
-public interface ITaskDataConstants {
-
- static final String ATTRIBUTE_TASK_KIND = "taskKind";
-
- static final String ATTRIBUTE_IS_PATCH = "isPatch";
-
- static final String ATTRIBUTE_IS_OBSOLETE = "isObsolete";
-
- static final String ATTRIBUTE_CREATOR = "creator";
-
- static final String ATTRIBUTE_NUMBER = "number";
-
- static final String ATTRIBUTE_HAS_ATTACHMENT = "hasAttachment";
-
- static final String ATTRIBUTE_ATTACHMENT_ID = "attachmentId";
-
- static final String ATTRIBUTE_KNOB_NAME = "knob_name";
-
- static final String ATTRIBUTE_OPERATION_NAME = "operationName";
-
- static final String ATTRIBUTE_OPTION_NAME = "optionName";
-
- static final String ATTRIBUTE_OPTION_SELECTION = "optionSelection";
-
- static final String ATTRIBUTE_IS_CHECKED = "isChecked";
-
- static final String ATTRIBUTE_INPUT_NAME = "inputName";
-
- static final String ATTRIBUTE_INPUT_VALUE = "inputValue";
-
- static final String ATTRIBUTE_READONLY = "readonly";
-
- static final String ATTRIBUTE_HIDDEN = "hidden";
-
- static final String ATTRIBUTE_PARAMETER = "parameter";
-
- static final String ATTRIBUTE_VALUE = "value";
-
- static final String ELEMENT_META = "meta";
-
- static final String ELEMENT_OPTION = "option";
-
- static final String ELEMENT_VALUE = "value";
-
- static final String ELEMENT_ATTRIBUTE = "Attribute";
-
- static final String ELEMENT_NAME = "name";
-
- static final String ELEMENT_VALUES = "values";
-
- static final String ELEMENT_OPTIONS = "options";
-
- static final String ELEMENT_META_DATA = "MetaData";
-
- static final String ELEMENT_OPERATION = "Operation";
-
- static final String ELEMENT_COMMENT = "Comment";
-
- static final String ELEMENT_ATTACHMENT = "Attachment";
-
- static final String ATTRIBUTE_REPOSITORY_KIND = "repositoryKind";
-
- static final String ATTRIBUTE_CONNECTOR_KIND = "connectorKind";
-
- static final String ATTRIBUTE_REPOSITORY_URL = "repositoryUrl";
-
- static final String ATTRIBUTE_KEY = "key";
-
- static final String ATTRIBUTE_ID = "id";
-
- static final String ATTRIBUTE_NAME = "name";
-
- static final String ELEMENT_EDITS_DATA = "EditsData";
-
- static final String ELEMENT_OLD_DATA = "OldData";
-
- static final String ELEMENT_NEW_DATA = "NewData";
-
- static final String ATTRIBUTE_VERSION = "version";
-
- static final String ELEMENT_TASK_STATE = "TaskState";
-
- static final String ELEMENT_KEY = "key";
-
- static final String ATTRIBUTE_TASK_ID = "taskId";
-
- static final String ELEMENT_ATTRIBUTES = "Attributes";
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/ITaskDataManagerListener.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/ITaskDataManagerListener.java
deleted file mode 100644
index 246655289..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/ITaskDataManagerListener.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core.data;
-
-/**
- * @author Steffen Pingel
- */
-public interface ITaskDataManagerListener {
-
- public abstract void taskDataUpdated(TaskDataManagerEvent event);
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataExternalizer.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataExternalizer.java
deleted file mode 100644
index 068c2558e..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataExternalizer.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core.data;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import javax.xml.transform.OutputKeys;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.sax.SAXTransformerFactory;
-import javax.xml.transform.sax.TransformerHandler;
-import javax.xml.transform.stream.StreamResult;
-
-import org.eclipse.core.runtime.ISafeRunnable;
-import org.eclipse.core.runtime.SafeRunner;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.IRepositoryManager;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.data.AbstractTaskDataHandler;
-import org.eclipse.mylyn.tasks.core.data.ITaskDataWorkingCopy;
-import org.eclipse.mylyn.tasks.core.data.TaskData;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.helpers.XMLReaderFactory;
-
-/**
- * @author Steffen Pingel
- */
-public class TaskDataExternalizer {
-
- private final IRepositoryManager taskRepositoryManager;
-
- public TaskDataExternalizer(IRepositoryManager taskRepositoryManager) {
- this.taskRepositoryManager = taskRepositoryManager;
- }
-
- private void migrate(final TaskDataState taskDataState) throws IOException {
- // for testing
- if (taskRepositoryManager == null) {
- return;
- }
-
- String connectorKind = taskDataState.getConnectorKind();
- AbstractRepositoryConnector connector = taskRepositoryManager.getRepositoryConnector(connectorKind);
- if (connector == null) {
- throw new IOException("No repository connector for kind \"" + connectorKind + "\" found");
- }
-
- String repositoryUrl = taskDataState.getRepositoryUrl();
- final TaskRepository taskRepository = taskRepositoryManager.getRepository(connectorKind, repositoryUrl);
- if (taskRepository == null) {
- throw new IOException("Repository \"" + repositoryUrl + "\" not found for kind \"" + connectorKind + "\"");
- }
-
- final AbstractTaskDataHandler taskDataHandler = connector.getTaskDataHandler();
- if (taskDataHandler != null) {
- migrate(taskDataState.getLastReadData(), taskRepository, taskDataHandler);
- migrate(taskDataState.getRepositoryData(), taskRepository, taskDataHandler);
- migrate(taskDataState.getEditsData(), taskRepository, taskDataHandler);
- }
- }
-
- private void migrate(final TaskData taskData, final TaskRepository taskRepository,
- final AbstractTaskDataHandler taskDataHandler) {
- if (taskData != null) {
- SafeRunner.run(new ISafeRunnable() {
-
- public void handleException(Throwable exception) {
- // ignore
- }
-
- public void run() throws Exception {
- taskDataHandler.migrateTaskData(taskRepository, taskData);
- }
-
- });
- }
- }
-
- public TaskDataState readState(InputStream in) throws IOException {
- try {
- XMLReader parser = XMLReaderFactory.createXMLReader();
- TaskDataStateReader handler = new TaskDataStateReader(taskRepositoryManager);
- parser.setContentHandler(handler);
- parser.parse(new InputSource(in));
- TaskDataState taskDataState = handler.getTaskDataState();
- if (taskDataState != null) {
- migrate(taskDataState);
- }
- return taskDataState;
- } catch (SAXException e) {
- e.printStackTrace();
- throw new IOException("Error parsing task data: " + e.getMessage());
- }
- }
-
- public void writeState(OutputStream out, ITaskDataWorkingCopy state) throws IOException {
- try {
- SAXTransformerFactory transformerFactory = (SAXTransformerFactory) TransformerFactory.newInstance();
- TransformerHandler handler = transformerFactory.newTransformerHandler();
- Transformer serializer = handler.getTransformer();
- serializer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
- serializer.setOutputProperty(OutputKeys.INDENT, "yes");
- handler.setResult(new StreamResult(out));
- TaskDataStateWriter writer = new TaskDataStateWriter(handler);
- writer.write(state);
- } catch (TransformerException e) {
- throw new IOException("Error writing task data" + e.getMessageAndLocation());
- } catch (SAXException e) {
- throw new IOException("Error writing task data" + e.getMessage());
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataManager.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataManager.java
deleted file mode 100644
index 4b835b7fb..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataManager.java
+++ /dev/null
@@ -1,684 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core.data;
-
-import java.io.File;
-import java.io.UnsupportedEncodingException;
-import java.net.URLEncoder;
-import java.util.Collections;
-import java.util.Date;
-import java.util.List;
-import java.util.Set;
-import java.util.concurrent.CopyOnWriteArrayList;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.ISafeRunnable;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.SafeRunner;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.ITaskListRunnable;
-import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
-import org.eclipse.mylyn.internal.tasks.core.TaskActivityManager;
-import org.eclipse.mylyn.internal.tasks.core.TaskDataStorageManager;
-import org.eclipse.mylyn.internal.tasks.core.TaskList;
-import org.eclipse.mylyn.internal.tasks.core.TaskTask;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.IRepositoryManager;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.ITask.SynchronizationState;
-import org.eclipse.mylyn.tasks.core.data.ITaskDataManager;
-import org.eclipse.mylyn.tasks.core.data.ITaskDataWorkingCopy;
-import org.eclipse.mylyn.tasks.core.data.TaskData;
-
-/**
- * Encapsulates synchronization policy.
- *
- * @author Mik Kersten
- * @author Rob Elves
- * @author Steffen Pingel
- */
-public class TaskDataManager implements ITaskDataManager {
-
- private static final String ENCODING_UTF_8 = "UTF-8";
-
- private static final String EXTENSION = ".zip";
-
- private static final String FOLDER_TASKS = "tasks";
-
- private static final String FOLDER_DATA = "offline";
-
- private static final String FOLDER_TASKS_1_0 = "offline";
-
- private String dataPath;
-
- private final IRepositoryManager repositoryManager;
-
- @Deprecated
- private final TaskDataStorageManager taskDataStorageManager;
-
- private final TaskDataStore taskDataStore;
-
- private final TaskList taskList;
-
- private final TaskActivityManager taskActivityManager;
-
- private final List<ITaskDataManagerListener> listeners = new CopyOnWriteArrayList<ITaskDataManagerListener>();
-
- public TaskDataManager(TaskDataStorageManager taskDataManager, TaskDataStore taskDataStore,
- IRepositoryManager repositoryManager, TaskList taskList, TaskActivityManager taskActivityManager) {
- this.taskDataStorageManager = taskDataManager;
- this.taskDataStore = taskDataStore;
- this.repositoryManager = repositoryManager;
- this.taskList = taskList;
- this.taskActivityManager = taskActivityManager;
- }
-
- public void addListener(ITaskDataManagerListener listener) {
- listeners.add(listener);
- }
-
- public void removeListener(ITaskDataManagerListener listener) {
- listeners.remove(listener);
- }
-
- /** public for testing purposes */
- @Deprecated
- public boolean checkHasIncoming(ITask repositoryTask,
- org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData newData) {
- if (repositoryTask.getSynchronizationState() == SynchronizationState.INCOMING) {
- return true;
- }
-
- String lastModified = ((AbstractTask) repositoryTask).getLastReadTimeStamp();
- org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskAttribute modifiedDateAttribute = newData.getAttribute(org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskAttribute.DATE_MODIFIED);
- if (lastModified != null && modifiedDateAttribute != null && modifiedDateAttribute.getValue() != null) {
- if (lastModified.trim().compareTo(modifiedDateAttribute.getValue().trim()) == 0) {
- // Only set to synchronized state if not in incoming state.
- // Case of incoming->sync handled by markRead upon opening
- // or a forced synchronization on the task only.
- return false;
- }
-
- Date modifiedDate = newData.getAttributeFactory().getDateForAttributeType(
- org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskAttribute.DATE_MODIFIED,
- modifiedDateAttribute.getValue());
- Date lastModifiedDate = newData.getAttributeFactory().getDateForAttributeType(
- org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskAttribute.DATE_MODIFIED,
- lastModified);
- if (modifiedDate != null && lastModifiedDate != null && modifiedDate.equals(lastModifiedDate)) {
- return false;
- }
- }
-
- return true;
- }
-
- public ITaskDataWorkingCopy createWorkingCopy(final ITask task, final TaskData taskData) {
- Assert.isNotNull(task);
- final TaskDataState state = new TaskDataState(taskData.getConnectorKind(), taskData.getRepositoryUrl(),
- taskData.getTaskId());
- state.setRepositoryData(taskData);
- state.setLastReadData(taskData);
- state.init(TaskDataManager.this, task);
- state.setSaved(false);
- state.revert();
- return state;
- }
-
- public ITaskDataWorkingCopy getWorkingCopy(final ITask itask) throws CoreException {
- final AbstractTask task = (AbstractTask) itask;
- Assert.isNotNull(task);
- final String kind = task.getConnectorKind();
- final TaskDataState[] result = new TaskDataState[1];
- taskList.run(new ITaskListRunnable() {
- public void execute(IProgressMonitor monitor) throws CoreException {
- final File file = getMigratedFile(task, kind);
- final TaskDataState state = taskDataStore.getTaskDataState(file);
- if (state == null) {
- throw new CoreException(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN, "Task data at \""
- + file + "\" not found"));
- }
- if (task.isMarkReadPending()) {
- state.setLastReadData(state.getRepositoryData());
- }
- state.init(TaskDataManager.this, task);
- state.revert();
- switch (task.getSynchronizationState()) {
- case INCOMING:
- case INCOMING_NEW:
- task.setSynchronizationState(SynchronizationState.SYNCHRONIZED);
- // XXX legacy support for showing correct synchronization decoration in task list
- task.setLastReadTimeStamp(new Date().toString());
- break;
- case CONFLICT:
- task.setSynchronizationState(SynchronizationState.OUTGOING);
- break;
- }
- task.setMarkReadPending(true);
- result[0] = state;
- }
- });
- taskList.notifyElementChanged(task);
- return result[0];
- }
-
- public void saveWorkingCopy(final ITask itask, final TaskDataState state) throws CoreException {
- final AbstractTask task = (AbstractTask) itask;
- Assert.isNotNull(task);
- final String kind = task.getConnectorKind();
- taskList.run(new ITaskListRunnable() {
- public void execute(IProgressMonitor monitor) throws CoreException {
- final File file = getFile(task, kind);
- taskDataStore.putTaskData(ensurePathExists(file), state);
- switch (task.getSynchronizationState()) {
- case SYNCHRONIZED:
- task.setSynchronizationState(SynchronizationState.OUTGOING);
- }
- taskList.addTask(task);
- }
- });
- taskList.notifyElementChanged(task);
- }
-
- public void putUpdatedTaskData(final ITask itask, final TaskData taskData, final boolean user) throws CoreException {
- putUpdatedTaskData(itask, taskData, user, null);
- }
-
- public void putUpdatedTaskData(final ITask itask, final TaskData taskData, final boolean user, Object token)
- throws CoreException {
- final AbstractTask task = (AbstractTask) itask;
- Assert.isNotNull(task);
- Assert.isNotNull(taskData);
- final AbstractRepositoryConnector connector = repositoryManager.getRepositoryConnector(task.getConnectorKind());
- final TaskRepository repository = repositoryManager.getRepository(task.getConnectorKind(),
- task.getRepositoryUrl());
- final boolean taskDataChanged = connector.hasTaskChanged(repository, task, taskData);
- final boolean taskChanged[] = new boolean[1];
- final boolean synchronizationStateChanged[] = new boolean[1];
- if (taskDataChanged || user) {
- taskList.run(new ITaskListRunnable() {
- public void execute(IProgressMonitor monitor) throws CoreException {
- boolean newTask = false;
- if (!taskData.isPartial()) {
- File file = getMigratedFile(task, task.getConnectorKind());
- newTask = !file.exists();
- taskDataStore.putTaskData(ensurePathExists(file), taskData, task.isMarkReadPending(), user);
- task.setMarkReadPending(false);
- }
-
- taskChanged[0] = updateTaskFromTaskData(taskData, task, connector, repository);
-
- if (taskDataChanged) {
- switch (task.getSynchronizationState()) {
- case OUTGOING:
- task.setSynchronizationState(SynchronizationState.CONFLICT);
- break;
- case SYNCHRONIZED:
- if (newTask) {
- // FIXME this won't work for tasks that have partial task data
- task.setSynchronizationState(SynchronizationState.INCOMING_NEW);
- // XXX legacy support for showing correct synchronization decoration in task list
- task.setLastReadTimeStamp(null);
- } else {
- task.setSynchronizationState(SynchronizationState.INCOMING);
- }
- break;
- }
- }
- if (task.isSynchronizing()) {
- task.setSynchronizing(false);
- synchronizationStateChanged[0] = true;
- }
- }
- });
- } else {
- taskList.run(new ITaskListRunnable() {
- public void execute(IProgressMonitor monitor) throws CoreException {
- if (task.isSynchronizing()) {
- task.setSynchronizing(false);
- synchronizationStateChanged[0] = true;
- }
- }
- });
- }
- if (taskChanged[0] || taskDataChanged) {
- taskList.notifyElementChanged(task);
- fireTaskDataUpdated(task, taskChanged[0], taskData, taskDataChanged, token);
- } else if (synchronizationStateChanged[0]) {
- taskList.notifySynchronizationStateChanged(task);
- }
- }
-
- private boolean updateTaskFromTaskData(final TaskData taskData, final AbstractTask task,
- final AbstractRepositoryConnector connector, final TaskRepository repository) {
- task.setChanged(false);
- Date oldDueDate = task.getDueDate();
- connector.updateTaskFromTaskData(repository, task, taskData);
- // XXX move this to AbstractTask or use model listener to notify task activity
- // manager of due date changes
- Date newDueDate = task.getDueDate();
- if (oldDueDate != null && !oldDueDate.equals(newDueDate) || newDueDate != oldDueDate) {
- taskActivityManager.setDueDate(task, newDueDate);
- }
- return task.isChanged();
- }
-
- private File ensurePathExists(File file) {
- if (!file.getParentFile().exists()) {
- file.getParentFile().mkdirs();
- }
- return file;
- }
-
- private File getMigratedFile(ITask task, String kind) throws CoreException {
- Assert.isNotNull(task);
- Assert.isNotNull(kind);
- File file = getFile(task, kind);
- if (!file.exists()) {
- File oldFile = getFile10(task, kind);
- if (oldFile.exists()) {
- TaskDataState state = taskDataStore.getTaskDataState(oldFile);
- // save migrated task data right away
- taskDataStore.putTaskData(ensurePathExists(file), state);
- }
- }
- return file;
- }
-
- public void discardEdits(final ITask itask) throws CoreException {
- final AbstractTask task = (AbstractTask) itask;
- Assert.isNotNull(task);
- final String kind = task.getConnectorKind();
- taskList.run(new ITaskListRunnable() {
- public void execute(IProgressMonitor monitor) throws CoreException {
- File dataFile = getFile(task, kind);
- if (dataFile.exists()) {
- taskDataStore.discardEdits(dataFile);
- }
- switch (task.getSynchronizationState()) {
- case OUTGOING:
- task.setSynchronizationState(SynchronizationState.SYNCHRONIZED);
- break;
- case CONFLICT:
- task.setSynchronizationState(SynchronizationState.INCOMING);
- break;
- }
- }
- });
- taskList.notifyElementChanged(task);
- }
-
- @Deprecated
- public void discardOutgoing(AbstractTask repositoryTask) {
- taskDataStorageManager.discardEdits(repositoryTask.getRepositoryUrl(), repositoryTask.getTaskId());
- repositoryTask.setSynchronizationState(SynchronizationState.SYNCHRONIZED);
- //taskList.notifyElementChanged(repositoryTask);
- }
-
- private File findFile(ITask task, String kind) {
- File file = getFile(task, kind);
- if (file.exists()) {
- return file;
- }
- return getFile10(task, kind);
- }
-
- public String getDataPath() {
- return dataPath;
- }
-
- private File getFile(ITask task, String kind) {
- try {
-// String pathName = task.getConnectorKind() + "-"
-// + URLEncoder.encode(task.getRepositoryUrl(), ENCODING_UTF_8);
-// String fileName = kind + "-" + URLEncoder.encode(task.getTaskId(), ENCODING_UTF_8) + EXTENSION;
- String repositoryPath = task.getConnectorKind() + "-" + encode(task.getRepositoryUrl());
- String fileName = encode(task.getTaskId()) + EXTENSION;
- File path = new File(dataPath + File.separator + FOLDER_TASKS + File.separator + repositoryPath
- + File.separator + FOLDER_DATA);
- return new File(path, fileName);
- } catch (UnsupportedEncodingException e) {
- throw new RuntimeException(e);
- }
- }
-
- private String encode(String text) throws UnsupportedEncodingException {
- StringBuffer sb = new StringBuffer(text.length());
- char[] chars = text.toCharArray();
- for (char c : chars) {
- if (c >= '0' && c <= '9' || c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c == '.') {
- sb.append(c);
- } else {
- sb.append("%" + Integer.toHexString(c).toUpperCase());
- }
- }
- return sb.toString();
- }
-
- private File getFile10(ITask task, String kind) {
- try {
- String pathName = URLEncoder.encode(task.getRepositoryUrl(), ENCODING_UTF_8);
- String fileName = task.getTaskId() + EXTENSION;
- File path = new File(dataPath + File.separator + FOLDER_TASKS_1_0, pathName);
- return new File(path, fileName);
- } catch (UnsupportedEncodingException e) {
- throw new RuntimeException(e);
- }
-
- }
-
- public TaskData getTaskData(ITask task) throws CoreException {
- Assert.isNotNull(task);
- final String kind = task.getConnectorKind();
- TaskDataState state = taskDataStore.getTaskDataState(findFile(task, kind));
- if (state == null) {
- return null;
- }
- return state.getRepositoryData();
- }
-
- public TaskDataState getTaskDataState(ITask task) throws CoreException {
- Assert.isNotNull(task);
- final String kind = task.getConnectorKind();
- return taskDataStore.getTaskDataState(findFile(task, kind));
- }
-
- public TaskData getTaskData(TaskRepository taskRepository, String taskId) throws CoreException {
- Assert.isNotNull(taskRepository);
- Assert.isNotNull(taskId);
- TaskDataState state = taskDataStore.getTaskDataState(findFile(new TaskTask(taskRepository.getConnectorKind(),
- taskRepository.getRepositoryUrl(), taskId), taskRepository.getConnectorKind()));
- if (state == null) {
- return null;
- }
- return state.getRepositoryData();
- }
-
- public boolean hasTaskData(ITask task) {
- Assert.isNotNull(task);
- final String kind = task.getConnectorKind();
- return getFile(task, kind).exists();
- }
-
- public void putSubmittedTaskData(final ITask itask, final TaskData taskData) throws CoreException {
- final AbstractTask task = (AbstractTask) itask;
- Assert.isNotNull(task);
- Assert.isNotNull(taskData);
- final AbstractRepositoryConnector connector = repositoryManager.getRepositoryConnector(task.getConnectorKind());
- final TaskRepository repository = repositoryManager.getRepository(task.getConnectorKind(),
- task.getRepositoryUrl());
- taskList.run(new ITaskListRunnable() {
- public void execute(IProgressMonitor monitor) throws CoreException {
- if (!taskData.isPartial()) {
- File file = getMigratedFile(task, task.getConnectorKind());
- taskDataStore.setTaskData(ensurePathExists(file), taskData);
- task.setMarkReadPending(false);
- }
-
- updateTaskFromTaskData(taskData, task, connector, repository);
-
- task.setSynchronizationState(SynchronizationState.SYNCHRONIZED);
- task.setSynchronizing(false);
- task.setSubmitting(false);
- }
- });
- taskList.notifyElementChanged(task);
- }
-
- /**
- * Saves incoming data and updates task sync state appropriately
- *
- * @return true if call results in change of sync state
- */
- @Deprecated
- public synchronized boolean saveIncoming(final ITask itask,
- final org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData newTaskData, boolean forceSync) {
- final AbstractTask task = (AbstractTask) itask;
- Assert.isNotNull(newTaskData);
- final SynchronizationState startState = task.getSynchronizationState();
- SynchronizationState status = task.getSynchronizationState();
-
- org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData previousTaskData = taskDataStorageManager.getNewTaskData(
- task.getRepositoryUrl(), task.getTaskId());
-
- if (task.isSubmitting()) {
- status = SynchronizationState.SYNCHRONIZED;
- task.setSubmitting(false);
- TaskDataStorageManager dataManager = taskDataStorageManager;
- dataManager.discardEdits(task.getRepositoryUrl(), task.getTaskId());
-
- taskDataStorageManager.setNewTaskData(newTaskData);
- /**
- * If we set both so we don't see our own changes
- *
- * @see RepositorySynchronizationManager.setTaskRead(AbstractTask, boolean)
- */
- // taskDataManager.setOldTaskData(repositoryTask.getHandleIdentifier(),
- // newTaskData);
- } else {
-
- switch (status) {
- case OUTGOING:
- if (checkHasIncoming(task, newTaskData)) {
- status = SynchronizationState.CONFLICT;
- }
- taskDataStorageManager.setNewTaskData(newTaskData);
- break;
-
- case CONFLICT:
- // fall through to INCOMING (conflict implies incoming)
- case INCOMING:
- // only most recent incoming will be displayed if two
- // sequential incoming's /conflicts happen
-
- taskDataStorageManager.setNewTaskData(newTaskData);
- break;
- case SYNCHRONIZED:
- boolean hasIncoming = checkHasIncoming(task, newTaskData);
- if (hasIncoming) {
- status = SynchronizationState.INCOMING;
- task.setNotified(false);
- }
- if (hasIncoming || previousTaskData == null || forceSync) {
- taskDataStorageManager.setNewTaskData(newTaskData);
- }
- break;
- }
- }
- task.setSynchronizationState(status);
- return startState != task.getSynchronizationState();
- }
-
- @Deprecated
- public void saveOffline(ITask task, org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData taskData) {
- taskDataStorageManager.setNewTaskData(taskData);
- }
-
- /**
- * @param repositoryTask
- * task that changed
- * @param modifiedAttributes
- * attributes that have changed during edit session
- */
- @Deprecated
- public synchronized void saveOutgoing(AbstractTask repositoryTask,
- Set<org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskAttribute> modifiedAttributes) {
- repositoryTask.setSynchronizationState(SynchronizationState.OUTGOING);
- taskDataStorageManager.saveEdits(repositoryTask.getRepositoryUrl(), repositoryTask.getTaskId(),
- Collections.unmodifiableSet(modifiedAttributes));
- taskList.notifyElementChanged(repositoryTask);
- }
-
- public void setDataPath(String dataPath) {
- this.dataPath = dataPath;
- }
-
- /**
- * @param task
- * repository task to mark as read or unread
- * @param read
- * true to mark as read, false to mark as unread
- */
- public void setTaskRead(final ITask itask, final boolean read) {
- final AbstractTask task = (AbstractTask) itask;
- Assert.isNotNull(task);
- // legacy support
- if (!getFile(task, task.getConnectorKind()).exists()) {
- setTaskReadDeprecated(task, read);
- return;
- }
- // current api
- try {
- taskList.run(new ITaskListRunnable() {
- public void execute(IProgressMonitor monitor) throws CoreException {
- if (read) {
- switch (task.getSynchronizationState()) {
- case INCOMING:
- case INCOMING_NEW:
- task.setSynchronizationState(SynchronizationState.SYNCHRONIZED);
- task.setMarkReadPending(true);
- break;
- case CONFLICT:
- task.setSynchronizationState(SynchronizationState.OUTGOING);
- task.setMarkReadPending(true);
- break;
- }
- } else {
- switch (task.getSynchronizationState()) {
- case SYNCHRONIZED:
- task.setSynchronizationState(SynchronizationState.INCOMING);
- task.setMarkReadPending(false);
- break;
- }
- }
- }
- });
- } catch (CoreException e) {
- StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN,
- "Unexpected error while marking task read", e));
- }
- taskList.notifyElementChanged(task);
- }
-
- @Deprecated
- private void setTaskReadDeprecated(ITask itask, boolean read) {
- final AbstractTask task = (AbstractTask) itask;
- org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData taskData = taskDataStorageManager.getNewTaskData(
- task.getRepositoryUrl(), task.getTaskId());
- if (read && task.getSynchronizationState().equals(SynchronizationState.INCOMING)) {
- if (taskData != null && taskData.getLastModified() != null) {
- task.setLastReadTimeStamp(taskData.getLastModified());
- taskDataStorageManager.setOldTaskData(taskData);
- }
- task.setSynchronizationState(SynchronizationState.SYNCHRONIZED);
- taskList.notifyElementChanged(task);
- } else if (read && task.getSynchronizationState().equals(SynchronizationState.CONFLICT)) {
- if (taskData != null && taskData.getLastModified() != null) {
- task.setLastReadTimeStamp(taskData.getLastModified());
- }
- task.setSynchronizationState(SynchronizationState.OUTGOING);
- taskList.notifyElementChanged(task);
- } else if (read && task.getSynchronizationState().equals(SynchronizationState.SYNCHRONIZED)) {
- if (taskData != null && taskData.getLastModified() != null) {
- task.setLastReadTimeStamp(taskData.getLastModified());
- // By setting old every time (and not setting upon submission)
- // we see our changes
- // If condition is enabled and we save old in OUTGOING handler
- // our own changes
- // will not be displayed after submission.
- // if
- // (dataManager.getOldTaskData(repositoryTask.getHandleIdentifier())
- // == null) {
- taskDataStorageManager.setOldTaskData(taskData);
- // }
- }
-// else if (repositoryTask.getLastReadTimeStamp() == null && repositoryTask.isLocal()) {
-// // fall back for cases where the stamp is missing, set bogus date
-// repositoryTask.setLastReadTimeStamp(LocalTask.SYNC_DATE_NOW);
-// }
-
- } else if (!read && task.getSynchronizationState().equals(SynchronizationState.SYNCHRONIZED)) {
- task.setSynchronizationState(SynchronizationState.INCOMING);
- taskList.notifyElementChanged(task);
- }
-
- // for connectors that don't support task data set read date to now (bug#204741)
- if (read && taskData == null && task.isLocal()) {
- task.setLastReadTimeStamp((new Date()).toString());
- }
- }
-
- void putEdits(final ITask itask, final TaskData editsData) throws CoreException {
- final AbstractTask task = (AbstractTask) itask;
- Assert.isNotNull(task);
- final String kind = task.getConnectorKind();
- Assert.isNotNull(editsData);
- taskList.run(new ITaskListRunnable() {
- public void execute(IProgressMonitor monitor) throws CoreException {
- taskDataStore.putEdits(getFile(task, kind), editsData);
- switch (task.getSynchronizationState()) {
- case INCOMING:
- case INCOMING_NEW:
- // TODO throw exception instead?
- task.setSynchronizationState(SynchronizationState.CONFLICT);
- break;
- case SYNCHRONIZED:
- task.setSynchronizationState(SynchronizationState.OUTGOING);
- break;
- }
- }
- });
- taskList.notifySynchronizationStateChanged(task);
- }
-
- @Deprecated
- public org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData getNewTaskData(String repositoryUrl,
- String taskId) {
- return taskDataStorageManager.getNewTaskData(repositoryUrl, taskId);
- }
-
- @Deprecated
- public void setNewTaskData(org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData taskData) {
- taskDataStorageManager.setNewTaskData(taskData);
- }
-
- @Deprecated
- public TaskDataStorageManager getTaskDataStorageManager() {
- return taskDataStorageManager;
- }
-
- private void fireTaskDataUpdated(ITask task, boolean taskChanged, TaskData taskData, boolean taskDataChanged,
- Object token) {
- ITaskDataManagerListener[] array = listeners.toArray(new ITaskDataManagerListener[0]);
- if (array.length > 0) {
- final TaskDataManagerEvent event = new TaskDataManagerEvent(this, task, taskChanged, taskData,
- taskDataChanged, token);
- for (final ITaskDataManagerListener listener : array) {
- SafeRunner.run(new ISafeRunnable() {
-
- public void handleException(Throwable exception) {
- // ignore
-
- }
-
- public void run() throws Exception {
- listener.taskDataUpdated(event);
- }
-
- });
- }
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataManagerEvent.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataManagerEvent.java
deleted file mode 100644
index f6973b12b..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataManagerEvent.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core.data;
-
-import java.util.EventObject;
-
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.data.ITaskDataManager;
-import org.eclipse.mylyn.tasks.core.data.TaskData;
-
-/**
- * @author Steffen Pingel
- */
-public class TaskDataManagerEvent extends EventObject {
-
- private static final long serialVersionUID = 1L;
-
- private final ITask task;
-
- private final boolean taskChanged;
-
- private final TaskData taskData;
-
- private final boolean taskDataChanged;
-
- private final Object token;
-
- public TaskDataManagerEvent(ITaskDataManager source, ITask task, boolean taskChanged, TaskData taskData,
- boolean taskDataChanged, Object token) {
- super(source);
- this.task = task;
- this.taskChanged = taskChanged;
- this.taskData = taskData;
- this.taskDataChanged = taskDataChanged;
- this.token = token;
- }
-
- public ITask getTask() {
- return task;
- }
-
- public boolean getTaskChanged() {
- return taskChanged;
- }
-
- public TaskData getTaskData() {
- return taskData;
- }
-
- public boolean getTaskDataChanged() {
- return taskDataChanged;
- }
-
- public Object getToken() {
- return token;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataState.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataState.java
deleted file mode 100644
index 99f7830e2..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataState.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core.data;
-
-import java.util.Set;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.data.ITaskDataWorkingCopy;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.mylyn.tasks.core.data.TaskData;
-
-/**
- * @author Rob Elves
- * @author Steffen Pingel
- */
-public class TaskDataState implements ITaskDataWorkingCopy {
-
- private final String connectorKind;
-
- private TaskData editsTaskData;
-
- private TaskData lastReadTaskData;
-
- private TaskData localTaskData;
-
- private boolean saved;
-
- private TaskData repositoryTaskData;
-
- private final String repositoryUrl;
-
- private ITask task;
-
- private final String taskId;
-
- private TaskDataManager taskDataManager;
-
- public TaskDataState(String connectorKind, String repositoryUrl, String taskId) {
- Assert.isNotNull(connectorKind);
- Assert.isNotNull(repositoryUrl);
- Assert.isNotNull(taskId);
- this.connectorKind = connectorKind;
- this.repositoryUrl = repositoryUrl;
- this.taskId = taskId;
- this.saved = true;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj) {
- return true;
- }
- if (obj == null) {
- return false;
- }
- if (getClass() != obj.getClass()) {
- return false;
- }
- TaskDataState other = (TaskDataState) obj;
- return connectorKind.equals(other.connectorKind) && repositoryUrl.equals(other.repositoryUrl)
- && taskId.equals(other.taskId);
- }
-
- public String getConnectorKind() {
- return connectorKind;
- }
-
- public TaskData getEditsData() {
- return editsTaskData;
- }
-
- public TaskData getLastReadData() {
- return lastReadTaskData;
- }
-
- public TaskData getLocalData() {
- return localTaskData;
- }
-
- public TaskData getRepositoryData() {
- return repositoryTaskData;
- }
-
- public String getRepositoryUrl() {
- return repositoryUrl;
- }
-
- public String getTaskId() {
- return taskId;
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + connectorKind.hashCode();
- result = prime * result + taskId.hashCode();
- result = prime * result + repositoryUrl.hashCode();
- return result;
- }
-
- void init(TaskDataManager taskSynchronizationManager, ITask task) {
- this.taskDataManager = taskSynchronizationManager;
- this.task = task;
- }
-
- public boolean isSaved() {
- return saved;
- }
-
- public void refresh(IProgressMonitor monitor) throws CoreException {
- ITaskDataWorkingCopy state = taskDataManager.getWorkingCopy(task);
- setRepositoryData(state.getRepositoryData());
- setEditsData(state.getEditsData());
- setLastReadData(state.getLastReadData());
- revert();
- }
-
- public void revert() {
- localTaskData = new TaskData(repositoryTaskData.getAttributeMapper(), repositoryTaskData.getConnectorKind(),
- repositoryTaskData.getRepositoryUrl(), repositoryTaskData.getTaskId());
- deepCopyChildren(repositoryTaskData.getRoot(), localTaskData.getRoot());
- if (editsTaskData != null) {
- deepCopyChildren(editsTaskData.getRoot(), localTaskData.getRoot());
- } else {
- editsTaskData = new TaskData(repositoryTaskData.getAttributeMapper(),
- repositoryTaskData.getConnectorKind(), repositoryTaskData.getRepositoryUrl(),
- repositoryTaskData.getTaskId());
- }
- }
-
- private void deepCopyChildren(TaskAttribute source, TaskAttribute target) {
- for (TaskAttribute child : source.getAttributes().values()) {
- target.deepAddCopy(child);
- }
- }
-
- public void save(Set<TaskAttribute> edits, IProgressMonitor monitor) throws CoreException {
- if (edits != null) {
- for (TaskAttribute edit : edits) {
- editsTaskData.getRoot().deepAddCopy(edit);
- }
- }
- if (saved) {
- taskDataManager.putEdits(task, editsTaskData);
- } else {
- taskDataManager.saveWorkingCopy(task, this);
- setSaved(true);
- }
- }
-
- public void setEditsData(TaskData editsTaskData) {
- this.editsTaskData = editsTaskData;
- }
-
- public void setLastReadData(TaskData oldTaskData) {
- this.lastReadTaskData = oldTaskData;
- }
-
- public void setLocalTaskData(TaskData localTaskData) {
- this.localTaskData = localTaskData;
- }
-
- void setSaved(boolean saved) {
- this.saved = saved;
- }
-
- public void setRepositoryData(TaskData newTaskData) {
- this.repositoryTaskData = newTaskData;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataStateReader.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataStateReader.java
deleted file mode 100644
index 5e4bc0ecf..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataStateReader.java
+++ /dev/null
@@ -1,614 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core.data;
-
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.IRepositoryManager;
-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.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- * @author Steffen Pingel
- */
-public class TaskDataStateReader extends DefaultHandler {
-
- private class AttachmentHandler10 extends ElementHandler {
-
- private int id;
-
- private TaskAttribute attribute;
-
- private final TaskAttribute parentAttribute;
-
- public AttachmentHandler10(ElementHandler parent, TaskAttribute parentAttribute) {
- super(parent, ITaskDataConstants.ELEMENT_ATTACHMENT);
- this.parentAttribute = parentAttribute;
- }
-
- @Override
- public void start(String uri, String localName, String name, Attributes attributes) throws SAXException {
- // create a unique id for each attachment since the actual id is in a child attribute
- attribute = createAttribute(parentAttribute, TaskAttribute.PREFIX_ATTACHMENT + ++id);
- attribute.getMetaData().defaults().setReadOnly(true).setType(TaskAttribute.TYPE_ATTACHMENT);
- attribute.setValue(getValue(attributes, ITaskDataConstants.ATTRIBUTE_ID) + "");
-
- TaskAttribute child = createAttribute(attribute, TaskAttribute.ATTACHMENT_AUTHOR);
- child.setValue(getValue(attributes, ITaskDataConstants.ATTRIBUTE_CREATOR));
- child.getMetaData().putValue(TaskAttribute.META_ATTRIBUTE_TYPE, TaskAttribute.TYPE_PERSON);
-
- child = createAttribute(attribute, TaskAttribute.ATTACHMENT_IS_DEPRECATED);
- child.setValue(getValue(attributes, ITaskDataConstants.ATTRIBUTE_IS_OBSOLETE));
- child.getMetaData().putValue(TaskAttribute.META_ATTRIBUTE_TYPE, TaskAttribute.TYPE_BOOLEAN);
-
- child = createAttribute(attribute, TaskAttribute.ATTACHMENT_IS_PATCH);
- child.setValue(getValue(attributes, ITaskDataConstants.ATTRIBUTE_IS_PATCH));
- child.getMetaData().putValue(TaskAttribute.META_ATTRIBUTE_TYPE, TaskAttribute.TYPE_BOOLEAN);
-
- addElementHandler(new AttributeHandler10(this, attribute) {
- @Override
- protected String mapId(String value) {
- // migrate key for description
- if (TaskAttribute.DESCRIPTION.equals(value)) {
- return TaskAttribute.ATTACHMENT_DESCRIPTION;
- }
- return super.mapId(value);
- }
- });
- }
-
- }
-
- private class AttributeHandler10 extends ElementHandler {
-
- private TaskAttribute attribute;
-
- private final TaskAttribute parentAttribute;
-
- public AttributeHandler10(ElementHandler parent, TaskAttribute parentAttribute) {
- super(parent, ITaskDataConstants.ELEMENT_ATTRIBUTE);
- this.parentAttribute = parentAttribute;
- }
-
- @Override
- protected void end(String uri, String localName, String name) {
- // detect type
- if (attribute.getOptions().size() > 0) {
- if (attribute.getValues().size() > 1) {
- attribute.getMetaData()
- .putValue(TaskAttribute.META_ATTRIBUTE_TYPE, TaskAttribute.TYPE_MULTI_SELECT);
- } else {
- attribute.getMetaData().putValue(TaskAttribute.META_ATTRIBUTE_TYPE,
- TaskAttribute.TYPE_SINGLE_SELECT);
- }
- }
- }
-
- @Override
- public void start(String uri, String localName, String name, Attributes attributes) throws SAXException {
- String id = mapId(getValue(attributes, ITaskDataConstants.ATTRIBUTE_ID));
- String label = getValue(attributes, ITaskDataConstants.ATTRIBUTE_NAME);
- boolean hidden = Boolean.parseBoolean(getValue(attributes, ITaskDataConstants.ATTRIBUTE_HIDDEN));
- boolean readOnly = Boolean.parseBoolean(getValue(attributes, ITaskDataConstants.ATTRIBUTE_READONLY));
- attribute = parentAttribute.createAttribute(id);
- String kind = (hidden) ? null : TaskAttribute.KIND_DEFAULT;
- attribute.getMetaData().defaults().setLabel(label).setReadOnly(readOnly).setKind(kind);
-
- addElementHandler(new OptionHandler10(this, attribute));
- addElementHandler(new ValueHandler10(this, attribute));
- addElementHandler(new MetaDataHandler10(this, attribute));
- }
-
- protected String mapId(String value) {
- return value;
- }
-
- }
-
- private class AttributeHandler20 extends ElementHandler {
-
- private TaskAttribute attribute;
-
- private final TaskAttribute parentAttribute;
-
- public AttributeHandler20(ElementHandler parent, TaskAttribute parentAttribute) {
- super(parent, ITaskDataConstants.ELEMENT_ATTRIBUTE);
- this.parentAttribute = parentAttribute;
- }
-
- @Override
- public void start(String uri, String localName, String name, Attributes attributes) throws SAXException {
- String id = getValue(attributes, ITaskDataConstants.ATTRIBUTE_ID);
- attribute = parentAttribute.createAttribute(id);
-
- addElementHandler(new ValueHandler20(this, attribute));
- addElementHandler(new MapHandler20(this, attribute, ITaskDataConstants.ELEMENT_OPTION));
- addElementHandler(new MapHandler20(this, attribute, ITaskDataConstants.ELEMENT_META));
- addElementHandler(new AttributeHandler20(this, attribute));
- }
-
- }
-
- private class CommentHandler10 extends ElementHandler {
-
- private int id;
-
- private TaskAttribute attribute;
-
- private final TaskAttribute parentAttribute;
-
- public CommentHandler10(ElementHandler parent, TaskAttribute parentAttribute) {
- super(parent, ITaskDataConstants.ELEMENT_COMMENT);
- this.parentAttribute = parentAttribute;
- }
-
- @Override
- protected void end(String uri, String localName, String name) {
- TaskAttribute child = attribute.getMappedAttribute(TaskAttribute.COMMENT_TEXT);
- if (child != null) {
- child.getMetaData().putValue(TaskAttribute.META_READ_ONLY, Boolean.toString(true));
- child.getMetaData().putValue(TaskAttribute.META_ATTRIBUTE_TYPE, TaskAttribute.TYPE_LONG_RICH_TEXT);
- }
- }
-
- @Override
- public void start(String uri, String localName, String name, Attributes attributes) throws SAXException {
- attribute = createAttribute(parentAttribute, TaskAttribute.PREFIX_COMMENT + ++id);
- attribute.getMetaData().defaults().setReadOnly(true).setType(TaskAttribute.TYPE_COMMENT);
- attribute.getMetaData().putValue(TaskAttribute.META_ASSOCIATED_ATTRIBUTE_ID, TaskAttribute.COMMENT_TEXT);
- attribute.setValue(getValue(attributes, ITaskDataConstants.ATTRIBUTE_NUMBER));
-
- TaskAttribute child = createAttribute(attribute, TaskAttribute.COMMENT_ATTACHMENT_ID);
- child.setValue(getValue(attributes, ITaskDataConstants.ATTRIBUTE_ATTACHMENT_ID));
-
- child = createAttribute(attribute, TaskAttribute.COMMENT_HAS_ATTACHMENT);
- child.setValue(getValue(attributes, ITaskDataConstants.ATTRIBUTE_HAS_ATTACHMENT));
- child.getMetaData().putValue(TaskAttribute.META_ATTRIBUTE_TYPE, TaskAttribute.TYPE_BOOLEAN);
-
- child = createAttribute(attribute, TaskAttribute.COMMENT_NUMBER);
- child.setValue(getValue(attributes, ITaskDataConstants.ATTRIBUTE_NUMBER));
- child.getMetaData().putValue(TaskAttribute.META_ATTRIBUTE_TYPE, TaskAttribute.TYPE_INTEGER);
-
- addElementHandler(new AttributeHandler10(this, attribute));
- }
-
- }
-
- private class MetaDataHandler10 extends ElementHandler {
-
- private final TaskAttribute attribute;
-
- private String key;
-
- public MetaDataHandler10(ElementHandler parent, TaskAttribute attribute) {
- super(parent, ITaskDataConstants.ELEMENT_META);
- this.attribute = attribute;
- }
-
- @Override
- public void end(String uri, String localName, String name) {
- attribute.getMetaData().putValue(key, getCurrentElementText());
- }
-
- @Override
- public void start(String uri, String localName, String name, Attributes attributes) throws SAXException {
- key = getValue(attributes, ITaskDataConstants.ATTRIBUTE_KEY);
- clearCurrentElementText();
- }
-
- }
-
- private class NameHandler extends ElementHandler {
-
- private final TaskAttribute attribute;
-
- private String value;
-
- public NameHandler(ElementHandler parent, TaskAttribute attribute) {
- super(parent, ITaskDataConstants.ELEMENT_NAME);
- this.attribute = attribute;
- }
-
- @Override
- public void end(String uri, String localName, String name) {
- attribute.putOption(value, getCurrentElementText());
- }
-
- @Override
- public void start(String uri, String localName, String name, Attributes attributes) throws SAXException {
- value = getValue(attributes, ITaskDataConstants.ATTRIBUTE_VALUE);
- clearCurrentElementText();
- }
-
- }
-
- private class OperationHandler10 extends ElementHandler {
-
- private TaskAttribute attribute;
-
- private final TaskAttribute operationAttribute;
-
- private final TaskAttribute parentAttribute;
-
- private int id;
-
- public OperationHandler10(ElementHandler parent, TaskAttribute parentAttribute) {
- super(parent, ITaskDataConstants.ELEMENT_OPERATION);
- this.parentAttribute = parentAttribute;
- this.operationAttribute = createAttribute(parentAttribute, TaskAttribute.OPERATION);
- }
-
- @Override
- public void start(String uri, String localName, String name, Attributes attributes) throws SAXException {
- attribute = createAttribute(parentAttribute, TaskAttribute.PREFIX_OPERATION + ++id);
- attribute.getMetaData().putValue(TaskAttribute.META_ATTRIBUTE_TYPE, TaskAttribute.TYPE_CONTAINER);
- attribute.getMetaData().putValue(TaskAttribute.META_LABEL,
- getValue(attributes, ITaskDataConstants.ATTRIBUTE_OPERATION_NAME));
- String operationId = getValue(attributes, ITaskDataConstants.ATTRIBUTE_KNOB_NAME);
- attribute.setValue(operationId);
-
- if (Boolean.parseBoolean(getValue(attributes, ITaskDataConstants.ATTRIBUTE_IS_CHECKED))) {
- operationAttribute.setValue(operationId);
- }
-
- String value = getOptionalValue(attributes, ITaskDataConstants.ATTRIBUTE_OPTION_NAME);
- TaskAttribute child;
- if (value.length() > 0) {
- attribute.getMetaData().putValue(TaskAttribute.META_ASSOCIATED_ATTRIBUTE_ID, value);
- child = createAttribute(attribute, value);
- child.setValue(getOptionalValue(attributes, ITaskDataConstants.ATTRIBUTE_OPTION_SELECTION));
- attribute.getMetaData().defaults().setReadOnly(false).setType(TaskAttribute.TYPE_SINGLE_SELECT);
- addElementHandler(new NameHandler(this, child));
- } else {
- value = getOptionalValue(attributes, ITaskDataConstants.ATTRIBUTE_INPUT_NAME);
- if (value.length() > 0) {
- attribute.getMetaData().putValue(TaskAttribute.META_ASSOCIATED_ATTRIBUTE_ID, value);
- child = createAttribute(attribute, value);
- child.setValue(getOptionalValue(attributes, ITaskDataConstants.ATTRIBUTE_INPUT_VALUE));
- attribute.getMetaData().defaults().setReadOnly(false).setType(TaskAttribute.TYPE_SHORT_TEXT);
- }
- }
- }
-
- }
-
- private class OptionHandler10 extends ElementHandler {
-
- private final TaskAttribute attribute;
-
- private String parameter;
-
- public OptionHandler10(ElementHandler parent, TaskAttribute attribute) {
- super(parent, ITaskDataConstants.ELEMENT_OPTION);
- this.attribute = attribute;
- }
-
- @Override
- public void end(String uri, String localName, String name) {
- attribute.putOption(parameter, getCurrentElementText());
- }
-
- @Override
- public void start(String uri, String localName, String name, Attributes attributes) throws SAXException {
- parameter = getValue(attributes, ITaskDataConstants.ATTRIBUTE_PARAMETER);
- clearCurrentElementText();
- }
-
- }
-
- private class TaskDataHandler10 extends ElementHandler {
-
- private TaskData taskData;
-
- public TaskDataHandler10(TaskStateHandler parent, String elementName) {
- super(parent, elementName);
- }
-
- public TaskData getTaskData() {
- return taskData;
- }
-
- @Override
- public void start(String uri, String localName, String name, Attributes attributes) throws SAXException {
- taskData = ((TaskStateHandler) getParent()).createTaskData(attributes);
- String taskKind = getOptionalValue(attributes, ITaskDataConstants.ATTRIBUTE_TASK_KIND);
- if (taskKind != null) {
- createAttribute(taskData.getRoot(), TaskAttribute.TASK_KIND).setValue(taskKind);
- }
-
- addElementHandler(new AttributeHandler10(this, taskData.getRoot()));
- addElementHandler(new CommentHandler10(this, taskData.getRoot()));
- addElementHandler(new AttachmentHandler10(this, taskData.getRoot()));
- addElementHandler(new OperationHandler10(this, taskData.getRoot()));
- // the selected operation was never serialized, no need to read it
- }
-
- }
-
- private class TaskDataHandler20 extends ElementHandler {
-
- private TaskData taskData;
-
- public TaskDataHandler20(TaskStateHandler parent, String elementName) {
- super(parent, elementName);
- }
-
- public TaskData getTaskData() {
- return taskData;
- }
-
- @Override
- public void start(String uri, String localName, String name, Attributes attributes) throws SAXException {
- taskData = ((TaskStateHandler) getParent()).createTaskData(attributes);
-
- // skip the root node
- ElementHandler handler = new ElementHandler(this, ITaskDataConstants.ELEMENT_ATTRIBUTE);
- handler.addElementHandler(new AttributeHandler20(handler, taskData.getRoot()));
- addElementHandler(handler);
- }
-
- }
-
- private class TaskStateHandler extends ElementHandler {
-
- private TaskAttributeMapper attributeMapper;
-
- private TaskDataState state;
-
- private final String version;
-
- public TaskStateHandler(String version) {
- super(null, ITaskDataConstants.ELEMENT_TASK_STATE);
- this.version = version;
-
- if ("1.0".equals(version)) {
- addElementHandler(new TaskDataHandler10(this, ITaskDataConstants.ELEMENT_NEW_DATA));
- addElementHandler(new TaskDataHandler10(this, ITaskDataConstants.ELEMENT_OLD_DATA));
- addElementHandler(new TaskDataHandler10(this, ITaskDataConstants.ELEMENT_EDITS_DATA));
- } else if ("2.0".equals(version)) {
- addElementHandler(new TaskDataHandler20(this, ITaskDataConstants.ELEMENT_NEW_DATA));
- addElementHandler(new TaskDataHandler20(this, ITaskDataConstants.ELEMENT_OLD_DATA));
- addElementHandler(new TaskDataHandler20(this, ITaskDataConstants.ELEMENT_EDITS_DATA));
- }
- }
-
- public TaskData createTaskData(Attributes attributes) throws SAXException {
- TaskData taskData;
- if (state == null) {
- String connectorKind = getValue(attributes, ITaskDataConstants.ATTRIBUTE_REPOSITORY_KIND);
- String repositoryUrl = getValue(attributes, ITaskDataConstants.ATTRIBUTE_REPOSITORY_URL);
- String taskId = getValue(attributes, ITaskDataConstants.ATTRIBUTE_ID);
- attributeMapper = getAttributeMapper(connectorKind, repositoryUrl);
- taskData = new TaskData(attributeMapper, connectorKind, repositoryUrl, taskId);
- } else {
- taskData = new TaskData(attributeMapper, state.getConnectorKind(), state.getRepositoryUrl(),
- state.getTaskId());
- }
- String taskDataVersion = getOptionalValue(attributes, ITaskDataConstants.ATTRIBUTE_VERSION);
- if (taskDataVersion.length() > 0) {
- taskData.setVersion(taskDataVersion);
- }
- return taskData;
- }
-
- @Override
- public void done(ElementHandler elementHandler) {
- TaskData taskData;
- if (elementHandler instanceof TaskDataHandler10) {
- TaskDataHandler10 taskDataHandler = (TaskDataHandler10) elementHandler;
- TaskData data = taskDataHandler.getTaskData();
- if (state == null) {
- state = new TaskDataState(data.getConnectorKind(), data.getRepositoryUrl(), data.getTaskId());
- }
- taskData = taskDataHandler.getTaskData();
- } else {
- TaskDataHandler20 taskDataHandler = (TaskDataHandler20) elementHandler;
- taskData = taskDataHandler.getTaskData();
- }
-
- if (ITaskDataConstants.ELEMENT_NEW_DATA.equals(elementHandler.getElementName())) {
- state.setRepositoryData(taskData);
- } else if (ITaskDataConstants.ELEMENT_OLD_DATA.equals(elementHandler.getElementName())) {
- state.setLastReadData(taskData);
- } else if (ITaskDataConstants.ELEMENT_EDITS_DATA.equals(elementHandler.getElementName())) {
- state.setEditsData(taskData);
- }
- super.done(elementHandler);
- }
-
- public TaskDataState getState() {
- return state;
- }
-
- @Override
- protected void start(String uri, String localName, String name, Attributes attributes) throws SAXException {
- if ("2.0".equals(version)) {
- String connectorKind = getValue(attributes, ITaskDataConstants.ATTRIBUTE_CONNECTOR_KIND);
- String repositoryUrl = getValue(attributes, ITaskDataConstants.ATTRIBUTE_REPOSITORY_URL);
- String taskId = getValue(attributes, ITaskDataConstants.ATTRIBUTE_TASK_ID);
- attributeMapper = getAttributeMapper(connectorKind, repositoryUrl);
- state = new TaskDataState(connectorKind, repositoryUrl, taskId);
- }
- }
- }
-
- private class ValueHandler10 extends ElementHandler {
-
- private final TaskAttribute attribute;
-
- public ValueHandler10(ElementHandler parent, TaskAttribute attribute) {
- super(parent, ITaskDataConstants.ELEMENT_VALUE);
- this.attribute = attribute;
- }
-
- @Override
- public void end(String uri, String localName, String name) {
- attribute.addValue(getCurrentElementText());
- }
-
- @Override
- protected void start(String uri, String localName, String name, Attributes attributes) throws SAXException {
- clearCurrentElementText();
- }
-
- }
-
- private class ValueHandler20 extends ElementHandler {
-
- private final TaskAttribute attribute;
-
- public ValueHandler20(ElementHandler parent, TaskAttribute attribute) {
- super(parent, ITaskDataConstants.ELEMENT_VALUE);
- this.attribute = attribute;
- }
-
- @Override
- public void end(String uri, String localName, String name) {
- attribute.addValue(getCurrentElementText());
- }
-
- @Override
- protected void start(String uri, String localName, String name, Attributes attributes) throws SAXException {
- clearCurrentElementText();
- }
-
- }
-
- private class MapHandler20 extends ElementHandler {
-
- private final TaskAttribute attribute;
-
- private String key = "";
-
- private String value = "";
-
- public MapHandler20(ElementHandler parent, TaskAttribute attribute, String elementName) {
- super(parent, elementName);
- this.attribute = attribute;
- }
-
- @Override
- public void end(String uri, String localName, String name) {
- if (ITaskDataConstants.ELEMENT_OPTION.equals(getElementName())) {
- attribute.putOption(key, value);
- } else if (ITaskDataConstants.ELEMENT_META.equals(getElementName())) {
- attribute.getMetaData().putValue(key, value);
- }
- key = "";
- value = "";
- }
-
- @Override
- protected void start(String uri, String localName, String name, Attributes attributes) throws SAXException {
- addElementHandler(new TextHandler20(this, ITaskDataConstants.ELEMENT_KEY));
- addElementHandler(new TextHandler20(this, ITaskDataConstants.ELEMENT_VALUE));
- }
-
- @Override
- protected void done(ElementHandler handler) {
- if (ITaskDataConstants.ELEMENT_KEY.equals(handler.getElementName())) {
- key = handler.getCurrentElementText();
- } else if (ITaskDataConstants.ELEMENT_VALUE.equals(handler.getElementName())) {
- value = handler.getCurrentElementText();
- }
- super.done(handler);
- }
-
- }
-
- private class TextHandler20 extends ElementHandler {
-
- public TextHandler20(ElementHandler parent, String elementName) {
- super(parent, elementName);
- }
-
- @Override
- protected void start(String uri, String localName, String name, Attributes attributes) throws SAXException {
- clearCurrentElementText();
- }
-
- }
-
- private TaskStateHandler handler;
-
- private final IRepositoryManager repositoryManager;
-
- private TaskDataState result;
-
- public TaskDataStateReader(IRepositoryManager repositoryManager) {
- this.repositoryManager = repositoryManager;
- }
-
- @Override
- public void characters(char[] ch, int start, int length) throws SAXException {
- if (handler != null) {
- handler.characters(ch, start, length);
- }
- }
-
- private TaskAttribute createAttribute(TaskAttribute parent, String id) {
- TaskAttribute attribute = parent.createAttribute(id);
- attribute.getMetaData().defaults();
- return attribute;
- }
-
- @Override
- public void endElement(String uri, String localName, String name) throws SAXException {
- if (handler != null) {
- handler.endElement(uri, localName, name);
- if (ITaskDataConstants.ELEMENT_TASK_STATE.equals(name)) {
- result = handler.getState();
- handler = null;
- }
- }
- }
-
- private TaskAttributeMapper getAttributeMapper(String connectorKind, String repositoryUrl) throws SAXException {
- AbstractRepositoryConnector connector = repositoryManager.getRepositoryConnector(connectorKind);
- if (connector == null) {
- throw new SAXException("No repository connector for kind \"" + connectorKind + "\" found");
- }
-
- TaskRepository taskRepository = repositoryManager.getRepository(connectorKind, repositoryUrl);
- if (taskRepository == null) {
- throw new SAXException("Repository \"" + repositoryUrl + "\" not found for kind \"" + connectorKind + "\"");
- }
-
- final TaskAttributeMapper attributeMapper;
- AbstractTaskDataHandler taskDataHandler = connector.getTaskDataHandler();
- if (taskDataHandler != null) {
- attributeMapper = taskDataHandler.getAttributeMapper(taskRepository);
- } else {
- attributeMapper = new TaskAttributeMapper(taskRepository);
- }
- return attributeMapper;
- }
-
- public TaskDataState getTaskDataState() {
- return result;
- }
-
- @Override
- public void startElement(String uri, String localName, String name, Attributes attributes) throws SAXException {
- if (handler != null) {
- handler.startElement(uri, localName, name, attributes);
- }
- if (ITaskDataConstants.ELEMENT_TASK_STATE.equals(name)) {
- String version = attributes.getValue(ITaskDataConstants.ATTRIBUTE_VERSION);
- handler = new TaskStateHandler(version);
- handler.start(uri, localName, name, attributes);
- }
- }
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataStateWriter.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataStateWriter.java
deleted file mode 100644
index c8da51699..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataStateWriter.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core.data;
-
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.transform.sax.TransformerHandler;
-
-import org.eclipse.mylyn.tasks.core.data.ITaskDataWorkingCopy;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.mylyn.tasks.core.data.TaskData;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.AttributesImpl;
-
-/**
- * @author Steffen Pingel
- */
-public class TaskDataStateWriter {
-
- private static final String TASK_DATA_STATE_VERSION = "2.0";
-
- private static final String CDATA = "CDATA";
-
- private final TransformerHandler handler;
-
- public TaskDataStateWriter(TransformerHandler handler) {
- this.handler = handler;
- }
-
- public void write(ITaskDataWorkingCopy state) throws SAXException {
- handler.startDocument();
- AttributesImpl atts = new AttributesImpl();
- atts.addAttribute("", "", ITaskDataConstants.ATTRIBUTE_CONNECTOR_KIND, CDATA, state.getConnectorKind());
- atts.addAttribute("", "", ITaskDataConstants.ATTRIBUTE_REPOSITORY_URL, CDATA, state.getRepositoryUrl());
- atts.addAttribute("", "", ITaskDataConstants.ATTRIBUTE_TASK_ID, CDATA, state.getTaskId());
- atts.addAttribute("", "", ITaskDataConstants.ATTRIBUTE_VERSION, CDATA, TASK_DATA_STATE_VERSION);
- handler.startElement("", "", ITaskDataConstants.ELEMENT_TASK_STATE, atts);
- if (state.getRepositoryData() != null) {
- writeTaskData(state.getRepositoryData(), ITaskDataConstants.ELEMENT_NEW_DATA);
- }
- if (state.getLastReadData() != null) {
- writeTaskData(state.getLastReadData(), ITaskDataConstants.ELEMENT_OLD_DATA);
- }
- if (state.getEditsData() != null) {
- writeTaskData(state.getEditsData(), ITaskDataConstants.ELEMENT_EDITS_DATA);
- }
- handler.endElement("", "", ITaskDataConstants.ELEMENT_TASK_STATE);
- handler.endDocument();
- }
-
- private void writeTaskData(TaskData taskData, String elementName) throws SAXException {
- AttributesImpl atts = new AttributesImpl();
- atts.addAttribute("", "", ITaskDataConstants.ATTRIBUTE_CONNECTOR_KIND, CDATA, taskData.getConnectorKind());
- atts.addAttribute("", "", ITaskDataConstants.ATTRIBUTE_REPOSITORY_URL, CDATA, taskData.getRepositoryUrl());
- atts.addAttribute("", "", ITaskDataConstants.ATTRIBUTE_TASK_ID, CDATA, taskData.getTaskId());
- if (taskData.getVersion() != null) {
- atts.addAttribute("", "", ITaskDataConstants.ATTRIBUTE_VERSION, CDATA, taskData.getVersion());
- }
- handler.startElement("", "", elementName, atts);
- atts.clear();
- handler.startElement("", "", ITaskDataConstants.ELEMENT_ATTRIBUTES, atts);
- writeTaskAttribute(taskData.getRoot());
- handler.endElement("", "", ITaskDataConstants.ELEMENT_ATTRIBUTES);
- handler.endElement("", "", elementName);
- }
-
- private void writeTaskAttribute(TaskAttribute attribute) throws SAXException {
- AttributesImpl atts = new AttributesImpl();
- atts.addAttribute("", "", ITaskDataConstants.ATTRIBUTE_ID, CDATA, attribute.getId());
- handler.startElement("", "", ITaskDataConstants.ELEMENT_ATTRIBUTE, atts);
- atts.clear();
-
- handler.startElement("", "", ITaskDataConstants.ELEMENT_VALUES, atts);
- List<String> values = attribute.getValues();
- for (String value : values) {
- handler.startElement("", "", ITaskDataConstants.ELEMENT_VALUE, atts);
- handler.characters(value.toCharArray(), 0, value.length());
- handler.endElement("", "", ITaskDataConstants.ELEMENT_VALUE);
- }
- handler.endElement("", "", ITaskDataConstants.ELEMENT_VALUES);
-
- handler.startElement("", "", ITaskDataConstants.ELEMENT_OPTIONS, atts);
- writeMap(atts, attribute.getOptions(), ITaskDataConstants.ELEMENT_OPTION);
- handler.endElement("", "", ITaskDataConstants.ELEMENT_OPTIONS);
-
- handler.startElement("", "", ITaskDataConstants.ELEMENT_META_DATA, atts);
- writeMap(atts, attribute.getMetaData().getValues(), ITaskDataConstants.ELEMENT_META);
- handler.endElement("", "", ITaskDataConstants.ELEMENT_META_DATA);
-
- handler.startElement("", "", ITaskDataConstants.ELEMENT_ATTRIBUTES, atts);
- Map<String, TaskAttribute> children = attribute.getAttributes();
- for (TaskAttribute child : children.values()) {
- writeTaskAttribute(child);
- }
- handler.endElement("", "", ITaskDataConstants.ELEMENT_ATTRIBUTES);
-
- handler.endElement("", "", ITaskDataConstants.ELEMENT_ATTRIBUTE);
- }
-
- private void writeMap(AttributesImpl atts, Map<String, String> options, String elementName) throws SAXException {
- for (String key : options.keySet()) {
- String value = options.get(key);
- handler.startElement("", "", elementName, atts);
- handler.startElement("", "", ITaskDataConstants.ELEMENT_KEY, atts);
- handler.characters(key.toCharArray(), 0, key.length());
- handler.endElement("", "", ITaskDataConstants.ELEMENT_KEY);
- handler.startElement("", "", ITaskDataConstants.ELEMENT_VALUE, atts);
- handler.characters(value.toCharArray(), 0, value.length());
- handler.endElement("", "", ITaskDataConstants.ELEMENT_VALUE);
- handler.endElement("", "", elementName);
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataStore.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataStore.java
deleted file mode 100644
index ff1fcbdf5..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataStore.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.core.data;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipInputStream;
-import java.util.zip.ZipOutputStream;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
-import org.eclipse.mylyn.tasks.core.IRepositoryManager;
-import org.eclipse.mylyn.tasks.core.data.TaskData;
-
-/**
- * @author Steffen Pingel
- */
-public class TaskDataStore {
-
- private static final String FILE_NAME_INTERNAL = "data.xml";
-
- private final TaskDataExternalizer externalizer;
-
- public TaskDataStore(IRepositoryManager taskRepositoryManager) {
- this.externalizer = new TaskDataExternalizer(taskRepositoryManager);
- }
-
- public void discardEdits(File file) throws CoreException {
- TaskDataState state = readState(file);
- if (state != null) {
- state.setEditsData(null);
- }
- writeState(file, state);
- }
-
- public TaskDataState getTaskDataState(File file) throws CoreException {
- return readState(file);
- }
-
- public synchronized void putEdits(File file, TaskData data) throws CoreException {
- Assert.isNotNull(file);
- Assert.isNotNull(data);
- TaskDataState state = readState(file);
- if (state == null) {
- state = new TaskDataState(data.getConnectorKind(), data.getRepositoryUrl(), data.getTaskId());
- }
- state.setEditsData(data);
- writeState(file, state);
- }
-
- public synchronized void putTaskData(File file, TaskData data, boolean setLastRead, boolean user)
- throws CoreException {
- Assert.isNotNull(file);
- Assert.isNotNull(data);
- TaskDataState state = null;
- try {
- state = readState(file);
- } catch (CoreException e) {
- if (!user) {
- throw new CoreException(
- new Status(
- IStatus.ERROR,
- ITasksCoreConstants.ID_PLUGIN,
- "Reading of existing task data failed. Forcing synchronization will override outgoing changes.",
- e));
- }
- }
- if (state == null) {
- state = new TaskDataState(data.getConnectorKind(), data.getRepositoryUrl(), data.getTaskId());
- }
- if (setLastRead) {
- state.setLastReadData(state.getRepositoryData());
- }
- state.setRepositoryData(data);
- writeState(file, state);
- }
-
- public synchronized void setTaskData(File file, TaskData data) throws CoreException {
- Assert.isNotNull(file);
- Assert.isNotNull(data);
-
- // TODO consider reading old task data and compare submitted results to check if all outgoing changes were accepted by repository
-
- TaskDataState state = new TaskDataState(data.getConnectorKind(), data.getRepositoryUrl(), data.getTaskId());
- state.setRepositoryData(data);
- state.setEditsData(null);
- state.setLastReadData(data);
- writeState(file, state);
- }
-
- private TaskDataState readState(File file) throws CoreException {
- try {
- if (file.exists()) {
- ZipInputStream in = new ZipInputStream(new BufferedInputStream(new FileInputStream(file)));
- try {
- in.getNextEntry();
- return externalizer.readState(in);
- } finally {
- in.close();
- }
- }
- return null;
- } catch (IOException e) {
- throw new CoreException(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN, "Error reading task data",
- e));
- }
- }
-
- private void writeState(File file, TaskDataState state) throws CoreException {
- try {
- ZipOutputStream out = new ZipOutputStream(new BufferedOutputStream(new FileOutputStream(file)));
- try {
- out.setMethod(ZipOutputStream.DEFLATED);
-
- ZipEntry entry = new ZipEntry(FILE_NAME_INTERNAL);
- out.putNextEntry(entry);
-
- externalizer.writeState(out, state);
- } finally {
- out.close();
- }
- } catch (IOException e) {
- throw new CoreException(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN, "Error writing task data",
- e));
- }
- }
-
-// public synchronized void putLastRead(File file, TaskData data) throws CoreException {
-// Assert.isNotNull(file);
-// Assert.isNotNull(data);
-//
-// TaskDataState state = readState(file);
-// if (state == null) {
-// state = new TaskDataState(data.getConnectorKind(), data.getRepositoryUrl(), data.getTaskId());
-// }
-// state.setLastReadData(data);
-// writeState(file, state);
-// }
-
- public void putTaskData(File file, TaskDataState state) throws CoreException {
- writeState(file, state);
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TextTaskAttachmentSource.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TextTaskAttachmentSource.java
deleted file mode 100644
index d6ced41e4..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TextTaskAttachmentSource.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core.data;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.mylyn.tasks.core.data.AbstractTaskAttachmentSource;
-
-public class TextTaskAttachmentSource extends AbstractTaskAttachmentSource {
-
- private final String contents;
-
- public TextTaskAttachmentSource(String contents) {
- this.contents = contents;
- }
-
- @Override
- public InputStream createInputStream(IProgressMonitor monitor) throws CoreException {
- return new ByteArrayInputStream(contents.getBytes());
- }
-
- @Override
- public String getContentType() {
- return "text/plain";
- }
-
- @Override
- public String getDescription() {
- return "";
- }
-
- @Override
- public long getLength() {
- return contents.getBytes().length;
- }
-
- @Override
- public String getName() {
- return "clipboard.txt";
- }
-
- @Override
- public boolean isLocal() {
- return true;
- }
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/AbstractAttachmentHandler.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/AbstractAttachmentHandler.java
deleted file mode 100644
index ddac65584..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/AbstractAttachmentHandler.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core.deprecated;
-
-import java.io.BufferedInputStream;
-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.OperationCanceledException;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.RepositoryStatus;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-/**
- * Extend to provide facility for downloading files from the task repository.
- *
- * @author Steffen Pingel
- * @since 2.0
- */
-@Deprecated
-public abstract class AbstractAttachmentHandler {
-
- protected static final int BUFFER_SIZE = 1024;
-
- public abstract void uploadAttachment(TaskRepository repository, ITask task, ITaskAttachment attachment,
- String comment, IProgressMonitor monitor) throws CoreException;
-
- public abstract InputStream getAttachmentAsStream(TaskRepository repository, RepositoryAttachment attachment,
- IProgressMonitor monitor) throws CoreException;
-
- public abstract boolean canUploadAttachment(TaskRepository repository, ITask task);
-
- public abstract boolean canDownloadAttachment(TaskRepository repository, ITask task);
-
- public abstract boolean canDeprecate(TaskRepository repository, RepositoryAttachment attachment);
-
- /**
- * To deprecate, change the attribute on the RepositoryAttachment and pass to this method
- */
- public abstract void updateAttachment(TaskRepository repository, RepositoryAttachment attachment)
- throws CoreException;
-
- public void downloadAttachment(TaskRepository repository, RepositoryAttachment attachment, OutputStream out,
- IProgressMonitor monitor) throws CoreException {
- monitor.beginTask("Downloading attachment", IProgressMonitor.UNKNOWN);
- try {
- InputStream in = new BufferedInputStream(getAttachmentAsStream(repository, attachment,
- new SubProgressMonitor(monitor, 1)));
- try {
- byte[] buffer = new byte[BUFFER_SIZE];
- while (true) {
- int count = in.read(buffer);
- if (count == -1) {
- return;
- }
- if (monitor.isCanceled()) {
- throw new OperationCanceledException();
- }
- out.write(buffer, 0, count);
- if (monitor.isCanceled()) {
- throw new OperationCanceledException();
- }
- }
- } catch (IOException e) {
- throw new CoreException(RepositoryStatus.createStatus(repository, IStatus.ERROR,
- "org.eclipse.mylyn.tasks.core", "IO error reading attachment: " + e.getMessage()));
- } finally {
- try {
- in.close();
- } catch (IOException e) {
- StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN,
- "Error closing attachment stream", e));
- }
- }
- } finally {
- monitor.done();
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/AbstractAttributeFactory.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/AbstractAttributeFactory.java
deleted file mode 100644
index eab62f36a..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/AbstractAttributeFactory.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core.deprecated;
-
-import java.io.Serializable;
-import java.util.Date;
-
-import org.eclipse.mylyn.tasks.core.data.TaskAttributeMapper;
-
-/**
- * Extend to provide mapping between repository task attribute IDs and native repository IDs.
- *
- * @author Rob Elves
- * @since 2.0
- * @deprecated use {@link TaskAttributeMapper} instead
- */
-@SuppressWarnings("serial")
-@Deprecated
-public abstract class AbstractAttributeFactory implements Serializable {
-
- public RepositoryTaskAttribute createAttribute(String key) {
- String mapped = mapCommonAttributeKey(key);
- RepositoryTaskAttribute attribute = new RepositoryTaskAttribute(mapped, getName(mapped), isHidden(mapped));
- attribute.setReadOnly(isReadOnly(mapped));
- return attribute;
- }
-
- public abstract String mapCommonAttributeKey(String key);
-
- public abstract String getName(String key);
-
- public abstract boolean isReadOnly(String key);
-
- public abstract boolean isHidden(String key);
-
- /**
- * @return null if date cannot be parsed
- */
- public abstract Date getDateForAttributeType(String attributeKey, String dateString);
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/AbstractLegacyDuplicateDetector.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/AbstractLegacyDuplicateDetector.java
deleted file mode 100644
index 55eeee2fa..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/AbstractLegacyDuplicateDetector.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core.deprecated;
-
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
-import org.eclipse.mylyn.tasks.core.AbstractDuplicateDetector;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.data.TaskData;
-
-/**
- * Extend to provide task duplicate detection facilities to the task editor (e.g. Java stack trace matching).
- *
- * @author Gail Murphy
- * @since 3.0
- */
-@Deprecated
-public abstract class AbstractLegacyDuplicateDetector extends AbstractDuplicateDetector {
-
- public abstract RepositoryQuery getDuplicatesQuery(TaskRepository repository, RepositoryTaskData taskData);
-
- public void setKind(String kind) {
- setConnectorKind(kind);
- }
-
- public String getKind() {
- return getConnectorKind();
- }
-
- @Override
- public IRepositoryQuery getDuplicatesQuery(TaskRepository repository, TaskData taskData) {
- throw new UnsupportedOperationException();
- }
-
- /**
- * TODO: Move to a core utility class
- */
- public static String getStackTraceFromDescription(String description) {
- String stackTrace = null;
-
- if (description == null) {
- return null;
- }
-
- String punct = "!\"#$%&'\\(\\)*+,-./:;\\<=\\>?@\\[\\]^_`\\{|\\}~\n";
- String lineRegex = " *at\\s+[\\w" + punct + "]+ ?\\(.*\\) *\n?";
- Pattern tracePattern = Pattern.compile(lineRegex);
- Matcher match = tracePattern.matcher(description);
-
- if (match.find()) {
- // record the index of the first stack trace line
- int start = match.start();
- int lastEnd = match.end();
-
- // find the last stack trace line
- while (match.find()) {
- lastEnd = match.end();
- }
-
- // make sure there's still room to find the exception
- if (start <= 0) {
- return null;
- }
-
- // count back to the line before the stack trace to find the
- // exception
- int stackStart = 0;
- int index = start - 1;
- while (index > 1 && description.charAt(index) == ' ') {
- index--;
- }
-
- // locate the exception line index
- stackStart = description.substring(0, index - 1).lastIndexOf("\n");
- stackStart = (stackStart == -1) ? 0 : stackStart + 1;
-
- stackTrace = description.substring(stackStart, lastEnd);
- }
-
- return stackTrace;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/AbstractLegacyRepositoryConnector.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/AbstractLegacyRepositoryConnector.java
deleted file mode 100644
index 50767c2c7..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/AbstractLegacyRepositoryConnector.java
+++ /dev/null
@@ -1,435 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core.deprecated;
-
-import java.util.Date;
-import java.util.LinkedHashSet;
-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.NullProgressMonitor;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.IRepositoryConstants;
-import org.eclipse.mylyn.internal.tasks.core.ITaskList;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryTemplateManager;
-import org.eclipse.mylyn.internal.tasks.core.data.TaskDataManager;
-import org.eclipse.mylyn.internal.tasks.core.sync.SynchronizationSession;
-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.RepositoryTemplate;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.ITask.SynchronizationState;
-import org.eclipse.mylyn.tasks.core.data.ITaskDataManager;
-import org.eclipse.mylyn.tasks.core.data.TaskData;
-import org.eclipse.mylyn.tasks.core.data.TaskDataCollector;
-
-/**
- * Encapsulates common operations that can be performed on a task repository. Extend to connect with a Java API or WS
- * API for accessing the repository.
- *
- * @author Mik Kersten
- * @author Rob Elves
- * @author Shawn Minto
- * @since 2.0
- */
-@Deprecated
-public abstract class AbstractLegacyRepositoryConnector extends AbstractRepositoryConnector {
-
- @Deprecated
- protected Set<RepositoryTemplate> templates = new LinkedHashSet<RepositoryTemplate>();
-
- @Deprecated
- private static final long HOUR = 1000L * 3600L;
-
- @Deprecated
- private static final long DAY = HOUR * 24L;
-
- @Deprecated
- protected ITaskList taskList;
-
- private ITaskDataManager taskDataManager;
-
- private boolean userManaged = true;
-
- /**
- * @since 3.0
- */
- @Deprecated
- public void init(ITaskList taskList) {
- this.taskList = taskList;
- }
-
- /**
- * Set upon construction
- *
- * @since 3.0
- */
- public void init(ITaskDataManager taskDataManager) {
- this.taskDataManager = taskDataManager;
- }
-
- /**
- * @return null if not supported
- */
- @Deprecated
- public abstract AbstractAttachmentHandler getAttachmentHandler();
-
- /**
- * @return null if not supported
- */
- @Deprecated
- public abstract AbstractTaskDataHandler getLegacyTaskDataHandler();
-
- /**
- * create task and necessary subtasks (1 level nesting)
- *
- * @deprecated use {@link TasksUiUtil#createTask(TaskRepository, String, IProgressMonitor)} instead
- */
- @Deprecated
- public ITask createTaskFromExistingId(TaskRepository repository, String id, IProgressMonitor monitor)
- throws CoreException {
- return createTaskFromExistingId(repository, id, true, monitor);
- }
-
- /**
- * Create new repository task, adding result to tasklist
- *
- * @deprecated use {@link TasksUiUtil#createTask(TaskRepository, String, IProgressMonitor)} instead
- */
- @Deprecated
- public AbstractTask createTaskFromExistingId(TaskRepository repository, String id, boolean retrieveSubTasks,
- IProgressMonitor monitor) throws CoreException {
- AbstractTask repositoryTask = (AbstractTask) taskList.getTask(repository.getRepositoryUrl(), id);
- if (repositoryTask == null && getLegacyTaskDataHandler() != null) {
- RepositoryTaskData taskData = null;
- taskData = getLegacyTaskDataHandler().getTaskData(repository, id, new SubProgressMonitor(monitor, 1));
- if (taskData != null) {
- repositoryTask = createTaskFromTaskData(repository, taskData, retrieveSubTasks, new SubProgressMonitor(
- monitor, 1));
- if (repositoryTask != null) {
- repositoryTask.setSynchronizationState(SynchronizationState.INCOMING);
- taskList.addTask(repositoryTask);
- }
- }
- } // TODO: Handle case similar to web tasks (no taskDataHandler but
- // have tasks)
-
- return repositoryTask;
- }
-
- /**
- * Creates a new task from the given task data. Does NOT add resulting task to the tasklist
- *
- * @deprecated use {@link TasksUiUtil#createTask(TaskRepository, String, IProgressMonitor)} instead
- */
- @Deprecated
- public AbstractTask createTaskFromTaskData(TaskRepository repository, RepositoryTaskData taskData,
- boolean retrieveSubTasks, IProgressMonitor monitor) throws CoreException {
- AbstractTask repositoryTask = null;
- if (monitor == null) {
- monitor = new NullProgressMonitor();
- }
- try {
- if (taskData != null && getTaskDataManager() != null) {
- // Use connector task factory
- repositoryTask = createTask(repository.getRepositoryUrl(), taskData.getTaskId(), taskData.getTaskId()
- + ": " + taskData.getDescription());
- updateTaskFromTaskData(repository, repositoryTask, taskData);
- ((TaskDataManager) getTaskDataManager()).setNewTaskData(taskData);
-
- if (retrieveSubTasks) {
- monitor.beginTask("Creating task", getLegacyTaskDataHandler().getSubTaskIds(taskData).size());
- for (String subId : getLegacyTaskDataHandler().getSubTaskIds(taskData)) {
- if (subId == null || subId.trim().equals("")) {
- continue;
- }
- AbstractTask subTask = createTaskFromExistingId(repository, subId, false,
- new SubProgressMonitor(monitor, 1));
- if (subTask != null) {
- taskList.addTask(subTask, repositoryTask);
- }
- }
- }
- }
- } finally {
- monitor.done();
- }
- return repositoryTask;
- }
-
- /**
- * Utility method for construction of connector specific task object.
- *
- * @return instance of AbstractTask
- */
- @Deprecated
- public abstract AbstractTask createTask(String repositoryUrl, String id, String summary);
-
- /**
- * @since 2.0
- * @deprecated use {@link #performQuery(TaskRepository, RepositoryQuery, TaskDataCollector,
- * SynchronizationSession, IProgressMonitor)} instead
- */
- @Deprecated
- public IStatus performQuery(IRepositoryQuery query, TaskRepository repository, IProgressMonitor monitor,
- final ITaskCollector resultCollector) {
- return null;
- }
-
- /**
- * Updates the properties of <code>repositoryTask</code>. Invoked when on task synchronization if
- * {@link #getLegacyTaskDataHandler()} returns <code>null</code> or
- * {@link AbstractTaskDataHandler#getTaskData(TaskRepository, String)} returns <code>null</code>.
- *
- * <p>
- * Connectors that provide {@link RepositoryTaskData} objects for all tasks do not need to implement this method.
- *
- * @param repository
- * the repository
- * @param repositoryTask
- * the task that is synchronized
- * @throws CoreException
- * thrown in case of error while synchronizing
- * @see {@link #getLegacyTaskDataHandler()}
- */
- @Deprecated
- public void updateTaskFromRepository(TaskRepository repository, ITask repositoryTask, IProgressMonitor monitor)
- throws CoreException {
- }
-
- /**
- * Updates task with latest information from <code>taskData</code>.
- *
- * @return true, if properties of <code>task</code> were changed
- * @since 3.0
- */
- @Deprecated
- public abstract boolean updateTaskFromTaskData(TaskRepository repository, ITask task, RepositoryTaskData taskData);
-
- /**
- * Updates <code>existingTask</code> with latest information from <code>queryHit</code>.
- *
- * @return true, if properties of <code>existingTask</code> were changed
- * @since 2.0
- * @deprecated use {@link #updateTaskFromTaskData(TaskRepository, AbstractTask, RepositoryTaskData)} instead
- */
- @Deprecated
- public boolean updateTaskFromQueryHit(TaskRepository repository, ITask existingTask, AbstractTask queryHit) {
- boolean changed = false;
- if (existingTask.isCompleted() != queryHit.isCompleted()) {
- ((AbstractTask) existingTask).setCompleted(queryHit.isCompleted());
- changed = true;
- }
- if (hasTaskPropertyChanged(existingTask.getSummary(), queryHit.getSummary())) {
- existingTask.setSummary(queryHit.getSummary());
- changed = true;
- }
- if (hasTaskPropertyChanged(existingTask.getDueDate(), queryHit.getDueDate())) {
- existingTask.setDueDate(queryHit.getDueDate());
- changed = true;
- }
- if (hasTaskPropertyChanged(existingTask.getOwner(), queryHit.getOwner())) {
- existingTask.setOwner(queryHit.getOwner());
- changed = true;
- }
- if (hasTaskPropertyChanged(existingTask.getPriority(), queryHit.getPriority())) {
- existingTask.setPriority(queryHit.getPriority());
- changed = true;
- }
- if (hasTaskPropertyChanged(existingTask.getUrl(), queryHit.getUrl())) {
- existingTask.setUrl(queryHit.getUrl());
- changed = true;
- }
-
- return changed;
- }
-
- @Deprecated
- protected final boolean hasTaskPropertyChanged(Object existingProperty, Object newProperty) {
- // the query hit does not have this property
- if (newProperty == null) {
- return false;
- }
- return (existingProperty == null) ? true : !existingProperty.equals(newProperty);
- }
-
- @Deprecated
- public String[] getPepositoryPropertyNames() {
- return new String[] { IRepositoryConstants.PROPERTY_VERSION, IRepositoryConstants.PROPERTY_TIMEZONE,
- IRepositoryConstants.PROPERTY_ENCODING };
- }
-
- /**
- * Of <code>tasks</code> provided, return all that have changed since last synchronization of
- * <code>repository</code>.
- *
- * Tasks that need to be synchronized (i.e. task data updated) should be passed to
- * <code>collector.accept(Task)</code> method, or if repository connector can update task data, it can use
- * <code>collector.accept(RepositoryTaskData)</code> call.
- *
- * All errors should be thrown as <code>CoreException</code> for the framework to handle, since background
- * synchronizations fail silently when disconnected.
- *
- * @return false if there was no tasks changed in the repository, otherwise collection of updated tasks (within
- * <code>tasks</code> collection), so empty collection means that there are some other tasks changed
- *
- * @throws CoreException
- * @deprecated use {@link #preQuerySynchronization(TaskRepository, SynchronizationSession, IProgressMonitor)}
- * instead
- */
- @Deprecated
- public boolean markStaleTasks(TaskRepository repository, Set<AbstractTask> tasks, IProgressMonitor monitor)
- throws CoreException {
- return false;
- }
-
- /**
- * @deprecated use {@link RepositoryTemplateManager#addTemplate(String, RepositoryTemplate)} instead
- */
- @Deprecated
- public void addTemplate(RepositoryTemplate template) {
- this.templates.add(template);
- }
-
- /**
- * @deprecated use {@link RepositoryTemplateManager#getTemplates(String)} instead
- */
- @Deprecated
- public Set<RepositoryTemplate> getTemplates() {
- return templates;
- }
-
- /**
- * @deprecated use {@link RepositoryTemplateManager#removeTemplate(String, RepositoryTemplate)} instead
- */
- @Deprecated
- public void removeTemplate(RepositoryTemplate template) {
- this.templates.remove(template);
- }
-
- /**
- * @deprecated use {@link RepositoryTemplateManager#getTemplate(String, String)} instead
- */
- @Deprecated
- public RepositoryTemplate getTemplate(String label) {
- for (RepositoryTemplate template : getTemplates()) {
- if (template.label.equals(label)) {
- return template;
- }
- }
- return null;
- }
-
- /**
- * Reset and update the repository attributes from the server (e.g. products, components)
- *
- * API-3.0: Rename to updateRepositoryConfiguration()
- *
- * @deprecated Use {@link #updateRepositoryConfiguration(TaskRepository,IProgressMonitor)} instead
- */
- @Deprecated
- public void updateAttributes(TaskRepository repository, IProgressMonitor monitor) throws CoreException {
- }
-
- /**
- * Following synchronization, the timestamp needs to be recorded. This provides a default implementation for
- * determining the last synchronization timestamp. Override to return actual timestamp from repository.
- *
- * @deprecated
- */
- // API 3.0 move to utility class
- @Deprecated
- public String getSynchronizationTimestamp(TaskRepository repository, Set<ITask> changedTasks) {
- Date mostRecent = new Date(0);
- String mostRecentTimeStamp = repository.getSynchronizationTimeStamp();
- for (ITask task : changedTasks) {
- Date taskModifiedDate;
- RepositoryTaskData taskData = getTaskData(task);
- if (taskData != null && getLegacyTaskDataHandler() != null && taskData.getLastModified() != null) {
- taskModifiedDate = taskData.getAttributeFactory().getDateForAttributeType(
- RepositoryTaskAttribute.DATE_MODIFIED, taskData.getLastModified());
- } else {
- continue;
- }
-
- if (taskModifiedDate != null && taskModifiedDate.after(mostRecent)) {
- mostRecent = taskModifiedDate;
- mostRecentTimeStamp = taskData.getLastModified();
- }
- }
- return mostRecentTimeStamp;
- }
-
- @Deprecated
- private RepositoryTaskData getTaskData(ITask task) {
- if (getTaskDataManager() != null) {
- return ((TaskDataManager) getTaskDataManager()).getNewTaskData(task.getRepositoryUrl(), task.getTaskId());
- }
- return null;
- }
-
- @Deprecated
- public RepositoryTaskData getLegacyTaskData(TaskRepository repository, String taskId, IProgressMonitor monitor)
- throws CoreException {
- if (getLegacyTaskDataHandler() != null) {
- return getLegacyTaskDataHandler().getTaskData(repository, taskId, monitor);
- }
- throw new UnsupportedOperationException();
- }
-
- public void setUserManaged(boolean userManaged) {
- this.userManaged = userManaged;
- }
-
- /**
- * If false, user is unable to manipulate (i.e. rename/delete), no preferences are available.
- */
- @Override
- public boolean isUserManaged() {
- return userManaged;
- }
-
- /**
- * @since 3.0
- */
- @Override
- public boolean hasTaskChanged(TaskRepository taskRepository, ITask task, TaskData taskData) {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @since 3.0
- */
- @Override
- public void updateTaskFromTaskData(TaskRepository repository, ITask task, TaskData taskData) {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @since 3.0
- */
- @Override
- public TaskData getTaskData(TaskRepository taskRepository, String taskId, IProgressMonitor monitor)
- throws CoreException {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @since 3.0
- */
- protected ITaskDataManager getTaskDataManager() {
- return taskDataManager;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/AbstractTaskDataHandler.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/AbstractTaskDataHandler.java
deleted file mode 100644
index 5bb9ebacd..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/AbstractTaskDataHandler.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core.deprecated;
-
-import java.util.Collections;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.data.TaskDataCollector;
-
-/**
- * Responsible for retrieving and posting task data to a repository.
- *
- * @author Mik Kersten
- * @author Rob Elves
- * @author Steffen Pingel
- * @author Frank Becker
- * @since 2.0
- */
-@Deprecated
-public abstract class AbstractTaskDataHandler {
-
- /**
- * Download copy of task data from repository
- *
- * @throws CoreException
- */
- public abstract RepositoryTaskData getTaskData(TaskRepository repository, String taskId, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * Download task data for each id provided
- *
- * Override getMultiTaskData() to return true and implement this method if connector supports download of multiple
- * task data in one request.
- *
- * @since 3.0
- */
- public void getMultiTaskData(TaskRepository repository, Set<String> taskIds, TaskDataCollector collector,
- IProgressMonitor monitor) throws CoreException {
- throw new UnsupportedOperationException();
- }
-
- /**
- * Return a reference to the newly created report in the case of new task submission, null otherwise
- */
- public abstract String postTaskData(TaskRepository repository, RepositoryTaskData taskData, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * @param repositoryUrl
- * @param repositoryKind
- * @param taskKind
- * AbstractTask.DEFAULT_KIND or connector specific task kind string
- * @return
- */
- public abstract AbstractAttributeFactory getAttributeFactory(String repositoryUrl, String repositoryKind,
- String taskKind);
-
- /**
- * Initialize a new task data object with default attributes and values
- */
- public abstract boolean initializeTaskData(TaskRepository repository, RepositoryTaskData data,
- IProgressMonitor monitor) throws CoreException;
-
- /**
- * @since 2.2
- * @return false if this operation is not supported by the connector, true if initialized
- */
- public boolean initializeSubTaskData(TaskRepository repository, RepositoryTaskData taskData,
- RepositoryTaskData parentTaskData, IProgressMonitor monitor) throws CoreException {
- return false;
- }
-
- /**
- * @param task
- * the parent task, may be null
- * @param task
- * the parent task data, may be null
- * @since 2.2
- */
- public boolean canInitializeSubTaskData(ITask task, RepositoryTaskData parentTaskData) {
- return false;
- }
-
- public abstract AbstractAttributeFactory getAttributeFactory(RepositoryTaskData taskData);
-
- /**
- * @return Task id for any sub tasks referenced by the provided task data
- */
- public Set<String> getSubTaskIds(RepositoryTaskData taskData) {
- return Collections.emptySet();
- }
-
- /**
- * @return true if connector support downloading multiple task data in single request, false otherwise. If true,
- * override and implement getMultiTaskData
- */
- public boolean canGetMultiTaskData() {
- return false;
- }
-
- /**
- * Sets attribute values from <code>sourceTaskData</code> on <code>targetTaskData</code>. Sets the following
- * attributes:
- * <ul>
- * <li>summary
- * <li>description
- * </ul>
- * Other attribute values are only set if they exist on <code>sourceTaskData</code> and <code>targetTaskData</code>.
- *
- * @param sourceTaskData
- * the source task data values are copied from, the connector kind of repository of <code>sourceTaskData</code>
- * can be different from <code>targetTaskData</code>
- * @param targetTaskData
- * the target task data values are copied to, the connector kind matches the one of this task data handler
- * @since 2.2
- */
- public void cloneTaskData(RepositoryTaskData sourceTaskData, RepositoryTaskData targetTaskData) {
- targetTaskData.setSummary(sourceTaskData.getSummary());
- targetTaskData.setDescription(sourceTaskData.getDescription());
- if (sourceTaskData.getConnectorKind().equals(targetTaskData.getConnectorKind())
- && sourceTaskData.getTaskKind().equals(targetTaskData.getTaskKind())) {
- // task data objects are from the same connector, copy all attributes
- for (RepositoryTaskAttribute sourceAttribute : sourceTaskData.getAttributes()) {
- copyAttributeValue(sourceAttribute, targetTaskData.getAttribute(sourceAttribute.getId()));
- }
- } else {
- // map attributes from common schema
- String[] commonAttributeKeys = new String[] { RepositoryTaskAttribute.KEYWORDS,
- RepositoryTaskAttribute.PRIORITY, RepositoryTaskAttribute.PRODUCT,
- RepositoryTaskAttribute.COMPONENT, RepositoryTaskAttribute.RESOLUTION,
- RepositoryTaskAttribute.USER_ASSIGNED, RepositoryTaskAttribute.USER_CC, };
- for (String key : commonAttributeKeys) {
- RepositoryTaskAttribute sourceAttribute = sourceTaskData.getAttribute(key);
- if (sourceAttribute != null) {
- copyAttributeValue(sourceAttribute, targetTaskData.getAttribute(key));
- }
- }
- }
- }
-
- private void copyAttributeValue(RepositoryTaskAttribute sourceAttribute, RepositoryTaskAttribute targetAttribute) {
- if (targetAttribute == null) {
- return;
- }
-
- if (!sourceAttribute.isReadOnly() && !sourceAttribute.isHidden() && !targetAttribute.isHidden()
- && !targetAttribute.isReadOnly()) {
- targetAttribute.clearValues();
- if (targetAttribute.getOptions().size() > 0) {
- List<String> values = sourceAttribute.getValues();
- for (String value : values) {
- if (targetAttribute.getOptions().contains(value)) {
- targetAttribute.addValue(value);
- }
- }
- } else {
- List<String> values = sourceAttribute.getValues();
- for (String value : values) {
- targetAttribute.addValue(value);
- }
- }
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/AbstractTaskListFactory.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/AbstractTaskListFactory.java
deleted file mode 100644
index b06ac6ea4..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/AbstractTaskListFactory.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core.deprecated;
-
-import java.util.Collections;
-import java.util.Set;
-
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.w3c.dom.Element;
-
-/**
- * Responsible for storing and creating task list elements.
- *
- * When overriding these methods be sure not to perform network access since the Task List is read and written
- * frequently.
- *
- * @author Mik Kersten
- * @author Ken Sueda
- * @since 2.0
- */
-public abstract class AbstractTaskListFactory {
-
- public static final String KEY_QUERY = "Query";
-
- public static final String KEY_QUERY_STRING = "QueryString";
-
- public static final String KEY_TASK = "Task";
-
- /**
- * Returns true if factory can create an XML element to store given {@link AbstractTask}.
- * <p>
- * The name of the XML element is taken from the {@link #getTaskElementName()} method and additional task attributes
- * can be stored in {@link #setAdditionalAttributes(AbstractTask, Element)} method.
- *
- * @param task
- * a task instance to create XML element for
- *
- * @return true if factory can create XML element to store given {@link AbstractTask}.
- *
- * @see #getTaskElementName()
- * @see #setAdditionalAttributes(AbstractTask, Element)
- * @since 3.0
- */
- public abstract boolean canCreate(ITask task);
-
- /**
- * Returns true if factory can create an XML element to store given {@link RepositoryQuery}.
- * <p>
- * The name of the XML element is taken from the {@link #getQueryElementName(RepositoryQuery)} method and additional
- * query attributes can be stored in {@link #setAdditionalAttributes(RepositoryQuery, Element)}.
- *
- * @param query
- * a query instance to create an XML element for
- *
- * @return true if factory can create XML element to store given {@link AbstractTask}.
- *
- * @see #getQueryElementName(RepositoryQuery)
- * @see #setAdditionalAttributes(RepositoryQuery, Element)
- * @since 3.0
- */
- public boolean canCreate(IRepositoryQuery query) {
- return false;
- }
-
- /**
- * Creates an {@link RepositoryQuery} instance from given XML element matching one of the names returned by {@link
- * #getQueryElementNames()}.
- * <p>
- * Concrete implementation should populate required query configuration using method parameters and content of the
- * passed XML element. Children tasks for this query instance will be created by the caller of this method.
- *
- * @param repositoryUrl
- * an url for the corresponding task repository
- * @param queryString
- * a query string, e.g. connector-specific url used for query request
- * @param label
- * a query label or name
- * @param element
- * an XML element containing query data
- * @return instance of the {@link RepositoryQuery}
- *
- * @see #getQueryElementNames()
- * @since 3.0
- */
- public RepositoryQuery createQuery(String repositoryUrl, String queryString, String label, Element element) {
- return null;
- }
-
- /**
- * Creates an {@link AbstractTask} instance from given XML element matching name returned by {@link
- * #getTaskElementName()}.
- * <p>
- * Concrete implementation should populate required task data using method parameters and content of the passed XML
- * element. Children tasks of this task instance will be created by the caller of this method.
- *
- * @param repositoryUrl
- * an url for the corresponding task repository
- * @param queryString
- * a query string, e.g. connector-specific url used for query request
- * @param label
- * a query label or name
- * @param element
- * an XML element containing query data
- * @return instance of the {@link RepositoryQuery}
- *
- * @see #getTaskElementName()
- * @since 3.0
- */
- public abstract AbstractTask createTask(String repositoryUrl, String taskId, String label, Element element);
-
- /**
- * Returns name of the XML element used to store given query instance if {@link #canCreate(RepositoryQuery)} return
- * true for given query instance.
- *
- * @param query
- * a query instance to get the name for
- *
- * @return name for the XML element to store given query instance or null if factory doesn't support given {@link
- * RepositoryQuery} instance.
- *
- * @see #canCreate(RepositoryQuery)
- * @since 3.0
- */
- public String getQueryElementName(IRepositoryQuery query) {
- return "";
- }
-
- /**
- * Returns names for all query elements.
- * <p>
- * This collection is used to determine if this factory can create {@link RepositoryQuery} instance from the XML
- * element using {@link #createQuery(String, String, String, Element)} method.
- *
- * @return a <code>Set</code> of query element names
- *
- * @see #createQuery(String, String, String, Element)
- */
- public Set<String> getQueryElementNames() {
- return Collections.emptySet();
- }
-
- /**
- * Returns name for the XML element used to store subclass of the {@link AbstractTask} used by this factory. This
- * value is used to create an XML element when storing given {@link AbstractTask} as well as to determine if this
- * factory can read XML element with content of the task.
- *
- * @return name of the task element
- *
- * @see #canCreate(AbstractTask)
- */
- public abstract String getTaskElementName();
-
- /**
- * Adds additional attributes to an XML element used to store given {@link RepositoryQuery}.
- *
- * @param query
- * a query instance being stored
- * @param node
- * an XML element used to store given query instance
- * @since 3.0
- */
- public void setAdditionalAttributes(IRepositoryQuery query, Element node) {
- // ignore
- }
-
- /**
- * Adds additional attributes to an XML element used to store given {@link AbstractTask}
- *
- * @param task
- * a task instance being stored
- * @param node
- * an XML element used to store given task instance
- * @since 3.0
- */
- public void setAdditionalAttributes(ITask task, Element element) {
- // ignore
- }
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/AttributeContainer.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/AttributeContainer.java
deleted file mode 100644
index 01ca0b925..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/AttributeContainer.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core.deprecated;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-
-/**
- * Encapsulates attributes for task data.
- *
- * @author Rob Elves
- * @since 2.0
- * @use {@link TaskAttribute} instead
- */
-@Deprecated
-public class AttributeContainer implements Serializable {
-
- public static final String ERROR_NO_ATTRIBUTE_FACTORY = "Attribute factory not available.";
-
- private static final long serialVersionUID = 3538078709450471836L;
-
- /** The keys for the report attributes */
- private final ArrayList<String> attributeKeys;
-
- /** report attributes (status, resolution, etc.) */
- private final HashMap<String, RepositoryTaskAttribute> attributes;
-
- private transient AbstractAttributeFactory attributeFactory;
-
- private transient RepositoryTaskData taskData;
-
- public AttributeContainer(AbstractAttributeFactory attributeFactory) {
- this.attributeFactory = attributeFactory;
- attributeKeys = new ArrayList<String>();
- attributes = new HashMap<String, RepositoryTaskAttribute>();
- }
-
- public void setAttributeFactory(AbstractAttributeFactory factory) {
- this.attributeFactory = factory;
- }
-
- public void addAttribute(String key, RepositoryTaskAttribute attribute) {
- if (attributeFactory == null) {
- StatusHandler.log(new Status(IStatus.WARNING, ITasksCoreConstants.ID_PLUGIN, ERROR_NO_ATTRIBUTE_FACTORY));
- return;
- }
- String mapped = attributeFactory.mapCommonAttributeKey(key);
- if (mapped == null) {
- StatusHandler.log(new Status(IStatus.WARNING, ITasksCoreConstants.ID_PLUGIN, "Mapped value for " + key
- + " returned null."));
- return;
- }
- if (!attributes.containsKey(mapped)) {
- attributeKeys.add(mapped);
- }
- attributes.put(mapped, attribute);
- }
-
- public RepositoryTaskAttribute getAttribute(String key) {
- if (attributeFactory == null) {
- StatusHandler.log(new Status(IStatus.WARNING, ITasksCoreConstants.ID_PLUGIN, ERROR_NO_ATTRIBUTE_FACTORY));
- return null;
- }
- String mapped = attributeFactory.mapCommonAttributeKey(key);
- return attributes.get(mapped);
- }
-
- public void removeAttribute(Object key) {
- attributeKeys.remove(key);
- attributes.remove(key);
- }
-
- public List<RepositoryTaskAttribute> getAttributes() {
- ArrayList<RepositoryTaskAttribute> attributeEntries = new ArrayList<RepositoryTaskAttribute>(
- attributeKeys.size());
- for (String key : attributeKeys) {
- RepositoryTaskAttribute attribute = attributes.get(key);
- attributeEntries.add(attribute);
- }
- return attributeEntries;
- }
-
- public void removeAllAttributes() {
- attributeKeys.clear();
- attributes.clear();
- }
-
- public void addAttributeValue(String key, String value) {
- if (attributeFactory == null) {
- StatusHandler.log(new Status(IStatus.WARNING, ITasksCoreConstants.ID_PLUGIN, ERROR_NO_ATTRIBUTE_FACTORY));
- return;
- }
- RepositoryTaskAttribute attrib = getAttribute(key);
- if (attrib != null) {
- attrib.addValue(value);
- } else {
- attrib = attributeFactory.createAttribute(key);
- attrib.addValue(value);
- addAttribute(key, attrib);
- }
- }
-
- /**
- * sets a value on an attribute, if attribute doesn't exist, appropriate attribute is created
- */
- public void setAttributeValue(String key, String value) {
- if (attributeFactory == null) {
- StatusHandler.log(new Status(IStatus.WARNING, ITasksCoreConstants.ID_PLUGIN, ERROR_NO_ATTRIBUTE_FACTORY));
- return;
- }
- RepositoryTaskAttribute attrib = getAttribute(key);
- if (attrib == null) {
- attrib = attributeFactory.createAttribute(key);
- addAttribute(key, attrib);
- }
- attrib.setValue(value);
- }
-
- public String getAttributeValue(String key) {
- if (attributeFactory == null) {
- StatusHandler.log(new Status(IStatus.WARNING, ITasksCoreConstants.ID_PLUGIN, ERROR_NO_ATTRIBUTE_FACTORY));
- return "";
- }
- String returnValue = "";
- RepositoryTaskAttribute attrib = getAttribute(key);
- if (attrib != null) {
- returnValue = attrib.getValue();
- }
- return returnValue;
- }
-
- public List<String> getAttributeValues(String key) {
- List<String> returnValue = new ArrayList<String>();
- if (attributeFactory == null) {
- StatusHandler.log(new Status(IStatus.WARNING, ITasksCoreConstants.ID_PLUGIN, ERROR_NO_ATTRIBUTE_FACTORY));
- return returnValue;
- }
- RepositoryTaskAttribute attrib = getAttribute(key);
- if (attrib != null) {
- returnValue = attrib.getValues();
- }
- return returnValue;
- }
-
- public AbstractAttributeFactory getAttributeFactory() {
- return attributeFactory;
- }
-
- /**
- * @since 2.3
- */
- void setTaskData(RepositoryTaskData taskData) {
- this.taskData = taskData;
- for (RepositoryTaskAttribute attribute : attributes.values()) {
- attribute.setTaskData(taskData);
- }
- }
-
- /**
- * @since 2.3
- */
- public RepositoryTaskData getTaskData() {
- return taskData;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/DefaultTaskSchema.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/DefaultTaskSchema.java
deleted file mode 100644
index f07a70a0d..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/DefaultTaskSchema.java
+++ /dev/null
@@ -1,232 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core.deprecated;
-
-import java.util.Date;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
-
-/**
- * @author Steffen Pingel
- * @since 3.0
- */
-@Deprecated
-public class DefaultTaskSchema {
-
- private final RepositoryTaskData taskData;
-
- public DefaultTaskSchema(RepositoryTaskData taskData) {
- Assert.isNotNull(taskData);
-
- this.taskData = taskData;
- }
-
- public boolean applyTo(ITask task) {
- boolean changed = false;
- if (hasTaskPropertyChanged(task.getCompletionDate(), getCompletionDate())) {
- task.setCompletionDate(getCompletionDate());
- changed = true;
- }
- if (hasTaskPropertyChanged(task.getSummary(), getSummary())) {
- task.setSummary(getSummary());
- changed = true;
- }
- if (hasTaskPropertyChanged(task.getDueDate(), getDueDate())) {
- task.setDueDate(getDueDate());
- changed = true;
- }
- if (hasTaskPropertyChanged(task.getOwner(), getOwner())) {
- task.setOwner(getOwner());
- changed = true;
- }
- if (getPriority() != null && hasTaskPropertyChanged(task.getPriority(), getPriority().toString())) {
- task.setPriority(getPriority().toString());
- changed = true;
- }
- if (hasTaskPropertyChanged(task.getUrl(), getTaskUrl())) {
- task.setUrl(getTaskUrl());
- changed = true;
- }
- if (hasTaskPropertyChanged(task.getTaskKind(), getTaskKind())) {
- task.setTaskKind(getTaskKind());
- changed = true;
- }
- return changed;
- }
-
- public boolean getBooleanValue(String attributeKey) {
- RepositoryTaskAttribute attribute = taskData.getAttribute(attributeKey);
- if (attribute != null) {
- return Boolean.parseBoolean(attribute.getValue());
- }
- return false;
- }
-
- public String getComponent() {
- return getValue(RepositoryTaskAttribute.COMPONENT);
- }
-
- public Date getCreationDate() {
- return getDateValue(RepositoryTaskAttribute.DATE_CREATION);
- }
-
- public Date getCompletionDate() {
- return getDateValue(RepositoryTaskAttribute.DATE_COMPLETION);
- }
-
- public Date getModificationDate() {
- return getDateValue(RepositoryTaskAttribute.DATE_MODIFIED);
- }
-
- private Date getDateValue(String attributeKey) {
- RepositoryTaskAttribute attribute = taskData.getAttribute(attributeKey);
- if (attribute != null) {
- return taskData.getAttributeFactory().getDateForAttributeType(attributeKey, attribute.getValue());
- }
- return null;
- }
-
- public String getDescription() {
- return getValue(RepositoryTaskAttribute.DESCRIPTION);
- }
-
- public Date getDueDate() {
- return getDateValue(RepositoryTaskAttribute.DATE_DUE);
- }
-
- public String getOwner() {
- return getValue(RepositoryTaskAttribute.USER_ASSIGNED);
- }
-
- public PriorityLevel getPriority() {
- String value = getValue(RepositoryTaskAttribute.PRIORITY);
- return (value != null) ? PriorityLevel.fromString(value) : null;
- }
-
- public String getProduct() {
- return getValue(RepositoryTaskAttribute.PRODUCT);
- }
-
- public String getSummary() {
- return getValue(RepositoryTaskAttribute.SUMMARY);
- }
-
- public String getTaskKind() {
- return taskData.getTaskKind();
- }
-
- public String getTaskUrl() {
- return getValue(RepositoryTaskAttribute.TASK_URL);
- }
-
- public String getValue(String attributeKey) {
- RepositoryTaskAttribute attribute = taskData.getAttribute(attributeKey);
- if (attribute != null) {
- return attribute.getValue();
- }
- return null;
- }
-
- protected final boolean hasTaskPropertyChanged(Object existingProperty, Object newProperty) {
- // the query hit does not have this property
- if (newProperty == null) {
- return false;
- }
- return (existingProperty == null) ? true : !existingProperty.equals(newProperty);
- }
-
- public RepositoryTaskAttribute setBooleanValue(String attributeKey, boolean value) {
- RepositoryTaskAttribute attribute = taskData.getAttribute(attributeKey);
- if (attribute == null) {
- attribute = new RepositoryTaskAttribute(attributeKey, null, false);
- taskData.addAttribute(attributeKey, attribute);
- }
-
- attribute.setValue(value + "");
- return attribute;
- }
-
- public void setComponent(String component) {
- setValue(RepositoryTaskAttribute.COMPONENT, component);
- }
-
- public void setCreationDate(Date dateCreated) {
- setDateValue(RepositoryTaskAttribute.DATE_CREATION, dateCreated);
- }
-
- public void setCompletionDate(Date dateCompleted) {
- setDateValue(RepositoryTaskAttribute.DATE_COMPLETION, dateCompleted);
- }
-
- public void setModificationDate(Date dateModified) {
- setDateValue(RepositoryTaskAttribute.DATE_MODIFIED, dateModified);
- }
-
- private RepositoryTaskAttribute setDateValue(String attributeKey, Date value) {
- RepositoryTaskAttribute attribute = taskData.getAttribute(attributeKey);
- if (attribute == null) {
- attribute = new RepositoryTaskAttribute(attributeKey, null, false);
- taskData.addAttribute(attributeKey, attribute);
- }
- attribute.setValue(value.toString());
- return attribute;
- }
-
- public void setDescription(String description) {
- setValue(RepositoryTaskAttribute.DESCRIPTION, description);
- }
-
- public void setDueDate(Date value) {
- setDateValue(RepositoryTaskAttribute.DATE_DUE, value);
- }
-
- // TODO use Person class?
- public void setOwner(String owner) {
- setValue(RepositoryTaskAttribute.USER_ASSIGNED, owner);
- }
-
- public void setPriority(PriorityLevel priority) {
- setValue(RepositoryTaskAttribute.PRIORITY, priority.toString());
- }
-
- public void setProduct(String product) {
- setValue(RepositoryTaskAttribute.PRODUCT, product);
- }
-
- // TODO use Person class?
- public void setReporter(String reporter) {
- setValue(RepositoryTaskAttribute.USER_REPORTER, reporter);
- }
-
- public void setSummary(String summary) {
- setValue(RepositoryTaskAttribute.SUMMARY, summary);
- }
-
- public void setTaskKind(String taskKind) {
- taskData.setTaskKind(taskKind);
- }
-
- public void setTaskUrl(String taskUrl) {
- setValue(RepositoryTaskAttribute.TASK_URL, taskUrl);
- }
-
- public RepositoryTaskAttribute setValue(String attributeKey, String value) {
- RepositoryTaskAttribute attribute = taskData.getAttribute(attributeKey);
- if (attribute == null) {
- attribute = new RepositoryTaskAttribute(attributeKey, null, false);
- taskData.addAttribute(attributeKey, attribute);
- }
-
- attribute.setValue(value);
- return attribute;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/FileAttachment.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/FileAttachment.java
deleted file mode 100644
index b624fb9d2..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/FileAttachment.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core.deprecated;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-
-import org.eclipse.mylyn.tasks.core.data.TaskAttachmentMapper;
-
-/**
- * Proxy for a file attachment.
- *
- * @author Steffen Pingel
- * @since 2.0
- * @deprecated use {@link TaskAttachmentMapper} instead
- */
-@Deprecated
-public class FileAttachment implements ITaskAttachment {
-
- private static final String APPLICATION_OCTET_STREAM = "application/octet-stream";
-
- private String contentType = APPLICATION_OCTET_STREAM;
-
- private String filename;
-
- private String description;
-
- private boolean patch;
-
- private final File file;
-
- public FileAttachment(File file) {
- if (file == null) {
- throw new IllegalArgumentException();
- }
-
- this.file = file;
- this.filename = file.getName();
- }
-
- public String getContentType() {
- return contentType;
- }
-
- public void setContentType(String contentType) {
- this.contentType = contentType;
- }
-
- public String getFilename() {
- return filename;
- }
-
- public void setFilename(String filename) {
- this.filename = filename;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public boolean isPatch() {
- return patch;
- }
-
- public void setPatch(boolean patch) {
- this.patch = patch;
- }
-
- public InputStream createInputStream() throws IOException {
- return new FileInputStream(file);
- }
-
- public long getLength() {
- return file.length();
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/ITaskAttachment.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/ITaskAttachment.java
deleted file mode 100644
index b9deb7583..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/ITaskAttachment.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core.deprecated;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import org.eclipse.mylyn.tasks.core.data.TaskAttachmentMapper;
-
-/**
- * Encapsualtes resources that can be attached to a task.
- *
- * @author Steffen Pingel
- * @since 2.0
- * @deprecated use {@link TaskAttachmentMapper} instead
- */
-@Deprecated
-public interface ITaskAttachment {
-
- public InputStream createInputStream() throws IOException;
-
- public String getContentType();
-
- public String getDescription();
-
- public String getFilename();
-
- public long getLength();
-
- public boolean isPatch();
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/ITaskCollector.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/ITaskCollector.java
deleted file mode 100644
index b1ac6e7ca..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/ITaskCollector.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core.deprecated;
-
-import java.util.Set;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.data.TaskDataCollector;
-
-/**
- * Abstraction used for collecting tasks, e.g. when performing queries on the repository.
- *
- * @author Rob Elves
- * @since 2.0
- * @deprecated use {@link TaskDataCollector} instead
- */
-@Deprecated
-public interface ITaskCollector {
-
- public void accept(ITask task);
-
- public void accept(RepositoryTaskData taskData) throws CoreException;
-
- public Set<AbstractTask> getTasks();
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/ITaskFactory.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/ITaskFactory.java
deleted file mode 100644
index 36ed53a7a..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/ITaskFactory.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core.deprecated;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-
-/**
- * Used for creating tasks from repository task data.
- *
- * NOTE: likely to change for 3.0.
- *
- * @author Rob Elves
- * @since 2.0
- */
-@Deprecated
-public interface ITaskFactory {
-
- /**
- * @param synchData
- * - synchronize task with the provided taskData
- * @param forced
- * - user requested synchronization
- */
- public abstract AbstractTask createTask(RepositoryTaskData taskData, IProgressMonitor monitor) throws CoreException;
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/LegacyTaskDataCollector.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/LegacyTaskDataCollector.java
deleted file mode 100644
index 0752b5d85..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/LegacyTaskDataCollector.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core.deprecated;
-
-import org.eclipse.mylyn.tasks.core.data.TaskData;
-import org.eclipse.mylyn.tasks.core.data.TaskDataCollector;
-
-/**
- * @author Steffen Pingel
- */
-@Deprecated
-public abstract class LegacyTaskDataCollector extends TaskDataCollector {
-
- @Deprecated
- public abstract void accept(RepositoryTaskData taskData);
-
- @Override
- public void accept(TaskData taskData) {
- throw new UnsupportedOperationException();
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/QueryHitCollector.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/QueryHitCollector.java
deleted file mode 100644
index ec8316596..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/QueryHitCollector.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.core.deprecated;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.data.TaskDataCollector;
-
-/**
- * Collects QueryHits resulting from repository search.
- *
- * @author Shawn Minto
- * @author Rob Elves (generalized from bugzilla)
- * @author Steffen Pingel
- * @since 2.0
- * @deprecated
- */
-@Deprecated
-public class QueryHitCollector extends LegacyTaskDataCollector {
-
- /**
- * @deprecated Use {@link TaskDataCollector#MAX_HITS} instead
- */
- @Deprecated
- public static final int MAX_HITS = TaskDataCollector.MAX_HITS;
-
- private final Set<AbstractTask> taskResults = new HashSet<AbstractTask>();
-
- private final ITaskFactory taskFactory;
-
- public QueryHitCollector(ITaskFactory taskFactory) {
- this.taskFactory = taskFactory;
- }
-
-// public void accept(AbstractTask task) {
-// if (task == null) {
-// throw new IllegalArgumentException();
-// }
-// if (taskResults.size() < MAX_HITS) {
-// taskResults.add(task);
-// }
-// }
-
- @Override
- public void accept(RepositoryTaskData taskData) {
- if (taskData == null) {
- throw new IllegalArgumentException();
- }
-
- AbstractTask task;
- try {
- task = taskFactory.createTask(taskData, new NullProgressMonitor());
- if (taskResults.size() < TaskDataCollector.MAX_HITS) {
- taskResults.add(task);
- }
- } catch (CoreException e) {
- // FIXMEx
- e.printStackTrace();
- }
- }
-
- public Set<AbstractTask> getTasks() {
- return taskResults;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/RepositoryAttachment.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/RepositoryAttachment.java
deleted file mode 100644
index b1df118a6..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/RepositoryAttachment.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core.deprecated;
-
-import java.io.Serializable;
-
-import org.eclipse.mylyn.tasks.core.data.TaskAttachmentMapper;
-
-/**
- * Encapsulates a file or other resource attached to a task.
- *
- * @author Rob Elves
- * @author Mik Kersten
- * @since 2.0
- * @use {@link TaskAttachmentMapper} instead
- */
-@Deprecated
-public final class RepositoryAttachment extends AttributeContainer implements Serializable {
-
- private static final long serialVersionUID = 2663237137799050826L;
-
- private boolean isPatch = false;
-
- private boolean isObsolete = false;
-
- private String creator = "";
-
- private String repositoryUrl;
-
- private String repositoryKind;
-
- private String taskId;
-
- public RepositoryAttachment(AbstractAttributeFactory attributeFactory) {
- super(attributeFactory);
- }
-
- public boolean isObsolete() {
- return isObsolete;
- }
-
- public void setObsolete(boolean isObsolete) {
- this.isObsolete = isObsolete;
- }
-
- /**
- * Get the time that this attachment was posted
- *
- * @return The attachment's creation timestamp
- */
- public String getDateCreated() {
- return getAttributeValue(RepositoryTaskAttribute.ATTACHMENT_DATE);
- }
-
- public String getCreator() {
- return creator;
- }
-
- public void setCreator(String creator) {
- this.creator = creator;
- }
-
- /**
- * @since 2.2
- * @return The name of the file, e.g. screenshot.jpg.
- */
- public String getFilename() {
- return getAttributeValue(RepositoryTaskAttribute.ATTACHMENT_FILENAME);
- }
-
- public String getDescription() {
- return getAttributeValue(RepositoryTaskAttribute.DESCRIPTION);
- }
-
- public String getId() {
- return getAttributeValue(RepositoryTaskAttribute.ATTACHMENT_ID);
- }
-
- public String getUrl() {
- return getAttributeValue(RepositoryTaskAttribute.ATTACHMENT_URL);
- }
-
- public String getContentType() {
- // I've seen both "ctype" and "type" occur for this, investigate
- if (getAttribute(RepositoryTaskAttribute.ATTACHMENT_TYPE) != null) {
- return getAttributeValue(RepositoryTaskAttribute.ATTACHMENT_TYPE);
- } else {
- return getAttributeValue(RepositoryTaskAttribute.ATTACHMENT_CTYPE);
- }
- }
-
- public String getSize() {
- return getAttributeValue(RepositoryTaskAttribute.ATTACHMENT_SIZE);
- }
-
- public boolean isPatch() {
- return isPatch;
- }
-
- public void setPatch(boolean b) {
- isPatch = b;
- }
-
- public String getRepositoryUrl() {
- return repositoryUrl;
- }
-
- public void setRepositoryUrl(String repositoryUrl) {
- this.repositoryUrl = repositoryUrl;
- }
-
- public String getRepositoryKind() {
- return repositoryKind;
- }
-
- public void setRepositoryKind(String repositoryKind) {
- this.repositoryKind = repositoryKind;
- }
-
- public String getTaskId() {
- return taskId;
- }
-
- public void setTaskId(String taskId) {
- this.taskId = taskId;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/RepositoryOperation.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/RepositoryOperation.java
deleted file mode 100644
index b981a31de..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/RepositoryOperation.java
+++ /dev/null
@@ -1,221 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core.deprecated;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.mylyn.tasks.core.data.TaskOperation;
-
-/**
- * A representation of an operation that can be done to the bug when it is submitted
- *
- * NOTE: likely to change for 3.0
- *
- * @author Shawn Minto
- * @since 2.0
- * @deprecated use {@link TaskOperation} instead
- */
-@Deprecated
-public class RepositoryOperation implements Serializable {
- /**
- * Comment for <code>serialVersionUID</code>
- */
- private static final long serialVersionUID = 3256442508174045236L;
-
- /** The name of the value for the knob attribute */
- private final String knob_name;
-
- /** The name of the option that can be chosen */
- private String optionName;
-
- /** List of option names */
- private List<String> optionNames;
-
- /** Map of options and their names */
- private Map<String, String> options;
-
- /** Flag for if we have any options or not */
- private boolean hasOptions = false;
-
- /** The name of the operation (text that we display) */
- private final String operation_name;
-
- /** The option that is selected */
- private String op_sel;
-
- /** Whether this is to be checked or not */
- private boolean isChecked = false;
-
- private boolean isInput = false;
-
- private String inputName = null;
-
- private String inputValue = "";
-
- /**
- * Constructor
- *
- * @param knobName
- * The name of the value for the knob attribute
- * @param operationName
- * The display text for the operation
- */
- public RepositoryOperation(String knobName, String operationName) {
- knob_name = knobName;
- operation_name = operationName;
- }
-
- /**
- * Get the knob name
- *
- * @return The knob name
- */
- public String getKnobName() {
- return knob_name;
- }
-
- /**
- * Get the display name
- *
- * @return The display name
- */
- public String getOperationName() {
- return operation_name;
- }
-
- /**
- * Check if this has any options
- *
- * @return True if there are option values
- */
- public boolean hasOptions() {
- return hasOptions;
- }
-
- /**
- * Set up this operation to have options
- *
- * @param optionName
- * The name for the option attribute
- */
- public void setUpOptions(String optionName) {
- hasOptions = true;
- this.optionName = optionName;
- options = new HashMap<String, String>();
- optionNames = new ArrayList<String>();
- }
-
- /**
- * Add an option value to the operation
- *
- * @param name
- * The name of the option
- * @param value
- * The value of the option
- */
- public void addOption(String name, String value) {
- options.put(name, value);
- if (options.size() == 1) {
- op_sel = name;
- }
- optionNames.add(name);
- }
-
- /**
- * Get the list of option names for this operation
- *
- * @return The list of option names
- */
- public List<String> getOptionNames() {
- return optionNames;
- }
-
- /**
- * Get the selected option
- *
- * @return The selected option name
- */
- public String getOptionSelection() {
- return op_sel;
- }
-
- /**
- * Set the selected option
- *
- * @param string
- * The name of the selected option
- */
- public void setOptionSelection(String string) {
- op_sel = string;
- }
-
- /**
- * Check if this is to be checked or not
- *
- * @return True if this is to be checked at the start
- */
- public boolean isChecked() {
- return isChecked;
- }
-
- /**
- * Set whether this option is to be checked or not
- *
- * @param b
- * True if it is to be checked
- */
- public void setChecked(boolean b) {
- isChecked = b;
- }
-
- /**
- * Get the name for the option attribute
- *
- * @return The option name
- */
- public String getOptionName() {
- return optionName;
- }
-
- /**
- * Get the value for an option from its name
- *
- * @param option
- * The name of the option
- * @return The value of the option
- */
- public String getOptionValue(String option) {
- return options.get(option);
- }
-
- public boolean isInput() {
- return isInput;
- }
-
- public String getInputName() {
- return inputName;
- }
-
- public void setInputName(String inputName) {
- isInput = true;
- this.inputName = inputName;
- }
-
- public String getInputValue() {
- return inputValue == null ? "" : inputValue;
- }
-
- public void setInputValue(String inputValue) {
- this.inputValue = inputValue;
- }
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/RepositoryTaskAttribute.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/RepositoryTaskAttribute.java
deleted file mode 100644
index 31e9c46d3..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/RepositoryTaskAttribute.java
+++ /dev/null
@@ -1,396 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core.deprecated;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Encapsulates common task attributes.
- *
- * @author Rob Elves
- * @since 2.0
- */
-@Deprecated
-public final class RepositoryTaskAttribute implements Serializable {
-
- private static final long serialVersionUID = 5548885751645139746L;
-
- /**
- * Key for the author of a comment.
- *
- * TODO remove this key: Trac uses owner to denote the assignee of a ticket and AbstractRepository has a getOwner()
- * method which is confusing
- */
- public static final String USER_OWNER = "task.common.user.owner";
-
- public static final String USER_CC = "task.common.user.cc";
-
- public static final String USER_REPORTER = "task.common.user.reporter";
-
- public static final String USER_REPORTER_NAME = "task.common.user.reporter.name";
-
- public static final String COMMENT_NEW = "task.common.comment.new";
-
- public static final String COMMENT_TEXT = "task.common.comment.text";
-
- public static final String COMMENT_DATE = "task.common.comment.date";
-
- public static final String COMMENT_AUTHOR = "task.common.comment.author";
-
- public static final String COMMENT_AUTHOR_NAME = "task.common.comment.author.name";
-
- public static final String DESCRIPTION = "task.common.description";
-
- public static final String ATTACHMENT_ID = "task.common.attachment.id";
-
- public static final String ATTACHMENT_TYPE = "task.common.attachment.type";
-
- public static final String ATTACHMENT_CTYPE = "task.common.attachment.ctype";
-
- public static final String ATTACHMENT_DATE = "task.common.attachment.date";
-
- public static final String ATTACHMENT_URL = "task.common.attachment.url";
-
- public static final String ATTACHMENT_FILENAME = "filename";
-
- public static final String ATTACHMENT_SIZE = "task.common.attachment.size";
-
- public static final String USER_ASSIGNED = "task.common.user.assigned";
-
- public static final String USER_ASSIGNED_NAME = "task.common.user.assigned.name";
-
- public static final String RESOLUTION = "task.common.resolution";
-
- public static final String STATUS = "task.common.status";
-
- public static final String PRIORITY = "task.common.priority";
-
- public static final String DATE_MODIFIED = "task.common.date.modified";
-
- public static final String SUMMARY = "task.common.summary";
-
- public static final String PRODUCT = "task.common.product";
-
- public static final String DATE_CREATION = "task.common.date.created";
-
- /**
- * @since 3.0
- */
- public static final String DATE_COMPLETION = "task.common.date.completed";
-
- public static final String KEYWORDS = "task.common.keywords";
-
- /**
- * Boolean attribute. If true, repository user needs to be added to the cc list.
- */
- public static final String ADD_SELF_CC = "task.common.addselfcc";
-
- public static final String NEW_CC = "task.common.newcc";
-
- public static final String REMOVE_CC = "task.common.removecc";
-
- public static final String TASK_KEY = "task.common.key";
-
- /**
- * String constant used to represent true for boolean attributes.
- */
- public static final String TRUE = "1";
-
- /**
- * String constant used to represent false for boolean attributes.
- */
- public static final String FALSE = "0";
-
- /**
- * @since 2.3
- */
- public static final String COMPONENT = "task.common.component";
-
- /**
- * @since 2.3
- */
- public static final String TYPE_SHORT_TEXT = "shortText";
-
- /**
- * @since 2.3
- */
- public static final String TYPE_LONG_TEXT = "longText";
-
- /**
- * @since 2.3
- */
- public static final String TYPE_DATE = "date";
-
- /**
- * @since 2.3
- */
- public static final String TYPE_BOOLEAN = "boolean";
-
- /**
- * @since 2.3
- */
- public static final String TYPE_NUMBER = "number";
-
- /**
- * @since 2.3
- */
- public static final String TYPE_SINGLE_SELECT = "singleSelect";
-
- /**
- * @since 2.3
- */
- public static final String TYPE_MULTI_SELECT = "multiSelect";
-
- /**
- * @since 2.3
- */
- public static final String TYPE_PERSON = "person";
-
- /**
- * @since 2.3
- */
- public static final String TYPE_TASK_DEPENDENCY = "taskDepenedency";
-
- /**
- * @since 3.0
- */
- public static final String TASK_URL = "task.common.url";
-
- /**
- * @since 3.0
- */
- public static final String DATE_DUE = "task.common.date.due";
-
- /**
- * @since 3.0
- */
- public static final String TYPE_CONTAINER = "container";
-
- /**
- * @since 3.0
- */
- public static final String TYPE_COMMENT = "comment";
-
- /**
- * @since 3.0
- */
- public static final String TYPE_ATTACHMENT = "attachment";
-
- private boolean hidden = false;
-
- private boolean isReadOnly = false;
-
- /** Attribute pretty printing name */
- private final String name;
-
- /** ID of the option used when updating the attribute on the server */
- private final String id;
-
- /** Option parameters */
- private final Map<String, String> optionParameters;
-
- /** Ordered list of legal attribute values */
- private final List<String> options;
-
- /**
- * Attribute's values (selected or added)
- */
- private final List<String> values = new ArrayList<String>();
-
- private final Map<String, String> metaData = new HashMap<String, String>();
-
- private transient RepositoryTaskData taskData;
-
- public RepositoryTaskAttribute(String id, String name, boolean hidden) {
- this.id = id;
- this.name = name;
- this.hidden = hidden;
- this.options = new ArrayList<String>();
- optionParameters = new HashMap<String, String>();
- }
-
- public String getName() {
- return name;
- }
-
- public String getId() {
- return id;
- }
-
- public boolean isReadOnly() {
- return isReadOnly;
- }
-
- public void setReadOnly(boolean readonly) {
- this.isReadOnly = readonly;
- }
-
- public String getOptionParameter(String option) {
- return optionParameters.get(option);
- }
-
- public List<String> getOptions() {
- return options;
- }
-
- public String getValue() {
- if (values.size() > 0) {
- return values.get(0);
- } else {
- return "";
- }
- }
-
- public List<String> getValues() {
- return values;
- }
-
- public void setValue(String value) {
- if (values.size() > 0) {
- values.set(0, value);
- } else {
- values.add(value);
- }
- }
-
- public void setValues(List<String> values) {
- this.values.clear();
- this.values.addAll(values);
- }
-
- public void addValue(String value) {
- values.add(value);
- }
-
- public void removeValue(String value) {
- if (values.contains(value)) {
- values.remove(values.indexOf(value));
- }
- }
-
- public void clearValues() {
- values.clear();
- }
-
- /**
- * Adds an attribute option value
- *
- * @param readableValue
- * The value displayed on the screen
- * @param parameterValue
- * The option value used when sending the form to the server
- */
- public void addOption(String readableValue, String parameterValue) {
- options.add(readableValue);
- optionParameters.put(readableValue, parameterValue);
- }
-
- public boolean hasOptions() {
- return options.size() > 0;
- }
-
- public void clearOptions() {
- options.clear();
- optionParameters.clear();
- }
-
- /**
- * Determine if the field was hidden or not
- *
- * @return True if the field was hidden
- */
- public boolean isHidden() {
- return hidden;
- }
-
- /**
- * Set whether the field was hidden in the bug
- *
- * @param b
- * Whether the field was hidden or not
- */
- public void setHidden(boolean b) {
- hidden = b;
- }
-
- @Override
- public String toString() {
- return getId() + ":" + values;
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((id == null) ? 0 : id.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;
- }
- final RepositoryTaskAttribute other = (RepositoryTaskAttribute) obj;
- if (id == null) {
- if (other.id != null) {
- return false;
- }
- } else if (!id.equals(other.id)) {
- return false;
- }
- return true;
- }
-
- public void clearMetaData() {
- metaData.clear();
- }
-
- public void putMetaDataValue(String key, String value) {
- metaData.put(key, value);
- }
-
- public String getMetaDataValue(String key) {
- return metaData.get(key);
- }
-
- public void removeMetaDataValue(String key) {
- metaData.remove(key);
- }
-
- public Map<String, String> getMetaData() {
- return Collections.unmodifiableMap(metaData);
- }
-
- /**
- * @since 2.3
- */
- void setTaskData(RepositoryTaskData taskData) {
- this.taskData = taskData;
- }
-
- /**
- * @since 2.3
- */
- public RepositoryTaskData getTaskData() {
- return taskData;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/RepositoryTaskData.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/RepositoryTaskData.java
deleted file mode 100644
index c004fdd17..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/RepositoryTaskData.java
+++ /dev/null
@@ -1,406 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core.deprecated;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.StringTokenizer;
-
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryTaskHandleUtil;
-import org.eclipse.mylyn.tasks.core.data.TaskData;
-
-/**
- * This data structure is not to be subclassed but rather used directly to hold repository task data (attribute key,
- * value pairs along with valid options for each attribute).
- *
- * @author Mik Kersten
- * @author Rob Elves
- * @since 2.0
- * @deprecated use {@link TaskData} instead
- */
-@Deprecated
-public final class RepositoryTaskData extends AttributeContainer implements Serializable {
-
- private static final long serialVersionUID = 2304501248225237699L;
-
- private boolean isNew = false;
-
- private final String reportID;
-
- private String repositoryURL;
-
- private final String repositoryKind;
-
- private String taskKind;
-
- private final List<TaskComment> taskComments = new ArrayList<TaskComment>();
-
- private final List<RepositoryAttachment> attachments = new ArrayList<RepositoryAttachment>();
-
- /** The operation that was selected to do to the bug */
- private RepositoryOperation selectedOperation = null;
-
- /** The repositoryOperations that can be done on the report */
- private final List<RepositoryOperation> repositoryOperations = new ArrayList<RepositoryOperation>();
-
- private boolean partial;
-
- public RepositoryTaskData(AbstractAttributeFactory factory, String repositoryKind, String repositoryURL, String id) {
- this(factory, repositoryKind, repositoryURL, id, AbstractTask.DEFAULT_TASK_KIND);
- }
-
- public RepositoryTaskData(AbstractAttributeFactory factory, String repositoryKind, String repositoryURL, String id,
- String taskKind) {
- super(factory);
- this.reportID = id;
- this.repositoryKind = repositoryKind;
- this.repositoryURL = repositoryURL;
- this.taskKind = taskKind;
- }
-
- public String getLabel() {
- if (isNew()) {
- return "<unsubmitted> " + this.getRepositoryUrl();
- } else {
- return getSummary();
- }
- }
-
- /**
- * Get the resolution of the bug
- *
- * @return The resolution of the bug
- */
- public String getResolution() {
- return getAttributeValue(RepositoryTaskAttribute.RESOLUTION);
- }
-
- /**
- * Get the status of the bug
- *
- * @return The bugs status
- */
- public String getStatus() {
- return getAttributeValue(RepositoryTaskAttribute.STATUS);
- }
-
- public String getLastModified() {
- return getAttributeValue(RepositoryTaskAttribute.DATE_MODIFIED);
- }
-
- public void setSelectedOperation(RepositoryOperation o) {
- selectedOperation = o;
- }
-
- public RepositoryOperation getSelectedOperation() {
- return selectedOperation;
- }
-
- /**
- * Get all of the repositoryOperations that can be done to the bug
- *
- * @return The repositoryOperations that can be done to the bug
- */
- public List<RepositoryOperation> getOperations() {
- return repositoryOperations;
- }
-
- /**
- * Get the person who reported the bug
- *
- * @return The person who reported the bug
- */
- public String getReporter() {
- return getAttributeValue(RepositoryTaskAttribute.USER_REPORTER);
- }
-
- /**
- * Get an operation from the bug based on its display name
- *
- * @param displayText
- * The display text for the operation
- * @return The operation that has the display text
- */
- public RepositoryOperation getOperation(String displayText) {
- Iterator<RepositoryOperation> itr = repositoryOperations.iterator();
- while (itr.hasNext()) {
- RepositoryOperation o = itr.next();
- String opName = o.getOperationName();
- opName = opName.replaceAll("</.*>", "");
- opName = opName.replaceAll("<.*>", "");
- if (opName.equals(displayText)) {
- return o;
- }
- }
- return null;
- }
-
- /**
- * Get the summary for the bug
- *
- * @return The bugs summary
- */
- public String getSummary() {
- return getAttributeValue(RepositoryTaskAttribute.SUMMARY);
- }
-
- public void setSummary(String summary) {
- setAttributeValue(RepositoryTaskAttribute.SUMMARY, summary);
- }
-
- public String getProduct() {
- return getAttributeValue(RepositoryTaskAttribute.PRODUCT);
- }
-
- /**
- * true if this is a new, unsubmitted task false otherwise
- */
- public boolean isNew() {
- return isNew;
- }
-
- public void setNew(boolean isNew) {
- this.isNew = isNew;
- }
-
- /**
- * Get the date that the bug was created
- *
- * @return The bugs creation date
- */
- public String getCreated() {
- return getAttributeValue(RepositoryTaskAttribute.DATE_CREATION);
- }
-
- /**
- * Get the keywords for the bug
- *
- * @return The keywords for the bug
- */
- public List<String> getKeywords() {
-
- // get the selected keywords for the bug
- StringTokenizer st = new StringTokenizer(getAttributeValue(RepositoryTaskAttribute.KEYWORDS), ",", false);
- List<String> keywords = new ArrayList<String>();
- while (st.hasMoreTokens()) {
- String s = st.nextToken().trim();
- keywords.add(s);
- }
-
- return keywords;
- }
-
- /**
- * Add an operation to the bug
- *
- * @param o
- * The operation to add
- */
- public void addOperation(RepositoryOperation o) {
- repositoryOperations.add(o);
- }
-
- public List<String> getCc() {
- return getAttributeValues(RepositoryTaskAttribute.USER_CC);
- }
-
- public void removeCc(String email) {
- removeAttributeValue(RepositoryTaskAttribute.USER_CC, email);
- }
-
- public String getAssignedTo() {
- return getAttributeValue(RepositoryTaskAttribute.USER_ASSIGNED);
- }
-
- /**
- * Get the new comment that is to be added to the bug
- */
- public String getNewComment() {
- RepositoryTaskAttribute attribute = getAttribute(RepositoryTaskAttribute.COMMENT_NEW);
- return (attribute != null) ? attribute.getValue() : "";
- }
-
- /**
- * Set the new comment that will be added to the bug
- */
- public void setNewComment(String newComment) {
- setAttributeValue(RepositoryTaskAttribute.COMMENT_NEW, newComment);
- }
-
- public void addComment(TaskComment taskComment) {
- taskComments.add(taskComment);
- }
-
- public List<TaskComment> getComments() {
- return taskComments;
- }
-
- public void setDescription(String description) {
- setAttributeValue(RepositoryTaskAttribute.DESCRIPTION, description);
- }
-
- public String getDescription() {
- RepositoryTaskAttribute attribute = getDescriptionAttribute();
- return (attribute != null) ? attribute.getValue() : "";
- }
-
- public RepositoryTaskAttribute getDescriptionAttribute() {
- RepositoryTaskAttribute attribute = getAttribute(RepositoryTaskAttribute.DESCRIPTION);
- // TODO: Remove the following after 1.0 release as we now just have a
- // summary attribute
- if (attribute == null) {
- List<TaskComment> coms = this.getComments();
- if (coms != null && coms.size() > 0) {
- return coms.get(0).getAttribute(RepositoryTaskAttribute.COMMENT_TEXT);
- }
- }
- return attribute;
- }
-
- public void addAttachment(RepositoryAttachment attachment) {
- attachments.add(attachment);
- attachment.setTaskData(this);
- }
-
- public List<RepositoryAttachment> getAttachments() {
- return attachments;
- }
-
- /**
- * @deprecated Use {@link #getTaskId()} instead
- */
- @Deprecated
- public String getId() {
- return getTaskId();
- }
-
- /**
- * @since 3.0
- */
- public String getTaskId() {
- return reportID;
- }
-
- public String getTaskKey() {
- RepositoryTaskAttribute attr = getAttribute(RepositoryTaskAttribute.TASK_KEY);
- if (attr != null) {
- return attr.getValue();
- }
- return getTaskId();
- }
-
- public void setTaskKey(String key) {
- setAttributeValue(RepositoryTaskAttribute.TASK_KEY, key);
- }
-
- /**
- * @return the server for this report
- */
- public String getRepositoryUrl() {
- return repositoryURL;
- }
-
- @Override
- public List<String> getAttributeValues(String key) {
- RepositoryTaskAttribute attribute = getAttribute(key);
- if (attribute != null) {
- return attribute.getValues();
- }
- return new ArrayList<String>();
- }
-
- public void removeAttributeValue(String key, String value) {
- RepositoryTaskAttribute attrib = getAttribute(key);
- if (attrib != null) {
- attrib.removeValue(value);
- }
- }
-
- /**
- * @deprecated Use {@link #getConnectorKind()} instead
- */
- @Deprecated
- public String getRepositoryKind() {
- return getConnectorKind();
- }
-
- /**
- * @since 3.0
- */
- public String getConnectorKind() {
- return repositoryKind;
- }
-
- @Override
- public void setAttributeFactory(AbstractAttributeFactory factory) {
- super.setAttributeFactory(factory);
- for (TaskComment taskComment : taskComments) {
- taskComment.setAttributeFactory(factory);
- }
- for (RepositoryAttachment attachment : attachments) {
- attachment.setAttributeFactory(factory);
- }
- }
-
- public String getTaskKind() {
- return taskKind;
- }
-
- /**
- * @since 3.0
- */
- public void setTaskKind(String taskKind) {
- this.taskKind = taskKind;
- }
-
- public void setRepositoryURL(String repositoryURL) {
- this.repositoryURL = repositoryURL;
- for (RepositoryAttachment attachment : attachments) {
- attachment.setRepositoryUrl(repositoryURL);
- }
- }
-
- public final String getHandleIdentifier() {
- return RepositoryTaskHandleUtil.getHandle(getRepositoryUrl(), getTaskId());
- }
-
- @Override
- public void addAttribute(String key, RepositoryTaskAttribute attribute) {
- super.addAttribute(key, attribute);
- attribute.setTaskData(this);
- }
-
- public void refresh() {
- setTaskData(this);
- for (AttributeContainer container : taskComments) {
- container.setTaskData(this);
- }
- for (AttributeContainer container : attachments) {
- container.setTaskData(this);
- }
- }
-
- /**
- * @since 3.0
- */
- public void setPartial(boolean partial) {
- this.partial = partial;
- }
-
- /**
- * @since 3.0
- */
- public boolean isPartial() {
- return partial;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/TaskComment.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/TaskComment.java
deleted file mode 100644
index 4e6145b69..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/TaskComment.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core.deprecated;
-
-import java.io.Serializable;
-
-
-/**
- * A comment posted by a user on a task.
- *
- * @author Rob Elves
- * @since 2.0
- * @deprecated use {@link org.eclipse.mylyn.tasks.core.data.TaskCommentMapper} instead
- */
-@Deprecated
-public final class TaskComment extends AttributeContainer implements Serializable {
-
- private static final long serialVersionUID = 1076016406335550318L;
-
- /** Comment's number */
- private int number;
-
- private boolean hasAttachment;
-
- private String attachmentId;
-
- public TaskComment(AbstractAttributeFactory attributeFactory, int num) {
- super(attributeFactory);
- this.number = num;
- }
-
- /**
- * Get this comment's number
- *
- * @return This comment's number
- */
- public int getNumber() {
- return number;
- }
-
- /**
- * Set the comment number
- *
- * @param number
- * the number of the comment
- */
- public void setNumber(int number) {
- this.number = number;
- }
-
- /**
- * Get the time that this comment was created
- *
- * @return The comments creation timestamp
- */
- public String getCreated() {
- return getAttributeValue(RepositoryTaskAttribute.COMMENT_DATE);
- }
-
- /**
- * Get the author of the comment
- *
- * @return The comments author
- */
- public String getAuthor() {
- return getAttributeValue(RepositoryTaskAttribute.COMMENT_AUTHOR);
- }
-
- /**
- * Get the authors real name
- *
- * @return Returns author's name, or an empty string
- */
- public String getAuthorName() {
- return getAttributeValue(RepositoryTaskAttribute.COMMENT_AUTHOR_NAME);
- }
-
- /**
- * Get the text contained in the comment
- *
- * @return The comments text
- */
- public String getText() {
- return getAttributeValue(RepositoryTaskAttribute.COMMENT_TEXT);
- }
-
- public void setHasAttachment(boolean b) {
- this.hasAttachment = b;
- }
-
- public boolean hasAttachment() {
- return hasAttachment;
- }
-
- public void setAttachmentId(String attachmentID) {
- this.attachmentId = attachmentID;
- }
-
- public String getAttachmentId() {
- return attachmentId;
- }
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/TaskFactory.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/TaskFactory.java
deleted file mode 100644
index a8a4f81c8..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/TaskFactory.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core.deprecated;
-
-import java.util.Set;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.ITaskList;
-import org.eclipse.mylyn.internal.tasks.core.TaskDataStorageManager;
-import org.eclipse.mylyn.internal.tasks.core.data.TaskDataManager;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.ITask.SynchronizationState;
-
-/**
- * Used for creating tasks from repository task data.
- *
- * NOTE: likely to change for 3.0.
- *
- * @author Rob Elves
- * @deprecated
- */
-@Deprecated
-public class TaskFactory implements ITaskFactory {
-
- private final AbstractLegacyRepositoryConnector connector;
-
- private final TaskDataManager taskDataManager;
-
- private final TaskRepository repository;
-
- private final ITaskList taskList;
-
- private final AbstractTaskDataHandler dataHandler;
-
- private final boolean updateTasklist;
-
- private final boolean forced;
-
- private final TaskDataStorageManager taskDataStorageManager;
-
- public TaskFactory(TaskRepository repository, boolean updateTasklist, boolean forced,
- AbstractLegacyRepositoryConnector connector, TaskDataManager taskDataManager, ITaskList taskList) {
- this.repository = repository;
- this.updateTasklist = updateTasklist;
- this.forced = forced;
- this.connector = connector;
- this.taskDataManager = taskDataManager;
- this.taskList = taskList;
- this.dataHandler = connector.getLegacyTaskDataHandler();
- this.taskDataStorageManager = taskDataManager.getTaskDataStorageManager();
- }
-
- /**
- * @param updateTasklist
- * - synchronize task with the provided taskData
- * @param forced
- * - user requested synchronization
- * @throws CoreException
- */
- public AbstractTask createTask(RepositoryTaskData taskData, IProgressMonitor monitor) throws CoreException {
- AbstractTask repositoryTask = (AbstractTask) taskList.getTask(taskData.getRepositoryUrl(), taskData.getTaskId());
- if (repositoryTask == null) {
- repositoryTask = createTaskFromTaskData(connector, repository, taskData, updateTasklist, monitor);
- repositoryTask.setSynchronizationState(SynchronizationState.INCOMING);
- if (!taskData.isPartial()) {
- if (updateTasklist) {
- taskList.addTask(repositoryTask);
- taskDataManager.saveIncoming(repositoryTask, taskData, forced);
- } else {
- taskDataManager.saveOffline(repositoryTask, taskData);
- }
- }
- } else {
- if (updateTasklist) {
- boolean changed;
- if (!taskData.isPartial()) {
- changed = taskDataManager.saveIncoming(repositoryTask, taskData, forced);
- connector.updateTaskFromTaskData(repository, repositoryTask, taskData);
- } else {
- changed = connector.updateTaskFromTaskData(repository, repositoryTask, taskData);
- if (changed) {
- switch (repositoryTask.getSynchronizationState()) {
- case OUTGOING:
- repositoryTask.setSynchronizationState(SynchronizationState.CONFLICT);
- case SYNCHRONIZED:
- repositoryTask.setSynchronizationState(SynchronizationState.INCOMING);
- }
- }
- }
- if (dataHandler != null) {
- for (ITask child : repositoryTask.getChildren()) {
- taskList.removeFromContainer(repositoryTask, child);
- }
- Set<String> subTaskIds = dataHandler.getSubTaskIds(taskData);
- if (subTaskIds != null) {
- for (String subId : subTaskIds) {
- if (subId == null || subId.trim().equals("")) {
- continue;
- }
- AbstractTask subTask = createTaskFromExistingId(connector, repository, subId, false,
- new SubProgressMonitor(monitor, 1));
- if (subTask != null) {
- taskList.addTask(subTask, repositoryTask);
- }
- }
- }
- }
- if (changed) {
- taskList.notifyElementChanged(repositoryTask);
- }
- }
- }
- return repositoryTask;
- }
-
- /**
- * Creates a new task from the given task data. Does NOT add resulting task to the tasklist
- */
- private AbstractTask createTaskFromTaskData(AbstractLegacyRepositoryConnector connector, TaskRepository repository,
- RepositoryTaskData taskData, boolean retrieveSubTasks, IProgressMonitor monitor) throws CoreException {
- AbstractTask repositoryTask = null;
- if (monitor == null) {
- monitor = new NullProgressMonitor();
- }
- try {
- if (taskData != null) {
- // Use connector task factory
- repositoryTask = connector.createTask(repository.getRepositoryUrl(), taskData.getTaskId(),
- taskData.getTaskId() + ": " + taskData.getDescription());
- connector.updateTaskFromTaskData(repository, repositoryTask, taskData);
- if (!taskData.isPartial()) {
- taskDataStorageManager.setNewTaskData(taskData);
- }
-
- if (retrieveSubTasks) {
- monitor.beginTask("Creating task", connector.getLegacyTaskDataHandler()
- .getSubTaskIds(taskData)
- .size());
- for (String subId : connector.getLegacyTaskDataHandler().getSubTaskIds(taskData)) {
- if (subId == null || subId.trim().equals("")) {
- continue;
- }
- AbstractTask subTask = createTaskFromExistingId(connector, repository, subId, false,
- new SubProgressMonitor(monitor, 1));
- if (subTask != null) {
- taskList.addTask(subTask, repositoryTask);
- }
- }
- }
- }
- } finally {
- monitor.done();
- }
- return repositoryTask;
- }
-
- /**
- * Create new repository task, adding result to tasklist
- */
- private AbstractTask createTaskFromExistingId(AbstractLegacyRepositoryConnector connector,
- TaskRepository repository, String id, boolean retrieveSubTasks, IProgressMonitor monitor)
- throws CoreException {
- AbstractTask repositoryTask = (AbstractTask) taskList.getTask(repository.getRepositoryUrl(), id);
- if (repositoryTask == null && connector.getLegacyTaskDataHandler() != null) {
- RepositoryTaskData taskData = null;
- taskData = connector.getLegacyTaskDataHandler().getTaskData(repository, id,
- new SubProgressMonitor(monitor, 1));
- if (taskData != null) {
- repositoryTask = createTaskFromTaskData(connector, repository, taskData, retrieveSubTasks,
- new SubProgressMonitor(monitor, 1));
- if (repositoryTask != null) {
- repositoryTask.setSynchronizationState(SynchronizationState.INCOMING);
- taskList.addTask(repositoryTask);
- }
- }
- } // TODO: Handle case similar to web tasks (no taskDataHandler but
- // have tasks)
-
- return repositoryTask;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/TaskSelection.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/TaskSelection.java
deleted file mode 100644
index f983eb9a4..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/deprecated/TaskSelection.java
+++ /dev/null
@@ -1,236 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core.deprecated;
-
-import java.util.Date;
-import java.util.List;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
-import org.eclipse.mylyn.internal.tasks.core.IdentityAttributeFactory;
-import org.eclipse.mylyn.internal.tasks.core.LocalRepositoryConnector;
-import org.eclipse.mylyn.internal.tasks.core.TaskDataStorageManager.ObjectCloner;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITaskMapping;
-import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
-import org.eclipse.mylyn.tasks.core.data.TaskData;
-
-/**
- * @author Steffen Pingel
- * @since 2.2
- */
-@Deprecated
-public class TaskSelection implements ITaskMapping {
-
- private final RepositoryTaskData taskData;
-
- public TaskSelection(RepositoryTaskData taskData) {
- if (taskData == null) {
- throw new IllegalArgumentException();
- }
-
- try {
- this.taskData = (RepositoryTaskData) ObjectCloner.deepCopy(taskData);
- this.taskData.setAttributeFactory(taskData.getAttributeFactory());
- this.taskData.refresh();
- } catch (Exception e) {
- StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN,
- "Error creating a task data copy", e));
- throw new RuntimeException(e);
- }
- }
-
- public TaskSelection(ITask task) {
- RepositoryTaskData taskData = new RepositoryTaskData(IdentityAttributeFactory.getInstance(),
- task.getConnectorKind(), task.getRepositoryUrl(), task.getTaskId(), task.getTaskKind());
- taskData.setSummary(task.getSummary());
- taskData.setAttributeValue(RepositoryTaskAttribute.PRIORITY, task.getPriority());
- this.taskData = taskData;
- }
-
- public TaskSelection(String summary, String description) {
- RepositoryTaskData taskData = new RepositoryTaskData(IdentityAttributeFactory.getInstance(),
- LocalRepositoryConnector.CONNECTOR_KIND, LocalRepositoryConnector.REPOSITORY_URL, "");
- taskData.setSummary(summary);
- taskData.setDescription(description);
- this.taskData = taskData;
- }
-
- public RepositoryTaskData getLegacyTaskData() {
- return taskData;
- }
-
- public Date getCompletionDate() {
- // ignore
- return null;
- }
-
- public String getComponent() {
- // ignore
- return null;
- }
-
- public Date getCreationDate() {
- // ignore
- return null;
- }
-
- public String getDescription() {
- // ignore
- return null;
- }
-
- public Date getDueDate() {
- // ignore
- return null;
- }
-
- public Date getModificationDate() {
- // ignore
- return null;
- }
-
- public String getOwner() {
- // ignore
- return null;
- }
-
- public PriorityLevel getPriority() {
- // ignore
- return null;
- }
-
- public String getProduct() {
- // ignore
- return null;
- }
-
- public String getSummary() {
- // ignore
- return null;
- }
-
- public TaskData getTaskData() {
- // ignore
- return null;
- }
-
- public String getTaskKey() {
- // ignore
- return null;
- }
-
- public String getTaskKind() {
- // ignore
- return null;
- }
-
- public String getTaskUrl() {
- // ignore
- return null;
- }
-
- public void setCompletionDate(Date dateCompleted) {
- // ignore
-
- }
-
- public void setComponent(String component) {
- // ignore
-
- }
-
- public void setCreationDate(Date dateCreated) {
- // ignore
-
- }
-
- public void setDescription(String description) {
- // ignore
-
- }
-
- public void setDueDate(Date value) {
- // ignore
-
- }
-
- public void setModificationDate(Date dateModified) {
- // ignore
-
- }
-
- public void setOwner(String owner) {
- // ignore
-
- }
-
- public void setPriority(PriorityLevel priority) {
- // ignore
-
- }
-
- public void setProduct(String product) {
- // ignore
-
- }
-
- public void setReporter(String reporter) {
- // ignore
-
- }
-
- public void setSummary(String summary) {
- // ignore
-
- }
-
- public void setTaskKind(String taskKind) {
- // ignore
-
- }
-
- public void setTaskUrl(String taskUrl) {
- // ignore
-
- }
-
- public void copyFrom(ITaskMapping source) {
- // ignore
-
- }
-
- public List<String> getCc() {
- // ignore
- return null;
- }
-
- public List<String> getKeywords() {
- // ignore
- return null;
- }
-
- public String getReporter() {
- // ignore
- return null;
- }
-
- public String getResolution() {
- // ignore
- return null;
- }
-
- public String getTaskStatus() {
- // ignore
- return null;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/AbstractExternalizationParticipant.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/AbstractExternalizationParticipant.java
deleted file mode 100644
index 3a59a805a..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/AbstractExternalizationParticipant.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core.externalization;
-
-import java.io.File;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.Locale;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.mylyn.commons.net.Policy;
-import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
-
-/**
- * File based externalization participant
- *
- * @author Rob Elves
- */
-public abstract class AbstractExternalizationParticipant implements IExternalizationParticipant {
-
- static final String SNAPSHOT_PREFIX = ".";
-
- public abstract void load(String rootPath, IProgressMonitor monitor) throws CoreException;
-
- public abstract void save(String rootPath, IProgressMonitor monitor) throws CoreException;
-
- public abstract String getDescription();
-
- public abstract ISchedulingRule getSchedulingRule();
-
- public abstract boolean isDirty();
-
- public abstract String getFileName();
-
- public AbstractExternalizationParticipant() {
- super();
- }
-
- protected boolean restoreSnapshot(File file) {
- File backup = new File(file.getParentFile(), SNAPSHOT_PREFIX + file.getName());
- File originalFile = file.getAbsoluteFile();
- if (originalFile.exists()) {
- SimpleDateFormat format = new SimpleDateFormat(ITasksCoreConstants.FILENAME_TIMESTAMP_FORMAT,
- Locale.ENGLISH);
- File failed = new File(file.getParentFile(), "failed-" + format.format(new Date()) + "-"
- + originalFile.getName());
- originalFile.renameTo(failed);
- }
- return backup.renameTo(originalFile);
- }
-
- protected boolean takeSnapshot(File file) {
- if (file.length() > 0) {
- File originalFile = file.getAbsoluteFile();
- File backup = new File(file.getParentFile(), SNAPSHOT_PREFIX + file.getName());
- backup.delete();
- return originalFile.renameTo(backup);
- }
- return false;
- }
-
- public void execute(IExternalizationContext context, IProgressMonitor monitor) throws CoreException {
- Assert.isNotNull(context);
- monitor = Policy.monitorFor(monitor);
- final File dataFile = getFile(context.getRootPath());
- switch (context.getKind()) {
- case SAVE:
- if (dataFile != null) {
- takeSnapshot(dataFile);
- }
- save(context.getRootPath(), monitor);
- break;
- case LOAD:
- try {
- load(context.getRootPath(), monitor);
- } catch (CoreException e) {
- restoreSnapshot(dataFile);
- load(context.getRootPath(), monitor);
- }
- break;
- case SNAPSHOT:
- break;
- }
-
- }
-
- public File getFile(String rootPath) throws CoreException {
- String fileName = getFileName();
- if (fileName != null) {
- String filePath = rootPath + File.separator + getFileName();
- return new File(filePath);
- }
-
-// if (!file.exists()) {
-// try {
-// if (!file.createNewFile()) {
-// throw new CoreException(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN, getDescription()
-// + " file not found, error creating new file."));
-// }
-// } catch (IOException e) {
-// throw new CoreException(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN, getDescription()
-// + " file not found, error creating new file.", e));
-// }
-// }
-
- return null;
- }
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/DelegatingTaskExternalizer.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/DelegatingTaskExternalizer.java
deleted file mode 100644
index ce4d11665..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/DelegatingTaskExternalizer.java
+++ /dev/null
@@ -1,752 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core.externalization;
-
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Calendar;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTaskCategory;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.DateRange;
-import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
-import org.eclipse.mylyn.internal.tasks.core.LocalRepositoryConnector;
-import org.eclipse.mylyn.internal.tasks.core.LocalTask;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryTaskHandleUtil;
-import org.eclipse.mylyn.internal.tasks.core.TaskActivityUtil;
-import org.eclipse.mylyn.internal.tasks.core.TaskCategory;
-import org.eclipse.mylyn.internal.tasks.core.TaskExternalizationException;
-import org.eclipse.mylyn.internal.tasks.core.TaskList;
-import org.eclipse.mylyn.internal.tasks.core.TaskTask;
-import org.eclipse.mylyn.internal.tasks.core.TasksModel;
-import org.eclipse.mylyn.internal.tasks.core.UncategorizedTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractTaskListFactory;
-import org.eclipse.mylyn.tasks.core.AbstractTaskListMigrator;
-import org.eclipse.mylyn.tasks.core.IAttributeContainer;
-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.ITask.PriorityLevel;
-import org.eclipse.mylyn.tasks.core.ITask.SynchronizationState;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-/**
- * Subclass externalizers must override the get*TagName() methods for the types of externalized items they support to
- * ensure that their externalizer does not externalize tasks from other connectors incorrectly.
- *
- * These tag names uniquely identify the externalizer to be used to read the task from externalized form on disk.
- *
- * The canCreateElementFor methods specify which tasks the externalizer should write to disk.
- *
- * The TaskList is read on startup, so externalizers extending this should not perform any slow (i.e., network)
- * operations when overriding methods.
- *
- * @author Mik Kersten
- * @author Ken Sueda (XML serialization support)
- * @author Steffen Pingel
- */
-public final class DelegatingTaskExternalizer {
-
- static final String DEFAULT_PRIORITY = PriorityLevel.P3.toString();
-
- static final String DATE_FORMAT = "yyyy-MM-dd HH:mm:ss.S z";
-
- static final String KEY_NOTIFIED_INCOMING = "NotifiedIncoming";
-
- public static final String KEY_NAME = "Name";
-
- public static final String KEY_LABEL = "Label";
-
- static final String KEY_HANDLE = "Handle";
-
- public static final String KEY_REPOSITORY_URL = "RepositoryUrl";
-
- public static final String KEY_CATEGORY = "Category";
-
- static final String VAL_ROOT = "Root";
-
- static final String KEY_SUBTASK = "SubTask";
-
- static final String KEY_KIND = "Kind";
-
- static final String KEY_TASK_CATEGORY = "Task" + KEY_CATEGORY;
-
- static final String KEY_LINK = "Link";
-
- static final String KEY_PLAN = "Plan";
-
- static final String KEY_TIME_ESTIMATED = "Estimated";
-
- static final String KEY_ISSUEURL = "IssueURL";
-
- static final String KEY_NOTES = "Notes";
-
- static final String KEY_ACTIVE = "Active";
-
- static final String KEY_PRIORITY = "Priority";
-
- static final String KEY_PATH = "Path";
-
- static final String VAL_FALSE = "false";
-
- static final String VAL_TRUE = "true";
-
- static final String KEY_DATE_END = "EndDate";
-
- static final String KEY_QUERY_HIT = "QueryHit";
-
- static final String KEY_TASK_REFERENCE = "TaskReference";
-
- static final String KEY_DATE_CREATION = "CreationDate";
-
- static final String KEY_DATE_REMINDER = "ReminderDate";
-
- static final String KEY_DATE_SCHEDULED_START = "ScheduledStartDate";
-
- static final String KEY_DATE_SCHEDULED_END = "ScheduledEndDate";
-
- static final String KEY_DATE_MODIFICATION = "ModificationDate";
-
- static final String KEY_DATE_DUE = "DueDate";
-
- static final String KEY_REMINDED = "Reminded";
-
- static final String KEY_FLOATING = "Floating";
-
- /**
- * This element holds the date stamp recorded upon last transition to a synchronized state.
- */
- static final String KEY_LAST_MOD_DATE = "LastModified";
-
- static final String KEY_DIRTY = "Dirty";
-
- static final String KEY_SYNC_STATE = "offlineSyncState";
-
- static final String KEY_OWNER = "Owner";
-
- static final String KEY_MARK_READ_PENDING = "MarkReadPending";
-
- static final String KEY_STALE = "Stale";
-
- static final String KEY_CONNECTOR_KIND = "ConnectorKind";
-
- static final String KEY_TASK_ID = "TaskId";
-
- public static final String KEY_LAST_REFRESH = "LastRefreshTimeStamp";
-
- static final String NODE_ATTRIBUTE = "Attribute";
-
- static final String NODE_QUERY = "Query";
-
- static final String NODE_TASK = "Task";
-
- static final String KEY_KEY = "Key";
-
- private List<AbstractTaskListFactory> factories;
-
- // 2.0 -> 3.0 migration holds tasks to category handles
- private final Map<AbstractTask, String> parentCategoryMap;
-
- private final TasksModel tasksModel;
-
- private List<AbstractTaskListMigrator> migrators;
-
- private boolean taskActivated;
-
- public DelegatingTaskExternalizer(TasksModel tasksModel) {
- Assert.isNotNull(tasksModel);
- this.tasksModel = tasksModel;
- this.parentCategoryMap = new HashMap<AbstractTask, String>();
- this.factories = Collections.emptyList();
- this.migrators = Collections.emptyList();
- }
-
- public void initialize(List<AbstractTaskListFactory> externalizers, List<AbstractTaskListMigrator> migrators) {
- Assert.isNotNull(externalizers);
- Assert.isNotNull(migrators);
- this.factories = externalizers;
- this.migrators = migrators;
- }
-
- public Element createCategoryElement(AbstractTaskCategory category, Document doc, Element parent) {
- Element node = doc.createElement(getCategoryTagName());
- node.setAttribute(DelegatingTaskExternalizer.KEY_NAME, category.getSummary());
- parent.appendChild(node);
- for (ITask task : category.getChildren()) {
- createTaskReference(KEY_TASK_REFERENCE, task, doc, node);
- }
- return node;
- }
-
- public Element createTaskElement(AbstractTask task, Document doc, Element parent) {
- Element node;
- if (task.getClass() == TaskTask.class || task instanceof LocalTask) {
- node = doc.createElement(NODE_TASK);
- } else {
- AbstractTaskListFactory factory = null;
- for (AbstractTaskListFactory currentFactory : factories) {
- if (currentFactory.canCreate(task)) {
- factory = currentFactory;
- break;
- }
- }
- String taskTagName;
- if (factory != null) {
- taskTagName = factory.getTaskElementName();
- } else {
- StatusHandler.log(new Status(IStatus.WARNING, ITasksCoreConstants.ID_PLUGIN,
- "No externalizer for task: " + task));
- return null;
- }
- node = doc.createElement(taskTagName);
- factory.setAdditionalAttributes(task, node);
- }
-
- node.setAttribute(KEY_CONNECTOR_KIND, task.getConnectorKind());
- node.setAttribute(KEY_REPOSITORY_URL, task.getRepositoryUrl());
- node.setAttribute(KEY_TASK_ID, task.getTaskId());
- if (task.getTaskKey() != null) {
- node.setAttribute(KEY_KEY, task.getTaskKey());
- }
- node.setAttribute(KEY_HANDLE, task.getHandleIdentifier());
- node.setAttribute(KEY_LABEL, stripControlCharacters(task.getSummary()));
-
- node.setAttribute(KEY_PRIORITY, task.getPriority());
- node.setAttribute(KEY_KIND, task.getTaskKind());
-
- if (task.isActive()) {
- node.setAttribute(KEY_ACTIVE, VAL_TRUE);
- } else {
- node.setAttribute(KEY_ACTIVE, VAL_FALSE);
- }
-
- if (task.getUrl() != null) {
- node.setAttribute(KEY_ISSUEURL, task.getUrl());
- }
- node.setAttribute(KEY_NOTES, stripControlCharacters(task.getNotes()));
- node.setAttribute(KEY_TIME_ESTIMATED, "" + task.getEstimatedTimeHours());
- node.setAttribute(KEY_DATE_END, formatExternDate(task.getCompletionDate()));
- node.setAttribute(KEY_DATE_CREATION, formatExternDate(task.getCreationDate()));
- node.setAttribute(KEY_DATE_MODIFICATION, formatExternDate(task.getModificationDate()));
- node.setAttribute(KEY_DATE_DUE, formatExternDate(task.getDueDate()));
- if (task.getScheduledForDate() != null) {
- node.setAttribute(KEY_DATE_SCHEDULED_START, formatExternCalendar(task.getScheduledForDate().getStartDate()));
- node.setAttribute(KEY_DATE_SCHEDULED_END, formatExternCalendar(task.getScheduledForDate().getEndDate()));
- }
- if (task.isReminded()) {
- node.setAttribute(KEY_REMINDED, VAL_TRUE);
- } else {
- node.setAttribute(KEY_REMINDED, VAL_FALSE);
- }
- if (task.isStale()) {
- node.setAttribute(KEY_STALE, VAL_TRUE);
- } else {
- node.setAttribute(KEY_STALE, VAL_FALSE);
- }
- if (task.isMarkReadPending()) {
- node.setAttribute(KEY_MARK_READ_PENDING, VAL_TRUE);
- } else {
- node.setAttribute(KEY_MARK_READ_PENDING, VAL_FALSE);
- }
- if (task.getLastReadTimeStamp() != null) {
- node.setAttribute(KEY_LAST_MOD_DATE, task.getLastReadTimeStamp());
- }
- if (task.isNotified()) {
- node.setAttribute(KEY_NOTIFIED_INCOMING, VAL_TRUE);
- } else {
- node.setAttribute(KEY_NOTIFIED_INCOMING, VAL_FALSE);
- }
- if (task.getSynchronizationState() != null) {
- node.setAttribute(KEY_SYNC_STATE, task.getSynchronizationState().name());
- } else {
- node.setAttribute(KEY_SYNC_STATE, SynchronizationState.SYNCHRONIZED.name());
- }
- if (task.getOwner() != null) {
- node.setAttribute(KEY_OWNER, task.getOwner());
- }
- createAttributes(task, doc, node);
- for (ITask t : task.getChildren()) {
- createTaskReference(KEY_SUBTASK, t, doc, node);
- }
-
- parent.appendChild(node);
- return node;
- }
-
- private void createAttributes(IAttributeContainer container, Document doc, Element parent) {
- Map<String, String> attributes = container.getAttributes();
- for (Map.Entry<String, String> entry : attributes.entrySet()) {
- Element node = doc.createElement(NODE_ATTRIBUTE);
- node.setAttribute(KEY_KEY, entry.getKey());
- node.setTextContent(entry.getValue());
- parent.appendChild(node);
- }
-
- }
-
- /**
- * creates nested task reference nodes named nodeName which include a handle to the task
- *
- * @return
- */
- public Element createTaskReference(String nodeName, ITask task, Document doc, Element parent) {
- Element node = doc.createElement(nodeName);
- node.setAttribute(KEY_HANDLE, task.getHandleIdentifier());
- parent.appendChild(node);
- return node;
- }
-
- /**
- * create tasks from the nodes provided and places them within the given container
- */
- public void readTaskReferences(AbstractTaskContainer task, NodeList nodes, TaskList tasklist) {
- for (int j = 0; j < nodes.getLength(); j++) {
- Node child = nodes.item(j);
- Element element = (Element) child;
- if (element.hasAttribute(KEY_HANDLE)) {
- String handle = element.getAttribute(KEY_HANDLE);
- AbstractTask subTask = tasklist.getTask(handle);
- if (subTask != null) {
- tasklist.addTask(subTask, task);
- }
- }
- }
-
- }
-
- @SuppressWarnings( { "deprecation", "restriction" })
- private String stripControlCharacters(String text) {
- if (text == null) {
- return "";
- }
- return org.eclipse.mylyn.internal.commons.core.XmlStringConverter.cleanXmlString(text);
- }
-
- private String formatExternDate(Date date) {
- if (date == null) {
- return "";
- }
- String f = DATE_FORMAT;
- SimpleDateFormat format = new SimpleDateFormat(f, Locale.ENGLISH);
- return format.format(date);
- }
-
- private String formatExternCalendar(Calendar date) {
- if (date == null) {
- return "";
- }
- String f = DATE_FORMAT;
- SimpleDateFormat format = new SimpleDateFormat(f, Locale.ENGLISH);
- return format.format(date.getTime());
- }
-
- public void readCategory(Node node, TaskList taskList) {
- Element element = (Element) node;
- AbstractTaskCategory category = null;
- if (element.hasAttribute(KEY_NAME)) {
- String handle = element.getAttribute(KEY_NAME);
- category = taskList.getContainerForHandle(handle);
- if (category == null) {
- category = new TaskCategory(element.getAttribute(KEY_NAME));
- taskList.addCategory((TaskCategory) category);
- }
- } else {
- // LEGACY: registry categories did not have names
- // category = taskList.getArchiveContainer();
- // a null category will now go into appropriate orphaned category
- }
-
- NodeList list = node.getChildNodes();
- readTaskReferences(category, list, taskList);
- }
-
- public final AbstractTask readTask(Node node, AbstractTaskCategory legacyCategory, ITask parent)
- throws CoreException {
- String handle;
- String taskId;
- String repositoryUrl;
- String summary = "";
- Element element = (Element) node;
- if (element.hasAttribute(KEY_REPOSITORY_URL) && element.hasAttribute(KEY_TASK_ID)
- && element.hasAttribute(KEY_HANDLE)) {
- handle = element.getAttribute(KEY_HANDLE);
- repositoryUrl = element.getAttribute(KEY_REPOSITORY_URL);
- taskId = element.getAttribute(KEY_TASK_ID);
- } else if (element.hasAttribute(KEY_HANDLE)) {
- handle = element.getAttribute(KEY_HANDLE);
- repositoryUrl = RepositoryTaskHandleUtil.getRepositoryUrl(handle);
- taskId = RepositoryTaskHandleUtil.getTaskId(handle);
- } else {
- throw new CoreException(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN,
- "Handle not stored for repository task"));
- }
- if (element.hasAttribute(KEY_LABEL)) {
- summary = element.getAttribute(KEY_LABEL);
- }
-
- AbstractTask task = null;
- AbstractTaskListMigrator taskMigrator = null;
- if (NODE_TASK.equals(node.getNodeName())) {
- String connectorKind = element.getAttribute(DelegatingTaskExternalizer.KEY_CONNECTOR_KIND);
- task = readDefaultTask(connectorKind, repositoryUrl, taskId, summary, element);
- }
- // attempt migration from < 3.0 task list
- if (task == null) {
- for (AbstractTaskListMigrator migrator : migrators) {
- if (node.getNodeName().equals(migrator.getTaskElementName())) {
- task = readDefaultTask(migrator.getConnectorKind(), repositoryUrl, taskId, summary, element);
- taskMigrator = migrator;
- break;
- }
- }
- }
- // legacy support
- if (task == null) {
- for (AbstractTaskListFactory externalizer : factories) {
- if (node.getNodeName().equals(externalizer.getTaskElementName())) {
- task = externalizer.createTask(repositoryUrl, taskId, summary, element);
- break;
- }
- }
- }
- // populate common attributes
- if (task != null) {
- readTaskInfo(task, element, parent, legacyCategory);
- readAttributes(task, element);
- if (taskMigrator != null) {
- taskMigrator.migrateTask(task, element);
- }
- }
- return task;
- }
-
- private void readAttributes(IAttributeContainer container, Element parent) {
- NodeList list = parent.getChildNodes();
- for (int i = 0; i < list.getLength(); i++) {
- Node child = list.item(i);
- if (child instanceof Element && child.getNodeName().equals(NODE_ATTRIBUTE)) {
- Element element = (Element) child;
- String key = element.getAttribute(KEY_KEY);
- if (key.length() > 0) {
- container.setAttribute(key, element.getTextContent());
- }
- }
- }
- }
-
- private void readTaskInfo(AbstractTask task, Element element, ITask parent, AbstractTaskCategory legacyCategory) {
- if (element.hasAttribute(KEY_CATEGORY)) {
- // Migration 2.0 -> 3.0 task list. Category no longer maintained on the task element but
- // task handles held within category nodes similar to query children
- String categoryHandle = element.getAttribute(KEY_CATEGORY);
- if (categoryHandle.equals(VAL_ROOT)) {
- categoryHandle = UncategorizedTaskContainer.HANDLE;
- }
- //task.setCategoryHandle(categoryHandle);
- parentCategoryMap.put(task, categoryHandle);
- }
- if (element.hasAttribute(KEY_PRIORITY)) {
- task.setPriority(element.getAttribute(KEY_PRIORITY));
- } else {
- task.setPriority(DEFAULT_PRIORITY);
- }
- if (element.hasAttribute(KEY_KIND)) {
- task.setTaskKind(element.getAttribute(KEY_KIND));
- }
- if (!taskActivated && element.getAttribute(KEY_ACTIVE).compareTo(VAL_TRUE) == 0) {
- task.setActive(true);
- taskActivated = true;
- } else {
- task.setActive(false);
- }
- if (element.hasAttribute(KEY_ISSUEURL)) {
- task.setUrl(element.getAttribute(KEY_ISSUEURL));
- } else {
- task.setUrl("");
- }
- if (element.hasAttribute(KEY_NOTES)) {
- task.setNotes(element.getAttribute(KEY_NOTES));
- } else {
- task.setNotes("");
- }
- if (element.hasAttribute(KEY_TIME_ESTIMATED)) {
- String est = element.getAttribute(KEY_TIME_ESTIMATED);
- try {
- int estimate = Integer.parseInt(est);
- task.setEstimatedTimeHours(estimate);
- } catch (Exception e) {
- task.setEstimatedTimeHours(0);
- }
- } else {
- task.setEstimatedTimeHours(0);
- }
- if (element.hasAttribute(KEY_DATE_END)) {
- task.setCompletionDate(getDateFromString(element.getAttribute(KEY_DATE_END)));
- } else {
- task.setCompletionDate(null);
- }
- if (element.hasAttribute(KEY_DATE_CREATION)) {
- task.setCreationDate(getDateFromString(element.getAttribute(KEY_DATE_CREATION)));
- } else {
- task.setCreationDate(Calendar.getInstance().getTime());
- }
- if (element.hasAttribute(KEY_DATE_MODIFICATION)) {
- task.setModificationDate(getDateFromString(element.getAttribute(KEY_DATE_MODIFICATION)));
- } else {
- task.setModificationDate(null);
- }
- if (element.hasAttribute(KEY_DATE_DUE)) {
- task.setDueDate(getDateFromString(element.getAttribute(KEY_DATE_DUE)));
- } else {
- task.setDueDate(null);
- }
- // Legacy 2.3.2 -> 3.0 migration of scheduled date
- boolean isFloating = false;
- if (element.hasAttribute(KEY_FLOATING) && element.getAttribute(KEY_FLOATING).compareTo(VAL_TRUE) == 0) {
- isFloating = true;
- } else {
- isFloating = false;
- }
- if (element.hasAttribute(KEY_DATE_REMINDER)) {
- Date date = getDateFromString(element.getAttribute(KEY_DATE_REMINDER));
- if (date != null) {
- if (isFloating) {
- task.setScheduledForDate(TaskActivityUtil.getWeekOf(date));
- } else {
- task.setScheduledForDate(TaskActivityUtil.getDayOf(date));
- }
- }
- }
- // Scheduled date range (3.0)
- if (element.hasAttribute(KEY_DATE_SCHEDULED_START) && element.hasAttribute(KEY_DATE_SCHEDULED_END)) {
- Date startDate = getDateFromString(element.getAttribute(KEY_DATE_SCHEDULED_START));
- Date endDate = getDateFromString(element.getAttribute(KEY_DATE_SCHEDULED_END));
- if (startDate != null && endDate != null && startDate.compareTo(endDate) <= 0) {
- Calendar calStart = TaskActivityUtil.getCalendar();
- calStart.setTime(startDate);
- Calendar calEnd = TaskActivityUtil.getCalendar();
- calEnd.setTime(endDate);
- task.setScheduledForDate(new DateRange(calStart, calEnd));
- }
- }
- if (element.hasAttribute(KEY_REMINDED) && element.getAttribute(KEY_REMINDED).compareTo(VAL_TRUE) == 0) {
- task.setReminded(true);
- } else {
- task.setReminded(false);
- }
- if (element.hasAttribute(KEY_STALE) && element.getAttribute(KEY_STALE).compareTo(VAL_TRUE) == 0) {
- task.setStale(true);
- } else {
- task.setStale(false);
- }
- if (element.hasAttribute(KEY_MARK_READ_PENDING)
- && element.getAttribute(KEY_MARK_READ_PENDING).compareTo(VAL_TRUE) == 0) {
- task.setMarkReadPending(true);
- } else {
- task.setMarkReadPending(false);
- }
- task.setSynchronizing(false);
- if (element.hasAttribute(KEY_REPOSITORY_URL)) {
- task.setRepositoryUrl(element.getAttribute(KEY_REPOSITORY_URL));
- }
- if (element.hasAttribute(KEY_LAST_MOD_DATE) && !element.getAttribute(KEY_LAST_MOD_DATE).equals("")) {
- task.setLastReadTimeStamp(element.getAttribute(KEY_LAST_MOD_DATE));
- }
- if (element.hasAttribute(KEY_OWNER)) {
- task.setOwner(element.getAttribute(KEY_OWNER));
- }
- if (VAL_TRUE.equals(element.getAttribute(KEY_NOTIFIED_INCOMING))) {
- task.setNotified(true);
- } else {
- task.setNotified(false);
- }
- if (element.hasAttribute(KEY_SYNC_STATE)) {
- try {
- SynchronizationState state = SynchronizationState.valueOf(element.getAttribute(KEY_SYNC_STATE));
- task.setSynchronizationState(state);
- } catch (IllegalArgumentException e) {
- // invalid sync state, ignore
- // TODO log this to a multi-status
- }
- }
- if (element.hasAttribute(KEY_KEY)) {
- task.setTaskKey(element.getAttribute(KEY_KEY));
- } else {
- task.setTaskKey(null);
- }
- }
-
- private Date getDateFromString(String dateString) {
- Date date = null;
- if ("".equals(dateString)) {
- return null;
- }
- String formatString = DATE_FORMAT;
- SimpleDateFormat format = new SimpleDateFormat(formatString, Locale.ENGLISH);
- try {
- date = format.parse(dateString);
- } catch (ParseException e) {
- StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN, "Could not parse end date", e));
- }
- return date;
- }
-
- private String getCategoryTagName() {
- return KEY_TASK_CATEGORY;
- }
-
- public Element createQueryElement(RepositoryQuery query, Document doc, Element parent) {
- Element node;
- if (query.getClass() == RepositoryQuery.class) {
- node = doc.createElement(NODE_QUERY);
- } else {
- String queryTagName = null;
- AbstractTaskListFactory factory = null;
- for (AbstractTaskListFactory currentFactory : factories) {
- if (currentFactory.canCreate(query)) {
- factory = currentFactory;
- queryTagName = factory.getQueryElementName(query);
- break;
- }
- }
- if (factory == null || queryTagName == null) {
- StatusHandler.log(new Status(IStatus.WARNING, ITasksCoreConstants.ID_PLUGIN,
- "Could not externalize query: " + query));
- return null;
- }
- node = doc.createElement(queryTagName);
- factory.setAdditionalAttributes(query, node);
- }
-
- node.setAttribute(KEY_HANDLE, query.getHandleIdentifier());
- node.setAttribute(KEY_CONNECTOR_KIND, query.getConnectorKind());
- node.setAttribute(KEY_NAME, query.getSummary());
- node.setAttribute(AbstractTaskListFactory.KEY_QUERY_STRING, query.getUrl());
- node.setAttribute(KEY_REPOSITORY_URL, query.getRepositoryUrl());
- if (query.getLastSynchronizedTimeStamp() != null) {
- node.setAttribute(KEY_LAST_REFRESH, query.getLastSynchronizedTimeStamp());
- }
- createAttributes(query, doc, node);
- for (ITask hit : query.getChildren()) {
- createTaskReference(KEY_QUERY_HIT, hit, doc, node);
- }
-
- parent.appendChild(node);
- return node;
- }
-
- public List<AbstractTaskListFactory> getDelegateExternalizers() {
- return factories;
- }
-
- public Map<AbstractTask, String> getLegacyParentCategoryMap() {
- return parentCategoryMap;
- }
-
- /**
- * Reads the Query from the specified Node. If taskList is not null, then also adds this query to the TaskList
- *
- * @throws TaskExternalizationException
- */
- public RepositoryQuery readQuery(Node node, TaskList taskList) {
- Element element = (Element) node;
- String repositoryUrl = element.getAttribute(DelegatingTaskExternalizer.KEY_REPOSITORY_URL);
- String queryString = element.getAttribute(AbstractTaskListFactory.KEY_QUERY_STRING);
- if (queryString.length() == 0) { // fallback for legacy
- queryString = element.getAttribute(AbstractTaskListFactory.KEY_QUERY);
- }
- String label = element.getAttribute(DelegatingTaskExternalizer.KEY_NAME);
- if (label.length() == 0) { // fallback for legacy
- label = element.getAttribute(DelegatingTaskExternalizer.KEY_LABEL);
- }
-
- AbstractTaskListMigrator queryMigrator = null;
- RepositoryQuery query = null;
- if (NODE_QUERY.equals(node.getNodeName())) {
- String connectorKind = element.getAttribute(DelegatingTaskExternalizer.KEY_CONNECTOR_KIND);
- query = readDefaultQuery(connectorKind, repositoryUrl, queryString, label, element);
- }
- // attempt migration from < 3.0 task list
- if (query == null) {
- for (AbstractTaskListMigrator migrator : migrators) {
- Set<String> queryTagNames = migrator.getQueryElementNames();
- if (queryTagNames != null && queryTagNames.contains(node.getNodeName())) {
- query = readDefaultQuery(migrator.getConnectorKind(), repositoryUrl, queryString, label, element);
- queryMigrator = migrator;
- break;
- }
- }
- }
- // legacy support
- if (query == null) {
- for (AbstractTaskListFactory externalizer : factories) {
- Set<String> queryTagNames = externalizer.getQueryElementNames();
- if (queryTagNames != null && queryTagNames.contains(node.getNodeName())) {
- query = externalizer.createQuery(repositoryUrl, queryString, label, element);
- break;
- }
- }
- }
- // populate common attributes
- if (query != null) {
- if (element.getAttribute(DelegatingTaskExternalizer.KEY_LAST_REFRESH) != null
- && !element.getAttribute(DelegatingTaskExternalizer.KEY_LAST_REFRESH).equals("")) {
- query.setLastSynchronizedStamp(element.getAttribute(DelegatingTaskExternalizer.KEY_LAST_REFRESH));
- }
- String handle = element.getAttribute(DelegatingTaskExternalizer.KEY_HANDLE);
- if (handle.length() > 0) {
- query.setHandleIdentifier(handle);
- }
- readAttributes(query, element);
- if (queryMigrator != null) {
- queryMigrator.migrateQuery(query, element);
- }
- }
- return query;
- }
-
- private RepositoryQuery readDefaultQuery(String connectorKind, String repositoryUrl, String queryString,
- String label, Element childElement) {
- TaskRepository taskRepository = tasksModel.getTaskRepository(connectorKind, repositoryUrl);
- IRepositoryQuery query = tasksModel.createQuery(taskRepository);
- query.setSummary(label);
- query.setUrl(queryString);
- return (RepositoryQuery) query;
- }
-
- private AbstractTask readDefaultTask(String connectorKind, String repositoryUrl, String taskId, String summary,
- Element element) {
- TaskRepository taskRepository = tasksModel.getTaskRepository(connectorKind, repositoryUrl);
- if (repositoryUrl.equals(LocalRepositoryConnector.REPOSITORY_URL)) {
- LocalTask task = new LocalTask(taskId, summary);
- return task;
- }
- ITask task = tasksModel.createTask(taskRepository, taskId);
- task.setSummary(summary);
- return (AbstractTask) task;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/ExternalizationManager.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/ExternalizationManager.java
deleted file mode 100644
index 8306a1b6b..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/ExternalizationManager.java
+++ /dev/null
@@ -1,263 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core.externalization;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.mylyn.commons.core.CoreUtil;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.commons.net.Policy;
-import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
-import org.eclipse.mylyn.internal.tasks.core.externalization.IExternalizationContext.KIND;
-
-/**
- * @author Rob Elves
- * @since 3.0
- */
-public class ExternalizationManager {
-
- private ExternalizationJob saveJob;
-
- private IStatus loadStatus;
-
- private String rootFolderPath;
-
- private static boolean saveDisabled = false;
-
- private final List<IExternalizationParticipant> externalizationParticipants = new ArrayList<IExternalizationParticipant>();
-
- private boolean forceSave = false;
-
- public ExternalizationManager(String rootFolderPath) {
- this.rootFolderPath = rootFolderPath;
- }
-
- private ExternalizationJob createJob(String jobName, IExternalizationContext context) {
- //create save job
- ExternalizationJob job = new ExternalizationJob(jobName, context);
- job.setUser(false);
- job.setSystem(true);
- return job;
- }
-
- public void addParticipant(IExternalizationParticipant participant) {
- externalizationParticipants.add(participant);
- }
-
- public void reLoad() {
- reset();
- for (IExternalizationParticipant participant : externalizationParticipants) {
- load(participant);
- }
- }
-
- private void load(IExternalizationParticipant participant) {
- try {
- saveDisabled = true;
- IExternalizationContext loadContext = new LoadContext(rootFolderPath, participant);
- ExternalizationJob job = createJob("Loading participant " + participant.getDescription(), loadContext);
- job.setContext(loadContext);
- // TODO: run async
- job.run(new NullProgressMonitor());
- //reschedule(job, loadContext);
- } finally {
- saveDisabled = false;
- }
- }
-
- public void setRootFolderPath(String rootFolderPath) {
- this.rootFolderPath = rootFolderPath;
- }
-
- public synchronized void requestSave() {
-
- ExternalizationContext saveContext = new ExternalizationContext(KIND.SAVE, rootFolderPath);
-
- if (saveJob == null) {
- saveJob = createJob("Saving participants", saveContext);
- }
-
- reschedule(saveJob, saveContext);
- }
-
- public void stop() {
-// requestSave();
-//
-// if (saveJob != null) {
-// try {
-// saveJob.join();
-// saveJob = null;
-// } catch (InterruptedException e) {
-// StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN,
-// "Task List save on shutdown canceled."));
-// }
-// }
- }
-
- public synchronized void saveNow(IProgressMonitor monitor) {
- monitor = Policy.monitorFor(monitor);
- if (saveJob != null) {
- saveJob.cancel();
- saveJob = null;
- }
- try {
- forceSave = true;
- ExternalizationJob job = createJob("Save Now", new ExternalizationContext(KIND.SAVE, rootFolderPath));
- job.run(monitor);
- } finally {
- forceSave = false;
- }
- }
-
- private void reschedule(ExternalizationJob job, IExternalizationContext context) {
- if (!saveDisabled) {
- if (!CoreUtil.TEST_MODE) {
- job.setContext(context);
- job.schedule(3000);
- } else {
- job.run(new NullProgressMonitor());
- }
- }
- }
-
- protected void setStatus(MultiStatus status) {
- this.loadStatus = status;
- }
-
- public IStatus getLoadStatus() {
- return loadStatus;
- }
-
- private void reset() {
- saveDisabled = false;
- loadStatus = null;
- if (saveJob != null) {
- saveJob.cancel();
- saveJob = null;
- }
- }
-
- class ExternalizationJob extends Job {
-
- IExternalizationContext context;
-
- public ExternalizationJob(String jobTitle, IExternalizationContext context) {
- super(jobTitle);
- this.context = context;
- }
-
- public void setContext(IExternalizationContext saveContext) {
- this.context = saveContext;
- }
-
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- switch (context.getKind()) {
- case SAVE:
- try {
- monitor.beginTask("Saving...", externalizationParticipants.size());
- for (IExternalizationParticipant participant : externalizationParticipants) {
- ISchedulingRule rule = participant.getSchedulingRule();
- if (forceSave || participant.isDirty()) {
- try {
- Job.getJobManager().beginRule(rule, monitor);
- monitor.setTaskName("Saving " + participant.getDescription());
- participant.execute(context, new SubProgressMonitor(monitor, IProgressMonitor.UNKNOWN));
- } catch (CoreException e) {
- StatusHandler.log(new Status(IStatus.WARNING, ITasksCoreConstants.ID_PLUGIN,
- "Save failed for " + participant.getDescription(), e));
- } finally {
- Job.getJobManager().endRule(rule);
- }
- }
- monitor.worked(1);
- }
- } finally {
- monitor.done();
- }
- break;
- case SNAPSHOT:
-
- break;
- case LOAD:
- if (context instanceof LoadContext) {
- LoadContext loadContext = ((LoadContext) context);
- IExternalizationParticipant participant = loadContext.getParticipant();
- ISchedulingRule rule = participant.getSchedulingRule();
- try {
- Job.getJobManager().beginRule(rule, monitor);
- try {
- participant.execute(context, monitor);
- } catch (CoreException e) {
- if (loadStatus == null) {
- loadStatus = e.getStatus();
- } else {
- IStatus[] stati = { loadStatus, e.getStatus() };
- loadStatus = new MultiStatus(ITasksCoreConstants.ID_PLUGIN, IStatus.ERROR, stati,
- "Externalization Failure", null);
- }
- saveDisabled = true;
- }
- } finally {
- Job.getJobManager().endRule(rule);
- }
- }
-
- break;
- }
- return Status.OK_STATUS;
- }
- }
-
- class LoadContext extends ExternalizationContext {
-
- private final IExternalizationParticipant participant;
-
- public LoadContext(String rootPath, IExternalizationParticipant participant) {
- super(IExternalizationContext.KIND.LOAD, rootPath);
- this.participant = participant;
- }
-
- public IExternalizationParticipant getParticipant() {
- return participant;
- }
-
- }
-
- class ExternalizationContext implements IExternalizationContext {
-
- private final KIND kind;
-
- private final String rootPath;
-
- public ExternalizationContext(IExternalizationContext.KIND kind, String rootPath) {
- this.kind = kind;
- this.rootPath = rootPath;
- }
-
- public KIND getKind() {
- return kind;
- }
-
- public String getRootPath() {
- return rootPath;
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/IExternalizationContext.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/IExternalizationContext.java
deleted file mode 100644
index 8520f834c..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/IExternalizationContext.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core.externalization;
-
-/**
- * @author Rob Elves
- */
-public interface IExternalizationContext {
-
- public enum KIND {
- SAVE, SNAPSHOT, LOAD;
- }
-
- public abstract KIND getKind();
-
- public abstract String getRootPath();
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/IExternalizationParticipant.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/IExternalizationParticipant.java
deleted file mode 100644
index 4b9748cf9..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/IExternalizationParticipant.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core.externalization;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-
-/**
- * @author Rob Elves
- */
-public interface IExternalizationParticipant {
-
- public abstract boolean isDirty();
-
- public abstract ISchedulingRule getSchedulingRule();
-
- public abstract void execute(IExternalizationContext context, IProgressMonitor monitor) throws CoreException;
-
- public abstract String getDescription();
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/TaskListExternalizationParticipant.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/TaskListExternalizationParticipant.java
deleted file mode 100644
index 537a0f014..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/TaskListExternalizationParticipant.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core.externalization;
-
-import java.io.File;
-import java.util.Set;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.mylyn.internal.tasks.core.ITaskListChangeListener;
-import org.eclipse.mylyn.internal.tasks.core.ITaskListRunnable;
-import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
-import org.eclipse.mylyn.internal.tasks.core.LocalRepositoryConnector;
-import org.eclipse.mylyn.internal.tasks.core.TaskContainerDelta;
-import org.eclipse.mylyn.internal.tasks.core.TaskList;
-import org.eclipse.mylyn.internal.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.internal.tasks.core.UnmatchedTaskContainer;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-/**
- * @author Rob Elves
- */
-public class TaskListExternalizationParticipant extends AbstractExternalizationParticipant implements
- IExternalizationParticipant, ITaskListChangeListener {
-
- private static final String DESCRIPTION = "Task List";
-
- private final ExternalizationManager manager;
-
- private final TaskListExternalizer taskListWriter;
-
- private final TaskList taskList;
-
- private boolean dirty;
-
- private final TaskRepositoryManager taskRepositoryManager;
-
- public TaskListExternalizationParticipant(TaskList taskList, TaskListExternalizer taskListExternalizer,
- ExternalizationManager manager, TaskRepositoryManager repositoryManager) {
- this.manager = manager;
- this.taskList = taskList;
- this.taskListWriter = taskListExternalizer;
- this.taskRepositoryManager = repositoryManager;
- }
-
- @Override
- public ISchedulingRule getSchedulingRule() {
- return TaskList.getSchedulingRule();
- }
-
- @Override
- public boolean isDirty() {
- return dirty;
- }
-
- @Override
- public void load(String rootPath, IProgressMonitor monitor) throws CoreException {
- final File taskListFile = getFile(rootPath);
- ITaskListRunnable loadRunnable = new ITaskListRunnable() {
- public void execute(IProgressMonitor monitor) throws CoreException {
- resetTaskList();
- taskListWriter.readTaskList(taskList, taskListFile);
- }
- };
-
- taskList.run(loadRunnable, monitor);
- }
-
- /**
- * public for tests
- */
- public void resetTaskList() {
- taskList.reset();
- prepareOrphanContainers();
- }
-
- private void prepareOrphanContainers() {
- for (TaskRepository repository : taskRepositoryManager.getAllRepositories()) {
- if (!repository.getConnectorKind().equals(LocalRepositoryConnector.CONNECTOR_KIND)) {
- taskList.addUnmatchedContainer(new UnmatchedTaskContainer(repository.getConnectorKind(),
- repository.getRepositoryUrl()));
- }
- }
- }
-
- @Override
- public void save(String rootPath, IProgressMonitor monitor) throws CoreException {
- final File taskListFile = getFile(rootPath);
- ITaskListRunnable saveRunnable = new ITaskListRunnable() {
- public void execute(IProgressMonitor monitor) throws CoreException {
- taskListWriter.writeTaskList(taskList, taskListFile);
- synchronized (TaskListExternalizationParticipant.this) {
- dirty = false;
- }
- }
- };
-
- taskList.run(saveRunnable, monitor);
- }
-
- @Override
- public String getDescription() {
- return DESCRIPTION;
- }
-
- @Override
- public String getFileName() {
- return ITasksCoreConstants.DEFAULT_TASK_LIST_FILE;
- }
-
- public void containersChanged(Set<TaskContainerDelta> containers) {
- for (TaskContainerDelta taskContainerDelta : containers) {
- if (!taskContainerDelta.isTransient()) {
- synchronized (TaskListExternalizationParticipant.this) {
- dirty = true;
- }
- manager.requestSave();
- return;
- }
- }
- }
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/TaskListExternalizer.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/TaskListExternalizer.java
deleted file mode 100644
index f61072b3c..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/externalization/TaskListExternalizer.java
+++ /dev/null
@@ -1,417 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.core.externalization;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipInputStream;
-import java.util.zip.ZipOutputStream;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.Result;
-import javax.xml.transform.Source;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.TransformerFactoryConfigurationError;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTaskCategory;
-import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
-import org.eclipse.mylyn.internal.tasks.core.LocalTask;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
-import org.eclipse.mylyn.internal.tasks.core.TaskList;
-import org.eclipse.mylyn.internal.tasks.core.TasksModel;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractTaskListFactory;
-import org.eclipse.mylyn.tasks.core.AbstractTaskListMigrator;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-/**
- * @author Mik Kersten
- * @author Ken Sueda
- * @author Rob Elves
- * @author Jevgeni Holodkov
- */
-public class TaskListExternalizer {
-
- private static final String ERROR_TASKLIST_READ = "Failed to load Task List";
-
- private static final String TRANSFORM_PROPERTY_VERSION = "version";
-
- // May 2007: There was a bug when reading in 1.1
- // Result was an infinite loop within the parser
- private static final String XML_VERSION = "1.0";
-
- public static final String ATTRIBUTE_VERSION = "Version";
-
- public static final String ELEMENT_TASK_LIST = "TaskList";
-
- private static final String VALUE_VERSION = "1.0.1";
-
- private static final String VALUE_VERSION_1_0_0 = "1.0.0";
-
- private final DelegatingTaskExternalizer delagatingExternalizer;
-
- private final List<Node> orphanedTaskNodes = new ArrayList<Node>();
-
- private final List<Node> orphanedQueryNodes = new ArrayList<Node>();
-
- private String readVersion = "";
-
- public TaskListExternalizer(TasksModel tasksModel) {
- this.delagatingExternalizer = new DelegatingTaskExternalizer(tasksModel);
- }
-
- public void initialize(List<AbstractTaskListFactory> externalizers, List<AbstractTaskListMigrator> migrators) {
- this.delagatingExternalizer.initialize(externalizers, migrators);
- }
-
- public void writeTaskList(TaskList taskList, File outFile) throws CoreException {
- try {
- FileOutputStream outStream = new FileOutputStream(outFile);
- try {
- writeTaskList(taskList, outStream);
- } finally {
- outStream.close();
- }
- } catch (Exception e) {
- throw new CoreException(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN, "Saving Task List failed",
- e));
- }
- }
-
- private void writeTaskList(TaskList taskList, OutputStream outputStream) throws IOException {
- Document doc = createTaskListDocument();
- if (doc == null) {
- return;
- }
-
- Element root = createTaskListRoot(doc);
-
- // create task nodes...
- for (AbstractTask task : taskList.getAllTasks()) {
- delagatingExternalizer.createTaskElement(task, doc, root);
- }
-
- // create the category nodes...
- for (AbstractTaskCategory category : taskList.getCategories()) {
- delagatingExternalizer.createCategoryElement(category, doc, root);
- }
-
- // create query nodes...
- for (RepositoryQuery query : taskList.getQueries()) {
- try {
- delagatingExternalizer.createQueryElement(query, doc, root);
- } catch (Throwable t) {
- // FIXME use log?
- StatusHandler.fail(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN, "Did not externalize: "
- + query.getSummary(), t));
- }
- }
-
- // Persist orphaned tasks...
- for (Node orphanedTaskNode : orphanedTaskNodes) {
- Node tempNode = doc.importNode(orphanedTaskNode, true);
- if (tempNode != null) {
- root.appendChild(tempNode);
- }
- }
-
- // Persist orphaned queries....
- for (Node orphanedQueryNode : orphanedQueryNodes) {
- Node tempNode = doc.importNode(orphanedQueryNode, true);
- if (tempNode != null) {
- root.appendChild(tempNode);
- }
- }
-
- ZipOutputStream zipOutStream = new ZipOutputStream(outputStream);
- writeTaskList(doc, zipOutStream);
- zipOutStream.finish();
- }
-
- /**
- * @param doc
- * @param outputStream
- * @throws IOException
- */
- private void writeTaskList(Document doc, ZipOutputStream outputStream) throws IOException {
- ZipEntry zipEntry = new ZipEntry(ITasksCoreConstants.OLD_TASK_LIST_FILE);
- outputStream.putNextEntry(zipEntry);
- outputStream.setMethod(ZipOutputStream.DEFLATED);
- writeDOMtoStream(doc, outputStream);
- outputStream.flush();
- outputStream.closeEntry();
- }
-
- /**
- * Writes the provided XML document out to the specified output stream.
- *
- * doc - the document to be written outputStream - the stream to which the document is to be written
- */
- private void writeDOMtoStream(Document doc, OutputStream outputStream) {
- // Prepare the DOM document for writing
- // DOMSource - Acts as a holder for a transformation Source tree in the
- // form of a Document Object Model (DOM) tree
- Source source = new DOMSource(doc);
-
- // StreamResult - Acts as an holder for a XML transformation result
- // Prepare the output stream
- Result result = new StreamResult(outputStream);
-
- // An instance of this class can be obtained with the
- // TransformerFactory.newTransformer method. This instance may
- // then be used to process XML from a variety of sources and write
- // the transformation output to a variety of sinks
-
- Transformer xformer = null;
- try {
- xformer = TransformerFactory.newInstance().newTransformer();
- xformer.setOutputProperty(TRANSFORM_PROPERTY_VERSION, XML_VERSION);
- xformer.transform(source, result);
- } catch (TransformerConfigurationException e) {
- e.printStackTrace();
- } catch (TransformerFactoryConfigurationError e) {
- e.printStackTrace();
- } catch (TransformerException e1) {
- e1.printStackTrace();
- }
- }
-
- private Document createTaskListDocument() {
- DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
- DocumentBuilder db;
- Document doc = null;
-
- try {
- db = dbf.newDocumentBuilder();
- doc = db.newDocument();
- } catch (ParserConfigurationException e) {
- // FIXME propagate exception?
- StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN, "Could not create document", e));
- return doc;
- }
-
- return doc;
- }
-
- private Element createTaskListRoot(Document doc) {
- Element root = doc.createElement(ELEMENT_TASK_LIST);
- root.setAttribute(ATTRIBUTE_VERSION, VALUE_VERSION);
- doc.appendChild(root);
- return root;
- }
-
-// /**
-// * Reads the Query from the specified Node. If taskList is not null, then also adds this query to the TaskList
-// *
-// * @throws TaskExternalizationException
-// */
-// private IRepositoryQuery readQuery(TaskList taskList, Node child) {
-// RepositoryQuery query = null;
-// for (AbstractTaskListFactory externalizer : externalizers) {
-// Set<String> queryTagNames = externalizer.getQueryElementNames();
-// if (queryTagNames != null && queryTagNames.contains(child.getNodeName())) {
-// Element childElement = (Element) child;
-// // TODO: move this stuff into externalizer
-// String repositoryUrl = childElement.getAttribute(DelegatingTaskExternalizer.KEY_REPOSITORY_URL);
-// String queryString = childElement.getAttribute(AbstractTaskListFactory.KEY_QUERY_STRING);
-// if (queryString.length() == 0) { // fallback for legacy
-// queryString = childElement.getAttribute(AbstractTaskListFactory.KEY_QUERY);
-// }
-// String label = childElement.getAttribute(DelegatingTaskExternalizer.KEY_NAME);
-// if (label.length() == 0) { // fallback for legacy
-// label = childElement.getAttribute(DelegatingTaskExternalizer.KEY_LABEL);
-// }
-//
-// query = externalizer.createQuery(repositoryUrl, queryString, label, childElement);
-// if (query != null) {
-// if (childElement.getAttribute(DelegatingTaskExternalizer.KEY_LAST_REFRESH) != null
-// && !childElement.getAttribute(DelegatingTaskExternalizer.KEY_LAST_REFRESH).equals("")) {
-// query.setLastSynchronizedStamp(childElement.getAttribute(DelegatingTaskExternalizer.KEY_LAST_REFRESH));
-// }
-//
-// String handle = childElement.getAttribute(DelegatingTaskExternalizer.KEY_HANDLE);
-// if (handle.length() > 0) {
-// query.setHandleIdentifier(handle);
-// }
-// }
-//
-// // add created Query to the TaskList and read QueryHits (Tasks related to the Query)
-// if (taskList != null) {
-// if (query != null) {
-// taskList.addQuery(query);
-// }
-//
-// NodeList queryChildren = child.getChildNodes();
-// delagatingExternalizer.readTaskReferences(query, queryChildren, taskList);
-// }
-//
-// break;
-// }
-// }
-// if (query == null) {
-// orphanedQueryNodes.add(child);
-// }
-//
-// return query;
-// }
-
- public void readTaskList(TaskList taskList, File inFile) throws CoreException {
- delagatingExternalizer.getLegacyParentCategoryMap().clear();
- Map<AbstractTask, NodeList> tasksWithSubtasks = new HashMap<AbstractTask, NodeList>();
- if (!inFile.exists()) {
- throw new CoreException(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN,
- "Task list file not found \"" + inFile.getAbsolutePath() + "\""));
- }
-
- if (inFile.length() == 0) {
- throw new CoreException(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN,
- "Task list file contains no data \"" + inFile.getAbsolutePath() + "\""));
- }
-
- Document doc;
- doc = openAsDOM(inFile);
-
- if (doc == null) {
- //StatusHandler.log(new Status(IStatus.WARNING, ITasksCoreConstants.ID_PLUGIN, "Empty TaskList"));
- return;
- }
-
- Element root = doc.getDocumentElement();
- readVersion = root.getAttribute(ATTRIBUTE_VERSION);
-
- if (readVersion.equals(VALUE_VERSION_1_0_0)) {
- throw new CoreException(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN, "Task list version \""
- + readVersion + "\" not supported"));
- } else {
- NodeList list = root.getChildNodes();
-
- // Read Tasks
- for (int i = 0; i < list.getLength(); i++) {
- Node child = list.item(i);
- if (!child.getNodeName().endsWith(DelegatingTaskExternalizer.KEY_CATEGORY)
- && !child.getNodeName().endsWith(AbstractTaskListFactory.KEY_QUERY)) {
- AbstractTask task = delagatingExternalizer.readTask(child, null, null);
- if (task != null) {
- taskList.addTask(task);
- if (child.getChildNodes() != null && child.getChildNodes().getLength() > 0) {
- tasksWithSubtasks.put(task, child.getChildNodes());
- }
- } else {
- orphanedTaskNodes.add(child);
- }
- }
- }
-
- for (AbstractTask task : tasksWithSubtasks.keySet()) {
- NodeList nodes = tasksWithSubtasks.get(task);
- delagatingExternalizer.readTaskReferences(task, nodes, taskList);
- }
-
- // Read Queries
- for (int i = 0; i < list.getLength(); i++) {
- Node child = list.item(i);
- if (child.getNodeName().endsWith(AbstractTaskListFactory.KEY_QUERY)) {
- RepositoryQuery query = delagatingExternalizer.readQuery(child, taskList);
- if (query != null) {
- taskList.addQuery(query);
- if (child.getChildNodes() != null && child.getChildNodes().getLength() > 0) {
- delagatingExternalizer.readTaskReferences(query, child.getChildNodes(), taskList);
- }
- } else {
- orphanedTaskNodes.add(child);
- }
- }
- }
-
- // Read Categories
- for (int i = 0; i < list.getLength(); i++) {
- Node child = list.item(i);
- if (child.getNodeName().endsWith(DelegatingTaskExternalizer.KEY_CATEGORY)) {
- delagatingExternalizer.readCategory(child, taskList);
- }
- }
-
- // Legacy migration for task nodes that have the old Category handle on the element
- if (delagatingExternalizer.getLegacyParentCategoryMap().size() > 0) {
- for (AbstractTask task : delagatingExternalizer.getLegacyParentCategoryMap().keySet()) {
- AbstractTaskCategory category = taskList.getContainerForHandle(delagatingExternalizer.getLegacyParentCategoryMap()
- .get(task));
- if (category != null) {
- if (task instanceof LocalTask && !task.getParentContainers().isEmpty()) {
- continue;
- }
- taskList.addTask(task, category);
- }
- }
- }
- }
- }
-
- /**
- * Opens the specified XML file and parses it into a DOM Document.
- *
- * Filename - the name of the file to open Return - the Document built from the XML file Throws - XMLException if
- * the file cannot be parsed as XML - IOException if the file cannot be opened
- *
- * @throws CoreException
- *
- */
- private Document openAsDOM(File inputFile) throws CoreException {
-
- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
- DocumentBuilder builder = null;
- Document document = null;
- try {
- builder = factory.newDocumentBuilder();
- InputStream inputStream = null;
- if (inputFile.getName().endsWith(ITasksCoreConstants.FILE_EXTENSION)) {
- inputStream = new ZipInputStream(new FileInputStream(inputFile));
- ZipEntry entry = ((ZipInputStream) inputStream).getNextEntry();
- while (entry != null) {
- if (ITasksCoreConstants.OLD_TASK_LIST_FILE.equals(entry.getName())) {
- break;
- }
- entry = ((ZipInputStream) inputStream).getNextEntry();
- }
- if (entry == null) {
- return null;
- }
- } else {
- inputStream = new FileInputStream(inputFile);
- }
- document = builder.parse(inputStream);
- } catch (Exception se) {
- throw new CoreException(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN, ERROR_TASKLIST_READ, se));
- }
- return document;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SubmitTaskAttachmentJob.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SubmitTaskAttachmentJob.java
deleted file mode 100644
index bd63fa02b..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SubmitTaskAttachmentJob.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core.sync;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.mylyn.commons.net.Policy;
-import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
-import org.eclipse.mylyn.internal.tasks.core.data.TaskDataManager;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-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.TaskAttribute;
-import org.eclipse.mylyn.tasks.core.data.TaskData;
-import org.eclipse.mylyn.tasks.core.sync.SubmitJob;
-
-/**
- * @author Steffen Pingel
- */
-public class SubmitTaskAttachmentJob extends SubmitJob {
-
- private final TaskAttribute attachmentAttribute;
-
- private final String comment;
-
- private final AbstractRepositoryConnector connector;
-
- private IStatus error;
-
- private final AbstractTaskAttachmentSource source;
-
- private final ITask task;
-
- private final TaskRepository taskRepository;
-
- private final TaskDataManager taskDataManager;
-
- public SubmitTaskAttachmentJob(TaskDataManager taskDataManager, AbstractRepositoryConnector connector,
- TaskRepository taskRepository, ITask task, AbstractTaskAttachmentSource source, String comment,
- TaskAttribute attachmentAttribute) {
- super("Submitting Attachment");
- this.taskDataManager = taskDataManager;
- this.connector = connector;
- this.taskRepository = taskRepository;
- this.task = task;
- this.source = source;
- this.comment = comment;
- this.attachmentAttribute = attachmentAttribute;
- }
-
- @Override
- public IStatus getStatus() {
- return error;
- }
-
- @Override
- public ITask getTask() {
- return task;
- }
-
- @Override
- public IStatus run(IProgressMonitor monitor) {
- final AbstractTaskAttachmentHandler attachmentHandler = connector.getTaskAttachmentHandler();
- if (attachmentHandler == null) {
- error = new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN,
- "The task repository does not support attachments.");
- return Status.OK_STATUS;
- }
- try {
- monitor.beginTask("Submitting attachment", 2 * (1 + getSubmitJobListeners().length) * 100);
- monitor.subTask("Sending data");
- attachmentHandler.postContent(taskRepository, task, source, comment, attachmentAttribute,
- Policy.subMonitorFor(monitor, 100));
- fireTaskSubmitted(monitor);
- monitor.subTask("Updating task");
- TaskData taskData = connector.getTaskData(taskRepository, task.getTaskId(), Policy.subMonitorFor(monitor,
- 100));
- taskDataManager.putUpdatedTaskData(task, taskData, true);
- fireTaskSynchronized(monitor);
- } catch (CoreException e) {
- error = e.getStatus();
- } catch (OperationCanceledException e) {
- return Status.CANCEL_STATUS;
- } finally {
- monitor.done();
- }
- fireDone();
- return Status.OK_STATUS;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SubmitTaskJob.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SubmitTaskJob.java
deleted file mode 100644
index bde88c0d4..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SubmitTaskJob.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.core.sync;
-
-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.OperationCanceledException;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.commons.net.Policy;
-import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
-import org.eclipse.mylyn.internal.tasks.core.TaskTask;
-import org.eclipse.mylyn.internal.tasks.core.data.TaskDataManager;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractLegacyRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.ITask;
-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.TaskData;
-import org.eclipse.mylyn.tasks.core.sync.SubmitJob;
-
-/**
- * @author Steffen Pingel
- */
-public class SubmitTaskJob extends SubmitJob {
-
- private final TaskRepository taskRepository;
-
- private final TaskData taskData;
-
- private final AbstractRepositoryConnector connector;
-
- private IStatus errorStatus;
-
- private ITask task;
-
- private final Set<TaskAttribute> oldAttributes;
-
- private final TaskDataManager taskDataManager;
-
- private RepositoryResponse response;
-
- public SubmitTaskJob(TaskDataManager taskDataManager, AbstractRepositoryConnector connector,
- TaskRepository taskRepository, ITask task, TaskData taskData, Set<TaskAttribute> oldAttributes) {
- super("Submitting Task");
- this.taskDataManager = taskDataManager;
- this.connector = connector;
- this.taskRepository = taskRepository;
- this.task = task;
- this.taskData = taskData;
- this.oldAttributes = oldAttributes;
- }
-
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- try {
- monitor.beginTask("Submitting task", 2 * (1 + getSubmitJobListeners().length) * 100);
-
- // post task data
- AbstractTaskDataHandler taskDataHandler = connector.getTaskDataHandler();
- monitor.subTask("Sending data");
- response = taskDataHandler.postTaskData(taskRepository, taskData, oldAttributes, Policy.subMonitorFor(
- monitor, 100));
- if (response == null || response.getTaskId() == null) {
- throw new CoreException(new RepositoryStatus(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN,
- RepositoryStatus.ERROR_INTERNAL,
- "Task could not be created. No additional information was provided by the connector."));
- }
- fireTaskSubmitted(monitor);
-
- // update task in task list
- String taskId = response.getTaskId();
- monitor.subTask("Receiving data");
- TaskData updatedTaskData = connector.getTaskData(taskRepository, taskId, Policy.subMonitorFor(monitor, 100));
- task = createTask(monitor, updatedTaskData);
- taskDataManager.putSubmittedTaskData(task, updatedTaskData);
- fireTaskSynchronized(monitor);
- } catch (CoreException e) {
- errorStatus = e.getStatus();
- } catch (OperationCanceledException e) {
- return Status.CANCEL_STATUS;
- } catch (Exception e) {
- StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN,
- "Unexpected error during task submission", e));
- errorStatus = new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN, "Unexpected error: "
- + e.getMessage(), e);
- } finally {
- monitor.done();
- }
- fireDone();
- return Status.OK_STATUS;
- }
-
- private ITask createTask(IProgressMonitor monitor, TaskData updatedTaskData) throws CoreException {
- if (taskData.isNew()) {
- if (connector instanceof AbstractLegacyRepositoryConnector) {
- task = ((AbstractLegacyRepositoryConnector) connector).createTask(taskRepository.getRepositoryUrl(),
- updatedTaskData.getTaskId(), "");
- } else {
- task = new TaskTask(connector.getConnectorKind(), taskRepository.getRepositoryUrl(),
- updatedTaskData.getTaskId());
- }
- }
- return task;
- }
-
- @Override
- public IStatus getStatus() {
- return errorStatus;
- }
-
- @Override
- public ITask getTask() {
- return task;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizationSession.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizationSession.java
deleted file mode 100644
index 0cdda75a0..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizationSession.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core.sync;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.mylyn.internal.tasks.core.data.TaskDataManager;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.data.TaskData;
-import org.eclipse.mylyn.tasks.core.sync.ISynchronizationSession;
-
-/**
- * @author Steffen Pingel
- * @since 3.0
- */
-public class SynchronizationSession implements ISynchronizationSession {
-
- private Set<ITask> changedTasks;
-
- private Object data;
-
- private boolean fullSynchronization;
-
- private boolean performQueries;
-
- private Set<ITask> staleTasks;
-
- private TaskDataManager taskDataManager;
-
- private TaskRepository taskRepository;
-
- private Set<ITask> tasks;
-
- private boolean user;
-
- public SynchronizationSession() {
- }
-
- public SynchronizationSession(TaskDataManager taskDataManager) {
- this.taskDataManager = taskDataManager;
- }
-
- public Set<ITask> getChangedTasks() {
- return changedTasks;
- }
-
- public Object getData() {
- return data;
- }
-
- public Set<ITask> getStaleTasks() {
- return staleTasks;
- }
-
- public TaskDataManager getTaskDataManager() {
- return taskDataManager;
- }
-
- public TaskRepository getTaskRepository() {
- return taskRepository;
- }
-
- public Set<ITask> getTasks() {
- return tasks;
- }
-
- public boolean isFullSynchronization() {
- return fullSynchronization;
- }
-
- public boolean isUser() {
- return user;
- }
-
- public void markStale(ITask task) {
- if (staleTasks == null) {
- staleTasks = new HashSet<ITask>();
- }
- staleTasks.add(task);
- }
-
- public boolean needsPerformQueries() {
- return performQueries;
- }
-
- public void putTaskData(ITask task, TaskData taskData) throws CoreException {
- if (taskDataManager != null) {
- taskDataManager.putUpdatedTaskData(task, taskData, false);
- }
- }
-
- public void setChangedTasks(Set<ITask> changedTasks) {
- this.changedTasks = changedTasks;
- }
-
- public void setData(Object data) {
- this.data = data;
- }
-
- public void setFullSynchronization(boolean fullSynchronization) {
- this.fullSynchronization = fullSynchronization;
- }
-
- public void setNeedsPerformQueries(boolean performQueries) {
- this.performQueries = performQueries;
- }
-
- public void setTaskRepository(TaskRepository taskRepository) {
- this.taskRepository = taskRepository;
- }
-
- public void setTasks(Set<ITask> tasks) {
- this.tasks = tasks;
- }
-
- public void setUser(boolean user) {
- this.user = user;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeQueriesJob.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeQueriesJob.java
deleted file mode 100644
index ccaed66c5..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeQueriesJob.java
+++ /dev/null
@@ -1,346 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core.sync;
-
-import java.text.SimpleDateFormat;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Date;
-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.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.core.runtime.jobs.Job;
-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.ITasksCoreConstants;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
-import org.eclipse.mylyn.internal.tasks.core.TaskList;
-import org.eclipse.mylyn.internal.tasks.core.data.TaskDataManager;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractLegacyRepositoryConnector;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.LegacyTaskDataCollector;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.IRepositoryModel;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.ITask.SynchronizationState;
-import org.eclipse.mylyn.tasks.core.data.TaskData;
-import org.eclipse.mylyn.tasks.core.data.TaskDataCollector;
-import org.eclipse.mylyn.tasks.core.data.TaskRelation;
-import org.eclipse.mylyn.tasks.core.sync.ISynchronizationSession;
-import org.eclipse.mylyn.tasks.core.sync.SynchronizationJob;
-
-/**
- * @author Mik Kersten
- * @author Rob Elves
- * @author Steffen Pingel
- */
-public class SynchronizeQueriesJob extends SynchronizationJob {
-
- private static class MutexRule implements ISchedulingRule {
-
- private final Object object;
-
- public MutexRule(Object object) {
- this.object = object;
- }
-
- public boolean contains(ISchedulingRule rule) {
- return rule == this;
- }
-
- public boolean isConflicting(ISchedulingRule rule) {
- if (rule instanceof MutexRule) {
- return object.equals(((MutexRule) rule).object);
- }
- return false;
- }
- }
-
- @SuppressWarnings("deprecation")
- private class TaskCollector extends LegacyTaskDataCollector {
-
- private final Set<ITask> removedQueryResults;
-
- private final RepositoryQuery repositoryQuery;
-
- private int resultCount;
-
- private final SynchronizationSession session;
-
- public TaskCollector(RepositoryQuery repositoryQuery, SynchronizationSession session) {
- this.repositoryQuery = repositoryQuery;
- this.session = session;
- this.removedQueryResults = new HashSet<ITask>(repositoryQuery.getChildren());
- }
-
- @Override
- public void accept(TaskData taskData) {
- ITask task = taskList.getTask(taskData.getRepositoryUrl(), taskData.getTaskId());
- if (task == null) {
- task = tasksModel.createTask(repository, taskData.getTaskId());
- if (taskData.isPartial()) {
- session.markStale(task);
- }
- } else {
- removedQueryResults.remove(task);
- }
- try {
- session.putTaskData(task, taskData);
- } catch (CoreException e) {
- StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN, "Failed to save task", e));
- }
- taskList.addTask(task, repositoryQuery);
- resultCount++;
- }
-
- @Override
- @Deprecated
- public void accept(RepositoryTaskData taskData) {
- boolean changed;
- AbstractTask task = (AbstractTask) taskList.getTask(taskData.getRepositoryUrl(), taskData.getTaskId());
- if (task == null) {
- task = ((AbstractLegacyRepositoryConnector) connector).createTask(taskData.getRepositoryUrl(),
- taskData.getTaskId(), "");
- task.setStale(true);
- changed = ((AbstractLegacyRepositoryConnector) connector).updateTaskFromTaskData(repository, task,
- taskData);
- } else {
- changed = ((AbstractLegacyRepositoryConnector) connector).updateTaskFromTaskData(repository, task,
- taskData);
- removedQueryResults.remove(task);
- }
- taskList.addTask(task, repositoryQuery);
- if (!taskData.isPartial()) {
- (taskDataManager).saveIncoming(task, taskData, isUser());
- } else if (changed && !task.isStale()
- && task.getSynchronizationState() == SynchronizationState.SYNCHRONIZED) {
- // TODO move to synchronizationManager
- // set incoming marker for web tasks
- task.setSynchronizationState(SynchronizationState.INCOMING);
- }
- if (task.isStale()) {
- session.markStale(task);
- task.setSynchronizing(true);
- }
- resultCount++;
- }
-
- public Set<ITask> getRemovedChildren() {
- return removedQueryResults;
- }
-
- public int getResultCount() {
- return resultCount;
- }
-
- }
-
- public static final String MAX_HITS_REACHED = "Max allowed number of hits returned exceeded. Some hits may not be displayed. Please narrow query scope.";
-
- private final AbstractRepositoryConnector connector;
-
- private final Set<RepositoryQuery> queries;
-
- private final TaskRepository repository;
-
- private final TaskDataManager taskDataManager;
-
- private final TaskList taskList;
-
- private final IRepositoryModel tasksModel;
-
- public SynchronizeQueriesJob(TaskList taskList, TaskDataManager taskDataManager, IRepositoryModel tasksModel,
- AbstractRepositoryConnector connector, TaskRepository repository, Set<RepositoryQuery> queries) {
- super("Synchronizing Queries (" + repository.getRepositoryLabel() + ")");
- this.taskList = taskList;
- this.taskDataManager = taskDataManager;
- this.tasksModel = tasksModel;
- this.connector = connector;
- this.repository = repository;
- this.queries = queries;
- }
-
- @Override
- public IStatus run(IProgressMonitor monitor) {
- try {
- monitor.beginTask("Processing", 20 + queries.size() * 20 + 40 + 10);
-
- Set<ITask> allTasks;
- if (!isFullSynchronization()) {
- allTasks = new HashSet<ITask>();
- for (RepositoryQuery query : queries) {
- allTasks.addAll(query.getChildren());
- }
- } else {
- allTasks = taskList.getTasks(repository.getRepositoryUrl());
- }
-
- MutexRule rule = new MutexRule(repository);
- try {
- Job.getJobManager().beginRule(rule, monitor);
-
- final Map<String, TaskRelation[]> relationsByTaskId = new HashMap<String, TaskRelation[]>();
- SynchronizationSession session = new SynchronizationSession(taskDataManager) {
- @Override
- public void putTaskData(ITask task, TaskData taskData) throws CoreException {
- taskDataManager.putUpdatedTaskData(task, taskData, isUser(), this);
- if (!taskData.isPartial()) {
- Collection<TaskRelation> relations = connector.getTaskRelations(taskData);
- if (relations != null) {
- relationsByTaskId.put(task.getTaskId(), relations.toArray(new TaskRelation[0]));
- }
- }
- }
- };
- session.setTaskRepository(repository);
- session.setFullSynchronization(isFullSynchronization());
- session.setTasks(Collections.unmodifiableSet(allTasks));
- session.setNeedsPerformQueries(true);
- session.setUser(isUser());
-
- preSynchronization(session, new SubProgressMonitor(monitor, 20));
-
- if (session.needsPerformQueries()) {
- // synchronize queries, tasks changed within query are added to set of tasks to be synchronized
- synchronizeQueries(monitor, session);
- } else {
- monitor.worked(queries.size() * 20);
- }
-
- Set<ITask> tasksToBeSynchronized = new HashSet<ITask>();
- if (session.getStaleTasks() != null) {
- for (ITask task : session.getStaleTasks()) {
- tasksToBeSynchronized.add(task);
- ((AbstractTask) task).setSynchronizing(true);
- }
- }
-
- // synchronize tasks that were marked by the connector
- SynchronizeTasksJob job = new SynchronizeTasksJob(taskList, taskDataManager, tasksModel, connector,
- repository, tasksToBeSynchronized);
- job.setUser(isUser());
- job.setSession(session);
- if (!tasksToBeSynchronized.isEmpty()) {
- Policy.checkCanceled(monitor);
- job.run(new SubProgressMonitor(monitor, 30));
- }
- monitor.subTask("Receiving related tasks");
- job.synchronizedTaskRelations(monitor, relationsByTaskId);
- monitor.worked(10);
-
- session.setChangedTasks(tasksToBeSynchronized);
-
- // hook into the connector for synchronization time stamp management
- postSynchronization(session, new SubProgressMonitor(monitor, 10));
- } finally {
- Job.getJobManager().endRule(rule);
- }
- return Status.OK_STATUS;
- } catch (OperationCanceledException e) {
- return Status.CANCEL_STATUS;
- } finally {
- monitor.done();
- }
- }
-
- private void synchronizeQueries(IProgressMonitor monitor, SynchronizationSession session) {
- for (RepositoryQuery repositoryQuery : queries) {
- Policy.checkCanceled(monitor);
- repositoryQuery.setStatus(null);
-
- monitor.subTask("Synchronizing query " + repositoryQuery.getSummary());
- synchronizeQuery(repositoryQuery, session, new SubProgressMonitor(monitor, 20));
-
- repositoryQuery.setSynchronizing(false);
- taskList.notifySynchronizationStateChanged(Collections.singleton(repositoryQuery));
- }
- }
-
- private boolean postSynchronization(SynchronizationSession event, IProgressMonitor monitor) {
- try {
- Policy.checkCanceled(monitor);
- monitor.subTask("Updating repository state");
- if (!isUser()) {
- monitor = Policy.backgroundMonitorFor(monitor);
- }
- connector.postSynchronization(event, monitor);
- return true;
- } catch (CoreException e) {
- updateQueryStatus(e.getStatus());
- return false;
- }
- }
-
- private boolean preSynchronization(ISynchronizationSession event, IProgressMonitor monitor) {
- try {
- Policy.checkCanceled(monitor);
- monitor.subTask("Querying repository");
- if (!isUser()) {
- monitor = Policy.backgroundMonitorFor(monitor);
- }
- connector.preSynchronization(event, monitor);
- if (!event.needsPerformQueries() && !isUser()) {
- updateQueryStatus(null);
- return false;
- }
- return true;
- } catch (CoreException e) {
- // synchronization is unlikely to succeed, inform user and exit
- updateQueryStatus(e.getStatus());
- return false;
- }
- }
-
- private void synchronizeQuery(RepositoryQuery repositoryQuery, SynchronizationSession event,
- IProgressMonitor monitor) {
- TaskCollector collector = new TaskCollector(repositoryQuery, event);
-
- if (!isUser()) {
- monitor = Policy.backgroundMonitorFor(monitor);
- }
- IStatus result = connector.performQuery(repository, repositoryQuery, collector, event, monitor);
- if (result.getSeverity() == IStatus.CANCEL) {
- // do nothing
- } else if (result.isOK()) {
- if (collector.getResultCount() >= TaskDataCollector.MAX_HITS) {
- StatusHandler.log(new Status(IStatus.WARNING, ITasksCoreConstants.ID_PLUGIN, MAX_HITS_REACHED + "\n"
- + repositoryQuery.getSummary()));
- }
-
- Set<ITask> removedChildren = collector.getRemovedChildren();
- if (!removedChildren.isEmpty()) {
- taskList.removeFromContainer(repositoryQuery, removedChildren);
- }
-
- repositoryQuery.setLastSynchronizedStamp(new SimpleDateFormat("MMM d, H:mm:ss").format(new Date()));
- } else {
- repositoryQuery.setStatus(result);
- }
- }
-
- private void updateQueryStatus(final IStatus status) {
- for (RepositoryQuery repositoryQuery : queries) {
- repositoryQuery.setStatus(status);
- repositoryQuery.setSynchronizing(false);
- taskList.notifyElementChanged(repositoryQuery);
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeRepositoriesJob.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeRepositoriesJob.java
deleted file mode 100644
index d33c8b4a3..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeRepositoriesJob.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core.sync;
-
-import java.util.Date;
-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.core.runtime.jobs.Job;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.commons.net.Policy;
-import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
-import org.eclipse.mylyn.internal.tasks.core.TaskList;
-import org.eclipse.mylyn.internal.tasks.core.data.TaskDataManager;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.IRepositoryManager;
-import org.eclipse.mylyn.tasks.core.IRepositoryModel;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.sync.SynchronizationJob;
-
-/**
- * @author Steffen Pingel
- */
-public class SynchronizeRepositoriesJob extends SynchronizationJob {
-
- private final TaskList taskList;
-
- private final TaskDataManager taskDataManager;
-
- private final IRepositoryManager repositoryManager;
-
- private final Set<TaskRepository> repositories;
-
- private final Object family = new Object();
-
- private final IRepositoryModel tasksModel;
-
- public SynchronizeRepositoriesJob(TaskList taskList, TaskDataManager taskDataManager, IRepositoryModel tasksModel,
- IRepositoryManager repositoryManager, Set<TaskRepository> repositories) {
- super("Synchronizing Task List");
- this.taskList = taskList;
- this.taskDataManager = taskDataManager;
- this.tasksModel = tasksModel;
- this.repositoryManager = repositoryManager;
- this.repositories = repositories;
- }
-
- @Override
- public IStatus run(IProgressMonitor monitor) {
- try {
- monitor.beginTask("Processing", repositories.size() * 100);
-
- for (TaskRepository repository : repositories) {
- if (monitor.isCanceled()) {
- return Status.CANCEL_STATUS;
- }
-
- if (repository.isOffline()) {
- monitor.worked(100);
- continue;
- }
-
- monitor.setTaskName("Processing " + repository.getRepositoryLabel());
-
- final AbstractRepositoryConnector connector = repositoryManager.getRepositoryConnector(repository.getConnectorKind());
- Set<RepositoryQuery> queries = taskList.getRepositoryQueries(repository.getRepositoryUrl());
-
- if (isUser() || queries.isEmpty()) {
- monitor.worked(20);
- } else {
- // occasionally request update of repository configuration attributes
- updateRepositoryConfiguration(repository, connector, new SubProgressMonitor(monitor, 20));
- }
-
- SynchronizeQueriesJob job = new SynchronizeQueriesJob(taskList, taskDataManager, tasksModel, connector,
- repository, queries) {
- @Override
- public boolean belongsTo(Object family) {
- return SynchronizeRepositoriesJob.this.family == family;
- }
- };
- job.setUser(isUser());
- job.setFullSynchronization(true);
- job.setPriority(Job.DECORATE);
- if (isUser()) {
- job.schedule();
- } else {
- job.run(new SubProgressMonitor(monitor, 80));
- }
- }
-
- // it's better to remove the job from the progress view instead of having it blocked until all child jobs finish
-// if (isUser()) {
-// Job.getJobManager().join(family, monitor);
-// }
- } catch (InterruptedException e) {
- return Status.CANCEL_STATUS;
- } finally {
- monitor.done();
- }
- return Status.OK_STATUS;
- }
-
- public Object getFamily() {
- return family;
- }
-
- private void updateRepositoryConfiguration(TaskRepository repository, AbstractRepositoryConnector connector,
- IProgressMonitor monitor) throws InterruptedException {
- try {
- if (!isUser()) {
- monitor = Policy.backgroundMonitorFor(monitor);
- }
- monitor.beginTask("Updating repository configuration for " + repository.getRepositoryUrl(), 100);
- if (connector.isRepositoryConfigurationStale(repository, monitor)) {
- connector.updateRepositoryConfiguration(repository, monitor);
- repository.setConfigurationDate(new Date());
- // FIXME save repositories
- }
- } catch (CoreException e) {
- StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN,
- "Updating of repository configuration failed", e));
- } finally {
- monitor.done();
- }
- }
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeTasksJob.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeTasksJob.java
deleted file mode 100644
index 2aaf143c9..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeTasksJob.java
+++ /dev/null
@@ -1,402 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.core.sync;
-
-import java.util.Collection;
-import java.util.Collections;
-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.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-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.AbstractTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.ITaskList;
-import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
-import org.eclipse.mylyn.internal.tasks.core.data.TaskDataManager;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractLegacyRepositoryConnector;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractTaskDataHandler;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.LegacyTaskDataCollector;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.TaskFactory;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.IRepositoryManager;
-import org.eclipse.mylyn.tasks.core.IRepositoryModel;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITaskContainer;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.data.TaskData;
-import org.eclipse.mylyn.tasks.core.data.TaskRelation;
-import org.eclipse.mylyn.tasks.core.data.TaskRelation.Direction;
-import org.eclipse.mylyn.tasks.core.data.TaskRelation.Kind;
-import org.eclipse.mylyn.tasks.core.sync.SynchronizationJob;
-
-/**
- * @author Mik Kersten
- * @author Rob Elves
- * @author Steffen Pingel
- */
-public class SynchronizeTasksJob extends SynchronizationJob {
-
- private final AbstractRepositoryConnector connector;
-
- private final TaskDataManager taskDataManager;
-
- private final ITaskList taskList;
-
- private final Set<ITask> allTasks;
-
- private final IRepositoryManager repositoryManager;
-
- private TaskRepository taskRepository;
-
- private Map<String, TaskRelation[]> relationsByTaskId;
-
- private boolean updateRelations;
-
- private final IRepositoryModel tasksModel;
-
- private SynchronizationSession session;
-
- public SynchronizeTasksJob(ITaskList taskList, TaskDataManager synchronizationManager, IRepositoryModel tasksModel,
- AbstractRepositoryConnector connector, TaskRepository taskRepository, Set<ITask> tasks) {
- super("Synchronizing Tasks (" + tasks.size() + " tasks)");
- this.taskList = taskList;
- this.taskDataManager = synchronizationManager;
- this.tasksModel = tasksModel;
- this.connector = connector;
- this.taskRepository = taskRepository;
- this.allTasks = tasks;
- this.repositoryManager = null;
- }
-
- public SynchronizeTasksJob(ITaskList taskList, TaskDataManager synchronizationManager, IRepositoryModel tasksModel,
- AbstractRepositoryConnector connector, IRepositoryManager repositoryManager, Set<ITask> tasks) {
- super("Synchronizing Tasks (" + tasks.size() + " tasks)");
- this.taskList = taskList;
- this.taskDataManager = synchronizationManager;
- this.tasksModel = tasksModel;
- this.connector = connector;
- this.repositoryManager = repositoryManager;
- this.allTasks = tasks;
- }
-
- @Override
- public IStatus run(IProgressMonitor monitor) {
- try {
- if (taskRepository == null) {
- try {
- monitor.beginTask("Processing", allTasks.size() * 100);
- // group tasks by repository
- Map<TaskRepository, Set<ITask>> tasksByRepository = new HashMap<TaskRepository, Set<ITask>>();
- for (ITask task : allTasks) {
- TaskRepository repository = repositoryManager.getRepository(task.getConnectorKind(),
- task.getRepositoryUrl());
- Set<ITask> tasks = tasksByRepository.get(repository);
- if (tasks == null) {
- tasks = new HashSet<ITask>();
- tasksByRepository.put(repository, tasks);
- }
- tasks.add(task);
- }
- // synchronize tasks for each repositories
- for (TaskRepository taskRepository : tasksByRepository.keySet()) {
- setName("Synchronizing Tasks (" + taskRepository.getRepositoryLabel() + ")");
- this.taskRepository = taskRepository;
- Set<ITask> repositoryTasks = tasksByRepository.get(taskRepository);
- run(repositoryTasks, new SubProgressMonitor(monitor, repositoryTasks.size() * 100));
- }
- } finally {
- monitor.done();
- }
- } else {
- run(allTasks, monitor);
- }
- } catch (OperationCanceledException e) {
- for (ITask task : allTasks) {
- ((AbstractTask) task).setSynchronizing(false);
- taskList.notifyElementChanged(task);
- }
- return Status.CANCEL_STATUS;
- }
- return Status.OK_STATUS;
- }
-
- private void run(Set<ITask> tasks, IProgressMonitor monitor) {
- relationsByTaskId = new HashMap<String, TaskRelation[]>();
- updateRelations = true;
- runInternal(tasks, monitor);
- synchronizedTaskRelations(monitor, relationsByTaskId);
- }
-
- public void synchronizedTaskRelations(IProgressMonitor monitor, Map<String, TaskRelation[]> relationsByTaskId) {
- updateRelations = false;
- for (String taskId : relationsByTaskId.keySet()) {
- ITask parentTask = taskList.getTask(taskRepository.getRepositoryUrl(), taskId);
- if (parentTask instanceof ITaskContainer) {
- Set<ITask> removedChildTasks = new HashSet<ITask>(((ITaskContainer) parentTask).getChildren());
-
- TaskRelation[] relations = relationsByTaskId.get(taskId);
- for (TaskRelation relation : relations) {
- if (relation.getDirection() == Direction.OUTWARD && relation.getKind() == Kind.CONTAINMENT) {
- ITask task = taskList.getTask(taskRepository.getRepositoryUrl(), relation.getTaskId());
- if (task == null) {
- try {
- task = synchronizeTask(monitor, relation.getTaskId());
- } catch (CoreException e) {
- StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN,
- "Synchronization failed", e));
- }
- } else {
- removedChildTasks.remove(task);
- }
-
- if (task != null) {
- taskList.addTask(task, (AbstractTaskContainer) parentTask);
- }
- }
- }
-
- for (ITask task : removedChildTasks) {
- taskList.removeFromContainer((AbstractTaskContainer) parentTask, task);
- }
- }
- }
- }
-
- private void runInternal(Set<ITask> tasks, IProgressMonitor monitor) {
- try {
- monitor.beginTask("Processing", tasks.size() * 100);
- if (canGetMultiTaskData(taskRepository)) {
- try {
- for (ITask task : tasks) {
- resetStatus(task);
- }
- synchronizeTasks(new SubProgressMonitor(monitor, tasks.size() * 100), taskRepository, tasks);
- } catch (CoreException e) {
- for (ITask task : tasks) {
- updateStatus(taskRepository, task, e.getStatus());
- }
- }
- } else {
- for (ITask task : tasks) {
- Policy.checkCanceled(monitor);
- resetStatus(task);
- try {
- synchronizeTask(new SubProgressMonitor(monitor, 100), task);
- } catch (CoreException e) {
- updateStatus(taskRepository, task, e.getStatus());
- }
- }
- }
- } catch (OperationCanceledException e) {
- throw e;
- } catch (Exception e) {
- StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN, "Synchronization failed", e));
- } finally {
- monitor.done();
- }
- }
-
- @SuppressWarnings("deprecation")
- private boolean canGetMultiTaskData(TaskRepository taskRepository) {
- if (connector instanceof AbstractLegacyRepositoryConnector) {
- AbstractTaskDataHandler taskDataHandler = ((AbstractLegacyRepositoryConnector) connector).getLegacyTaskDataHandler();
- return taskDataHandler != null && taskDataHandler.canGetMultiTaskData();
- } else {
- org.eclipse.mylyn.tasks.core.data.AbstractTaskDataHandler taskDataHandler = connector.getTaskDataHandler();
- return taskDataHandler != null && taskDataHandler.canGetMultiTaskData(taskRepository);
- }
- }
-
- @SuppressWarnings("deprecation")
- private void synchronizeTask(IProgressMonitor monitor, ITask task) throws CoreException {
- monitor.subTask("Receiving task " + task.getSummary());
- resetStatus(task);
- if (!isUser()) {
- monitor = Policy.backgroundMonitorFor(monitor);
- }
- String taskId = task.getTaskId();
- if (connector instanceof AbstractLegacyRepositoryConnector) {
- RepositoryTaskData downloadedTaskData = ((AbstractLegacyRepositoryConnector) connector).getLegacyTaskData(
- taskRepository, taskId, monitor);
- if (downloadedTaskData != null) {
- try {
- updateFromTaskData(taskRepository, task, downloadedTaskData);
- } catch (CoreException e) {
- updateStatus(taskRepository, task, e.getStatus());
- }
- return;
- }
- } else {
- TaskData taskData = connector.getTaskData(taskRepository, taskId, monitor);
- if (taskData != null) {
- updateFromTaskData(taskRepository, task, taskData);
- return;
- }
- }
- throw new CoreException(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN,
- "Connector failed to return task data for task \"" + task + "\""));
- }
-
- private ITask synchronizeTask(IProgressMonitor monitor, String taskId) throws CoreException {
- monitor.subTask("Receiving task " + taskId);
- if (!isUser()) {
- monitor = Policy.backgroundMonitorFor(monitor);
- }
- if (connector instanceof AbstractLegacyRepositoryConnector) {
- RepositoryTaskData downloadedTaskData = ((AbstractLegacyRepositoryConnector) connector).getLegacyTaskData(
- taskRepository, taskId, monitor);
- if (downloadedTaskData != null) {
- return updateFromTaskData(taskRepository, null, downloadedTaskData);
- }
- } else {
- TaskData taskData = connector.getTaskData(taskRepository, taskId, monitor);
- if (taskData != null) {
- return createFromTaskData(taskRepository, taskId, taskData);
- }
- }
- throw new CoreException(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN,
- "Connector failed to return task data for task \"" + taskId + "\""));
- }
-
- private void resetStatus(ITask task) {
- ((AbstractTask) task).setErrorStatus(null);
- taskList.notifySynchronizationStateChanged(task);
- }
-
- @SuppressWarnings("deprecation")
- private void synchronizeTasks(IProgressMonitor monitor, final TaskRepository repository, Set<ITask> tasks)
- throws CoreException {
- monitor.subTask("Receiving " + tasks.size() + " tasks from " + repository.getRepositoryLabel());
-
- final Map<String, ITask> idToTask = new HashMap<String, ITask>();
- for (ITask task : tasks) {
- idToTask.put(task.getTaskId(), task);
- }
-
- LegacyTaskDataCollector collector = new LegacyTaskDataCollector() {
- @Override
- public void accept(RepositoryTaskData taskData) {
- ITask task = idToTask.remove(taskData.getTaskId());
- if (task != null) {
- try {
- updateFromTaskData(repository, task, taskData);
- } catch (CoreException e) {
- StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN,
- "Synchronization failed", e));
- }
- }
- }
-
- @Override
- public void accept(TaskData taskData) {
- ITask task = idToTask.remove(taskData.getTaskId());
- if (task != null) {
- updateFromTaskData(repository, task, taskData);
- }
- }
- };
-
- if (!isUser()) {
- monitor = Policy.backgroundMonitorFor(monitor);
- }
- Set<String> taskIds = Collections.unmodifiableSet(new HashSet<String>(idToTask.keySet()));
- if (connector instanceof AbstractLegacyRepositoryConnector) {
- ((AbstractLegacyRepositoryConnector) connector).getLegacyTaskDataHandler().getMultiTaskData(repository,
- taskIds, collector, monitor);
- } else {
- connector.getTaskDataHandler().getMultiTaskData(repository, taskIds, collector, monitor);
- }
-
- }
-
- @SuppressWarnings("deprecation")
- private ITask updateFromTaskData(TaskRepository repository, ITask task, RepositoryTaskData taskData)
- throws CoreException {
- // HACK: part of hack below
- //Date oldDueDate = repositoryTask.getDueDate();
-
-// boolean changed = ((AbstractLegacyRepositoryConnector) connector).updateTaskFromTaskData(repository, task,
-// taskData);
-// if (!taskData.isPartial()) {
-// ((TaskDataManager) taskDataManager).saveIncoming(task, taskData, isUser());
-// } else if (changed && !task.isStale() && task.getSynchronizationState() == SynchronizationState.SYNCHRONIZED) {
-// // TODO move to synchronizationManager
-// // set incoming marker for web tasks
-// ((AbstractTask) task).setSynchronizationState(SynchronizationState.INCOMING);
-// }
-
- TaskFactory factory = new TaskFactory(repository, true, isUser(),
- (AbstractLegacyRepositoryConnector) connector, taskDataManager, taskList);
- task = factory.createTask(taskData, new NullProgressMonitor());
-
- // HACK: Remove once connectors can get access to
- // TaskDataManager and do this themselves
-// if ((oldDueDate == null && repositoryTask.getDueDate() != null)
-// || (oldDueDate != null && repositoryTask.getDueDate() == null)) {
-// TasksUiPlugin.getTaskActivityManager().setDueDate(repositoryTask, repositoryTask.getDueDate());
-// } else if (oldDueDate != null && repositoryTask.getDueDate() != null
-// && oldDueDate.compareTo(repositoryTask.getDueDate()) != 0) {
-// TasksUiPlugin.getTaskActivityManager().setDueDate(repositoryTask, repositoryTask.getDueDate());
-// }
-
- ((AbstractTask) task).setSynchronizing(false);
- taskList.notifySynchronizationStateChanged(task);
-
- return task;
- }
-
- private void updateFromTaskData(TaskRepository taskRepository, ITask task, TaskData taskData) {
- try {
- taskDataManager.putUpdatedTaskData(task, taskData, isUser(), getSession());
- if (updateRelations) {
- Collection<TaskRelation> relations = connector.getTaskRelations(taskData);
- if (relations != null) {
- relationsByTaskId.put(task.getTaskId(), relations.toArray(new TaskRelation[0]));
- }
- }
- } catch (CoreException e) {
- updateStatus(taskRepository, task, e.getStatus());
- }
- }
-
- private ITask createFromTaskData(TaskRepository taskRepository, String taskId, TaskData taskData)
- throws CoreException {
- ITask task = tasksModel.createTask(taskRepository, taskData.getTaskId());
- taskDataManager.putUpdatedTaskData(task, taskData, isUser(), getSession());
- return task;
- }
-
- private void updateStatus(TaskRepository repository, ITask task, IStatus status) {
- ((AbstractTask) task).setErrorStatus(status);
- if (!isUser()) {
- ((AbstractTask) task).setSynchronizing(false);
- }
- taskList.notifyElementChanged(task);
- }
-
- public SynchronizationSession getSession() {
- return session;
- }
-
- public void setSession(SynchronizationSession session) {
- this.session = session;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractDuplicateDetector.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractDuplicateDetector.java
deleted file mode 100644
index 41f2f1e51..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractDuplicateDetector.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.mylyn.tasks.core.data.TaskData;
-
-/**
- * Extend to provide task duplicate detection facilities to the task editor (e.g. Java stack trace matching).
- *
- * @author Gail Murphy
- * @author Robert Elves
- * @author Steffen Pingel
- * @since 3.0
- */
-public abstract class AbstractDuplicateDetector {
-
- private String name;
-
- private String connectorKind;
-
- public abstract IRepositoryQuery getDuplicatesQuery(TaskRepository repository, TaskData taskData)
- throws CoreException;
-
- public void setName(String name) {
- this.name = name;
- }
-
- public void setConnectorKind(String kind) {
- this.connectorKind = kind;
- }
-
- public String getName() {
- return this.name;
- }
-
- public String getConnectorKind() {
- return this.connectorKind;
- }
-
- public boolean canQuery(TaskData taskData) {
- return true;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractRepositoryConnector.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractRepositoryConnector.java
deleted file mode 100644
index e6b49a7ba..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractRepositoryConnector.java
+++ /dev/null
@@ -1,249 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core;
-
-import java.util.Collection;
-import java.util.Date;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.mylyn.tasks.core.data.AbstractTaskAttachmentHandler;
-import org.eclipse.mylyn.tasks.core.data.AbstractTaskDataHandler;
-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;
-
-/**
- * Encapsulates common operations that can be performed on a task repository. Extend to connect with a Java API or WS
- * API for accessing the repository.
- *
- * Only methods that take a progress monitor can do network I/O.
- *
- * @author Mik Kersten
- * @author Rob Elves
- * @author Shawn Minto
- * @since 2.0
- */
-public abstract class AbstractRepositoryConnector {
-
- private static final long REPOSITORY_CONFIGURATION_UPDATE_INTERVAL = 24 * 60 * 60 * 1000;
-
- /**
- * @since 2.0
- */
- public abstract boolean canCreateNewTask(TaskRepository repository);
-
- /**
- * @since 2.0
- */
- public abstract boolean canCreateTaskFromKey(TaskRepository repository);
-
- /**
- * @since 3.0
- */
- public boolean canQuery(TaskRepository repository) {
- return true;
- }
-
- /**
- * @return the unique kind of the repository, e.g. "bugzilla"
- * @since 2.0
- */
- public abstract String getConnectorKind();
-
- /**
- * The connector's summary i.e. "JIRA (supports 3.3.1 and later)"
- *
- * @since 2.0
- */
- public abstract String getLabel();
-
- /**
- * Can return null if URLs are not used to identify tasks.
- */
- public abstract String getRepositoryUrlFromTaskUrl(String taskFullUrl);
-
- /**
- * Returns a short label for the connector, e.g. Bugzilla.
- *
- * @since 2.3
- */
- public String getShortLabel() {
- String label = getLabel();
- if (label == null) {
- return null;
- }
-
- int i = label.indexOf("(");
- if (i != -1) {
- return label.substring(0, i).trim();
- }
-
- i = label.indexOf(" ");
- if (i != -1) {
- return label.substring(0, i).trim();
- }
-
- return label;
- }
-
- /**
- * @since 3.0
- */
- public AbstractTaskAttachmentHandler getTaskAttachmentHandler() {
- return null;
- }
-
- /**
- * @since 3.0
- */
- public abstract TaskData getTaskData(TaskRepository taskRepository, String taskId, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * @since 3.0
- */
- public AbstractTaskDataHandler getTaskDataHandler() {
- return null;
- }
-
- /**
- * @since 2.0
- */
- public abstract String getTaskIdFromTaskUrl(String taskFullUrl);
-
- /**
- * Used for referring to the task in the UI.
- */
- public String getTaskIdPrefix() {
- return "task";
- }
-
- /**
- * @since 2.0
- */
- public String[] getTaskIdsFromComment(TaskRepository repository, String comment) {
- return null;
- }
-
- /**
- * @since 3.0
- */
- public ITaskMapping getTaskMapping(TaskData taskData) {
- return new TaskMapper(taskData);
- }
-
- /**
- * Connectors can override to return other tasks associated with this task.
- *
- * @since 3.0
- */
- public Collection<TaskRelation> getTaskRelations(TaskData taskData) {
- return null;
- }
-
- /**
- * @since 2.0
- */
- public abstract String getTaskUrl(String repositoryUrl, String taskId);
-
- /**
- * @since 3.0
- */
- public abstract boolean hasTaskChanged(TaskRepository taskRepository, ITask task, TaskData taskData);
-
- /**
- * @since 3.0
- */
- public boolean hasLocalCompletionState(TaskRepository taskRepository, ITask task) {
- return false;
- }
-
- /**
- * @since 3.0
- */
- public boolean hasRepositoryDueDate(TaskRepository taskRepository, ITask task, TaskData taskData) {
- return false;
- }
-
- /**
- * Default implementation returns true every 24hrs.
- *
- * @return true to indicate that the repository configuration is stale and requires update
- * @since 3.0
- */
- public boolean isRepositoryConfigurationStale(TaskRepository repository, IProgressMonitor monitor)
- throws CoreException {
- boolean isStale = true;
- Date configDate = repository.getConfigurationDate();
- if (configDate != null) {
- isStale = (new Date().getTime() - configDate.getTime()) > REPOSITORY_CONFIGURATION_UPDATE_INTERVAL;
- }
-
- return isStale;
- }
-
- /**
- * @since 2.0
- */
- public boolean isUserManaged() {
- return true;
- }
-
- /**
- * Implementors must execute query synchronously.
- *
- * @since 3.0
- */
- public abstract IStatus performQuery(TaskRepository repository, IRepositoryQuery query,
- TaskDataCollector resultCollector, ISynchronizationSession event, IProgressMonitor monitor);
-
- /**
- * Hook into the synchronization process.
- *
- * @since 3.0
- */
- public void postSynchronization(ISynchronizationSession event, IProgressMonitor monitor) throws CoreException {
- try {
- monitor.beginTask("", 1);
- } finally {
- monitor.done();
- }
- }
-
- /**
- * Hook into the synchronization process.
- *
- * @since 3.0
- */
- public void preSynchronization(ISynchronizationSession event, IProgressMonitor monitor) throws CoreException {
- try {
- monitor.beginTask("", 1);
- } finally {
- monitor.done();
- }
- }
-
- /**
- * Reset and update the repository attributes from the server (e.g. products, components)
- *
- * @since 3.0
- */
- public abstract void updateRepositoryConfiguration(TaskRepository repository, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * @since 3.0
- */
- public abstract void updateTaskFromTaskData(TaskRepository repository, ITask task, TaskData taskData);
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskListMigrator.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskListMigrator.java
deleted file mode 100644
index 3b40f404c..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskListMigrator.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core;
-
-import java.util.Set;
-
-import org.w3c.dom.Element;
-
-/**
- * @author Steffen Pingel
- * @since 3.0
- */
-public abstract class AbstractTaskListMigrator {
-
- public static final String KEY_QUERY = "Query";
-
- public static final String KEY_TASK = "Task";
-
- public static final String KEY_LAST_MOD_DATE = "LastModified";
-
- public abstract String getTaskElementName();
-
- public abstract Set<String> getQueryElementNames();
-
- public abstract void migrateQuery(IRepositoryQuery query, Element element);
-
- public abstract void migrateTask(ITask task, Element element);
-
- public abstract String getConnectorKind();
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/IAttributeContainer.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/IAttributeContainer.java
deleted file mode 100644
index 39cf0433d..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/IAttributeContainer.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core;
-
-import java.util.Map;
-
-/**
- * @author Steffen Pingel
- * @since 3.0
- * @noimplement This interface is not intended to be implemented by clients.
- */
-public interface IAttributeContainer {
-
- public abstract String getAttribute(String key);
-
- public abstract void setAttribute(String key, String value);
-
- public abstract Map<String, String> getAttributes();
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/IRepositoryElement.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/IRepositoryElement.java
deleted file mode 100644
index 45c64770a..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/IRepositoryElement.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core;
-
-import org.eclipse.core.runtime.IAdaptable;
-
-/**
- * @author Mik Kersten
- * @since 3.0
- * @noimplement This interface is not intended to be implemented by clients.
- */
-public interface IRepositoryElement extends Comparable<IRepositoryElement>, IAdaptable {
-
- /**
- * Returns a readable description of the element.
- */
- public abstract String getSummary();
-
- /**
- * Returns an identifier for unique to where it resides. For tasks this is an identifier unique to the repository in
- * which the tasks resides, such as the local machine or a web service. For elements in the Task List such as
- * queries or categories, this identifier may only be unique to that Task List.
- */
- public abstract String getHandleIdentifier();
-
- /**
- * Used for elements that reside in web services and can be used for URL-based access to resources on the local
- * machine. Optional, can be null.
- */
- public abstract String getUrl();
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/IRepositoryListener.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/IRepositoryListener.java
deleted file mode 100644
index 0ae937ce1..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/IRepositoryListener.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core;
-
-/**
- * Notified of change to the lifecycle of task repositories.
- *
- * @author Mik Kersten
- * @since 3.0
- */
-public interface IRepositoryListener {
-
- /**
- * A task repository has been added.
- *
- * @since 3.0
- */
- public abstract void repositoryAdded(TaskRepository repository);
-
- /**
- * A task repository has been removed.
- *
- * @since 3.0
- */
- public abstract void repositoryRemoved(TaskRepository repository);
-
- /**
- * The settings of a repository have been updated.
- *
- * @since 3.0
- */
- public abstract void repositorySettingsChanged(TaskRepository repository);
-
- /**
- * TODO: Refactor into general delta notification
- *
- * @since 3.0
- */
- public abstract void repositoryUrlChanged(TaskRepository repository, String oldUrl);
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/IRepositoryManager.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/IRepositoryManager.java
deleted file mode 100644
index 67c6e4934..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/IRepositoryManager.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core;
-
-import java.util.Collection;
-import java.util.List;
-import java.util.Set;
-
-/**
- * @author Steffen Pingel
- * @since 3.0
- */
-public interface IRepositoryManager {
-
- public abstract void addListener(IRepositoryListener listener);
-
- public abstract void addRepository(TaskRepository repository);
-
- public abstract List<TaskRepository> getAllRepositories();
-
- public abstract Set<TaskRepository> getRepositories(String connectorKind);
-
- public abstract TaskRepository getRepository(String connectorKind, String repositoryUrl);
-
- public abstract AbstractRepositoryConnector getRepositoryConnector(String connectorKind);
-
- public abstract Collection<AbstractRepositoryConnector> getRepositoryConnectors();
-
- public abstract void removeListener(IRepositoryListener listener);
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/IRepositoryModel.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/IRepositoryModel.java
deleted file mode 100644
index 1a69fb8be..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/IRepositoryModel.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core;
-
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-
-/**
- * @since 3.0
- * @author Steffen Pingel
- * @noimplement This interface is not intended to be implemented by clients.
- */
-public interface IRepositoryModel {
-
- public abstract IRepositoryQuery createQuery(TaskRepository taskRepository);
-
- public abstract ITask createTask(TaskRepository taskRepository, String taskId);
-
- public abstract ITaskAttachment createTaskAttachment(TaskAttribute taskAttribute);
-
- public abstract ITaskComment createTaskComment(TaskAttribute taskAttribute);
-
- public abstract ITask getTask(TaskRepository taskRepository, String taskId);
-
- public abstract ITask getTask(String handle);
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/IRepositoryPerson.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/IRepositoryPerson.java
deleted file mode 100644
index 58ea2391f..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/IRepositoryPerson.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core;
-
-/**
- * @author Steffen Pingel
- * @since 3.0
- */
-public interface IRepositoryPerson {
-
- public abstract String getConnectorKind();
-
- public abstract String getName();
-
- public abstract String getPersonId();
-
- public abstract String getRepositoryUrl();
-
- public abstract TaskRepository getTaskRepository();
-
- public abstract void setName(String name);
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/IRepositoryQuery.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/IRepositoryQuery.java
deleted file mode 100644
index e3bb5b66a..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/IRepositoryQuery.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core;
-
-/**
- * @since 3.0
- */
-public interface IRepositoryQuery extends IAttributeContainer {
-
- /**
- * @since 3.0
- */
- public abstract String getConnectorKind();
-
- public abstract String getRepositoryUrl();
-
- public abstract String getUrl();
-
- public abstract void setUrl(String url);
-
- public abstract String getSummary();
-
- public abstract void setSummary(String summary);
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITask.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITask.java
deleted file mode 100644
index 0077c0dd5..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITask.java
+++ /dev/null
@@ -1,331 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core;
-
-import java.util.Date;
-
-/**
- * @author Mik Kersten
- * @author Steffen Pingel
- * @since 3.0
- */
-public interface ITask extends IRepositoryElement, IAttributeContainer {
-
- /**
- * @since 3.0
- */
- public enum SynchronizationState {
- CONFLICT, INCOMING, INCOMING_NEW, OUTGOING, OUTGOING_NEW, SYNCHRONIZED;
-
- /**
- * @since 3.0
- */
- public boolean isIncoming() {
- switch (this) {
- case INCOMING:
- case INCOMING_NEW:
- case CONFLICT:
- return true;
- default:
- return false;
- }
- }
-
- /**
- * @since 3.0
- */
- public boolean isOutgoing() {
- switch (this) {
- case OUTGOING:
- case OUTGOING_NEW:
- case CONFLICT:
- return true;
- default:
- return false;
- }
- }
-
- /**
- * @since 3.0
- */
- public boolean isSynchronized() {
- switch (this) {
- case SYNCHRONIZED:
- return true;
- default:
- return false;
- }
- }
- }
-
- /**
- * @since 3.0
- */
- public enum PriorityLevel {
- P1, P2, P3, P4, P5;
-
- @Override
- public String toString() {
- switch (this) {
- case P1:
- return "P1";
- case P2:
- return "P2";
- case P3:
- return "P3";
- case P4:
- return "P4";
- case P5:
- return "P5";
- default:
- return "P3";
- }
- }
-
- /**
- * @since 3.0
- */
- public String getDescription() {
- switch (this) {
- case P1:
- return "Very High";
- case P2:
- return "High";
- case P3:
- return "Normal";
- case P4:
- return "Low";
- case P5:
- return "Very Low";
- default:
- return "";
- }
- }
-
- /**
- * @since 3.0
- */
- public static PriorityLevel fromLevel(int level) {
- if (level <= 1) {
- return P1;
- }
- if (level == 2) {
- return P2;
- }
- if (level == 3) {
- return P3;
- }
- if (level == 4) {
- return P4;
- }
- if (level >= 5) {
- return P5;
- }
- return getDefault();
- }
-
- /**
- * @since 3.0
- */
- public static PriorityLevel fromString(String string) {
- if (string.equals("P1")) {
- return P1;
- }
- if (string.equals("P2")) {
- return P2;
- }
- if (string.equals("P3")) {
- return P3;
- }
- if (string.equals("P4")) {
- return P4;
- }
- if (string.equals("P5")) {
- return P5;
- }
- return getDefault();
- }
-
- /**
- * @since 3.0
- */
- public static PriorityLevel fromDescription(String string) {
- if (string == null) {
- return null;
- }
- if (string.equals("Very High")) {
- return P1;
- }
- if (string.equals("High")) {
- return P2;
- }
- if (string.equals("Normal")) {
- return P3;
- }
- if (string.equals("Low")) {
- return P4;
- }
- if (string.equals("Very Low")) {
- return P5;
- }
- return getDefault();
- }
-
- /**
- * @since 3.0
- */
- public static PriorityLevel getDefault() {
- return P3;
- }
- }
-
- /**
- * Returns the date that the task was completed.
- *
- * @since 3.0
- */
- public abstract Date getCompletionDate();
-
- /**
- * Returns the identifier that uniquely distinguishes the repository connector associated with this task.
- *
- * @since 3.0
- */
- public abstract String getConnectorKind();
-
- /**
- * Returns the date that this task was created.
- *
- * @since 3.0
- */
- public abstract Date getCreationDate();
-
- /**
- * Returns the date after which this task will become overdue.
- *
- * @since 3.0
- */
- public abstract Date getDueDate();
-
- /**
- * @since 3.0
- */
- public abstract String getHandleIdentifier();
-
- /**
- * Returns the date that the repository contents of this task were last modified.
- *
- * @since 3.0
- */
- public abstract Date getModificationDate();
-
- /**
- * @since 3.0
- */
- public abstract String getOwner();
-
- /**
- * @since 3.0
- */
- public abstract String getPriority();
-
- /**
- * @since 3.0
- */
- public abstract String getRepositoryUrl();
-
- /**
- * @since 3.0
- */
- public abstract String getSummary();
-
- /**
- * @since 3.0
- */
- public abstract SynchronizationState getSynchronizationState();
-
- /**
- * @since 3.0
- */
- public abstract String getTaskId();
-
- /**
- * User identifiable key for the task to be used in UI facilities such as label displays and hyperlinked references.
- * Can return the same as the ID (e.g. in the case of Bugzilla). Can return null if no such label exists.
- *
- * @since 3.0
- */
- public abstract String getTaskKey();
-
- /**
- * @since 3.0
- */
- public abstract String getTaskKind();
-
- /**
- * @since 3.0
- */
- public abstract boolean isActive();
-
- /**
- * @since 3.0
- */
- public abstract boolean isCompleted();
-
- /**
- * @since 3.0
- */
- public abstract void setCompletionDate(Date completionDate);
-
- /**
- * @since 3.0
- */
- public abstract void setCreationDate(Date date);
-
- /**
- * @since 3.0
- */
- public abstract void setDueDate(Date date);
-
- /**
- * @since 3.0
- */
- public abstract void setModificationDate(Date modificationDate);
-
- /**
- * @since 3.0
- */
- public abstract void setOwner(String owner);
-
- /**
- * @since 3.0
- */
- public abstract void setPriority(String priority);
-
- /**
- * @since 3.0
- */
- public abstract void setSummary(String summary);
-
- /**
- * @since 3.0
- */
- public abstract void setTaskKind(String kind);
-
- /**
- * @since 3.0
- */
- public abstract void setUrl(String taskUrl);
-
- /**
- * @since 3.0
- */
- public abstract void setTaskKey(String taskKey);
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskActivationListener.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskActivationListener.java
deleted file mode 100644
index e23a1bc22..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskActivationListener.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core;
-
-/**
- * @author Rob Elves
- * @since 3.0
- */
-public interface ITaskActivationListener {
-
- /**
- * @since 3.0
- */
- public abstract void preTaskActivated(ITask task);
-
- /**
- * @since 3.0
- */
- public abstract void preTaskDeactivated(ITask task);
-
- /**
- * @since 3.0
- */
- public abstract void taskActivated(ITask task);
-
- /**
- * @since 3.0
- */
- public abstract void taskDeactivated(ITask task);
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskActivityListener.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskActivityListener.java
deleted file mode 100644
index 27237582b..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskActivityListener.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core;
-
-/**
- * Notified of task activity changes.
- *
- * @author Mik Kersten
- * @author Rob Elves
- * @author Shawn Minto
- * @since 2.0
- */
-public interface ITaskActivityListener {
-
- /**
- * @since 3.0
- */
- public abstract void activityReset();
-
- /**
- * Warning: This is called frequently (i.e. every 15s) Implementers are responsible for launching jobs for long
- * running activity.
- *
- * @since 3.0
- */
- public abstract void elapsedTimeUpdated(ITask task, long newElapsedTime);
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskActivityManager.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskActivityManager.java
deleted file mode 100644
index 0d53e678b..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskActivityManager.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core;
-
-import java.util.Calendar;
-import java.util.Set;
-
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-
-/**
- * @author Rob Elves
- * @since 3.0
- */
-public interface ITaskActivityManager {
-
- /**
- * activate the given <code>task</code>
- */
- public abstract void activateTask(ITask task);
-
- /**
- * deactivate the currently active task (if any). There are no negative side effects if this method is called when
- * no task is active
- */
- public abstract void deactivateActiveTask();
-
- /**
- * deactivate the given task
- */
- public abstract void deactivateTask(ITask task);
-
- /**
- * returns all tasks that where active between <code>start</code> and <code>end</end> (exclusive)
- * both ranges are floored to the hour
- */
- public abstract Set<AbstractTask> getActiveTasks(Calendar start, Calendar end);
-
- /**
- * @return the currently active task if any
- */
- public abstract ITask getActiveTask();
-
- /**
- * returns all tasks with a due date set
- */
- public abstract Set<ITask> getAllDueTasks();
-
- /**
- * returns all tasks due between the given dates
- */
- public abstract Set<ITask> getDueTasks(Calendar start, Calendar end);
-
- /** total elapsed time based on activation history */
- public abstract long getElapsedTime(ITask task);
-
- /** total elapsed time based on activation history between <code>start</code> and <code>end</code> */
- public abstract long getElapsedTime(ITask task, Calendar start, Calendar end);
-
- public abstract void addActivityListener(ITaskActivityListener listener);
-
- public abstract void removeActivityListener(ITaskActivityListener listener);
-
- public abstract void addActivationListener(ITaskActivationListener listener);
-
- public abstract void removeActivationListener(ITaskActivationListener listener);
-
- /**
- * @param task
- * cannot be null
- * @return whether the task is the single currently active task
- */
- public abstract boolean isActive(ITask task);
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskAttachment.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskAttachment.java
deleted file mode 100644
index cabf4d0a4..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskAttachment.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core;
-
-import java.util.Date;
-
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-
-/**
- * @author Steffen Pingel
- * @since 3.0
- */
-public interface ITaskAttachment {
-
- /**
- * @since 3.0
- */
- public abstract IRepositoryPerson getAuthor();
-
- /**
- * @since 3.0
- */
- public abstract String getComment();
-
- /**
- * @since 3.0
- */
- public abstract String getConnectorKind();
-
- /**
- * @since 3.0
- */
- public abstract String getContentType();
-
- /**
- * @since 3.0
- */
- public abstract Date getCreationDate();
-
- /**
- * @since 3.0
- */
- public abstract String getDescription();
-
- /**
- * @since 3.0
- */
- public abstract String getFileName();
-
- /**
- * @since 3.0
- */
- public abstract long getLength();
-
- /**
- * @since 3.0
- */
- public abstract String getRepositoryUrl();
-
- /**
- * @since 3.0
- */
- public abstract ITask getTask();
-
- /**
- * @since 3.0
- */
- public abstract TaskAttribute getTaskAttribute();
-
- /**
- * @since 3.0
- */
- public abstract TaskRepository getTaskRepository();
-
- /**
- * @since 3.0
- */
- public abstract String getUrl();
-
- /**
- * @since 3.0
- */
- public abstract boolean isDeprecated();
-
- public abstract boolean isPatch();
-
- /**
- * @since 3.0
- */
- public abstract void setAuthor(IRepositoryPerson author);
-
- /**
- * @since 3.0
- */
- public abstract void setContentType(String contentType);
-
- /**
- * @since 3.0
- */
- public abstract void setCreationDate(Date creationDate);
-
- /**
- * @since 3.0
- */
- public abstract void setDeprecated(boolean deprecated);
-
- /**
- * @since 3.0
- */
- public abstract void setDescription(String description);
-
- /**
- * @since 3.0
- */
- public abstract void setFileName(String fileName);
-
- /**
- * @since 3.0
- */
- public abstract void setLength(long length);
-
- /**
- * @since 3.0
- */
- public abstract void setPatch(boolean patch);
-
- /**
- * @since 3.0
- */
- public abstract void setUrl(String url);
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskComment.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskComment.java
deleted file mode 100644
index 554c144cc..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskComment.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core;
-
-import java.util.Date;
-
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-
-/**
- * @author Steffen Pingel
- * @since 3.0
- */
-public interface ITaskComment {
-
- public abstract IRepositoryPerson getAuthor();
-
- public abstract String getConnectorKind();
-
- public abstract Date getCreationDate();
-
- public abstract int getNumber();
-
- public abstract String getRepositoryUrl();
-
- public abstract ITask getTask();
-
- public abstract TaskAttribute getTaskAttribute();
-
- public abstract TaskRepository getTaskRepository();
-
- public abstract String getText();
-
- public abstract String getUrl();
-
- public abstract void setAuthor(IRepositoryPerson author);
-
- public abstract void setCreationDate(Date creationDate);
-
- public abstract void setNumber(int number);
-
- public abstract void setText(String text);
-
- public abstract void setUrl(String url);
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskContainer.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskContainer.java
deleted file mode 100644
index 68a18925b..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskContainer.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core;
-
-import java.util.Collection;
-
-/**
- * @author Mik Kersten
- * @author Steffen Pingel
- * @since 3.0
- * @noimplement This interface is not intended to be implemented by clients.
- */
-public interface ITaskContainer {
-
- /**
- * Returns the children of this task, as defined by a containment hierarchy such as the Task List's categories,
- * queries and substasks. Never returns null.
- *
- * @since 3.0
- */
- public abstract Collection<ITask> getChildren();
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskMapping.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskMapping.java
deleted file mode 100644
index e0e27e81a..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskMapping.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core;
-
-import java.util.Date;
-import java.util.List;
-
-import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
-import org.eclipse.mylyn.tasks.core.data.TaskData;
-
-/**
- * @author Steffen Pingel
- * @since 3.0
- * @noimplement This interface is not intended to be implemented by clients. Extend {@link TaskMapping} instead.
- */
-public interface ITaskMapping {
-
- public void copyFrom(ITaskMapping source);
-
- public abstract List<String> getCc();
-
- public abstract Date getCompletionDate();
-
- public abstract String getComponent();
-
- public abstract Date getCreationDate();
-
- public abstract String getDescription();
-
- public abstract Date getDueDate();
-
- public abstract List<String> getKeywords();
-
- public abstract Date getModificationDate();
-
- public abstract String getOwner();
-
- public abstract PriorityLevel getPriority();
-
- public abstract String getProduct();
-
- public abstract String getReporter();
-
- public abstract String getResolution();
-
- public abstract String getSummary();
-
- public abstract TaskData getTaskData();
-
- public abstract String getTaskKey();
-
- public abstract String getTaskKind();
-
- public abstract String getTaskStatus();
-
- public abstract String getTaskUrl();
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/RepositoryResponse.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/RepositoryResponse.java
deleted file mode 100644
index 46ac789d0..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/RepositoryResponse.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core;
-
-/**
- * @author Steffen Pingel
- * @since 3.0
- */
-public class RepositoryResponse {
-
- public enum ResponseKind {
- TASK_CREATED, TASK_UPDATED;
- };
-
- private final String taskId;
-
- private final ResponseKind reposonseKind;
-
- public RepositoryResponse(ResponseKind reposonseKind, String taskId) {
- this.reposonseKind = reposonseKind;
- this.taskId = taskId;
- }
-
- public RepositoryResponse() {
- this(null, null);
- }
-
- public String getTaskId() {
- return taskId;
- }
-
- public ResponseKind getReposonseKind() {
- return reposonseKind;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/RepositoryStatus.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/RepositoryStatus.java
deleted file mode 100644
index c83dcde9e..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/RepositoryStatus.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Utility for working and capturing status specific to repository connections.
- *
- * @author Rob Elves
- * @author Steffen Pingel
- * @since 2.0
- */
-public class RepositoryStatus extends Status {
-
- public final static int ERROR_IO = 5;
-
- public final static int ERROR_NETWORK = 11;
-
- public final static int ERROR_PERMISSION_DENIED = 12;
-
- /**
- * requires construction with repositoryUrl and error message
- */
- public final static int ERROR_REPOSITORY = 1;
-
- public final static int ERROR_REPOSITORY_LOGIN = 3;
-
- public final static int ERROR_REPOSITORY_NOT_FOUND = 4;
-
- public final static int OPERATION_CANCELLED = 8;
-
- public final static int REPOSITORY_COLLISION = 6;
-
- public final static int REPOSITORY_COMMENT_REQUIRED = 9;
-
- public final static int REPOSITORY_LOGGED_OUT = 10;
-
- public final static int ERROR_INTERNAL = 7;
-
- private String htmlMessage;
-
- protected String repositoryUrl;
-
- public RepositoryStatus(TaskRepository repository, int severity, String pluginId, int code, String message) {
- this(repository.getRepositoryUrl(), severity, pluginId, code, message, null);
- }
-
- public RepositoryStatus(TaskRepository repository, int severity, String pluginId, int code, String message,
- Throwable e) {
- this(repository.getRepositoryUrl(), severity, pluginId, code, message, e);
- }
-
- public RepositoryStatus(String repositoryUrl, int severity, String pluginId, int code, String message) {
- this(repositoryUrl, severity, pluginId, code, message, null);
- }
-
- public RepositoryStatus(String repositoryUrl, int severity, String pluginId, int code, String message, Throwable e) {
- super(severity, pluginId, code, message, e);
-
- if (repositoryUrl == null) {
- throw new IllegalArgumentException("repositoryUrl must not be null");
- }
-
- this.repositoryUrl = repositoryUrl;
- }
-
- /**
- * Constructs a status object with a message.
- */
- public RepositoryStatus(int severity, String pluginId, int code, String message) {
- super(severity, pluginId, code, message, null);
- }
-
- /**
- * Constructs a status object with a message and an exception. that caused the error.
- */
- public RepositoryStatus(int severity, String pluginId, int code, String message, Throwable e) {
- super(severity, pluginId, code, message, e);
- }
-
- /**
- * Returns the message that is relevant to the code of this status.
- */
- @Override
- public String getMessage() {
- String message = super.getMessage();
- if (message != null && !"".equals(message)) {
- return message;
- }
-
- Throwable exception = getException();
- if (exception != null) {
- if (exception.getMessage() != null) {
- return exception.getMessage();
- }
- return exception.toString();
- }
-
- return "";
- }
-
- @Override
- protected void setMessage(String message) {
- super.setMessage((message != null) ? message : "");
- }
-
- protected void setHtmlMessage(String htmlMessage) {
- this.htmlMessage = htmlMessage;
- }
-
- public String getHtmlMessage() {
- return htmlMessage;
- }
-
- public boolean isHtmlMessage() {
- return htmlMessage != null;
- }
-
- public String getRepositoryUrl() {
- return repositoryUrl;
- }
-
- public static RepositoryStatus createInternalError(String pluginId, String message, Throwable t) {
- return new RepositoryStatus(IStatus.ERROR, pluginId, RepositoryStatus.ERROR_INTERNAL, message, t);
- }
-
- public static RepositoryStatus createHtmlStatus(int severity, String pluginId, int code, String message,
- String htmlMessage) {
- if (htmlMessage == null) {
- throw new IllegalArgumentException("htmlMessage must not be null");
- }
-
- RepositoryStatus status = new RepositoryStatus(severity, pluginId, code, message);
- status.setHtmlMessage(htmlMessage);
- return status;
- }
-
- public static RepositoryStatus createStatus(TaskRepository repository, int severity, String pluginId, String message) {
- return createStatus(repository.getRepositoryUrl(), severity, pluginId, message);
- }
-
- public static RepositoryStatus createStatus(String repositoryUrl, int severity, String pluginId, String message) {
- return new RepositoryStatus(repositoryUrl, severity, pluginId, RepositoryStatus.ERROR_REPOSITORY, message);
- }
-
- public static RepositoryStatus createLoginError(String repositoryUrl, String pluginId) {
- return new RepositoryStatus(repositoryUrl, IStatus.ERROR, pluginId, RepositoryStatus.ERROR_REPOSITORY_LOGIN,
- NLS.bind("Unable to login to {0}. Please validate credentials via Task Repositories view.",
- repositoryUrl));
- }
-
- public static RepositoryStatus createNotFoundError(String repositoryUrl, String pluginId) {
- return new RepositoryStatus(repositoryUrl, IStatus.ERROR, pluginId,
- RepositoryStatus.ERROR_REPOSITORY_NOT_FOUND, NLS.bind("Repository {0} could not be found.",
- repositoryUrl));
- }
-
- public static RepositoryStatus createCollisionError(String repositoryUrl, String pluginId) {
- return new RepositoryStatus(
- repositoryUrl,
- IStatus.ERROR,
- pluginId,
- RepositoryStatus.REPOSITORY_COLLISION,
- NLS.bind(
- "Mid-air collision occurred while submitting to {0}.\n\nSynchronize task and re-submit changes.",
- repositoryUrl));
- }
-
- public static RepositoryStatus createCommentRequiredError(String repositoryUrl, String pluginId) {
- return new RepositoryStatus(repositoryUrl, IStatus.ERROR, pluginId,
- RepositoryStatus.REPOSITORY_COMMENT_REQUIRED,
- "You have to specify a new comment when making this change. Please comment on the reason for this change.");
- }
-
- public static RepositoryStatus createHtmlStatus(String repositoryUrl, int severity, String pluginId, int code,
- String message, String htmlMessage) {
- if (htmlMessage == null) {
- throw new IllegalArgumentException("htmlMessage must not be null");
- }
-
- RepositoryStatus status = new RepositoryStatus(repositoryUrl, severity, pluginId, code, message);
- status.setHtmlMessage(htmlMessage);
- return status;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/RepositoryTemplate.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/RepositoryTemplate.java
deleted file mode 100644
index 5a759ce3c..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/RepositoryTemplate.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core;
-
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-/**
- * Specifies attributes for a task repository.
- *
- * @author Eugene Kuleshov
- * @author Steffen Pingel
- * @since 2.0
- */
-public final class RepositoryTemplate {
-
- public final Map<String, String> genericAttributes = new LinkedHashMap<String, String>();
-
- public final String label;
-
- public final String repositoryUrl;
-
- public final String newTaskUrl;
-
- public final String taskPrefixUrl;
-
- public final String taskQueryUrl;
-
- public final String newAccountUrl;
-
- public final boolean anonymous;
-
- public final String version;
-
- public final boolean addAutomatically;
-
- public final String characterEncoding;
-
- public RepositoryTemplate(String label, String repositoryUrl, String characterEncoding, String version,
- String newTaskUrl, String taskPrefix, String taskQuery, String newAccountUrl, boolean anonymous,
- boolean addAutomatically) {
- this.label = label;
- this.repositoryUrl = repositoryUrl;
- this.newTaskUrl = newTaskUrl;
- this.taskPrefixUrl = taskPrefix;
- this.taskQueryUrl = taskQuery;
- this.newAccountUrl = newAccountUrl;
- this.version = version;
- this.anonymous = anonymous;
- this.characterEncoding = characterEncoding;
- this.addAutomatically = addAutomatically;
- }
-
- public void addAttribute(String name, String value) {
- genericAttributes.put(name, value);
- }
-
- public String getAttribute(String name) {
- return genericAttributes.get(name);
- }
-
- public Map<String, String> getAttributes() {
- return this.genericAttributes;
- }
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskActivationAdapter.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskActivationAdapter.java
deleted file mode 100644
index 5bbb96397..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskActivationAdapter.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core;
-
-/**
- * @author Rob Elves
- * @since 3.0
- */
-public class TaskActivationAdapter implements ITaskActivationListener {
-
- public void preTaskActivated(ITask task) {
- }
-
- public void preTaskDeactivated(ITask task) {
- }
-
- public void taskActivated(ITask task) {
- }
-
- public void taskDeactivated(ITask task) {
- }
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskActivityAdapter.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskActivityAdapter.java
deleted file mode 100644
index 303f23e6d..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskActivityAdapter.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core;
-
-/**
- * @author Steffen Pingel
- * @since 3.0
- */
-public class TaskActivityAdapter implements ITaskActivityListener {
-
- public void activityReset() {
- }
-
- public void elapsedTimeUpdated(ITask task, long newElapsedTime) {
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskMapping.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskMapping.java
deleted file mode 100644
index a95a89361..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskMapping.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core;
-
-import java.util.Date;
-import java.util.List;
-
-import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
-import org.eclipse.mylyn.tasks.core.data.TaskData;
-
-/**
- * @author Steffen Pingel
- * @since 3.0
- */
-public class TaskMapping implements ITaskMapping {
-
- public void copyFrom(ITaskMapping source) {
- // ignore
- }
-
- public Date getCompletionDate() {
- // ignore
- return null;
- }
-
- public String getComponent() {
- // ignore
- return null;
- }
-
- public Date getCreationDate() {
- // ignore
- return null;
- }
-
- public String getDescription() {
- // ignore
- return null;
- }
-
- public Date getDueDate() {
- // ignore
- return null;
- }
-
- public Date getModificationDate() {
- // ignore
- return null;
- }
-
- public String getOwner() {
- // ignore
- return null;
- }
-
- public PriorityLevel getPriority() {
- // ignore
- return null;
- }
-
- public String getProduct() {
- // ignore
- return null;
- }
-
- public String getSummary() {
- // ignore
- return null;
- }
-
- public TaskData getTaskData() {
- // ignore
- return null;
- }
-
- public String getTaskKey() {
- // ignore
- return null;
- }
-
- public String getTaskKind() {
- // ignore
- return null;
- }
-
- public String getTaskUrl() {
- // ignore
- return null;
- }
-
- public List<String> getCc() {
- // ignore
- return null;
- }
-
- public List<String> getKeywords() {
- // ignore
- return null;
- }
-
- public String getReporter() {
- // ignore
- return null;
- }
-
- public String getResolution() {
- // ignore
- return null;
- }
-
- public String getTaskStatus() {
- // ignore
- return null;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepository.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepository.java
deleted file mode 100644
index e52971ccf..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepository.java
+++ /dev/null
@@ -1,836 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core;
-
-import java.beans.PropertyChangeEvent;
-import java.beans.PropertyChangeListener;
-import java.net.MalformedURLException;
-import java.net.Proxy;
-import java.net.URL;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.LinkedHashMap;
-import java.util.Map;
-import java.util.Set;
-import java.util.TimeZone;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.commons.net.AuthenticationCredentials;
-import org.eclipse.mylyn.commons.net.AuthenticationType;
-import org.eclipse.mylyn.commons.net.WebClientUtil;
-import org.eclipse.mylyn.internal.tasks.core.IRepositoryConstants;
-import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryPerson;
-import org.eclipse.mylyn.internal.tasks.core.TaskRepositoryLocation;
-
-/**
- * Note that task repositories use Strings for storing time stamps because using Date objects led to the following
- * problems:
- * <ul>
- * <li>Often we are unable to get the time zone of the repository so interpreting the date string correctly doesn't
- * work.</li>
- * <li>Even if we do know the time zone information the local clock may be wrong. This can cause lost incoming when
- * asking the repository for all changes since date X.</li>
- * <li>The solution we have come up with thus far is not to interpret the date as a DATE object but rather simply use
- * the date string given to us by the repository itself.</li>
- * </ul>
- *
- * @author Mik Kersten
- * @author Rob Elves
- * @author Eugene Kuleshov
- * @author Steffen Pingel
- * @since 2.0
- */
-@SuppressWarnings("deprecation")
-public final class TaskRepository extends PlatformObject {
-
- public static final String DEFAULT_CHARACTER_ENCODING = "UTF-8";
-
- private static final String USERNAME = ".username";
-
- private static final String PASSWORD = ".password";
-
- private static final String SAVE_PASSWORD = ".savePassword";
-
- private static final String ENABLED = ".enabled";
-
- private static final String AUTH_REPOSITORY = "org.eclipse.mylyn.tasklist.repositories";
-
- // transient
- private IStatus errorStatus = null;
-
- /**
- * @deprecated use {@link #setCredentials(AuthenticationType, AuthenticationCredentials, boolean)} to access
- * credentials
- */
- @Deprecated
- public static final String AUTH_PASSWORD = AUTH_REPOSITORY + PASSWORD;
-
- /**
- * @deprecated use {@link #setCredentials(AuthenticationType, AuthenticationCredentials, boolean)} to access
- * credentials
- */
- @Deprecated
- public static final String AUTH_USERNAME = AUTH_REPOSITORY + USERNAME;
-
- public static final String ANONYMOUS_LOGIN = "org.eclipse.mylyn.tasklist.repositories.anonymous";
-
- private static final String AUTH_HTTP = "org.eclipse.mylyn.tasklist.repositories.httpauth";
-
- /**
- * @deprecated use {@link #setCredentials(AuthenticationType, AuthenticationCredentials, boolean)} to access
- * credentials
- */
- @Deprecated
- public static final String AUTH_HTTP_PASSWORD = AUTH_HTTP + PASSWORD;
-
- /**
- * @deprecated use {@link #setCredentials(AuthenticationType, AuthenticationCredentials, boolean)} to access
- * credentials
- */
- @Deprecated
- public static final String AUTH_HTTP_USERNAME = AUTH_HTTP + USERNAME;
-
- public static final String NO_VERSION_SPECIFIED = "unknown";
-
- private static final String AUTH_SCHEME = "Basic";
-
- private static final String AUTH_REALM = "";
-
- private static final URL DEFAULT_URL;
-
- private static final String PROPERTY_CONFIG_TIMESTAMP = "org.eclipse.mylyn.tasklist.repositories.configuration.timestamp";
-
- public static final String PROXY_USEDEFAULT = "org.eclipse.mylyn.tasklist.repositories.proxy.usedefault";
-
- public static final String PROXY_HOSTNAME = "org.eclipse.mylyn.tasklist.repositories.proxy.hostname";
-
- public static final String PROXY_PORT = "org.eclipse.mylyn.tasklist.repositories.proxy.port";
-
- private static final String AUTH_PROXY = "org.eclipse.mylyn.tasklist.repositories.proxy";
-
- /**
- * @deprecated use {@link #setCredentials(AuthenticationType, AuthenticationCredentials, boolean)} to access
- * credentials
- */
- @Deprecated
- public static final String PROXY_USERNAME = AUTH_PROXY + USERNAME;
-
- /**
- * @deprecated use {@link #setCredentials(AuthenticationType, AuthenticationCredentials, boolean)} to access
- * credentials
- */
- @Deprecated
- public static final String PROXY_PASSWORD = AUTH_PROXY + PASSWORD;
-
- public static final String OFFLINE = "org.eclipse.mylyn.tasklist.repositories.offline";
-
- // HACK: Lock used to work around race condition in
- // Platform.add/get/flushAuthorizationInfo()
- private static final Object LOCK = new Object();
-
- private final Set<PropertyChangeListener> propertyChangeListeners = new HashSet<PropertyChangeListener>();
-
- // HACK: private credentials for headless operation
- private static Map<String, Map<String, String>> credentials = new HashMap<String, Map<String, String>>();
-
- static {
- URL url = null;
- try {
- url = new URL("http://eclipse.org/mylyn");
- } catch (Exception ex) {
- // TODO ?
- }
- DEFAULT_URL = url;
- }
-
- private static String getKeyPrefix(AuthenticationType type) {
- switch (type) {
- case HTTP:
- return AUTH_HTTP;
- case PROXY:
- return AUTH_PROXY;
- case REPOSITORY:
- return AUTH_REPOSITORY;
- }
- throw new IllegalArgumentException("Unknown authentication type: " + type);
- }
-
- private boolean isCachedUserName;
-
- private String cachedUserName;
-
- private final Map<String, String> properties = new LinkedHashMap<String, String>();
-
- /**
- * Stores properties that are not persisted. Note that this map is currently cleared when flushCredentials() is
- * invoked.
- */
- private final Map<String, String> transientProperties = new HashMap<String, String>();
-
- /*
- * TODO: should be externalized and added to extension point, see bug 183606
- */
- private boolean isBugRepository = false;
-
- private transient volatile boolean updating;
-
- public TaskRepository(String connectorKind, String repositoryUrl) {
- this(connectorKind, repositoryUrl, NO_VERSION_SPECIFIED);
- }
-
- /**
- * @deprecated use {@link #setProperty(String, String)} instead of passing a map
- */
- @Deprecated
- public TaskRepository(String kind, String serverUrl, Map<String, String> properties) {
- setProperty(IRepositoryConstants.PROPERTY_CONNECTOR_KIND, kind);
- setProperty(IRepositoryConstants.PROPERTY_URL, serverUrl);
- this.properties.putAll(properties);
- // use platform proxy by default (headless will need to set this to false)
- this.setProperty(TaskRepository.PROXY_USEDEFAULT, new Boolean(true).toString());
- }
-
- /**
- * for testing purposes sets repository time zone to local default time zone sets character encoding to
- * DEFAULT_CHARACTER_ENCODING
- */
- @Deprecated
- public TaskRepository(String kind, String serverUrl, String version) {
- this(kind, serverUrl, version, DEFAULT_CHARACTER_ENCODING, TimeZone.getDefault().getID());
- }
-
- @Deprecated
- public TaskRepository(String connectorKind, String repositoryUrl, String version, String encoding, String timeZoneId) {
- Assert.isNotNull(connectorKind);
- Assert.isNotNull(repositoryUrl);
- setProperty(IRepositoryConstants.PROPERTY_CONNECTOR_KIND, connectorKind);
- setProperty(IRepositoryConstants.PROPERTY_URL, repositoryUrl);
- setProperty(IRepositoryConstants.PROPERTY_VERSION, version);
- setProperty(IRepositoryConstants.PROPERTY_ENCODING, encoding);
- setProperty(IRepositoryConstants.PROPERTY_TIMEZONE, timeZoneId);
- // use platform proxy by default (headless will need to set this to false)
- this.setProperty(TaskRepository.PROXY_USEDEFAULT, new Boolean(true).toString());
-
- // for backwards compatibility to versions prior to 2.2
- this.setProperty(AUTH_REPOSITORY + SAVE_PASSWORD, String.valueOf(true));
- this.setProperty(AUTH_HTTP + SAVE_PASSWORD, String.valueOf(true));
- this.setProperty(AUTH_PROXY + SAVE_PASSWORD, String.valueOf(true));
- }
-
- // TODO e3.4 move to new api
- private void addAuthInfo(Map<String, String> map) {
- synchronized (LOCK) {
- try {
- if (Platform.isRunning()) {
- // write the map to the keyring
- try {
- Platform.addAuthorizationInfo(new URL(getRepositoryUrl()), AUTH_REALM, AUTH_SCHEME, map);
- } catch (MalformedURLException ex) {
- Platform.addAuthorizationInfo(DEFAULT_URL, getRepositoryUrl(), AUTH_SCHEME, map);
- }
- } else {
- Map<String, String> headlessCreds = getAuthInfo();
- headlessCreds.putAll(map);
- }
- } catch (CoreException e) {
- // API 3.0 propagate exception
- StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN,
- "Could not set authorization credentials", e));
- }
- }
- }
-
- public void clearCredentials() {
- }
-
- @Override
- public boolean equals(Object object) {
- if (object == this) {
- return true;
- }
- if (object instanceof TaskRepository) {
- TaskRepository repository = (TaskRepository) object;
- return getConnectorKind().equals(repository.getConnectorKind())
- && getRepositoryUrl().equals(repository.getRepositoryUrl());
- }
- return false;
- }
-
- // TODO e3.4 move to new api
- public void flushAuthenticationCredentials() {
- synchronized (LOCK) {
- isCachedUserName = false;
-
- transientProperties.clear();
-
- // API30: legacy support for versions prior to 2.2 that did not set the enable flag, remove for 3.0
- setProperty(getKeyPrefix(AuthenticationType.HTTP) + ENABLED, null);
- setProperty(getKeyPrefix(AuthenticationType.PROXY) + ENABLED, null);
- setProperty(getKeyPrefix(AuthenticationType.REPOSITORY) + ENABLED, null);
-
- try {
- if (Platform.isRunning()) {
- try {
- Platform.flushAuthorizationInfo(new URL(getRepositoryUrl()), AUTH_REALM, AUTH_SCHEME);
- } catch (MalformedURLException ex) {
- Platform.flushAuthorizationInfo(DEFAULT_URL, getRepositoryUrl(), AUTH_SCHEME);
- }
- } else {
- Map<String, String> headlessCreds = getAuthInfo();
- headlessCreds.clear();
- }
- } catch (CoreException e) {
- // FIXME propagate exception?
- StatusHandler.fail(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN,
- "Could not flush authorization credentials", e));
- }
- }
- }
-
- // TODO e3.4 move to new api
- @SuppressWarnings( { "unchecked" })
- private Map<String, String> getAuthInfo() {
- synchronized (LOCK) {
- if (Platform.isRunning()) {
- try {
- return Platform.getAuthorizationInfo(new URL(getRepositoryUrl()), AUTH_REALM, AUTH_SCHEME);
- } catch (MalformedURLException ex) {
- return Platform.getAuthorizationInfo(DEFAULT_URL, getRepositoryUrl(), AUTH_SCHEME);
- } catch (Exception e) {
- StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN,
- "Could not retrieve authorization credentials", e));
- }
- } else {
- Map<String, String> headlessCreds = credentials.get(getRepositoryUrl());
- if (headlessCreds == null) {
- headlessCreds = new HashMap<String, String>();
- credentials.put(getRepositoryUrl(), headlessCreds);
- }
- return headlessCreds;
- }
- return null;
- }
- }
-
- private String getAuthInfo(String property) {
- Map<String, String> map = getAuthInfo();
- return map == null ? null : map.get(property);
- }
-
- public String getCharacterEncoding() {
- final String encoding = properties.get(IRepositoryConstants.PROPERTY_ENCODING);
- return encoding == null || "".equals(encoding) ? DEFAULT_CHARACTER_ENCODING : encoding;
- }
-
- /**
- * Get the last refresh date as initialized {@link Date} object, null if not set<br />
- *
- * @return {@link Date} configuration date, null if not set
- */
- public Date getConfigurationDate() {
- Date configDate = null;
- String value = this.getProperty(PROPERTY_CONFIG_TIMESTAMP);
- try {
- configDate = new Date(Long.valueOf(value).longValue());
-
- } catch (Exception e) {
-
- }
- return configDate;
- }
-
- /**
- * @return "<unknown>" if kind is unknown
- */
- public String getConnectorKind() {
- String kind = properties.get(IRepositoryConstants.PROPERTY_CONNECTOR_KIND);
- if (kind != null) {
- return kind;
- } else {
- return IRepositoryConstants.KIND_UNKNOWN;
- }
- }
-
- /**
- * Returns the credentials for an authentication type.
- *
- * @param authType
- * the type of authentication
- * @return null, if no credentials are set for <code>authType</code>
- * @since 3.0
- */
- public synchronized AuthenticationCredentials getCredentials(AuthenticationType authType) {
- String key = getKeyPrefix(authType);
-
- String enabled = getProperty(key + ENABLED);
- if (enabled == null || "true".equals(enabled)) {
- String userName = getAuthInfo(key + USERNAME);
- String password;
-
- String savePassword = getProperty(key + SAVE_PASSWORD);
- if (savePassword != null && "true".equals(savePassword)) {
- password = getAuthInfo(key + PASSWORD);
- } else {
- password = transientProperties.get(key + PASSWORD);
- }
-
- if (userName == null) {
- userName = "";
- }
- if (password == null) {
- password = "";
- }
-
- if (enabled == null && userName.length() == 0) {
- // API30: legacy support for versions prior to 2.2 that did not set the enable flag, remove for 3.0
- return null;
- }
-
- return new AuthenticationCredentials(userName, password);
- } else {
- return null;
- }
- }
-
- /**
- * @deprecated use {@link #getCredentials(AuthenticationType)} instead
- */
- @Deprecated
- public String getHttpPassword() {
- return getPassword(AuthenticationType.HTTP);
- }
-
- /**
- * @deprecated use {@link #getCredentials(AuthenticationType)} instead
- */
- @Deprecated
- public String getHttpUser() {
- return getUserName(AuthenticationType.HTTP);
- }
-
- /**
- * @deprecated use {@link #getCredentials(AuthenticationType)} instead
- */
- @Deprecated
- public String getPassword() {
- return getPassword(AuthenticationType.REPOSITORY);
- }
-
- /**
- * Legacy support for < 2.2. Remove in 2.3.
- */
- private String getPassword(AuthenticationType authType) {
- AuthenticationCredentials credentials = getCredentials(authType);
- return (credentials != null) ? credentials.getPassword() : null;
- }
-
- public Map<String, String> getProperties() {
- return new LinkedHashMap<String, String>(this.properties);
- }
-
- public String getProperty(String name) {
- return this.properties.get(name);
- }
-
- /**
- * @deprecated use {@link TaskRepositoryLocation#getProxyForHost(String, String)} instead
- */
- @Deprecated
- public Proxy getProxy() {
- Proxy proxy = Proxy.NO_PROXY;
- if (isDefaultProxyEnabled()) {
- proxy = WebClientUtil.getPlatformProxy(getRepositoryUrl());
- } else {
-
- String proxyHost = getProperty(PROXY_HOSTNAME);
- String proxyPort = getProperty(PROXY_PORT);
- String proxyUsername = "";
- String proxyPassword = "";
- if (proxyHost != null && proxyHost.length() > 0) {
- proxyUsername = getProxyUsername();
- proxyPassword = getProxyPassword();
- }
- proxy = WebClientUtil.getProxy(proxyHost, proxyPort, proxyUsername, proxyPassword);
- }
- return proxy;
- }
-
- /**
- * @deprecated use {@link #getCredentials(AuthenticationType)} instead
- */
- @Deprecated
- public String getProxyPassword() {
- return getPassword(AuthenticationType.PROXY);
- }
-
- /**
- * @deprecated use {@link #getCredentials(AuthenticationType)} instead
- */
- @Deprecated
- public String getProxyUsername() {
- return getUserName(AuthenticationType.PROXY);
- }
-
- /**
- * @return the URL if the label property is not set
- */
- public String getRepositoryLabel() {
- String label = properties.get(IRepositoryConstants.PROPERTY_LABEL);
- if (label != null && label.length() > 0) {
- return label;
- } else {
- return getRepositoryUrl();
- }
- }
-
- /**
- * @since 3.0
- */
- public boolean getSavePassword(AuthenticationType authType) {
- String value = getProperty(getKeyPrefix(authType) + SAVE_PASSWORD);
- return value != null && "true".equals(value);
- }
-
- public String getSynchronizationTimeStamp() {
- return this.properties.get(IRepositoryConstants.PROPERTY_SYNCTIMESTAMP);
- }
-
- public String getTimeZoneId() {
- final String timeZoneId = properties.get(IRepositoryConstants.PROPERTY_TIMEZONE);
- return timeZoneId == null || "".equals(timeZoneId) ? TimeZone.getDefault().getID() : timeZoneId;
- }
-
- /**
- * @deprecated Use {@link #getRepositoryUrl()} instead
- */
- @Deprecated
- public String getUrl() {
- return getRepositoryUrl();
- }
-
- /**
- * @since 3.0
- */
- public String getRepositoryUrl() {
- return properties.get(IRepositoryConstants.PROPERTY_URL);
- }
-
- /**
- * The username is cached since it needs to be retrieved frequently (e.g. for Task List decoration).
- */
- public String getUserName() {
- // NOTE: if anonymous, user name is "" string so we won't go to keyring
- if (!isCachedUserName) {
- cachedUserName = getUserName(AuthenticationType.REPOSITORY);
- isCachedUserName = true;
- }
- return cachedUserName;
- }
-
- /**
- * Legacy support for < 2.2. Remove in 2.3.
- */
- private String getUserName(AuthenticationType authType) {
- AuthenticationCredentials credentials = getCredentials(authType);
- return (credentials != null) ? credentials.getUserName() : null;
- }
-
- public String getVersion() {
- final String version = properties.get(IRepositoryConstants.PROPERTY_VERSION);
- return version == null || "".equals(version) ? NO_VERSION_SPECIFIED : version;
- }
-
- /**
- * @deprecated use #getCredentials(AuthenticationType) instead
- */
- @Deprecated
- public boolean hasCredentials() {
- String username = getUserName();
- String password = getPassword();
- return username != null && username.length() > 0 && password != null && password.length() > 0;
- }
-
- @Override
- public int hashCode() {
- return getRepositoryUrl().hashCode() * 31 + getConnectorKind().hashCode();
- }
-
- public boolean hasProperty(String name) {
- String value = getProperty(name);
- return value != null && value.trim().length() > 0;
- }
-
- /**
- * @deprecated #getCredentials(AuthenticationType) instead
- */
- @Deprecated
- public boolean isAnonymous() {
- return getProperty(ANONYMOUS_LOGIN) == null || "true".equals(getProperty(ANONYMOUS_LOGIN));
- }
-
- public boolean isBugRepository() {
- return isBugRepository;
- }
-
- /**
- * Use platform proxy settings
- */
- public boolean isDefaultProxyEnabled() {
- return "true".equals(getProperty(PROXY_USEDEFAULT));
- }
-
- public boolean isOffline() {
- return getProperty(OFFLINE) != null && "true".equals(getProperty(OFFLINE));
- }
-
- public void removeProperty(String key) {
- this.properties.remove(key);
- }
-
- /**
- * @deprecated use {@link #setCredentials(AuthenticationType, AuthenticationCredentials, boolean)} instead
- */
- @Deprecated
- public void setAnonymous(boolean b) {
- properties.put(ANONYMOUS_LOGIN, String.valueOf(b));
- }
-
- /**
- * @deprecated use {@link #setCredentials(AuthenticationType, AuthenticationCredentials, boolean)} instead
- */
- @Deprecated
- public void setAuthenticationCredentials(String username, String password) {
- setCredentials(AuthenticationType.REPOSITORY, username, password);
- }
-
- public void setBugRepository(boolean isBugRepository) {
- this.isBugRepository = isBugRepository;
- }
-
- public void setCharacterEncoding(String characterEncoding) {
- properties.put(IRepositoryConstants.PROPERTY_ENCODING, characterEncoding == null ? DEFAULT_CHARACTER_ENCODING
- : characterEncoding);
- }
-
- /**
- * Set the Configuration date to the {@link Date} indicated.
- *
- * @param configuration
- * date {@link {@link Date}
- */
- final public void setConfigurationDate(final Date date) {
- this.setProperty(PROPERTY_CONFIG_TIMESTAMP, String.valueOf(date.getTime()));
- // should persist here, but that can only be done by the TaskRepositoryManager
- // However this is also included when persisting ordinary sync time
- }
-
- /**
- * Sets the credentials for <code>authType</code>.
- *
- * @param authType
- * the type of authentication
- * @param credentials
- * the credentials, if null, the credentials for <code>authType</code> will be flushed
- * @param savePassword
- * if true, the password will be persisted in the platform key ring; otherwise it will be stored in
- * memory only
- * @since 3.0
- */
- public synchronized void setCredentials(AuthenticationType authType, AuthenticationCredentials credentials,
- boolean savePassword) {
- String key = getKeyPrefix(authType);
-
- setProperty(key + SAVE_PASSWORD, String.valueOf(savePassword));
-
- if (credentials == null) {
- setProperty(key + ENABLED, String.valueOf(false));
- transientProperties.remove(key + PASSWORD);
- setCredentialsInternal("", "", key + USERNAME, key + PASSWORD);
- } else {
- setProperty(key + ENABLED, String.valueOf(true));
- if (savePassword) {
- setCredentialsInternal(credentials.getUserName(), credentials.getPassword(), key + USERNAME, key
- + PASSWORD);
- transientProperties.remove(key + PASSWORD);
- } else {
- setCredentialsInternal(credentials.getUserName(), "", key + USERNAME, key + PASSWORD);
- transientProperties.put(key + PASSWORD, credentials.getPassword());
- }
- }
-
- if (authType == AuthenticationType.REPOSITORY) {
- if (credentials == null) {
- this.cachedUserName = null;
- this.isCachedUserName = false;
- } else {
- this.cachedUserName = credentials.getUserName();
- this.isCachedUserName = true;
- }
- }
- }
-
- /**
- * Legacy support for < 2.2. Remove in 2.3.
- */
- private void setCredentials(AuthenticationType type, String username, String password) {
- if (username == null) {
- setCredentials(type, null, true);
- } else {
- setCredentials(type, new AuthenticationCredentials(username, password), true);
- }
-
- }
-
- private void setCredentialsInternal(String username, String password, String userProperty, String passwordProperty) {
- Map<String, String> map = getAuthInfo();
- if (map == null) {
- map = new HashMap<String, String>();
- }
-
- if (username != null) {
- map.put(userProperty, username);
- }
- if (password != null) {
- map.put(passwordProperty, password);
- }
- addAuthInfo(map);
- }
-
- /**
- * @deprecated use esetCredentials(AuthenticationType, AuthenticationCredentials, boolean)
- */
- @Deprecated
- public void setHttpAuthenticationCredentials(String username, String password) {
- setCredentials(AuthenticationType.HTTP, username, password);
- }
-
- public void setOffline(boolean offline) {
- properties.put(OFFLINE, String.valueOf(offline));
- }
-
- /**
- * @deprecated use {@link #setCredentials(AuthenticationType, AuthenticationCredentials, boolean)} instead
- */
- @Deprecated
- public void setProxyAuthenticationCredentials(String username, String password) {
- setCredentials(AuthenticationType.PROXY, username, password);
- }
-
- public void setRepositoryLabel(String repositoryLabel) {
- setProperty(IRepositoryConstants.PROPERTY_LABEL, repositoryLabel);
- }
-
- /**
- * ONLY for use by IRepositoryConstants. To set the sync time call IRepositoryConstants.setSyncTime(repository,
- * date);
- */
- public void setSynchronizationTimeStamp(String syncTime) {
- setProperty(IRepositoryConstants.PROPERTY_SYNCTIMESTAMP, syncTime);
- }
-
- public void setProperty(String key, String value) {
- String old = this.properties.get(key);
- this.properties.put(key, value);
- notifyChangeListeners(key, old, value);
- }
-
- private void notifyChangeListeners(String key, String old, String value) {
- PropertyChangeEvent event = new PropertyChangeEvent(this, key, old, value);
- for (PropertyChangeListener listener : propertyChangeListeners) {
- listener.propertyChange(event);
- }
- }
-
- public void setTimeZoneId(String timeZoneId) {
- setProperty(IRepositoryConstants.PROPERTY_TIMEZONE, timeZoneId == null ? TimeZone.getDefault().getID()
- : timeZoneId);
- }
-
- /**
- * @deprecated Use {@link #setRepositoryUrl(String)} instead
- */
- @Deprecated
- public void setUrl(String newUrl) {
- setRepositoryUrl(newUrl);
- }
-
- /**
- * @since 3.0
- */
- public void setRepositoryUrl(String repositoryUrl) {
- Assert.isNotNull(repositoryUrl);
- properties.put(IRepositoryConstants.PROPERTY_URL, repositoryUrl);
- }
-
- public void setVersion(String ver) {
- properties.put(IRepositoryConstants.PROPERTY_VERSION, ver == null ? NO_VERSION_SPECIFIED : ver);
- }
-
- @Override
- public String toString() {
- return getRepositoryUrl();
- }
-
- /**
- * @since 3.0
- */
- public boolean isUpdating() {
- return updating;
- }
-
- /**
- * @since 3.0
- */
- public void setUpdating(boolean updating) {
- this.updating = updating;
- }
-
- /**
- * @since 3.0
- */
- public IRepositoryPerson createPerson(String personId) {
- return new RepositoryPerson(this, personId);
- }
-
- /**
- * @since 3.0
- */
- public IStatus getStatus() {
- return errorStatus;
- }
-
- /**
- * @since 3.0
- */
- public void setStatus(IStatus errorStatus) {
- this.errorStatus = errorStatus;
- }
-
- /**
- * @since 3.0
- */
- public void addChangeListener(PropertyChangeListener listener) {
- propertyChangeListeners.add(listener);
- }
-
- /**
- * @since 3.0
- */
- public void removeChangeListener(PropertyChangeListener listener) {
- propertyChangeListeners.remove(listener);
- }
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepositoryLocationFactory.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepositoryLocationFactory.java
deleted file mode 100644
index 3141b8e83..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepositoryLocationFactory.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core;
-
-import org.eclipse.mylyn.commons.net.AbstractWebLocation;
-import org.eclipse.mylyn.internal.tasks.core.TaskRepositoryLocation;
-
-/**
- * @since 2.2
- * @author Steffen Pingel
- */
-public class TaskRepositoryLocationFactory {
-
- /**
- * @since 3.0
- */
- public AbstractWebLocation createWebLocation(final TaskRepository taskRepository) {
- return new TaskRepositoryLocation(taskRepository);
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/AbstractTaskAttachmentHandler.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/AbstractTaskAttachmentHandler.java
deleted file mode 100644
index b48bdb871..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/AbstractTaskAttachmentHandler.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core.data;
-
-import java.io.InputStream;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-/**
- * Extend to provide facility for uploading and downloading files from task repositories.
- *
- * @author Steffen Pingel
- * @since 3.0
- */
-public abstract class AbstractTaskAttachmentHandler {
-
- public abstract boolean canGetContent(TaskRepository repository, ITask task);
-
- public abstract boolean canPostContent(TaskRepository repository, ITask task);
-
- public abstract InputStream getContent(TaskRepository repository, ITask task,
- TaskAttribute attachmentAttribute, IProgressMonitor monitor) throws CoreException;
-
- public abstract void postContent(TaskRepository repository, ITask task, AbstractTaskAttachmentSource source,
- String comment, TaskAttribute attachmentAttribute, IProgressMonitor monitor) throws CoreException;
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/AbstractTaskAttachmentSource.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/AbstractTaskAttachmentSource.java
deleted file mode 100644
index 42e891bee..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/AbstractTaskAttachmentSource.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core.data;
-
-import java.io.InputStream;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * @author Steffen Pingel
- * @since 3.0
- */
-public abstract class AbstractTaskAttachmentSource {
-
- public abstract InputStream createInputStream(IProgressMonitor monitor) throws CoreException;
-
- public abstract boolean isLocal();
-
- public abstract long getLength();
-
- public abstract String getName();
-
- public abstract String getContentType();
-
- public abstract String getDescription();
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/AbstractTaskDataHandler.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/AbstractTaskDataHandler.java
deleted file mode 100644
index 32780c583..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/AbstractTaskDataHandler.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core.data;
-
-import java.util.Set;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-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.TaskRepository;
-
-/**
- * Responsible for retrieving and posting task data to a repository.
- *
- * @author Mik Kersten
- * @author Rob Elves
- * @author Steffen Pingel
- * @author Frank Becker
- * @since 3.0
- */
-public abstract class AbstractTaskDataHandler {
-
- /**
- * Download task data for each id provided
- *
- * Override getMultiTaskData() to return true and implement this method if connector supports download of multiple
- * task data in one request.
- *
- * @since 3.0
- */
- public void getMultiTaskData(TaskRepository repository, Set<String> taskIds, TaskDataCollector collector,
- IProgressMonitor monitor) throws CoreException {
- throw new UnsupportedOperationException();
- }
-
- /**
- * Return a reference to the newly created report in the case of new task submission, null otherwise
- */
- public abstract RepositoryResponse postTaskData(TaskRepository repository, TaskData taskData,
- Set<TaskAttribute> oldAttributes, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Initialize a new task data object with default attributes and values
- */
- public abstract boolean initializeTaskData(TaskRepository repository, TaskData data,
- ITaskMapping initializationData, IProgressMonitor monitor) throws CoreException;
-
- /**
- * @since 2.2
- * @return false if this operation is not supported by the connector, true if initialized
- */
- public boolean initializeSubTaskData(TaskRepository repository, TaskData taskData, TaskData parentTaskData,
- IProgressMonitor monitor) throws CoreException {
- return false;
- }
-
- /**
- * @param taskRepository
- * TODO
- * @param task
- * the parent task, may be null
- * @param task
- * the parent task data, may be null
- * @since 2.2
- */
- public boolean canInitializeSubTaskData(TaskRepository taskRepository, ITask task) {
- return false;
- }
-
- public abstract TaskAttributeMapper getAttributeMapper(TaskRepository taskRepository);
-
- /**
- * @param taskRepository
- * TODO
- * @return true if connector support downloading multiple task data in single request, false otherwise. If true,
- * override and implement getMultiTaskData
- */
- public boolean canGetMultiTaskData(TaskRepository taskRepository) {
- return false;
- }
-
- public void migrateTaskData(TaskRepository taskRepository, TaskData taskData) {
- }
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/ITaskDataManager.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/ITaskDataManager.java
deleted file mode 100644
index 326dc7d3e..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/ITaskDataManager.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core.data;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-/**
- * @author Steffen Pingel
- * @since 3.0
- * @noimplement
- */
-public interface ITaskDataManager {
-
- public ITaskDataWorkingCopy createWorkingCopy(ITask task, TaskData taskData);
-
- public abstract ITaskDataWorkingCopy getWorkingCopy(ITask task) throws CoreException;
-
- public abstract void discardEdits(ITask task) throws CoreException;
-
- public abstract TaskData getTaskData(ITask task) throws CoreException;
-
- public abstract TaskData getTaskData(TaskRepository task, String taskId) throws CoreException;
-
- public abstract boolean hasTaskData(ITask task);
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/ITaskDataWorkingCopy.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/ITaskDataWorkingCopy.java
deleted file mode 100644
index cd2b88a38..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/ITaskDataWorkingCopy.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core.data;
-
-import java.util.Set;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * @author Steffen Pingel
- * @since 3.0
- */
-public interface ITaskDataWorkingCopy {
-
- public abstract TaskData getEditsData();
-
- public abstract TaskData getLastReadData();
-
- public abstract TaskData getLocalData();
-
- public abstract TaskData getRepositoryData();
-
- public abstract boolean isSaved();
-
- public abstract void revert();
-
- public abstract void refresh(IProgressMonitor monitor) throws CoreException;
-
- public abstract void save(Set<TaskAttribute> edits, IProgressMonitor monitor) throws CoreException;
-
- public abstract String getConnectorKind();
-
- public abstract String getRepositoryUrl();
-
- public abstract String getTaskId();
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttachmentMapper.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttachmentMapper.java
deleted file mode 100644
index 9394478e0..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttachmentMapper.java
+++ /dev/null
@@ -1,268 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core.data;
-
-import java.util.Date;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.mylyn.tasks.core.IRepositoryPerson;
-import org.eclipse.mylyn.tasks.core.ITaskAttachment;
-
-/**
- * @since 3.0
- * @author Steffen Pingel
- */
-public class TaskAttachmentMapper {
-
- private IRepositoryPerson author;
-
- private String comment;
-
- private String contentType;
-
- private Date creationDate;
-
- private Boolean deprecated;
-
- private String description;
-
- private String fileName;
-
- private Long length;
-
- private Boolean patch;
-
- private String url;
-
- private String attachmentId;
-
- public TaskAttachmentMapper() {
- }
-
- public String getAttachmentId() {
- return attachmentId;
- }
-
- public IRepositoryPerson getAuthor() {
- return author;
- }
-
- public String getComment() {
- return comment;
- }
-
- public String getContentType() {
- return contentType;
- }
-
- public Date getCreationDate() {
- return creationDate;
- }
-
- public String getDescription() {
- return description;
- }
-
- public String getFileName() {
- return fileName;
- }
-
- public Long getLength() {
- return length;
- }
-
- public String getUrl() {
- return url;
- }
-
- public Boolean isDeprecated() {
- return deprecated;
- }
-
- public Boolean isPatch() {
- return patch;
- }
-
- public void setAttachmentId(String attachmentId) {
- this.attachmentId = attachmentId;
- }
-
- public void setAuthor(IRepositoryPerson author) {
- this.author = author;
- }
-
- public void setComment(String comment) {
- this.comment = comment;
- }
-
- public void setContentType(String contentType) {
- this.contentType = contentType;
- }
-
- public void setCreationDate(Date creationDate) {
- this.creationDate = creationDate;
- }
-
- public void setDeprecated(Boolean deprecated) {
- this.deprecated = deprecated;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public void setFileName(String fileName) {
- this.fileName = fileName;
- }
-
- public void setLength(Long length) {
- this.length = length;
- }
-
- public void setPatch(Boolean patch) {
- this.patch = patch;
- }
-
- public void setUrl(String url) {
- this.url = url;
- }
-
- public static TaskAttachmentMapper createFrom(TaskAttribute taskAttribute) {
- Assert.isNotNull(taskAttribute);
- TaskAttributeMapper mapper = taskAttribute.getTaskData().getAttributeMapper();
- TaskAttachmentMapper attachment = new TaskAttachmentMapper();
- 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));
- }
- return attachment;
- }
-
- public void applyTo(TaskAttribute taskAttribute) {
- Assert.isNotNull(taskAttribute);
- TaskData taskData = taskAttribute.getTaskData();
- TaskAttributeMapper mapper = taskData.getAttributeMapper();
- taskAttribute.getMetaData().defaults().setType(TaskAttribute.TYPE_ATTACHMENT);
- if (getAttachmentId() != null) {
- mapper.setValue(taskAttribute, getAttachmentId());
- }
- if (getAuthor() != null) {
- TaskAttribute child = taskAttribute.createMappedAttribute(TaskAttribute.ATTACHMENT_AUTHOR);
- child.getMetaData().defaults().setType(TaskAttribute.TYPE_PERSON);
- mapper.setRepositoryPerson(child, getAuthor());
- }
- if (getContentType() != null) {
- TaskAttribute child = taskAttribute.createMappedAttribute(TaskAttribute.ATTACHMENT_CONTENT_TYPE);
- child.getMetaData().defaults().setType(TaskAttribute.TYPE_SHORT_TEXT);
- mapper.setValue(child, getContentType());
- }
- if (getCreationDate() != null) {
- TaskAttribute child = taskAttribute.createMappedAttribute(TaskAttribute.ATTACHMENT_DATE);
- child.getMetaData().defaults().setType(TaskAttribute.TYPE_DATE);
- mapper.setDateValue(child, getCreationDate());
- }
- if (getDescription() != null) {
- TaskAttribute child = taskAttribute.createMappedAttribute(TaskAttribute.ATTACHMENT_DESCRIPTION);
- child.getMetaData().defaults().setType(TaskAttribute.TYPE_SHORT_TEXT);
- mapper.setValue(child, getDescription());
- }
- if (getFileName() != null) {
- TaskAttribute child = taskAttribute.createMappedAttribute(TaskAttribute.ATTACHMENT_FILENAME);
- child.getMetaData().defaults().setType(TaskAttribute.TYPE_SHORT_TEXT);
- mapper.setValue(child, getFileName());
- }
- if (isDeprecated() != null) {
- TaskAttribute child = taskAttribute.createMappedAttribute(TaskAttribute.ATTACHMENT_IS_DEPRECATED);
- child.getMetaData().defaults().setType(TaskAttribute.TYPE_BOOLEAN);
- mapper.setBooleanValue(child, isDeprecated());
- }
- if (isPatch() != null) {
- TaskAttribute child = taskAttribute.createMappedAttribute(TaskAttribute.ATTACHMENT_IS_PATCH);
- child.getMetaData().defaults().setType(TaskAttribute.TYPE_BOOLEAN);
- mapper.setBooleanValue(child, isPatch());
- }
- if (getLength() != null) {
- TaskAttribute child = taskAttribute.createMappedAttribute(TaskAttribute.ATTACHMENT_SIZE);
- mapper.setLongValue(child, getLength());
- }
- if (getUrl() != null) {
- TaskAttribute child = taskAttribute.createMappedAttribute(TaskAttribute.ATTACHMENT_URL);
- child.getMetaData().defaults().setType(TaskAttribute.TYPE_URL);
- mapper.setValue(child, getUrl());
- }
- }
-
- public void applyTo(ITaskAttachment taskAttachment) {
- Assert.isNotNull(taskAttachment);
- if (getAuthor() != null) {
- taskAttachment.setAuthor(getAuthor());
- }
- if (getContentType() != null) {
- taskAttachment.setContentType(getContentType());
- }
- if (getCreationDate() != null) {
- taskAttachment.setCreationDate(getCreationDate());
- }
- if (getDescription() != null) {
- taskAttachment.setDescription(getDescription());
- }
- if (getFileName() != null) {
- taskAttachment.setFileName(getFileName());
- }
- if (isDeprecated() != null) {
- taskAttachment.setDeprecated(isDeprecated());
- }
- if (isPatch() != null) {
- taskAttachment.setPatch(isPatch());
- }
- if (getLength() != null) {
- taskAttachment.setLength(getLength());
- }
- if (url != null) {
- taskAttachment.setUrl(getUrl());
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttachmentModel.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttachmentModel.java
deleted file mode 100644
index 884e81a53..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttachmentModel.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core.data;
-
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-/**
- * @author Steffen Pingel
- * @since 3.0
- */
-public class TaskAttachmentModel {
-
- private boolean attachContext;
-
- private final TaskAttribute attribute;
-
- private String comment;
-
- private AbstractTaskAttachmentSource source;
-
- private final ITask task;
-
- private final TaskRepository taskRepository;
-
- private String contentType;
-
- public TaskAttachmentModel(TaskRepository taskRepository, ITask task, TaskAttribute attribute) {
- this.taskRepository = taskRepository;
- this.task = task;
- this.attribute = attribute;
- }
-
- public boolean getAttachContext() {
- return attachContext;
- }
-
- public TaskAttribute getAttribute() {
- return attribute;
- }
-
- public String getComment() {
- return comment;
- }
-
- public AbstractTaskAttachmentSource getSource() {
- return source;
- }
-
- public ITask getTask() {
- return task;
- }
-
- public TaskRepository getTaskRepository() {
- return taskRepository;
- }
-
- public void setAttachContext(boolean attachContext) {
- this.attachContext = attachContext;
- }
-
- public void setComment(String comment) {
- this.comment = comment;
- }
-
- public void setSource(AbstractTaskAttachmentSource source) {
- this.source = source;
- }
-
- public String getContentType() {
- if (contentType == null) {
- return getSource().getContentType();
- }
- return contentType;
- }
-
- public void setContentType(String contentType) {
- this.contentType = contentType;
- }
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttribute.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttribute.java
deleted file mode 100644
index d177f8c34..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttribute.java
+++ /dev/null
@@ -1,531 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core.data;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.runtime.Assert;
-
-/**
- * Encapsulates attributes for task data.
- *
- * @author Rob Elves
- * @author Steffen Pingel
- * @since 3.0
- */
-public final class TaskAttribute {
-
- /**
- * Boolean attribute. If true, repository user needs to be added to the cc list.
- */
- public static final String ADD_SELF_CC = "task.common.addselfcc";
-
- public static final String ATTACHMENT_AUTHOR = "task.common.attachment.author";
-
- public static final String ATTACHMENT_CONTENT_TYPE = "task.common.attachment.ctype";
-
- public static final String ATTACHMENT_DATE = "task.common.attachment.date";
-
- public static final String ATTACHMENT_DESCRIPTION = "task.common.attachment.description";
-
- public static final String ATTACHMENT_FILENAME = "filename";
-
- public static final String ATTACHMENT_ID = "task.common.attachment.id";
-
- public static final String ATTACHMENT_IS_DEPRECATED = "task.common.attachment.deprecated";
-
- public static final String ATTACHMENT_IS_PATCH = "task.common.attachment.patch";
-
- public static final String ATTACHMENT_SIZE = "task.common.attachment.size";
-
- public static final String ATTACHMENT_URL = "task.common.attachment.url";
-
- public static final String COMMENT_ATTACHMENT_ID = "task.common.comment.attachment.id";
-
- public static final String COMMENT_AUTHOR = "task.common.comment.author";
-
- @Deprecated
- public static final String COMMENT_AUTHOR_NAME = "task.common.comment.author.name";
-
- public static final String COMMENT_DATE = "task.common.comment.date";
-
- public static final String COMMENT_HAS_ATTACHMENT = "task.common.comment.attachment";
-
- public static final String COMMENT_NEW = "task.common.comment.new";
-
- /**
- * @since 3.0
- */
- public static final String COMMENT_NUMBER = "task.common.comment.number";
-
- public static final String COMMENT_TEXT = "task.common.comment.text";
-
- public static final String COMMENT_URL = "task.common.comment.url";
-
- /**
- * @since 3.0
- */
- public static final String COMPONENT = "task.common.component";
-
- /**
- * @since 3.0
- */
- public static final String DATE_COMPLETION = "task.common.date.completed";
-
- public static final String DATE_CREATION = "task.common.date.created";
-
- /**
- * @since 3.0
- */
- public static final String DATE_DUE = "task.common.date.due";
-
- public static final String DATE_MODIFICATION = "task.common.date.modified";
-
- public static final String DESCRIPTION = "task.common.description";
-
- public static final String KEYWORDS = "task.common.keywords";
-
- public static final String KIND_DEFAULT = "task.common.kind.default";
-
- public static final String KIND_OPERATION = "task.common.kind.operation";
-
- public static final String KIND_PEOPLE = "task.common.kind.default";
-
- //public static final String META_SHOW_IN_ATTRIBUTES_SECTION = "task.meta.showInTaskEditorAttributesSection";
-
- public static final String META_ASSOCIATED_ATTRIBUTE_ID = "task.meta.associated.attribute";
-
- public static final String META_ATTRIBUTE_KIND = "task.meta.attributeKind";
-
- public static final String META_ATTRIBUTE_TYPE = "task.meta.type";
-
- public static final String META_DEFAULT_OPTION = "task.meta.defaultOption";
-
-// public static final String META_DETAIL_LEVEL = "task.meta.detailLevel";
-
- public static final String META_LABEL = "task.meta.label";
-
- public static final String META_READ_ONLY = "task.meta.readOnly";
-
- public static final String NEW_ATTACHMENT = "task.common.new.attachment";
-
- // XXX merge with USER_CC
- //public static final String NEW_CC = "task.common.newcc";
-
- public static final String OPERATION = "task.common.operation";
-
- public static final String PERSON_NAME = "task.common.person.name";
-
- public static final String PREFIX_ATTACHMENT = "task.common.attachment-";
-
- public static final String PREFIX_COMMENT = "task.common.comment-";
-
- // XXX merge with USER_CC
- //public static final String REMOVE_CC = "task.common.removecc";
-
- public static final String PREFIX_OPERATION = "task.common.operation-";
-
- public static final String PRIORITY = "task.common.priority";
-
- public static final String PRODUCT = "task.common.product";
-
- public static final String RESOLUTION = "task.common.resolution";
-
- public static final String STATUS = "task.common.status";
-
- public static final String SUMMARY = "task.common.summary";
-
- public static final String TASK_KEY = "task.common.key";
-
- public static final String TASK_KIND = "task.common.kind";
-
- /**
- * @since 3.0
- */
- public static final String TASK_URL = "task.common.url";
-
- /**
- * @since 3.0
- */
- public static final String TYPE_ATTACHMENT = "attachment";
-
- /**
- * @since 3.0
- */
- public static final String TYPE_BOOLEAN = "boolean";
-
- /**
- * @since 3.0
- */
- public static final String TYPE_COMMENT = "comment";
-
- /**
- * @since 3.0
- */
- public static final String TYPE_CONTAINER = "container";
-
- /**
- * @since 3.0
- */
- public static final String TYPE_DATE = "date";
-
- /**
- * @since 3.0
- */
- public static final String TYPE_INTEGER = "integer";
-
- /**
- * @since 3.0
- */
- public static final String TYPE_LONG_RICH_TEXT = "longRichText";
-
- /**
- * @since 3.0
- */
- public static final String TYPE_LONG_TEXT = "longText";
-
- /**
- * @since 3.0
- */
- public static final String TYPE_MULTI_SELECT = "multiSelect";
-
- public static final String TYPE_OPERATION = "operation";
-
- /**
- * @since 3.0
- */
- public static final String TYPE_PERSON = "person";
-
- /**
- * @since 3.0
- */
- public static final String TYPE_SHORT_RICH_TEXT = "shortRichText";
-
- /**
- * @since 3.0
- */
- public static final String TYPE_SHORT_TEXT = "shortText";
-
- /**
- * @since 3.0
- */
- public static final String TYPE_SINGLE_SELECT = "singleSelect";
-
- /**
- * @since 3.0
- */
- public static final String TYPE_TASK_DEPENDENCY = "taskDepenedency";
-
- public static final String TYPE_URL = "url";
-
- public static final String USER_ASSIGNED = "task.common.user.assigned";
-
- @Deprecated
- public static final String USER_ASSIGNED_NAME = "task.common.user.assigned.name";
-
- public static final String USER_CC = "task.common.user.cc";
-
- public static final String USER_REPORTER = "task.common.user.reporter";
-
- @Deprecated
- public static final String USER_REPORTER_NAME = "task.common.user.reporter.name";
-
- private Map<String, TaskAttribute> attributeById;
-
- private final String attributeId;
-
- private Map<String, String> metaData;
-
- private Map<String, String> optionByKey;
-
- private final TaskAttribute parentAttribute;
-
- private final TaskData taskData;
-
- /**
- * Attribute's values (selected or added)
- */
- private final List<String> values;
-
- public TaskAttribute(TaskAttribute parentAttribute, String attributeId) {
- Assert.isNotNull(parentAttribute);
- Assert.isNotNull(attributeId);
- this.parentAttribute = parentAttribute;
- this.attributeId = attributeId;
- this.taskData = parentAttribute.getTaskData();
- this.values = new ArrayList<String>(1);
- parentAttribute.add(this);
- }
-
- /**
- * Constructor for the root node.
- */
- TaskAttribute(TaskData taskData) {
- Assert.isNotNull(taskData);
- this.parentAttribute = null;
- this.taskData = taskData;
- this.attributeId = "root";
- this.values = new ArrayList<String>(1);
- }
-
- private void add(TaskAttribute attribute) {
- if (attributeById == null) {
- attributeById = new LinkedHashMap<String, TaskAttribute>();
- }
- attributeById.put(attribute.getId(), attribute);
- }
-
- public void addValue(String value) {
- Assert.isNotNull(value);
- values.add(value);
- }
-
- public void clearAttributes() {
- attributeById = null;
- }
-
- void clearMetaDataMap() {
- metaData = null;
- }
-
- public void clearOptions() {
- optionByKey = null;
- }
-
- public void clearValues() {
- values.clear();
- }
-
- public TaskAttribute createAttribute(String attributeId) {
- return new TaskAttribute(this, attributeId);
- }
-
- public void deepAddCopy(TaskAttribute source) {
- TaskAttribute target = createAttribute(source.getId());
- target.values.addAll(source.values);
- if (source.metaData != null) {
- target.metaData = new LinkedHashMap<String, String>(source.metaData);
- }
- if (source.optionByKey != null) {
- target.optionByKey = new LinkedHashMap<String, String>(source.optionByKey);
- }
- if (source.attributeById != null) {
- for (TaskAttribute child : source.attributeById.values()) {
- target.deepAddCopy(child);
- }
- }
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj) {
- return true;
- }
- if (obj == null) {
- return false;
- }
- if (getClass() != obj.getClass()) {
- return false;
- }
- final TaskAttribute other = (TaskAttribute) obj;
- if (attributeId == null) {
- if (other.attributeId != null) {
- return false;
- }
- } else if (!attributeId.equals(other.attributeId)) {
- return false;
- }
- return true;
- }
-
- public TaskAttribute getAttribute(String attributeId) {
- Assert.isNotNull(attributeId);
- return (attributeById != null) ? attributeById.get(attributeId) : null;
- }
-
- public Map<String, TaskAttribute> getAttributes() {
- if (attributeById != null) {
- return Collections.unmodifiableMap(attributeById);
- } else {
- return Collections.emptyMap();
- }
- }
-
- public String getId() {
- return attributeId;
- }
-
- public TaskAttribute getMappedAttribute(String attributeId) {
- Assert.isNotNull(attributeId);
- return (attributeById != null) ? attributeById.get(getTaskData().getAttributeMapper().mapToRepositoryKey(this,
- attributeId)) : null;
- }
-
- public TaskAttribute getMappedAttribute(String[] path) {
- TaskAttribute attribute = this;
- for (String id : path) {
- attribute = attribute.getMappedAttribute(id);
- if (attribute == null) {
- break;
- }
- }
- return attribute;
- }
-
- String getMetaDatum(String key) {
- return (metaData != null) ? metaData.get(key) : null;
- }
-
- Map<String, String> getMetaDataMap() {
- if (metaData != null) {
- return Collections.unmodifiableMap(metaData);
- } else {
- return Collections.emptyMap();
- }
- }
-
- public String getOption(String key) {
- return (optionByKey != null) ? optionByKey.get(key) : null;
- }
-
- public Map<String, String> getOptions() {
- if (optionByKey != null) {
- return Collections.unmodifiableMap(optionByKey);
- } else {
- return Collections.emptyMap();
- }
- }
-
- public TaskAttribute getParentAttribute() {
- return parentAttribute;
- }
-
- public String[] getPath() {
- List<String> path = new ArrayList<String>();
- TaskAttribute attribute = this;
- while (attribute.getParentAttribute() != null) {
- path.add(attribute.getId());
- attribute = attribute.getParentAttribute();
- }
- Collections.reverse(path);
- return path.toArray(new String[0]);
- }
-
- public TaskAttributeMetaData getMetaData() {
- return new TaskAttributeMetaData(this);
- }
-
- public TaskData getTaskData() {
- return taskData;
- }
-
- public String getValue() {
- if (values.size() > 0) {
- return values.get(0);
- } else {
- return "";
- }
- }
-
- public List<String> getValues() {
- return Collections.unmodifiableList(values);
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((attributeId == null) ? 0 : attributeId.hashCode());
- return result;
- }
-
- void putMetaDatum(String key, String value) {
- Assert.isNotNull(key);
- Assert.isNotNull(value);
- if (metaData == null) {
- metaData = new LinkedHashMap<String, String>();
- }
- metaData.put(key, value);
- }
-
- /**
- * Adds an attribute option value
- *
- * @param readableValue
- * The value displayed on the screen
- * @param parameterValue
- * The option value used when sending the form to the server
- */
- public void putOption(String key, String value) {
- Assert.isNotNull(key);
- Assert.isNotNull(value);
- if (optionByKey == null) {
- optionByKey = new LinkedHashMap<String, String>();
- }
- optionByKey.put(key, value);
- }
-
- public void removeAttribute(String attributeId) {
- if (attributeById != null) {
- attributeById.remove(attributeId);
- }
- }
-
- void removeMetaDatum(String metaDataId) {
- if (metaData != null) {
- metaData.remove(metaDataId);
- }
- }
-
- public void removeValue(String value) {
- values.remove(value);
- }
-
- public void setValue(String value) {
- Assert.isNotNull(value);
- if (values.size() > 0) {
- values.clear();
- }
- values.add(value);
- }
-
- public void setValues(List<String> values) {
- this.values.clear();
- this.values.addAll(values);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- toString(sb, "");
- return sb.toString();
- }
-
- private void toString(StringBuilder sb, String prefix) {
- sb.append(prefix);
- sb.append("TaskAttribute[id=" + attributeId + ",values=" + values + ",options=" + optionByKey + ",metaData="
- + metaData + "]\n");
- if (attributeById != null) {
- for (TaskAttribute child : attributeById.values()) {
- child.toString(sb, prefix + " ");
- }
- }
- }
-
- public TaskAttribute createMappedAttribute(String attributeId) {
- Assert.isNotNull(attributeId);
- String mappedAttributeId = getTaskData().getAttributeMapper().mapToRepositoryKey(this, attributeId);
- Assert.isNotNull(mappedAttributeId);
- return new TaskAttribute(this, mappedAttributeId);
- }
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttributeMapper.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttributeMapper.java
deleted file mode 100644
index 2605f6228..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttributeMapper.java
+++ /dev/null
@@ -1,270 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.tasks.core.data;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.mylyn.tasks.core.IRepositoryPerson;
-import org.eclipse.mylyn.tasks.core.ITaskAttachment;
-import org.eclipse.mylyn.tasks.core.ITaskComment;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-/**
- * @author Steffen Pingel
- * @since 3.0
- */
-public class TaskAttributeMapper {
-
- private final TaskRepository taskRepository;
-
- public TaskAttributeMapper(TaskRepository taskRepository) {
- Assert.isNotNull(taskRepository);
- this.taskRepository = taskRepository;
- }
-
- public TaskAttribute createTaskAttachment(TaskData taskData) {
- TaskAttribute taskAttribute = taskData.getRoot().createAttribute(
- mapToRepositoryKey(taskData.getRoot(), TaskAttribute.NEW_ATTACHMENT));
- TaskAttachmentMapper.createFrom(taskAttribute);
- return taskAttribute;
- }
-
- public boolean equals(TaskAttribute newAttribute, TaskAttribute oldAttribute) {
- return newAttribute.getValues().equals(oldAttribute.getValues());
- }
-
- public TaskAttribute getAssoctiatedAttribute(TaskAttribute taskAttribute) {
- String id = taskAttribute.getMetaDatum(TaskAttribute.META_ASSOCIATED_ATTRIBUTE_ID);
- if (id != null) {
- // look up as nested attribute first
- TaskAttribute associatedAttribute = taskAttribute.getAttribute(id);
- if (associatedAttribute != null) {
- return associatedAttribute;
- }
- // fall back to root
- return taskAttribute.getTaskData().getRoot().getAttribute(id);
- }
- return null;
- }
-
- public TaskAttribute getAssoctiatedAttribute(TaskOperation taskOperation) {
- TaskAttribute taskAttribute = taskOperation.getTaskAttribute();
- if (taskAttribute != null) {
- return getAssoctiatedAttribute(taskAttribute);
- }
- return null;
- }
-
- public List<TaskAttribute> getAttributesByType(TaskData taskData, String type) {
- Assert.isNotNull(taskData);
- Assert.isNotNull(type);
- List<TaskAttribute> result = new ArrayList<TaskAttribute>();
- for (TaskAttribute taskAttribute : taskData.getRoot().getAttributes().values()) {
- if (type.equals(taskAttribute.getMetaData().getType())) {
- result.add(taskAttribute);
- }
- }
- return result;
- }
-
- public boolean getBooleanValue(TaskAttribute attribute) {
- String booleanString = attribute.getValue();
- if (booleanString != null && booleanString.length() > 0) {
- return Boolean.parseBoolean(booleanString);
- }
- return false;
- }
-
- public Date getDateValue(TaskAttribute attribute) {
- String dateString = attribute.getValue();
- try {
- if (dateString != null && dateString.length() > 0) {
- return new Date(Long.parseLong(dateString));
- }
- } catch (NumberFormatException e) {
- // ignore
- }
- return null;
- }
-
- public String getDefaultOption(TaskAttribute taskAttribute) {
- return taskAttribute.getMetaData().getDefaultOption();
- }
-
- public Integer getIntegerValue(TaskAttribute attribute) {
- String integerString = attribute.getValue();
- try {
- if (integerString != null) {
- return Integer.parseInt(integerString);
- }
- } catch (NumberFormatException e) {
- // ignore
- }
- return null;
- }
-
- public String getLabel(TaskAttribute taskAttribute) {
- return taskAttribute.getMetaData().getLabel();
- }
-
- public Long getLongValue(TaskAttribute attribute) {
- String longString = attribute.getValue();
- try {
- if (longString != null) {
- return Long.parseLong(longString);
- }
- } catch (NumberFormatException e) {
- // ignore
- }
- return null;
- }
-
- /**
- * Returns labelByValue.
- */
- public Map<String, String> getOptions(TaskAttribute attribute) {
- return attribute.getOptions();
- }
-
- public IRepositoryPerson getRepositoryPerson(TaskAttribute taskAttribute) {
- IRepositoryPerson person = taskRepository.createPerson(taskAttribute.getValue());
- TaskAttribute child = taskAttribute.getMappedAttribute(TaskAttribute.PERSON_NAME);
- if (child != null) {
- person.setName(getValue(child));
- }
- return person;
- }
-
- public List<TaskOperation> getTaskOperations(TaskAttribute operationsAttribute) {
- Assert.isNotNull(operationsAttribute);
- TaskData taskData = operationsAttribute.getTaskData();
- List<TaskOperation> result = new ArrayList<TaskOperation>();
- for (TaskAttribute taskAttribute : taskData.getRoot().getAttributes().values()) {
- if (TaskAttribute.TYPE_OPERATION.equals(taskAttribute.getMetaData().getType())
- && !taskAttribute.getId().equals(mapToRepositoryKey(taskData.getRoot(), TaskAttribute.OPERATION))) {
- result.add(TaskOperation.createFrom(taskAttribute));
- }
- }
- return result;
- }
-
- public TaskOperation getTaskOperation(TaskAttribute taskAttribute) {
- Assert.isNotNull(taskAttribute);
- return TaskOperation.createFrom(taskAttribute);
- }
-
- public TaskRepository getTaskRepository() {
- return taskRepository;
- }
-
- public String getValue(TaskAttribute taskAttribute) {
- return taskAttribute.getValue();
- }
-
- public String getValueLabel(TaskAttribute taskAttribute) {
- StringBuilder sb = new StringBuilder();
- String sep = "";
- for (String value : taskAttribute.getValues()) {
- String option = taskAttribute.getOption(value);
- if (option != null) {
- value = option;
- }
- sb.append(sep).append(value);
- sep = ", ";
- }
- return sb.toString();
- }
-
- public List<String> getValueLabels(TaskAttribute taskAttribute) {
- List<String> values = taskAttribute.getValues();
- List<String> result = new ArrayList<String>(values.size());
- for (String value : values) {
- String option = taskAttribute.getOption(value);
- if (option != null) {
- value = option;
- }
- result.add(value);
- }
- return result;
- }
-
- public List<String> getValues(TaskAttribute attribute) {
- return new ArrayList<String>(attribute.getValues());
- }
-
- public boolean hasValue(TaskAttribute attribute) {
- return attribute.getValues().size() > 0;
- }
-
- public String mapToRepositoryKey(TaskAttribute parent, String key) {
- return key;
- }
-
- public void setBooleanValue(TaskAttribute attribute, Boolean value) {
- attribute.setValue(Boolean.toString(value));
- }
-
- public void setDateValue(TaskAttribute attribute, Date date) {
- if (date != null) {
- attribute.setValue(Long.toString(date.getTime()));
- } else {
- attribute.clearValues();
- }
- }
-
- public void setIntegerValue(TaskAttribute attribute, Integer value) {
- if (value != null) {
- attribute.setValue(value.toString());
- } else {
- attribute.clearValues();
- }
- }
-
- public void setLongValue(TaskAttribute attribute, Long value) {
- if (value != null) {
- attribute.setValue(value.toString());
- } else {
- attribute.clearValues();
- }
- }
-
- public void setRepositoryPerson(TaskAttribute taskAttribute, IRepositoryPerson person) {
- setValue(taskAttribute, person.getPersonId());
- if (person.getName() != null) {
- TaskAttribute child = taskAttribute.createAttribute(TaskAttribute.PERSON_NAME);
- setValue(child, person.getName());
- }
- }
-
- public void setTaskOperation(TaskAttribute taskAttribute, TaskOperation taskOperation) {
- Assert.isNotNull(taskAttribute);
- Assert.isNotNull(taskOperation);
- TaskOperation.applyTo(taskAttribute, taskOperation.getOperationId(), taskOperation.getLabel());
- }
-
- public void setValue(TaskAttribute attribute, String value) {
- attribute.setValue(value);
- }
-
- public void setValues(TaskAttribute attribute, List<String> values) {
- attribute.setValues(values);
- }
-
- public void updateTaskAttachment(ITaskAttachment taskAttachment, TaskAttribute taskAttribute) {
- TaskAttachmentMapper.createFrom(taskAttribute).applyTo(taskAttachment);
- }
-
- public void updateTaskComment(ITaskComment taskComment, TaskAttribute taskAttribute) {
- TaskCommentMapper.createFrom(taskAttribute).applyTo(taskComment);
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttributeMetaData.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttributeMetaData.java
deleted file mode 100644
index 77f67b6cf..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttributeMetaData.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core.data;
-
-import java.util.Map;
-
-/**
- * @author Steffen Pingel
- * @since 3.0
- */
-public class TaskAttributeMetaData {
-
-// public enum DetailLevel {
-// /** A little bit of detail, e.g. a task showing in the Task List. */
-// LOW,
-// /** More detail, e.g. a task showing in a tool tip. */
-// MEDIUM,
-// /** A lot of detail, e.g. a task showing in an editor. */
-// //HIGH
-// };
-
- private final TaskAttribute taskAttribute;
-
- TaskAttributeMetaData(TaskAttribute taskAttribute) {
- this.taskAttribute = taskAttribute;
- }
-
- public TaskAttributeMetaData defaults() {
- setLabel(null);
- setKind(null);
- setReadOnly(true);
- setType(TaskAttribute.TYPE_SHORT_TEXT);
- return this;
- }
-
- public TaskAttributeMetaData clear() {
- taskAttribute.clearMetaDataMap();
- return this;
- }
-
- public String getDefaultOption() {
- return taskAttribute.getMetaDatum(TaskAttribute.META_DEFAULT_OPTION);
- }
-
-// public DetailLevel getDetailLevel() {
-// try {
-// return DetailLevel.valueOf(taskAttribute.getMetaDatum(TaskAttribute.META_DEFAULT_OPTION));
-// } catch (IllegalArgumentException e) {
-// return null;
-// }
-// }
-
- public String getKind() {
- return taskAttribute.getMetaDatum(TaskAttribute.META_ATTRIBUTE_KIND);
- }
-
- public String getLabel() {
- return taskAttribute.getMetaDatum(TaskAttribute.META_LABEL);
- }
-
- public String getType() {
- return taskAttribute.getMetaDatum(TaskAttribute.META_ATTRIBUTE_TYPE);
- }
-
- public String getValue(String key) {
- return taskAttribute.getMetaDatum(key);
- }
-
- public Map<String, String> getValues() {
- return taskAttribute.getMetaDataMap();
- }
-
- public boolean isReadOnly() {
- return Boolean.parseBoolean(taskAttribute.getMetaDatum(TaskAttribute.META_READ_ONLY));
- }
-
- public TaskAttributeMetaData putValue(String key, String value) {
- taskAttribute.putMetaDatum(key, value);
- return this;
- }
-
- public TaskAttributeMetaData setDefaultOption(String defaultOption) {
- if (defaultOption != null) {
- taskAttribute.putMetaDatum(TaskAttribute.META_DEFAULT_OPTION, defaultOption);
- } else {
- taskAttribute.removeMetaDatum(TaskAttribute.META_DEFAULT_OPTION);
- }
- return this;
- }
-
-// public TaskAttributeMetaData setDetailLevel(DetailLevel detailLevel) {
-// if (detailLevel != null) {
-// taskAttribute.putMetaDatum(TaskAttribute.META_DETAIL_LEVEL, detailLevel.name());
-// } else {
-// taskAttribute.removeMetaDatum(TaskAttribute.META_DETAIL_LEVEL);
-// }
-// return this;
-// }
-
- public TaskAttributeMetaData setKind(String value) {
- if (value != null) {
- taskAttribute.putMetaDatum(TaskAttribute.META_ATTRIBUTE_KIND, value);
- } else {
- taskAttribute.removeMetaDatum(TaskAttribute.META_ATTRIBUTE_KIND);
- }
- return this;
- }
-
- public TaskAttributeMetaData setLabel(String value) {
- if (value != null) {
- taskAttribute.putMetaDatum(TaskAttribute.META_LABEL, value);
- } else {
- taskAttribute.removeMetaDatum(TaskAttribute.META_LABEL);
- }
- return this;
- }
-
- public TaskAttributeMetaData setReadOnly(boolean value) {
- taskAttribute.putMetaDatum(TaskAttribute.META_READ_ONLY, Boolean.toString(value));
- return this;
- }
-
- public TaskAttributeMetaData setType(String value) {
- if (value != null) {
- taskAttribute.putMetaDatum(TaskAttribute.META_ATTRIBUTE_TYPE, value);
- } else {
- taskAttribute.removeMetaDatum(TaskAttribute.META_ATTRIBUTE_TYPE);
- }
- return this;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskCommentMapper.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskCommentMapper.java
deleted file mode 100644
index 4c8d8ef15..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskCommentMapper.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core.data;
-
-import java.util.Date;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.mylyn.tasks.core.IRepositoryPerson;
-import org.eclipse.mylyn.tasks.core.ITaskComment;
-
-/**
- * A comment posted by a user on a task.
- *
- * @author Rob Elves
- * @author Steffen Pingel
- * @since 3.0
- */
-public class TaskCommentMapper {
-
- private IRepositoryPerson author;
-
- private String commentId;
-
- private Date creationDate;
-
- private Integer number;
-
- private String text;
-
- private String url;
-
- public TaskCommentMapper() {
- }
-
- public IRepositoryPerson getAuthor() {
- return author;
- }
-
- public String getCommentId() {
- return commentId;
- }
-
- public Date getCreationDate() {
- return creationDate;
- }
-
- public Integer getNumber() {
- return number;
- }
-
- public String getText() {
- return text;
- }
-
- public String getUrl() {
- return url;
- }
-
- public void setAuthor(IRepositoryPerson author) {
- this.author = author;
- }
-
- public void setCommentId(String commentId) {
- this.commentId = commentId;
- }
-
- public void setCreationDate(Date creationDate) {
- this.creationDate = creationDate;
- }
-
- public void setNumber(Integer number) {
- this.number = number;
- }
-
- public void setText(String text) {
- this.text = text;
- }
-
- public void setUrl(String url) {
- this.url = url;
- }
-
- @SuppressWarnings("deprecation")
- public static TaskCommentMapper createFrom(TaskAttribute taskAttribute) {
- Assert.isNotNull(taskAttribute);
- TaskData taskData = taskAttribute.getTaskData();
- TaskAttributeMapper mapper = taskData.getAttributeMapper();
- TaskCommentMapper comment = new TaskCommentMapper();
- comment.setCommentId(mapper.getValue(taskAttribute));
- TaskAttribute child = taskAttribute.getMappedAttribute(TaskAttribute.COMMENT_AUTHOR);
- if (child != null) {
- IRepositoryPerson person = mapper.getRepositoryPerson(child);
- if (person.getName() == null) {
- child = taskAttribute.getMappedAttribute(TaskAttribute.COMMENT_AUTHOR_NAME);
- if (child != null) {
- person.setName(child.getValue());
- }
- }
- comment.setAuthor(person);
- }
- child = taskAttribute.getMappedAttribute(TaskAttribute.COMMENT_DATE);
- if (child != null) {
- comment.setCreationDate(mapper.getDateValue(child));
- }
- child = taskAttribute.getMappedAttribute(TaskAttribute.COMMENT_NUMBER);
- if (child != null) {
- comment.setNumber(mapper.getIntegerValue(child));
- }
- child = taskAttribute.getMappedAttribute(TaskAttribute.COMMENT_URL);
- if (child != null) {
- comment.setUrl(mapper.getValue(child));
- }
- child = taskAttribute.getMappedAttribute(TaskAttribute.COMMENT_TEXT);
- if (child != null) {
- comment.setText(mapper.getValue(child));
- }
- return comment;
- }
-
- public void applyTo(TaskAttribute taskAttribute) {
- Assert.isNotNull(taskAttribute);
- TaskData taskData = taskAttribute.getTaskData();
- TaskAttributeMapper mapper = taskData.getAttributeMapper();
- taskAttribute.getMetaData().defaults().setType(TaskAttribute.TYPE_COMMENT);
- if (getCommentId() != null) {
- mapper.setValue(taskAttribute, getCommentId());
- }
- if (getAuthor() != null) {
- TaskAttribute child = taskAttribute.createMappedAttribute(TaskAttribute.COMMENT_AUTHOR);
- child.getMetaData().defaults().setType(TaskAttribute.TYPE_PERSON);
- mapper.setRepositoryPerson(child, getAuthor());
- }
- if (getCreationDate() != null) {
- TaskAttribute child = taskAttribute.createMappedAttribute(TaskAttribute.COMMENT_DATE);
- child.getMetaData().defaults().setType(TaskAttribute.TYPE_DATE);
- mapper.setDateValue(child, getCreationDate());
- }
- if (getNumber() != null) {
- TaskAttribute child = taskAttribute.createMappedAttribute(TaskAttribute.COMMENT_NUMBER);
- child.getMetaData().defaults().setType(TaskAttribute.TYPE_INTEGER);
- mapper.setIntegerValue(child, getNumber());
- }
- if (getUrl() != null) {
- TaskAttribute child = taskAttribute.createMappedAttribute(TaskAttribute.COMMENT_URL);
- child.getMetaData().defaults().setType(TaskAttribute.TYPE_URL);
- mapper.setValue(child, getUrl());
- }
- if (getText() != null) {
- TaskAttribute child = taskAttribute.createMappedAttribute(TaskAttribute.COMMENT_TEXT);
- child.getMetaData().defaults().setType(TaskAttribute.TYPE_LONG_RICH_TEXT);
- mapper.setValue(child, getText());
- taskAttribute.putMetaDatum(TaskAttribute.META_ASSOCIATED_ATTRIBUTE_ID, child.getId());
- }
- }
-
- public void applyTo(ITaskComment taskComment) {
- Assert.isNotNull(taskComment);
- if (getAuthor() != null) {
- taskComment.setAuthor(getAuthor());
- }
- if (getCreationDate() != null) {
- taskComment.setCreationDate(getCreationDate());
- }
- if (getNumber() != null) {
- taskComment.setNumber(getNumber());
- }
- if (getUrl() != null) {
- taskComment.setUrl(getUrl());
- }
- if (getText() != null) {
- taskComment.setText(getText());
- }
- }
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskData.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskData.java
deleted file mode 100644
index e1e8b88ab..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskData.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core.data;
-
-import org.eclipse.core.runtime.Assert;
-
-/**
- * @author Steffen Pingel
- * @since 3.0
- */
-public final class TaskData {
-
- private final String connectorKind;
-
- private boolean partial;
-
- private String version;
-
- private final String repositoryUrl;
-
- private final String taskId;
-
- private final TaskAttributeMapper mapper;
-
- private final TaskAttribute root;
-
- public TaskData(TaskAttributeMapper mapper, String connectorKind, String repositoryUrl, String taskId) {
- Assert.isNotNull(mapper);
- Assert.isNotNull(connectorKind);
- Assert.isNotNull(repositoryUrl);
- Assert.isNotNull(taskId);
- this.mapper = mapper;
- this.connectorKind = connectorKind;
- this.repositoryUrl = repositoryUrl;
- this.taskId = taskId;
- this.root = new TaskAttribute(this);
- }
-
- public TaskAttribute getRoot() {
- return root;
- }
-
- public String getConnectorKind() {
- return connectorKind;
- }
-
- public String getRepositoryUrl() {
- return repositoryUrl;
- }
-
- public String getTaskId() {
- return taskId;
- }
-
- public String getVersion() {
- return version;
- }
-
- public void setVersion(String version) {
- this.version = version;
- }
-
- /**
- * Returns true if this is a new, unsubmitted task; false otherwise.
- */
- public boolean isNew() {
- return getTaskId().length() == 0;
- }
-
- public boolean isPartial() {
- return partial;
- }
-
- public void setPartial(boolean complete) {
- this.partial = complete;
- }
-
- public TaskAttributeMapper getAttributeMapper() {
- return mapper;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskDataCollector.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskDataCollector.java
deleted file mode 100644
index 25cb76e9b..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskDataCollector.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core.data;
-
-/**
- * This class is used for collecting tasks, e.g. when performing queries on a repository.
- *
- * @author Rob Elves
- * @since 3.0
- */
-public abstract class TaskDataCollector {
-
- /**
- * @since 3.0
- */
- public static final int MAX_HITS = 5000;
-
- public abstract void accept(TaskData taskData);
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskDataModel.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskDataModel.java
deleted file mode 100644
index af33ead29..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskDataModel.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core.data;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.ISafeRunnable;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.SafeRunner;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.data.TaskDataModelEvent.EventKind;
-
-/**
- * @author Steffen Pingel
- * @since 3.0
- */
-public class TaskDataModel {
-
- private List<TaskDataModelListener> listeners;
-
- private final ITask task;
-
- private final TaskRepository taskRepository;
-
- private final Set<TaskAttribute> unsavedChanedAttributes;
-
- private final ITaskDataWorkingCopy workingCopy;
-
- public TaskDataModel(TaskRepository taskRepository, ITask task, ITaskDataWorkingCopy taskDataState) {
- Assert.isNotNull(taskRepository);
- Assert.isNotNull(task);
- Assert.isNotNull(taskDataState);
- this.task = task;
- this.taskRepository = taskRepository;
- this.workingCopy = taskDataState;
- this.unsavedChanedAttributes = new HashSet<TaskAttribute>();
- }
-
- public void addModelListener(TaskDataModelListener listener) {
- if (listeners == null) {
- listeners = new ArrayList<TaskDataModelListener>();
- }
- listeners.add(listener);
- }
-
- /**
- * Invoke upon change to attribute value.
- *
- * @param attribute
- * changed attribute
- */
- public void attributeChanged(TaskAttribute attribute) {
- if (attribute.getParentAttribute() != getTaskData().getRoot()) {
- throw new RuntimeException(
- "Editing is only supported for attributes that are attached to the root of task data");
- }
-
- unsavedChanedAttributes.add(attribute);
-
- if (this.listeners != null) {
- final TaskDataModelEvent event = new TaskDataModelEvent(this, EventKind.CHANGED, attribute);
- TaskDataModelListener[] listeners = this.listeners.toArray(new TaskDataModelListener[0]);
- for (final TaskDataModelListener listener : listeners) {
- SafeRunner.run(new ISafeRunnable() {
- public void handleException(Throwable e) {
- StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN, "Listener failed", e));
- }
-
- public void run() throws Exception {
- listener.attributeChanged(event);
- }
- });
- }
- }
- }
-
- public Set<TaskAttribute> getChangedAttributes() {
- return new HashSet<TaskAttribute>(workingCopy.getEditsData().getRoot().getAttributes().values());
- }
-
- public Set<TaskAttribute> getChangedOldAttributes() {
- // FIXME implement
- return null;
- }
-
- public ITask getTask() {
- return task;
- }
-
- public TaskData getTaskData() {
- return workingCopy.getLocalData();
- }
-
- public TaskRepository getTaskRepository() {
- return taskRepository;
- }
-
- public boolean hasBeenRead() {
- return workingCopy.getLastReadData() != null;
- }
-
- public boolean hasIncomingChanges(TaskAttribute taskAttribute) {
- TaskData lastReadData = workingCopy.getLastReadData();
- if (lastReadData == null) {
- return true;
- }
-
- if (hasOutgoingChanges(taskAttribute)) {
- return false;
- }
-
- TaskAttribute oldAttribute = lastReadData.getRoot().getMappedAttribute(taskAttribute.getPath());
- if (oldAttribute == null) {
- return true;
- }
-
- return !getTaskData().getAttributeMapper().equals(taskAttribute, oldAttribute);
- }
-
- public boolean hasOutgoingChanges(TaskAttribute taskAttribute) {
- return workingCopy.getEditsData().getRoot().getMappedAttribute(taskAttribute.getPath()) != null;
- }
-
- public boolean isDirty() {
- return unsavedChanedAttributes.size() > 0 || !workingCopy.isSaved();
- }
-
- public void refresh(IProgressMonitor monitor) throws CoreException {
- workingCopy.refresh(monitor);
- }
-
- public void removeModelListener(TaskDataModelListener listener) {
- listeners.remove(listener);
- }
-
- public void revert() {
- workingCopy.revert();
- unsavedChanedAttributes.clear();
- }
-
- public void save(IProgressMonitor monitor) throws CoreException {
- workingCopy.save(unsavedChanedAttributes, monitor);
- unsavedChanedAttributes.clear();
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskDataModelEvent.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskDataModelEvent.java
deleted file mode 100644
index 231141502..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskDataModelEvent.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core.data;
-
-/**
- * @author Steffen Pingel
- * @since 3.0
- */
-public final class TaskDataModelEvent {
-
- public enum EventKind {
- CHANGED
- }
-
- private final EventKind kind;
-
- private final TaskDataModel model;
-
- private final TaskAttribute taskAttribute;;
-
- public TaskDataModelEvent(TaskDataModel model, EventKind kind, TaskAttribute taskAttribute) {
- this.model = model;
- this.kind = kind;
- this.taskAttribute = taskAttribute;
- }
-
- public EventKind getKind() {
- return kind;
- }
-
- public TaskDataModel getModel() {
- return model;
- }
-
- public TaskAttribute getTaskAttribute() {
- return taskAttribute;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskDataModelListener.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskDataModelListener.java
deleted file mode 100644
index 72d47d42c..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskDataModelListener.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core.data;
-
-/**
- * @author Steffen Pingel
- * @since 3.0
- */
-public abstract class TaskDataModelListener {
-
- public abstract void attributeChanged(TaskDataModelEvent event);
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskMapper.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskMapper.java
deleted file mode 100644
index f3501085c..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskMapper.java
+++ /dev/null
@@ -1,402 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core.data;
-
-import java.util.Date;
-import java.util.List;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITaskMapping;
-import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
-
-/**
- * @author Steffen Pingel
- * @since 3.0
- */
-public class TaskMapper implements ITaskMapping {
-
- private final boolean createNonExistingAttributes;
-
- private final TaskData taskData;
-
- public TaskMapper(TaskData taskData) {
- this(taskData, false);
- }
-
- public TaskMapper(TaskData taskData, boolean createNonExistingAttributes) {
- this.createNonExistingAttributes = createNonExistingAttributes;
- Assert.isNotNull(taskData);
- this.taskData = taskData;
- }
-
- public boolean applyTo(ITask task) {
- boolean changed = false;
- if (hasChanges(task.getCompletionDate(), TaskAttribute.DATE_COMPLETION)) {
- task.setCompletionDate(getCompletionDate());
- changed = true;
- }
- if (hasChanges(task.getCreationDate(), TaskAttribute.DATE_CREATION)) {
- task.setCreationDate(getCreationDate());
- changed = true;
- }
- if (hasChanges(task.getModificationDate(), TaskAttribute.DATE_MODIFICATION)) {
- task.setModificationDate(getModificationDate());
- changed = true;
- }
- if (hasChanges(task.getDueDate(), TaskAttribute.DATE_DUE)) {
- task.setDueDate(getDueDate());
- changed = true;
- }
- if (hasChanges(task.getOwner(), TaskAttribute.USER_ASSIGNED)) {
- task.setOwner(getOwner());
- changed = true;
- }
- if (hasChanges(task.getPriority(), TaskAttribute.PRIORITY)) {
- if (getPriority() != null) {
- task.setPriority(getPriority().toString());
- } else {
- task.setPriority(PriorityLevel.getDefault().toString());
- }
- changed = true;
- }
- if (hasChanges(task.getSummary(), TaskAttribute.SUMMARY)) {
- task.setSummary(getSummary());
- changed = true;
- }
- if (hasChanges(task.getTaskKey(), TaskAttribute.TASK_KEY)) {
- task.setTaskKey(getTaskKey());
- changed = true;
- }
- if (hasChanges(task.getTaskKind(), TaskAttribute.TASK_KIND)) {
- task.setTaskKind(getTaskKind());
- changed = true;
- }
- if (hasChanges(task.getUrl(), TaskAttribute.TASK_URL)) {
- task.setUrl(getTaskUrl());
- changed = true;
- }
- return changed;
- }
-
- private boolean areEquals(Object existingProperty, Object newProperty) {
- return (existingProperty != null) ? !existingProperty.equals(newProperty) : newProperty != null;
- }
-
- private void copyAttributeValue(TaskAttribute sourceAttribute, TaskAttribute targetAttribute) {
- if (targetAttribute == null) {
- return;
- }
- if (!sourceAttribute.getMetaData().isReadOnly() && !targetAttribute.getMetaData().isReadOnly()) {
- targetAttribute.clearValues();
- if (targetAttribute.getOptions().size() > 0) {
- List<String> values = sourceAttribute.getValues();
- for (String value : values) {
- if (targetAttribute.getOptions().containsValue(value)) {
- targetAttribute.addValue(value);
- }
- }
- } else {
- List<String> values = sourceAttribute.getValues();
- for (String value : values) {
- targetAttribute.addValue(value);
- }
- }
- }
- }
-
- /**
- * TODO update comment
- *
- * Sets attribute values from <code>sourceTaskData</code> on <code>targetTaskData</code>. Sets the following
- * attributes:
- * <ul>
- * <li>summary
- * <li>description
- * </ul>
- * Other attribute values are only set if they exist on <code>sourceTaskData</code> and <code>targetTaskData</code>.
- *
- * @param sourceTaskData
- * the source task data values are copied from, the connector kind of repository of
- * <code>sourceTaskData</code> can be different from <code>targetTaskData</code>
- * @param targetTaskData
- * the target task data values are copied to, the connector kind matches the one of this task data
- * handler
- * @since 2.2
- */
- public void copyFrom(ITaskMapping source) {
- if (source.getTaskData() != null && this.getTaskData() != null
- && source.getTaskData().equals(this.getTaskData().getConnectorKind())) {
- // task data objects are from the same connector, copy all attributes
- for (TaskAttribute sourceAttribute : source.getTaskData().getRoot().getAttributes().values()) {
- copyAttributeValue(sourceAttribute, this.getTaskData().getRoot().getAttribute(sourceAttribute.getId()));
- }
- } else {
- if (source.getCc() != null) {
- setCc(source.getCc());
- }
- if (source.getDescription() != null) {
- setDescription(source.getDescription());
- }
- if (source.getComponent() != null) {
- setComponent(source.getComponent());
- }
- if (source.getKeywords() != null) {
- setKeywords(source.getKeywords());
- }
- if (source.getOwner() != null) {
- setOwner(source.getOwner());
- }
- if (source.getPriority() != null) {
- setPriority(source.getPriority());
- }
- if (source.getProduct() != null) {
- setProduct(source.getProduct());
- }
- if (source.getSummary() != null) {
- setSummary(source.getSummary());
- }
-
- }
- }
-
- private TaskAttribute createAttribute(String attributeKey) {
- attributeKey = taskData.getAttributeMapper().mapToRepositoryKey(taskData.getRoot(), attributeKey);
- TaskAttribute attribute = taskData.getRoot().createAttribute(attributeKey);
- return attribute;
- }
-
- public List<String> getCc() {
- return getValues(TaskAttribute.USER_CC);
- }
-
- public Date getCompletionDate() {
- return getDateValue(TaskAttribute.DATE_COMPLETION);
- }
-
- public String getComponent() {
- return getValue(TaskAttribute.COMPONENT);
- }
-
- public Date getCreationDate() {
- return getDateValue(TaskAttribute.DATE_CREATION);
- }
-
- private Date getDateValue(String attributeKey) {
- TaskAttribute attribute = taskData.getRoot().getMappedAttribute(attributeKey);
- if (attribute != null) {
- return taskData.getAttributeMapper().getDateValue(attribute);
- }
- return null;
- }
-
- public String getDescription() {
- return getValue(TaskAttribute.DESCRIPTION);
- }
-
- public Date getDueDate() {
- return getDateValue(TaskAttribute.DATE_DUE);
- }
-
- public List<String> getKeywords() {
- return getValues(TaskAttribute.KEYWORDS);
- }
-
- private TaskAttribute getMappedAttribute(String attributeKey) {
- TaskAttribute attribute = taskData.getRoot().getMappedAttribute(attributeKey);
- if (createNonExistingAttributes && attribute == null) {
- attribute = createAttribute(attributeKey);
- }
- return attribute;
- }
-
- public Date getModificationDate() {
- return getDateValue(TaskAttribute.DATE_MODIFICATION);
- }
-
- public String getOwner() {
- return getValue(TaskAttribute.USER_ASSIGNED);
- }
-
- public PriorityLevel getPriority() {
- String value = getValue(TaskAttribute.PRIORITY);
- return (value != null) ? PriorityLevel.fromString(value) : null;
- }
-
- public String getProduct() {
- return getValue(TaskAttribute.PRODUCT);
- }
-
- public String getReporter() {
- return getValue(TaskAttribute.USER_REPORTER);
- }
-
- public String getResolution() {
- return getValue(TaskAttribute.RESOLUTION);
- }
-
- public String getSummary() {
- return getValue(TaskAttribute.SUMMARY);
- }
-
- public TaskData getTaskData() {
- return taskData;
- }
-
- public String getTaskKey() {
- return getValue(TaskAttribute.TASK_KEY);
- }
-
- public String getTaskKind() {
- return getValue(TaskAttribute.TASK_KIND);
- }
-
- public String getTaskStatus() {
- return getValue(TaskAttribute.STATUS);
- }
-
- public String getTaskUrl() {
- return getValue(TaskAttribute.TASK_URL);
- }
-
- private String getValue(String attributeKey) {
- TaskAttribute attribute = taskData.getRoot().getMappedAttribute(attributeKey);
- if (attribute != null) {
- return taskData.getAttributeMapper().getValueLabel(attribute);
- }
- return null;
- }
-
- private List<String> getValues(String attributeKey) {
- TaskAttribute attribute = taskData.getRoot().getMappedAttribute(attributeKey);
- if (attribute != null) {
- return taskData.getAttributeMapper().getValueLabels(attribute);
- }
- return null;
- }
-
- public boolean hasChanges(ITask task) {
- boolean changed = false;
- changed |= hasChanges(task.getCompletionDate(), TaskAttribute.DATE_COMPLETION);
- changed |= hasChanges(task.getCreationDate(), TaskAttribute.DATE_CREATION);
- changed |= hasChanges(task.getModificationDate(), TaskAttribute.DATE_MODIFICATION);
- changed |= hasChanges(task.getDueDate(), TaskAttribute.DATE_DUE);
- changed |= hasChanges(task.getOwner(), TaskAttribute.USER_ASSIGNED);
- changed |= hasChanges(task.getPriority(), TaskAttribute.PRIORITY);
- changed |= hasChanges(task.getSummary(), TaskAttribute.SUMMARY);
- changed |= hasChanges(task.getTaskKey(), TaskAttribute.TASK_KEY);
- changed |= hasChanges(task.getTaskKind(), TaskAttribute.TASK_KIND);
- changed |= hasChanges(task.getUrl(), TaskAttribute.TASK_URL);
- return changed;
- }
-
- private boolean hasChanges(Object value, String attributeKey) {
- TaskAttribute attribute = taskData.getRoot().getMappedAttribute(attributeKey);
- if (attribute != null) {
- if (TaskAttribute.TYPE_BOOLEAN.equals(attribute.getMetaData().getType())) {
- return areEquals(value, taskData.getAttributeMapper().getBooleanValue(attribute));
- } else if (TaskAttribute.TYPE_DATE.equals(attribute.getMetaData().getType())) {
- return areEquals(value, taskData.getAttributeMapper().getDateValue(attribute));
- } else if (TaskAttribute.TYPE_INTEGER.equals(attribute.getMetaData().getType())) {
- return areEquals(value, taskData.getAttributeMapper().getIntegerValue(attribute));
- } else {
- return areEquals(value, taskData.getAttributeMapper().getValue(attribute));
- }
- }
- return false;
- }
-
- public void setCc(List<String> cc) {
- setValues(TaskAttribute.USER_CC, cc);
- }
-
- public void setCompletionDate(Date dateCompleted) {
- setDateValue(TaskAttribute.DATE_COMPLETION, dateCompleted);
- }
-
- public void setComponent(String component) {
- setValue(TaskAttribute.COMPONENT, component);
- }
-
- public void setCreationDate(Date dateCreated) {
- setDateValue(TaskAttribute.DATE_CREATION, dateCreated);
- }
-
- private TaskAttribute setDateValue(String attributeKey, Date value) {
- TaskAttribute attribute = getMappedAttribute(attributeKey);
- if (attribute != null) {
- taskData.getAttributeMapper().setDateValue(attribute, value);
- }
- return attribute;
- }
-
- public void setDescription(String description) {
- setValue(TaskAttribute.DESCRIPTION, description);
- }
-
- public void setDueDate(Date value) {
- setDateValue(TaskAttribute.DATE_DUE, value);
- }
-
- public void setKeywords(List<String> keywords) {
- setValues(TaskAttribute.KEYWORDS, keywords);
- }
-
- public void setModificationDate(Date dateModified) {
- setDateValue(TaskAttribute.DATE_MODIFICATION, dateModified);
- }
-
- // TODO use Person class?
- public void setOwner(String owner) {
- setValue(TaskAttribute.USER_ASSIGNED, owner);
- }
-
- public void setPriority(PriorityLevel priority) {
- setValue(TaskAttribute.PRIORITY, priority.toString());
- }
-
- public void setProduct(String product) {
- setValue(TaskAttribute.PRODUCT, product);
- }
-
- // TODO use Person class?
- public void setReporter(String reporter) {
- setValue(TaskAttribute.USER_REPORTER, reporter);
- }
-
- public void setSummary(String summary) {
- setValue(TaskAttribute.SUMMARY, summary);
- }
-
- public void setTaskKind(String taskKind) {
- setValue(TaskAttribute.TASK_KIND, taskKind);
- }
-
- public void setTaskUrl(String taskUrl) {
- setValue(TaskAttribute.TASK_URL, taskUrl);
- }
-
- private TaskAttribute setValue(String attributeKey, String value) {
- TaskAttribute attribute = getMappedAttribute(attributeKey);
- if (attribute != null) {
- taskData.getAttributeMapper().setValue(attribute, value);
- }
- return attribute;
-
- }
-
- private TaskAttribute setValues(String attributeKey, List<String> values) {
- TaskAttribute attribute = getMappedAttribute(attributeKey);
- if (attribute != null) {
- taskData.getAttributeMapper().setValues(attribute, values);
- }
- return attribute;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskOperation.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskOperation.java
deleted file mode 100644
index d89bb183f..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskOperation.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core.data;
-
-import org.eclipse.core.runtime.Assert;
-
-/**
- * @author Rob Elves
- * @author Steffen Pingel
- * @since 3.0
- */
-public class TaskOperation {
-
- public static void applyTo(TaskAttribute taskAttribute, String operationId, String label) {
- TaskData taskData = taskAttribute.getTaskData();
- taskData.getAttributeMapper().setValue(taskAttribute, operationId);
- taskAttribute.getMetaData().defaults().setType(TaskAttribute.TYPE_OPERATION).setLabel(label);
- }
-
- public static TaskOperation createFrom(TaskAttribute taskAttribute) {
- Assert.isNotNull(taskAttribute);
- TaskData taskData = taskAttribute.getTaskData();
- TaskOperation operation = new TaskOperation(taskData.getRepositoryUrl(), taskData.getConnectorKind(),
- taskData.getTaskId(), taskAttribute.getValue());
- operation.setLabel(taskAttribute.getMetaData().getLabel());
- operation.setTaskAttribute(taskAttribute);
- return operation;
- }
-
- private final String connectorKind;
-
- private String label;
-
- private final String operationId;
-
- private final String repositoryUrl;
-
- private TaskAttribute taskAttribute;
-
- private final String taskId;
-
- public TaskOperation(String connectorKind, String repositoryUrl, String taskId, String operationId) {
- Assert.isNotNull(connectorKind);
- Assert.isNotNull(repositoryUrl);
- Assert.isNotNull(taskId);
- Assert.isNotNull(operationId);
- this.connectorKind = connectorKind;
- this.repositoryUrl = repositoryUrl;
- this.taskId = taskId;
- this.operationId = operationId;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj) {
- return true;
- }
- if (obj == null) {
- return false;
- }
- if (getClass() != obj.getClass()) {
- return false;
- }
- TaskOperation other = (TaskOperation) obj;
- if (!connectorKind.equals(other.connectorKind)) {
- return false;
- }
- if (!operationId.equals(other.operationId)) {
- return false;
- }
- if (!repositoryUrl.equals(other.repositoryUrl)) {
- return false;
- }
- if (!taskId.equals(other.taskId)) {
- return false;
- }
- return true;
- }
-
- public String getConnectorKind() {
- return connectorKind;
- }
-
- public String getLabel() {
- return label;
- }
-
- public String getOperationId() {
- return operationId;
- }
-
- public String getRepositoryUrl() {
- return repositoryUrl;
- }
-
- public TaskAttribute getTaskAttribute() {
- return taskAttribute;
- }
-
- public String getTaskId() {
- return taskId;
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + connectorKind.hashCode();
- result = prime * result + operationId.hashCode();
- result = prime * result + repositoryUrl.hashCode();
- result = prime * result + taskId.hashCode();
- return result;
- }
-
- public void setLabel(String label) {
- this.label = label;
- }
-
- public void setTaskAttribute(TaskAttribute taskAttribute) {
- this.taskAttribute = taskAttribute;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskRelation.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskRelation.java
deleted file mode 100644
index 5f991a8b8..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskRelation.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core.data;
-
-import org.eclipse.core.runtime.Assert;
-
-/**
- * @author Steffen Pingel
- * @since 3.0
- */
-public class TaskRelation {
-
- private final String taskId;
-
- private final Kind kind;
-
- private final Direction direction;
-
- public enum Direction {
- INWARD, OUTWARD
- };
-
- public enum Kind {
- CONTAINMENT, DEPENDENCY, DUPLICATE
- }
-
- private TaskRelation(Kind kind, Direction direction, String taskId) {
- Assert.isNotNull(kind);
- Assert.isNotNull(direction);
- Assert.isNotNull(taskId);
- this.kind = kind;
- this.direction = direction;
- this.taskId = taskId;
- }
-
- public String getTaskId() {
- return taskId;
- }
-
- public Kind getKind() {
- return kind;
- }
-
- public Direction getDirection() {
- return direction;
- }
-
- public static TaskRelation parentTask(String taskId) {
- return new TaskRelation(Kind.CONTAINMENT, Direction.INWARD, taskId);
- }
-
- public static TaskRelation subtask(String taskId) {
- return new TaskRelation(Kind.CONTAINMENT, Direction.OUTWARD, taskId);
- }
-
- public static TaskRelation dependency(String taskId, Direction direction) {
- return new TaskRelation(Kind.DEPENDENCY, direction, taskId);
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/sync/ISynchronizationSession.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/sync/ISynchronizationSession.java
deleted file mode 100644
index e5b4c7808..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/sync/ISynchronizationSession.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core.sync;
-
-import java.util.Set;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.data.ITaskDataManager;
-import org.eclipse.mylyn.tasks.core.data.TaskData;
-
-/**
- * @since 3.0
- * @author Steffen Pingel
- */
-public interface ISynchronizationSession {
-
- public abstract Set<ITask> getChangedTasks();
-
- public abstract Object getData();
-
- public abstract ITaskDataManager getTaskDataManager();
-
- public abstract TaskRepository getTaskRepository();
-
- public abstract Set<ITask> getTasks();
-
- public abstract boolean isFullSynchronization();
-
- public abstract boolean isUser();
-
- public abstract boolean needsPerformQueries();
-
- public abstract void setData(Object data);
-
- public abstract void setNeedsPerformQueries(boolean performQueries);
-
- public abstract void markStale(ITask task);
-
- public abstract void putTaskData(ITask task, TaskData taskData) throws CoreException;
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/sync/SubmitJob.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/sync/SubmitJob.java
deleted file mode 100644
index 7f841d291..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/sync/SubmitJob.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core.sync;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.ISafeRunnable;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.SafeRunner;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.commons.net.Policy;
-import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
-import org.eclipse.mylyn.tasks.core.ITask;
-
-/**
- * @author Steffen Pingel
- * @since 3.0
- */
-public abstract class SubmitJob extends TaskJob {
-
- private final List<SubmitJobListener> submitJobListeners = Collections.synchronizedList(new ArrayList<SubmitJobListener>());
-
- public SubmitJob(String name) {
- super(name);
- }
-
- public void addSubmitJobListener(SubmitJobListener listener) {
- submitJobListeners.add(listener);
- }
-
- public void removeSubmitJobListener(SubmitJobListener listener) {
- submitJobListeners.remove(listener);
- }
-
- protected SubmitJobListener[] getSubmitJobListeners() {
- return submitJobListeners.toArray(new SubmitJobListener[0]);
- }
-
- protected void fireTaskSubmitted(final IProgressMonitor monitor) throws CoreException {
- SubmitJobListener[] listeners = submitJobListeners.toArray(new SubmitJobListener[0]);
- if (listeners.length > 0) {
- final SubmitJobEvent event = new SubmitJobEvent(this);
- for (final SubmitJobListener listener : listeners) {
- listener.taskSubmitted(event, Policy.subMonitorFor(monitor, 100));
- }
- }
- }
-
- protected void fireTaskSynchronized(final IProgressMonitor monitor) throws CoreException {
- SubmitJobListener[] listeners = submitJobListeners.toArray(new SubmitJobListener[0]);
- if (listeners.length > 0) {
- final SubmitJobEvent event = new SubmitJobEvent(this);
- for (final SubmitJobListener listener : listeners) {
- listener.taskSynchronized(event, Policy.subMonitorFor(monitor, 100));
- }
- }
- }
-
- protected void fireDone() {
- SubmitJobListener[] listeners = submitJobListeners.toArray(new SubmitJobListener[0]);
- if (listeners.length > 0) {
- final SubmitJobEvent event = new SubmitJobEvent(this);
- for (final SubmitJobListener listener : listeners) {
- SafeRunner.run(new ISafeRunnable() {
- public void handleException(Throwable e) {
- StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN, "Listener failed", e));
- }
-
- public void run() throws Exception {
- listener.done(event);
- }
- });
- }
- }
- }
-
- public abstract ITask getTask();
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/sync/SubmitJobEvent.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/sync/SubmitJobEvent.java
deleted file mode 100644
index 3cb5ec2f0..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/sync/SubmitJobEvent.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core.sync;
-
-/**
- * @author Steffen Pingel
- * @since 3.0
- */
-public class SubmitJobEvent {
-
- private final SubmitJob job;
-
- public SubmitJobEvent(SubmitJob job) {
- this.job = job;
- }
-
- public SubmitJob getJob() {
- return job;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/sync/SubmitJobListener.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/sync/SubmitJobListener.java
deleted file mode 100644
index c9d14b4c1..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/sync/SubmitJobListener.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core.sync;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * @author Steffen Pingel
- * @since 3.0
- */
-public abstract class SubmitJobListener {
-
- public abstract void taskSubmitted(SubmitJobEvent event, IProgressMonitor monitor) throws CoreException;
-
- public abstract void taskSynchronized(SubmitJobEvent event, IProgressMonitor monitor) throws CoreException;
-
- public abstract void done(SubmitJobEvent event);
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/sync/SynchronizationJob.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/sync/SynchronizationJob.java
deleted file mode 100644
index 8a48ed7cf..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/sync/SynchronizationJob.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core.sync;
-
-import org.eclipse.core.runtime.jobs.Job;
-
-/**
- * @author Steffen Pingel
- * @since 3.0
- */
-public abstract class SynchronizationJob extends Job {
-
-// private boolean changedTasksSynchronization = true;
-
- private boolean fullSynchronization = false;
-
- public SynchronizationJob(String name) {
- super(name);
- }
-
-// public boolean isChangedTasksSynchronization() {
-// return changedTasksSynchronization;
-// }
-
- public boolean isFullSynchronization() {
- return fullSynchronization;
- }
-
-// public void setChangedTasksSynchronization(boolean synchronizeChangedTasks) {
-// this.changedTasksSynchronization = synchronizeChangedTasks;
-// }
-
- public void setFullSynchronization(boolean fullSynchronization) {
- this.fullSynchronization = fullSynchronization;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/sync/TaskJob.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/sync/TaskJob.java
deleted file mode 100644
index 0af04b3e5..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/sync/TaskJob.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.core.sync;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.jobs.Job;
-
-/**
- * @author Steffen Pingel
- * @since 3.0
- */
-public abstract class TaskJob extends Job {
-
- public TaskJob(String name) {
- super(name);
- }
-
- public abstract IStatus getStatus();
-
-}
diff --git a/org.eclipse.mylyn.tasks.tests/.classpath b/org.eclipse.mylyn.tasks.tests/.classpath
deleted file mode 100644
index 77f8017a9..000000000
--- a/org.eclipse.mylyn.tasks.tests/.classpath
+++ /dev/null
@@ -1,16 +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="accessible" pattern="org/eclipse/mylyn/**"/>
- <accessrule kind="accessible" pattern="**/internal/**"/>
- </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.tasks.tests/.cvsignore b/org.eclipse.mylyn.tasks.tests/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/org.eclipse.mylyn.tasks.tests/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/org.eclipse.mylyn.tasks.tests/.project b/org.eclipse.mylyn.tasks.tests/.project
deleted file mode 100644
index 7098e8761..000000000
--- a/org.eclipse.mylyn.tasks.tests/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.mylyn.tasks.tests</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/org.eclipse.mylyn.tasks.tests/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.mylyn.tasks.tests/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index f88bf7b83..000000000
--- a/org.eclipse.mylyn.tasks.tests/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,340 +0,0 @@
-#Tue May 20 10:54:29 PDT 2008
-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=ignore
-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=ignore
-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,NORMAL
-org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,API
-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=false
-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.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.tasks.tests/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.mylyn.tasks.tests/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 5e70d0848..000000000
--- a/org.eclipse.mylyn.tasks.tests/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,63 +0,0 @@
-#Sat Mar 01 03:38:47 PST 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">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*******************************************************************************\n * Copyright (c) 2004, 2007 Mylyn project committers and others.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *******************************************************************************/\n\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ignore\n${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ignore</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created JavaScript files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for vars" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Jsdoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created function stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated function stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_methods=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=true
-sp_cleanup.correct_indentation=true
-sp_cleanup.format_source_code=true
-sp_cleanup.format_source_code_changes_only=false
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=true
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=true
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=true
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=true
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=true
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/org.eclipse.mylyn.tasks.tests/.settings/org.eclipse.ltk.core.refactoring.prefs b/org.eclipse.mylyn.tasks.tests/.settings/org.eclipse.ltk.core.refactoring.prefs
deleted file mode 100644
index 7ab03bdac..000000000
--- a/org.eclipse.mylyn.tasks.tests/.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.tasks.tests/.settings/org.eclipse.mylyn.tasklist.prefs b/org.eclipse.mylyn.tasks.tests/.settings/org.eclipse.mylyn.tasklist.prefs
deleted file mode 100644
index 0a2cc0b30..000000000
--- a/org.eclipse.mylyn.tasks.tests/.settings/org.eclipse.mylyn.tasklist.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Mon Jun 18 17:14:59 PDT 2007
-eclipse.preferences.version=1
-project.repository.kind=bugzilla
-project.repository.url=https\://bugs.eclipse.org/bugs
diff --git a/org.eclipse.mylyn.tasks.tests/.settings/org.eclipse.mylyn.tasks.ui.prefs b/org.eclipse.mylyn.tasks.tests/.settings/org.eclipse.mylyn.tasks.ui.prefs
deleted file mode 100644
index d8c6d26af..000000000
--- a/org.eclipse.mylyn.tasks.tests/.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.tasks.tests/.settings/org.eclipse.pde.api.tools.prefs b/org.eclipse.mylyn.tasks.tests/.settings/org.eclipse.pde.api.tools.prefs
deleted file mode 100644
index 606a24aa3..000000000
--- a/org.eclipse.mylyn.tasks.tests/.settings/org.eclipse.pde.api.tools.prefs
+++ /dev/null
@@ -1,151 +0,0 @@
-#Tue May 20 10:45:34 PDT 2008
-ANNOTATION_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
-ANNOTATION_ELEMENT_TYPE_ADDED_FIELD=Error
-ANNOTATION_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
-ANNOTATION_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error
-ANNOTATION_ELEMENT_TYPE_ADDED_METHOD=Error
-ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
-ANNOTATION_ELEMENT_TYPE_ADDED_TYPE_MEMBER=Error
-ANNOTATION_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-ANNOTATION_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
-ANNOTATION_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
-ANNOTATION_ELEMENT_TYPE_CHANGED_INTERFACE_BOUNDS=Error
-ANNOTATION_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Error
-ANNOTATION_ELEMENT_TYPE_CHANGED_TO_CLASS=Error
-ANNOTATION_ELEMENT_TYPE_CHANGED_TO_ENUM=Error
-ANNOTATION_ELEMENT_TYPE_CHANGED_TO_INTERFACE=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD_WITHOUT_DEFAULT_VALUE=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD_WITH_DEFAULT_VALUE=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
-API_PROFILE_ELEMENT_TYPE_REMOVED_API_COMPONENT=Error
-CLASS_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
-CLASS_ELEMENT_TYPE_ADDED_FIELD=Error
-CLASS_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
-CLASS_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error
-CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
-CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CLASS_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
-CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERCLASS_SET=Error
-CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CLASS_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-CLASS_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Error
-CLASS_ELEMENT_TYPE_CHANGED_SUPERCLASS=Error
-CLASS_ELEMENT_TYPE_CHANGED_TO_ANNOTATION=Error
-CLASS_ELEMENT_TYPE_CHANGED_TO_ENUM=Error
-CLASS_ELEMENT_TYPE_CHANGED_TO_INTERFACE=Error
-CLASS_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
-CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
-CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
-CLASS_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
-CLASS_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Error
-CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Error
-CONSTRUCTOR_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
-CONSTRUCTOR_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
-CONSTRUCTOR_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error
-CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-CONSTRUCTOR_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
-CONSTRUCTOR_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
-CONSTRUCTOR_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
-CONSTRUCTOR_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Error
-CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Error
-ENUM_ELEMENT_TYPE_ADDED_FIELD=Error
-ENUM_ELEMENT_TYPE_ADDED_METHOD=Error
-ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-ENUM_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Error
-ENUM_ELEMENT_TYPE_CHANGED_TO_ANNOTATION=Error
-ENUM_ELEMENT_TYPE_CHANGED_TO_CLASS=Error
-ENUM_ELEMENT_TYPE_CHANGED_TO_INTERFACE=Error
-ENUM_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
-ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
-ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
-ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
-ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
-FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
-FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
-FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENTS=Error
-FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
-ILLEGAL_EXTEND=Warning
-ILLEGAL_IMPLEMENT=Warning
-ILLEGAL_INSTANTIATE=Warning
-ILLEGAL_OVERRIDE=Warning
-ILLEGAL_REFERENCE=Warning
-INTERFACE_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
-INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
-INTERFACE_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_TYPE_MEMBER=Error
-INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETERS=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_INTERFACE_BOUNDS=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_TO_ANNOTATION=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_TO_CLASS=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_TO_ENUM=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-INVALID_JAVADOC_TAG=Ignore
-LEAK_EXTEND=Warning
-LEAK_FIELD_DECL=Warning
-LEAK_IMPLEMENT=Warning
-LEAK_METHOD_PARAM=Warning
-LEAK_METHOD_RETURN_TYPE=Warning
-METHOD_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
-METHOD_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
-METHOD_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error
-METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-METHOD_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
-METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-METHOD_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_TYPE_PARAMETER=Error
-METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
-METHOD_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
-METHOD_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
-METHOD_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Error
-METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Error
-eclipse.preferences.version=1
-incompatible_api_component_version=Error
-invalid_since_tag_version=Error
-malformed_since_tag=Error
-missing_since_tag=Error
diff --git a/org.eclipse.mylyn.tasks.tests/.settings/org.eclipse.pde.prefs b/org.eclipse.mylyn.tasks.tests/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index e8f2d5620..000000000
--- a/org.eclipse.mylyn.tasks.tests/.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.tasks.tests/META-INF/MANIFEST.MF b/org.eclipse.mylyn.tasks.tests/META-INF/MANIFEST.MF
deleted file mode 100644
index 45699e5ca..000000000
--- a/org.eclipse.mylyn.tasks.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,38 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Mylyn Tasks Tests
-Bundle-SymbolicName: org.eclipse.mylyn.tasks.tests;singleton:=true
-Bundle-Version: 0.0.0
-Bundle-Activator: org.eclipse.mylyn.tasks.tests.TasksTestsPlugin
-Bundle-Vendor: Eclipse.org
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.core.net,
- org.junit,
- org.eclipse.mylyn.context.core,
- org.eclipse.mylyn.context.tests,
- org.eclipse.jdt.core,
- org.eclipse.core.resources,
- org.eclipse.ui,
- org.eclipse.mylyn.tasks.ui,
- org.eclipse.mylyn.context.ui,
- org.eclipse.mylyn.tasks.core,
- org.eclipse.mylyn.monitor.ui,
- org.eclipse.ui.forms,
- org.eclipse.mylyn.resources.tests,
- org.eclipse.mylyn.web.tasks,
- org.eclipse.mylyn.monitor.core,
- org.eclipse.mylyn.commons.net,
- org.eclipse.jface.text,
- org.eclipse.test.performance,
- org.eclipse.ui.ide,
- org.eclipse.mylyn.tasks.bugs,
- org.eclipse.mylyn.commons.core,
- org.eclipse.ui.browser
-Bundle-ActivationPolicy: lazy
-Bundle-ClassPath: mylyn-tasklist-tests.jar
-Export-Package: org.eclipse.mylyn.tasks.tests;x-internal:=true,
- org.eclipse.mylyn.tasks.tests.connector;x-internal:=true,
- org.eclipse.mylyn.tasks.tests.data;x-internal:=true,
- org.eclipse.mylyn.tasks.tests.performance;x-internal:=true,
- org.eclipse.mylyn.tasks.tests.web;x-internal:=true
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/org.eclipse.mylyn.tasks.tests/about.html b/org.eclipse.mylyn.tasks.tests/about.html
deleted file mode 100644
index 0dd939c09..000000000
--- a/org.eclipse.mylyn.tasks.tests/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 7, 2007</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.tasks.tests/build.properties b/org.eclipse.mylyn.tasks.tests/build.properties
deleted file mode 100644
index f2fb7265e..000000000
--- a/org.eclipse.mylyn.tasks.tests/build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2004, 2006 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 = META-INF/,\
- mylyn-tasklist-tests.jar,\
- about.html,\
- plugin.xml,\
- testdata/
-jars.compile.order = mylyn-tasklist-tests.jar
-source.mylyn-tasklist-tests.jar = src/
-output.mylyn-tasklist-tests.jar = bin/
-src.includes = about.html
-jre.compilation.profile = J2SE-1.5
diff --git a/org.eclipse.mylyn.tasks.tests/plugin.xml b/org.eclipse.mylyn.tasks.tests/plugin.xml
deleted file mode 100644
index 490968b7d..000000000
--- a/org.eclipse.mylyn.tasks.tests/plugin.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
-
- <extension
- id="org.eclipse.mylyn.jira.repository"
- name="JIRA Repository"
- point="org.eclipse.mylyn.tasks.ui.repositories">
-
- <connectorCore
- class="org.eclipse.mylyn.tasks.tests.connector.MockRepositoryConnector"
- id="org.eclipse.mylyn.tasks.tests.repositories"
- name="Mock Repository Client"/>
-
- <taskListFactory
- class="org.eclipse.mylyn.tasks.tests.connector.MockTaskListFactory"
- id="org.eclipse.mylyn.tasks.tests.factory"/>
- <connectorUi
- class="org.eclipse.mylyn.tasks.tests.connector.MockRepositoryConnectorUi"
- id="org.eclipse.mylyn.tasks.tests.repositories.ui"
- name="Mock Repository Connector UI">
- </connectorUi>
- </extension>
-
-</plugin>
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AbstractTaskContainerTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AbstractTaskContainerTest.java
deleted file mode 100644
index 202ff8ef0..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AbstractTaskContainerTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.tasks.tests.connector.MockTask;
-
-public class AbstractTaskContainerTest extends TestCase {
-
- public void testGetChildren() {
- MockTask task1 = new MockTask("1");
- MockTask task2 = new MockTask("2");
- MockTask task3 = new MockTask("3");
- MockTask task4 = new MockTask("4");
-
- task1.internalAddChild(task2);
- task2.internalAddChild(task3);
- task3.internalAddChild(task1);
- task3.internalAddChild(task4);
-
- assertTrue(task1.contains(task4.getHandleIdentifier()));
- assertTrue(task3.contains(task4.getHandleIdentifier()));
- assertFalse(task3.contains("abc"));
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AbstractTaskDataHandlerTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AbstractTaskDataHandlerTest.java
deleted file mode 100644
index c920b20a1..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AbstractTaskDataHandlerTest.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractAttributeFactory;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractTaskDataHandler;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskAttribute;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-/**
- * @author Steffen Pingel
- */
-public class AbstractTaskDataHandlerTest extends TestCase {
-
- private StubTaskDataHandler handler;
-
- private StubAttributeFactory factory;
-
- private RepositoryTaskData source;
-
- private RepositoryTaskData target;
-
- @Override
- protected void setUp() throws Exception {
- handler = new StubTaskDataHandler();
-
- factory = new StubAttributeFactory();
- source = new RepositoryTaskData(factory, "kind", "http://url", "1");
- target = new RepositoryTaskData(factory, "kind", "http://url", "2");
- }
-
- public void testCloneTaskCloneCommonAttributes() {
- source.setDescription("sourceDescription");
- handler.cloneTaskData(source, target);
- assertEquals("sourceDescription", target.getDescription());
- assertEquals("", target.getSummary());
-
- source.setSummary("sourceSummary");
- handler.cloneTaskData(source, target);
- assertEquals("sourceSummary", target.getSummary());
- }
-
- public void testCloneTaskDataAttributeWithValues() {
- source.addAttributeValue("key1", "value1");
- handler.cloneTaskData(source, target);
- assertEquals(null, target.getAttribute("key1"));
-
- target.setAttributeValue("key1", "value2");
- handler.cloneTaskData(source, target);
- assertEquals("value1", target.getAttributeValue("key1"));
-
- target.addAttributeValue("multi", "v1");
- target.addAttributeValue("multi", "v2");
- handler.cloneTaskData(source, target);
- assertEquals("value1", target.getAttributeValue("key1"));
- List<String> values = target.getAttributeValues("multi");
- assertEquals(2, values.size());
- assertEquals("v1", values.get(0));
- assertEquals("v2", values.get(1));
- }
-
- public void testCloneTaskDataAttributeWithOptions() {
- source.addAttributeValue("key", "o2");
- RepositoryTaskAttribute sourceAttribute = source.getAttribute("key");
- sourceAttribute.addOption("o1", "");
- sourceAttribute.addOption("o2", "");
- target.setAttributeValue("key", "");
- handler.cloneTaskData(source, target);
- assertEquals("o2", target.getAttributeValue("key"));
-
- // test target with options that don't contain
- RepositoryTaskAttribute targetAttribute = target.getAttribute("key");
- targetAttribute.addOption("o3", "");
- handler.cloneTaskData(source, target);
- assertEquals("", target.getAttributeValue("key"));
-
- // test target with options that contain value
- targetAttribute.addOption("o2", "");
- handler.cloneTaskData(source, target);
- assertEquals("o2", target.getAttributeValue("key"));
-
- // test multiple values
- sourceAttribute.addValue("o3");
- handler.cloneTaskData(source, target);
- List<String> values = targetAttribute.getValues();
- assertEquals(2, values.size());
- assertEquals("o2", values.get(0));
- assertEquals("o3", values.get(1));
- }
-
- public void testCloneTaskDifferentRepositoryTypesCloneCommonAttributes() {
- StubAttributeFactory targetFactory = new StubAttributeFactory();
- target = new RepositoryTaskData(targetFactory, "otherkind", "http://url", "2");
-
- source.setDescription("sourceDescription");
- handler.cloneTaskData(source, target);
- assertEquals("sourceDescription", target.getDescription());
- assertEquals("", target.getSummary());
-
- source.setSummary("sourceSummary");
- handler.cloneTaskData(source, target);
- assertEquals("sourceSummary", target.getSummary());
- }
-
- public void testCloneTaskDifferentRepositoryTypesCloneMappedAttribues() {
- StubAttributeFactory targetFactory = new StubAttributeFactory();
- target = new RepositoryTaskData(targetFactory, "otherkind", "http://url", "2");
-
- // key is not part of common schema
- source.setAttributeValue("key", "source");
- target.setAttributeValue("key", "target");
- handler.cloneTaskData(source, target);
- assertEquals("target", target.getAttributeValue("key"));
-
- // map key in source factory only
- factory.attributeMap.put(RepositoryTaskAttribute.PRIORITY, "key");
- handler.cloneTaskData(source, target);
- assertEquals("target", target.getAttributeValue("key"));
-
- // map key in target factory to different key
- targetFactory.attributeMap.put(RepositoryTaskAttribute.PRODUCT, "key");
- handler.cloneTaskData(source, target);
- assertEquals("target", target.getAttributeValue("key"));
-
- // map key in both factories
- targetFactory.attributeMap.put(RepositoryTaskAttribute.PRIORITY, "key");
- handler.cloneTaskData(source, target);
- assertEquals("source", target.getAttributeValue("key"));
-
- }
-
- private class StubAttributeFactory extends AbstractAttributeFactory {
-
- private static final long serialVersionUID = 1L;
-
- private final Map<String, String> attributeMap = new HashMap<String, String>();
-
- @Override
- public Date getDateForAttributeType(String attributeKey, String dateString) {
- // ignore
- return null;
- }
-
- @Override
- public String getName(String key) {
- // ignore
- return null;
- }
-
- @Override
- public boolean isHidden(String key) {
- // ignore
- return false;
- }
-
- @Override
- public boolean isReadOnly(String key) {
- // ignore
- return false;
- }
-
- @Override
- public String mapCommonAttributeKey(String key) {
- String mappedKey = attributeMap.get(key);
- return (mappedKey != null) ? mappedKey : key;
- }
-
- }
-
- private class StubTaskDataHandler extends AbstractTaskDataHandler {
-
- @Override
- public AbstractAttributeFactory getAttributeFactory(String repositoryUrl, String repositoryKind, String taskKind) {
- // ignore
- return null;
- }
-
- @Override
- public AbstractAttributeFactory getAttributeFactory(RepositoryTaskData taskData) {
- // ignore
- return null;
- }
-
- @Override
- public RepositoryTaskData getTaskData(TaskRepository repository, String taskId, IProgressMonitor monitor)
- throws CoreException {
- // ignore
- return null;
- }
-
- @Override
- public boolean initializeTaskData(TaskRepository repository, RepositoryTaskData data, IProgressMonitor monitor)
- throws CoreException {
- // ignore
- return false;
- }
-
- @Override
- public String postTaskData(TaskRepository repository, RepositoryTaskData taskData, IProgressMonitor monitor)
- throws CoreException {
- // ignore
- return null;
- }
-
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AllTasksPerformanceTests.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AllTasksPerformanceTests.java
deleted file mode 100644
index 7d9be6f41..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AllTasksPerformanceTests.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.mylyn.tasks.tests.performance.TaskContainerTest;
-import org.eclipse.mylyn.tasks.tests.performance.TaskListPerformanceTest;
-
-public class AllTasksPerformanceTests {
-
- public static Test suite() {
- TestSuite suite = new TestSuite("Test for org.eclipse.mylyn.tests.performance");
- suite.addTestSuite(TaskContainerTest.class);
- suite.addTestSuite(TaskListPerformanceTest.class);
- return suite;
- }
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AllTasksTests.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AllTasksTests.java
deleted file mode 100644
index ff5f1d74e..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AllTasksTests.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-/**
- * @author Mik Kersten
- * @author Shawn Minto
- */
-public class AllTasksTests {
-
- public static Test suite() {
- TestSuite suite = new TestSuite("Test for org.eclipse.mylyn.tasks.tests");
-
- // $JUnit-BEGIN$
- suite.addTestSuite(LinkProviderTest.class);
- suite.addTestSuite(TaskActivationActionTest.class);
- suite.addTestSuite(TaskListPresentationTest.class);
- suite.addTestSuite(TaskRepositoryTest.class);
- suite.addTestSuite(TaskRepositorySorterTest.class);
- suite.addTestSuite(TaskDataStorageManagerTest.class);
- suite.addTestSuite(CopyDetailsActionTest.class);
- suite.addTestSuite(NewTaskFromSelectionActionTest.class);
- suite.addTestSuite(TaskListTest.class);
- suite.addTestSuite(ProjectRepositoryAssociationTest.class);
- suite.addTestSuite(TaskList06DataMigrationTest.class);
- suite.addTestSuite(TaskPlanningEditorTest.class);
- suite.addTestSuite(TaskListManagerTest.class);
- suite.addTestSuite(RepositoryTaskSynchronizationTest.class);
- suite.addTestSuite(TaskRepositoryManagerTest.class);
- suite.addTestSuite(TaskRepositoriesExternalizerTest.class);
- suite.addTestSuite(TaskListContentProviderTest.class);
- suite.addTestSuite(TaskListBackupManagerTest.class);
- suite.addTestSuite(TableSorterTest.class);
- suite.addTestSuite(TaskKeyComparatorTest.class);
- suite.addTestSuite(TaskTest.class);
- suite.addTestSuite(TaskListUiTest.class);
- suite.addTestSuite(TaskListDnDTest.class);
- suite.addTestSuite(TasksUiUtilTest.class);
- suite.addTestSuite(TaskDataExportTest.class);
- // XXX: Put back
- //suite.addTestSuite(TaskDataImportTest.class);
- suite.addTestSuite(ScheduledPresentationTest.class);
- suite.addTestSuite(TaskActivityTimingTest.class);
- suite.addTestSuite(AttachmentJobTest.class);
- suite.addTestSuite(RepositorySettingsPageTest.class);
- suite.addTestSuite(TaskHistoryTest.class);
- suite.addTestSuite(CommentQuoterTest.class);
- suite.addTestSuite(OfflineStorageTest.class);
- suite.addTestSuite(OfflineCachingStorageTest.class);
- suite.addTestSuite(QueryExportImportTest.class);
- suite.addTestSuite(TaskExportImportTest.class);
- suite.addTestSuite(PersonProposalProviderTest.class);
- suite.addTestSuite(TaskRepositoryLocationTest.class);
- suite.addTestSuite(AttachmentSizeFormatterTest.class);
- suite.addTestSuite(AbstractTaskDataHandlerTest.class);
- suite.addTestSuite(OrphanedTasksTest.class);
- suite.addTestSuite(TaskWorkingSetTest.class);
- suite.addTestSuite(TaskActivationHistoryTest.class);
- // $JUnit-END$
-
- // suite.addTestSuite(BackgroundSaveTest.class);
- // suite.addTestSuite(RetrieveTitleFromUrlTest.class);
-
- suite.addTestSuite(org.eclipse.mylyn.tasks.tests.web.NamedPatternTest.class);
- suite.addTestSuite(org.eclipse.mylyn.tasks.tests.web.HtmlDecodeEntityTest.class);
-
- suite.addTestSuite(TaskActivityListenerTest.class);
- suite.addTestSuite(TaskRepositoryFilterTests.class);
- suite.addTestSuite(TaskDiffUtilTest.class);
- return suite;
- }
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AttachmentJobTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AttachmentJobTest.java
deleted file mode 100644
index 7907ee17e..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AttachmentJobTest.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import java.io.File;
-import java.io.RandomAccessFile;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.Status;
-import org.eclipse.mylyn.internal.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.actions.DownloadAttachmentJob;
-import org.eclipse.mylyn.tasks.core.ITaskAttachment;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.tests.connector.MockAttachmentHandler;
-import org.eclipse.mylyn.tasks.tests.connector.MockRepositoryConnector;
-
-/**
- * Test task attachment jobs.
- *
- * @author Steffen Pingel
- */
-public class AttachmentJobTest extends TestCase {
-
- private TaskRepositoryManager manager;
-
- private MockRepositoryConnector connector;
-
- private MockAttachmentHandler attachmentHandler;
-
- private TaskRepository repository;
-
- private ITaskAttachment attachment;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
-
- manager = TasksUiPlugin.getRepositoryManager();
-
- repository = new TaskRepository(MockRepositoryConnector.REPOSITORY_KIND, MockRepositoryConnector.REPOSITORY_URL);
- manager.addRepository(repository);
-
- attachmentHandler = new MockAttachmentHandler();
-
- connector = new MockRepositoryConnector();
- connector.setAttachmentHandler(attachmentHandler);
- manager.addRepositoryConnector(connector);
-
-// attachment = new TaskAttachment(repository, task, attribute);
- }
-
- @Override
- protected void tearDown() throws Exception {
- manager.removeRepository(repository, TasksUiPlugin.getDefault().getRepositoriesFilePath());
- }
-
-// TODO: refactor 3.0
-// public void testCopyToClipboardAction() throws Exception {
-// String expected = "attachment content";
-// attachmentHandler.setAttachmentData(expected.getBytes());
-//
-// CopyAttachmentToClipboardJob job = new CopyAttachmentToClipboardJob(attachment);
-// job.schedule();
-// job.join();
-//
-// Clipboard clipboard = new Clipboard(PlatformUI.getWorkbench().getDisplay());
-// assertEquals(expected, clipboard.getContents(TextTransfer.getInstance()));
-// }
-
- public void testDownloadAttachmentJob() throws Exception {
- File file = File.createTempFile("mylyn", null);
- file.deleteOnExit();
-
- String expected = "attachment\ncontent";
- attachmentHandler.setAttachmentData(expected.getBytes());
-
- DownloadAttachmentJob job = new DownloadAttachmentJob(attachment, file);
- job.schedule();
- job.join();
-
- assertEquals(Status.OK_STATUS, job.getResult());
-
- RandomAccessFile raf = new RandomAccessFile(file, "r");
- byte[] data = new byte[expected.getBytes().length];
- try {
- raf.readFully(data);
- } finally {
- raf.close();
- }
- assertEquals(expected, new String(data));
- }
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AttachmentSizeFormatterTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AttachmentSizeFormatterTest.java
deleted file mode 100644
index 8ba3e5a30..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AttachmentSizeFormatterTest.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.tasks.tests;
-
-import java.util.Locale;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.internal.tasks.ui.editors.AttachmentSizeFormatter;
-
-/**
- * Tests attachment size value formatting.
- *
- * @author Willian Mitsuda
- * @author Frank Becker
- */
-public class AttachmentSizeFormatterTest extends TestCase {
-
- public void testInvalidString() {
- AttachmentSizeFormatter formatter = AttachmentSizeFormatter.getInstance();
- assertEquals(AttachmentSizeFormatter.UNKNOWN_SIZE, formatter.format(null));
- assertEquals(AttachmentSizeFormatter.UNKNOWN_SIZE, formatter.format("x"));
- }
-
- public void testNotAValidNumber() {
- AttachmentSizeFormatter formatter = AttachmentSizeFormatter.getInstance();
- assertEquals(AttachmentSizeFormatter.UNKNOWN_SIZE, formatter.format("-5"));
- assertEquals(AttachmentSizeFormatter.UNKNOWN_SIZE, formatter.format("1.0"));
- }
-
- public void testByteFormatter() {
- AttachmentSizeFormatter formatter = new AttachmentSizeFormatter(Locale.ENGLISH);
- assertEquals("1 byte", formatter.format("1"));
- assertEquals("2 bytes", formatter.format("2"));
- assertEquals("1023 bytes", formatter.format("1023"));
- }
-
- public void testKBFormatter() {
- AttachmentSizeFormatter formatterEnglish = new AttachmentSizeFormatter(Locale.ENGLISH);
- assertEquals("1.00 KB", formatterEnglish.format("1024"));
- assertEquals("1024.00 KB", formatterEnglish.format("1048575"));
-
- AttachmentSizeFormatter formatterGerman = new AttachmentSizeFormatter(Locale.GERMAN);
- assertEquals("1,00 KB", formatterGerman.format("1024"));
- assertEquals("1024,00 KB", formatterGerman.format("1048575"));
- }
-
- public void testMBFormatter() {
- AttachmentSizeFormatter formatterEnglish = new AttachmentSizeFormatter(Locale.ENGLISH);
- assertEquals("1.00 MB", formatterEnglish.format("1048576"));
- assertEquals("1024.00 MB", formatterEnglish.format("1073741823"));
-
- AttachmentSizeFormatter formatterGerman = new AttachmentSizeFormatter(Locale.GERMAN);
- assertEquals("1,00 MB", formatterGerman.format("1048576"));
- assertEquals("1024,00 MB", formatterGerman.format("1073741823"));
- }
-
- public void testGBFormatter() {
- AttachmentSizeFormatter formatterEnglish = new AttachmentSizeFormatter(Locale.ENGLISH);
- assertEquals("1.00 GB", formatterEnglish.format("1073741824"));
-
- AttachmentSizeFormatter formatterGerman = new AttachmentSizeFormatter(Locale.GERMAN);
- assertEquals("1,00 GB", formatterGerman.format("1073741824"));
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/BackgroundSaveTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/BackgroundSaveTest.java
deleted file mode 100644
index 8d063149e..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/BackgroundSaveTest.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.tasks.tests;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Locale;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
-import org.eclipse.mylyn.internal.tasks.core.LocalTask;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-
-/**
- * Tests the mechanism for saving the task data periodically.
- *
- * @author Wesley Coelho
- * @author Mik Kersten (rewrite)
- */
-public class BackgroundSaveTest extends TestCase {
-
- public void testBackgroundSave() throws InterruptedException, IOException {
- if (System.getProperty("os.name").toLowerCase(Locale.ENGLISH).contains("linux")) {
- System.out.println("> BackgroundSaveTest.testBackgroundSave() not run on Linux due to IO concurrency");
- } else {
- LocalTask task = new LocalTask("1", "summary");
- String filePath = TasksUiPlugin.getDefault().getDataDirectory() + File.separator
- + ITasksCoreConstants.DEFAULT_TASK_LIST_FILE;
-
- final File file = new File(filePath);
- long previouslyModified = file.lastModified();
- TasksUiPlugin.getTaskList().addTask(task);
- TasksUiPlugin.getExternalizationManager().requestSave();
- Thread.sleep(5000);
- assertTrue(file.lastModified() > previouslyModified);
- TasksUiPlugin.getTaskList().deleteTask(task);
- }
- }
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/CommentQuoterTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/CommentQuoterTest.java
deleted file mode 100644
index d77c403be..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/CommentQuoterTest.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.internal.tasks.core.CommentQuoter;
-
-/**
- * Test many quoting scenarios
- *
- * @author Willian Mitsuda
- */
-public class CommentQuoterTest extends TestCase {
-
- public void testNoWrapping() {
- CommentQuoter quoter = new CommentQuoter(10);
- String quotedText = quoter.quote("bababa");
- assertEquals("> bababa\n", quotedText);
- }
-
- public void testSimpleWrapping() {
- CommentQuoter quoter = new CommentQuoter(10);
- String quotedText = quoter.quote("bababa bobobo");
- assertEquals("> bababa\n> bobobo\n", quotedText);
- }
-
- public void testNoWayToWrap() {
- CommentQuoter quoter = new CommentQuoter(10);
- String quotedText = quoter.quote("babababababa");
- assertEquals("> babababababa\n", quotedText);
- }
-
- public void testExactWrap() {
- CommentQuoter quoter = new CommentQuoter(10);
- String quotedText = quoter.quote("bababababa");
- assertEquals("> bababababa\n", quotedText);
- }
-
- public void testMultiLineNoWrapping() {
- CommentQuoter quoter = new CommentQuoter(10);
- String quotedText = quoter.quote("bababa\nbobobo");
- assertEquals("> bababa\n> bobobo\n", quotedText);
- }
-
- public void testMultiLineWithWrapping() {
- CommentQuoter quoter = new CommentQuoter(10);
- String quotedText = quoter.quote("bababa bebebe\nbibibibibibi bibi\nbobobo bububu");
- assertEquals("> bababa\n> bebebe\n> bibibibibibi\n> bibi\n> bobobo\n> bububu\n", quotedText);
- }
-
- public void testExcessiveSpacingWrapping() {
- CommentQuoter quoter = new CommentQuoter(10);
- String quotedText = quoter.quote("bababa bobobo");
- assertEquals("> bababa\n> bobobo\n", quotedText);
- }
-
- public void testBlankLineQuoting() {
- CommentQuoter quoter = new CommentQuoter(10);
- String quotedText = quoter.quote("bababa\n\nbobobo");
- assertEquals("> bababa\n> \n> bobobo\n", quotedText);
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/CopyDetailsActionTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/CopyDetailsActionTest.java
deleted file mode 100644
index 929844150..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/CopyDetailsActionTest.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.internal.tasks.ui.actions.CopyTaskDetailsAction;
-import org.eclipse.mylyn.tasks.tests.connector.MockTask;
-
-/**
- * @author Mik Kersten
- */
-public class CopyDetailsActionTest extends TestCase {
-
- public void testIdLabelIncluded() {
- MockTask task = new MockTask("123");
- String text = CopyTaskDetailsAction.getTextForTask(task);
- assertTrue(text.startsWith(task.getTaskKey()));
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/DateRangeTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/DateRangeTest.java
deleted file mode 100644
index 31bbb6a91..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/DateRangeTest.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.SortedMap;
-import java.util.TreeMap;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.internal.tasks.core.DateRange;
-import org.eclipse.mylyn.internal.tasks.core.LocalTask;
-import org.eclipse.mylyn.internal.tasks.core.TaskActivityUtil;
-import org.eclipse.mylyn.tasks.core.ITask;
-
-/**
- * @author Rob Elves
- */
-public class DateRangeTest extends TestCase {
-
- public void testCompareInstant() {
- DateRange range1 = new DateRange(TaskActivityUtil.getCurrentWeek().getToday().previous().getStartDate());
- DateRange range2 = new DateRange(TaskActivityUtil.getCurrentWeek().getToday().getStartDate());
- assertEquals(-1, range1.compareTo(range2));
- assertEquals(1, range2.compareTo(range1));
- }
-
- public void testCompareRanges() {
- DateRange range1 = TaskActivityUtil.getCurrentWeek().getToday().previous();
- DateRange range2 = TaskActivityUtil.getCurrentWeek().getToday();
- assertEquals(-1, range1.compareTo(range2));
- assertEquals(1, range2.compareTo(range1));
- }
-
- public void testQueryDateRange() {
- SortedMap<DateRange, Set<ITask>> scheduledTasks = Collections.synchronizedSortedMap(new TreeMap<DateRange, Set<ITask>>());
- DateRange range1 = TaskActivityUtil.getCurrentWeek().getToday().previous();
- Set<ITask> tasks = new HashSet<ITask>();
- tasks.add(new LocalTask("1", "summaryForLocalTask"));
- scheduledTasks.put(range1, tasks);
- assertFalse(scheduledTasks.isEmpty());
- assertNotNull(scheduledTasks.get(range1));
-
- DateRange rangeTest = TaskActivityUtil.getCurrentWeek().getToday().previous();
- assertNotNull(scheduledTasks.get(rangeTest));
-
- DateRange range2 = TaskActivityUtil.getCurrentWeek().getToday();
- tasks = new HashSet<ITask>();
- tasks.add(new LocalTask("2", "summaryForLocalTask2"));
- scheduledTasks.put(range2, tasks);
-
- SortedMap<DateRange, Set<ITask>> result = scheduledTasks.subMap(range1, range2);
- assertEquals(1, result.size());
-
- DateRange range0 = TaskActivityUtil.getCurrentWeek().getToday().previous().previous();
- DateRange range3 = TaskActivityUtil.getCurrentWeek().getToday().next();
- result = scheduledTasks.subMap(range0, range3);
- assertEquals(2, result.size());
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/LinkProviderTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/LinkProviderTest.java
deleted file mode 100644
index ca7806d1d..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/LinkProviderTest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.IRepositoryManager;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.AbstractTaskRepositoryLinkProvider;
-
-/**
- * @author Mik Kersten
- * @author Steffen Pingel
- */
-public class LinkProviderTest extends TestCase {
-
- public class LinkProviderStub extends AbstractTaskRepositoryLinkProvider {
-
- int executions = 0;
-
- @Override
- public TaskRepository getTaskRepository(IResource resource, IRepositoryManager repositoryManager) {
- executions++;
- try {
- Thread.sleep(5010);
- } catch (InterruptedException e) {
- fail();
- }
- return null;
- }
- }
-
- public void testTimeout() {
- LinkProviderStub provider = new LinkProviderStub();
- TasksUiPlugin.getDefault().addRepositoryLinkProvider(provider);
- TasksUiPlugin.getDefault().getRepositoryForResource(ResourcesPlugin.getWorkspace().getRoot());
- assertEquals(1, provider.executions);
-
- TasksUiPlugin.getDefault().getRepositoryForResource(ResourcesPlugin.getWorkspace().getRoot());
- assertEquals(1, provider.executions);
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/NewTaskFromSelectionActionTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/NewTaskFromSelectionActionTest.java
deleted file mode 100644
index 1cb53043d..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/NewTaskFromSelectionActionTest.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Map;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jface.text.TextSelection;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractAttributeFactory;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.TaskComment;
-import org.eclipse.mylyn.internal.tasks.ui.actions.NewTaskFromSelectionAction;
-import org.eclipse.mylyn.internal.tasks.ui.editors.RepositoryTaskSelection;
-
-/**
- * @author Frank Becker
- * @author Steffen Pingel
- */
-public class NewTaskFromSelectionActionTest extends TestCase {
-
- // Steffen: re-enable?
-// public void testNoSelection() throws Exception {
-// NewTaskFromSelectionAction action = new NewTaskFromSelectionAction();
-// assertNull(action.getTaskSelection());
-// action.run();
-// action.selectionChanged(null);
-// assertNull(action.getTaskSelection());
-// }
-
- public void testComment() throws Exception {
- StubAttributeFactory targetFactory = new StubAttributeFactory();
- TaskComment comment = new TaskComment(targetFactory, 1);
-
- NewTaskFromSelectionAction action = new NewTaskFromSelectionAction();
- action.selectionChanged(new RepositoryTaskSelection("id", "server", "kind", "", comment, "summary"));
- assertNotNull(action.getTaskSelection());
- }
-
- public void testText() throws Exception {
- NewTaskFromSelectionAction action = new NewTaskFromSelectionAction();
- action.selectionChanged(new TextSelection(0, 0) {
- @Override
- public String getText() {
- return "text";
- }
- });
- assertNotNull(action.getTaskSelection());
-
- action.selectionChanged(new TextSelection(0, 0));
- assertNull(action.getTaskSelection());
- }
-
- private class StubAttributeFactory extends AbstractAttributeFactory {
-
- private static final long serialVersionUID = 1L;
-
- private final Map<String, String> attributeMap = new HashMap<String, String>();
-
- @Override
- public Date getDateForAttributeType(String attributeKey, String dateString) {
- // ignore
- return null;
- }
-
- @Override
- public String getName(String key) {
- // ignore
- return null;
- }
-
- @Override
- public boolean isHidden(String key) {
- // ignore
- return false;
- }
-
- @Override
- public boolean isReadOnly(String key) {
- // ignore
- return false;
- }
-
- @Override
- public String mapCommonAttributeKey(String key) {
- String mappedKey = attributeMap.get(key);
- return (mappedKey != null) ? mappedKey : key;
- }
-
- }
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/NewTaskWizardRepositorySelectionTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/NewTaskWizardRepositorySelectionTest.java
deleted file mode 100644
index aa71cccba..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/NewTaskWizardRepositorySelectionTest.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.mylyn.internal.tasks.core.LocalRepositoryConnector;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.MultiRepositoryAwareWizard;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.SelectRepositoryPage;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.tests.connector.MockRepositoryConnector;
-import org.eclipse.mylyn.tasks.tests.connector.MockTask;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.mylyn.tasks.ui.wizards.NewTaskWizard;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Mik Kersten
- */
-public class NewTaskWizardRepositorySelectionTest extends TestCase {
-
- // see bug 203801
- public void testRepositorySettingWithTaskListSelection() {
- TaskRepository mockRepository = new TaskRepository(MockRepositoryConnector.REPOSITORY_KIND,
- MockRepositoryConnector.REPOSITORY_URL);
- TasksUiPlugin.getRepositoryManager().addRepository(mockRepository);
-
- Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- TaskListView view = (TaskListView) TasksUiUtil.openTasksViewInActivePerspective();
- MockTask mockTask = new MockTask("mock.task");
- TasksUiPlugin.getTaskActivityManager().scheduleNewTask(mockTask);
- TasksUiPlugin.getTaskList().addTask(mockTask);
-
- view.setFocusedMode(true);
- view.getViewer().refresh();
- view.getViewer().expandAll();
- view.getViewer().setSelection(new StructuredSelection(mockTask), true);
- assertEquals(mockTask, ((StructuredSelection) view.getViewer().getSelection()).getFirstElement());
-
- MultiRepositoryAwareWizard wizard = TasksUiInternal.createNewTaskWizard(null);
- WizardDialog dialog = null;
- dialog = new WizardDialog(shell, wizard);
- dialog.setBlockOnOpen(false);
- dialog.open();
-
- SelectRepositoryPage page = (SelectRepositoryPage) wizard.getPages()[0];
- assertTrue(page.getRepositories().contains(mockRepository));
- assertEquals(mockRepository, ((IStructuredSelection) page.getViewer().getSelection()).getFirstElement());
-
- TasksUiPlugin.getRepositoryManager().removeRepository(mockRepository,
- TasksUiPlugin.getDefault().getRepositoriesFilePath());
- TasksUiPlugin.getTaskList().deleteTask(mockTask);
- wizard.dispose();
- dialog.close();
- }
-
- // see bug bug 202184
- public void testDefaultWithNoTaskListSelection() {
- TaskListView view = (TaskListView) TasksUiUtil.openTasksViewInActivePerspective();
- view.getViewer().setSelection(new StructuredSelection());
-
- NewTaskWizard wizard = new NewTaskWizard(null);
- Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- WizardDialog dialog = null;
- dialog = new WizardDialog(shell, wizard);
- dialog.setBlockOnOpen(false);
- dialog.open();
-
- SelectRepositoryPage page = (SelectRepositoryPage) wizard.getPages()[0];
- TaskRepository localRepository = TasksUiPlugin.getRepositoryManager().getRepositories(
- LocalRepositoryConnector.CONNECTOR_KIND).iterator().next();
- assertEquals(localRepository, ((IStructuredSelection) page.getViewer().getSelection()).getFirstElement());
-
- wizard.dispose();
- dialog.close();
- }
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/OfflineCachingStorageTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/OfflineCachingStorageTest.java
deleted file mode 100644
index 8fc172f95..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/OfflineCachingStorageTest.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import java.io.File;
-import java.util.HashSet;
-import java.util.Set;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.internal.tasks.core.TaskDataState;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskAttribute;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-import org.eclipse.mylyn.internal.tasks.ui.OfflineCachingStorage;
-import org.eclipse.mylyn.internal.tasks.ui.OfflineFileStorage;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.tests.connector.MockAttributeFactory;
-import org.eclipse.mylyn.tasks.tests.connector.MockRepositoryConnector;
-
-/**
- * @author Rob Elves
- */
-public class OfflineCachingStorageTest extends TestCase {
-
- private static final String MOCK_ID = "1";
-
- private File dataDir;
-
- private OfflineCachingStorage storage;
-
- @Override
- protected void setUp() throws Exception {
- //dataDir = new File("c:/offline");
- dataDir = new File(TasksUiPlugin.getDefault().getDataDirectory() + '/' + "offline");
- storage = new OfflineCachingStorage(new OfflineFileStorage(dataDir));
- storage.start();
- super.setUp();
- }
-
- @Override
- protected void tearDown() throws Exception {
- storage.stop();
- storage.clear();
- }
-
- public void testPutAndGet() throws Exception {
-
- TaskDataState state = new TaskDataState(MockRepositoryConnector.REPOSITORY_URL, MOCK_ID);
-
- RepositoryTaskData newData = new RepositoryTaskData(new MockAttributeFactory(),
- MockRepositoryConnector.REPOSITORY_KIND, MockRepositoryConnector.REPOSITORY_URL, MOCK_ID);
-
- newData.setAttributeValue("attributeKey1", "attValue!");
- newData.setDescription("description");
- newData.setNew(true);
- newData.setNewComment("new comment");
- newData.setSummary("summary");
- newData.setTaskKey("task key");
-
- RepositoryTaskData oldData = new RepositoryTaskData(new MockAttributeFactory(),
- MockRepositoryConnector.REPOSITORY_KIND, MockRepositoryConnector.REPOSITORY_URL, MOCK_ID);
-
- Set<RepositoryTaskAttribute> edits = new HashSet<RepositoryTaskAttribute>();
-
- state.setNewTaskData(newData);
- state.setOldTaskData(oldData);
- state.setEdits(edits);
-
- storage.put(state);
-
- TaskDataState retrieved = storage.get(MockRepositoryConnector.REPOSITORY_URL, MOCK_ID);
- assertNotNull(retrieved);
- RepositoryTaskData newTaskData = retrieved.getNewTaskData();
- assertNotNull(newTaskData);
- assertEquals(MockRepositoryConnector.REPOSITORY_KIND, newTaskData.getConnectorKind());
- assertEquals("description", newTaskData.getDescription());
- assertEquals("new comment", newTaskData.getNewComment());
- assertEquals("task key", newTaskData.getTaskKey());
- }
-
- public void testRemove() throws Exception {
- assertNull(storage.get(MockRepositoryConnector.REPOSITORY_URL, MOCK_ID));
-
- TaskDataState state = new TaskDataState(MockRepositoryConnector.REPOSITORY_URL, MOCK_ID);
-
- RepositoryTaskData newData = new RepositoryTaskData(new MockAttributeFactory(),
- MockRepositoryConnector.REPOSITORY_KIND, MockRepositoryConnector.REPOSITORY_URL, MOCK_ID);
-
- newData.setAttributeValue("attributeKey1", "attValue!");
- newData.setDescription("description");
- newData.setNew(true);
- newData.setNewComment("new comment");
- newData.setSummary("summary");
- newData.setTaskKey("task key");
-
- RepositoryTaskData oldData = new RepositoryTaskData(new MockAttributeFactory(),
- MockRepositoryConnector.REPOSITORY_KIND, MockRepositoryConnector.REPOSITORY_URL, MOCK_ID);
-
- Set<RepositoryTaskAttribute> edits = new HashSet<RepositoryTaskAttribute>();
-
- state.setNewTaskData(newData);
- state.setOldTaskData(oldData);
- state.setEdits(edits);
-
- storage.put(state);
- assertEquals(1, storage.getReadQueue().size());
- assertEquals("1", storage.getReadQueue().iterator().next().getId());
- assertNotNull(storage.get(MockRepositoryConnector.REPOSITORY_URL, MOCK_ID));
- storage.remove(MockRepositoryConnector.REPOSITORY_URL, MOCK_ID);
- assertEquals(0, storage.getReadQueue().size());
- assertNull(storage.get(MockRepositoryConnector.REPOSITORY_URL, MOCK_ID));
-
- }
-
- public void testLRUQueue() {
- assertNull(storage.get(MockRepositoryConnector.REPOSITORY_URL, MOCK_ID));
- assertEquals(0, storage.getReadQueue().size());
- TaskDataState state1 = new TaskDataState(MockRepositoryConnector.REPOSITORY_URL, MOCK_ID);
- TaskDataState state2 = new TaskDataState(MockRepositoryConnector.REPOSITORY_URL, "2");
- TaskDataState state3 = new TaskDataState(MockRepositoryConnector.REPOSITORY_URL, "3");
-
- storage.put(state1);
- storage.put(state2);
- storage.put(state3);
-
- assertEquals(3, storage.getReadQueue().size());
-
- // should return least recently used
- assertEquals("1", storage.getReadQueue().iterator().next().getId());
-
- assertNotNull(storage.get(MockRepositoryConnector.REPOSITORY_URL, "3"));
- assertNotNull(storage.get(MockRepositoryConnector.REPOSITORY_URL, "2"));
- assertNotNull(storage.get(MockRepositoryConnector.REPOSITORY_URL, MOCK_ID));
-
- assertEquals(3, storage.getReadQueue().size());
-
- // should return least recently used
- assertEquals("3", storage.getReadQueue().iterator().next().getId());
- storage.put(state1);
- storage.put(state3);
- // should return least recently used
- assertEquals("2", storage.getReadQueue().iterator().next().getId());
- assertEquals(3, storage.getReadQueue().size());
- }
-
- public void testPendingWrites() {
- assertEquals(0, storage.getReadCache().size());
- assertEquals(0, storage.getWriteCache().size());
- assertEquals(0, storage.getReadQueue().size());
-
- TaskDataState state1 = new TaskDataState(MockRepositoryConnector.REPOSITORY_URL, "1");
- storage.put(state1);
-
- storage.flushReadCache(true);
-
- assertEquals(0, storage.getReadCache().size());
- assertEquals(1, storage.getWriteCache().size());
-
- TaskDataState data = storage.get(MockRepositoryConnector.REPOSITORY_URL, "1");
- assertNotNull(data);
- assertEquals(state1, data);
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/OfflineStorageTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/OfflineStorageTest.java
deleted file mode 100644
index 0aefe37d7..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/OfflineStorageTest.java
+++ /dev/null
@@ -1,309 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.internal.tasks.core.TaskDataState;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryAttachment;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryOperation;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskAttribute;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.TaskComment;
-import org.eclipse.mylyn.internal.tasks.ui.OfflineFileStorage;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.tests.connector.MockAttributeFactory;
-import org.eclipse.mylyn.tasks.tests.connector.MockRepositoryConnector;
-import org.eclipse.ui.XMLMemento;
-
-/**
- * @author Rob Elves
- */
-public class OfflineStorageTest extends TestCase {
-
- File dataDir;
-
- OfflineFileStorage storage;
-
- protected void setUp() throws Exception {
- //dataDir = new File("c:/offline");
- dataDir = new File(TasksUiPlugin.getDefault().getDataDirectory() + "/offline");
- storage = new OfflineFileStorage(dataDir);
- storage.start();
- super.setUp();
- }
-
- protected void tearDown() throws Exception {
- storage.stop();
- removeTestFiles(dataDir);
- }
-
- private void removeTestFiles(File folder) {
- if (folder.isDirectory()) {
- for (File file : folder.listFiles()) {
- removeTestFiles(file);
- }
- }
- folder.delete();
- }
-
- public void testPutAndGet() throws Exception {
-
- TaskDataState state = new TaskDataState(MockRepositoryConnector.REPOSITORY_URL, "1");
-
- RepositoryTaskData newData = new RepositoryTaskData(new MockAttributeFactory(),
- MockRepositoryConnector.REPOSITORY_KIND, MockRepositoryConnector.REPOSITORY_URL, "1", "kind");
-
- newData.setAttributeValue("attributeKey1", "attValue!");
- newData.setDescription("description");
- newData.setNew(true);
- newData.setNewComment("new comment");
- newData.setSummary("summary");
- newData.setTaskKey("task key");
-
- RepositoryTaskData oldData = new RepositoryTaskData(new MockAttributeFactory(),
- MockRepositoryConnector.REPOSITORY_KIND, MockRepositoryConnector.REPOSITORY_URL, "1", "kind");
-
- Set<RepositoryTaskAttribute> edits = new HashSet<RepositoryTaskAttribute>();
-
- state.setNewTaskData(newData);
- state.setOldTaskData(oldData);
- state.setEdits(edits);
-
- storage.put(state);
-
- TaskDataState retrieved = storage.get(MockRepositoryConnector.REPOSITORY_URL, "1");
- assertNotNull(retrieved);
- RepositoryTaskData newTaskData = retrieved.getNewTaskData();
- assertNotNull(newTaskData);
- assertEquals(MockRepositoryConnector.REPOSITORY_KIND, newTaskData.getConnectorKind());
- assertEquals("description", newTaskData.getDescription());
- assertEquals("new comment", newTaskData.getNewComment());
- assertEquals("task key", newTaskData.getTaskKey());
- assertEquals("kind", newTaskData.getTaskKind());
- }
-
- public void testRemove() throws Exception {
- assertNull(storage.get(MockRepositoryConnector.REPOSITORY_URL, "1"));
-
- TaskDataState state = new TaskDataState(MockRepositoryConnector.REPOSITORY_URL, "1");
-
- RepositoryTaskData newData = new RepositoryTaskData(new MockAttributeFactory(),
- MockRepositoryConnector.REPOSITORY_KIND, MockRepositoryConnector.REPOSITORY_URL, "1");
-
- newData.setAttributeValue("attributeKey1", "attValue!");
- newData.setDescription("description");
- newData.setNew(true);
- newData.setNewComment("new comment");
- newData.setSummary("summary");
- newData.setTaskKey("task key");
-
- RepositoryTaskData oldData = new RepositoryTaskData(new MockAttributeFactory(),
- MockRepositoryConnector.REPOSITORY_KIND, MockRepositoryConnector.REPOSITORY_URL, "1");
-
- Set<RepositoryTaskAttribute> edits = new HashSet<RepositoryTaskAttribute>();
-
- state.setNewTaskData(newData);
- state.setOldTaskData(oldData);
- state.setEdits(edits);
-
- storage.put(state);
- assertNotNull(storage.get(MockRepositoryConnector.REPOSITORY_URL, "1"));
- storage.remove(MockRepositoryConnector.REPOSITORY_URL, "1");
- assertNull(storage.get(MockRepositoryConnector.REPOSITORY_URL, "1"));
-
- }
-
- public void testAttributes() throws Exception {
- List<RepositoryTaskAttribute> attributes = new ArrayList<RepositoryTaskAttribute>();
- RepositoryTaskAttribute attribute = new RepositoryTaskAttribute("testId", "testName", true);
- attribute.setReadOnly(true);
- attribute.addOption("Option Name 1", "Option Value 1");
- attribute.addOption("Option Name 2", "Option Value 2");
- attribute.addValue("Value 1");
- attribute.addValue("Value 2");
- attribute.addValue("Value 3");
- attribute.putMetaDataValue("MetaKey1", "MetaValue1");
- attribute.putMetaDataValue("MetaKey2", "MetaValue2");
- attribute.putMetaDataValue("MetaKey3", "MetaValue3");
- attribute.putMetaDataValue("MetaKey4", "MetaValue4");
-
- attributes.add(attribute);
-
- XMLMemento memento = XMLMemento.createWriteRoot("Attributes");
- storage.addAttributes(memento, attributes);
- List<RepositoryTaskAttribute> readAttributes = storage.readAttributes(memento);
- assertNotNull(readAttributes);
- assertEquals(1, readAttributes.size());
- RepositoryTaskAttribute attr = readAttributes.get(0);
-
- assertEquals("testId", attr.getId());
- assertEquals("testName", attr.getName());
- assertEquals(true, attr.isHidden());
- assertEquals(true, attr.isReadOnly());
-
- assertNotNull(attr.getOptions());
- assertEquals(2, attr.getOptions().size());
-
- assertEquals("Option Name 1", attr.getOptions().get(0));
- assertEquals("Option Name 2", attr.getOptions().get(1));
- assertEquals("Option Value 1", attr.getOptionParameter(attr.getOptions().get(0)));
- assertEquals("Option Value 2", attr.getOptionParameter(attr.getOptions().get(1)));
-
- assertEquals("Value 1", attr.getValues().get(0));
- assertEquals("Value 2", attr.getValues().get(1));
- assertEquals("Value 3", attr.getValues().get(2));
-
- assertEquals("MetaValue1", attribute.getMetaDataValue("MetaKey1"));
- assertEquals("MetaValue2", attribute.getMetaDataValue("MetaKey2"));
- assertEquals("MetaValue3", attribute.getMetaDataValue("MetaKey3"));
- assertEquals("MetaValue4", attribute.getMetaDataValue("MetaKey4"));
- }
-
- public void testOperations() throws Exception {
- RepositoryOperation op = new RepositoryOperation("knob1", "operationName1");
- op.setChecked(true);
- op.setInputName("InputName");
- op.setInputValue("InputValue");
- op.setUpOptions("TheOptionName");
- op.addOption("optionName1", "optionValue1");
- op.addOption("optionName2", "optionValue2");
- op.setOptionSelection("optionSelection1");
-
- RepositoryOperation op2 = new RepositoryOperation("knob2", "operationName2");
- op2.setChecked(true);
- op2.setInputName("InputName2");
- op2.setInputValue("InputValue2");
- op2.setUpOptions("TheOptionName2");
- op2.addOption("optionName1", "optionValue1");
- op2.addOption("optionName2", "optionValue2");
- op2.setOptionSelection("optionSelection2");
- XMLMemento memento = XMLMemento.createWriteRoot("Operations");
-
- List<RepositoryOperation> operations = new ArrayList<RepositoryOperation>();
- operations.add(op);
- operations.add(op2);
- storage.addOperations(memento, operations);
- List<RepositoryOperation> readOperations = storage.readOperations(memento);
- RepositoryOperation op1 = readOperations.get(0);
- assertEquals("knob1", op1.getKnobName());
- assertEquals("operationName1", op1.getOperationName());
- assertEquals("InputName", op1.getInputName());
- assertEquals("InputValue", op1.getInputValue());
-
- assertEquals("TheOptionName", op1.getOptionName());
- assertEquals(2, op1.getOptionNames().size());
- assertEquals("optionValue1", op1.getOptionValue(op1.getOptionNames().get(0)));
- assertEquals("optionValue2", op1.getOptionValue(op1.getOptionNames().get(1)));
- assertEquals("optionSelection1", op1.getOptionSelection());
-
- RepositoryOperation op2ver2 = readOperations.get(1);
- assertEquals("knob2", op2ver2.getKnobName());
- assertEquals("operationName2", op2ver2.getOperationName());
- assertEquals("InputName2", op2ver2.getInputName());
- assertEquals("InputValue2", op2ver2.getInputValue());
-
- assertEquals("TheOptionName2", op2ver2.getOptionName());
- assertEquals(2, op2ver2.getOptionNames().size());
- assertEquals("optionValue1", op2ver2.getOptionValue(op1.getOptionNames().get(0)));
- assertEquals("optionValue2", op2ver2.getOptionValue(op1.getOptionNames().get(1)));
- assertEquals("optionSelection2", op2ver2.getOptionSelection());
- }
-
- public void testComments() throws Exception {
- TaskComment comment1 = new TaskComment(new MockAttributeFactory(), 1);
- comment1.setAttachmentId("attachmentId1");
- comment1.setHasAttachment(true);
- comment1.addAttribute("attr1", new RepositoryTaskAttribute("attr1", "attr1Name", false));
-
- TaskComment comment2 = new TaskComment(new MockAttributeFactory(), 2);
- comment2.setAttachmentId("attachmentId2");
- comment2.setHasAttachment(false);
- comment2.addAttribute("attr2", new RepositoryTaskAttribute("attr2", "attr2Name", false));
- comment2.addAttribute("attr3", new RepositoryTaskAttribute("attr3", "attr3Name", true));
-
- XMLMemento memento = XMLMemento.createWriteRoot("Comments");
- List<TaskComment> comments = new ArrayList<TaskComment>();
- comments.add(comment1);
- comments.add(comment2);
- storage.addComments(memento, comments);
- List<TaskComment> returnedComments = storage.readComments(memento);
- assertEquals(2, returnedComments.size());
-
- assertEquals("attachmentId1", returnedComments.get(0).getAttachmentId());
- assertEquals(true, returnedComments.get(0).hasAttachment());
- assertEquals(1, returnedComments.get(0).getAttributes().size());
- assertEquals("attr1", returnedComments.get(0).getAttributes().get(0).getId());
- assertEquals("attr1Name", returnedComments.get(0).getAttributes().get(0).getName());
-
- assertEquals("attachmentId2", returnedComments.get(1).getAttachmentId());
- assertEquals(false, returnedComments.get(1).hasAttachment());
- assertEquals(2, returnedComments.get(1).getAttributes().size());
- assertEquals("attr2", returnedComments.get(1).getAttributes().get(0).getId());
- assertEquals("attr2Name", returnedComments.get(1).getAttributes().get(0).getName());
- assertEquals("attr3Name", returnedComments.get(1).getAttributes().get(1).getName());
- }
-
- public void testAttachments() throws Exception {
-
- List<RepositoryAttachment> attachments = new ArrayList<RepositoryAttachment>();
- RepositoryAttachment attachment1 = new RepositoryAttachment(new MockAttributeFactory());
- attachment1.setCreator("thecreator");
- attachment1.setObsolete(false);
- attachment1.setPatch(true);
- attachment1.setRepositoryKind("bugzilla");
- attachment1.setRepositoryUrl("repUrl");
- attachment1.setTaskId("taskid1");
- attachment1.addAttribute("attr1", new RepositoryTaskAttribute("attr1", "attr1Name", true));
- attachment1.addAttribute("attr2", new RepositoryTaskAttribute("attr2", "attr2Name", true));
-
- RepositoryAttachment attachment2 = new RepositoryAttachment(new MockAttributeFactory());
- attachment2.setCreator("thecreator2");
- attachment2.setObsolete(true);
- attachment2.setPatch(false);
- attachment2.setRepositoryKind("bugzilla2");
- attachment2.setRepositoryUrl("repUrl2");
- attachment2.setTaskId("taskid2");
- attachment2.addAttribute("attr3", new RepositoryTaskAttribute("attr3", "attr3Name", true));
- attachment2.addAttribute("attr4", new RepositoryTaskAttribute("attr4", "attr4Name", true));
-
- attachments.add(attachment1);
- attachments.add(attachment2);
- XMLMemento memento = XMLMemento.createWriteRoot("Attachments");
- storage.addAttachments(memento, attachments);
- List<RepositoryAttachment> readAttachments = storage.readAttachments(memento);
-
- assertEquals(2, readAttachments.size());
- RepositoryAttachment readAttachment = readAttachments.get(0);
- assertEquals(attachment1.getTaskId(), readAttachment.getTaskId());
- assertEquals(attachment1.getCreator(), readAttachment.getCreator());
- assertEquals(attachment1.isObsolete(), readAttachment.isObsolete());
- assertEquals(attachment1.isPatch(), readAttachment.isPatch());
- assertEquals(attachment1.getRepositoryKind(), readAttachment.getRepositoryKind());
- assertEquals(attachment1.getRepositoryUrl(), readAttachment.getRepositoryUrl());
- assertEquals(attachment1.getAttributeValue("attr1"), readAttachment.getAttributeValue("attr1"));
- assertEquals(attachment1.getAttributeValue("attr2"), readAttachment.getAttributeValue("attr2"));
-
- readAttachment = readAttachments.get(1);
- assertEquals(attachment2.getTaskId(), readAttachment.getTaskId());
- assertEquals(attachment2.getCreator(), readAttachment.getCreator());
- assertEquals(attachment2.isObsolete(), readAttachment.isObsolete());
- assertEquals(attachment2.isPatch(), readAttachment.isPatch());
- assertEquals(attachment2.getRepositoryKind(), readAttachment.getRepositoryKind());
- assertEquals(attachment2.getRepositoryUrl(), readAttachment.getRepositoryUrl());
- assertEquals(attachment2.getAttributeValue("attr3"), readAttachment.getAttributeValue("attr3"));
- assertEquals(attachment2.getAttributeValue("attr4"), readAttachment.getAttributeValue("attr4"));
- }
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/OrphanedTasksTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/OrphanedTasksTest.java
deleted file mode 100644
index af20ba1b5..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/OrphanedTasksTest.java
+++ /dev/null
@@ -1,352 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import java.util.Set;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.LocalRepositoryConnector;
-import org.eclipse.mylyn.internal.tasks.core.LocalTask;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
-import org.eclipse.mylyn.internal.tasks.core.TaskCategory;
-import org.eclipse.mylyn.internal.tasks.core.TaskList;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.tests.connector.MockRepositoryConnector;
-import org.eclipse.mylyn.tasks.tests.connector.MockRepositoryQuery;
-import org.eclipse.mylyn.tasks.tests.connector.MockTask;
-
-/**
- * @author Rob Elves
- */
-public class OrphanedTasksTest extends TestCase {
-
- private TaskList taskList;
-
- @Override
- protected void setUp() throws Exception {
- TasksUiPlugin.getTaskListManager().resetTaskList();
- taskList = TasksUiPlugin.getTaskList();
- assertTrue(taskList.getDefaultCategory().isEmpty());
-
- TaskRepository taskRepository = new TaskRepository(MockRepositoryConnector.REPOSITORY_KIND,
- MockRepositoryConnector.REPOSITORY_URL);
- TasksUiPlugin.getRepositoryManager().addRepository(taskRepository);
- }
-
- @Override
- protected void tearDown() throws Exception {
- }
-
- /**
- * y New local tasks should automatically be created in the Local orphaned folder
- */
- public void testAddLocalTask() {
- Set<ITask> tasks = TasksUiPlugin.getTaskList().getTasks(LocalRepositoryConnector.REPOSITORY_URL);
- assertTrue(tasks.isEmpty());
- ITask localTask = TasksUiInternal.createNewLocalTask("Task 1");
- assertNotNull(localTask);
- assertEquals(1, ((AbstractTask) localTask).getParentContainers().size());
- }
-
- /**
- * When a local tasks is removed from a category it should be placed in the Uncategorized folder
- */
- public void testRemoveLocalTask() {
- TaskCategory category = new TaskCategory("taskCategoryHandle");
- taskList.addCategory(category);
- LocalTask newTask = new LocalTask("" + taskList.getNextLocalTaskId(), "new local task");
- taskList.addTask(newTask, category);
- //assertEquals(1, taskList.getOrphanContainers().size());
- assertEquals(2, taskList.getCategories().size());
- taskList.removeFromContainer(category, newTask);
- //assertEquals(taskList.getOrphanContainers().size(), 1);
- assertFalse(category.contains(newTask.getHandleIdentifier()));
- assertTrue(taskList.getDefaultCategory().contains(newTask.getHandleIdentifier()));
- assertEquals(1, newTask.getParentContainers().size());
- assertEquals(taskList.getDefaultCategory(), TaskCategory.getParentTaskCategory(newTask));
- }
-
- /**
- * Local tasks in a removed category should be orphaned.
- */
- public void testLocalTaskOrphanedInDeletedTaskCategory() {
- assertTrue(taskList.getDefaultCategory().isEmpty());
- TaskCategory category = new TaskCategory("taskCategoryHandle");
- taskList.addCategory(category);
- LocalTask newTask = new LocalTask("" + taskList.getNextLocalTaskId(), "new local task");
- taskList.addTask(newTask, category);
- assertTrue(taskList.getDefaultCategory().isEmpty());
- taskList.deleteCategory(category);
- assertTrue(taskList.getDefaultCategory().contains(newTask.getHandleIdentifier()));
-
- }
-
- /**
- * Query removed with task in category, just query removed task remains.
- */
- public void testTaskRemovedFromQuery() {
- MockTask mockTask = new MockTask("1");
- mockTask.setLastReadTimeStamp("now");
- MockRepositoryQuery mockQuery = new MockRepositoryQuery("mock query");
- taskList.addQuery(mockQuery);
- taskList.addTask(mockTask, mockQuery);
-
- taskList.removeFromContainer(mockQuery, mockTask);
-
- assertFalse(mockQuery.contains(mockTask.getHandleIdentifier()));
- assertTrue(taskList.getUnmatchedContainer(MockRepositoryConnector.REPOSITORY_URL).contains(
- mockTask.getHandleIdentifier()));
- }
-
- /**
- * Query removed with task in category, just query removed task remains.
- */
- public void testTaskRemovedFromQueryButInCategory() {
- MockTask mockTask = new MockTask("1");
- mockTask.setLastReadTimeStamp("now");
- MockRepositoryQuery mockQuery = new MockRepositoryQuery("mock query");
- taskList.addQuery(mockQuery);
- taskList.addTask(mockTask, mockQuery);
-
- TaskCategory category = new TaskCategory("taskCategoryHandle");
- taskList.addCategory(category);
- taskList.addTask(mockTask, category);
- assertTrue(category.contains(mockTask.getHandleIdentifier()));
- taskList.removeFromContainer(mockQuery, mockTask);
-
- assertFalse(mockQuery.contains(mockTask.getHandleIdentifier()));
- assertEquals(2, taskList.getCategories().size());
- assertTrue(category.contains(mockTask.getHandleIdentifier()));
-
- //* Repository tasks within a removed category that are not in a query should be orphaned.
-
- taskList.removeFromContainer(category, mockTask);
- assertTrue(taskList.getUnmatchedContainer(MockRepositoryConnector.REPOSITORY_URL).contains(
- mockTask.getHandleIdentifier()));
- }
-
- /**
- * Repository tasks that exists in a query are not orphaned.
- */
- public void testRepositoryTaskInDeletedCategory() {
- MockTask mockTask = new MockTask("1");
- MockRepositoryQuery mockQuery = new MockRepositoryQuery("mock query");
- taskList.addQuery(mockQuery);
- taskList.addTask(mockTask, mockQuery);
- assertEquals(1, taskList.getCategories().size());
- TaskCategory category = new TaskCategory("taskCategoryHandle");
- taskList.addCategory(category);
- taskList.addTask(mockTask, category);
- assertEquals(2, taskList.getCategories().size());
- assertTrue(taskList.getDefaultCategory().isEmpty());
- taskList.deleteCategory(category);
- assertTrue(taskList.getUnmatchedContainer(MockRepositoryConnector.REPOSITORY_URL).isEmpty());
- assertEquals(1, taskList.getCategories().size());
- }
-
- /**
- * Repository tasks in deleted queries are orphaned.
- */
- public void testRepositoryTaskInDeletedQuery() {
- MockTask mockTask = new MockTask("1");
- MockRepositoryQuery mockQuery = new MockRepositoryQuery("mock query");
- taskList.addQuery(mockQuery);
- assertTrue(taskList.getQueries().size() > 0);
- taskList.addTask(mockTask, mockQuery);
- assertTrue(mockQuery.contains(mockTask.getHandleIdentifier()));
- assertTrue(taskList.getUnmatchedContainer(MockRepositoryConnector.REPOSITORY_URL).isEmpty());
- taskList.deleteQuery(mockQuery);
- assertTrue(taskList.getQueries().size() == 0);
- assertFalse(taskList.getUnmatchedContainer(MockRepositoryConnector.REPOSITORY_URL).isEmpty());
- }
-
- /**
- * If a task exists in a category and is a query hit it should not be removed from the category
- */
- public void testQueryRemovedTaskInCategory() {
- MockTask mockTask = new MockTask("1");
- MockRepositoryQuery mockQuery = new MockRepositoryQuery("mock query");
- taskList.addQuery(mockQuery);
- taskList.addTask(mockTask, mockQuery);
- assertTrue(taskList.getDefaultCategory().isEmpty());
- taskList.addTask(mockTask, taskList.getDefaultCategory());
- assertEquals(1, taskList.getCategories().size());
- assertFalse(taskList.getDefaultCategory().isEmpty());
- // save tasklist, restore tasklist
- TasksUiPlugin.getExternalizationManager().saveNow(null);
- TasksUiPlugin.getTaskListManager().resetTaskList();
- TasksUiPlugin.getTaskListManager().readExistingOrCreateNewList();
- assertEquals(1, taskList.getCategories().size());
- assertEquals(1, taskList.getQueries().size());
- assertFalse(taskList.getDefaultCategory().isEmpty());
- taskList.deleteQuery(mockQuery);
- TasksUiPlugin.getTaskListManager().saveTaskList();
- TasksUiPlugin.getTaskListManager().resetTaskList();
- TasksUiPlugin.getTaskListManager().readExistingOrCreateNewList();
- assertEquals(1, taskList.getCategories().size());
- assertEquals(0, taskList.getQueries().size());
- assertFalse(taskList.getDefaultCategory().isEmpty());
- }
-
- /**
- * Repository tasks that exist in another query are not orphaned
- */
- public void testRemovalOfTaskInTwoQueries() {
- MockTask mockTask = new MockTask("1");
- MockRepositoryQuery mockQuery = new MockRepositoryQuery("mock query 1");
- MockRepositoryQuery mockQuery2 = new MockRepositoryQuery("mock query 2");
- taskList.addQuery(mockQuery);
- taskList.addQuery(mockQuery2);
- taskList.addTask(mockTask, mockQuery);
- taskList.addTask(mockTask, mockQuery2);
-
- taskList.removeFromContainer(mockQuery2, mockTask);
- assertTrue(mockQuery2.isEmpty());
- assertFalse(mockQuery.isEmpty());
- assertTrue(taskList.getUnmatchedContainer(MockRepositoryConnector.REPOSITORY_URL).isEmpty());
- }
-
- /**
- * Moving an orphan to a Category should result in the task only being present in the target Category
- */
- public void testMoveLocalTask() {
- TaskCategory category = new TaskCategory("taskCategoryHandle");
- taskList.addCategory(category);
- LocalTask newTask = new LocalTask("" + taskList.getNextLocalTaskId(), "new local task");
- taskList.addTask(newTask, null);
- assertTrue(taskList.getDefaultCategory().contains(newTask.getHandleIdentifier()));
- taskList.addTask(newTask, category);
- assertFalse(taskList.getDefaultCategory().contains(newTask.getHandleIdentifier()));
- }
-
- public void testAddRepositoryTask() {
- MockTask mockTask = new MockTask("1");
- MockRepositoryQuery mockQuery = new MockRepositoryQuery("mock query");
- TasksUiPlugin.getTaskList().addQuery(mockQuery);
- TasksUiPlugin.getTaskList().addTask(mockTask, mockQuery);
- Set<ITask> tasks = TasksUiPlugin.getTaskList().getTasks(MockRepositoryConnector.REPOSITORY_URL);
- assertFalse(tasks.isEmpty());
-
- RepositoryQuery query = (RepositoryQuery) mockTask.getParentContainers().iterator().next();
- assertEquals(mockQuery, query);
- assertFalse(query.isEmpty());
- assertTrue(TasksUiPlugin.getTaskList().getUnmatchedContainer(MockRepositoryConnector.REPOSITORY_URL).isEmpty());
- }
-
- public void testMoveRepositoryTask() {
- TaskList tasklist = TasksUiPlugin.getTaskList();
- assertTrue(tasklist.getAllTasks().isEmpty());
-
- MockTask mockTask = new MockTask("1");
- MockRepositoryQuery mockQuery = new MockRepositoryQuery("mock query");
- TasksUiPlugin.getTaskList().addQuery(mockQuery);
- TasksUiPlugin.getTaskList().addTask(mockTask, mockQuery);
-
- TaskCategory category = new TaskCategory("taskCategoryHandle");
- taskList.addCategory(category);
-
- taskList.addTask(mockTask, category);
- assertTrue(taskList.getDefaultCategory().isEmpty());
- assertTrue(category.contains(mockTask.getHandleIdentifier()));
- assertTrue(mockQuery.contains(mockTask.getHandleIdentifier()));
-
- }
-
- public void testRefactorOrphanedHandle() {
- MockTask mockTask = new MockTask("1");
- mockTask.setLastReadTimeStamp("now");
- MockRepositoryQuery mockQuery = new MockRepositoryQuery("mock query");
- taskList.addQuery(mockQuery);
- taskList.addTask(mockTask, mockQuery);
-
- taskList.removeFromContainer(mockQuery, mockTask);
-
- assertFalse(mockQuery.contains(mockTask.getHandleIdentifier()));
- assertTrue(taskList.getUnmatchedContainer(MockRepositoryConnector.REPOSITORY_URL).contains(
- mockTask.getHandleIdentifier()));
-
- taskList.refactorRepositoryUrl(MockRepositoryConnector.REPOSITORY_URL, MockRepositoryConnector.REPOSITORY_URL
- + "new");
- assertTrue(taskList.getUnmatchedContainer(MockRepositoryConnector.REPOSITORY_URL + "new").contains(
- mockTask.getHandleIdentifier()));
- }
-
- public void testOrphanedSubtasks() {
- MockTask mockTask = new MockTask("1");
- MockTask mockTask2 = new MockTask("2");
- MockRepositoryQuery mockQuery = new MockRepositoryQuery("mock query");
- TasksUiPlugin.getTaskList().addQuery(mockQuery);
- TasksUiPlugin.getTaskList().addTask(mockTask, mockQuery);
- TasksUiPlugin.getTaskList().addTask(mockTask2, mockTask);
-
- assertFalse(taskList.getUnmatchedContainer(MockRepositoryConnector.REPOSITORY_URL).contains(
- mockTask.getHandleIdentifier()));
- assertFalse(taskList.getUnmatchedContainer(MockRepositoryConnector.REPOSITORY_URL).contains(
- mockTask2.getHandleIdentifier()));
-
- assertNotNull(taskList.getTask(mockTask.getHandleIdentifier()));
- assertNotNull(taskList.getTask(mockTask2.getHandleIdentifier()));
- assertNotNull(taskList.getUnmatchedContainer(MockRepositoryConnector.REPOSITORY_URL));
- taskList.removeFromContainer(mockQuery, mockTask);
- assertTrue(taskList.getUnmatchedContainer(MockRepositoryConnector.REPOSITORY_URL).contains(
- mockTask.getHandleIdentifier()));
- assertTrue(mockTask.contains(mockTask2.getHandleIdentifier()));
- taskList.deleteTask(mockTask);
- assertFalse(taskList.getUnmatchedContainer(MockRepositoryConnector.REPOSITORY_URL).contains(
- mockTask.getHandleIdentifier()));
- // mockTask2 should be orphaned when the parent task is deleted
- assertTrue(taskList.getUnmatchedContainer(MockRepositoryConnector.REPOSITORY_URL).contains(
- mockTask2.getHandleIdentifier()));
- }
-
- /**
- * If a task with subtasks falls out of a query, if its subtasks are subtasks of another task that is still around,
- * they shouldn't be in the archive.
- */
- public void testOrphanedSubtaskWithOtherParent() {
- MockTask mockTask = new MockTask("1");
- MockTask mockTask2 = new MockTask("2");
- MockTask mockTask3 = new MockTask("3");
- MockRepositoryQuery mockQuery = new MockRepositoryQuery("mock query");
- TasksUiPlugin.getTaskList().addQuery(mockQuery);
- TasksUiPlugin.getTaskList().addTask(mockTask, mockQuery);
- TasksUiPlugin.getTaskList().addTask(mockTask2, mockTask);
- TasksUiPlugin.getTaskList().addTask(mockTask3, mockQuery);
- TasksUiPlugin.getTaskList().addTask(mockTask2, mockTask3);
- assertFalse(taskList.getUnmatchedContainer(MockRepositoryConnector.REPOSITORY_URL).contains(
- mockTask.getHandleIdentifier()));
- assertFalse(taskList.getUnmatchedContainer(MockRepositoryConnector.REPOSITORY_URL).contains(
- mockTask2.getHandleIdentifier()));
- assertFalse(taskList.getUnmatchedContainer(MockRepositoryConnector.REPOSITORY_URL).contains(
- mockTask3.getHandleIdentifier()));
-
- taskList.removeFromContainer(mockQuery, mockTask);
- assertTrue(taskList.getUnmatchedContainer(MockRepositoryConnector.REPOSITORY_URL).contains(
- mockTask.getHandleIdentifier()));
- assertTrue(mockTask.contains(mockTask2.getHandleIdentifier()));
-
- // True since mockTask is contained and has mockTask2 as a subtask
-// assertFalse(taskList.getUnmatchedContainer(MockRepositoryConnector.REPOSITORY_URL).contains(
-// mockTask2.getHandleIdentifier()));
-
- taskList.removeFromContainer(mockQuery, mockTask3);
- assertTrue(taskList.getUnmatchedContainer(MockRepositoryConnector.REPOSITORY_URL).contains(
- mockTask3.getHandleIdentifier()));
- assertTrue(mockTask3.contains(mockTask2.getHandleIdentifier()));
- // True since mockTask is contained and has mockTask2 as a subtask
-// assertFalse(taskList.getUnmatchedContainer(MockRepositoryConnector.REPOSITORY_URL).contains(
-// mockTask2.getHandleIdentifier()));
-
- }
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/PersonProposalProviderTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/PersonProposalProviderTest.java
deleted file mode 100644
index 07087eca6..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/PersonProposalProviderTest.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jface.fieldassist.IContentProposal;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-import org.eclipse.mylyn.internal.tasks.ui.PersonProposalProvider;
-import org.eclipse.mylyn.internal.tasks.ui.TaskListManager;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.tests.connector.MockRepositoryConnector;
-import org.eclipse.mylyn.tasks.tests.connector.MockRepositoryQuery;
-import org.eclipse.mylyn.tasks.tests.connector.MockTask;
-
-/**
- * @author Frank Becker
- * @author Steffen Pingel
- */
-public class PersonProposalProviderTest extends TestCase {
-
- private TaskListManager manager;
-
- @Override
- protected void setUp() throws Exception {
- manager = TasksUiPlugin.getTaskListManager();
- manager.resetTaskList();
- }
-
- @Override
- protected void tearDown() throws Exception {
- manager.resetTaskList();
- TasksUiPlugin.getRepositoryManager().clearRepositories(TasksUiPlugin.getDefault().getRepositoriesFilePath());
- }
-
- public void testGetProposalsNullParameters() {
- PersonProposalProvider provider = new PersonProposalProvider((AbstractTask) null, (RepositoryTaskData) null);
- IContentProposal[] result = provider.getProposals("", 0);
- assertNotNull(result);
- assertEquals(0, result.length);
-
- result = provider.getProposals(" ", 1);
- assertNotNull(result);
- assertEquals(0, result.length);
- }
-
- public void testGetProposalsCurrentTask() {
- MockTask task = new MockTask(null, "1", null);
- task.setOwner("foo");
- PersonProposalProvider provider = new PersonProposalProvider(task, (RepositoryTaskData) null);
- IContentProposal[] result = provider.getProposals("", 0);
- assertNotNull(result);
- assertEquals(1, result.length);
- assertEquals("foo", result[0].getContent());
-
- result = provider.getProposals("a", 1);
- assertNotNull(result);
- assertEquals(0, result.length);
-
- result = provider.getProposals("fo", 2);
- assertNotNull(result);
- assertEquals(1, result.length);
- assertEquals("foo", result[0].getContent());
-
- result = provider.getProposals("", 0);
- assertNotNull(result);
- assertEquals(1, result.length);
- assertEquals("foo", result[0].getContent());
- }
-
- public void testGetProposalsMultipleAddresses() {
- IContentProposal[] result;
-
- MockTask task = new MockTask(null, "1", null);
- task.setOwner("foo");
- PersonProposalProvider provider = new PersonProposalProvider(task, (RepositoryTaskData) null);
-
- result = provider.getProposals("f,xx", 1);
- assertNotNull(result);
- assertEquals(1, result.length);
- assertEquals("foo,xx", result[0].getContent());
- assertEquals("foo", result[0].getLabel());
- assertEquals(3, result[0].getCursorPosition());
-
- result = provider.getProposals("f xx", 1);
- assertNotNull(result);
- assertEquals(1, result.length);
- assertEquals("foo xx", result[0].getContent());
- assertEquals("foo", result[0].getLabel());
- assertEquals(3, result[0].getCursorPosition());
-
- result = provider.getProposals("a,xx", 1);
- assertNotNull(result);
- assertEquals(0, result.length);
-
- result = provider.getProposals("xx,f", 4);
- assertNotNull(result);
- assertEquals(1, result.length);
- assertEquals("xx,foo", result[0].getContent());
- assertEquals("foo", result[0].getLabel());
- assertEquals(6, result[0].getCursorPosition());
-
- result = provider.getProposals("xx f", 4);
- assertNotNull(result);
- assertEquals(1, result.length);
- assertEquals("xx foo", result[0].getContent());
- assertEquals("foo", result[0].getLabel());
- assertEquals(6, result[0].getCursorPosition());
-
- result = provider.getProposals("xx,a", 4);
- assertNotNull(result);
- assertEquals(0, result.length);
-
- result = provider.getProposals("xyz,f,yy", 4);
- assertNotNull(result);
- assertEquals(1, result.length);
- assertEquals("xyz,foo,yy", result[0].getContent());
- assertEquals("foo", result[0].getLabel());
- assertEquals(7, result[0].getCursorPosition());
-
- result = provider.getProposals("xx f yy", 4);
- assertNotNull(result);
- assertEquals(1, result.length);
- assertEquals("xx foo yy", result[0].getContent());
- assertEquals("foo", result[0].getLabel());
- assertEquals(6, result[0].getCursorPosition());
-
- result = provider.getProposals("xx,a,yy", 4);
- assertNotNull(result);
- assertEquals(0, result.length);
-
- result = provider.getProposals("xx,,yy", 3);
- assertNotNull(result);
- assertEquals(1, result.length);
- assertEquals("xx,foo,yy", result[0].getContent());
- assertEquals("foo", result[0].getLabel());
- assertEquals(6, result[0].getCursorPosition());
-
- result = provider.getProposals("x yy", 2);
- assertNotNull(result);
- assertEquals(1, result.length);
- assertEquals("x foo", result[0].getContent());
- assertEquals("foo", result[0].getLabel());
- assertEquals(5, result[0].getCursorPosition());
-
- result = provider.getProposals(", ", 1);
- assertNotNull(result);
- assertEquals(1, result.length);
- assertEquals(",foo ", result[0].getContent());
- assertEquals("foo", result[0].getLabel());
- assertEquals(4, result[0].getCursorPosition());
-
- result = provider.getProposals(", ", 0);
- assertNotNull(result);
- assertEquals(1, result.length);
- assertEquals("foo, ", result[0].getContent());
- assertEquals("foo", result[0].getLabel());
- assertEquals(3, result[0].getCursorPosition());
- }
-
- public void testConstructorRepositoryUrlKind() throws Exception {
- IContentProposal[] result;
-
- MockTask task1 = new MockTask(MockRepositoryConnector.REPOSITORY_URL, "1");
- task1.setOwner("foo");
- PersonProposalProvider provider = new PersonProposalProvider(MockRepositoryConnector.REPOSITORY_URL,
- MockRepositoryConnector.REPOSITORY_KIND);
- MockRepositoryQuery query = new MockRepositoryQuery("summary");
- manager.getTaskList().addQuery(query);
- manager.getTaskList().addTask(task1, query);
-
- result = provider.getProposals("f,xx", 1);
- assertNotNull(result);
- assertEquals(1, result.length);
- assertEquals("foo,xx", result[0].getContent());
- assertEquals("foo", result[0].getLabel());
- assertEquals(3, result[0].getCursorPosition());
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ProjectRepositoryAssociationTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ProjectRepositoryAssociationTest.java
deleted file mode 100644
index 3c4a7d3d3..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ProjectRepositoryAssociationTest.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.resources.tests.ResourceTestUtil;
-import org.eclipse.mylyn.resources.tests.TestProject;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-/**
- * @author Rob Elves
- */
-public class ProjectRepositoryAssociationTest extends TestCase {
-
- private static final String REPOSITORY_URL = "http://mylyn.eclipse.org/bugs222";
-
- private static final String REPOSITORY_KIND = "bugzilla";
-
- private TestProject projectWrapper;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- projectWrapper = new TestProject(this.getClass().getName());
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
- ResourceTestUtil.deleteProject(projectWrapper.getProject());
- TasksUiPlugin.getRepositoryManager().clearRepositories(TasksUiPlugin.getDefault().getRepositoriesFilePath());
- }
-
- public void testRepositoryForProject() throws CoreException {
- assertNull(TasksUiPlugin.getDefault().getRepositoryForResource(projectWrapper.getProject()));
- TaskRepository repository = new TaskRepository(REPOSITORY_KIND, REPOSITORY_URL);
- TasksUiPlugin.getRepositoryManager().addRepository(repository);
- TasksUiPlugin.getDefault().setRepositoryForResource(projectWrapper.getProject(), repository);
- TaskRepository returnedRepository = TasksUiPlugin.getDefault().getRepositoryForResource(
- projectWrapper.getProject());
- assertNotNull(returnedRepository);
- assertEquals(REPOSITORY_KIND, returnedRepository.getConnectorKind());
- assertEquals(REPOSITORY_URL, returnedRepository.getRepositoryUrl());
-
- TasksUiPlugin.getRepositoryManager().removeRepository(repository,
- TasksUiPlugin.getDefault().getRepositoriesFilePath());
- }
-
- public void testRepositoryForFolder() throws CoreException {
- IFolder folder = projectWrapper.createFolder("testFolder");
- assertTrue(folder.exists());
- assertNull(TasksUiPlugin.getDefault().getRepositoryForResource(folder));
- TaskRepository repository = new TaskRepository(REPOSITORY_KIND, REPOSITORY_URL);
- TasksUiPlugin.getRepositoryManager().addRepository(repository);
- TasksUiPlugin.getDefault().setRepositoryForResource(folder, repository);
- TaskRepository returnedRepository = TasksUiPlugin.getDefault().getRepositoryForResource(folder);
- assertNotNull(returnedRepository);
- assertEquals(REPOSITORY_KIND, returnedRepository.getConnectorKind());
- assertEquals(REPOSITORY_URL, returnedRepository.getRepositoryUrl());
-
- TasksUiPlugin.getRepositoryManager().removeRepository(repository,
- TasksUiPlugin.getDefault().getRepositoriesFilePath());
- }
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/QueryExportImportTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/QueryExportImportTest.java
deleted file mode 100644
index e2e1803aa..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/QueryExportImportTest.java
+++ /dev/null
@@ -1,337 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 - 2006 University Of British Columbia 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:
- * University Of British Columbia - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipInputStream;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
-import org.eclipse.mylyn.internal.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractTaskListFactory;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.actions.QueryImportAction;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.tests.connector.MockRepositoryConnector;
-import org.eclipse.mylyn.tasks.tests.connector.MockRepositoryQuery;
-import org.eclipse.mylyn.tasks.tests.connector.MockTaskListFactory;
-
-/**
- * @author Jevgeni Holodkov
- */
-public class QueryExportImportTest extends TestCase {
-
- private File dest;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
-
- removeFiles(new File(TasksUiPlugin.getDefault().getDataDirectory()));
-
- // Create test export destination directory
- dest = new File(TasksUiPlugin.getDefault().getDataDirectory() + File.separator + "TestDir");
- if (dest.exists()) {
- removeFiles(dest);
- } else {
- dest.mkdir();
- }
- assertTrue(dest.exists());
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
-
- removeFiles(dest);
- dest.delete();
- assertFalse(dest.exists());
- // Don't want synch manager to be in asynch mode for tests so commented out:
- //TasksUiPlugin.getSynchronizationManager().setForceSyncExec(false);
- }
-
- public void testExportImportQuery() throws Exception {
- List<AbstractTaskListFactory> oldExternalizers = TasksUiPlugin.getTaskListManager()
- .getTaskListWriter()
- .getExternalizers();
- List<AbstractTaskListFactory> externalizers = new ArrayList<AbstractTaskListFactory>();
- externalizers.add(new MockTaskListFactory());
- TasksUiPlugin.getTaskListManager().getTaskListWriter().setDelegateExternalizers(externalizers);
-
- List<RepositoryQuery> queries = new ArrayList<RepositoryQuery>();
-
- MockRepositoryQuery query1 = new MockRepositoryQuery("Test Query");
- query1.setRepositoryUrl(MockRepositoryConnector.REPOSITORY_URL);
- MockRepositoryQuery query2 = new MockRepositoryQuery("Test Query 2");
- query2.setRepositoryUrl(MockRepositoryConnector.REPOSITORY_URL);
- queries.add(query1);
- queries.add(query2);
-
- File outFile = new File(dest, "test-query.xml.zip");
-
- TasksUiPlugin.getTaskListManager().getTaskListWriter().writeQueries(queries, outFile);
- assertTrue(outFile.exists());
-
- File inFile = new File(dest, "test-query.xml.zip");
- List<RepositoryQuery> resultQueries = TasksUiPlugin.getTaskListManager()
- .getTaskListWriter()
- .readQueries(inFile);
- assertEquals("2 Queries is imported", 2, resultQueries.size());
- TasksUiPlugin.getTaskListManager().getTaskListWriter().setDelegateExternalizers(oldExternalizers);
- }
-
- public void testImportedQueriesNameConflictResolving1() {
- // prepare for test
- TasksUiPlugin.getTaskListManager().resetTaskList();
- TaskRepository repository = new TaskRepository(MockRepositoryConnector.REPOSITORY_KIND,
- MockRepositoryConnector.REPOSITORY_URL);
- TasksUiPlugin.getRepositoryManager().addRepository(repository);
-
- // create test data
- List<RepositoryQuery> queries = new ArrayList<RepositoryQuery>();
-
- MockRepositoryQuery query1 = new MockRepositoryQuery("Test Query");
- query1.setRepositoryUrl(repository.getRepositoryUrl());
- MockRepositoryQuery query2 = new MockRepositoryQuery("Test Query");
- query2.setRepositoryUrl(repository.getRepositoryUrl());
- MockRepositoryQuery query3 = new MockRepositoryQuery("Test Query");
- query3.setRepositoryUrl(repository.getRepositoryUrl());
-
- queries.add(query1);
- queries.add(query2);
- queries.add(query3);
-
- // run tested functionality
- QueryImportAction action = new QueryImportAction();
- action.insertQueries(queries);
-
- // extract results
- Set<RepositoryQuery> queriesSet = TasksUiPlugin.getTaskList().getQueries();
- Map<String, RepositoryQuery> queriesMap = new HashMap<String, RepositoryQuery>();
- for (RepositoryQuery query : queriesSet) {
- queriesMap.put(query.getHandleIdentifier(), query);
- }
-
- // check that the actual result is correct
- assertTrue("'Test Query' query inserted", queriesMap.containsKey("Test Query"));
- assertTrue("'Test Query[1]' query inserted", queriesMap.containsKey("Test Query[1]"));
- assertTrue("'Test Query[2]' query inserted", queriesMap.containsKey("Test Query[2]"));
- }
-
- public void testImportedQueriesNameConflictResolving2() {
- // prepare for test
- TasksUiPlugin.getTaskListManager().resetTaskList();
- TaskRepository repository = new TaskRepository(MockRepositoryConnector.REPOSITORY_KIND,
- MockRepositoryConnector.REPOSITORY_URL);
- TasksUiPlugin.getRepositoryManager().addRepository(repository);
-
- // create test data
- List<RepositoryQuery> queries = new ArrayList<RepositoryQuery>();
-
- MockRepositoryQuery query1 = new MockRepositoryQuery("Test2");
- query1.setRepositoryUrl(repository.getRepositoryUrl());
- MockRepositoryQuery query2 = new MockRepositoryQuery("Test2[1]");
- query2.setRepositoryUrl(repository.getRepositoryUrl());
- MockRepositoryQuery query3 = new MockRepositoryQuery("Test2");
- query3.setRepositoryUrl(repository.getRepositoryUrl());
-
- queries.add(query1);
- queries.add(query2);
- queries.add(query3);
-
- // run tested functionality
- QueryImportAction action = new QueryImportAction();
- action.insertQueries(queries);
-
- // extract results
- Set<RepositoryQuery> queriesSet = TasksUiPlugin.getTaskList().getQueries();
- Map<String, RepositoryQuery> queriesMap = new HashMap<String, RepositoryQuery>();
- for (RepositoryQuery query : queriesSet) {
- queriesMap.put(query.getHandleIdentifier(), query);
- }
-
- // check that the actual result is correct
- assertTrue("'Test2' query inserted", queriesMap.containsKey("Test2"));
- assertTrue("'Test2[1]' query inserted", queriesMap.containsKey("Test2[1]"));
- assertTrue("'Test2[2]' query inserted", queriesMap.containsKey("Test2[2]"));
-
- }
-
- public void testImportedBadQueriesNameConflictResolving() {
- // prepare for test
- TasksUiPlugin.getTaskListManager().resetTaskList();
- TaskRepository repository = new TaskRepository(MockRepositoryConnector.REPOSITORY_KIND,
- MockRepositoryConnector.REPOSITORY_URL);
- TasksUiPlugin.getRepositoryManager().addRepository(repository);
-
- // create test data
- List<RepositoryQuery> queries = new ArrayList<RepositoryQuery>();
-
- MockRepositoryQuery query1 = new MockRepositoryQuery("Test[-10]");
- query1.setRepositoryUrl(repository.getRepositoryUrl());
- MockRepositoryQuery query2 = new MockRepositoryQuery("Test[ABC]");
- query2.setRepositoryUrl(repository.getRepositoryUrl());
- MockRepositoryQuery query3 = new MockRepositoryQuery("Test[1]");
- query3.setRepositoryUrl(repository.getRepositoryUrl());
- MockRepositoryQuery query4 = new MockRepositoryQuery("Test");
- query4.setRepositoryUrl(repository.getRepositoryUrl());
- MockRepositoryQuery query5 = new MockRepositoryQuery("Test");
- query5.setRepositoryUrl(repository.getRepositoryUrl());
-
- queries.add(query1);
- queries.add(query2);
- queries.add(query3);
- queries.add(query4);
- queries.add(query5);
-
- // run tested functionality
- QueryImportAction action = new QueryImportAction();
- action.insertQueries(queries);
-
- // extract results
- Set<RepositoryQuery> queriesSet = TasksUiPlugin.getTaskList().getQueries();
- Map<String, RepositoryQuery> queriesMap = new HashMap<String, RepositoryQuery>();
- for (RepositoryQuery query : queriesSet) {
- queriesMap.put(query.getHandleIdentifier(), query);
- }
-
- // check that the actual result is correct
- assertTrue("'Test[-10]' query inserted", queriesMap.containsKey("Test[-10]"));
- assertTrue("'Test[ABC]' query inserted", queriesMap.containsKey("Test[ABC]"));
- assertTrue("'Test[1]' query inserted", queriesMap.containsKey("Test[1]"));
- assertTrue("'Test' query inserted", queriesMap.containsKey("Test"));
- assertTrue("Another 'Test' query inserted", queriesMap.containsKey("Test[2]"));
- }
-
- public void testImportedBadQueries() {
- // prepare for test
- TasksUiPlugin.getTaskListManager().resetTaskList();
- TaskRepository repository = new TaskRepository(MockRepositoryConnector.REPOSITORY_KIND,
- MockRepositoryConnector.REPOSITORY_URL);
- TasksUiPlugin.getRepositoryManager().addRepository(repository);
-
- // create test data
- List<RepositoryQuery> queries = new ArrayList<RepositoryQuery>();
-
- MockRepositoryQuery query1 = new MockRepositoryQuery("Test Query");
- query1.setRepositoryUrl(repository.getRepositoryUrl());
- MockRepositoryQuery query2 = new MockRepositoryQuery("Bad Query");
- query2.setRepositoryUrl("bad url");
-
- queries.add(query1);
- queries.add(query2);
-
- // run tested functionality
- QueryImportAction action = new QueryImportAction();
- List<RepositoryQuery> badQueries = action.insertQueries(queries);
-
- // extract results
- Set<RepositoryQuery> queriesSet = TasksUiPlugin.getTaskList().getQueries();
- Map<String, RepositoryQuery> queriesMap = new HashMap<String, RepositoryQuery>();
- for (RepositoryQuery query : queriesSet) {
- queriesMap.put(query.getHandleIdentifier(), query);
- }
-
- // check that the actual result is correct
- assertEquals("There is a bad query", 1, badQueries.size());
- assertEquals(query2, badQueries.get(0));
- assertTrue("'Test Query' query inserted", queriesMap.containsKey("Test Query"));
- }
-
- public void testExportImportQueryWithRepositoryInfo() throws Exception {
- // prepare for test
- TasksUiPlugin.getTaskListManager().resetTaskList();
- List<AbstractTaskListFactory> oldExternalizers = TasksUiPlugin.getTaskListManager()
- .getTaskListWriter()
- .getExternalizers();
- List<AbstractTaskListFactory> externalizers = new ArrayList<AbstractTaskListFactory>();
- externalizers.add(new MockTaskListFactory());
- TasksUiPlugin.getTaskListManager().getTaskListWriter().setDelegateExternalizers(externalizers);
-
- TaskRepository repository = new TaskRepository(MockRepositoryConnector.REPOSITORY_KIND,
- MockRepositoryConnector.REPOSITORY_URL);
- TasksUiPlugin.getRepositoryManager().addRepository(repository);
-
- // create test data
- List<RepositoryQuery> queries = new ArrayList<RepositoryQuery>();
- MockRepositoryQuery query1 = new MockRepositoryQuery("Test Query");
- query1.setRepositoryUrl(repository.getRepositoryUrl());
- queries.add(query1);
-
- File outFile = new File(dest, "test-repository-query.xml.zip");
-
- TasksUiPlugin.getTaskListManager().getTaskListWriter().writeQueries(queries, outFile);
-
- assertTrue(outFile.exists());
-
- List<String> files = new ArrayList<String>();
- ZipInputStream inputStream = new ZipInputStream(new FileInputStream(outFile));
- ZipEntry entry = null;
- while ((entry = inputStream.getNextEntry()) != null) {
- files.add(entry.getName());
- }
- inputStream.close();
-
- assertTrue("exported file contains a file with queries", files.contains(ITasksCoreConstants.OLD_TASK_LIST_FILE));
- assertTrue("exported file contains a file with repositories",
- files.contains(TaskRepositoryManager.OLD_REPOSITORIES_FILE));
-
- TasksUiPlugin.getRepositoryManager().clearRepositories(TasksUiPlugin.getDefault().getRepositoriesFilePath());
- assertTrue("There are currently no repositories defined", TasksUiPlugin.getRepositoryManager().getRepository(
- MockRepositoryConnector.REPOSITORY_URL) == null);
-
- List<RepositoryQuery> resultQueries = TasksUiPlugin.getTaskListManager().getTaskListWriter().readQueries(
- outFile);
- Set<TaskRepository> repositories = TasksUiPlugin.getTaskListManager().getTaskListWriter().readRepositories(
- outFile);
-
- TasksUiPlugin.getRepositoryManager().insertRepositories(repositories,
- TasksUiPlugin.getDefault().getRepositoriesFilePath());
- QueryImportAction action = new QueryImportAction();
- action.insertQueries(resultQueries);
-
- // extract results
- Set<RepositoryQuery> queriesSet = TasksUiPlugin.getTaskList().getQueries();
- Map<String, RepositoryQuery> queriesMap = new HashMap<String, RepositoryQuery>();
- for (RepositoryQuery query : queriesSet) {
- queriesMap.put(query.getHandleIdentifier(), query);
- }
-
- // check that the actual result is correct
- assertTrue("'Test Query' query inserted", queriesMap.containsKey("Test Query"));
- assertTrue("1 repository is loaded", TasksUiPlugin.getRepositoryManager().getRepository(
- MockRepositoryConnector.REPOSITORY_URL) != null);
- TasksUiPlugin.getTaskListManager().getTaskListWriter().setDelegateExternalizers(oldExternalizers);
-
- }
-
- private void removeFiles(File root) {
- if (root.isDirectory()) {
- for (File file : root.listFiles()) {
- if (file.isDirectory()) {
- removeFiles(file);
- }
- file.delete();
- }
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/RepositorySettingsPageTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/RepositorySettingsPageTest.java
deleted file mode 100644
index e04154e3f..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/RepositorySettingsPageTest.java
+++ /dev/null
@@ -1,279 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jface.preference.StringFieldEditor;
-import org.eclipse.mylyn.commons.net.AuthenticationType;
-import org.eclipse.mylyn.internal.tasks.ui.TaskRepositoryUtil;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.tests.connector.MockRepositoryConnector;
-import org.eclipse.mylyn.tasks.tests.connector.MockRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.wizards.AbstractRepositorySettingsPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Steffen Pingel
- */
-public class RepositorySettingsPageTest extends TestCase {
-
- public void testNeedsEncoding() {
- TaskRepository repository = new TaskRepository("kind", "http://localhost/");
- repository.setCharacterEncoding("UTF-8");
-
- MockRepositorySettingsPage page = new MockRepositorySettingsPage(repository);
- page.setNeedsEncoding(true);
-
- Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- page.createControl(shell);
- page.setVisible(true);
-
- TaskRepository repository2 = page.createTaskRepository();
- assertEquals("UTF-8", repository2.getCharacterEncoding());
- }
-
- public void testNeedsEncodingFalse() {
- MockRepositorySettingsPage page = new MockRepositorySettingsPage(null);
- page.setNeedsEncoding(false);
-
- Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- page.createControl(shell);
- page.setVisible(true);
-
- page.createTaskRepository();
- }
-
- public void testNeedsAnonyoumousLoginFalse() {
- MockRepositorySettingsPage page = new MockRepositorySettingsPage(null);
- page.setNeedsAnonymousLogin(false);
-
- Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- page.createControl(shell);
- page.setVisible(true);
-
- assertNull(page.getAnonymousButton());
- }
-
- public void testNeedsAnonyoumousLoginNoRepository() {
- MockRepositorySettingsPage page = new MockRepositorySettingsPage(null);
- page.setNeedsAnonymousLogin(true);
-
- Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- page.createControl(shell);
- page.setVisible(true);
-
- assertNotNull(page.getAnonymousButton());
-
- assertTrue(page.getAnonymousButton().getSelection());
- assertFalse(page.getUserNameEditor().getTextControl(page.getParent()).isEnabled());
- assertFalse(page.getPasswordEditor().getTextControl(page.getParent()).isEnabled());
- assertEquals("", page.getUserName());
- assertEquals("", page.getPassword());
- page.getAnonymousButton().setSelection(false);
- }
-
- public void testNeedsAnonyoumousLogin() {
- TaskRepository repository = new TaskRepository("kind", "http://localhost/");
-
- TasksUiPlugin.getDefault().addRepositoryConnectorUi(new MockRepositoryConnectorUi());
-
- MockRepositorySettingsPage page = new MockRepositorySettingsPage(repository);
- page.setNeedsAnonymousLogin(true);
- page.setRepository(repository);
-
- Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- page.createControl(shell);
- page.setVisible(true);
-
- assertNotNull(page.getAnonymousButton());
-
- assertTrue(page.getAnonymousButton().getSelection());
- assertFalse(page.getUserNameEditor().getTextControl(page.getParent()).isEnabled());
- assertFalse(page.getPasswordEditor().getTextControl(page.getParent()).isEnabled());
- assertEquals("", page.getUserName());
- assertEquals("", page.getPassword());
-
- page.getAnonymousButton().setSelection(false);
- page.getAnonymousButton().notifyListeners(SWT.Selection, new Event());
- assertTrue(page.getUserNameEditor().getTextControl(page.getParent()).isEnabled());
- assertTrue(page.getPasswordEditor().getTextControl(page.getParent()).isEnabled());
- page.getUserNameEditor().setStringValue("user");
- page.getPasswordEditor().setStringValue("password");
- assertEquals("user", page.getUserName());
- assertEquals("password", page.getPassword());
-
- page.getAnonymousButton().setSelection(true);
- page.getAnonymousButton().notifyListeners(SWT.Selection, new Event());
- assertFalse(page.getUserNameEditor().getTextControl(page.getParent()).isEnabled());
- assertFalse(page.getPasswordEditor().getTextControl(page.getParent()).isEnabled());
- assertEquals("", page.getUserName());
- assertEquals("", page.getPassword());
-
- page.getAnonymousButton().setSelection(false);
- page.getAnonymousButton().notifyListeners(SWT.Selection, new Event());
- assertTrue(page.getUserNameEditor().getTextControl(page.getParent()).isEnabled());
- assertTrue(page.getPasswordEditor().getTextControl(page.getParent()).isEnabled());
- assertEquals("user", page.getUserNameEditor().getStringValue());
- assertEquals("password", page.getPasswordEditor().getStringValue());
- assertEquals("user", page.getUserName());
- assertEquals("password", page.getPassword());
- }
-
- public void testTemplateDeletion() {
- assertFalse(TaskRepositoryUtil.isAddAutomaticallyDisabled(MockRepositoryConnector.REPOSITORY_URL));
- TaskRepositoryUtil.disableAddAutomatically(MockRepositoryConnector.REPOSITORY_URL);
- assertTrue(TaskRepositoryUtil.isAddAutomaticallyDisabled(MockRepositoryConnector.REPOSITORY_URL));
- }
-
- public void testSavePassword() {
- TaskRepository repository = new TaskRepository("kind", "http://localhost/");
- TasksUiPlugin.getDefault().addRepositoryConnectorUi(new MockRepositoryConnectorUi());
-
- assertTrue(repository.getSavePassword(AuthenticationType.REPOSITORY));
-
- MockRepositorySettingsPage page = new MockRepositorySettingsPage(repository);
- page.setRepository(repository);
- try {
- Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- page.createControl(shell);
- assertTrue(page.getSavePassword());
- } finally {
- page.dispose();
- }
-
- repository.setCredentials(AuthenticationType.REPOSITORY, null, false);
- page = new MockRepositorySettingsPage(repository);
- page.setRepository(repository);
- try {
- Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- page.createControl(shell);
- assertFalse(page.getSavePassword());
- } finally {
- page.dispose();
- }
- }
-
- public void testSaveHttpPassword() {
- TaskRepository repository = new TaskRepository("kind", "http://localhost/");
- TasksUiPlugin.getDefault().addRepositoryConnectorUi(new MockRepositoryConnectorUi());
-
- assertTrue(repository.getSavePassword(AuthenticationType.HTTP));
-
- MockRepositorySettingsPage page = new MockRepositorySettingsPage(repository);
- page.setNeedsHttpAuth(true);
- page.setRepository(repository);
- try {
- Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- page.createControl(shell);
- assertTrue(page.getSaveHttpPassword());
- } finally {
- page.dispose();
- }
-
- repository.setCredentials(AuthenticationType.HTTP, null, false);
-// page = new MockRepositorySettingsPage(repository);
- page.setNeedsHttpAuth(true);
- page.setRepository(repository);
- try {
- Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- page.createControl(shell);
- assertFalse(page.getSaveHttpPassword());
- } finally {
- page.dispose();
- }
- }
-
- public void testSaveProxyPassword() {
- TaskRepository repository = new TaskRepository("kind", "http://localhost/");
- TasksUiPlugin.getDefault().addRepositoryConnectorUi(new MockRepositoryConnectorUi());
-
- assertTrue(repository.getSavePassword(AuthenticationType.PROXY));
-
- MockRepositorySettingsPage page = new MockRepositorySettingsPage(repository);
- page.setNeedsProxy(true);
- page.setRepository(repository);
- try {
- Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- page.createControl(shell);
- assertTrue(page.getSaveProxyPassword());
- } finally {
- page.dispose();
- }
-
- repository.setCredentials(AuthenticationType.PROXY, null, false);
- page = new MockRepositorySettingsPage(repository);
- page.setNeedsProxy(true);
- page.setRepository(repository);
- try {
- Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- page.createControl(shell);
- assertFalse(page.getSaveProxyPassword());
- } finally {
- page.dispose();
- }
- }
-
- private class MockRepositorySettingsPage extends AbstractRepositorySettingsPage {
-
- public MockRepositorySettingsPage(TaskRepository taskRepository) {
- super("title", "summary", taskRepository);
- }
-
- @Override
- protected void createAdditionalControls(Composite parent) {
- // ignore
- }
-
- @Override
- protected boolean isValidUrl(String name) {
- // ignore
- return false;
- }
-
- @Override
- protected void validateSettings() {
- // ignore
- }
-
- Button getAnonymousButton() {
- return anonymousButton;
- }
-
- StringFieldEditor getUserNameEditor() {
- return repositoryUserNameEditor;
- }
-
- StringFieldEditor getPasswordEditor() {
- return repositoryPasswordEditor;
- }
-
- Composite getParent() {
- return compositeContainer;
- }
-
- @Override
- protected Validator getValidator(TaskRepository repository) {
- // ignore
- return null;
- }
-
- @Override
- public String getConnectorKind() {
- return MockRepositoryConnector.REPOSITORY_KIND;
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/RepositoryTaskSynchronizationTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/RepositoryTaskSynchronizationTest.java
deleted file mode 100644
index 7160a5f64..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/RepositoryTaskSynchronizationTest.java
+++ /dev/null
@@ -1,475 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.Stack;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractAttributeFactory;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractTaskDataHandler;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskAttribute;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.ITask.SynchronizationState;
-import org.eclipse.mylyn.tasks.tests.connector.MockAttributeFactory;
-import org.eclipse.mylyn.tasks.tests.connector.MockRepositoryConnector;
-import org.eclipse.mylyn.tasks.tests.connector.MockTask;
-
-/**
- * @author Rob Elves
- */
-public class RepositoryTaskSynchronizationTest extends TestCase {
-
- private static final String DATE_STAMP_3 = "2006-06-21 15:29:42";
-
- private static final String DATE_STAMP_2 = "2006-06-21 15:29:41";
-
- private static final String DATE_STAMP_1 = "2006-06-21 15:29:40";
-
- private static final String MOCCK_ID = "1";
-
- //private static final String URL1 = "http://www.eclipse.org/mylar";
-
- private final TestRepositoryConnector connector = new TestRepositoryConnector();
-
- private final TestOfflineTaskHandler handler = new TestOfflineTaskHandler();
-
- private RepositoryTaskData newData;
-
- public void testHasIncoming() {
- MockTask task = new MockTask(MOCCK_ID);
- RepositoryTaskData taskData = new RepositoryTaskData(new MockAttributeFactory(), connector.getConnectorKind(),
- MockRepositoryConnector.REPOSITORY_URL, MOCCK_ID);
- task.setLastReadTimeStamp("never");
-
- assertTrue(TasksUiPlugin.getTaskDataManager().checkHasIncoming(task, taskData));
- taskData.setAttributeValue(RepositoryTaskAttribute.DATE_MODIFIED, "2006-06-21 15:29:39");
- assertTrue(TasksUiPlugin.getTaskDataManager().checkHasIncoming(task, taskData));
- taskData.setAttributeValue(RepositoryTaskAttribute.DATE_MODIFIED, DATE_STAMP_1);
- assertTrue(TasksUiPlugin.getTaskDataManager().checkHasIncoming(task, taskData));
- task.setLastReadTimeStamp("2006-06-21 15:29:39");
- assertTrue(TasksUiPlugin.getTaskDataManager().checkHasIncoming(task, taskData));
- task.setLastReadTimeStamp(DATE_STAMP_1);
- assertFalse(TasksUiPlugin.getTaskDataManager().checkHasIncoming(task, taskData));
- }
-
- public void testHasIncomingDateComparison() {
- final Stack<Date> dates = new Stack<Date>();
- MockTask task = new MockTask(MOCCK_ID);
- RepositoryTaskData taskData = new RepositoryTaskData(new MockAttributeFactory() {
- private static final long serialVersionUID = 1L;
-
- @Override
- public Date getDateForAttributeType(String attributeKey, String dateString) {
- return dates.pop();
- }
- }, connector.getConnectorKind(), MockRepositoryConnector.REPOSITORY_URL, MOCCK_ID);
- task.setLastReadTimeStamp("never");
-
- assertTrue(TasksUiPlugin.getTaskDataManager().checkHasIncoming(task, taskData));
-
- // strings and dates mismatch
- dates.push(new Date(1));
- dates.push(new Date(2));
- taskData.setAttributeValue(RepositoryTaskAttribute.DATE_MODIFIED, "2006-06-21 15:29:39");
- assertTrue(TasksUiPlugin.getTaskDataManager().checkHasIncoming(task, taskData));
-
- dates.push(null);
- dates.push(new Date(2));
- assertTrue(TasksUiPlugin.getTaskDataManager().checkHasIncoming(task, taskData));
-
- dates.push(new Date());
- dates.push(null);
- assertTrue(TasksUiPlugin.getTaskDataManager().checkHasIncoming(task, taskData));
-
- // strings mismatch but dates match
- dates.push(new Date(1));
- dates.push(new Date(1));
- assertFalse(TasksUiPlugin.getTaskDataManager().checkHasIncoming(task, taskData));
-
- // strings match, dates should not be checked
- task.setLastReadTimeStamp("2006-06-21 15:29:39");
- assertFalse(TasksUiPlugin.getTaskDataManager().checkHasIncoming(task, taskData));
- }
-
- public void testIncomingToIncoming() {
- /*
- * - Synchronize task with incoming changes - Make another change using
- * browser - Open report in tasklist (editor opens with old 'new' data
- * and background sync occurs) - Incoming status set again on task due
- * to 2nd occurrence of new incoming data
- */
-
- // Test unforced
- AbstractTask task = primeTaskAndRepository(SynchronizationState.INCOMING, SynchronizationState.INCOMING);
- RepositoryTaskData taskData = TasksUiPlugin.getTaskDataStorageManager().getNewTaskData(task.getRepositoryUrl(),
- task.getTaskId());
- assertEquals(DATE_STAMP_1, task.getLastReadTimeStamp());
- assertEquals(SynchronizationState.INCOMING, task.getSynchronizationState());
- assertEquals(DATE_STAMP_2, newData.getLastModified());
- TasksUiPlugin.getTaskDataManager().saveIncoming(task, newData, false);
- assertEquals(DATE_STAMP_1, task.getLastReadTimeStamp());
- assertEquals(SynchronizationState.INCOMING, task.getSynchronizationState());
- // TasksUiPlugin.getSynchronizationManager().setTaskRead(task, true);
- // assertEquals(DATE_STAMP_2, task.getLastSyncDateStamp());
- // and again...
-
- RepositoryTaskData taskData3 = new RepositoryTaskData(new MockAttributeFactory(), connector.getConnectorKind(),
- MockRepositoryConnector.REPOSITORY_URL, "1");
- taskData3.setAttributeValue(RepositoryTaskAttribute.DATE_MODIFIED, DATE_STAMP_3);
- TasksUiPlugin.getTaskDataManager().saveIncoming(task, taskData3, false);
- // last modified stamp not updated until user synchronizes (newdata ==
- // olddata)
- assertEquals(SynchronizationState.INCOMING, task.getSynchronizationState());
- assertEquals(DATE_STAMP_1, task.getLastReadTimeStamp());
- taskData = TasksUiPlugin.getTaskDataStorageManager().getNewTaskData(task.getRepositoryUrl(), task.getTaskId());
- assertEquals(DATE_STAMP_3, taskData.getLastModified());
-
- // Should keep INCOMING state state since new data has same date samp
- // and sych is not forced.
- TasksUiPlugin.getTaskDataManager().saveIncoming(task, taskData3, false);
- assertEquals(SynchronizationState.INCOMING, task.getSynchronizationState());
- assertEquals(DATE_STAMP_1, task.getLastReadTimeStamp());
- taskData = TasksUiPlugin.getTaskDataStorageManager().getNewTaskData(task.getRepositoryUrl(), task.getTaskId());
- assertEquals(DATE_STAMP_3, taskData.getLastModified());
- }
-
- // Invalid state change. Test that this can't happen.
- public void testIncomingToSynchronized() {
- // When not forced, tasks with incoming state should remain in incoming
- // state if
- // if new data has same date stamp as old data.
- AbstractTask task = primeTaskAndRepository(SynchronizationState.INCOMING, SynchronizationState.SYNCHRONIZED);
- assertEquals(DATE_STAMP_1, task.getLastReadTimeStamp());
- TasksUiPlugin.getTaskDataManager().saveIncoming(task, newData, false);
- assertEquals(SynchronizationState.INCOMING, task.getSynchronizationState());
- assertEquals(DATE_STAMP_1, task.getLastReadTimeStamp());
-
- task = primeTaskAndRepository(SynchronizationState.INCOMING, SynchronizationState.SYNCHRONIZED);
- assertEquals(DATE_STAMP_1, task.getLastReadTimeStamp());
- TasksUiPlugin.getTaskDataManager().saveIncoming(task, newData, true);
- assertEquals(SynchronizationState.INCOMING, task.getSynchronizationState());
- // assertEquals(SynchronizationState.SYNCHRONIZED,
- // task.getSyncState());
- assertEquals(DATE_STAMP_1, task.getLastReadTimeStamp());
-
- // Test forced with remote incoming
- // Update: bug#163850 - synchronize gets new data but doesn't mark
- // synchronized
- task = primeTaskAndRepository(SynchronizationState.INCOMING, SynchronizationState.INCOMING);
- assertEquals(DATE_STAMP_1, task.getLastReadTimeStamp());
- TasksUiPlugin.getTaskDataManager().saveIncoming(task, newData, true);
- assertEquals(SynchronizationState.INCOMING, task.getSynchronizationState());
-
- }
-
- // public void testIncomingToSynchronizedWithVoidSyncTime() {
- // // IF the last sync time (modified timestamp on task) is null, this can
- // result
- // // in the editor refresh/repoen going into an infinite loops since the
- // task never
- // // gets to a synchronized state if the last mod time isn't set. It is now
- // being set
- // // if found to be null.
- // AbstractTask task =
- // primeTaskAndRepository(SynchronizationState.INCOMING,
- // SynchronizationState.SYNCHRONIZED);
- // assertEquals(DATE_STAMP_1, task.getLastSyncDateStamp());
- // task.setLastSyncDateStamp(null);
- // TasksUiPlugin.getSynchronizationManager().updateOfflineState(task,
- // newData, false);
- // assertEquals(SynchronizationState.INCOMING, task.getSyncState());
- // assertEquals(DATE_STAMP_1, task.getLastSyncDateStamp());
- //
- // TasksUiPlugin.getSynchronizationManager().updateOfflineState(task,
- // newData, false);
- // assertEquals(SynchronizationState.SYNCHRONIZED, task.getSyncState());
- // assertEquals(DATE_STAMP_1, task.getLastSyncDateStamp());
- // }
-
- /*
- * public void testIncomingToConflict() { // invalid }
- */
-
- /*
- * public void testIncomingToOutgoing() { // invalid }
- */
-
- public void testSynchronizedToIncoming() {
- AbstractTask task = primeTaskAndRepository(SynchronizationState.SYNCHRONIZED, SynchronizationState.INCOMING);
- assertEquals(DATE_STAMP_1, task.getLastReadTimeStamp());
- TasksUiPlugin.getTaskDataManager().saveIncoming(task, newData, false);
- assertEquals(SynchronizationState.INCOMING, task.getSynchronizationState());
- RepositoryTaskData taskData = TasksUiPlugin.getTaskDataStorageManager().getNewTaskData(task.getRepositoryUrl(),
- task.getTaskId());
- assertEquals(DATE_STAMP_2, taskData.getLastModified());
- // assertEquals(DATE_STAMP_2, task.getLastModifiedDateStamp());
- }
-
- public void testSynchronizedToSynchronized() {
- AbstractTask task = primeTaskAndRepository(SynchronizationState.SYNCHRONIZED, SynchronizationState.SYNCHRONIZED);
- assertEquals(DATE_STAMP_1, task.getLastReadTimeStamp());
- TasksUiPlugin.getTaskDataManager().saveIncoming(task, newData, false);
- assertEquals(SynchronizationState.SYNCHRONIZED, task.getSynchronizationState());
- assertEquals(DATE_STAMP_1, task.getLastReadTimeStamp());
- }
-
- /*
- * public void testSynchronizedToConflict() { // invalid }
- */
-
- public void testSynchronizedToOutgoing() {
- AbstractTask task = primeTaskAndRepository(SynchronizationState.SYNCHRONIZED, SynchronizationState.SYNCHRONIZED);
- assertEquals(DATE_STAMP_1, task.getLastReadTimeStamp());
-
- RepositoryTaskData taskData = TasksUiPlugin.getTaskDataStorageManager().getEditableCopy(
- task.getRepositoryUrl(), task.getTaskId());
-
- taskData.setNewComment("new comment");
-
- HashSet<RepositoryTaskAttribute> changed = new HashSet<RepositoryTaskAttribute>();
- changed.add(taskData.getAttribute(RepositoryTaskAttribute.COMMENT_NEW));
- TasksUiPlugin.getTaskDataManager().saveOutgoing(task, changed);
- assertEquals(SynchronizationState.OUTGOING, task.getSynchronizationState());
- assertEquals(DATE_STAMP_1, task.getLastReadTimeStamp());
- }
-
- public void testConflictToConflict() {
- AbstractTask task = primeTaskAndRepository(SynchronizationState.CONFLICT, SynchronizationState.INCOMING);
- assertEquals(DATE_STAMP_1, task.getLastReadTimeStamp());
- TasksUiPlugin.getTaskDataManager().saveIncoming(task, newData, true);
- assertEquals(SynchronizationState.CONFLICT, task.getSynchronizationState());
- RepositoryTaskData taskData = TasksUiPlugin.getTaskDataStorageManager().getNewTaskData(task.getRepositoryUrl(),
- task.getTaskId());
-
- assertEquals(DATE_STAMP_2, taskData.getLastModified());
- TasksUiPlugin.getTaskDataManager().saveIncoming(task, newData, true);
- assertEquals(SynchronizationState.CONFLICT, task.getSynchronizationState());
- taskData = TasksUiPlugin.getTaskDataStorageManager().getNewTaskData(task.getRepositoryUrl(), task.getTaskId());
- assertEquals(DATE_STAMP_2, taskData.getLastModified());
- }
-
- /*
- * public void testConflictToSynchonized() { // invalid, requires markRead }
- */
-
- /*
- * public void testConflictToConflict() { // ui involved }
- */
-
- /*
- * public void testConflictToOutgoing() { // invalid? }
- */
-
- // TODO: Test merging new incoming with outgoing
- // TODO: Test discard outgoing
- public void testOutgoingToConflict() {
- // Forced
- AbstractTask task = primeTaskAndRepository(SynchronizationState.OUTGOING, SynchronizationState.INCOMING);
- RepositoryTaskData taskData = TasksUiPlugin.getTaskDataStorageManager().getNewTaskData(task.getRepositoryUrl(),
- task.getTaskId());
-
- assertEquals(DATE_STAMP_1, task.getLastReadTimeStamp());
- assertEquals(SynchronizationState.OUTGOING, task.getSynchronizationState());
- TasksUiPlugin.getTaskDataManager().saveIncoming(task, newData, true);
- assertEquals(SynchronizationState.CONFLICT, task.getSynchronizationState());
- taskData = TasksUiPlugin.getTaskDataStorageManager().getNewTaskData(task.getRepositoryUrl(), task.getTaskId());
-
- assertEquals(DATE_STAMP_2, taskData.getLastModified());
- // assertEquals(DATE_STAMP_2, task.getLastModifiedDateStamp());
- }
-
- // Illegal state change, test it doesn't occur
- public void testOutgoingToSynchronized() {
- AbstractTask task = primeTaskAndRepository(SynchronizationState.OUTGOING, SynchronizationState.SYNCHRONIZED);
- assertEquals(DATE_STAMP_1, task.getLastReadTimeStamp());
-
- TasksUiPlugin.getTaskDataManager().saveIncoming(task, newData, true);
- assertEquals(SynchronizationState.OUTGOING, task.getSynchronizationState());
- assertEquals(DATE_STAMP_1, task.getLastReadTimeStamp());
- }
-
- public void testOutgoingToOutgoing() {
- AbstractTask task = primeTaskAndRepository(SynchronizationState.OUTGOING, SynchronizationState.SYNCHRONIZED);
- assertEquals(DATE_STAMP_1, task.getLastReadTimeStamp());
- TasksUiPlugin.getTaskDataManager().saveIncoming(task, newData, false);
- assertEquals(SynchronizationState.OUTGOING, task.getSynchronizationState());
- assertEquals(DATE_STAMP_1, task.getLastReadTimeStamp());
- }
-
- public void testMarkRead() {
- AbstractTask task = primeTaskAndRepository(SynchronizationState.INCOMING, SynchronizationState.SYNCHRONIZED);
- task.setLastReadTimeStamp(null);
- assertEquals(SynchronizationState.INCOMING, task.getSynchronizationState());
- TasksUiPlugin.getTaskDataManager().setTaskRead(task, true);
- assertEquals(DATE_STAMP_1, task.getLastReadTimeStamp());
- assertEquals(SynchronizationState.SYNCHRONIZED, task.getSynchronizationState());
- }
-
- public void testMarkUnread() {
- AbstractTask task = primeTaskAndRepository(SynchronizationState.SYNCHRONIZED, SynchronizationState.SYNCHRONIZED);
- task.setLastReadTimeStamp(null);
- assertEquals(SynchronizationState.SYNCHRONIZED, task.getSynchronizationState());
- TasksUiPlugin.getTaskDataManager().setTaskRead(task, false);
- assertEquals(SynchronizationState.INCOMING, task.getSynchronizationState());
- }
-
- public void testClearOutgoing() {
- AbstractTask task = primeTaskAndRepository(SynchronizationState.SYNCHRONIZED, SynchronizationState.SYNCHRONIZED);
- RepositoryTaskData taskData1 = new RepositoryTaskData(new MockAttributeFactory(),
- MockRepositoryConnector.REPOSITORY_KIND, MockRepositoryConnector.REPOSITORY_URL, "1");
- TasksUiPlugin.getTaskDataStorageManager().setNewTaskData(taskData1);
- taskData1 = TasksUiPlugin.getTaskDataStorageManager()
- .getEditableCopy(task.getRepositoryUrl(), task.getTaskId());
-
- taskData1.setNewComment("Testing");
- Set<RepositoryTaskAttribute> edits = new HashSet<RepositoryTaskAttribute>();
- edits.add(taskData1.getAttribute(RepositoryTaskAttribute.COMMENT_NEW));
- TasksUiPlugin.getTaskDataStorageManager().saveEdits(task.getRepositoryUrl(), task.getTaskId(), edits);
-
- RepositoryTaskData editedData = TasksUiPlugin.getTaskDataStorageManager().getEditableCopy(
- task.getRepositoryUrl(), task.getTaskId());
- assertEquals("Testing", editedData.getNewComment());
-
- TasksUiPlugin.getTaskDataManager().discardOutgoing(task);
-
- assertTrue(task.getSynchronizationState().equals(SynchronizationState.SYNCHRONIZED));
- RepositoryTaskData taskData = TasksUiPlugin.getTaskDataStorageManager().getEditableCopy(
- task.getRepositoryUrl(), task.getTaskId());
- assertEquals("", taskData.getNewComment());
-
- }
-
- private class TestOfflineTaskHandler extends AbstractTaskDataHandler {
-
- @Override
- public AbstractAttributeFactory getAttributeFactory(String repositoryUrl, String repositoryKind, String taskKind) {
- // ignore
- return null;
- }
-
- public Set<AbstractTask> getChangedSinceLastSync(TaskRepository repository, Set<AbstractTask> tasks)
- throws CoreException {
- return null;
- }
-
- @Override
- public RepositoryTaskData getTaskData(TaskRepository repository, String taskId, IProgressMonitor monitor)
- throws CoreException {
- return null;
- }
-
- @Override
- public String postTaskData(TaskRepository repository, RepositoryTaskData taskData, IProgressMonitor monitor)
- throws CoreException {
- // ignore
- return null;
- }
-
- @Override
- public boolean initializeTaskData(TaskRepository repository, RepositoryTaskData data, IProgressMonitor monitor)
- throws CoreException {
- // ignore
- return false;
- }
-
- @Override
- public AbstractAttributeFactory getAttributeFactory(RepositoryTaskData taskData) {
- // ignore
- return null;
- }
-
- @Override
- public Set<String> getSubTaskIds(RepositoryTaskData taskData) {
- return Collections.emptySet();
- }
-
- // private final String DATE_FORMAT_2 = "yyyy-MM-dd HH:mm:ss";
- //
- // private final SimpleDateFormat format = new
- // SimpleDateFormat(DATE_FORMAT_2);
- //
- //
- // public Date getDateForAttributeType(String attributeKey, String
- // dateString) {
- //
- // try {
- // return format.parse(dateString);
- // } catch (ParseException e) {
- // return null;
- // }
- // }
-
- }
-
- private class TestRepositoryConnector extends MockRepositoryConnector {
-
- @Override
- public AbstractTaskDataHandler getLegacyTaskDataHandler() {
- return handler;
- }
-
- // @Override
- // protected void removeOfflineTaskData(RepositoryTaskData bug) {
- // // ignore
- // }
- //
- // @Override
- // public void saveOffline(RepositoryTaskData taskData) {
- // // ignore
- // }
-
- // @Override
- // protected RepositoryTaskData
- // loadOfflineTaskData(AbstractTask repositoryTask) {
- // return repositoryTask.getTaskData();
- // }
-
- }
-
- private AbstractTask primeTaskAndRepository(SynchronizationState localState, SynchronizationState remoteState) {
- RepositoryTaskData taskData = null;
- AbstractTask task = new MockTask(MOCCK_ID);
-
- taskData = new RepositoryTaskData(new MockAttributeFactory(), connector.getConnectorKind(),
- MockRepositoryConnector.REPOSITORY_URL, MOCCK_ID);
- taskData.setAttributeValue(RepositoryTaskAttribute.DATE_MODIFIED, DATE_STAMP_1);
- task.setLastReadTimeStamp(DATE_STAMP_1);
- task.setSynchronizationState(localState);
- TasksUiPlugin.getTaskDataStorageManager().setNewTaskData(taskData);
- newData = new RepositoryTaskData(new MockAttributeFactory(), connector.getConnectorKind(),
- MockRepositoryConnector.REPOSITORY_URL, MOCCK_ID);
-
- switch (remoteState) {
- case CONFLICT:
- case INCOMING:
- newData.setAttributeValue(RepositoryTaskAttribute.DATE_MODIFIED, DATE_STAMP_2);
- break;
- case SYNCHRONIZED:
- newData.setAttributeValue(RepositoryTaskAttribute.DATE_MODIFIED, DATE_STAMP_1);
- break;
- default:
- fail("Remote repository can only be INCOMING or SYNCHRONIZED wrt the local task.");
-
- }
-
- return task;
-
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ScheduledPresentationTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ScheduledPresentationTest.java
deleted file mode 100644
index da5f41269..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ScheduledPresentationTest.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import java.util.Calendar;
-import java.util.Set;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.internal.context.core.ContextCorePlugin;
-import org.eclipse.mylyn.internal.context.core.InteractionContextManager;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.DateRange;
-import org.eclipse.mylyn.internal.tasks.core.LocalTask;
-import org.eclipse.mylyn.internal.tasks.core.TaskActivityUtil;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListInterestFilter;
-import org.eclipse.mylyn.monitor.core.InteractionEvent;
-
-/**
- * @author Rob Elves
- */
-public class ScheduledPresentationTest extends TestCase {
-
- @Override
- protected void setUp() throws Exception {
- ContextCorePlugin.getContextManager().getActivityMetaContext().reset();
- ContextCorePlugin.getContextManager().saveActivityMetaContext();
- TasksUiPlugin.getTaskListManager().resetTaskList();
- TasksUiPlugin.getExternalizationManager().requestSave();
- }
-
- @Override
- protected void tearDown() throws Exception {
- TasksUiPlugin.getTaskListManager().resetTaskList();
- TasksUiPlugin.getExternalizationManager().requestSave();
- }
-
- public void testWeekStartChange() {
- TasksUiPlugin.getTaskActivityManager().setWeekStartDay(Calendar.MONDAY);
- DateRange lastDay = TaskActivityUtil.getCurrentWeek().getDayOfWeek(Calendar.SUNDAY);
- AbstractTask task1 = new LocalTask("task 1", "Task 1");
- TasksUiPlugin.getTaskList().addTask(task1);
- TasksUiPlugin.getTaskActivityManager().setScheduledFor(task1, lastDay);
- assertTrue(TaskListInterestFilter.isInterestingForThisWeek(null, task1));
-
- TasksUiPlugin.getTaskActivityManager().setWeekStartDay(Calendar.SUNDAY);
- assertFalse(TaskListInterestFilter.isInterestingForThisWeek(null, task1));
-
- }
-
-// public void testResetAndRollOver() {
-//
-// ScheduledTaskContainer pastWeeks = TasksUiPlugin.getTaskActivityManager().getActivityPast();
-// ScheduledTaskContainer thisWeek = TasksUiPlugin.getTaskActivityManager().getActivityThisWeek();
-// ScheduledTaskContainer nextWeek = TasksUiPlugin.getTaskActivityManager().getActivityNextWeek();
-// ScheduledTaskContainer futureWeeks = TasksUiPlugin.getTaskActivityManager().getActivityFuture();
-//
-// assertEquals(0, thisWeek.getChildren().size());
-// assertTrue(thisWeek.isPresent());
-// assertTrue(nextWeek.isFuture());
-//
-// long pastStartTime = pastWeeks.getEnd().getTimeInMillis();
-// long thisWeekStartTime = thisWeek.getStart().getTimeInMillis();
-// long nextStartTime = nextWeek.getStart().getTimeInMillis();
-// long futureStartTime = futureWeeks.getStart().getTimeInMillis();
-//
-// Calendar pastWeeksTaskStart = Calendar.getInstance();
-// pastWeeksTaskStart.setTimeInMillis(pastStartTime - 10);
-// assertTrue(pastWeeks.includes(pastWeeksTaskStart));
-//
-// Calendar thisWeekTaskStart = Calendar.getInstance();
-// thisWeekTaskStart.setTimeInMillis(thisWeekStartTime + 10);
-// assertTrue(thisWeek.includes(thisWeekTaskStart));
-//
-// Calendar thisWeekTaskStop = Calendar.getInstance();
-// thisWeekTaskStop.setTimeInMillis(thisWeek.getEnd().getTimeInMillis() - 10);
-// assertTrue(thisWeek.includes(thisWeekTaskStop));
-//
-// Calendar nextWeekTaskStart = Calendar.getInstance();
-// nextWeekTaskStart.setTimeInMillis(nextStartTime + 10);
-// assertTrue(nextWeek.includes(nextWeekTaskStart));
-//
-// Calendar futureWeekTaskStart = Calendar.getInstance();
-// futureWeekTaskStart.setTimeInMillis(futureStartTime + 10);
-// assertTrue(futureWeeks.includes(futureWeekTaskStart));
-//
-// AbstractTask task1 = new LocalTask("task 1", "Task 1");
-// TasksUiPlugin.getTaskList().addTask(task1);
-//
-// assertEquals(0, TasksUiPlugin.getTaskActivityManager()
-// .getScheduledTasks(thisWeek.getStart(), thisWeek.getEnd())
-// .size());
-//
-// TasksUiPlugin.getTaskActivityManager().setScheduledFor(task1, thisWeek.getStart().getTime());
-//
-//// TasksUiPlugin.getTaskListManager().parseInteractionEvent(event2);
-// assertEquals(1, TasksUiPlugin.getTaskActivityManager()
-// .getScheduledTasks(thisWeek.getStart(), thisWeek.getEnd())
-// .size());
-// // assertEquals(thisWeekTaskStop.getTime().getTime() -
-// // thisWeekTaskStart.getTime().getTime(), thisWeek
-// // .getTotalElapsed());
-//
-// // ROLL OVER
-// Date oldStart = TasksUiPlugin.getTaskActivityManager().getStartTime();
-// Calendar newStart = Calendar.getInstance();
-// newStart.setTime(oldStart);
-// newStart.add(Calendar.WEEK_OF_MONTH, 1);
-// //TasksUiPlugin.getTaskListManager().snapToStartOfWeek(newStart);
-//
-// TasksUiPlugin.getTaskActivityMonitor().reloadActivityTime();
-//
-// //ScheduledTaskContainer newPastWeeks = TasksUiPlugin.getTaskListManager().getActivityPast();
-// ScheduledTaskContainer newPreviousWeek = TasksUiPlugin.getTaskActivityManager().getActivityPrevious();
-// ScheduledTaskContainer newThisWeek = TasksUiPlugin.getTaskActivityManager().getActivityThisWeek();
-// ScheduledTaskContainer newNextWeek = TasksUiPlugin.getTaskActivityManager().getActivityNextWeek();
-// // DateRangeContainer newFutureWeeks =
-// // MylarTaskListPlugin.getTaskListManager().getActivityFuture();
-//
-// assertTrue(newPreviousWeek.includes(thisWeekTaskStart));
-// assertTrue(newThisWeek.includes(nextWeekTaskStart));
-// assertTrue(newNextWeek.includes(futureWeekTaskStart));
-//
-// assertFalse(newThisWeek.includes(thisWeekTaskStart));
-// assertFalse(newThisWeek.isPresent());
-// assertTrue(newThisWeek.isFuture());
-//
-// assertEquals(0, TasksUiPlugin.getTaskActivityManager().getScheduledTasks(newThisWeek.getStart(),
-// newThisWeek.getEnd()).size());
-// assertEquals(1, TasksUiPlugin.getTaskActivityManager().getScheduledTasks(newPreviousWeek.getStart(),
-// newPreviousWeek.getEnd()).size());
-//
-// TasksUiPlugin.getTaskActivityMonitor().reloadActivityTime();
-// }
-
- public void testScheduledTaskContainer() {
-
- Calendar startDate = Calendar.getInstance();
- startDate.setTimeInMillis(1000);
- Calendar endDate = Calendar.getInstance();
- endDate.setTimeInMillis(2000);
-
- AbstractTask task1 = new LocalTask("task 1", "Task 1");
- AbstractTask task2 = new LocalTask("task 2", "Task 2");
- TasksUiPlugin.getTaskList().addTask(task1);
- TasksUiPlugin.getTaskList().addTask(task2);
-
- InteractionEvent event1 = new InteractionEvent(InteractionEvent.Kind.ATTENTION,
- InteractionContextManager.ACTIVITY_STRUCTUREKIND_TIMING, task1.getHandleIdentifier(),
- InteractionContextManager.ACTIVITY_ORIGINID_WORKBENCH, null,
- InteractionContextManager.ACTIVITY_DELTA_ADDED, 2f, startDate.getTime(), endDate.getTime());
-
- InteractionEvent event2 = new InteractionEvent(InteractionEvent.Kind.ATTENTION,
- InteractionContextManager.ACTIVITY_STRUCTUREKIND_TIMING, task2.getHandleIdentifier(),
- InteractionContextManager.ACTIVITY_ORIGINID_WORKBENCH, null,
- InteractionContextManager.ACTIVITY_DELTA_ADDED, 2f, startDate.getTime(), endDate.getTime());
-
- TasksUiPlugin.getTaskActivityMonitor().parseInteractionEvent(event1, false);
- TasksUiPlugin.getTaskActivityMonitor().parseInteractionEvent(event2, false);
- Calendar start = TaskActivityUtil.getCalendar();
- start.setTimeInMillis(0);
- Calendar end = TaskActivityUtil.getCalendar();
- end.add(Calendar.MINUTE, 2);
- Set<AbstractTask> tasks = TasksUiPlugin.getTaskActivityManager().getActiveTasks(start, end);
- assertEquals(2, tasks.size());
- assertEquals(1000, TasksUiPlugin.getTaskActivityManager().getElapsedTime(task1));
- assertEquals(1000, TasksUiPlugin.getTaskActivityManager().getElapsedTime(task2));
-
- }
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TableSorterTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TableSorterTest.java
deleted file mode 100644
index dd701d620..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TableSorterTest.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.mylyn.internal.tasks.core.LocalTask;
-import org.eclipse.mylyn.internal.tasks.core.TaskCategory;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListTableSorter;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.tests.connector.MockTask;
-import org.eclipse.swt.widgets.Control;
-
-/**
- * @author Mik Kersten
- * @author George Lindholm
- */
-public class TableSorterTest extends TestCase {
-
- public void testRootTaskSorting() {
- TaskListTableSorter sorter = new TaskListTableSorter(TaskListView.getFromActivePerspective(),
- TaskListTableSorter.SortByIndex.SUMMARY);
-
- ITask task = new LocalTask("1", "");
- TaskCategory category = new TaskCategory("cat");
-
- assertEquals(-1, sorter.compare(null, task, category));
- assertEquals(1, sorter.compare(null, category, task));
- }
-
- public class EmptyViewer extends Viewer {
- public EmptyViewer() {
- }
-
- @Override
- public Control getControl() {
- return null;
- }
-
- @Override
- public Object getInput() {
- return null;
- }
-
- @Override
- public ISelection getSelection() {
- return null;
- }
-
- @Override
- public void refresh() {
- }
-
- @Override
- public void setInput(Object input) {
- }
-
- @Override
- public void setSelection(ISelection selection, boolean reveal) {
- }
- }
-
- public void testSummaryOrderSorting() {
- final TaskListTableSorter sorter = new TaskListTableSorter(TaskListView.getFromActivePerspective());
-
- final MockTask[] tasks = new MockTask[5];
- tasks[0] = new MockTask("local", "4", "c");
- tasks[1] = new MockTask("local", "1", "b");
- tasks[2] = new MockTask("local", "11", "a");
- tasks[3] = new MockTask("local", "3", "c");
- tasks[4] = new MockTask("local", "5", "a");
-
- sorter.sort(new EmptyViewer(), tasks);
-
- assertTrue("1".equals(tasks[0].getTaskKey()) && "b".equals(tasks[0].getSummary()));
- assertTrue("3".equals(tasks[1].getTaskKey()) && "c".equals(tasks[1].getSummary()));
- assertTrue("11".equals(tasks[4].getTaskKey()) && "a".equals(tasks[4].getSummary()));
- }
-
- public void testModuleSummaryOrderSorting() {
- final TaskListTableSorter sorter = new TaskListTableSorter(TaskListView.getFromActivePerspective());
-
- final MockTask[] tasks = new MockTask[5];
- tasks[0] = new MockTask("local", "MYLN:4", "c");
- tasks[1] = new MockTask("local", "MYLN:1", "b");
- tasks[2] = new MockTask("local", "MYLN:11", "a");
- tasks[3] = new MockTask("local", "MYLN:11", "b");
- tasks[4] = new MockTask("local", "MYLN:5", "a");
-
- sorter.sort(new EmptyViewer(), tasks);
-
- assertTrue("MYLN:1".equals(tasks[0].getTaskKey()) && "b".equals(tasks[0].getSummary()));
- assertTrue("MYLN:4".equals(tasks[1].getTaskKey()) && "c".equals(tasks[1].getSummary()));
- assertTrue("MYLN:11".equals(tasks[4].getTaskKey()) && "b".equals(tasks[4].getSummary()));
- }
-
- public void testLocalTaskSort() {
- final TaskListTableSorter sorter = new TaskListTableSorter(TaskListView.getFromActivePerspective());
- ITask task1 = new LocalTask("1", "task1");
- ITask task2 = new LocalTask("2", "task2");
- ITask task3 = new LocalTask("3", "task3");
- ITask[] tasks = { task1, task2, task3 };
- sorter.sort(new EmptyViewer(), tasks);
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivationActionTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivationActionTest.java
deleted file mode 100644
index e91b61a57..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivationActionTest.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jface.action.ToolBarManager;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.actions.ToggleTaskActivationAction;
-import org.eclipse.mylyn.tasks.tests.connector.MockTask;
-
-/**
- * @author Mik Kersten
- */
-public class TaskActivationActionTest extends TestCase {
-
- public void testUpdateOnExternalActivation() {
- MockTask task = new MockTask("test:activation");
- ToggleTaskActivationAction action = new ToggleTaskActivationAction(task, new ToolBarManager());
- assertFalse(action.isChecked());
-
- TasksUiPlugin.getTaskListManager().activateTask(task);
- assertTrue(action.isChecked());
-
- TasksUiPlugin.getTaskListManager().deactivateTask(task);
- assertFalse(action.isChecked());
-
- action.dispose();
-
- TasksUiPlugin.getTaskListManager().activateTask(task);
- assertFalse(action.isChecked());
-
- TasksUiPlugin.getTaskListManager().deactivateTask(task);
- assertFalse(action.isChecked());
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivationHistoryTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivationHistoryTest.java
deleted file mode 100644
index 8f05dd406..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivationHistoryTest.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.mylyn.internal.context.ui.ContextUiPlugin;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.TaskActivationHistory;
-import org.eclipse.mylyn.internal.tasks.ui.TaskListManager;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.actions.TaskActivateAction;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.internal.tasks.ui.workingsets.TaskWorkingSetUpdater;
-import org.eclipse.mylyn.tasks.tests.connector.MockRepositoryQuery;
-import org.eclipse.ui.IWorkingSet;
-import org.eclipse.ui.IWorkingSetManager;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.internal.WorkingSet;
-
-/**
- * @author Frank Becker
- *
- * TODO merge with TaskHistoryTest
- */
-public class TaskActivationHistoryTest extends TestCase {
-
- protected TaskListManager manager = TasksUiPlugin.getTaskListManager();
-
- protected TaskActivationHistory history;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
-
- history = TasksUiPlugin.getTaskActivityManager().getTaskActivationHistory();
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- public void testWithWorkinSet() {
- MockRepositoryQuery query1 = new MockRepositoryQuery("Query 1");
- MockRepositoryQuery query2 = new MockRepositoryQuery("Query 2");
-
- AbstractTask task11 = TasksUiInternal.createNewLocalTask("Query1 Task 1");
- AbstractTask task12 = TasksUiInternal.createNewLocalTask("Query1 Task 2");
- AbstractTask task21 = TasksUiInternal.createNewLocalTask("Query2 Task 1");
- AbstractTask task22 = TasksUiInternal.createNewLocalTask("Query2 Task 2");
- manager.getTaskList().addQuery(query1);
- manager.getTaskList().addQuery(query2);
- createWorkingSet(query1);
- (new TaskActivateAction()).run(task11);
- history.addTask(task11);
- manager.getTaskList().addTask(task11, query1);
- (new TaskActivateAction()).run(task12);
- history.addTask(task12);
- manager.getTaskList().addTask(task12, query1);
-
- (new TaskActivateAction()).run(task21);
- history.addTask(task21);
- manager.getTaskList().addTask(task21, query2);
- (new TaskActivateAction()).run(task22);
- history.addTask(task22);
- manager.getTaskList().addTask(task22, query2);
-
- List<AbstractTask> prevHistoryList = history.getPreviousTasks();
-
- // Check that the previous history list looks right
- assertTrue(prevHistoryList.size() >= 3);
- assertTrue(prevHistoryList.get(prevHistoryList.size() - 1) == task22);
- assertTrue(prevHistoryList.get(prevHistoryList.size() - 2) == task21);
- assertTrue(prevHistoryList.get(prevHistoryList.size() - 3) == task12);
- assertTrue(prevHistoryList.get(prevHistoryList.size() - 4) == task11);
-
- prevHistoryList = history.getPreviousTasks(TasksUiInternal.getContainersFromWorkingSet(TaskListView.getActiveWorkingSets()));
-
- // Check that the previous history list looks right
- assertTrue(prevHistoryList.size() >= 2);
- assertTrue(prevHistoryList.get(prevHistoryList.size() - 1) == task12);
- assertTrue(prevHistoryList.get(prevHistoryList.size() - 2) == task11);
-
- prevHistoryList = history.getPreviousTasks(new HashSet<AbstractTaskContainer>());
-
- // Check that the previous history list looks right
- assertTrue(prevHistoryList.size() >= 3);
- assertTrue(prevHistoryList.get(prevHistoryList.size() - 1) == task22);
- assertTrue(prevHistoryList.get(prevHistoryList.size() - 2) == task21);
- assertTrue(prevHistoryList.get(prevHistoryList.size() - 3) == task12);
- assertTrue(prevHistoryList.get(prevHistoryList.size() - 4) == task11);
- }
-
- private IWorkingSet createWorkingSet(IAdaptable element) {
- IWorkingSetManager workingSetManager1 = ContextUiPlugin.getDefault().getWorkbench().getWorkingSetManager();
- IWorkingSet workingSet = workingSetManager1.createWorkingSet("Task Working Set", new IAdaptable[] { element });
- workingSet.setId(TaskWorkingSetUpdater.ID_TASK_WORKING_SET);
- assertTrue(Arrays.asList(workingSet.getElements()).contains(element));
- Set<IWorkingSet> sets = TaskListView.getActiveWorkingSets();
- sets.add(workingSet);
- PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().setWorkingSets(
- sets.toArray(new WorkingSet[sets.size()]));
- return workingSet;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivityListenerTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivityListenerTest.java
deleted file mode 100644
index deb198eee..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivityListenerTest.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.TaskActivationAdapter;
-import org.eclipse.mylyn.tasks.tests.connector.MockTask;
-
-/**
- * @author Shawn Minto
- */
-public class TaskActivityListenerTest extends TestCase {
-
- private class MockTaskActivationListener extends TaskActivationAdapter {
-
- private boolean hasActivated = false;
-
- private boolean hasPreActivated = false;
-
- private boolean hasDeactivated = false;
-
- private boolean hasPreDeactivated = false;
-
- public void reset() {
- hasActivated = false;
- hasPreActivated = false;
-
- hasDeactivated = false;
- hasPreDeactivated = false;
-
- }
-
- @Override
- public void preTaskActivated(ITask task) {
- assertFalse(hasActivated);
- hasPreActivated = true;
- }
-
- @Override
- public void preTaskDeactivated(ITask task) {
- assertFalse(hasDeactivated);
- hasPreDeactivated = true;
- }
-
- @Override
- public void taskActivated(ITask task) {
- assertTrue(hasPreActivated);
- hasActivated = true;
- }
-
- @Override
- public void taskDeactivated(ITask task) {
- assertTrue(hasPreDeactivated);
- hasDeactivated = true;
- }
-
- }
-
- @Override
- protected void setUp() throws Exception {
- TasksUiPlugin.getTaskListManager().deactivateAllTasks();
- }
-
- public void testTaskActivation() {
- MockTask task = new MockTask("test:activation");
- MockTaskActivationListener listener = new MockTaskActivationListener();
- try {
- TasksUiPlugin.getTaskActivityManager().addActivationListener(listener);
- try {
- TasksUiPlugin.getTaskListManager().activateTask(task);
- assertTrue(listener.hasPreActivated);
- assertTrue(listener.hasActivated);
- assertFalse(listener.hasPreDeactivated);
- assertFalse(listener.hasDeactivated);
-
- listener.reset();
- } finally {
- TasksUiPlugin.getTaskListManager().deactivateTask(task);
- }
- assertFalse(listener.hasPreActivated);
- assertFalse(listener.hasActivated);
- assertTrue(listener.hasPreDeactivated);
- assertTrue(listener.hasDeactivated);
- } finally {
- TasksUiPlugin.getTaskActivityManager().removeActivationListener(listener);
- }
- }
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivityTimingTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivityTimingTest.java
deleted file mode 100644
index b4a2ff3ac..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivityTimingTest.java
+++ /dev/null
@@ -1,1232 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.internal.context.core.ContextCorePlugin;
-import org.eclipse.mylyn.internal.context.core.InteractionContext;
-import org.eclipse.mylyn.internal.context.core.InteractionContextManager;
-import org.eclipse.mylyn.internal.context.core.InteractionContextScaling;
-import org.eclipse.mylyn.internal.context.core.LegacyActivityAdaptor;
-import org.eclipse.mylyn.internal.monitor.ui.MonitorUiPlugin;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.ITaskList;
-import org.eclipse.mylyn.internal.tasks.core.LocalTask;
-import org.eclipse.mylyn.internal.tasks.core.ScheduledTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.TaskActivityManager;
-import org.eclipse.mylyn.internal.tasks.core.TaskActivityUtil;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.monitor.core.InteractionEvent;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITaskActivityManager;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-
-/**
- * @author Rob Elves
- */
-public class TaskActivityTimingTest extends TestCase {
-
- private ITaskActivityManager activityManager;
-
- private ITaskList taskList;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- activityManager = TasksUi.getTaskActivityManager();
- taskList = TasksUiInternal.getTaskList();
- ContextCorePlugin.getContextManager().getActivityMetaContext().reset();
- ContextCorePlugin.getContextManager().saveActivityMetaContext();
- TasksUiPlugin.getTaskActivityMonitor().reloadActivityTime();
- }
-
- @Override
- protected void tearDown() throws Exception {
- ContextCorePlugin.getContextManager().getActivityMetaContext().reset();
- TasksUiPlugin.getTaskListManager().resetTaskList();
- TasksUiPlugin.getTaskListManager().saveTaskList();
- super.tearDown();
- }
-
- public void testActivityWithNoTaskActive() {
- Calendar start = Calendar.getInstance();
- Calendar end = Calendar.getInstance();
- end.setTimeInMillis(start.getTimeInMillis());
- end.add(Calendar.HOUR_OF_DAY, 2);
-
- Calendar start2 = Calendar.getInstance();
- start2.add(Calendar.DAY_OF_MONTH, 1);
- Calendar end2 = Calendar.getInstance();
- end2.setTime(start2.getTime());
- end2.add(Calendar.HOUR_OF_DAY, 2);
-
- InteractionEvent event1 = new InteractionEvent(InteractionEvent.Kind.ATTENTION, "structureKind", "none",
- "originId", "navigatedRelation", InteractionContextManager.ACTIVITY_DELTA_ADDED, 2f, start.getTime(),
- end.getTime());
- InteractionEvent event2 = new InteractionEvent(InteractionEvent.Kind.ATTENTION, "structureKind", "none",
- "originId", "navigatedRelation", InteractionContextManager.ACTIVITY_DELTA_ADDED, 2f, start2.getTime(),
- end2.getTime());
-
- TasksUiPlugin.getTaskActivityMonitor().parseInteractionEvent(event1, false);
- TasksUiPlugin.getTaskActivityMonitor().parseInteractionEvent(event2, false);
-
- long expectedTotalTime = end.getTime().getTime() - start.getTime().getTime();
- assertEquals(2 * expectedTotalTime, ((TaskActivityManager) activityManager).getElapsedNoTaskActive(start, end2));
- assertEquals(end.getTimeInMillis() - start.getTimeInMillis(), TasksUiPlugin.getTaskActivityManager()
- .getElapsedNoTaskActive(start, end));
- assertEquals(end.getTimeInMillis() - start.getTimeInMillis(), TasksUiPlugin.getTaskActivityManager()
- .getElapsedNoTaskActive(start2, end2));
- }
-
- public void testActivityCaptured() {
- AbstractTask task1 = new LocalTask("task 1", "Task 1");
- taskList.addTask(task1);
- assertEquals(0, activityManager.getElapsedTime(task1));
-
- Calendar start = Calendar.getInstance();
- Calendar end = Calendar.getInstance();
- end.setTimeInMillis(start.getTimeInMillis());
- end.add(Calendar.HOUR_OF_DAY, 2);
-
- Calendar start2 = Calendar.getInstance();
- start2.add(Calendar.DAY_OF_MONTH, 1);
- Calendar end2 = Calendar.getInstance();
- end2.setTime(start2.getTime());
- end2.add(Calendar.HOUR_OF_DAY, 2);
-
- InteractionEvent event1 = new InteractionEvent(InteractionEvent.Kind.ATTENTION, "structureKind",
- task1.getHandleIdentifier(), "originId", "navigatedRelation",
- InteractionContextManager.ACTIVITY_DELTA_ADDED, 2f, start.getTime(), end.getTime());
- InteractionEvent event2 = new InteractionEvent(InteractionEvent.Kind.ATTENTION, "structureKind",
- task1.getHandleIdentifier(), "originId", "navigatedRelation",
- InteractionContextManager.ACTIVITY_DELTA_ADDED, 2f, start2.getTime(), end2.getTime());
-
- TasksUiPlugin.getTaskActivityMonitor().parseInteractionEvent(event1, false);
- TasksUiPlugin.getTaskActivityMonitor().parseInteractionEvent(event2, false);
-
- long expectedTotalTime = end.getTime().getTime() - start.getTime().getTime();
- assertEquals(2 * expectedTotalTime, activityManager.getElapsedTime(task1));
- Calendar startEarly = Calendar.getInstance();
- startEarly.setTimeInMillis(start.getTimeInMillis());
- startEarly.add(Calendar.MONTH, -1);
- Calendar endLate = Calendar.getInstance();
- endLate.setTimeInMillis(end.getTimeInMillis() + 60 * 5000);
- assertEquals(expectedTotalTime, TasksUiPlugin.getTaskActivityManager().getElapsedTime(task1, startEarly, end));
- assertEquals(expectedTotalTime, TasksUiPlugin.getTaskActivityManager().getElapsedTime(task1, start2, end2));
- assertEquals(2 * expectedTotalTime, TasksUiPlugin.getTaskActivityManager().getElapsedTime(task1, start, end2));
- }
-
- public void testActivityDelete() {
-
- AbstractTask task1 = new LocalTask("1", "Task 1");
- taskList.addTask(task1);
- assertEquals(0, activityManager.getElapsedTime(task1));
-
- Calendar start = Calendar.getInstance();
- Calendar end = Calendar.getInstance();
- end.setTimeInMillis(start.getTimeInMillis());
- end.add(Calendar.HOUR_OF_DAY, 2);
-
- Calendar start2 = Calendar.getInstance();
- start2.add(Calendar.DAY_OF_MONTH, 1);
- Calendar end2 = Calendar.getInstance();
- end2.setTime(start2.getTime());
- end2.add(Calendar.HOUR_OF_DAY, 2);
-
- InteractionEvent event1 = new InteractionEvent(InteractionEvent.Kind.ATTENTION, "structureKind",
- task1.getHandleIdentifier(), "originId", "navigatedRelation",
- InteractionContextManager.ACTIVITY_DELTA_ADDED, 2f, start.getTime(), end.getTime());
- InteractionEvent event2 = new InteractionEvent(InteractionEvent.Kind.ATTENTION, "structureKind",
- task1.getHandleIdentifier(), "originId", "navigatedRelation",
- InteractionContextManager.ACTIVITY_DELTA_ADDED, 2f, start2.getTime(), end2.getTime());
-
- ContextCorePlugin.getContextManager().getActivityMetaContext().parseEvent(event1);
- TasksUiPlugin.getTaskActivityMonitor().parseInteractionEvent(event1, false);
- ContextCorePlugin.getContextManager().getActivityMetaContext().parseEvent(event2);
- TasksUiPlugin.getTaskActivityMonitor().parseInteractionEvent(event2, false);
-
- long expectedTotalTime = end.getTime().getTime() - start.getTime().getTime();
- assertEquals(2 * expectedTotalTime, activityManager.getElapsedTime(task1));
- Calendar startEarly = Calendar.getInstance();
- startEarly.setTimeInMillis(start.getTimeInMillis());
- startEarly.add(Calendar.MONTH, -1);
- Calendar endLate = Calendar.getInstance();
- endLate.setTimeInMillis(end.getTimeInMillis() + 60 * 5000);
- assertEquals(expectedTotalTime, TasksUiPlugin.getTaskActivityManager().getElapsedTime(task1, startEarly, end));
- assertEquals(expectedTotalTime, TasksUiPlugin.getTaskActivityManager().getElapsedTime(task1, start2, end2));
- assertEquals(2 * expectedTotalTime, TasksUiPlugin.getTaskActivityManager().getElapsedTime(task1, start, end2));
-
- MonitorUiPlugin.getDefault().getActivityContextManager().removeActivityTime(task1.getHandleIdentifier(),
- start.getTimeInMillis(), end.getTimeInMillis());
- // Half gone since end date is exclusive (removes up to but not including hour)
- assertEquals(expectedTotalTime, activityManager.getElapsedTime(task1));
-
- ContextCorePlugin.getContextManager().saveActivityMetaContext();
- ContextCorePlugin.getContextManager().loadActivityMetaContext();
- TasksUiPlugin.getTaskActivityMonitor().reloadActivityTime();
-
- assertEquals(expectedTotalTime, activityManager.getElapsedTime(task1));
-
- MonitorUiPlugin.getDefault().getActivityContextManager().removeActivityTime(task1.getHandleIdentifier(),
- start2.getTimeInMillis(), end2.getTimeInMillis());
-
- assertEquals(0, activityManager.getElapsedTime(task1));
- }
-
-// public void testActivityReset() {
-//
-// AbstractTask task1 = new LocalTask("1", "Task 1");
-// taskList.addTask(task1);
-// assertEquals(0, activityManager.getElapsedTime(task1));
-//
-// Calendar start = Calendar.getInstance();
-// Calendar end = Calendar.getInstance();
-// end.setTimeInMillis(start.getTimeInMillis());
-// end.add(Calendar.HOUR_OF_DAY, 2);
-//
-// Calendar start2 = Calendar.getInstance();
-// start2.add(Calendar.DAY_OF_MONTH, 1);
-// Calendar end2 = Calendar.getInstance();
-// end2.setTime(start2.getTime());
-// end2.add(Calendar.HOUR_OF_DAY, 2);
-//
-// InteractionEvent event1 = new InteractionEvent(InteractionEvent.Kind.ATTENTION, "structureKind",
-// task1.getHandleIdentifier(), "originId", "navigatedRelation",
-// IInteractionContextManager.ACTIVITY_DELTA_ADDED, 2f, start.getTime(), end.getTime());
-// InteractionEvent event2 = new InteractionEvent(InteractionEvent.Kind.ATTENTION, "structureKind",
-// task1.getHandleIdentifier(), "originId", "navigatedRelation",
-// IInteractionContextManager.ACTIVITY_DELTA_ADDED, 2f, start2.getTime(), end2.getTime());
-//
-// ContextCore.getContextManager().getActivityMetaContext().parseEvent(event1);
-// TasksUiPlugin.getTaskActivityMonitor().parseInteractionEvent(event1);
-// ContextCore.getContextManager().getActivityMetaContext().parseEvent(event2);
-// TasksUiPlugin.getTaskActivityMonitor().parseInteractionEvent(event2);
-//
-// long expectedTotalTime = end.getTime().getTime() - start.getTime().getTime();
-// assertEquals(2 * expectedTotalTime, activityManager.getElapsedTime(task1));
-// Calendar startEarly = Calendar.getInstance();
-// startEarly.setTimeInMillis(start.getTimeInMillis());
-// startEarly.add(Calendar.MONTH, -1);
-// Calendar endLate = Calendar.getInstance();
-// endLate.setTimeInMillis(end.getTimeInMillis() + 60 * 5000);
-// assertEquals(expectedTotalTime, TasksUiPlugin.getTaskActivityManager().getElapsedTime(task1, startEarly, end));
-// assertEquals(expectedTotalTime, TasksUiPlugin.getTaskActivityManager().getElapsedTime(task1, start2, end2));
-// assertEquals(2 * expectedTotalTime, TasksUiPlugin.getTaskActivityManager().getElapsedTime(task1, start, end2));
-//
-// MonitorUiPlugin.getDefault().getActivityContextManager().clearActivityTime(task1.getHandleIdentifier(),
-// start.getTimeInMillis(), end.getTimeInMillis());
-// // Half gone since end date is exclusive (removes up to but not including hour)
-// assertEquals(expectedTotalTime, activityManager.getElapsedTime(task1));
-// assertTrue(activityManager.getActiveTasks(start, end).isEmpty());
-// assertFalse(activityManager.getActiveTasks(start2, end2).isEmpty());
-//
-// MonitorUiPlugin.getDefault().getActivityContextManager().clearActivityTime(task1.getHandleIdentifier(),
-// start.getTimeInMillis(), end2.getTimeInMillis() + (1000 * 60 * 60));
-//
-// // with end = hour beyond should result in zero
-// assertEquals(0, activityManager.getElapsedTime(task1));
-//
-// TasksUiPlugin.getTaskActivityMonitor().parseInteractionEvent(event1);
-// TasksUiPlugin.getTaskActivityMonitor().parseInteractionEvent(event2);
-// // one event blocked now by activity date filter so only half time collected
-// assertEquals(expectedTotalTime, activityManager.getElapsedTime(task1));
-// assertFalse(activityManager.getActiveTasks(start, end).isEmpty());
-// assertTrue(activityManager.getActiveTasks(start2, end2).isEmpty());
-//
-// ContextCore.getContextManager().saveActivityContext();
-// ContextCore.getContextManager().loadActivityMetaContext();
-// TasksUiPlugin.getTaskListManager().resetAndRollOver();
-//
-//// assertEquals(expectedTotalTime, TasksUiPlugin.getTaskActivityManager().getElapsedTime(task1, startEarly, end));
-//// assertEquals(expectedTotalTime, TasksUiPlugin.getTaskActivityManager().getElapsedTime(task1, start2, end2));
-//// assertEquals(2 * expectedTotalTime, TasksUiPlugin.getTaskActivityManager().getElapsedTime(task1, start, end2));
-//
-// // reset still valid after restart
-// assertEquals(expectedTotalTime, activityManager.getElapsedTime(task1));
-// assertFalse(activityManager.getActiveTasks(start, end).isEmpty());
-// assertTrue(activityManager.getActiveTasks(start2, end2).isEmpty());
-//
-// }
-
- public void testNegativeActivity() {
-
- AbstractTask task1 = new LocalTask("task 1", "Task 1");
- taskList.addTask(task1);
- assertEquals(0, activityManager.getElapsedTime(task1));
-
- Calendar start = Calendar.getInstance();
- Calendar end = Calendar.getInstance();
- end.add(Calendar.HOUR_OF_DAY, 2);
-
- Calendar start2 = Calendar.getInstance();
- start2.add(Calendar.DAY_OF_MONTH, 1);
- Calendar end2 = Calendar.getInstance();
- end2.setTime(start2.getTime());
- end2.add(Calendar.HOUR_OF_DAY, 2);
-
- InteractionEvent event1 = new InteractionEvent(InteractionEvent.Kind.ATTENTION, "structureKind",
- task1.getHandleIdentifier(), "originId", "navigatedRelation",
- InteractionContextManager.ACTIVITY_DELTA_ADDED, 2f, end.getTime(), start.getTime());
- InteractionEvent event2 = new InteractionEvent(InteractionEvent.Kind.ATTENTION, "structureKind",
- task1.getHandleIdentifier(), "originId", "navigatedRelation",
- InteractionContextManager.ACTIVITY_DELTA_ADDED, 2f, end2.getTime(), start2.getTime());
-
- TasksUiPlugin.getTaskActivityMonitor().parseInteractionEvent(event1, false);
- TasksUiPlugin.getTaskActivityMonitor().parseInteractionEvent(event2, false);
-
- assertEquals(0, TasksUiPlugin.getTaskActivityManager().getElapsedTime(task1));
- assertEquals(0, TasksUiPlugin.getTaskActivityManager().getElapsedTime(task1, start, end));
- assertEquals(0, TasksUiPlugin.getTaskActivityManager().getElapsedTime(task1, start2, end2));
- assertEquals(0, TasksUiPlugin.getTaskActivityManager().getElapsedTime(task1, start, end2));
-
- }
-
- public void testNullTaskHandle() {
- AbstractTask task1 = new LocalTask("task 1", "Task 1");
- taskList.addTask(task1);
- assertEquals(0, activityManager.getElapsedTime(task1));
-
- Calendar start = Calendar.getInstance();
- Calendar end = Calendar.getInstance();
- end.add(Calendar.HOUR_OF_DAY, 2);
-
- InteractionEvent event1 = new InteractionEvent(InteractionEvent.Kind.ATTENTION, "structureKind", null,
- "originId", "navigatedRelation", InteractionContextManager.ACTIVITY_DELTA_ADDED, 2f, start.getTime(),
- end.getTime());
- InteractionEvent event2 = new InteractionEvent(InteractionEvent.Kind.ATTENTION, "structureKind", "",
- "originId", "navigatedRelation", InteractionContextManager.ACTIVITY_DELTA_ADDED, 2f, start.getTime(),
- end.getTime());
-
- TasksUiPlugin.getTaskActivityMonitor().parseInteractionEvent(event1, false);
- TasksUiPlugin.getTaskActivityMonitor().parseInteractionEvent(event2, false);
- assertEquals(0, TasksUiPlugin.getTaskActivityManager().getElapsedTime(task1));
- }
-
- public void testActivityNotLoggedTwice() {
- InteractionContext metaContext = ContextCorePlugin.getContextManager().getActivityMetaContext();
- metaContext.reset();
- assertEquals(0, metaContext.getInteractionHistory().size());
-
- ITask task1 = new LocalTask("local 1", "Task 1");
- ITask task2 = new LocalTask("local 2", "Task 2");
-
- Calendar startTime1 = Calendar.getInstance();
- TaskActivityUtil.snapStartOfHour(startTime1);
- Calendar endTime1 = Calendar.getInstance();
- endTime1.setTime(startTime1.getTime());
- endTime1.add(Calendar.SECOND, 20);
-
- Calendar startTime2 = Calendar.getInstance();
- startTime2.setTime(endTime1.getTime());
- startTime2.add(Calendar.SECOND, 20);
- Calendar endTime2 = Calendar.getInstance();
- endTime2.setTime(startTime2.getTime());
- endTime2.add(Calendar.MINUTE, 2);
-
- InteractionEvent activityEvent1 = new InteractionEvent(InteractionEvent.Kind.ATTENTION,
- InteractionContextManager.ACTIVITY_STRUCTUREKIND_TIMING, task1.getHandleIdentifier(),
- InteractionContextManager.ACTIVITY_ORIGINID_WORKBENCH, null,
- InteractionContextManager.ACTIVITY_DELTA_ADDED, 1f, startTime1.getTime(), endTime1.getTime());
-
- InteractionEvent activityEvent2 = new InteractionEvent(InteractionEvent.Kind.ATTENTION,
- InteractionContextManager.ACTIVITY_STRUCTUREKIND_TIMING, task1.getHandleIdentifier(),
- InteractionContextManager.ACTIVITY_ORIGINID_WORKBENCH, null,
- InteractionContextManager.ACTIVITY_DELTA_ADDED, 1f, startTime2.getTime(), endTime2.getTime());
-
- InteractionEvent activityEvent3 = new InteractionEvent(InteractionEvent.Kind.ATTENTION,
- InteractionContextManager.ACTIVITY_STRUCTUREKIND_TIMING, task2.getHandleIdentifier(),
- InteractionContextManager.ACTIVITY_ORIGINID_WORKBENCH, null,
- InteractionContextManager.ACTIVITY_DELTA_ADDED, 1f, startTime1.getTime(), startTime1.getTime());
-
- // to activity events both within same hour will get collapsed
- metaContext.parseEvent(activityEvent1);
- metaContext.parseEvent(activityEvent2);
- // This is a bogus 3rd event with zero activity and shouldn't be recorded
- // this use to result in a second write of activity1 to the context
- metaContext.parseEvent(activityEvent3);
- metaContext = ContextCorePlugin.getContextManager().collapseActivityMetaContext(metaContext);
- assertEquals(1, metaContext.getInteractionHistory().size());
- }
-
- public void testDoubleBookKeeping() {
- AbstractTask task1 = new LocalTask("testDoubleBookKeeping", "testDoubleBookKeeping");
- TasksUiPlugin.getTaskList().addTask(task1);
- {
- Calendar startActiveTime = Calendar.getInstance();
- Calendar endActiveTime = Calendar.getInstance();
- endActiveTime.setTime(startActiveTime.getTime());
- endActiveTime.add(Calendar.SECOND, 20);
-
- Calendar startTime = Calendar.getInstance();
- startTime.setTime(startActiveTime.getTime());
- startTime.add(Calendar.SECOND, 5);
- Calendar endTime = Calendar.getInstance();
- endTime.setTime(endActiveTime.getTime());
- endTime.add(Calendar.SECOND, -5);
-
- InteractionEvent event1 = new InteractionEvent(InteractionEvent.Kind.SELECTION, "structureKind",
- task1.getHandleIdentifier(), InteractionContextManager.ACTIVITY_ORIGINID_WORKBENCH,
- "navigatedRelation", InteractionContextManager.ACTIVITY_DELTA_ACTIVATED, 2f,
- startActiveTime.getTime(), startActiveTime.getTime());
- InteractionEvent event2 = new InteractionEvent(InteractionEvent.Kind.SELECTION, "structureKind",
- task1.getHandleIdentifier(), InteractionContextManager.ACTIVITY_ORIGINID_WORKBENCH,
- "navigatedRelation", InteractionContextManager.ACTIVITY_DELTA_DEACTIVATED, 2f,
- endActiveTime.getTime(), endActiveTime.getTime());
-
- InteractionEvent activityEvent1 = new InteractionEvent(InteractionEvent.Kind.ATTENTION,
- InteractionContextManager.ACTIVITY_STRUCTUREKIND_TIMING, task1.getHandleIdentifier(),
- InteractionContextManager.ACTIVITY_ORIGINID_WORKBENCH, null,
- InteractionContextManager.ACTIVITY_DELTA_ADDED, 1f, startTime.getTime(), endTime.getTime());
-
- ContextCorePlugin.getContextManager().getActivityMetaContext().parseEvent(event1);
- TasksUiPlugin.getTaskActivityMonitor().parseInteractionEvent(event1, false);
- ContextCorePlugin.getContextManager().getActivityMetaContext().parseEvent(activityEvent1);
- TasksUiPlugin.getTaskActivityMonitor().parseInteractionEvent(activityEvent1, false);
- ContextCorePlugin.getContextManager().getActivityMetaContext().parseEvent(event2);
- TasksUiPlugin.getTaskActivityMonitor().parseInteractionEvent(event2, false);
-
- long elapsed = TasksUiPlugin.getTaskActivityManager().getElapsedTime(task1);
- assertEquals(10000, elapsed);
-
- // 2nd activation - no activity
- ContextCorePlugin.getContextManager().getActivityMetaContext().parseEvent(event1);
- TasksUiPlugin.getTaskActivityMonitor().parseInteractionEvent(event1, false);
- ContextCorePlugin.getContextManager().getActivityMetaContext().parseEvent(event2);
- TasksUiPlugin.getTaskActivityMonitor().parseInteractionEvent(event2, false);
-
- elapsed = TasksUiPlugin.getTaskActivityManager().getElapsedTime(task1);
- assertEquals(10000, elapsed);
- assertTrue(TasksUiPlugin.getTaskActivityManager().isActiveThisWeek(task1));
- }
-
- assertEquals(10000, TasksUiPlugin.getTaskActivityManager().getElapsedTime(task1));
- ///--- 2nd activity on same task
- {
- Calendar startActiveTime2 = Calendar.getInstance();
- Calendar endActiveTime2 = Calendar.getInstance();
- endActiveTime2.add(Calendar.SECOND, 20);
-
- Calendar startTime2 = Calendar.getInstance();
- startTime2.setTimeInMillis(startActiveTime2.getTimeInMillis() + 2000);
- Calendar endTime2 = Calendar.getInstance();
- endTime2.setTimeInMillis(endActiveTime2.getTimeInMillis() - 2000);
-
- InteractionEvent event1 = new InteractionEvent(InteractionEvent.Kind.SELECTION, "structureKind",
- task1.getHandleIdentifier(), InteractionContextManager.ACTIVITY_ORIGINID_WORKBENCH,
- "navigatedRelation", InteractionContextManager.ACTIVITY_DELTA_ACTIVATED, 2f,
- startActiveTime2.getTime(), startActiveTime2.getTime());
- InteractionEvent event2 = new InteractionEvent(InteractionEvent.Kind.SELECTION, "structureKind",
- task1.getHandleIdentifier(), InteractionContextManager.ACTIVITY_ORIGINID_WORKBENCH,
- "navigatedRelation", InteractionContextManager.ACTIVITY_DELTA_DEACTIVATED, 2f,
- endActiveTime2.getTime(), endActiveTime2.getTime());
-
- InteractionEvent activityEvent1 = new InteractionEvent(InteractionEvent.Kind.ATTENTION,
- InteractionContextManager.ACTIVITY_STRUCTUREKIND_TIMING, task1.getHandleIdentifier(),
- InteractionContextManager.ACTIVITY_ORIGINID_WORKBENCH, null,
- InteractionContextManager.ACTIVITY_DELTA_ADDED, 1f, startTime2.getTime(), endTime2.getTime());
-
- ContextCorePlugin.getContextManager().getActivityMetaContext().parseEvent(event1);
- TasksUiPlugin.getTaskActivityMonitor().parseInteractionEvent(event1, false);
- ContextCorePlugin.getContextManager().getActivityMetaContext().parseEvent(activityEvent1);
- TasksUiPlugin.getTaskActivityMonitor().parseInteractionEvent(activityEvent1, false);
- ContextCorePlugin.getContextManager().getActivityMetaContext().parseEvent(event2);
- TasksUiPlugin.getTaskActivityMonitor().parseInteractionEvent(event2, false);
- }
-
- assertEquals(26000, TasksUiPlugin.getTaskActivityManager().getElapsedTime(task1));
-
- ContextCorePlugin.getContextManager().saveActivityMetaContext();
- ContextCorePlugin.getContextManager().loadActivityMetaContext();
- TasksUiPlugin.getTaskActivityMonitor().reloadActivityTime();
-
- assertEquals(26000, TasksUiPlugin.getTaskActivityManager().getElapsedTime(task1));
-
- }
-
- public void testAfterReloading() {
- AbstractTask task1 = new LocalTask("task 1", "Task 1");
- TasksUiPlugin.getTaskList().addTask(task1);
-
- Calendar startTime = Calendar.getInstance();
- Calendar endTime = Calendar.getInstance();
- endTime.add(Calendar.SECOND, 20);
-
- InteractionEvent event1 = new InteractionEvent(InteractionEvent.Kind.SELECTION, "structureKind",
- task1.getHandleIdentifier(), "originId", "navigatedRelation",
- InteractionContextManager.ACTIVITY_DELTA_ACTIVATED, 2f, startTime.getTime(), startTime.getTime());
- InteractionEvent event2 = new InteractionEvent(InteractionEvent.Kind.SELECTION, "structureKind",
- task1.getHandleIdentifier(), "originId", "navigatedRelation",
- InteractionContextManager.ACTIVITY_DELTA_DEACTIVATED, 2f, startTime.getTime(), startTime.getTime());
-
- InteractionEvent activityEvent1 = new InteractionEvent(InteractionEvent.Kind.ATTENTION,
- InteractionContextManager.ACTIVITY_STRUCTUREKIND_TIMING, task1.getHandleIdentifier(),
- InteractionContextManager.ACTIVITY_ORIGINID_WORKBENCH, null,
- InteractionContextManager.ACTIVITY_DELTA_ADDED, 1f, startTime.getTime(), endTime.getTime());
-
- ContextCorePlugin.getContextManager().getActivityMetaContext().parseEvent(event1);
- TasksUiPlugin.getTaskActivityMonitor().parseInteractionEvent(event1, false);
- ContextCorePlugin.getContextManager().getActivityMetaContext().parseEvent(activityEvent1);
- TasksUiPlugin.getTaskActivityMonitor().parseInteractionEvent(activityEvent1, false);
- ContextCorePlugin.getContextManager().getActivityMetaContext().parseEvent(event2);
- TasksUiPlugin.getTaskActivityMonitor().parseInteractionEvent(event2, false);
- assertEquals(20000, TasksUiPlugin.getTaskActivityManager().getElapsedTime(task1));
-
- ContextCorePlugin.getContextManager().saveActivityMetaContext();
- ContextCorePlugin.getContextManager().loadActivityMetaContext();
- TasksUiPlugin.getTaskActivityMonitor().reloadActivityTime();
-
- assertEquals(20000, TasksUiPlugin.getTaskActivityManager().getElapsedTime(task1));
-
- }
-
- public void testCollapsedTiming() {
- Calendar startTime1 = Calendar.getInstance();
- Calendar endTime1 = Calendar.getInstance();
- endTime1.add(Calendar.SECOND, 20);
-
- Calendar startTime2 = Calendar.getInstance();
- startTime2.setTimeInMillis(endTime1.getTimeInMillis());
- Calendar endTime2 = Calendar.getInstance();
- endTime2.setTimeInMillis(startTime2.getTimeInMillis() + 20 * 1000);
-
- Calendar startTime3 = Calendar.getInstance();
- startTime3.setTimeInMillis(endTime2.getTimeInMillis());
- Calendar endTime3 = Calendar.getInstance();
- endTime3.setTimeInMillis(startTime3.getTimeInMillis() + 20 * 1000);
-
- InteractionContext mockContext = new InteractionContext("doitest", new InteractionContextScaling());
- InteractionEvent activityEvent1 = new InteractionEvent(InteractionEvent.Kind.ATTENTION,
- InteractionContextManager.ACTIVITY_STRUCTUREKIND_TIMING, "handle",
- InteractionContextManager.ACTIVITY_ORIGINID_WORKBENCH, null,
- InteractionContextManager.ACTIVITY_DELTA_ADDED, 1f, startTime1.getTime(), endTime1.getTime());
-
- InteractionEvent activityEvent2 = new InteractionEvent(InteractionEvent.Kind.ATTENTION,
- InteractionContextManager.ACTIVITY_STRUCTUREKIND_TIMING, "handle",
- InteractionContextManager.ACTIVITY_ORIGINID_WORKBENCH, null,
- InteractionContextManager.ACTIVITY_DELTA_ADDED, 1f, startTime2.getTime(), endTime2.getTime());
-
- InteractionEvent activityEvent3 = new InteractionEvent(InteractionEvent.Kind.ATTENTION,
- InteractionContextManager.ACTIVITY_STRUCTUREKIND_TIMING, "handle",
- InteractionContextManager.ACTIVITY_ORIGINID_WORKBENCH, null,
- InteractionContextManager.ACTIVITY_DELTA_ADDED, 1f, startTime3.getTime(), endTime3.getTime());
-
- mockContext.parseEvent(activityEvent1);
- mockContext.parseEvent(activityEvent2);
- mockContext.parseEvent(activityEvent3);
- assertEquals(3, mockContext.getInteractionHistory().size());
- mockContext = ContextCorePlugin.getContextManager().collapseActivityMetaContext(mockContext);
- assertEquals(1, mockContext.getInteractionHistory().size());
-
- assertEquals(60 * 1000, mockContext.getInteractionHistory().get(0).getEndDate().getTime()
- - mockContext.getInteractionHistory().get(0).getDate().getTime());
- }
-
- /**
- * test that total collapsed time is same when events are separated in time
- */
- public void testCollapsedTiming2() {
- Calendar startTime1 = Calendar.getInstance();
- Calendar endTime1 = Calendar.getInstance();
- endTime1.add(Calendar.SECOND, 20);
-
- Calendar startTime2 = Calendar.getInstance();
- startTime2.setTimeInMillis(endTime1.getTimeInMillis());
- Calendar endTime2 = Calendar.getInstance();
- endTime2.setTimeInMillis(startTime2.getTimeInMillis() + 20 * 1000);
-
- Calendar startTime3 = Calendar.getInstance();
- startTime3.setTimeInMillis(endTime2.getTimeInMillis());
- Calendar endTime3 = Calendar.getInstance();
- endTime3.setTimeInMillis(startTime3.getTimeInMillis() + 50 * 1000);
-
- InteractionContext mockContext = new InteractionContext("doitest", new InteractionContextScaling());
- InteractionEvent activityEvent1 = new InteractionEvent(InteractionEvent.Kind.ATTENTION,
- InteractionContextManager.ACTIVITY_STRUCTUREKIND_TIMING, "handle",
- InteractionContextManager.ACTIVITY_ORIGINID_WORKBENCH, null,
- InteractionContextManager.ACTIVITY_DELTA_ADDED, 1f, startTime1.getTime(), endTime1.getTime());
-
- InteractionEvent activityEvent3 = new InteractionEvent(InteractionEvent.Kind.ATTENTION,
- InteractionContextManager.ACTIVITY_STRUCTUREKIND_TIMING, "handle",
- InteractionContextManager.ACTIVITY_ORIGINID_WORKBENCH, null,
- InteractionContextManager.ACTIVITY_DELTA_ADDED, 1f, startTime3.getTime(), endTime3.getTime());
-
- mockContext.parseEvent(activityEvent1);
- mockContext.parseEvent(activityEvent3);
- assertEquals(2, mockContext.getInteractionHistory().size());
- mockContext = ContextCorePlugin.getContextManager().collapseActivityMetaContext(mockContext);
- assertEquals(1, mockContext.getInteractionHistory().size());
- assertEquals(70 * 1000, mockContext.getInteractionHistory().get(0).getEndDate().getTime()
- - mockContext.getInteractionHistory().get(0).getDate().getTime());
- }
-
- public void testCollapsedExternalization() {
-
- Calendar startTime1 = Calendar.getInstance();
- Calendar endTime1 = Calendar.getInstance();
- endTime1.setTime(startTime1.getTime());
- endTime1.add(Calendar.SECOND, 20);
-
- Calendar startTime2 = Calendar.getInstance();
- startTime2.add(Calendar.DAY_OF_MONTH, 1);
- Calendar endTime2 = Calendar.getInstance();
- endTime2.setTime(startTime2.getTime());
- endTime2.add(Calendar.SECOND, 20);
-
- AbstractTask task1 = new LocalTask("task 1", "Task 1");
- TasksUiPlugin.getTaskList().addTask(task1);
- InteractionContext metaContext = ContextCorePlugin.getContextManager().getActivityMetaContext();
- metaContext.reset();
- assertEquals(0, metaContext.getInteractionHistory().size());
-
- TasksUiPlugin.getTaskActivityManager().activateTask(task1);
-
- InteractionEvent activityEvent1 = new InteractionEvent(InteractionEvent.Kind.ATTENTION,
- InteractionContextManager.ACTIVITY_STRUCTUREKIND_TIMING, task1.getHandleIdentifier(),
- InteractionContextManager.ACTIVITY_ORIGINID_WORKBENCH, null,
- InteractionContextManager.ACTIVITY_DELTA_ADDED, 1f, startTime1.getTime(), endTime1.getTime());
-
- InteractionEvent activityEvent2 = new InteractionEvent(InteractionEvent.Kind.ATTENTION,
- InteractionContextManager.ACTIVITY_STRUCTUREKIND_TIMING, task1.getHandleIdentifier(),
- InteractionContextManager.ACTIVITY_ORIGINID_WORKBENCH, null,
- InteractionContextManager.ACTIVITY_DELTA_ADDED, 1f, startTime2.getTime(), endTime2.getTime());
-
- metaContext.parseEvent(activityEvent1);
- TasksUiPlugin.getTaskActivityMonitor().parseInteractionEvent(activityEvent1, false);
- metaContext.parseEvent(activityEvent2);
- TasksUiPlugin.getTaskActivityMonitor().parseInteractionEvent(activityEvent2, false);
- TasksUiPlugin.getTaskListManager().deactivateAllTasks();
- assertEquals(4, ContextCorePlugin.getContextManager().getActivityMetaContext().getInteractionHistory().size());
-
- TasksUiPlugin.getTaskListManager().saveTaskList();
- ContextCorePlugin.getContextManager().saveActivityMetaContext();
- ContextCorePlugin.getContextManager().getActivityMetaContext().reset();
- assertEquals(0, ContextCorePlugin.getContextManager().getActivityMetaContext().getInteractionHistory().size());
- ContextCorePlugin.getContextManager().loadActivityMetaContext();
-
- assertEquals(4, ContextCorePlugin.getContextManager().getActivityMetaContext().getInteractionHistory().size());
-
- TasksUiPlugin.getTaskActivityMonitor().reloadActivityTime();
- assertEquals((endTime1.getTimeInMillis() - startTime1.getTimeInMillis())
- + (endTime2.getTimeInMillis() - startTime2.getTimeInMillis()), TasksUiPlugin.getTaskActivityManager()
- .getElapsedTime(task1));
- }
-
- public void testCollapsedTwoTasks() {
- // test collapsing of attention events when two or more
- // task attention events occur sequentially
- Calendar startTime1 = Calendar.getInstance();
- Calendar endTime1 = Calendar.getInstance();
- endTime1.add(Calendar.SECOND, 20);
-
- Calendar startTime2 = Calendar.getInstance();
- startTime2.setTime(endTime1.getTime());
- startTime2.add(Calendar.SECOND, 2);
- Calendar endTime2 = Calendar.getInstance();
- endTime2.setTime(startTime2.getTime());
- endTime2.add(Calendar.SECOND, 20);
-
- InteractionContext mockContext = new InteractionContext("doitest", new InteractionContextScaling());
- InteractionEvent activityEvent1 = new InteractionEvent(InteractionEvent.Kind.ATTENTION,
- InteractionContextManager.ACTIVITY_STRUCTUREKIND_TIMING, "handle1",
- InteractionContextManager.ACTIVITY_ORIGINID_WORKBENCH, null,
- InteractionContextManager.ACTIVITY_DELTA_ADDED, 1f, startTime1.getTime(), endTime1.getTime());
-
- InteractionEvent activityEvent2 = new InteractionEvent(InteractionEvent.Kind.ATTENTION,
- InteractionContextManager.ACTIVITY_STRUCTUREKIND_TIMING, "handle2",
- InteractionContextManager.ACTIVITY_ORIGINID_WORKBENCH, null,
- InteractionContextManager.ACTIVITY_DELTA_ADDED, 1f, startTime2.getTime(), endTime2.getTime());
-
- mockContext.parseEvent(activityEvent1);
- mockContext.parseEvent(activityEvent2);
-
- // Since these event times are within same hour, normally they would get collapsed
- // here we test that if the event belongs to two different tasks remain discrete
-
- assertEquals(2, mockContext.getInteractionHistory().size());
- mockContext = ContextCorePlugin.getContextManager().collapseActivityMetaContext(mockContext);
- assertEquals(2, mockContext.getInteractionHistory().size());
- }
-
- public void testCollapeedByTheHour() {
- Calendar startTime1 = Calendar.getInstance();
- startTime1.set(Calendar.MINUTE, 2);
- startTime1.set(Calendar.SECOND, 0);
- startTime1.set(Calendar.MILLISECOND, 0);
-
- Calendar endTime1 = Calendar.getInstance();
- endTime1.setTime(startTime1.getTime());
- endTime1.add(Calendar.MINUTE, 2);
-
- Calendar startTime2 = Calendar.getInstance();
- startTime2.add(Calendar.HOUR_OF_DAY, 1);
- startTime2.set(Calendar.MINUTE, 2);
- startTime2.set(Calendar.SECOND, 0);
- startTime2.set(Calendar.MILLISECOND, 0);
-
- Calendar endTime2 = Calendar.getInstance();
- endTime2.setTime(startTime2.getTime());
- endTime2.add(Calendar.MINUTE, 3);
-
- Calendar startTime3 = Calendar.getInstance();
- startTime3.add(Calendar.HOUR_OF_DAY, 1);
- startTime3.set(Calendar.MINUTE, 20);
- startTime3.set(Calendar.SECOND, 0);
- startTime3.set(Calendar.MILLISECOND, 0);
-
- Calendar endTime3 = Calendar.getInstance();
- endTime3.setTime(startTime3.getTime());
- endTime3.add(Calendar.MINUTE, 5);
-
- AbstractTask task1 = new LocalTask("task 1", "Task 1");
- TasksUiPlugin.getTaskList().addTask(task1);
-
- InteractionEvent activityEvent1 = new InteractionEvent(InteractionEvent.Kind.ATTENTION,
- InteractionContextManager.ACTIVITY_STRUCTUREKIND_TIMING, task1.getHandleIdentifier(),
- InteractionContextManager.ACTIVITY_ORIGINID_WORKBENCH, null,
- InteractionContextManager.ACTIVITY_DELTA_ADDED, 1f, startTime1.getTime(), endTime1.getTime());
-
- InteractionEvent activityEvent2 = new InteractionEvent(InteractionEvent.Kind.ATTENTION,
- InteractionContextManager.ACTIVITY_STRUCTUREKIND_TIMING, task1.getHandleIdentifier(),
- InteractionContextManager.ACTIVITY_ORIGINID_WORKBENCH, null,
- InteractionContextManager.ACTIVITY_DELTA_ADDED, 1f, startTime2.getTime(), endTime2.getTime());
-
- InteractionEvent activityEvent3 = new InteractionEvent(InteractionEvent.Kind.ATTENTION,
- InteractionContextManager.ACTIVITY_STRUCTUREKIND_TIMING, task1.getHandleIdentifier(),
- InteractionContextManager.ACTIVITY_ORIGINID_WORKBENCH, null,
- InteractionContextManager.ACTIVITY_DELTA_ADDED, 1f, startTime3.getTime(), endTime3.getTime());
-
- List<InteractionEvent> events = new ArrayList<InteractionEvent>();
- events.add(activityEvent1);
- events.add(activityEvent2);
- events.add(activityEvent3);
- List<InteractionEvent> collapsedEvents = ContextCorePlugin.getContextManager().collapseEventsByHour(events);
-
- assertEquals(2, collapsedEvents.size());
- }
-
- public void testTaskListManagerInactivity() {
-
- AbstractTask task1 = new LocalTask("task 1", "Task 1");
- TasksUiPlugin.getTaskList().addTask(task1);
-
- ScheduledTaskContainer activityThisWeek = new ScheduledTaskContainer(TasksUiPlugin.getTaskActivityManager(),
- TaskActivityUtil.getCurrentWeek());
- assertNotNull(activityThisWeek);
- assertEquals(0, activityThisWeek.getChildren().size());
-
- InteractionEvent event1 = new InteractionEvent(InteractionEvent.Kind.SELECTION, "structureKind",
- task1.getHandleIdentifier(), "originId", "navigatedRelation",
- InteractionContextManager.ACTIVITY_DELTA_ACTIVATED, 2f, activityThisWeek.getStart().getTime(),
- activityThisWeek.getStart().getTime());
- InteractionEvent event2 = new InteractionEvent(InteractionEvent.Kind.SELECTION, "structureKind",
- task1.getHandleIdentifier(), "originId", "navigatedRelation",
- InteractionContextManager.ACTIVITY_DELTA_DEACTIVATED, 2f, activityThisWeek.getEnd().getTime(),
- activityThisWeek.getEnd().getTime());
-
- Calendar activityStart = Calendar.getInstance();
- Calendar activityEnd = Calendar.getInstance();
- activityEnd.add(Calendar.HOUR_OF_DAY, 1);
-
- InteractionEvent activityEvent = new InteractionEvent(InteractionEvent.Kind.ATTENTION,
- InteractionContextManager.ACTIVITY_STRUCTUREKIND_TIMING, task1.getHandleIdentifier(),
- InteractionContextManager.ACTIVITY_ORIGINID_WORKBENCH, null,
- InteractionContextManager.ACTIVITY_DELTA_ADDED, 1f, activityStart.getTime(), activityEnd.getTime());
-
- TasksUiPlugin.getTaskActivityMonitor().parseInteractionEvent(event1, false);
- TasksUiPlugin.getTaskActivityMonitor().parseInteractionEvent(activityEvent, false);
- TasksUiPlugin.getTaskActivityMonitor().parseInteractionEvent(event2, false);
-
- long expectedTotalTime = (activityEnd.getTime().getTime() - activityStart.getTime().getTime());
- assertEquals(expectedTotalTime, TasksUiPlugin.getTaskActivityManager().getElapsedTime(task1));
- }
-
- public void testElapsedSameAfterRead() {
- // test that granularity of elapsed time map is retained after
- // being re-read from disk
-
- Calendar startTime1 = Calendar.getInstance();
- startTime1.set(Calendar.MINUTE, 2);
- startTime1.set(Calendar.SECOND, 0);
- startTime1.set(Calendar.MILLISECOND, 0);
-
- Calendar endTime1 = Calendar.getInstance();
- endTime1.setTime(startTime1.getTime());
- endTime1.add(Calendar.MINUTE, 2);
-
- Calendar startTime2 = Calendar.getInstance();
- startTime2.add(Calendar.HOUR_OF_DAY, 1);
- startTime2.set(Calendar.MINUTE, 2);
- startTime2.set(Calendar.SECOND, 0);
- startTime2.set(Calendar.MILLISECOND, 0);
-
- Calendar endTime2 = Calendar.getInstance();
- endTime2.setTime(startTime2.getTime());
- endTime2.add(Calendar.MINUTE, 3);
-
- Calendar startTime3 = Calendar.getInstance();
- startTime3.add(Calendar.HOUR_OF_DAY, 1);
- startTime3.set(Calendar.MINUTE, 20);
- startTime3.set(Calendar.SECOND, 0);
- startTime3.set(Calendar.MILLISECOND, 0);
-
- Calendar endTime3 = Calendar.getInstance();
- endTime3.setTime(startTime3.getTime());
- endTime3.add(Calendar.MINUTE, 5);
-
- AbstractTask task1 = new LocalTask("task 1", "Task 1");
- TasksUiPlugin.getTaskList().addTask(task1);
- TasksUiPlugin.getTaskListManager().activateTask(task1);
- InteractionContext metaContext = ContextCorePlugin.getContextManager().getActivityMetaContext();
- metaContext.reset();
- assertEquals(0, metaContext.getInteractionHistory().size());
-
- InteractionEvent activityEvent1 = new InteractionEvent(InteractionEvent.Kind.ATTENTION,
- InteractionContextManager.ACTIVITY_STRUCTUREKIND_TIMING, task1.getHandleIdentifier(),
- InteractionContextManager.ACTIVITY_ORIGINID_WORKBENCH, null,
- InteractionContextManager.ACTIVITY_DELTA_ADDED, 1f, startTime1.getTime(), endTime1.getTime());
-
- InteractionEvent activityEvent2 = new InteractionEvent(InteractionEvent.Kind.ATTENTION,
- InteractionContextManager.ACTIVITY_STRUCTUREKIND_TIMING, task1.getHandleIdentifier(),
- InteractionContextManager.ACTIVITY_ORIGINID_WORKBENCH, null,
- InteractionContextManager.ACTIVITY_DELTA_ADDED, 1f, startTime2.getTime(), endTime2.getTime());
-
- InteractionEvent activityEvent3 = new InteractionEvent(InteractionEvent.Kind.ATTENTION,
- InteractionContextManager.ACTIVITY_STRUCTUREKIND_TIMING, task1.getHandleIdentifier(),
- InteractionContextManager.ACTIVITY_ORIGINID_WORKBENCH, null,
- InteractionContextManager.ACTIVITY_DELTA_ADDED, 1f, startTime3.getTime(), endTime3.getTime());
-
- metaContext.parseEvent(activityEvent1);
- TasksUiPlugin.getTaskActivityMonitor().parseInteractionEvent(activityEvent1, false);
- metaContext.parseEvent(activityEvent2);
- TasksUiPlugin.getTaskActivityMonitor().parseInteractionEvent(activityEvent2, false);
- metaContext.parseEvent(activityEvent3);
- TasksUiPlugin.getTaskActivityMonitor().parseInteractionEvent(activityEvent3, false);
-
- assertEquals(1000 * 60 * 10, TasksUiPlugin.getTaskActivityManager().getElapsedTime(task1));
- assertEquals(1000 * 60 * 2, activityManager.getElapsedTime(task1, startTime1, endTime1));
- assertEquals(1000 * 60 * 8, activityManager.getElapsedTime(task1, startTime2, endTime2));
-
- TasksUiPlugin.getTaskListManager().deactivateAllTasks();
- assertEquals(4, ContextCorePlugin.getContextManager().getActivityMetaContext().getInteractionHistory().size());
- TasksUiPlugin.getTaskListManager().saveTaskList();
- ContextCorePlugin.getContextManager().saveActivityMetaContext();
- ContextCorePlugin.getContextManager().getActivityMetaContext().reset();
- assertEquals(0, ContextCorePlugin.getContextManager().getActivityMetaContext().getInteractionHistory().size());
- TasksUiPlugin.getTaskActivityMonitor().reloadActivityTime();
- assertEquals(0, activityManager.getElapsedTime(task1));
- assertEquals(0, activityManager.getElapsedTime(task1, startTime1, endTime1));
- assertEquals(0, activityManager.getElapsedTime(task1, startTime2, endTime2));
-
- ContextCorePlugin.getContextManager().loadActivityMetaContext();
- assertEquals(3, ContextCorePlugin.getContextManager().getActivityMetaContext().getInteractionHistory().size());
- TasksUiPlugin.getTaskActivityMonitor().reloadActivityTime();
-
- startTime1 = Calendar.getInstance();
- startTime1.set(Calendar.MINUTE, 0);
- startTime1.set(Calendar.SECOND, 0);
- startTime1.set(Calendar.MILLISECOND, 0);
-
- assertEquals(1000 * 60 * 10, activityManager.getElapsedTime(task1));
- assertEquals(1000 * 60 * 2, activityManager.getElapsedTime(task1, startTime1, endTime1));
- assertEquals(1000 * 60 * 8, activityManager.getElapsedTime(task1, startTime2, endTime2));
- }
-
- /**
- * @author Yuri Baburov (burchik@gmail.com)
- * @author Rob Elves adaption to test LegacyActivityAdaptor
- */
- public void testLegacyTimingMigration() {
- AbstractTask task1 = new LocalTask("task 1", "Task 1");
- TasksUiPlugin.getTaskList().addTask(task1);
-
-// ScheduledTaskContainer thisWeekActivity = new ScheduledTaskContainer(TasksUiPlugin.getTaskActivityManager(),
-// TaskActivityUtil.getCurrentWeek());
-//
-// assertNotNull(thisWeekActivity);
-// assertEquals(0, thisWeekActivity.getChildren().size());
-// thisWeekActivity.getStart().setTimeInMillis(1149490800000L);
-// // Start
-// // of
-// // the
-// // week
-// // Jun 5
-// // 2006
-// // - Jun
-// // 11
-// // 2006,
-// // NOVST
-// thisWeekActivity.getEnd().setTimeInMillis(1150095600000L); // End of
-// // the week
-
- Date time1 = new Date(1150007053171L); // Sun Jun 11 13:24:13 NOVST
- // 2006 - task 1 - activated
- Date time2 = new Date(1150007263468L); // Sun Jun 11 13:27:43 NOVST
- // 2006 - attention -
- // deactivated
- Date time3 = new Date(1150021535953L); // Sun Jun 11 17:25:35 NOVST
- // 2006 - attention - activated
- Date time4 = new Date(1150021658500L); // Sun Jun 11 17:27:38 NOVST
- // 2006 - attention -
- // deactivated
- Date time5 = new Date(1150031089250L); // Sun Jun 11 20:04:49 NOVST
- // 2006 - attention - activated
- Date time6 = new Date(1150031111578L); // Sun Jun 11 20:05:11 NOVST
- // 2006 - attention -
- // deactivated
- Date time7 = new Date(1150031111578L); // Sun Jun 11 20:05:11 NOVST
- // 2006 - task 1 - deactivated
-
- String task1handle = task1.getHandleIdentifier();
- InteractionEvent event1 = new InteractionEvent(InteractionEvent.Kind.SELECTION, "structureKind", task1handle,
- "originId", "navigatedRelation", InteractionContextManager.ACTIVITY_DELTA_ACTIVATED, 2f, time1, time1);
-
- InteractionEvent event2 = new InteractionEvent(InteractionEvent.Kind.SELECTION, "structureKind", "attention",
- "originId", "navigatedRelation", InteractionContextManager.ACTIVITY_DELTA_ACTIVATED, 2f, time1, time2);
- InteractionEvent event3 = new InteractionEvent(InteractionEvent.Kind.SELECTION, "structureKind", "attention",
- "originId", "navigatedRelation", InteractionContextManager.ACTIVITY_DELTA_ACTIVATED, 2f, time3, time4);
- InteractionEvent event5 = new InteractionEvent(InteractionEvent.Kind.SELECTION, "structureKind", "attention",
- "originId", "navigatedRelation", InteractionContextManager.ACTIVITY_DELTA_ACTIVATED, 2f, time5, time6);
- InteractionEvent event7 = new InteractionEvent(InteractionEvent.Kind.SELECTION, "structureKind", task1handle,
- "originId", "navigatedRelation", InteractionContextManager.ACTIVITY_DELTA_DEACTIVATED, 2f, time7,
- time7);
-
- LegacyActivityAdaptor legacyAdaptor = new LegacyActivityAdaptor();
- TasksUiPlugin.getTaskActivityMonitor()
- .parseInteractionEvent(legacyAdaptor.parseInteractionEvent(event1), false);
- TasksUiPlugin.getTaskActivityMonitor()
- .parseInteractionEvent(legacyAdaptor.parseInteractionEvent(event2), false);
- TasksUiPlugin.getTaskActivityMonitor()
- .parseInteractionEvent(legacyAdaptor.parseInteractionEvent(event3), false);
- // TasksUiPlugin.getTaskListManager().parseInteractionEvent(event4);
- TasksUiPlugin.getTaskActivityMonitor()
- .parseInteractionEvent(legacyAdaptor.parseInteractionEvent(event5), false);
- // TaskActivityManager.getInstance().parseInteractionEvent(event6);
- TasksUiPlugin.getTaskActivityMonitor()
- .parseInteractionEvent(legacyAdaptor.parseInteractionEvent(event7), false);
- long expectedTotalTime = time6.getTime() - time5.getTime() + time4.getTime() - time3.getTime()
- + time2.getTime() - time1.getTime();
- assertEquals(expectedTotalTime, TasksUiPlugin.getTaskActivityManager().getElapsedTime(task1));
- }
-
-// DND: OLD ACTIVITY TESTS - Will be using to test activity report/view
-// public void testInterleavedActivation() {
-//
-// AbstractTask task1 = new LocalTask("task 1", "Task 1");
-// TasksUiPlugin.getTaskList().addTask(task1);
-//
-// ScheduledTaskContainer activityThisWeek = TasksUiPlugin.getTaskListManager().getActivityThisWeek();
-// assertNotNull(activityThisWeek);
-// assertEquals(0, activityThisWeek.getChildren().size());
-//
-// Calendar taskActivationStart = GregorianCalendar.getInstance();
-// taskActivationStart.add(Calendar.MILLISECOND, 15);
-// Calendar taskActivationStop = GregorianCalendar.getInstance();
-// taskActivationStop.add(Calendar.MILLISECOND, 25);
-//
-// Calendar inactivityStart1 = GregorianCalendar.getInstance();
-// inactivityStart1.add(Calendar.MILLISECOND, 5);
-// Calendar inactivityStop1 = GregorianCalendar.getInstance();
-// inactivityStop1.add(Calendar.MILLISECOND, 10);
-//
-// Calendar inactivityStart2 = GregorianCalendar.getInstance();
-// inactivityStart2.add(Calendar.MILLISECOND, 18);
-// Calendar inactivityStop2 = GregorianCalendar.getInstance();
-// inactivityStop2.add(Calendar.MILLISECOND, 25);
-//
-// InteractionEvent event1 = new InteractionEvent(InteractionEvent.Kind.SELECTION, "structureKind",
-// task1.getHandleIdentifier(), "originId", "navigatedRelation",
-// InteractionContextManager.ACTIVITY_DELTA_ACTIVATED, 2f, taskActivationStart.getTime(),
-// taskActivationStart.getTime());
-// InteractionEvent event2 = new InteractionEvent(InteractionEvent.Kind.SELECTION, "structureKind",
-// task1.getHandleIdentifier(), "originId", "navigatedRelation",
-// InteractionContextManager.ACTIVITY_DELTA_DEACTIVATED, 2f, taskActivationStop.getTime(),
-// taskActivationStop.getTime());
-//
-// InteractionEvent inactivityEvent1 = new InteractionEvent(InteractionEvent.Kind.COMMAND, "structureKind",
-// task1.getHandleIdentifier(), "originId", "navigatedRelation",
-// InteractionContextManager.ACTIVITY_DELTA_DEACTIVATED, 2f, inactivityStart1.getTime(),
-// inactivityStop1.getTime());
-// InteractionEvent inactivityEvent2 = new InteractionEvent(InteractionEvent.Kind.COMMAND, "structureKind",
-// task1.getHandleIdentifier(), "originId", "navigatedRelation",
-// InteractionContextManager.ACTIVITY_DELTA_ACTIVATED, 2f, inactivityStart2.getTime(),
-// inactivityStop2.getTime());
-//
-// TasksUiPlugin.getTaskListManager().parseInteractionEvent(inactivityEvent1);
-// TasksUiPlugin.getTaskListManager().parseInteractionEvent(event1);
-// TasksUiPlugin.getTaskListManager().parseInteractionEvent(event2);
-// TasksUiPlugin.getTaskListManager().parseInteractionEvent(inactivityEvent2);
-// assertEquals(1, activityThisWeek.getChildren().size());
-//
-// // long expectedTotalTime = taskActivationStop.getTimeInMillis() -
-// // taskActivationStart.getTimeInMillis();
-// long expectedTotalTime = 0;
-// assertEquals(expectedTotalTime, activityThisWeek.getTotalElapsed());
-// assertEquals(expectedTotalTime, activityThisWeek.getElapsed(new ScheduledTaskDelegate(activityThisWeek, task1,
-// null, null)));
-// }
-//
-// public void testInterleavedActivation2() {
-//
-// AbstractTask task1 = new LocalTask("task 1", "Task 1");
-// TasksUiPlugin.getTaskList().addTask(task1);
-//
-// ScheduledTaskContainer activityThisWeek = TasksUiPlugin.getTaskListManager().getActivityThisWeek();
-// assertNotNull(activityThisWeek);
-// assertEquals(0, activityThisWeek.getChildren().size());
-//
-// Calendar taskActivationStart = GregorianCalendar.getInstance();
-// taskActivationStart.add(Calendar.MILLISECOND, 10);
-// Calendar taskActivationStop = GregorianCalendar.getInstance();
-// taskActivationStop.add(Calendar.MILLISECOND, 25);
-//
-// Calendar inactivityStart = GregorianCalendar.getInstance();
-// inactivityStart.add(Calendar.MILLISECOND, 15);
-// Calendar inactivityStop = GregorianCalendar.getInstance();
-// inactivityStop.add(Calendar.MILLISECOND, 20);
-//
-// InteractionEvent event1 = new InteractionEvent(InteractionEvent.Kind.SELECTION, "structureKind",
-// task1.getHandleIdentifier(), "originId", "navigatedRelation",
-// InteractionContextManager.ACTIVITY_DELTA_ACTIVATED, 2f, taskActivationStart.getTime(),
-// taskActivationStart.getTime());
-// InteractionEvent event2 = new InteractionEvent(InteractionEvent.Kind.SELECTION, "structureKind",
-// task1.getHandleIdentifier(), "originId", "navigatedRelation",
-// InteractionContextManager.ACTIVITY_DELTA_DEACTIVATED, 2f, taskActivationStop.getTime(),
-// taskActivationStop.getTime());
-//
-// InteractionEvent inactivityEvent1 = new InteractionEvent(InteractionEvent.Kind.COMMAND, "structureKind",
-// task1.getHandleIdentifier(), "originId", "navigatedRelation",
-// InteractionContextManager.ACTIVITY_DELTA_ADDED, 2f, inactivityStart.getTime(),
-// inactivityStop.getTime());
-//
-// TasksUiPlugin.getTaskListManager().parseInteractionEvent(event1);
-// TasksUiPlugin.getTaskListManager().parseInteractionEvent(inactivityEvent1);
-// TasksUiPlugin.getTaskListManager().parseInteractionEvent(event1);
-// TasksUiPlugin.getTaskListManager().parseInteractionEvent(inactivityEvent1);
-// TasksUiPlugin.getTaskListManager().parseInteractionEvent(event2);
-//
-// assertEquals(1, activityThisWeek.getChildren().size());
-//
-// long expectedTotalTime = 2 * (inactivityStart.getTimeInMillis() - taskActivationStart.getTimeInMillis());
-// assertEquals(expectedTotalTime, activityThisWeek.getTotalElapsed());
-// assertEquals(expectedTotalTime, activityThisWeek.getElapsed(new ScheduledTaskDelegate(activityThisWeek, task1,
-// null, null)));
-// }
-//
-//
-// /**
-// * Some 'attention' events when all tasks are inactive
-// *
-// * @author Yuri Baburov (burchik@gmail.com)
-// */
-// public void testTaskListManagerActivity2() {
-// AbstractTask task1 = new LocalTask("task 1", "Task 1");
-// TasksUiPlugin.getTaskList().addTask(task1);
-// ScheduledTaskContainer thisWeekActivity = TasksUiPlugin.getTaskListManager().getActivityThisWeek();
-// assertNotNull(thisWeekActivity);
-// assertEquals(0, thisWeekActivity.getChildren().size());
-// assertEquals(0, thisWeekActivity.getTotalElapsed());
-// thisWeekActivity.getStart().setTimeInMillis(1149490800000L); // Start
-// // of
-// // the
-// // week
-// // Jun 5
-// // 2006
-// // - Jun
-// // 11
-// // 2006,
-// // NOVST
-// thisWeekActivity.getEnd().setTimeInMillis(1150095600000L); // End of
-// // the week
-//
-// Date time1 = new Date(1149911820812L); // Sat Jun 10 10:57:00 NOVST
-// // 2006 - task 1 - activated
-// Date time2 = new Date(1149911820812L); // Sat Jun 10 10:57:00 NOVST
-// // 2006 - task 1 - deactivated
-// Date time3 = new Date(1149911840812L); // Sat Jun 10 10:57:20 NOVST
-// // 2006 - attention -
-// // deactivated
-// Date time4 = new Date(1149911941765L); // Sat Jun 10 10:59:01 NOVST
-// // 2006 - attention - activated
-// Date time5 = new Date(1149911948953L); // Sat Jun 10 10:59:08 NOVST
-// // 2006 - task 1 - activated
-// Date time6 = new Date(1149911988781L); // Sat Jun 10 10:59:48 NOVST
-// // 2006 - task 1 - deactivated
-//
-// String task1handle = task1.getHandleIdentifier();
-// InteractionEvent event1 = new InteractionEvent(InteractionEvent.Kind.SELECTION, "structureKind", task1handle,
-// "originId", "navigatedRelation", InteractionContextManager.ACTIVITY_DELTA_ACTIVATED, 2f, time1, time1);
-// InteractionEvent event2 = new InteractionEvent(InteractionEvent.Kind.SELECTION, "structureKind", task1handle,
-// "originId", "navigatedRelation", InteractionContextManager.ACTIVITY_DELTA_DEACTIVATED, 2f, time2, time2);
-// InteractionEvent event3 = new InteractionEvent(InteractionEvent.Kind.SELECTION, "structureKind", "attention",
-// "originId", "navigatedRelation", InteractionContextManager.ACTIVITY_DELTA_DEACTIVATED, 2f, time3, time3);
-// InteractionEvent event4 = new InteractionEvent(InteractionEvent.Kind.SELECTION, "structureKind", "attention",
-// "originId", "navigatedRelation", InteractionContextManager.ACTIVITY_DELTA_ACTIVATED, 2f, time4, time4);
-// InteractionEvent event5 = new InteractionEvent(InteractionEvent.Kind.SELECTION, "structureKind", task1handle,
-// "originId", "navigatedRelation", InteractionContextManager.ACTIVITY_DELTA_ACTIVATED, 2f, time5, time5);
-// InteractionEvent event6 = new InteractionEvent(InteractionEvent.Kind.SELECTION, "structureKind", task1handle,
-// "originId", "navigatedRelation", InteractionContextManager.ACTIVITY_DELTA_DEACTIVATED, 2f, time6, time6);
-//
-// TasksUiPlugin.getTaskListManager().parseInteractionEvent(event1);
-// TasksUiPlugin.getTaskListManager().parseInteractionEvent(event2);
-// TasksUiPlugin.getTaskListManager().parseInteractionEvent(event3);
-// TasksUiPlugin.getTaskListManager().parseInteractionEvent(event4);
-// TasksUiPlugin.getTaskListManager().parseInteractionEvent(event5);
-// TasksUiPlugin.getTaskListManager().parseInteractionEvent(event6);
-// assertEquals(1, thisWeekActivity.getChildren().size());
-// long expectedTotalTime = 0;// time6.getTime() - time5.getTime() +
-// // time2.getTime() - time1.getTime();
-// assertEquals(expectedTotalTime, thisWeekActivity.getTotalElapsed());
-// assertEquals(expectedTotalTime, TasksUiPlugin.getTaskListManager().getElapsedTime(task1));
-// assertEquals(expectedTotalTime, thisWeekActivity.getElapsed(new ScheduledTaskDelegate(thisWeekActivity, task1,
-// null, null)));
-// }
-//
-// public void testTaskListManagerActivity() {
-//
-// AbstractTask task1 = new LocalTask("task 1", "Task 1");
-// AbstractTask task2 = new LocalTask("task 2", "Task 2");
-// TasksUiPlugin.getTaskList().addTask(task1);
-// TasksUiPlugin.getTaskList().addTask(task2);
-//
-// // test this week
-// ScheduledTaskContainer thisWeekActivity = TasksUiPlugin.getTaskListManager().getActivityThisWeek();
-// assertNotNull(thisWeekActivity);
-// assertEquals(0, thisWeekActivity.getChildren().size());
-// assertEquals(0, thisWeekActivity.getTotalElapsed());
-// Calendar thisWeekCalendarStart = GregorianCalendar.getInstance();
-// thisWeekCalendarStart.setTime(thisWeekActivity.getStart().getTime());
-// Calendar thisWeekCalendarStop = GregorianCalendar.getInstance();
-// thisWeekCalendarStop.setTime(thisWeekActivity.getStart().getTime());
-// thisWeekCalendarStop.add(Calendar.MILLISECOND, 2);
-// assertTrue(thisWeekActivity.includes(thisWeekCalendarStart));
-//
-// InteractionEvent event1 = new InteractionEvent(InteractionEvent.Kind.SELECTION, "structureKind",
-// task1.getHandleIdentifier(), "originId", "navigatedRelation",
-// InteractionContextManager.ACTIVITY_DELTA_ACTIVATED, 2f, thisWeekCalendarStart.getTime(),
-// thisWeekCalendarStart.getTime());
-// InteractionEvent event2 = new InteractionEvent(InteractionEvent.Kind.SELECTION, "structureKind",
-// task1.getHandleIdentifier(), "originId", "navigatedRelation",
-// InteractionContextManager.ACTIVITY_DELTA_DEACTIVATED, 2f, thisWeekCalendarStop.getTime(),
-// thisWeekCalendarStop.getTime());
-//
-// TasksUiPlugin.getTaskListManager().parseInteractionEvent(event1);
-// TasksUiPlugin.getTaskListManager().parseInteractionEvent(event2);
-// assertEquals(1, thisWeekActivity.getChildren().size());
-// assertEquals(0, thisWeekActivity.getTotalElapsed());
-// // assertEquals(thisWeekCalendarStop.getTime().getTime() -
-// // thisWeekCalendarStart.getTime().getTime(),
-// // thisWeekActivity.getTotalElapsed());
-//
-// TasksUiPlugin.getTaskListManager().parseInteractionEvent(event1);
-// TasksUiPlugin.getTaskListManager().parseInteractionEvent(event2);
-// assertEquals(1, thisWeekActivity.getChildren().size());
-// // assertEquals(2 * (thisWeekCalendarStop.getTime().getTime() -
-// // thisWeekCalendarStart.getTime().getTime()),
-// // thisWeekActivity.getTotalElapsed());
-// // assertEquals(2 * (thisWeekCalendarStop.getTime().getTime() -
-// // thisWeekCalendarStart.getTime().getTime()),
-// // thisWeekActivity.getElapsed(new
-// // DateRangeActivityDelegate(thisWeekActivity, task1, null, null)));
-//
-// // multiple tasks in category
-// event1 = new InteractionEvent(InteractionEvent.Kind.SELECTION, "structureKind", task2.getHandleIdentifier(),
-// "originId", "navigatedRelation", InteractionContextManager.ACTIVITY_DELTA_ACTIVATED, 2f,
-// thisWeekCalendarStart.getTime(), thisWeekCalendarStart.getTime());
-// event2 = new InteractionEvent(InteractionEvent.Kind.SELECTION, "structureKind", task2.getHandleIdentifier(),
-// "originId", "navigatedRelation", InteractionContextManager.ACTIVITY_DELTA_DEACTIVATED, 2f,
-// thisWeekCalendarStop.getTime(), thisWeekCalendarStop.getTime());
-// TasksUiPlugin.getTaskListManager().parseInteractionEvent(event1);
-// TasksUiPlugin.getTaskListManager().parseInteractionEvent(event2);
-// assertEquals(2, thisWeekActivity.getChildren().size());
-//
-// // test Past
-// ScheduledTaskContainer pastActivity = TasksUiPlugin.getTaskListManager().getActivityPast();
-// assertNotNull(pastActivity);
-// assertEquals(0, pastActivity.getChildren().size());
-//
-// InteractionEvent event3 = new InteractionEvent(InteractionEvent.Kind.SELECTION, "structureKind",
-// task2.getHandleIdentifier(), "originId", "navigatedRelation",
-// InteractionContextManager.ACTIVITY_DELTA_ACTIVATED, 2f, pastActivity.getStart().getTime(),
-// pastActivity.getStart().getTime());
-// InteractionEvent event4 = new InteractionEvent(InteractionEvent.Kind.SELECTION, "structureKind",
-// task2.getHandleIdentifier(), "originId", "navigatedRelation",
-// InteractionContextManager.ACTIVITY_DELTA_DEACTIVATED, 2f, pastActivity.getEnd().getTime(),
-// pastActivity.getEnd().getTime());
-//
-// TasksUiPlugin.getTaskListManager().parseInteractionEvent(event3);
-// TasksUiPlugin.getTaskListManager().parseInteractionEvent(event4);
-// assertEquals(1, pastActivity.getChildren().size());
-//
-// // test Future
-// ScheduledTaskContainer futureActivity = TasksUiPlugin.getTaskListManager().getActivityFuture();
-// assertNotNull(futureActivity);
-// assertEquals(0, futureActivity.getChildren().size());
-//
-// InteractionEvent event5 = new InteractionEvent(InteractionEvent.Kind.SELECTION, "structureKind",
-// task2.getHandleIdentifier(), "originId", "navigatedRelation",
-// InteractionContextManager.ACTIVITY_DELTA_ACTIVATED, 2f, futureActivity.getStart().getTime(),
-// futureActivity.getStart().getTime());
-// InteractionEvent event6 = new InteractionEvent(InteractionEvent.Kind.SELECTION, "structureKind",
-// task2.getHandleIdentifier(), "originId", "navigatedRelation",
-// InteractionContextManager.ACTIVITY_DELTA_DEACTIVATED, 2f, futureActivity.getEnd().getTime(),
-// futureActivity.getEnd().getTime());
-//
-// TasksUiPlugin.getTaskListManager().parseInteractionEvent(event5);
-// TasksUiPlugin.getTaskListManager().parseInteractionEvent(event6);
-// // No longer adding activity to future bins (days of week, next week, or
-// // future)
-// assertEquals(0, futureActivity.getChildren().size());
-//
-// // test Next week activity
-// ScheduledTaskContainer activityNextWeek = TasksUiPlugin.getTaskListManager().getActivityNextWeek();
-// assertNotNull(activityNextWeek);
-// assertEquals(0, activityNextWeek.getChildren().size());
-//
-// InteractionEvent event7 = new InteractionEvent(InteractionEvent.Kind.SELECTION, "structureKind",
-// task2.getHandleIdentifier(), "originId", "navigatedRelation",
-// InteractionContextManager.ACTIVITY_DELTA_ACTIVATED, 2f, activityNextWeek.getStart().getTime(),
-// activityNextWeek.getStart().getTime());
-// InteractionEvent event8 = new InteractionEvent(InteractionEvent.Kind.SELECTION, "structureKind",
-// task2.getHandleIdentifier(), "originId", "navigatedRelation",
-// InteractionContextManager.ACTIVITY_DELTA_DEACTIVATED, 2f, activityNextWeek.getEnd().getTime(),
-// activityNextWeek.getEnd().getTime());
-//
-// TasksUiPlugin.getTaskListManager().parseInteractionEvent(event7);
-// TasksUiPlugin.getTaskListManager().parseInteractionEvent(event8);
-// // No longer adding activity to future bins (days of week, next week, or
-// // future)
-// assertEquals(0, activityNextWeek.getChildren().size());
-//
-// // test Previous week activity
-// ScheduledTaskContainer activityPreviousWeek = TasksUiPlugin.getTaskListManager().getActivityPrevious();
-// assertNotNull(activityPreviousWeek);
-// assertEquals(0, activityPreviousWeek.getChildren().size());
-//
-// InteractionEvent event9 = new InteractionEvent(InteractionEvent.Kind.SELECTION, "structureKind",
-// task2.getHandleIdentifier(), "originId", "navigatedRelation",
-// InteractionContextManager.ACTIVITY_DELTA_ACTIVATED, 2f, activityPreviousWeek.getStart().getTime(),
-// activityPreviousWeek.getStart().getTime());
-// InteractionEvent event10 = new InteractionEvent(InteractionEvent.Kind.SELECTION, "structureKind",
-// task2.getHandleIdentifier(), "originId", "navigatedRelation",
-// InteractionContextManager.ACTIVITY_DELTA_DEACTIVATED, 2f, activityPreviousWeek.getEnd().getTime(),
-// activityPreviousWeek.getEnd().getTime());
-//
-// TasksUiPlugin.getTaskListManager().parseInteractionEvent(event9);
-// TasksUiPlugin.getTaskListManager().parseInteractionEvent(event10);
-// assertEquals(1, activityPreviousWeek.getChildren().size());
-// }
-
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskDataExportTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskDataExportTest.java
deleted file mode 100644
index 6ad103070..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskDataExportTest.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.tasks.tests;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.util.ArrayList;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipInputStream;
-
-import org.eclipse.mylyn.context.core.ContextCore;
-import org.eclipse.mylyn.context.tests.AbstractContextTest;
-import org.eclipse.mylyn.internal.context.core.ContextCorePlugin;
-import org.eclipse.mylyn.internal.context.core.InteractionContext;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.ui.TaskListManager;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.TaskDataExportWizard;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.TaskDataExportWizardPage;
-import org.eclipse.mylyn.monitor.core.InteractionEvent;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Test case for the Task Export Wizard
- *
- * @author Wesley Coelho
- * @author Mik Kersten (fixes)
- */
-public class TaskDataExportTest extends AbstractContextTest {
-
- private TaskDataExportWizard wizard = null;
-
- private TaskDataExportWizardPage wizardPage = null;
-
- private File destinationDir = null;
-
- private AbstractTask task1 = null;
-
- private final TaskListManager manager = TasksUiPlugin.getTaskListManager();
-
- private InteractionContext mockContext;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
-
- removeFiles(new File(TasksUiPlugin.getDefault().getDataDirectory()));
-// ContextCore.getContextStore().init();
-
- // Create the export wizard
- wizard = new TaskDataExportWizard();
- wizard.addPages();
- wizard.createPageControls(new Shell());
- wizardPage = (TaskDataExportWizardPage) wizard.getPage(TaskDataExportWizardPage.PAGE_NAME);
- assertNotNull(wizardPage);
-
- // Create test export destination directory
- destinationDir = new File(TasksUiPlugin.getDefault().getDataDirectory() + File.separator + "TestDir");
- if (destinationDir.exists()) {
- removeFiles(destinationDir);
- } else {
- destinationDir.mkdir();
- }
- assertTrue(destinationDir.exists());
-
- // Create a task and context with an interaction event to be saved
- task1 = TasksUiInternal.createNewLocalTask("Export Test Task");
- manager.getTaskList().addTask(task1);
- mockContext = (InteractionContext) ContextCorePlugin.getContextStore().loadContext(task1.getHandleIdentifier());
- InteractionEvent event = new InteractionEvent(InteractionEvent.Kind.EDIT, "structureKind", "handle", "originId");
- mockContext.parseEvent(event);
- ContextCorePlugin.getContextManager().internalActivateContext(mockContext);
-
- // Save the context file and check that it exists
- assertTrue(ContextCorePlugin.getContextStore().getContextDirectory().exists());
- ContextCorePlugin.getContextStore().saveContext(mockContext.getHandleIdentifier());
- File taskFile = ContextCorePlugin.getContextStore().getFileForContext(task1.getHandleIdentifier());
- assertTrue(ContextCore.getContextManager().hasContext(task1.getHandleIdentifier()));
- assertTrue(taskFile.exists());
- }
-
- @Override
- protected void tearDown() throws Exception {
- removeFiles(destinationDir);
- destinationDir.delete();
- assertFalse(destinationDir.exists());
- ContextCore.getContextManager().deactivateContext(mockContext.getHandleIdentifier());
- super.tearDown();
- }
-
- /**
- * Tests the wizard when it has been asked to export all task data to a zip file
- */
- public void testExportAllToZip() throws Exception {
-
- // Set parameters in the wizard to simulate a user setting them and
- // clicking "Finish"
- wizardPage.setParameters(true, true, true, true, true, destinationDir.getPath());
- wizard.performFinish();
-
- // Check that the task list file was exported
- File destZipFile = new File(destinationDir + File.separator + TaskDataExportWizard.getZipFileName());
- assertTrue(destZipFile.exists());
- ZipInputStream zipInputStream = new ZipInputStream(new FileInputStream(destZipFile));
- ArrayList<String> entries = new ArrayList<String>();
-
- ZipEntry entry = zipInputStream.getNextEntry();
- while (entry != null) {
- entries.add(entry.getName());
- entry = zipInputStream.getNextEntry();
- }
- zipInputStream.close();
- assertEquals(3, entries.size());
- assertTrue(entries.contains("tasklist.xml.zip"));
- assertTrue(entries.contains("contexts/local-1.xml.zip"));
- }
-
- private void removeFiles(File root) {
- if (root.isDirectory()) {
- for (File file : root.listFiles()) {
- if (file.isDirectory()) {
- removeFiles(file);
- }
- file.delete();
- }
- }
- }
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskDataImportTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskDataImportTest.java
deleted file mode 100644
index e9409731a..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskDataImportTest.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.tasks.tests;
-
-import java.io.File;
-
-import org.eclipse.mylyn.context.tests.AbstractContextTest;
-import org.eclipse.mylyn.internal.context.core.ContextCorePlugin;
-import org.eclipse.mylyn.internal.tasks.ui.TaskListManager;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.TaskDataImportWizard;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.TaskDataImportWizardPage;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Test case for the Task Import Wizard
- *
- * @author Rob Elves
- */
-public class TaskDataImportTest extends AbstractContextTest {
-
- private TaskDataImportWizard wizard = null;
-
- private TaskDataImportWizardPage wizardPage = null;
-
- private final String sourceZipPath = "testdata/taskdataimporttest/mylardata-2007-01-19.zip";
-
- private File sourceZipFile = null;
-
- private final TaskListManager manager = TasksUiPlugin.getTaskListManager();
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
-
- // Create the import wizard
- wizard = new TaskDataImportWizard();
- wizard.addPages();
- wizard.createPageControls(new Shell());
- wizardPage = (TaskDataImportWizardPage) wizard.getPage(TaskDataImportWizardPage.PAGE_NAME);
- assertNotNull(wizardPage);
-
- manager.resetTaskList();
- assertEquals(2, manager.getTaskList().getRootElements().size());
-
- sourceZipFile = TaskTestUtil.getLocalFile(sourceZipPath);
- assertTrue(sourceZipFile.exists());
-
- // make correct number of categories exist prior to import tests
- assertEquals(1, manager.getTaskList().getTaskCategories().size());
- ContextCorePlugin.getContextManager().getActivityMetaContext().reset();
- }
-
- @Override
- protected void tearDown() throws Exception {
- ContextCorePlugin.getContextManager().resetActivityMetaContext();
- TasksUiPlugin.getRepositoryManager().clearRepositories(TasksUiPlugin.getDefault().getRepositoriesFilePath());
- TasksUiPlugin.getTaskListManager().resetTaskList();
- super.tearDown();
- }
-
- /**
- * Tests the wizard when it has been asked to import all task data from a zip file
- */
- // XXX: Put Back
-// public void testImportRepositoriesZip() {
-// TaskList taskList = TasksUiPlugin.getTaskList();
-// InteractionContext historyContext = ContextCorePlugin.getContextManager().getActivityMetaContext();
-// assertNotNull(taskList);
-// assertNotNull(historyContext);
-// assertTrue(taskList.getAllTasks().size() == 0);
-// assertTrue(historyContext.getInteractionHistory().size() == 0);
-//
-// wizardPage.setParameters(true, true, true, true, true, "", sourceZipFile.getPath());
-// wizard.performFinish();
-//
-// Collection<AbstractTask> tasks = taskList.getAllTasks();
-// assertEquals(2, tasks.size());
-// for (AbstractTask task : tasks) {
-// assertTrue(ContextCorePlugin.getContextManager().hasContext(task.getHandleIdentifier()));
-// }
-// historyContext = ContextCorePlugin.getContextManager().getActivityMetaContext();
-// assertNotNull(historyContext);
-// assertTrue(historyContext.getInteractionHistory().size() > 0);
-// assertTrue(TasksUiPlugin.getRepositoryManager().getAllRepositories().size() > 2);
-// }
- // XXX: Put Back
-// public void testImportOverwritesAllTasks() {
-// TaskList taskList = TasksUiPlugin.getTaskList();
-// InteractionContext historyContext = ContextCorePlugin.getContextManager().getActivityMetaContext();
-// assertNotNull(taskList);
-// assertNotNull(historyContext);
-// assertTrue(taskList.getAllTasks().size() == 0);
-// assertTrue(historyContext.getInteractionHistory().size() == 0);
-// //assertEquals(2, TasksUiPlugin.getRepositoryManager().getAllRepositories().size());
-//
-// AbstractTask task1 = new LocalTask("999", "label");
-// taskList.addTask(task1);
-// Collection<AbstractTask> tasks = taskList.getAllTasks();
-// assertEquals(1, tasks.size());
-//
-// wizardPage.setParameters(true, true, true, true, true, "", sourceZipFile.getPath());
-// wizard.performFinish();
-//
-// tasks = taskList.getAllTasks();
-// assertEquals(2, tasks.size());
-// assertTrue(!taskList.getAllTasks().contains(task1));
-// for (AbstractTask task : tasks) {
-// assertTrue(ContextCorePlugin.getContextManager().hasContext(task.getHandleIdentifier()));
-// }
-// historyContext = ContextCorePlugin.getContextManager().getActivityMetaContext();
-// assertNotNull(historyContext);
-// assertTrue(historyContext.getInteractionHistory().size() > 0);
-// assertTrue(TasksUiPlugin.getRepositoryManager().getAllRepositories().size() > 2);
-// }
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskDataStorageManagerTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskDataStorageManagerTest.java
deleted file mode 100644
index b7674a838..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskDataStorageManagerTest.java
+++ /dev/null
@@ -1,258 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import java.io.IOException;
-import java.util.HashSet;
-import java.util.Set;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.mylyn.internal.tasks.core.TaskDataStorageManager;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskAttribute;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.tests.connector.MockAttributeFactory;
-import org.eclipse.mylyn.tasks.tests.connector.MockRepositoryConnector;
-
-/**
- * @author Rob Elves
- */
-public class TaskDataStorageManagerTest extends TestCase {
-
- TaskDataStorageManager offlineTaskDataManager;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- offlineTaskDataManager = TasksUiPlugin.getTaskDataStorageManager();
- offlineTaskDataManager.clear();
- offlineTaskDataManager.saveNow();
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
- if (offlineTaskDataManager != null) {
- offlineTaskDataManager.clear();
- offlineTaskDataManager.saveNow();
- }
- }
-
- public void testAdd() throws CoreException {
- RepositoryTaskData taskData = new RepositoryTaskData(new MockAttributeFactory(),
- MockRepositoryConnector.REPOSITORY_KIND, MockRepositoryConnector.REPOSITORY_URL, "1");
- offlineTaskDataManager.setNewTaskData(taskData);
- assertNotNull(offlineTaskDataManager.getNewTaskData(MockRepositoryConnector.REPOSITORY_URL, "1"));
- }
-
- public void testSave() throws CoreException, IOException, ClassNotFoundException {
- RepositoryTaskData taskData = new RepositoryTaskData(new MockAttributeFactory(),
- MockRepositoryConnector.REPOSITORY_KIND, MockRepositoryConnector.REPOSITORY_URL, "1");
-
- RepositoryTaskAttribute attrib1 = new RepositoryTaskAttribute("key", "name", false);
- attrib1.putMetaDataValue("key1", "value1");
- attrib1.putMetaDataValue("key2", "value2");
- taskData.addAttribute("key", attrib1);
-
- assertNotNull(taskData.getAttribute("key"));
-
- offlineTaskDataManager.setNewTaskData(taskData);
-
- taskData = new RepositoryTaskData(new MockAttributeFactory(), MockRepositoryConnector.REPOSITORY_KIND,
- MockRepositoryConnector.REPOSITORY_URL, "2");
-
- RepositoryTaskAttribute attrib2 = new RepositoryTaskAttribute("key", "name", false);
- attrib2.putMetaDataValue("key3", "value3");
- attrib2.putMetaDataValue("key4", "value4");
- taskData.addAttribute("key", attrib2);
-
- assertNotNull(taskData.getAttribute("key"));
-
- offlineTaskDataManager.setNewTaskData(taskData);
-
- RepositoryTaskData loaded = offlineTaskDataManager.getNewTaskData(MockRepositoryConnector.REPOSITORY_URL, "1");
- assertNotNull(loaded);
- RepositoryTaskAttribute atr = loaded.getAttribute("key");
- assertNotNull(atr);
- assertEquals("value1", atr.getMetaDataValue("key1"));
- assertEquals("value2", atr.getMetaDataValue("key2"));
-
- loaded = offlineTaskDataManager.getNewTaskData(MockRepositoryConnector.REPOSITORY_URL, "2");
- assertNotNull(loaded);
- atr = loaded.getAttribute("key");
- assertNotNull(atr);
-
- assertEquals("value3", atr.getMetaDataValue("key3"));
- assertEquals("value4", atr.getMetaDataValue("key4"));
-
- offlineTaskDataManager.saveNow();
- offlineTaskDataManager.remove(MockRepositoryConnector.REPOSITORY_URL, "1");
- offlineTaskDataManager.remove(MockRepositoryConnector.REPOSITORY_URL, "2");
-
- assertNull(offlineTaskDataManager.getNewTaskData(MockRepositoryConnector.REPOSITORY_URL, "1"));
- assertNull(offlineTaskDataManager.getNewTaskData(MockRepositoryConnector.REPOSITORY_URL, "2"));
-
- }
-
- public void testGetNextOfflineBugId() throws IOException, ClassNotFoundException {
- assertEquals("1", offlineTaskDataManager.getNewRepositoryTaskId());
- assertEquals("2", offlineTaskDataManager.getNewRepositoryTaskId());
- offlineTaskDataManager.saveNow();
- offlineTaskDataManager.clear(); // currently resets new task id
- assertEquals("1", offlineTaskDataManager.getNewRepositoryTaskId());
- }
-
-// public void testGetTaskData() throws CoreException, IOException, ClassNotFoundException {
-// RepositoryTaskData taskData = new RepositoryTaskData(new MockAttributeFactory(),
-// MockRepositoryConnector.REPOSITORY_KIND, MockRepositoryConnector.REPOSITORY_URL, "1");
-// taskData.setNewComment("version 1");
-// offlineTaskDataManager.setNewTaskData(RepositoryTaskHandleUtil.getHandle(MockRepositoryConnector.REPOSITORY_URL, "1"),
-// taskData);
-// offlineTaskDataManager.setOldTaskData(RepositoryTaskHandleUtil.getHandle(MockRepositoryConnector.REPOSITORY_URL, "1"),
-// taskData);
-// assertNotNull(offlineTaskDataManager.getNewTaskData(RepositoryTaskHandleUtil.getHandle(
-// MockRepositoryConnector.REPOSITORY_URL, "1")));
-// taskData = new RepositoryTaskData(new MockAttributeFactory(), MockRepositoryConnector.REPOSITORY_KIND,
-// MockRepositoryConnector.REPOSITORY_URL, "1");
-// taskData.setNewComment("version 2");
-// offlineTaskDataManager.setNewTaskData(RepositoryTaskHandleUtil.getHandle(MockRepositoryConnector.REPOSITORY_URL, "1"),
-// taskData);
-//
-// offlineTaskDataManager.saveNow();
-// offlineTaskDataManager.clear();
-// offlineTaskDataManager.readOfflineData();
-// assertEquals("version 2", offlineTaskDataManager.getNewTaskData(
-// RepositoryTaskHandleUtil.getHandle(MockRepositoryConnector.REPOSITORY_URL, "1")).getNewComment());
-// assertEquals("version 1", offlineTaskDataManager.getOldTaskData(MockRepositoryConnector.REPOSITORY_URL, "1").getNewComment());
-// }
-
- public void testUniqueCopy() throws Exception {
- RepositoryTaskData taskData = new RepositoryTaskData(new MockAttributeFactory(),
- MockRepositoryConnector.REPOSITORY_KIND, MockRepositoryConnector.REPOSITORY_URL, "1");
- offlineTaskDataManager.setNewTaskData(taskData);
- RepositoryTaskData taskData2 = offlineTaskDataManager.getEditableCopy(MockRepositoryConnector.REPOSITORY_URL,
- "1");
- assertNotNull(taskData2);
- taskData2.setNewComment("test");
- taskData = null;
- taskData = offlineTaskDataManager.getNewTaskData(MockRepositoryConnector.REPOSITORY_URL, "1");
- assertFalse(taskData.getNewComment().equals("test"));
-// taskData = null;
-// taskData = offlineTaskDataManager.getOldTaskData(RepositoryTaskHandleUtil.getHandle(
-// MockRepositoryConnector.REPOSITORY_URL, "1"));
-// assertFalse(taskData.getNewComment().equals("test"));
- }
-
- public void testRemoveRepositoryTaskData() throws CoreException, IOException, ClassNotFoundException {
- RepositoryTaskData taskData = new RepositoryTaskData(new MockAttributeFactory(),
- MockRepositoryConnector.REPOSITORY_KIND, MockRepositoryConnector.REPOSITORY_URL, "1");
- offlineTaskDataManager.setNewTaskData(taskData);
- taskData = new RepositoryTaskData(new MockAttributeFactory(), MockRepositoryConnector.REPOSITORY_KIND,
- MockRepositoryConnector.REPOSITORY_URL, "2");
- offlineTaskDataManager.setNewTaskData(taskData);
- offlineTaskDataManager.saveNow();
- assertNotNull(offlineTaskDataManager.getNewTaskData(MockRepositoryConnector.REPOSITORY_URL, "1"));
- assertNotNull(offlineTaskDataManager.getNewTaskData(MockRepositoryConnector.REPOSITORY_URL, "2"));
- offlineTaskDataManager.remove(MockRepositoryConnector.REPOSITORY_URL, "2");
- assertNotNull(offlineTaskDataManager.getNewTaskData(MockRepositoryConnector.REPOSITORY_URL, "1"));
- assertNull(offlineTaskDataManager.getNewTaskData(MockRepositoryConnector.REPOSITORY_URL, "2"));
- offlineTaskDataManager.saveNow();
- offlineTaskDataManager.clear();
- assertNull(offlineTaskDataManager.getNewTaskData(MockRepositoryConnector.REPOSITORY_URL, "1"));
- assertNull(offlineTaskDataManager.getNewTaskData(MockRepositoryConnector.REPOSITORY_URL, "2"));
- }
-
- public void testEditing() {
- RepositoryTaskData taskData = new RepositoryTaskData(new MockAttributeFactory(),
- MockRepositoryConnector.REPOSITORY_KIND, MockRepositoryConnector.REPOSITORY_URL, "1");
- offlineTaskDataManager.setNewTaskData(taskData);
-
- assertNotNull(offlineTaskDataManager.getNewTaskData(MockRepositoryConnector.REPOSITORY_URL, "1"));
-// assertNotNull(offlineTaskDataManager.getOldTaskData(RepositoryTaskHandleUtil.getHandle(
-// MockRepositoryConnector.REPOSITORY_URL, "1")));
-
- RepositoryTaskData editData = offlineTaskDataManager.getEditableCopy(MockRepositoryConnector.REPOSITORY_URL,
- "1");
- assertNotNull(editData);
- editData.setAttributeFactory(new MockAttributeFactory());
- editData.refresh();
- editData.setAttributeValue(RepositoryTaskAttribute.COMMENT_NEW, "new comment");
- // for (RepositoryTaskAttribute attribute: editData.getAttributes()) {
- // assertTrue(taskData.getAttribute(attribute.getID()).equals(attribute));
- // }
-
- Set<RepositoryTaskAttribute> attSave = new HashSet<RepositoryTaskAttribute>();
- attSave.add(editData.getAttribute(RepositoryTaskAttribute.COMMENT_NEW));
- offlineTaskDataManager.saveEdits(MockRepositoryConnector.REPOSITORY_URL, "1", attSave);
-
- editData = null;
- editData = offlineTaskDataManager.getEditableCopy(MockRepositoryConnector.REPOSITORY_URL, "1");
- assertNotNull(editData);
- assertEquals("new comment", editData.getAttributeValue(RepositoryTaskAttribute.COMMENT_NEW));
-
- }
-
- // /** DND
- // * As is will write 81481326 bytes.
- // *
- // * @throws Exception
- // */
- // public void testLargeDataSet() throws Exception {
- // RepositoryTaskData taskData;
- // for (int x = 1; x < 500; x++) {
- // taskData = new RepositoryTaskData(new MockAttributeFactory(),
- // MockRepositoryConnector.REPOSITORY_KIND,
- // MockRepositoryConnector.REPOSITORY_URL, "" + x);
- //
- // for (int y = 1; y < 60; y++) {
- // RepositoryTaskAttribute attribute = new RepositoryTaskAttribute("" + y,
- // "" + y, false);
- // for (int z = 1; z < 10; z++) {
- // attribute.addOption("" + z, "" + z);
- // attribute.addValue("" + z);
- // }
- // taskData.addAttribute("" + y, attribute);
- // }
- //
- // for (int y = 1; y < 5; y++) {
- // RepositoryOperation op = new RepositoryOperation("" + y, "" + y);
- // taskData.addOperation(op);
- // }
- //
- // try {
- // for (int y = 1; y < 1000; y++) {
- // TaskComment comment = new TaskComment(new MockAttributeFactory(), y);
- // comment.setAttributeValue(RepositoryTaskAttribute.COMMENT_TEXT, "Testing
- // \u05D0");
- // taskData.addComment(comment);
- // }
- // } catch (StackOverflowError e) {
- // e.printStackTrace();
- // }
- //
- // // for(int y = 1; y < 1000; y++) {
- // // RepositoryAttachment attachment = new
- // // RepositoryAttachment(repository, new MockAttributeFactory());
- // // taskData.addAttachment(attachment);
- // // }
- //
- // offlineTaskDataManager.put(taskData);
- // offlineTaskDataManager.put(taskData);
- // }
- // offlineTaskDataManager.save();
- // File file =
- // TasksUiPlugin.getDefault().getOfflineReportsFilePath().toFile();
- // offlineTaskDataManager.clear();
- // offlineTaskDataManager.readOfflineData();
- // assertNotNull(offlineTaskDataManager.getOldTaskData(AbstractTask.getHandle(
- // MockRepositoryConnector.REPOSITORY_URL, 400)));
- // }
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskDiffUtilTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskDiffUtilTest.java
deleted file mode 100644
index 32d20d974..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskDiffUtilTest.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.internal.tasks.ui.notifications.TaskDiffUtil;
-
-/**
- * @author Eugene Kuleshov
- */
-public class TaskDiffUtilTest extends TestCase {
-
- public void testCleanComment() {
- assertEquals("attachment: some attachment. attachment description",
- TaskDiffUtil.cleanCommentText(("Created an attachment (id=111)\n" //
- + "some attachment\n" //
- + "\n" //
- + "attachment description")));
- assertEquals("attachment: some attachment", TaskDiffUtil.cleanCommentText(("Created an attachment (id=111)\n" //
- + "some attachment\n" //
- + "\n")));
- assertEquals("some comment", TaskDiffUtil.cleanCommentText(("(In reply to comment #11)\n" //
- + "some comment\n")));
- assertEquals("some comment. other comment", TaskDiffUtil.cleanCommentText((" (In reply to comment #11)\n" //
- + "some comment\n" //
- + "\n" //
- + " (In reply to comment #12)\n" //
- + "other comment\n")));
- assertEquals("some comment. other comment", TaskDiffUtil.cleanCommentText((" (In reply to comment #11)\n" //
- + "some comment. \n" //
- + "\n" //
- + " (In reply to comment #12)\n" //
- + "> loren ipsum\n" + "> loren ipsum\n" + "other comment\n")));
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskExportImportTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskExportImportTest.java
deleted file mode 100644
index acf2ae190..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskExportImportTest.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.net.URLEncoder;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipInputStream;
-
-import org.eclipse.mylyn.context.core.ContextCore;
-import org.eclipse.mylyn.context.core.IInteractionContext;
-import org.eclipse.mylyn.context.tests.AbstractContextTest;
-import org.eclipse.mylyn.internal.context.core.ContextCorePlugin;
-import org.eclipse.mylyn.internal.context.core.InteractionContext;
-import org.eclipse.mylyn.internal.context.core.InteractionContextManager;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
-import org.eclipse.mylyn.internal.tasks.core.LocalTask;
-import org.eclipse.mylyn.internal.tasks.core.TaskList;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.monitor.core.InteractionEvent;
-
-/**
- *
- * @author Jevgeni Holodkov
- */
-public class TaskExportImportTest extends AbstractContextTest {
-
- private File dest;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- removeFiles(new File(TasksUiPlugin.getDefault().getDataDirectory()));
-// ContextCore.getContextStore().init();
-
- // Create test export destination directory
- dest = new File(TasksUiPlugin.getDefault().getDataDirectory() + File.separator + "TestDir");
- if (dest.exists()) {
- removeFiles(dest);
- } else {
- dest.mkdir();
- }
- assertTrue(dest.exists());
-
- }
-
- @Override
- protected void tearDown() throws Exception {
- removeFiles(dest);
- dest.delete();
- assertFalse(dest.exists());
-
- super.tearDown();
- }
-
- public void testTaskContextExport() throws IOException {
-
- LocalTask task = TasksUiInternal.createNewLocalTask("Test local task");
- TaskList taskList = TasksUiPlugin.getTaskList();
- taskList.addTask(task, taskList.getDefaultCategory());
- assertTrue(taskList.getAllTasks().size() > 0);
-
- InteractionContext mockContext = (InteractionContext) ContextCorePlugin.getContextStore().loadContext(
- task.getHandleIdentifier());
-
- ContextCorePlugin.getContextManager().internalActivateContext(mockContext);
- InteractionEvent event = new InteractionEvent(InteractionEvent.Kind.EDIT, "structureKind", "handle", "originId");
- mockContext.parseEvent(event);
- ContextCore.getContextManager().deactivateContext(mockContext.getHandleIdentifier());
-
- assertTrue(ContextCorePlugin.getContextStore().getContextDirectory().exists());
- ContextCorePlugin.getContextStore().saveContext(mockContext.getHandleIdentifier());
- assertTrue(ContextCore.getContextManager().hasContext(task.getHandleIdentifier()));
-
- File outFile = new File(dest + File.separator + "local-task.xml.zip");
- TasksUiPlugin.getTaskListManager().getTaskListWriter().writeTask(task, outFile);
- assertTrue(outFile.exists());
-
- // check the content of the archive
- List<String> files = new ArrayList<String>();
- ZipInputStream inputStream = new ZipInputStream(new FileInputStream(outFile));
- ZipEntry entry = null;
- while ((entry = inputStream.getNextEntry()) != null) {
- files.add(entry.getName());
- }
- inputStream.close();
-
- assertTrue("exported file contains a file with queries", files.contains(ITasksCoreConstants.OLD_TASK_LIST_FILE));
-
- String handleIdentifier = mockContext.getHandleIdentifier();
- String encoded = URLEncoder.encode(handleIdentifier, InteractionContextManager.CONTEXT_FILENAME_ENCODING);
- String contextName = encoded + InteractionContextManager.CONTEXT_FILE_EXTENSION_OLD;
- assertTrue("exported file contains a file with context", files.contains(contextName));
-
- // reset all data
- TasksUiPlugin.getTaskListManager().resetTaskList();
- assertTrue(taskList.getAllTasks().size() == 0);
-
- ContextCore.getContextManager().deleteContext(handleIdentifier);
- assertFalse(ContextCore.getContextManager().hasContext(task.getHandleIdentifier()));
-
- // load data back
- List<AbstractTask> tasks = TasksUiPlugin.getTaskListManager().getTaskListWriter().readTasks(outFile);
- IInteractionContext loadedContext = ContextCore.getContextStore().importContext(task.getHandleIdentifier(),
- outFile);
-
- // check with original one
- assertEquals("There is 1 task loaded", 1, tasks.size());
- assertEquals("Loaded task is correct", task, tasks.get(0));
- assertEquals("Loaded context is correct", mockContext, loadedContext);
-
- // import data
- for (AbstractTask loadedTask : tasks) {
- taskList.addTask(loadedTask);
- }
- ContextCorePlugin.getContextStore().importContext(loadedContext);
-
- // check that context was imported and is the same as original one
- IInteractionContext savedContext = ContextCorePlugin.getContextStore().loadContext(task.getHandleIdentifier());
- assertEquals("Saved context is the same as original one", mockContext, savedContext);
- assertEquals("Saved task is the same as original one", task, taskList.getTask(task.getHandleIdentifier()));
-
- ContextCorePlugin.getContextManager().deactivateAllContexts();
- }
-
- private void removeFiles(File root) {
- if (root.isDirectory()) {
- for (File file : root.listFiles()) {
- if (file.isDirectory()) {
- removeFiles(file);
- }
- file.delete();
- }
- }
- }
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskHistoryTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskHistoryTest.java
deleted file mode 100644
index 52e811546..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskHistoryTest.java
+++ /dev/null
@@ -1,234 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.internal.context.core.ContextCorePlugin;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.TaskActivationHistory;
-import org.eclipse.mylyn.internal.tasks.ui.TaskListManager;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.actions.ActivateTaskHistoryDropDownAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.TaskActivateAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.TaskDeactivateAction;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-
-/**
- * @author Wes Coelho
- * @author Rob Elves
- */
-public class TaskHistoryTest extends TestCase {
-
- private final TaskListManager manager = TasksUiPlugin.getTaskListManager();
-
- private TaskActivationHistory history;
-
- private AbstractTask task1;
-
- private AbstractTask task2;
-
- private AbstractTask task3;
-
- private AbstractTask task4;
-
- private AbstractTask task5;
-
- private ActivateTaskHistoryDropDownAction previousTaskAction;
-
- @Override
- protected void setUp() throws Exception {
- resetHistory();
-
- task1 = TasksUiInternal.createNewLocalTask("task 1");
- manager.getTaskList().addTask(task1);
-
- task2 = TasksUiInternal.createNewLocalTask("task 2");
- manager.getTaskList().addTask(task2);
-
- task3 = TasksUiInternal.createNewLocalTask("task 3");
- manager.getTaskList().addTask(task3);
-
- task4 = TasksUiInternal.createNewLocalTask("task 4");
- manager.getTaskList().addTask(task4);
-
- task5 = TasksUiInternal.createNewLocalTask("task 5");
- manager.getTaskList().addTask(task5);
-
- history = TasksUiPlugin.getTaskActivityManager().getTaskActivationHistory();
-
- previousTaskAction = new ActivateTaskHistoryDropDownAction();
- }
-
- private void resetHistory() {
- manager.deactivateAllTasks();
- TasksUiPlugin.getTaskActivityManager().clear();
- ContextCorePlugin.getContextManager().resetActivityMetaContext();
- }
-
- /**
- * Tests the next task and previous task navigation.
- */
- public void testBasicHistoryNavigation() {
- // NOTE: legacy test
- (new TaskActivateAction()).run(task1);
- history.addTask(task1);
- (new TaskActivateAction()).run(task2);
- history.addTask(task2);
- (new TaskActivateAction()).run(task3);
- history.addTask(task3);
-
- assertTrue(task3.isActive());
- assertFalse(task2.isActive());
- assertFalse(task1.isActive());
-
- previousTaskAction.run();
- assertTrue(task2.isActive());
-
- previousTaskAction.run();
- assertTrue(task1.isActive());
-
- previousTaskAction.run();
- assertTrue(task1.isActive());
-
- // taskView.getPreviousTaskAction().run();
- // assertTrue(task1.isActive());
- //
- // taskView.getPreviousTaskAction().run();
- // assertTrue(task1.isActive());
-
- // taskView.getNextTaskAction().run();
- // assertTrue(task2.isActive());
- //
- // taskView.getNextTaskAction().run();
- // assertTrue(task3.isActive());
- //
- // taskView.getNextTaskAction().run();
- // assertTrue(task3.isActive());
- //
- // taskView.getPreviousTaskAction().run();
- // assertTrue(task2.isActive());
- //
- // taskView.getNextTaskAction().run();
- // assertTrue(task3.isActive());
- //
- // (new TaskActivateAction()).run(task4);
- // history.addTask(task4); // Simulate clicking on it rather
- // // than navigating next or previous
- // assertTrue(task4.isActive());
- //
- // taskView.getNextTaskAction().run();
- // assertTrue(task4.isActive());
- //
- // taskView.getPreviousTaskAction().run();
- // assertTrue(task3.isActive());
- //
- // taskView.getNextTaskAction().run();
- // assertTrue(task4.isActive());
-
- }
-
- /**
- * Tests navigation to previous/next tasks that are chosen from a list rather than being sequentially navigated
- */
- public void testArbitraryHistoryNavigation() {
-
- resetHistory();
-
- // Simulate activating the tasks by clicking rather than
- // navigating previous/next
- (new TaskActivateAction()).run(task1);
- history.addTask(task1);
- (new TaskActivateAction()).run(task2);
- history.addTask(task2);
- (new TaskActivateAction()).run(task3);
- history.addTask(task3);
- (new TaskActivateAction()).run(task4);
- history.addTask(task4);
-
- assertTrue(task4.isActive());
- //TaskActivationHistory taskHistory = taskView.getTaskActivationHistory();
- List<AbstractTask> prevHistoryList = history.getPreviousTasks();
-
- // Check that the previous history list looks right
- assertTrue(prevHistoryList.size() >= 3);
- assertTrue(prevHistoryList.get(prevHistoryList.size() - 2) == task3);
- assertTrue(prevHistoryList.get(prevHistoryList.size() - 3) == task2);
- assertTrue(prevHistoryList.get(prevHistoryList.size() - 4) == task1);
-
- // Get a task from the list and activate it
- (new TaskActivateAction()).run(task2);
- assertTrue(task2.isActive());
-
- // Now check that the next and prev lists look right
- prevHistoryList = history.getPreviousTasks();
- assertTrue(prevHistoryList.get(prevHistoryList.size() - 1) == task2);
- assertTrue(prevHistoryList.get(prevHistoryList.size() - 2) == task4);
- assertTrue(prevHistoryList.get(prevHistoryList.size() - 3) == task3);
- assertTrue(prevHistoryList.get(prevHistoryList.size() - 4) == task1);
-
- // Activation of task outside of history navigation tool
- history.addTask(task3);
- prevHistoryList = history.getPreviousTasks();
- assertTrue(prevHistoryList.get(prevHistoryList.size() - 1) == task3);
- assertTrue(prevHistoryList.get(prevHistoryList.size() - 2) == task2);
- assertTrue(prevHistoryList.get(prevHistoryList.size() - 3) == task4);
- assertTrue(prevHistoryList.get(prevHistoryList.size() - 4) == task1);
-
- // Pick a task from drop down history
- (new TaskActivateAction()).run(task4);
- assertTrue(task4.isActive());
- assertTrue(prevHistoryList.get(prevHistoryList.size() - 1) == task4);
- assertTrue(prevHistoryList.get(prevHistoryList.size() - 2) == task3);
- assertTrue(prevHistoryList.get(prevHistoryList.size() - 3) == task2);
- assertTrue(prevHistoryList.get(prevHistoryList.size() - 4) == task1);
-
- // Hit previous task button
- previousTaskAction.run();
- assertTrue(task3.isActive());
- assertTrue(prevHistoryList.get(prevHistoryList.size() - 1) == task4);
- assertTrue(prevHistoryList.get(prevHistoryList.size() - 2) == task3);
- assertTrue(prevHistoryList.get(prevHistoryList.size() - 3) == task2);
- assertTrue(prevHistoryList.get(prevHistoryList.size() - 4) == task1);
-
- (new TaskDeactivateAction()).run(task3);
-
- // List<ITask> nextHistoryList = taskHistory.getNextTasks();
- // assertTrue(nextHistoryList.get(0) == task3);
- // assertTrue(nextHistoryList.get(1) == task4);
- //
- // // Navigate to a next item
- // NextTaskDropDownAction nextAction = new
- // NextTaskDropDownAction(taskView, taskHistory);
- // navigateAction = nextAction.new TaskNavigateAction(task4);
- // navigateAction.run();
- // taskHistory.navigatedToTask(task4);
- //
- // assertTrue(task4.isActive());
- //
- // // Check that the prev and next lists look right
- // nextHistoryList = taskHistory.getNextTasks();
- // prevHistoryList = taskHistory.getPreviousTasks();
- // assertTrue(nextHistoryList.size() == 0);
- // assertTrue(prevHistoryList.get(prevHistoryList.size() - 1) == task3);
- // assertTrue(prevHistoryList.get(prevHistoryList.size() - 2) == task2);
- // assertTrue(prevHistoryList.get(prevHistoryList.size() - 3) == task1);
- //
- // // Check that a deactivated task appears first on the history list
- // (new TaskActivateAction()).run(task5);
- // (new TaskDeactivateAction()).run(task5);
- // taskView.addTaskToHistory(task5);
- // prevHistoryList = taskHistory.getPreviousTasks();
- // assertTrue(prevHistoryList.get(prevHistoryList.size() - 1) == task5);
-
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskKeyComparatorTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskKeyComparatorTest.java
deleted file mode 100644
index b4619e075..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskKeyComparatorTest.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import java.util.Arrays;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskKeyComparator;
-
-/**
- * @author Eugene Kuleshov https://bugs.eclipse.org/bugs/show_bug.cgi?taskId=129511
- * @author Mik Kersten
- */
-public class TaskKeyComparatorTest extends TestCase {
-
- public void testPatterns() {
- comparisonCheck("", new String[] { null, null, "" });
- comparisonCheck(" ", new String[] { null, null, " " });
- comparisonCheck("aa", new String[] { null, null, "aa" });
- comparisonCheck("11", new String[] { "", "11", "" });
- comparisonCheck("11 aa", new String[] { "", "11", " aa" });
- comparisonCheck(" 11 aa", new String[] { null, null, " 11 aa" });
- comparisonCheck("aa11 bb", new String[] { "aa", "11", " bb" });
- comparisonCheck("aa-11 bb", new String[] { "aa-", "11", " bb" });
- comparisonCheck("aa 11 bb", new String[] { null, null, "aa 11 bb" });
- comparisonCheck("aa bb 11 cc", new String[] { null, null, "aa bb 11 cc" });
-
- comparisonCheck("aa", "aa", 0);
- comparisonCheck("aa", "bb", -1);
- comparisonCheck("bb", "aa", 1);
-
- comparisonCheck("aa11", "aa11", 0);
- comparisonCheck("aa11", "aa12", -1);
- comparisonCheck("aa12", "aa11", 1);
-
- comparisonCheck("aa1", "aa11", -1);
- comparisonCheck("aa1", "aa2", -1);
- comparisonCheck("aa1", "aa21", -1);
-
- comparisonCheck("aa1 aaa", "aa1 aaa", 0);
- comparisonCheck("aa1 aaa", "aa1 bbb", -1);
- comparisonCheck("aa1 bbb", "aa11 aaa", -1);
- }
-
- private void comparisonCheck(String s, String[] exptecation) {
- String[] res = new TaskKeyComparator().split(s);
- assertTrue("Invalid " + Arrays.asList(res) + " " + Arrays.asList(exptecation), Arrays.equals(res, exptecation));
- }
-
- private static final TaskKeyComparator tkc = new TaskKeyComparator();
-
- public void comparisonCheck(String s1, String s2, int n) {
- final String[] c1 = new String[] { null, null, s1 };
- final String[] c2 = new String[] { null, null, s2 };
- assertEquals(n, tkc.compare(c1, c2));
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskList06DataMigrationTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskList06DataMigrationTest.java
deleted file mode 100644
index a5a7a0fd5..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskList06DataMigrationTest.java
+++ /dev/null
@@ -1,304 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import java.io.File;
-import java.lang.reflect.InvocationTargetException;
-import java.net.URLEncoder;
-import java.util.ArrayList;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.mylyn.internal.commons.core.ZipFileUtil;
-import org.eclipse.mylyn.internal.context.core.InteractionContextManager;
-import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
-import org.eclipse.mylyn.internal.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-
-/**
- * Tests unused code that was live up to Mylyn 1.0.1, {@link TasksUiPlugin}
- *
- * @author Rob Elves
- */
-public class TaskList06DataMigrationTest extends TestCase {
-
- private final String sourceDir = "testdata/tasklistdatamigrationtest";
-
- private File sourceDirFile;
-
- private TaskListDataMigration migrator;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- sourceDirFile = TaskTestUtil.getLocalFile(sourceDir);
- assertNotNull(sourceDirFile);
- deleteAllFiles(sourceDirFile);
- migrator = new TaskListDataMigration(sourceDirFile);
- assertTrue(sourceDirFile.exists());
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
- deleteAllFiles(sourceDirFile);
- }
-
- public void testOldTasklistMigration() throws Exception {
- File oldTasklistFile = new File(sourceDirFile, "tasklist.xml");
- oldTasklistFile.createNewFile();
- assertTrue(new File(sourceDirFile, "tasklist.xml").exists());
- assertTrue(!new File(sourceDirFile, "tasklist.xml.zip").exists());
- assertTrue(migrator.migrateTaskList(new NullProgressMonitor()));
- assertFalse(new File(sourceDirFile, "tasklist.xml").exists());
- assertFalse(!new File(sourceDirFile, "tasklist.xml.zip").exists());
- }
-
- public void testOldRepositoriesMigration() throws Exception {
- File oldRepositoriesFile = new File(sourceDirFile, "repositories.xml");
- oldRepositoriesFile.createNewFile();
- assertTrue(new File(sourceDirFile, "repositories.xml").exists());
- assertTrue(!new File(sourceDirFile, "repositories.xml.zip").exists());
- assertTrue(migrator.migrateRepositoriesData(new NullProgressMonitor()));
- assertFalse(new File(sourceDirFile, "repositories.xml").exists());
- assertTrue(new File(sourceDirFile, "repositories.xml.zip").exists());
- }
-
- public void testOldContextMigration() throws Exception {
- String contextFileName1 = URLEncoder.encode("http://oldcontext1.xml",
- InteractionContextManager.CONTEXT_FILENAME_ENCODING);
- String contextFileName2 = URLEncoder.encode("http://oldcontext2.xml",
- InteractionContextManager.CONTEXT_FILENAME_ENCODING);
- String contextFileName3 = "task-1.xml";
- File oldContextFile1 = new File(sourceDirFile, contextFileName1);
- oldContextFile1.createNewFile();
- File oldContextFile2 = new File(sourceDirFile, contextFileName2);
- oldContextFile2.createNewFile();
- File oldContextFile3 = new File(sourceDirFile, contextFileName3);
- oldContextFile3.createNewFile();
- File contextFolder = new File(sourceDirFile, ITasksCoreConstants.CONTEXTS_DIRECTORY);
- assertTrue(!contextFolder.exists());
- assertTrue(migrator.migrateTaskContextData(new NullProgressMonitor()));
- assertFalse(oldContextFile1.exists());
- assertFalse(oldContextFile2.exists());
- assertFalse(oldContextFile3.exists());
- assertTrue(contextFolder.exists());
- assertTrue(new File(contextFolder, contextFileName1 + ".zip").exists());
- assertTrue(new File(contextFolder, contextFileName2 + ".zip").exists());
- assertTrue(new File(contextFolder, contextFileName3 + ".zip").exists());
- }
-
- public void testOldActivityMigration() throws Exception {
- File oldActivityFile = new File(sourceDirFile, InteractionContextManager.OLD_CONTEXT_HISTORY_FILE_NAME
- + InteractionContextManager.CONTEXT_FILE_EXTENSION_OLD);
- oldActivityFile.createNewFile();
- File contextFolder = new File(sourceDirFile, ITasksCoreConstants.CONTEXTS_DIRECTORY);
- assertTrue(!contextFolder.exists());
- assertTrue(migrator.migrateActivityData(new NullProgressMonitor()));
- assertFalse(oldActivityFile.exists());
- assertTrue(contextFolder.exists());
- assertTrue(new File(contextFolder, InteractionContextManager.CONTEXT_HISTORY_FILE_NAME
- + InteractionContextManager.CONTEXT_FILE_EXTENSION).exists());
- }
-
- private void deleteAllFiles(File folder) {
- for (File file : folder.listFiles()) {
- if (file.isDirectory()) {
- if (!file.getName().equals("CVS")) {
- deleteAllFiles(file);
- file.delete();
- }
- } else if (!file.getName().equals("empty.txt")) {
- file.delete();
- }
- }
- }
-}
-
-class TaskListDataMigration implements IRunnableWithProgress {
-
- private File dataDirectory = null;
-
- public TaskListDataMigration(File sourceFolder) {
- this.dataDirectory = sourceFolder;
- }
-
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- monitor.beginTask("Task Data Migration", IProgressMonitor.UNKNOWN);
- doMigration(monitor);
- } catch (Exception e) {
- throw new InvocationTargetException(e);
- } finally {
-
- }
- }
-
- public void doMigration(IProgressMonitor monitor) throws Exception {
- try {
- if (dataDirectory == null || !dataDirectory.exists()) {
- return;
- }
- monitor.beginTask("Mylar Data Migration", 4);
- migrateTaskList(new SubProgressMonitor(monitor, IProgressMonitor.UNKNOWN));
- monitor.worked(1);
- migrateRepositoriesData(new SubProgressMonitor(monitor, IProgressMonitor.UNKNOWN));
- monitor.worked(1);
- migrateTaskContextData(new SubProgressMonitor(monitor, IProgressMonitor.UNKNOWN));
- monitor.worked(1);
- migrateActivityData(new SubProgressMonitor(monitor, IProgressMonitor.UNKNOWN));
- monitor.worked(1);
- } finally {
- monitor.done();
- }
- }
-
- public boolean migrateTaskList(IProgressMonitor monitor) throws Exception {
- File oldTasklistFile = new File(dataDirectory, ITasksCoreConstants.OLD_TASK_LIST_FILE);
- File newTasklistFile = new File(dataDirectory, ITasksCoreConstants.DEFAULT_TASK_LIST_FILE);
- if (!oldTasklistFile.exists()) {
- return false;
- }
- if (newTasklistFile.exists()) {
- if (!newTasklistFile.delete()) {
- throw new Exception("Could not overwrite tasklist");
- }
- }
- ArrayList<File> filesToZip = new ArrayList<File>();
- filesToZip.add(oldTasklistFile);
- try {
- monitor.beginTask("Migrate Tasklist Data", 1);
- ZipFileUtil.createZipFile(newTasklistFile, filesToZip, new SubProgressMonitor(monitor, 1));
- if (!oldTasklistFile.delete()) {
- throw new Exception("Could not remove old tasklist.");
- }
- monitor.worked(1);
- } finally {
- monitor.done();
- }
- return true;
- }
-
- public boolean migrateRepositoriesData(IProgressMonitor monitor) throws Exception {
- File oldRepositoriesFile = new File(dataDirectory, TaskRepositoryManager.OLD_REPOSITORIES_FILE);
- File newRepositoriesFile = new File(dataDirectory, TaskRepositoryManager.DEFAULT_REPOSITORIES_FILE);
- if (!oldRepositoriesFile.exists()) {
- return false;
- }
- if (newRepositoriesFile.exists()) {
- if (!newRepositoriesFile.delete()) {
- throw new Exception(
- "Could not overwrite repositories file. Check read/write permission on data directory.");
- }
- }
- ArrayList<File> filesToZip = new ArrayList<File>();
- filesToZip.add(oldRepositoriesFile);
- try {
- monitor.beginTask("Migrate Repository Data", 1);
- ZipFileUtil.createZipFile(newRepositoriesFile, filesToZip, new SubProgressMonitor(monitor, 1));
- if (!oldRepositoriesFile.delete()) {
- throw new Exception(
- "Could not remove old repositories file. Check read/write permission on data directory.");
- }
- monitor.worked(1);
- } catch (Exception e) {
- throw new Exception("Error occurred while migrating old repositories data: " + e.getMessage());
- } finally {
- monitor.done();
- }
- return true;
- }
-
- public boolean migrateTaskContextData(IProgressMonitor monitor) throws Exception {
- ArrayList<File> contextFiles = new ArrayList<File>();
- for (File file : dataDirectory.listFiles()) {
- if (file.getName().startsWith("http") || file.getName().startsWith("local")
- || file.getName().startsWith("task")) {
- if (!file.getName().endsWith(".zip")) {
- contextFiles.add(file);
- }
- }
- }
-
- try {
- monitor.beginTask("Task Context Migration", contextFiles.size());
-
- File contextsFolder = new File(dataDirectory, ITasksCoreConstants.CONTEXTS_DIRECTORY);
- if (!contextsFolder.exists()) {
- if (!contextsFolder.mkdir()) {
- throw new Exception(
- "Could not create contexts folder. Check read/write permission on data directory.");
- }
- }
- for (File file : contextFiles) {
- ArrayList<File> filesToZip = new ArrayList<File>();
- filesToZip.add(file);
- File newContextFile = new File(contextsFolder, file.getName() + ".zip");
- if (newContextFile.exists()) {
- if (!newContextFile.delete()) {
- throw new Exception(
- "Could not overwrite context file. Check read/write permission on data directory.");
- }
- }
- ZipFileUtil.createZipFile(newContextFile, filesToZip, new SubProgressMonitor(monitor, 1));
- if (!file.delete()) {
- throw new Exception(
- "Could not remove old context file. Check read/write permission on data directory.");
- }
- monitor.worked(1);
- }
- } finally {
- monitor.done();
- }
- return true;
- }
-
- public boolean migrateActivityData(IProgressMonitor monitor) throws Exception {
- File oldActivityFile = new File(dataDirectory, InteractionContextManager.OLD_CONTEXT_HISTORY_FILE_NAME
- + InteractionContextManager.CONTEXT_FILE_EXTENSION_OLD);
- if (!oldActivityFile.exists()) {
- return false;
- }
-
- File contextsFolder = new File(dataDirectory, ITasksCoreConstants.CONTEXTS_DIRECTORY);
- if (!contextsFolder.exists()) {
- if (!contextsFolder.mkdir()) {
- throw new Exception("Could not create contexts folder. Check read/write permission on data directory.");
- }
- }
-
- File newActivityFile = new File(contextsFolder, InteractionContextManager.CONTEXT_HISTORY_FILE_NAME
- + InteractionContextManager.CONTEXT_FILE_EXTENSION);
-
- if (newActivityFile.exists()) {
- if (!newActivityFile.delete()) {
- throw new Exception("Could not overwrite activity file. Check read/write permission on data directory.");
- }
- }
- ArrayList<File> filesToZip = new ArrayList<File>();
- filesToZip.add(oldActivityFile);
- try {
- monitor.beginTask("Migrate Activity Data", 1);
- ZipFileUtil.createZipFile(newActivityFile, filesToZip, new SubProgressMonitor(monitor, 1));
- if (!oldActivityFile.delete()) {
- throw new Exception(
- "Could not remove old activity file. Check read/write permission on data directory.");
- }
- monitor.worked(1);
- } finally {
- monitor.done();
- }
- return true;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListBackupManagerTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListBackupManagerTest.java
deleted file mode 100644
index 00655c8d3..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListBackupManagerTest.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import java.io.File;
-import java.io.FilenameFilter;
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.LocalTask;
-import org.eclipse.mylyn.internal.tasks.ui.TaskListBackupManager;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.ITasksUiPreferenceConstants;
-
-/**
- * @author Rob Elves
- */
-public class TaskListBackupManagerTest extends TestCase {
-
- private AbstractTask task1;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- task1 = new LocalTask("handle", "label");
- TasksUiPlugin.getTaskList().addTask(task1);
- TasksUiPlugin.getTaskListManager().activateTask(task1);
- TasksUiPlugin.getTaskListManager().deactivateTask(task1);
- TasksUiPlugin.getTaskListManager().saveTaskList();
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- public void testAutoBackupDisabled() throws InterruptedException {
- TaskListBackupManager backupManager = TasksUiPlugin.getBackupManager();
- TasksUiPlugin.getDefault().getPreferenceStore().setValue(ITasksUiPreferenceConstants.BACKUP_SCHEDULE, 1);
- TasksUiPlugin.getDefault().getPreferenceStore().setValue(ITasksUiPreferenceConstants.BACKUP_LAST, 0f);
- assertEquals(0, TasksUiPlugin.getDefault().getPreferenceStore().getLong(ITasksUiPreferenceConstants.BACKUP_LAST));
- backupManager.start(5);
- Thread.sleep(3000);
- assertEquals(0, TasksUiPlugin.getDefault().getPreferenceStore().getLong(ITasksUiPreferenceConstants.BACKUP_LAST));
- }
-
- public void testAutoBackupEnabled() throws InterruptedException, InvocationTargetException, IOException {
- TaskListBackupManager backupManager = TasksUiPlugin.getBackupManager();
- String backupFolder = TasksUiPlugin.getDefault().getBackupFolderPath();
- File backupFileFolder = new File(backupFolder);
- deleteBackupFolder(backupFileFolder);
- backupManager.backupNow(true);
- Thread.sleep(3000);
- backupManager.backupNow(true);
- assertTrue(backupFileFolder.exists());
- assertTrue(backupFileFolder.isDirectory());
- assertTrue(backupFileFolder.listFiles(new FilenameFilter() {
- public boolean accept(File dir, String name) {
- if (name.matches("mylyndata-.*")) {
- return true;
- }
- return false;
- }
-
- }).length == 2);
-
- // Test removal of old backups
- TasksUiPlugin.getBackupManager().removeOldBackups();
- assertTrue(backupFileFolder.listFiles(new FilenameFilter() {
- public boolean accept(File dir, String name) {
- if (name.matches("mylyndata-.*")) {
- return true;
- }
- return false;
- }
-
- }).length == 1);
- }
-
- private void deleteBackupFolder(File backupFileFolder) {
- if (backupFileFolder.exists()) {
- for (File file : backupFileFolder.listFiles()) {
- file.delete();
- }
- backupFileFolder.delete();
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListContentProviderTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListContentProviderTest.java
deleted file mode 100644
index c4e13c330..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListContentProviderTest.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import java.util.Date;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.ITaskList;
-import org.eclipse.mylyn.internal.tasks.core.LocalTask;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.ITasksUiPreferenceConstants;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListContentProvider;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-
-/**
- * @author Felix Schwarz
- */
-public class TaskListContentProviderTest extends TestCase {
-
- private TaskListContentProvider provider;
-
- private TaskListView view;
-
- private ITaskList taskList;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- TasksUiUtil.openTasksViewInActivePerspective();
- view = TaskListView.getFromActivePerspective();
- provider = (TaskListContentProvider) view.getViewer().getContentProvider();
- TasksUiPlugin.getDefault().getPreferenceStore().setValue(ITasksUiPreferenceConstants.GROUP_SUBTASKS, true);
- view.clearFilters(true);
- view.addFilter(view.getCompleteFilter());
- taskList = TasksUiPlugin.getTaskList();
- }
-
- @Override
- protected void tearDown() throws Exception {
- view.clearFilters(true);
- super.tearDown();
- }
-
- public void testHasChildren() {
-
- AbstractTask parent = new LocalTask("parent", "parent label");
- AbstractTask completedChild = new LocalTask("completed child", "completed child label");
- completedChild.setCompletionDate(new Date());
- taskList.addTask(parent);
- taskList.addTask(completedChild, parent);
- assertFalse(provider.hasChildren(parent));
-
- AbstractTask incompleteChild = new LocalTask("incomplete child", "incomplete child label");
- incompleteChild.setCompletionDate(null);
- taskList.addTask(incompleteChild, parent);
- assertTrue(provider.hasChildren(parent));
- }
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListDnDTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListDnDTest.java
deleted file mode 100644
index e65912ae8..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListDnDTest.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import java.util.Collection;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.mylyn.internal.tasks.ui.TaskListManager;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListDropAdapter;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.tasks.core.ITask;
-
-/**
- * @author Rob Elves
- * @author Mik Kersten
- */
-public class TaskListDnDTest extends TestCase {
-
- private TaskListDropAdapter dropAdapter;
-
- private TaskListManager manager;
-
- @Override
- protected void setUp() throws Exception {
- manager = TasksUiPlugin.getTaskListManager();
- manager.resetTaskList();
-
- TreeViewer viewer = TaskListView.getFromActivePerspective().getViewer();
- assertNotNull(viewer);
- dropAdapter = new TaskListDropAdapter(viewer);
-
- TasksUiPlugin.getDefault().getLocalTaskRepository();
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
- manager.resetTaskList();
- manager.saveTaskList();
- assertNull(manager.getActiveTask());
- }
-
- public void testisUrl() {
- String url = "http://eclipse.org";
- String title = "Title";
- String urlData = url + "\n" + title;
- assertFalse(dropAdapter.isUrl(title));
- assertTrue(dropAdapter.isUrl(url));
- assertTrue(dropAdapter.isUrl(urlData));
- }
-
- public void testUrlDrop() {
- assertEquals(0, manager.getTaskList().getDefaultCategory().getChildren().size());
- String url = "http://eclipse.org/mylyn";
- String title = "Mylar Technology Project";
- String urlData = url + "\n" + title;
-
- dropAdapter.performDrop(urlData);
- Collection<ITask> tasks = manager.getTaskList().getDefaultCategory().getChildren();
- assertNotNull(tasks);
- assertEquals(1, tasks.size());
- assertEquals(url, tasks.iterator().next().getUrl());
-
- // TODO: Failing due to asynchronous retrieval of title from url
- // assertEquals(title, tasks.get(0).getDescription(false));
- }
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListManagerTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListManagerTest.java
deleted file mode 100644
index 805260f5d..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListManagerTest.java
+++ /dev/null
@@ -1,1003 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Calendar;
-import java.util.Collection;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.mylyn.internal.context.core.ContextCorePlugin;
-import org.eclipse.mylyn.internal.context.core.InteractionContext;
-import org.eclipse.mylyn.internal.context.core.InteractionContextManager;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTaskCategory;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.ITaskList;
-import org.eclipse.mylyn.internal.tasks.core.LocalRepositoryConnector;
-import org.eclipse.mylyn.internal.tasks.core.LocalTask;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
-import org.eclipse.mylyn.internal.tasks.core.TaskActivityUtil;
-import org.eclipse.mylyn.internal.tasks.core.TaskCategory;
-import org.eclipse.mylyn.internal.tasks.core.TaskList;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-import org.eclipse.mylyn.internal.tasks.ui.ITasksUiPreferenceConstants;
-import org.eclipse.mylyn.internal.tasks.ui.RefactorRepositoryUrlOperation;
-import org.eclipse.mylyn.internal.tasks.ui.TaskListManager;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.monitor.core.InteractionEvent;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITaskContainer;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.tests.connector.MockAttributeFactory;
-import org.eclipse.mylyn.tasks.tests.connector.MockRepositoryConnector;
-import org.eclipse.mylyn.tasks.tests.connector.MockRepositoryQuery;
-import org.eclipse.mylyn.tasks.tests.connector.MockTask;
-
-/**
- * @author Mik Kersten
- */
-public class TaskListManagerTest extends TestCase {
-
- private TaskListManager manager;
-
- private TaskRepository repository;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- TasksUiPlugin.getDefault().getPreferenceStore().setValue(
- ITasksUiPreferenceConstants.REPOSITORY_SYNCH_SCHEDULE_ENABLED, false);
- manager = TasksUiPlugin.getTaskListManager();
- for (TaskRepository repository : TasksUiPlugin.getRepositoryManager().getAllRepositories()) {
- TasksUiPlugin.getRepositoryManager().removeRepository(repository,
- TasksUiPlugin.getDefault().getRepositoriesFilePath());
- }
- manager.resetTaskList();
- assertEquals(0, manager.getTaskList().getAllTasks().size());
-// manager.readExistingOrCreateNewList();
- TasksUiPlugin.getExternalizationManager().saveNow(new NullProgressMonitor());
- TasksUiPlugin.getDefault().reloadDataDirectory();
-
- repository = new TaskRepository(MockRepositoryConnector.REPOSITORY_KIND, MockRepositoryConnector.REPOSITORY_URL);
- TasksUiPlugin.getRepositoryManager().addRepository(repository);
-
- assertEquals(0, manager.getTaskList().getAllTasks().size());
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
- TasksUiPlugin.getRepositoryManager().removeRepository(repository,
- TasksUiPlugin.getDefault().getRepositoriesFilePath());
- manager.resetTaskList();
- TasksUiPlugin.getExternalizationManager().saveNow(null);
- assertEquals(0, manager.getTaskList().getAllTasks().size());
- }
-
- public void testUncategorizedTasksNotLost() throws CoreException {
- MockRepositoryQuery query = new MockRepositoryQuery("Test");
- manager.getTaskList().addQuery(query);
- MockTask task = new MockTask("1");
- manager.getTaskList().addTask(task, query);
- manager.getTaskList().addTask(task, manager.getTaskList().getDefaultCategory());
- assertTrue(query.contains(task.getHandleIdentifier()));
- assertTrue(manager.getTaskList().getDefaultCategory().contains(task.getHandleIdentifier()));
-
- TasksUiPlugin.getExternalizationManager().requestSave();
- manager.resetTaskList();
- assertEquals(0, manager.getTaskList().getAllTasks().size());
- assertFalse(manager.getTaskList().getDefaultCategory().contains(task.getHandleIdentifier()));
- TasksUiPlugin.getDefault().reloadDataDirectory();
-
- assertTrue(manager.getTaskList().getDefaultCategory().contains(task.getHandleIdentifier()));
-
- }
-
- public void testQueryAndCategoryNameClash() {
- TaskCategory category = new TaskCategory("TestClash");
- manager.getTaskList().addCategory(category);
- assertTrue(manager.getTaskList().getCategories().contains(category));
- assertEquals(2, manager.getTaskList().getCategories().size());
-
- MockRepositoryQuery query = new MockRepositoryQuery("TestClash");
- manager.getTaskList().addQuery(query);
- assertTrue(manager.getTaskList().getCategories().contains(category));
- assertEquals(2, manager.getTaskList().getCategories().size());
-
- manager.getTaskList().deleteCategory(category);
- }
-
- public void testUniqueTaskID() {
- LocalTask task1 = TasksUiInternal.createNewLocalTask("label");
- manager.getTaskList().addTask(task1);
- LocalTask task2 = TasksUiInternal.createNewLocalTask("label");
- manager.getTaskList().addTask(task2);
- assertEquals(2, manager.getTaskList().getLastLocalTaskId());
- manager.getTaskList().deleteTask(task2);
- LocalTask task3 = TasksUiInternal.createNewLocalTask("label");
- manager.getTaskList().addTask(task3);
- assertTrue(task3.getHandleIdentifier() + " should end with 3", task3.getHandleIdentifier().endsWith("3"));
- assertEquals(3, manager.getTaskList().getLastLocalTaskId());
-
- assertEquals(2, manager.getTaskList().getAllTasks().size());
- manager.saveTaskList();
- manager.resetTaskList();
- assertEquals(0, manager.getTaskList().getAllTasks().size());
- assertEquals(0, manager.getTaskList().getLastLocalTaskId());
- manager.readExistingOrCreateNewList();
- assertEquals(2, manager.getTaskList().getAllTasks().size());
- assertEquals(3, manager.getTaskList().getLastLocalTaskId());
- ITask task4 = TasksUiInternal.createNewLocalTask("label");
- assertTrue(task4.getHandleIdentifier() + " should end with 4", task4.getHandleIdentifier().endsWith("4"));
- }
-
- public void testSingleTaskDeletion() {
- MockTask task = new MockTask("1");
- task.setLastReadTimeStamp("now");
- manager.getTaskList().addTask(task,
- manager.getTaskList().getUnmatchedContainer(LocalRepositoryConnector.REPOSITORY_URL));
- assertEquals(1, manager.getTaskList().getAllTasks().size());
- manager.getTaskList().deleteTask(task);
- assertEquals(0, manager.getTaskList().getAllTasks().size());
- manager.getTaskList().addTask(task,
- manager.getTaskList().getUnmatchedContainer(LocalRepositoryConnector.REPOSITORY_URL));
- assertEquals(1, manager.getTaskList().getAllTasks().size());
-
- manager.saveTaskList();
-
- manager.resetTaskList();
- manager.readExistingOrCreateNewList();
- assertEquals(1, manager.getTaskList().getAllTasks().size());
-
- manager.getTaskList().deleteTask(task);
- assertEquals(0, manager.getTaskList().getAllTasks().size());
- manager.saveTaskList();
- assertEquals(0, manager.getTaskList().getAllTasks().size());
-
- manager.resetTaskList();
- manager.readExistingOrCreateNewList();
- assertEquals(0, manager.getTaskList().getAllTasks().size());
- }
-
- private void runRepositoryUrlOperation(String oldUrl, String newUrl) {
- try {
- new RefactorRepositoryUrlOperation(oldUrl, newUrl).run(new NullProgressMonitor());
- } catch (Exception e) {
- fail();
- }
- }
-
- public void testMigrateTaskContextFiles() throws IOException {
- File fileA = ContextCorePlugin.getContextStore().getFileForContext("http://a-1");
- fileA.createNewFile();
- fileA.deleteOnExit();
- assertTrue(fileA.exists());
- runRepositoryUrlOperation("http://a", "http://b");
- File fileB = ContextCorePlugin.getContextStore().getFileForContext("http://b-1");
- assertTrue(fileB.exists());
- assertFalse(fileA.exists());
- }
-
- public void testMigrateQueryUrlHandles() {
- RepositoryQuery query = new MockRepositoryQuery("mquery");
- query.setRepositoryUrl("http://foo.bar");
- query.setUrl("http://foo.bar/b");
- manager.getTaskList().addQuery(query);
- assertTrue(manager.getTaskList().getRepositoryQueries("http://foo.bar").size() > 0);
- runRepositoryUrlOperation("http://foo.bar", "http://bar.baz");
- assertTrue(manager.getTaskList().getRepositoryQueries("http://foo.bar").size() == 0);
- assertTrue(manager.getTaskList().getRepositoryQueries("http://bar.baz").size() > 0);
- IRepositoryQuery changedQuery = manager.getTaskList().getRepositoryQueries("http://bar.baz").iterator().next();
- assertEquals("http://bar.baz/b", changedQuery.getUrl());
- }
-
- public void testMigrateQueryHandles() {
- RepositoryQuery query = new MockRepositoryQuery("mquery");
- query.setRepositoryUrl("http://a");
- manager.getTaskList().addQuery(query);
- runRepositoryUrlOperation("http://a", "http://b");
- assertFalse(manager.getTaskList().getRepositoryQueries("http://b").isEmpty());
- assertTrue(manager.getTaskList().getRepositoryQueries("http://a").isEmpty());
- }
-
-// public void testMigrateQueryHits() {
-// AbstractRepositoryQuery query = new MockRepositoryQuery("mquery",
-// manager.getTaskList());
-// query.setRepositoryUrl("http://a");
-// manager.getTaskList().addQuery(query);
-// AbstractQueryHit hit = new MockQueryHit(manager.getTaskList(), "http://a",
-// "", "123");
-// query.addHit(hit);
-// runRepositoryUrlOperation("http://a", "http://b");
-// assertNotNull(manager.getTaskList().getQueryHit("http://b-123"));
-// assertEquals("http://b-123", hit.getHandleIdentifier());
-// }
-
- public void testMigrateTaskHandles() {
- AbstractTask task = new MockTask("http://a", "123");
- AbstractTask task2 = new MockTask("http://other", "other");
- manager.getTaskList().addTask(task);
- manager.getTaskList().addTask(task2);
-
- RepositoryTaskData taskData = new RepositoryTaskData(new MockAttributeFactory(), task.getConnectorKind(),
- task.getRepositoryUrl(), task.getTaskId(), task.getTaskKind());
- TasksUiPlugin.getTaskDataStorageManager().setNewTaskData(taskData);
- assertNotNull(TasksUiPlugin.getTaskDataStorageManager().getNewTaskData(task.getRepositoryUrl(),
- task.getTaskId()));
-
- RepositoryTaskData taskData2 = new RepositoryTaskData(new MockAttributeFactory(), task2.getConnectorKind(),
- task2.getRepositoryUrl(), task2.getTaskId(), task2.getTaskKind());
- taskData2.setNewComment("TEST");
- TasksUiPlugin.getTaskDataStorageManager().setNewTaskData(taskData2);
- assertNotNull(TasksUiPlugin.getTaskDataStorageManager().getNewTaskData(task2.getRepositoryUrl(),
- task2.getTaskId()));
- assertEquals("TEST", TasksUiPlugin.getTaskDataStorageManager().getNewTaskData(task2.getRepositoryUrl(),
- task2.getTaskId()).getNewComment());
-
- runRepositoryUrlOperation("http://a", "http://b");
- assertNull(manager.getTaskList().getTask("http://a-123"));
- assertNotNull(manager.getTaskList().getTask("http://b-123"));
- assertNotNull(TasksUiPlugin.getTaskDataStorageManager().getNewTaskData("http://b", "123"));
- RepositoryTaskData otherData = TasksUiPlugin.getTaskDataStorageManager().getNewTaskData(
- task2.getRepositoryUrl(), task2.getTaskId());
- assertNotNull(otherData);
- assertEquals("TEST", otherData.getNewComment());
- }
-
- public void testMigrateTaskHandlesWithExplicitSet() {
- AbstractTask task = new MockTask("http://a", "123");
- task.setUrl("http://a/task/123");
- manager.getTaskList().addTask(task);
- runRepositoryUrlOperation("http://a", "http://b");
- assertNull(manager.getTaskList().getTask("http://a-123"));
- assertNotNull(manager.getTaskList().getTask("http://b-123"));
- assertEquals("http://b/task/123", task.getUrl());
- }
-
- public void testRefactorMetaContextHandles() {
- String firstUrl = "http://repository1.com/bugs";
- String secondUrl = "http://repository2.com/bugs";
- AbstractTask task1 = new MockTask(firstUrl, "1");
- AbstractTask task2 = new MockTask(firstUrl, "2");
- manager.getTaskList().addTask(task1);
- manager.getTaskList().addTask(task2);
- Calendar startDate = Calendar.getInstance();
- Calendar endDate = Calendar.getInstance();
- endDate.add(Calendar.MINUTE, 5);
-
- Calendar startDate2 = Calendar.getInstance();
- startDate2.add(Calendar.MINUTE, 15);
- Calendar endDate2 = Calendar.getInstance();
- endDate2.add(Calendar.MINUTE, 25);
-
- ContextCorePlugin.getContextManager().resetActivityMetaContext();
- InteractionContext metaContext = ContextCorePlugin.getContextManager().getActivityMetaContext();
- assertEquals(0, metaContext.getInteractionHistory().size());
-
- ContextCorePlugin.getContextManager().processActivityMetaContextEvent(
- new InteractionEvent(InteractionEvent.Kind.ATTENTION,
- InteractionContextManager.ACTIVITY_STRUCTUREKIND_TIMING, task1.getHandleIdentifier(), "origin",
- null, InteractionContextManager.ACTIVITY_DELTA_ADDED, 1f, startDate.getTime(),
- endDate.getTime()));
-
- ContextCorePlugin.getContextManager().processActivityMetaContextEvent(
- new InteractionEvent(InteractionEvent.Kind.ATTENTION,
- InteractionContextManager.ACTIVITY_STRUCTUREKIND_TIMING, task2.getHandleIdentifier(), "origin",
- null, InteractionContextManager.ACTIVITY_DELTA_ADDED, 1f, startDate2.getTime(),
- endDate2.getTime()));
-
- assertEquals(2, metaContext.getInteractionHistory().size());
- assertEquals(60 * 1000 * 5, TasksUiPlugin.getTaskActivityManager().getElapsedTime(task1));
- assertEquals(2 * 60 * 1000 * 5, TasksUiPlugin.getTaskActivityManager().getElapsedTime(task2));
- runRepositoryUrlOperation(firstUrl, secondUrl);
- metaContext = ContextCorePlugin.getContextManager().getActivityMetaContext();
- assertEquals(2, metaContext.getInteractionHistory().size());
- assertEquals(60 * 1000 * 5, TasksUiPlugin.getTaskActivityManager().getElapsedTime(new MockTask(secondUrl, "1")));
- assertEquals(2 * 60 * 1000 * 5, TasksUiPlugin.getTaskActivityManager().getElapsedTime(
- new MockTask(secondUrl, "2")));
- assertEquals(secondUrl + "-1", metaContext.getInteractionHistory().get(0).getStructureHandle());
- }
-
- public void testIsActiveToday() {
- AbstractTask task = new LocalTask("1", "task-1");
- assertFalse(TasksUiPlugin.getTaskActivityManager().isScheduledForToday(task));
-
- task.setScheduledForDate(TaskActivityUtil.getCurrentWeek().getToday());
- assertTrue(TasksUiPlugin.getTaskActivityManager().isScheduledForToday(task));
-
- task.setReminded(true);
- assertTrue(TasksUiPlugin.getTaskActivityManager().isScheduledForToday(task));
- task.setReminded(true);
-
-// Calendar inAnHour = Calendar.getInstance();
-// inAnHour.set(Calendar.HOUR_OF_DAY, inAnHour.get(Calendar.HOUR_OF_DAY) + 1);
-// inAnHour.getTime();
-// task.setScheduledForDate(inAnHour.getTime());
-// Calendar tomorrow = Calendar.getInstance();
-// TaskActivityUtil.snapToNextDay(tomorrow);
-// assertEquals(-1, inAnHour.compareTo(tomorrow));
-// assertTrue(TasksUiPlugin.getTaskActivityManager().isScheduledForToday(task));
- }
-
- public void testScheduledForToday() {
- AbstractTask task = new LocalTask("1", "task-1");
- task.setScheduledForDate(TaskActivityUtil.getCurrentWeek().getToday());
- assertTrue(TasksUiPlugin.getTaskActivityManager().isScheduledForToday(task));
- task.setScheduledForDate(TaskActivityUtil.getCurrentWeek().getToday().next());
- assertFalse(TasksUiPlugin.getTaskActivityManager().isScheduledForToday(task));
- }
-
- public void testSchedulePastEndOfMonth() {
- Calendar calendar = Calendar.getInstance();
- calendar.set(Calendar.MONTH, Calendar.SEPTEMBER);
- calendar.set(Calendar.DAY_OF_MONTH, 30);
- TaskActivityUtil.snapForwardNumDays(calendar, 1);
- assertEquals("Should be October", Calendar.OCTOBER, calendar.get(Calendar.MONTH));
- }
-
- public void testIsCompletedToday() {
- ITask task = new LocalTask("1", "task 1");
- task.setCompletionDate(new Date());
- assertTrue(TasksUiPlugin.getTaskActivityManager().isCompletedToday(task));
-
- MockTask mockTask = new MockTask("1");
- mockTask.setOwner("unknown");
- manager.getTaskList().addTask(mockTask);
- mockTask.setCompletionDate(new Date());
- assertFalse("completed: " + mockTask.getCompletionDate(), TasksUiPlugin.getTaskActivityManager()
- .isCompletedToday(mockTask));
-
- mockTask = new MockTask("2");
- manager.getTaskList().addTask(mockTask);
- mockTask.setCompletionDate(new Date());
- repository.setAuthenticationCredentials("testUser", "testPassword");
- mockTask.setOwner("testUser");
- assertTrue(TasksUiPlugin.getTaskActivityManager().isCompletedToday(mockTask));
-
- }
-
- public void testMoveCategories() {
-// assertEquals(0, manager.getTaskList()
-// .getOrphanContainer(LocalRepositoryConnector.REPOSITORY_URL)
-// .getChildren()
-// .size());
-
- assertTrue(manager.getTaskList().getDefaultCategory().isEmpty());
-
- AbstractTask task1 = new LocalTask("t1", "t1");
-
- TaskCategory cat1 = new TaskCategory("cat1");
- manager.getTaskList().addCategory(cat1);
- TaskCategory cat2 = new TaskCategory("cat2");
- manager.getTaskList().addCategory(cat2);
-
- manager.getTaskList().addTask(task1, cat1);
- assertEquals(1, manager.getTaskList().getContainerForHandle("cat1").getChildren().size());
- assertEquals(0, manager.getTaskList().getContainerForHandle("cat2").getChildren().size());
-
- manager.getTaskList().addTask(task1, cat2);
- assertEquals(0, manager.getTaskList().getContainerForHandle("cat1").getChildren().size());
- assertEquals(1, manager.getTaskList().getContainerForHandle("cat2").getChildren().size());
- }
-
- public void testMoveToRoot() {
-// assertEquals(0, manager.getTaskList()
-// .getOrphanContainer(LocalRepositoryConnector.REPOSITORY_URL)
-// .getChildren()
-// .size());
- assertTrue(manager.getTaskList().getDefaultCategory().isEmpty());
-
- AbstractTask task1 = new LocalTask("t1", "t1");
- manager.getTaskList().addTask(task1,
- manager.getTaskList().getUnmatchedContainer(LocalRepositoryConnector.REPOSITORY_URL));
- assertEquals(1, manager.getTaskList().getDefaultCategory().getChildren().size());
- assertEquals(manager.getTaskList().getDefaultCategory(), TaskCategory.getParentTaskCategory(task1));
-
- TaskCategory cat1 = new TaskCategory("c1");
- manager.getTaskList().addCategory(cat1);
-
- manager.getTaskList().addTask(task1, cat1);
- assertEquals(0, manager.getTaskList().getDefaultCategory().getChildren().size());
- assertEquals(cat1, TaskCategory.getParentTaskCategory(task1));
-
- manager.getTaskList().addTask(task1,
- manager.getTaskList().getUnmatchedContainer(LocalRepositoryConnector.REPOSITORY_URL));
- assertEquals(1, manager.getTaskList().getDefaultCategory().getChildren().size());
- assertEquals(0, cat1.getChildren().size());
- assertEquals(manager.getTaskList().getDefaultCategory(), TaskCategory.getParentTaskCategory(task1));
- }
-
- public void testCategoryPersistance() {
- MockTask task = new MockTask("1");
- TaskCategory category = new TaskCategory("cat");
- manager.getTaskList().addCategory(category);
- manager.getTaskList().addTask(task, category);
- assertNotNull(manager.getTaskList());
- assertEquals(2, manager.getTaskList().getCategories().size());
-
- manager.saveTaskList();
- manager.resetTaskList();
- manager.readExistingOrCreateNewList();
- assertEquals("" + manager.getTaskList().getCategories(), 2, manager.getTaskList().getCategories().size());
- assertEquals(1, manager.getTaskList().getAllTasks().size());
- }
-
- public void testDeleteCategory() {
- assertNotNull(manager.getTaskList());
- assertEquals(1, manager.getTaskList().getCategories().size());
- TaskCategory category = new TaskCategory("cat");
- manager.getTaskList().addCategory(category);
- assertEquals(2, manager.getTaskList().getCategories().size());
- manager.getTaskList().deleteCategory(category);
- assertEquals(1, manager.getTaskList().getCategories().size());
- }
-
- public void testDeleteCategoryMovesTasksToRoot() {
- AbstractTask task = new MockTask("delete");
- TaskCategory category = new TaskCategory("cat");
- manager.getTaskList().addCategory(category);
- manager.getTaskList().addTask(task, category);
- assertEquals(0, manager.getTaskList().getDefaultCategory().getChildren().size());
- manager.getTaskList().deleteCategory(category);
- manager.getTaskList().getUnmatchedContainer(MockRepositoryConnector.REPOSITORY_URL);
- }
-
- public void testRenameCategory() {
-
- assertNotNull(manager.getTaskList());
-
- TaskCategory category = new TaskCategory("cat");
- manager.getTaskList().addCategory(category);
- assertEquals(2, manager.getTaskList().getCategories().size());
- String newDesc = "newDescription";
- manager.getTaskList().renameContainer(category, newDesc);
- AbstractTaskCategory container = manager.getTaskList().getContainerForHandle(newDesc);
- assertNotNull(container);
- assertEquals(newDesc, container.getSummary());
- manager.getTaskList().deleteCategory(container);
- assertEquals(1, manager.getTaskList().getCategories().size());
- }
-
- public void testDeleteCategoryAfterRename() {
- String newDesc = "newDescription";
- assertNotNull(manager.getTaskList());
- assertEquals(1, manager.getTaskList().getCategories().size());
- TaskCategory category = new TaskCategory("cat");
- manager.getTaskList().addCategory(category);
- assertEquals(2, manager.getTaskList().getCategories().size());
- manager.getTaskList().renameContainer(category, newDesc);
- manager.getTaskList().deleteCategory(category);
- assertEquals(1, manager.getTaskList().getCategories().size());
- }
-
- public void testCreateSameCategoryName() {
- assertNotNull(manager.getTaskList());
- assertEquals(1, manager.getTaskList().getCategories().size());
- TaskCategory category = new TaskCategory("cat");
- manager.getTaskList().addCategory(category);
- assertEquals(2, manager.getTaskList().getCategories().size());
- TaskCategory category2 = new TaskCategory("cat");
- manager.getTaskList().addCategory(category2);
- assertEquals(2, manager.getTaskList().getCategories().size());
- ITaskContainer container = manager.getTaskList().getContainerForHandle("cat");
- assertEquals(container, category);
- }
-
- public void testDeleteRootTask() {
- AbstractTask task = new LocalTask("1", "label");
- manager.getTaskList().addTask(task);
- manager.getTaskList().deleteTask(task);
- assertEquals(0, manager.getTaskList().getAllTasks().size());
- assertEquals(0, manager.getTaskList().getDefaultCategory().getChildren().size());
- }
-
- public void testDeleteFromCategory() {
- assertEquals(0, manager.getTaskList().getAllTasks().size());
- assertEquals(0, manager.getTaskList().getDefaultCategory().getChildren().size());
- //assertEquals(0, manager.getTaskList().getArchiveContainer().getChildren().size());
- assertEquals(1, manager.getTaskList().getCategories().size());
-
- AbstractTask task = new LocalTask("1", "label");
- TaskCategory category = new TaskCategory("handleAndDescription");
- manager.getTaskList().addTask(task);
- assertEquals(1, manager.getTaskList().getDefaultCategory().getChildren().size());
-
- manager.getTaskList().addCategory(category);
- manager.getTaskList().addTask(task, category);
- assertEquals(2, manager.getTaskList().getCategories().size());
- assertEquals(1, category.getChildren().size());
- assertEquals(0, manager.getTaskList().getDefaultCategory().getChildren().size());
- assertEquals(1, manager.getTaskList().getAllTasks().size());
-
- manager.getTaskList().deleteTask(task);
- assertEquals(0, manager.getTaskList().getAllTasks().size());
- assertEquals(0, manager.getTaskList().getDefaultCategory().getChildren().size());
- assertEquals(0, category.getChildren().size());
- }
-
- public void testDeleteRepositoryTask() {
- String repositoryUrl = "http://somewhere.com";
- repository = new TaskRepository(MockRepositoryConnector.REPOSITORY_KIND, repositoryUrl);
- TasksUiPlugin.getRepositoryManager().addRepository(repository);
- MockTask task = new MockTask(repositoryUrl, "1");
- TaskList taskList = TasksUiPlugin.getTaskList();
- taskList.addTask(task, manager.getTaskList().getDefaultCategory());
- MockRepositoryQuery query = new MockRepositoryQuery("query");
- taskList.addQuery(query);
- taskList.addTask(task, query);
- assertEquals(1, taskList.getAllTasks().size());
- assertEquals(1, manager.getTaskList().getDefaultCategory().getChildren().size());
- taskList.deleteTask(task);
- assertEquals(0, taskList.getAllTasks().size());
- assertEquals(0, manager.getTaskList().getDefaultCategory().getChildren().size());
- }
-
- public void testCreate() {
- MockTask repositoryTask = new MockTask("1");
- repositoryTask.setLastReadTimeStamp("now");
- manager.getTaskList().addTask(repositoryTask, manager.getTaskList().getDefaultCategory());
- assertEquals(1, manager.getTaskList().getDefaultCategory().getChildren().size());
- manager.saveTaskList();
-
- manager.resetTaskList();
- manager.readExistingOrCreateNewList();
- assertEquals(1, manager.getTaskList().getAllTasks().size());
- }
-
- public void testCreateAndMove() throws CoreException {
- MockTask repositoryTask = new MockTask("1");
- repositoryTask.setLastReadTimeStamp("now");
- manager.getTaskList().addTask(repositoryTask);
- assertEquals(1, manager.getTaskList().getAllTasks().size());
- TasksUiPlugin.getExternalizationManager().requestSave();
- TasksUiPlugin.getDefault().reloadDataDirectory();
- assertEquals(1, manager.getTaskList().getAllTasks().size());
- assertEquals(1, manager.getTaskList()
- .getUnmatchedContainer(MockRepositoryConnector.REPOSITORY_URL)
- .getChildren()
- .size());
-
- }
-
- public void testArchiveRepositoryTaskExternalization() {
- MockTask repositoryTask = new MockTask("1");
- repositoryTask.setLastReadTimeStamp("now");
- manager.getTaskList().addTask(repositoryTask);
- assertEquals(1, manager.getTaskList()
- .getUnmatchedContainer(MockRepositoryConnector.REPOSITORY_URL)
- .getChildren()
- .size());
- manager.saveTaskList();
-
- manager.resetTaskList();
- manager.readExistingOrCreateNewList();
- assertEquals(1, manager.getTaskList()
- .getUnmatchedContainer(MockRepositoryConnector.REPOSITORY_URL)
- .getChildren()
- .size());
- }
-
- public void testRepositoryTasksAndCategoriesMultiRead() {
- TaskCategory cat1 = new TaskCategory("Category 1");
- manager.getTaskList().addCategory(cat1);
-
- MockTask reportInCat1 = new MockTask("123");
- manager.getTaskList().addTask(reportInCat1, cat1);
- assertEquals(cat1, TaskCategory.getParentTaskCategory(reportInCat1));
-
- manager.saveTaskList();
- assertNotNull(manager.getTaskList());
- manager.resetTaskList();
- manager.readExistingOrCreateNewList();
-
- // read once
- Set<AbstractTaskCategory> readCats = manager.getTaskList().getTaskCategories();
- assertTrue(manager.getTaskList().getCategories().contains(cat1));
- Iterator<AbstractTaskCategory> iterator = readCats.iterator();
-
- boolean found = false;
- while (iterator.hasNext()) {
- ITaskContainer readCat1 = iterator.next();
- if (cat1.equals(readCat1)) {
- found = true;
- assertEquals(1, readCat1.getChildren().size());
- }
- }
- if (!found) {
- fail(" Category not found afer tasklist read");
- }
-
- manager.saveTaskList();
- assertNotNull(manager.getTaskList());
- manager.resetTaskList();
- manager.readExistingOrCreateNewList();
-
- // read again
- readCats = manager.getTaskList().getTaskCategories();
- assertTrue(manager.getTaskList().getCategories().contains(cat1));
-
- iterator = readCats.iterator();
- found = false;
- while (iterator.hasNext()) {
- ITaskContainer readCat1 = iterator.next();
- if (cat1.equals(readCat1)) {
- found = true;
- assertEquals(1, readCat1.getChildren().size());
- }
- }
- if (!found) {
- fail(" Category not found afer tasklist read");
- }
- }
-
- public void testSubTaskExternalization() {
- Set<AbstractTask> rootTasks = new HashSet<AbstractTask>();
- AbstractTask task1 = new LocalTask("1", "task1");
- manager.getTaskList().addTask(task1);
- rootTasks.add(task1);
-
- AbstractTask sub2 = new LocalTask("2", "sub 2");
- manager.getTaskList().addTask(sub2, task1);
- assertEquals(1, task1.getChildren().size());
- assertTrue(rootTasks.containsAll(manager.getTaskList().getDefaultCategory().getChildren()));
-
- manager.saveTaskList();
- assertNotNull(manager.getTaskList());
- manager.resetTaskList();
- manager.readExistingOrCreateNewList();
-
- assertNotNull(manager.getTaskList());
-
- // XXX: This should pass once sub tasks are handled properly
-// assertTrue(rootTasks.containsAll(manager.getTaskList().getOrphanContainer(
-// LocalRepositoryConnector.REPOSITORY_URL).getChildren()));
-
- Collection<ITask> readList = manager.getTaskList().getDefaultCategory().getChildren();
- for (ITask task : readList) {
- if (task.equals(task1)) {
- assertEquals(task1.getSummary(), task.getSummary());
- assertEquals(1, ((ITaskContainer) task).getChildren().size());
- }
- }
- }
-
- public void testCreationAndExternalization() throws CoreException {
- Set<AbstractTask> rootTasks = new HashSet<AbstractTask>();
- AbstractTask task1 = TasksUiInternal.createNewLocalTask("task 1");
- rootTasks.add(task1);
- assertEquals(1, manager.getTaskList().getAllTasks().size());
-
- AbstractTask sub1 = TasksUiInternal.createNewLocalTask("sub 1");
- manager.getTaskList().addTask(sub1, task1);
- assertEquals(4, manager.getTaskList().getRootElements().size());
-
- //manager.getTaskList().moveToContainer(sub1, manager.getTaskList().getArchiveContainer());
-
- AbstractTask task2 = TasksUiInternal.createNewLocalTask("task 2");
- rootTasks.add(task2);
- assertEquals(3, manager.getTaskList().getAllTasks().size());
-
- Set<TaskCategory> categories = new HashSet<TaskCategory>();
- Set<AbstractTask> cat1Contents = new HashSet<AbstractTask>();
- TaskCategory cat1 = new TaskCategory("Category 1");
- manager.getTaskList().addCategory(cat1);
- categories.add(cat1);
- assertEquals(5, manager.getTaskList().getRootElements().size());
-
- AbstractTask task3 = TasksUiInternal.createNewLocalTask("task 3");
- manager.getTaskList().addTask(task3, cat1);
- cat1Contents.add(task3);
- assertEquals(4, manager.getTaskList().getAllTasks().size());
- assertEquals(cat1, TaskCategory.getParentTaskCategory(task3));
- AbstractTask sub2 = TasksUiInternal.createNewLocalTask("sub 2");
- assertEquals(5, manager.getTaskList().getAllTasks().size());
- manager.getTaskList().addTask(sub2, task3);
- //manager.getTaskList().moveToContainer(sub2, manager.getTaskList().getArchiveContainer());
-
- AbstractTask task4 = TasksUiInternal.createNewLocalTask("task 4");
- manager.getTaskList().addTask(task4, cat1);
- cat1Contents.add(task4);
- assertEquals(6, manager.getTaskList().getAllTasks().size());
-
- MockTask reportInCat1 = new MockTask("123");
- manager.getTaskList().addTask(reportInCat1, cat1);
- assertEquals(cat1, TaskCategory.getParentTaskCategory(reportInCat1));
- cat1Contents.add(reportInCat1);
- assertEquals(7, manager.getTaskList().getAllTasks().size());
-
- assertEquals(5, manager.getTaskList().getRootElements().size());
-
- TasksUiPlugin.getExternalizationManager().requestSave();
- TasksUiPlugin.getDefault().reloadDataDirectory();
-
- Collection<ITask> readList = manager.getTaskList().getDefaultCategory().getChildren();
- for (ITask task : readList) {
- if (task.equals(task1)) {
- assertEquals(task1.getSummary(), task.getSummary());
- assertEquals(1, ((AbstractTaskContainer) task).getChildren().size());
- }
- }
-
- Set<AbstractTaskCategory> readCats = manager.getTaskList().getTaskCategories();
- assertTrue(manager.getTaskList().getCategories().contains(cat1));
- Iterator<AbstractTaskCategory> iterator = readCats.iterator();
- boolean found = false;
- while (iterator.hasNext()) {
- ITaskContainer readCat1 = iterator.next();
- if (cat1.equals(readCat1)) {
- found = true;
- for (ITask task : readCat1.getChildren()) {
- assertTrue(cat1Contents.contains(task));
- }
- }
- }
- if (!found) {
- fail(" Category not found afer tasklist read");
- }
- }
-
- public void testExternalizationOfHandlesWithDash() throws CoreException {
- AbstractTask task1 = TasksUiInternal.createNewLocalTask("task 1");
- manager.getTaskList().addTask(task1, manager.getTaskList().getDefaultCategory());
-
- TasksUiPlugin.getExternalizationManager().requestSave();
- TasksUiPlugin.getDefault().reloadDataDirectory();
- assertTrue(manager.getTaskList().getDefaultCategory().getChildren().contains(task1));
- }
-
- public void testgetQueriesAndHitsForHandle() {
- TaskList taskList = manager.getTaskList();
-
- MockTask hit1 = new MockTask("1");
- MockTask hit2 = new MockTask("2");
- MockTask hit3 = new MockTask("3");
-
- MockTask hit1twin = new MockTask("1");
- MockTask hit2twin = new MockTask("2");
- MockTask hit3twin = new MockTask("3");
-
- MockRepositoryQuery query1 = new MockRepositoryQuery("query1");
- MockRepositoryQuery query2 = new MockRepositoryQuery("query2");
-
- taskList.addQuery(query1);
- taskList.addQuery(query2);
- taskList.addTask(hit1, query1);
- taskList.addTask(hit2, query1);
- taskList.addTask(hit3, query1);
-
- assertEquals(3, query1.getChildren().size());
-
- taskList.addTask(hit1twin, query2);
- taskList.addTask(hit2twin, query2);
- taskList.addTask(hit3twin, query2);
-
- assertEquals(3, query2.getChildren().size());
-
- Set<AbstractTaskContainer> queriesReturned = hit1.getParentContainers();
- assertNotNull(queriesReturned);
- assertEquals(2, queriesReturned.size());
- assertTrue(queriesReturned.contains(query1));
- assertTrue(queriesReturned.contains(query2));
- }
-
-// public void testQueryHitHasParent() {
-// TaskList taskList = manager.getTaskList();
-//
-// MockQueryHit hit1 = new MockQueryHit(taskList,
-// MockRepositoryConnector.REPOSITORY_URL, "description1", "1");
-// assertNull(hit1.getParent());
-// MockRepositoryQuery query1 = new MockRepositoryQuery("query1",
-// manager.getTaskList());
-// query1.addHit(hit1);
-// assertEquals(query1, hit1.getParent());
-//
-// }
-
- public void testUpdateQueryHits() {
- ITaskList taskList = manager.getTaskList();
-
- MockTask hit1 = new MockTask("1");
- MockTask hit2 = new MockTask("2");
- MockTask hit3 = new MockTask("3");
-
- MockTask hit1twin = new MockTask("1");
- MockTask hit2twin = new MockTask("2");
- MockTask hit3twin = new MockTask("3");
-
- MockRepositoryQuery query1 = new MockRepositoryQuery("query1");
- taskList.addQuery(query1);
-
- taskList.addTask(hit1, query1);
- taskList.addTask(hit2, query1);
- taskList.addTask(hit3, query1);
-
- taskList.addTask(hit1twin, query1);
- taskList.addTask(hit2twin, query1);
- taskList.addTask(hit3twin, query1);
-
- assertEquals(3, query1.getChildren().size());
- for (ITask child : query1.getChildren()) {
- taskList.removeFromContainer(query1, child);
- }
- assertEquals(0, query1.getChildren().size());
- taskList.addTask(hit1, query1);
- taskList.addTask(hit2, query1);
- assertEquals(2, query1.getChildren().size());
- hit1.setNotified(true);
-
- taskList.addTask(hit1twin, query1);
- taskList.addTask(hit2twin, query1);
- taskList.addTask(hit3twin, query1);
- assertEquals(3, query1.getChildren().size());
- assertTrue(query1.getChildren().contains(hit1twin));
- assertTrue(query1.getChildren().contains(hit2twin));
- assertTrue(query1.getChildren().contains(hit3twin));
- for (ITask hit : query1.getChildren()) {
- if (hit.equals(hit1twin)) {
- assertTrue(((AbstractTask) hit).isNotified());
- } else {
- assertFalse(((AbstractTask) hit).isNotified());
- }
- }
- }
-
- public void testgetRepositoryTasks() {
-
- String repositoryUrl = "https://bugs.eclipse.org/bugs";
-
- String bugNumber = "106939";
-
- MockTask task1 = new MockTask(repositoryUrl, bugNumber);
- manager.getTaskList().addTask(task1);
-
- MockTask task2 = new MockTask("https://unresolved", bugNumber);
- manager.getTaskList().addTask(task2);
-
- TaskList taskList = manager.getTaskList();
- assertEquals(2, taskList.getAllTasks().size());
- Set<ITask> tasksReturned = taskList.getTasks(repositoryUrl);
- assertNotNull(tasksReturned);
- assertEquals(1, tasksReturned.size());
- assertTrue(tasksReturned.contains(task1));
- }
-
- public void testAllTasksDeactivation() {
- AbstractTask task1 = new LocalTask("task1", "description1");
- AbstractTask task2 = new LocalTask("task2", "description2");
- TaskList taskList = manager.getTaskList();
- taskList.addTask(task1);
- taskList.addTask(task2);
- assertNull(manager.getActiveTask());
-
- manager.activateTask(task2);
- assertEquals(task2, manager.getActiveTask());
-
- manager.deactivateAllTasks();
- assertNull(manager.getActiveTask());
- }
-
- public void testMarkTaskRead() {
- // TODO reimplement
-// String repositoryUrl = "http://mylyn.eclipse.org/bugs222";
-// MockTask task1 = new MockTask(repositoryUrl, "1");
-// MockTask task2 = new MockTask(repositoryUrl, "2");
-// task1.setSynchronizationState(SynchronizationState.INCOMING);
-// task2.setSynchronizationState(SynchronizationState.INCOMING);
-// List<ITaskElement> elements = new ArrayList<ITaskElement>();
-// elements.add(task1);
-// elements.add(task2);
-// MarkTaskReadAction readAction = new MarkTaskReadAction(elements);
-// readAction.run();
-// assertEquals(SynchronizationState.SYNCHRONIZED, task1.getSynchronizationState());
-// assertEquals(SynchronizationState.SYNCHRONIZED, task2.getSynchronizationState());
-//
-// manager.getTaskList().reset();
-// MockTask hit1 = new MockTask("1");
-// MockTask hit2 = new MockTask("2");
-// MockRepositoryQuery query = new MockRepositoryQuery("summary");
-// manager.getTaskList().addQuery(query);
-// manager.getTaskList().addTask(hit1, query);
-// manager.getTaskList().addTask(hit2, query);
-//
-// elements.clear();
-// elements.add(query);
-// readAction = new MarkTaskReadAction(elements);
-// readAction.run();
-// assertEquals(2, query.getChildren().size());
-// for (ITaskElement element : query.getChildren()) {
-// if (element instanceof MockTask) {
-// MockTask mockTask = (MockTask) element;
-// assertEquals(SynchronizationState.SYNCHRONIZED, mockTask.getSynchronizationState());
-// }
-// }
-
- }
-
- public void testMarkUnRead() {
- // TODO reimplement
-// String repositoryUrl = "http://mylyn.eclipse.org/bugs222";
-// MockTask task1 = new MockTask(repositoryUrl, "1");
-// MockTask task2 = new MockTask(repositoryUrl, "2");
-// assertEquals(SynchronizationState.SYNCHRONIZED, task1.getSynchronizationState());
-// assertEquals(SynchronizationState.SYNCHRONIZED, task2.getSynchronizationState());
-// List<ITaskElement> elements = new ArrayList<ITaskElement>();
-// elements.add(task1);
-// elements.add(task2);
-// MarkTaskUnreadAction unreadAction = new MarkTaskUnreadAction(elements);
-// unreadAction.run();
-// assertEquals(SynchronizationState.INCOMING, task1.getSynchronizationState());
-// assertEquals(SynchronizationState.INCOMING, task2.getSynchronizationState());
-//
-// manager.getTaskList().reset();
-// MockTask hit1 = new MockTask("1");
-// MockTask hit2 = new MockTask("2");
-// MockRepositoryQuery query = new MockRepositoryQuery("summary");
-// manager.getTaskList().addQuery(query);
-// manager.getTaskList().addTask(hit1, query);
-// manager.getTaskList().addTask(hit2, query);
-//
-// elements.clear();
-// elements.add(query);
-// MarkTaskReadAction readAction = new MarkTaskReadAction(elements);
-// readAction.run();
-// assertEquals(2, query.getChildren().size());
-// for (ITaskElement element : query.getChildren()) {
-// if (element instanceof MockTask) {
-// MockTask mockTask = (MockTask) element;
-// assertEquals(SynchronizationState.SYNCHRONIZED, mockTask.getSynchronizationState());
-// } else {
-// fail();
-// }
-// }
-//
-// unreadAction = new MarkTaskUnreadAction(elements);
-// unreadAction.run();
-// assertEquals(2, query.getChildren().size());
-// for (ITaskElement element : query.getChildren()) {
-// if (element instanceof MockTask) {
-// MockTask mockTask = (MockTask) element;
-// assertEquals(SynchronizationState.INCOMING, mockTask.getSynchronizationState());
-// } else {
-// fail();
-// }
-// }
- }
-
- public void testQueryHitsNotDropped() {
- MockTask task1 = new MockTask("1");
- MockTask task2 = new MockTask("2");
- task1.setLastReadTimeStamp("today");
- task2.setLastReadTimeStamp("today");
- MockRepositoryQuery query = new MockRepositoryQuery("summary");
- manager.getTaskList().addQuery(query);
- manager.getTaskList().addTask(task1, query);
- manager.getTaskList().addTask(task2, query);
- //assertEquals(0, manager.getTaskList().getArchiveContainer().getChildren().size());
- assertEquals(2, query.getChildren().size());
- TaskRepository repository = TasksUiPlugin.getRepositoryManager().getRepository(
- MockRepositoryConnector.REPOSITORY_URL);
- Set<RepositoryQuery> queries = new HashSet<RepositoryQuery>();
- queries.add(query);
- TasksUiInternal.synchronizeQueries(new MockRepositoryConnector(), repository, queries, null, true);
- //assertEquals(2, manager.getTaskList().getArchiveContainer().getChildren().size());
- assertEquals(0, query.getChildren().size());
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListPresentationTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListPresentationTest.java
deleted file mode 100644
index 67a3d5da6..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListPresentationTest.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.internal.tasks.ui.views.AbstractTaskListPresentation;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-
-/**
- * @author Mik Kersten
- */
-public class TaskListPresentationTest extends TestCase {
-
- public void testDefaultPresentations() {
-
- List<AbstractTaskListPresentation> presentations = TaskListView.getPresentations();
- // depends on whether Sandbox is running
- assertTrue(presentations.size() == 2 || presentations.size() == 7);
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListSaveManagerTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListSaveManagerTest.java
deleted file mode 100644
index e64eee8da..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListSaveManagerTest.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import java.io.File;
-import java.io.IOException;
-import java.text.SimpleDateFormat;
-import java.util.Calendar;
-import java.util.Locale;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
-import org.eclipse.mylyn.internal.tasks.core.TaskActivityUtil;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-
-/**
- * @author Rob Elves
- */
-public class TaskListSaveManagerTest extends TestCase {
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- public void testRemovalOfSnapshots() throws IOException {
- String backupPath = TasksUiPlugin.getDefault().getBackupFolderPath();
- File backupFolder = new File(backupPath);
- if (!backupFolder.exists()) {
- backupFolder.mkdir();
- }
-
- Calendar time = TaskActivityUtil.getCalendar();
-
- File thisHour = createFile(backupFolder, time);
- time.add(Calendar.MILLISECOND, -1000);
- File thisHourEarlier = createFile(backupFolder, time);
-
- TaskActivityUtil.snapStartOfHour(time);
- time.add(Calendar.HOUR_OF_DAY, -1);
- time.add(Calendar.MILLISECOND, -3000);
- File previousHour = createFile(backupFolder, time);
-
- time.add(Calendar.MILLISECOND, -3000);
- File previousHour2 = createFile(backupFolder, time);
-
- time.add(Calendar.DAY_OF_YEAR, -1);
- File previousDay = createFile(backupFolder, time);
-
- time.add(Calendar.HOUR_OF_DAY, -1);
- File previousDay2 = createFile(backupFolder, time);
-
- time.add(Calendar.DAY_OF_YEAR, -3);
- File previousDay3 = createFile(backupFolder, time);
-
- time.add(Calendar.HOUR_OF_DAY, -1);
- File previousDay4 = createFile(backupFolder, time);
-
- time.add(Calendar.MILLISECOND, -4000);
- File previousDay5 = createFile(backupFolder, time);
-
- TasksUiPlugin.getBackupManager().removeOldBackups();
- assertTrue(thisHour.exists());
- assertFalse(thisHourEarlier.exists());
- assertTrue(previousHour.exists());
- assertFalse(previousHour2.exists());
- assertTrue(previousDay.exists());
- assertFalse(previousDay2.exists());
- assertTrue(previousDay3.exists());
- assertFalse(previousDay4.exists());
- assertFalse(previousDay5.exists());
- }
-
- public void testAddTaskDuringSave() {
- // add task
- // save
- // try to add task during save
- }
-
- // test cancellation
-
- private File createFile(File backupFolder, Calendar time) {
- SimpleDateFormat format = new SimpleDateFormat(ITasksCoreConstants.FILENAME_TIMESTAMP_FORMAT, Locale.ENGLISH);
- File newFile = new File(backupFolder, ITasksCoreConstants.PREFIX_TASKLIST + "-" + format.format(time.getTime())
- + ITasksCoreConstants.FILE_EXTENSION);
- try {
- newFile.createNewFile();
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- return newFile;
- }
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListTest.java
deleted file mode 100644
index 86d350f99..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListTest.java
+++ /dev/null
@@ -1,309 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.internal.tasks.core.ITaskList;
-import org.eclipse.mylyn.internal.tasks.core.LocalTask;
-import org.eclipse.mylyn.internal.tasks.core.TaskCategory;
-import org.eclipse.mylyn.internal.tasks.core.TaskList;
-
-/**
- * @author Mik Kersten
- * @author Rob Elves
- * @author Shawn Minto
- */
-public class TaskListTest extends TestCase {
-
- public void testGetCategories() {
- TaskList taskList = new TaskList();
- taskList.addCategory(new TaskCategory("a"));
- assertEquals(2, taskList.getCategories().size());
- }
-
- public void testLocalSubTaskAdd() {
- ITaskList taskList = new TaskList();
- LocalTask task = new LocalTask("1", "summary");
- LocalTask subTask = new LocalTask("2", "subTask");
-
- taskList.addTask(task);
- taskList.addTask(subTask, task);
-
- assertEquals(1, task.getChildren().size());
- assertEquals(subTask, task.getChildren().iterator().next());
- }
-
- public void testLocalTaskAddToSelf() {
- ITaskList taskList = new TaskList();
- LocalTask task = new LocalTask("1", "summary");
-
- taskList.addTask(task);
- assertFalse(taskList.addTask(task, task));
- assertEquals(0, task.getChildren().size());
- assertEquals(1, task.getParentContainers().size());
- }
-
- public void testLocalSubTaskAddCycle() {
- TaskList taskList = new TaskList();
- LocalTask task = new LocalTask("1", "summary");
- LocalTask subTask = new LocalTask("2", "subTask");
-
- taskList.addTask(task);
- taskList.addTask(subTask, task);
- taskList.addTask(task, subTask);
-
- assertEquals(2, taskList.getAllTasks().size());
- assertEquals(1, taskList.getCategories().size());
- assertEquals(1, taskList.getCategories().iterator().next().getChildren().size());
- assertEquals(1, task.getChildren().size());
- assertEquals(0, subTask.getChildren().size());
- assertEquals(subTask, task.getChildren().iterator().next());
- }
-
- public void testLocalSubTaskAddDeepCycle() {
- TaskList taskList = new TaskList();
- LocalTask task = new LocalTask("1", "summary");
- LocalTask subTask1 = new LocalTask("2", "subTask");
- LocalTask subTask2 = new LocalTask("3", "subTask");
- LocalTask subTask3 = new LocalTask("4", "subTask");
- LocalTask subTask4 = new LocalTask("5", "subTask");
- LocalTask subTask5 = new LocalTask("6", "subTask");
- LocalTask subTask6 = new LocalTask("7", "subTask");
- LocalTask subTask7 = new LocalTask("8", "subTask");
- LocalTask subTask8 = new LocalTask("9", "subTask");
- LocalTask subTask9 = new LocalTask("10", "subTask");
- LocalTask subTask10 = new LocalTask("11", "subTask");
-
- taskList.addTask(task);
- taskList.addTask(subTask1, task);
- taskList.addTask(subTask2, subTask1);
- taskList.addTask(subTask3, subTask2);
- taskList.addTask(subTask4, subTask3);
- taskList.addTask(subTask5, subTask4);
- taskList.addTask(subTask6, subTask5);
- taskList.addTask(subTask7, subTask6);
- taskList.addTask(subTask8, subTask7);
- taskList.addTask(subTask9, subTask8);
- taskList.addTask(subTask10, subTask9);
-
- taskList.addTask(task, subTask10);
-
- assertEquals(11, taskList.getAllTasks().size());
- assertEquals(1, taskList.getCategories().size());
- assertEquals(1, taskList.getCategories().iterator().next().getChildren().size());
- assertEquals(1, task.getChildren().size());
- assertEquals(subTask1, task.getChildren().iterator().next());
-
- assertEquals(1, subTask1.getChildren().size());
- assertEquals(subTask2, subTask1.getChildren().iterator().next());
-
- assertEquals(1, subTask2.getChildren().size());
- assertEquals(subTask3, subTask2.getChildren().iterator().next());
-
- assertEquals(1, subTask3.getChildren().size());
- assertEquals(subTask4, subTask3.getChildren().iterator().next());
-
- assertEquals(1, subTask4.getChildren().size());
- assertEquals(subTask5, subTask4.getChildren().iterator().next());
-
- assertEquals(1, subTask5.getChildren().size());
- assertEquals(subTask6, subTask5.getChildren().iterator().next());
-
- assertEquals(1, subTask6.getChildren().size());
- assertEquals(subTask7, subTask6.getChildren().iterator().next());
-
- assertEquals(1, subTask7.getChildren().size());
- assertEquals(subTask8, subTask7.getChildren().iterator().next());
-
- assertEquals(1, subTask8.getChildren().size());
- assertEquals(subTask9, subTask8.getChildren().iterator().next());
-
- assertEquals(1, subTask9.getChildren().size());
- assertEquals(subTask10, subTask9.getChildren().iterator().next());
-
- assertEquals(0, subTask10.getChildren().size());
- }
-
- public void testLocalSubTaskAddMaxSubTaskDepthDeepCycle() {
- TaskList taskList = new TaskList();
- LocalTask task = new LocalTask("1", "summary");
- LocalTask subTask1 = new LocalTask("2", "subTask");
- LocalTask subTask2 = new LocalTask("3", "subTask");
- LocalTask subTask3 = new LocalTask("4", "subTask");
- LocalTask subTask4 = new LocalTask("5", "subTask");
- LocalTask subTask5 = new LocalTask("6", "subTask");
- LocalTask subTask6 = new LocalTask("7", "subTask");
- LocalTask subTask7 = new LocalTask("8", "subTask");
- LocalTask subTask8 = new LocalTask("9", "subTask");
- LocalTask subTask9 = new LocalTask("10", "subTask");
- LocalTask subTask10 = new LocalTask("11", "subTask");
- LocalTask subTask11 = new LocalTask("12", "subTask");
-
- taskList.addTask(task);
- taskList.addTask(subTask1, task);
- taskList.addTask(subTask2, subTask1);
- taskList.addTask(subTask3, subTask2);
- taskList.addTask(subTask4, subTask3);
- taskList.addTask(subTask5, subTask4);
- taskList.addTask(subTask6, subTask5);
- taskList.addTask(subTask7, subTask6);
- taskList.addTask(subTask8, subTask7);
- taskList.addTask(subTask9, subTask8);
- taskList.addTask(subTask10, subTask9);
- taskList.addTask(subTask11, subTask10);
-
- taskList.addTask(task, subTask11);
-
- assertEquals(12, taskList.getAllTasks().size());
- assertEquals(1, taskList.getCategories().size());
- assertEquals(1, taskList.getCategories().iterator().next().getChildren().size());
- assertEquals(1, task.getChildren().size());
- assertEquals(subTask1, task.getChildren().iterator().next());
-
- assertEquals(1, subTask1.getChildren().size());
- assertEquals(subTask2, subTask1.getChildren().iterator().next());
-
- assertEquals(1, subTask2.getChildren().size());
- assertEquals(subTask3, subTask2.getChildren().iterator().next());
-
- assertEquals(1, subTask3.getChildren().size());
- assertEquals(subTask4, subTask3.getChildren().iterator().next());
-
- assertEquals(1, subTask4.getChildren().size());
- assertEquals(subTask5, subTask4.getChildren().iterator().next());
-
- assertEquals(1, subTask5.getChildren().size());
- assertEquals(subTask6, subTask5.getChildren().iterator().next());
-
- assertEquals(1, subTask6.getChildren().size());
- assertEquals(subTask7, subTask6.getChildren().iterator().next());
-
- assertEquals(1, subTask7.getChildren().size());
- assertEquals(subTask8, subTask7.getChildren().iterator().next());
-
- assertEquals(1, subTask8.getChildren().size());
- assertEquals(subTask9, subTask8.getChildren().iterator().next());
-
- assertEquals(1, subTask9.getChildren().size());
- assertEquals(subTask10, subTask9.getChildren().iterator().next());
-
- assertEquals(1, subTask10.getChildren().size());
- assertEquals(subTask11, subTask10.getChildren().iterator().next());
-
- assertEquals(0, subTask11.getChildren().size());
- }
-
- public void testLocalSubTaskAddReallyDeepCycle() {
- TaskList taskList = new TaskList();
- LocalTask task = new LocalTask("1", "summary");
- LocalTask subTask1 = new LocalTask("2", "subTask");
- LocalTask subTask2 = new LocalTask("3", "subTask");
- LocalTask subTask3 = new LocalTask("4", "subTask");
- LocalTask subTask4 = new LocalTask("5", "subTask");
- LocalTask subTask5 = new LocalTask("6", "subTask");
- LocalTask subTask6 = new LocalTask("7", "subTask");
- LocalTask subTask7 = new LocalTask("8", "subTask");
- LocalTask subTask8 = new LocalTask("9", "subTask");
- LocalTask subTask9 = new LocalTask("10", "subTask");
- LocalTask subTask10 = new LocalTask("11", "subTask");
- LocalTask subTask11 = new LocalTask("12", "subTask");
- LocalTask subTask12 = new LocalTask("13", "subTask");
- LocalTask subTask13 = new LocalTask("14", "subTask");
- LocalTask subTask14 = new LocalTask("15", "subTask");
- LocalTask subTask15 = new LocalTask("16", "subTask");
- LocalTask subTask16 = new LocalTask("17", "subTask");
- LocalTask subTask17 = new LocalTask("18", "subTask");
- LocalTask subTask18 = new LocalTask("19", "subTask");
-
- taskList.addTask(task);
- taskList.addTask(subTask1, task);
- taskList.addTask(subTask2, subTask1);
- taskList.addTask(subTask3, subTask2);
- taskList.addTask(subTask4, subTask3);
- taskList.addTask(subTask5, subTask4);
- taskList.addTask(subTask6, subTask5);
- taskList.addTask(subTask7, subTask6);
- taskList.addTask(subTask8, subTask7);
- taskList.addTask(subTask9, subTask8);
- taskList.addTask(subTask10, subTask9);
- taskList.addTask(subTask11, subTask10);
- taskList.addTask(subTask12, subTask11);
- taskList.addTask(subTask13, subTask12);
- taskList.addTask(subTask14, subTask13);
- taskList.addTask(subTask15, subTask14);
- taskList.addTask(subTask16, subTask15);
- taskList.addTask(subTask17, subTask16);
- taskList.addTask(subTask18, subTask17);
-
- taskList.addTask(task, subTask18);
-
- assertEquals(19, taskList.getAllTasks().size());
- assertEquals(1, taskList.getCategories().size());
- assertEquals(1, taskList.getCategories().iterator().next().getChildren().size());
- assertEquals(1, task.getChildren().size());
- assertEquals(subTask1, task.getChildren().iterator().next());
-
- assertEquals(1, subTask1.getChildren().size());
- assertEquals(subTask2, subTask1.getChildren().iterator().next());
-
- assertEquals(1, subTask2.getChildren().size());
- assertEquals(subTask3, subTask2.getChildren().iterator().next());
-
- assertEquals(1, subTask3.getChildren().size());
- assertEquals(subTask4, subTask3.getChildren().iterator().next());
-
- assertEquals(1, subTask4.getChildren().size());
- assertEquals(subTask5, subTask4.getChildren().iterator().next());
-
- assertEquals(1, subTask5.getChildren().size());
- assertEquals(subTask6, subTask5.getChildren().iterator().next());
-
- assertEquals(1, subTask6.getChildren().size());
- assertEquals(subTask7, subTask6.getChildren().iterator().next());
-
- assertEquals(1, subTask7.getChildren().size());
- assertEquals(subTask8, subTask7.getChildren().iterator().next());
-
- assertEquals(1, subTask8.getChildren().size());
- assertEquals(subTask9, subTask8.getChildren().iterator().next());
-
- assertEquals(1, subTask9.getChildren().size());
- assertEquals(subTask10, subTask9.getChildren().iterator().next());
-
- assertEquals(1, subTask10.getChildren().size());
- assertEquals(subTask11, subTask10.getChildren().iterator().next());
-
- assertEquals(1, subTask11.getChildren().size());
- assertEquals(subTask12, subTask11.getChildren().iterator().next());
-
- assertEquals(1, subTask11.getChildren().size());
- assertEquals(subTask12, subTask11.getChildren().iterator().next());
-
- assertEquals(1, subTask12.getChildren().size());
- assertEquals(subTask13, subTask12.getChildren().iterator().next());
-
- assertEquals(1, subTask13.getChildren().size());
- assertEquals(subTask14, subTask13.getChildren().iterator().next());
-
- assertEquals(1, subTask14.getChildren().size());
- assertEquals(subTask15, subTask14.getChildren().iterator().next());
-
- assertEquals(1, subTask15.getChildren().size());
- assertEquals(subTask16, subTask15.getChildren().iterator().next());
-
- assertEquals(1, subTask16.getChildren().size());
- assertEquals(subTask17, subTask16.getChildren().iterator().next());
-
- assertEquals(1, subTask17.getChildren().size());
- assertEquals(subTask18, subTask17.getChildren().iterator().next());
-
- assertEquals(0, subTask18.getChildren().size());
- }
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListUiTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListUiTest.java
deleted file mode 100644
index ff7f167b0..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListUiTest.java
+++ /dev/null
@@ -1,376 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.Set;
-import java.util.Vector;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jface.action.IContributionItem;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.ITaskListChangeListener;
-import org.eclipse.mylyn.internal.tasks.core.TaskCategory;
-import org.eclipse.mylyn.internal.tasks.ui.MoveToCategoryMenuContributor;
-import org.eclipse.mylyn.internal.tasks.ui.TaskListManager;
-import org.eclipse.mylyn.internal.tasks.ui.TaskPriorityFilter;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.actions.MarkTaskCompleteAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.NewCategoryAction;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.internal.web.tasks.WebTask;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
-import org.eclipse.mylyn.tasks.tests.connector.MockRepositoryQuery;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.swt.widgets.TreeItem;
-
-/**
- * Tests TaskListView's filtering mechanism.
- *
- * @author Ken Sueda
- *
- */
-public class TaskListUiTest extends TestCase {
-
- private TaskListManager manager = null;
-
- private TaskCategory cat1 = null;
-
- private AbstractTask cat1task1 = null;
-
- private AbstractTask cat1task2 = null;
-
- private AbstractTask cat1task3 = null;
-
- private AbstractTask cat1task4 = null;
-
- private AbstractTask cat1task5 = null;
-
- private AbstractTask cat1task1sub1 = null;
-
- private TaskCategory cat2 = null;
-
- private AbstractTask cat2task1 = null;
-
- private AbstractTask cat2task2 = null;
-
- private AbstractTask cat2task3 = null;
-
- private AbstractTask cat2task4 = null;
-
- private AbstractTask cat2task5 = null;
-
- private AbstractTask cat2task1sub1 = null;
-
- private final static int CHECK_COMPLETE_FILTER = 1;
-
- private final static int CHECK_INCOMPLETE_FILTER = 2;
-
- private final static int CHECK_PRIORITY_FILTER = 3;
-
- @Override
- public void setUp() throws Exception {
- TasksUiUtil.openTasksViewInActivePerspective();
- manager = TasksUiPlugin.getTaskListManager();
-
- // make sure no unmatched folders exist
- TasksUiPlugin.getRepositoryManager().clearRepositories(TasksUiPlugin.getDefault().getRepositoriesFilePath());
- manager.resetTaskList();
-
- TasksUiPlugin.getDefault().getLocalTaskRepository();
-
- cat1 = new TaskCategory("First Category");
- manager.getTaskList().addCategory(cat1);
-
- cat1task1 = TasksUiInternal.createNewLocalTask("task 1");
- cat1task1.setPriority(PriorityLevel.P1.toString());
- cat1task1.setCompletionDate(new Date());
- manager.getTaskList().addTask(cat1task1, cat1);
-
- cat1task1sub1 = TasksUiInternal.createNewLocalTask("sub task 1");
- cat1task1sub1.setPriority(PriorityLevel.P1.toString());
- cat1task1sub1.setCompletionDate(new Date());
- manager.getTaskList().addTask(cat1task1sub1, cat1task1);
-
- cat1task2 = TasksUiInternal.createNewLocalTask("task 2");
- cat1task2.setPriority(PriorityLevel.P2.toString());
- manager.getTaskList().addTask(cat1task2, cat1);
-
- cat1task3 = TasksUiInternal.createNewLocalTask("task 3");
- cat1task3.setPriority(PriorityLevel.P3.toString());
- cat1task3.setCompletionDate(new Date());
- manager.getTaskList().addTask(cat1task3, cat1);
-
- cat1task4 = TasksUiInternal.createNewLocalTask("task 4");
- cat1task4.setPriority(PriorityLevel.P4.toString());
- manager.getTaskList().addTask(cat1task4, cat1);
-
- cat1task5 = TasksUiInternal.createNewLocalTask("task 5");
- cat1task5.setPriority(PriorityLevel.P5.toString());
- cat1task5.setCompletionDate(new Date());
- manager.getTaskList().addTask(cat1task5, cat1);
-
- assertEquals(cat1.getChildren().size(), 5);
-
- cat2 = new TaskCategory("Second Category");
- manager.getTaskList().addCategory(cat2);
-
- cat2task1 = TasksUiInternal.createNewLocalTask("task 1");
- cat2task1.setPriority(PriorityLevel.P1.toString());
- manager.getTaskList().addTask(cat2task1, cat2);
-
- cat2task1sub1 = TasksUiInternal.createNewLocalTask("sub task 1");
- cat2task1sub1.setPriority(PriorityLevel.P1.toString());
- manager.getTaskList().addTask(cat2task1sub1, cat2task1);
-
- cat2task2 = TasksUiInternal.createNewLocalTask("task 2");
- cat2task2.setPriority(PriorityLevel.P2.toString());
- cat2task2.setCompletionDate(new Date());
- manager.getTaskList().addTask(cat2task2, cat2);
-
- cat2task3 = TasksUiInternal.createNewLocalTask("task 3");
- cat2task3.setPriority(PriorityLevel.P3.toString());
- manager.getTaskList().addTask(cat2task3, cat2);
-
- cat2task4 = TasksUiInternal.createNewLocalTask("task 4");
- cat2task4.setPriority(PriorityLevel.P4.toString());
- cat2task4.setCompletionDate(new Date());
- manager.getTaskList().addTask(cat2task4, cat2);
-
- cat2task5 = TasksUiInternal.createNewLocalTask("task 5");
- cat2task5.setPriority(PriorityLevel.P5.toString());
- manager.getTaskList().addTask(cat2task5, cat2);
-
- manager.saveTaskList();
- }
-
- @Override
- public void tearDown() throws Exception {
- // clear everything
- }
-
- public void testMarkWebTaskCompleted() {
- TaskListView view = TaskListView.getFromActivePerspective();
- assertNotNull(view);
- WebTask webTask = new WebTask("1", "1", "", "", "web");
- TasksUiPlugin.getTaskList().addTask(webTask);
- view.getViewer().refresh();
- // Arrays.asList(view.getViewer().getVisibleExpandedElements());
- assertFalse(webTask.isCompleted());
- ArrayList<IRepositoryElement> tasks = new ArrayList<IRepositoryElement>();
- tasks.add(webTask);
- new MarkTaskCompleteAction(tasks).run();
- assertTrue(webTask.isCompleted());
- }
-
- public void testUiFilter() {
- assertNotNull(TaskListView.getFromActivePerspective());
- TreeViewer viewer = TaskListView.getFromActivePerspective().getViewer();
- TaskListView.getFromActivePerspective().addFilter(TaskListView.getFromActivePerspective().getCompleteFilter());
- viewer.refresh();
- viewer.expandAll();
- TreeItem[] items = viewer.getTree().getItems();
- assertTrue(checkFilter(CHECK_COMPLETE_FILTER, items));
- TaskListView.getFromActivePerspective().removeFilter(
- TaskListView.getFromActivePerspective().getCompleteFilter());
-
- TaskPriorityFilter filter = TaskListView.getFromActivePerspective().getPriorityFilter();
- filter.displayPrioritiesAbove("P2");
- TaskListView.getFromActivePerspective().addFilter(filter);
- viewer.refresh();
- viewer.expandAll();
- items = viewer.getTree().getItems();
-
- // check priority tasks
- assertTrue(checkFilter(CHECK_PRIORITY_FILTER, items));
- }
-
- /**
- * Tests that TaskEditors remove all listeners when closed
- */
- public void testListenersRemoved() {
- int numListenersBefore = 0;
- int numListenersDuring = 0;
- int numListenersAfter = 0;
-
- TaskListManager manager = TasksUiPlugin.getTaskListManager();
- Set<ITaskListChangeListener> listeners = manager.getTaskList().getChangeListeners();
- numListenersBefore = listeners.size();
-
- TasksUiUtil.openTask(cat1task1);
- TasksUiUtil.openTask(cat1task2);
-
- listeners = manager.getTaskList().getChangeListeners();
- numListenersDuring = listeners.size();
-
- assertEquals(numListenersDuring, numListenersBefore + 2);
-
- TasksUiPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().closeAllEditors(false);
-
- listeners = manager.getTaskList().getChangeListeners();
- numListenersAfter = listeners.size();
- assertEquals(numListenersBefore, numListenersAfter);
- }
-
- /**
- * Tests whether an additional NewCategory action is added to the category
- */
- public void testGetSubMenuManagerContainsAllCategoriesPlusNewCategory() {
- // setup
- MoveToCategoryMenuContributor moveToMenuContrib = new MoveToCategoryMenuContributor();
- List<IRepositoryElement> selectedElements = new Vector<IRepositoryElement>();
- selectedElements.add(cat1task1);
- int numCategories = manager.getTaskList().getCategories().size();
- int numSeparators = 1;
- // adding a separator and the New Category... action
- int expectedNrOfSubMenuEntries = numCategories + numSeparators + 1;
- NewCategoryAction newCatActon = new NewCategoryAction();
-
- // execute sytem under test
- MenuManager menuManager = moveToMenuContrib.getSubMenuManager(selectedElements);
- IContributionItem[] items = menuManager.getItems();
- IContributionItem item = items[menuManager.getItems().length - 1];
-
- // +1 for separator
- assertEquals(expectedNrOfSubMenuEntries, menuManager.getItems().length);
-
- if (item instanceof NewCategoryAction) {
- NewCategoryAction action = (NewCategoryAction) item;
- assertEquals(newCatActon.getText(), action.getText());
- }
-
- // teardown
- }
-
- /**
- * Tests visibility of SubMenuManager
- */
- public void testVisibilityOfSubMenuManager() {
- //setup
- MoveToCategoryMenuContributor moveToMenuContrib = new MoveToCategoryMenuContributor();
- MenuManager menuManager = null;
- List<IRepositoryElement> selectedElements = new Vector<IRepositoryElement>();
- selectedElements.add(cat1task1);
-
- List<IRepositoryElement> emptySelection = new Vector<IRepositoryElement>();
-
- List<IRepositoryElement> categorySelection = new Vector<IRepositoryElement>();
- categorySelection.add(cat1);
-
- List<IRepositoryElement> querySelection = new Vector<IRepositoryElement>();
- querySelection.add(new MockRepositoryQuery("query", null));
-
- //execute system under test & assert
- menuManager = moveToMenuContrib.getSubMenuManager(selectedElements);
- assertTrue(menuManager.isVisible());
-
- menuManager = null;
- menuManager = moveToMenuContrib.getSubMenuManager(emptySelection);
- assertFalse(menuManager.isVisible());
-
- menuManager = null;
- menuManager = moveToMenuContrib.getSubMenuManager(categorySelection);
- assertFalse(menuManager.isVisible());
-
- menuManager = null;
- menuManager = moveToMenuContrib.getSubMenuManager(querySelection);
- assertFalse(menuManager.isVisible());
-
- //teardown
- }
-
- /**
- * Tests that the category name is shown in the Move To Category submenu, even when they have an @ in their name
- */
- public void testCategoryNameIsShownInMoveToCategoryAction() {
- String catNameWithAtBefore = "@CatName";
- String catNameWithAtExpected = "@CatName@";
- String catNameWithAtActual = "";
-
- String catNameNoAtBefore = "CatName";
- String catNameNoAtExpected = "CatName";
- String catNameNoAtActual = "";
-
- MoveToCategoryMenuContributor menuContrib = new MoveToCategoryMenuContributor();
-
- catNameWithAtActual = menuContrib.handleAcceleratorKeys(catNameWithAtBefore);
- catNameNoAtActual = menuContrib.handleAcceleratorKeys(catNameNoAtBefore);
-
- assertEquals(catNameWithAtExpected, catNameWithAtActual);
- assertEquals(catNameNoAtExpected, catNameNoAtActual);
- }
-
- public boolean checkFilter(int type, TreeItem[] items) {
- switch (type) {
- case CHECK_COMPLETE_FILTER:
- return checkCompleteIncompleteFilter(items, false);
- case CHECK_INCOMPLETE_FILTER:
- return checkCompleteIncompleteFilter(items, true);
- case CHECK_PRIORITY_FILTER:
- return checkPriorityFilter(items);
- default:
- return false;
- }
- }
-
- public boolean checkCompleteIncompleteFilter(TreeItem[] items, boolean checkComplete) {
- assertEquals(3, items.length);
- int count = 0;
- for (TreeItem item : items) {
- if (item.getData() instanceof TaskCategory) {
- TreeItem[] sub = item.getItems();
- for (TreeItem element : sub) {
- assertTrue(element.getData() instanceof ITask);
- ITask task = (ITask) element.getData();
- if (checkComplete) {
- assertTrue(task.isCompleted());
- } else {
- assertFalse(task.isCompleted());
- }
- count++;
- }
- }
- }
- assertTrue(count == 5);
- return true;
- }
-
- public boolean checkPriorityFilter(TreeItem[] items) {
- assertTrue(items.length == 3);
- int p2Count = 0;
- int p1Count = 0;
- for (TreeItem item : items) {
- if (item.getData() instanceof TaskCategory) {
- TreeItem[] sub = item.getItems();
- for (TreeItem element : sub) {
- assertTrue(element.getData() instanceof ITask);
- ITask task = (ITask) element.getData();
- assertTrue(task.getPriority().equals("P2") || task.getPriority().equals("P1"));
- if (task.getPriority().equals("P2")) {
- p2Count++;
- } else {
- p1Count++;
- }
- }
- }
- }
- assertEquals(2, p1Count);
- assertEquals(2, p2Count);
- return true;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskPlanningEditorTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskPlanningEditorTest.java
deleted file mode 100644
index 9205aa92c..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskPlanningEditorTest.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.mylyn.internal.tasks.core.LocalTask;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.editors.TaskPlanningEditor;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Rob Elves
- */
-public class TaskPlanningEditorTest extends TestCase {
-
- private static final String MOCK_LABEL = "label";
-
- private static final String DESCRIPTION = "summary";
-
- private static final String NEW_DESCRIPTION = "new summary";
-
- @Override
- protected void setUp() throws Exception {
- TasksUiPlugin.getDefault().getLocalTaskRepository();
- }
-
- @Override
- protected void tearDown() throws Exception {
- PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().closeAllEditors(false);
- TasksUiPlugin.getRepositoryManager().clearRepositories(TasksUiPlugin.getDefault().getRepositoriesFilePath());
- TasksUiPlugin.getTaskListManager().resetTaskList();
- TasksUiPlugin.getTaskListManager().saveTaskList();
- super.tearDown();
- }
-
- public void testDirtyOnEdit() {
- LocalTask task = new LocalTask("1", MOCK_LABEL);
- task.setSummary(DESCRIPTION);
- TasksUiPlugin.getTaskList().addTask(task);
- TasksUiUtil.openTask(task);
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- assertTrue(page.getActiveEditor() instanceof TaskEditor);
- TaskEditor taskEditor = (TaskEditor) page.getActiveEditor();
- assertTrue(taskEditor.getActivePageInstance() instanceof TaskPlanningEditor);
- TaskPlanningEditor editor = (TaskPlanningEditor) taskEditor.getActivePageInstance();
- assertFalse(editor.isDirty());
- editor.setNotes("notes");
- assertTrue(editor.isDirty());
- editor.doSave(new NullProgressMonitor());
- assertFalse(editor.isDirty());
- editor.setDescription(NEW_DESCRIPTION);
- assertTrue(editor.isDirty());
- editor.doSave(new NullProgressMonitor());
- assertEquals(NEW_DESCRIPTION, task.getSummary());
- assertFalse(editor.isDirty());
- }
-
- public void testNotDirtyOnRename() {
- LocalTask task = new LocalTask("1", MOCK_LABEL);
- task.setSummary(DESCRIPTION);
- TasksUiPlugin.getTaskList().addTask(task);
- TasksUiUtil.openTask(task);
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- assertTrue(page.getActiveEditor() instanceof TaskEditor);
- TaskEditor taskEditor = (TaskEditor) page.getActiveEditor();
- assertTrue(taskEditor.getActivePageInstance() instanceof TaskPlanningEditor);
- TaskPlanningEditor editor = (TaskPlanningEditor) taskEditor.getActivePageInstance();
- assertFalse(editor.isDirty());
- assertEquals(DESCRIPTION, editor.getDescription());
- task.setSummary(NEW_DESCRIPTION);
- editor.updateTaskData(task);
- //assertEquals(NEW_DESCRIPTION, editor.getFormTitle());
- assertEquals(NEW_DESCRIPTION, editor.getDescription());
- assertFalse(editor.isDirty());
- }
-
- /**
- * Test that if editor is dirty and external rename happens editor remains dirty
- */
- public void testRenameInDirtyState() {
- LocalTask task = new LocalTask("1", MOCK_LABEL);
- task.setSummary(DESCRIPTION);
- TasksUiPlugin.getTaskList().addTask(task);
- TasksUiUtil.openTask(task);
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- assertTrue(page.getActiveEditor() instanceof TaskEditor);
- TaskEditor taskEditor = (TaskEditor) page.getActiveEditor();
- assertTrue(taskEditor.getActivePageInstance() instanceof TaskPlanningEditor);
- TaskPlanningEditor editor = (TaskPlanningEditor) taskEditor.getActivePageInstance();
- assertFalse(editor.isDirty());
- editor.setDescription(NEW_DESCRIPTION);
- assertTrue(editor.isDirty());
- task.setSummary(NEW_DESCRIPTION + "2");
- editor.updateTaskData(task);
- //assertEquals(NEW_DESCRIPTION+"2", editor.getFormTitle());
- assertEquals(NEW_DESCRIPTION + "2", editor.getDescription());
- assertTrue(editor.isDirty());
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositoriesExternalizerTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositoriesExternalizerTest.java
deleted file mode 100644
index 9ba9ce8f0..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositoriesExternalizerTest.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import java.io.File;
-import java.util.HashSet;
-import java.util.Set;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.internal.tasks.core.TaskRepositoriesExternalizer;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-/**
- * @author Rob Elves
- * @author Erik Ramfelt (bug 168782)
- */
-public class TaskRepositoriesExternalizerTest extends TestCase {
-
- private Set<TaskRepository> taskRepositories = new HashSet<TaskRepository>();
-
- private static final String REP_TYPE = "bugzilla";
-
- private static final String REPURL1 = "http://somewhere1";
-
- private static final String REPURL2 = "http://somewhere2";
-
- private static final String TIMEZONE = "test time zone";
-
- private static final String VERSION = "test version";
-
- private static final String ENCODING = "test encoding";
-
- private static final String TIMESTAMP = "test time stamp";
-
- private static final String SUFFIX = "2";
-
- private TaskRepository repository1;
-
- private TaskRepository repository2;
-
- @Override
- protected void setUp() throws Exception {
- repository1 = new TaskRepository(REP_TYPE, REPURL1);
- repository2 = new TaskRepository("bugzilla", REPURL2);
-
- repository1.setTimeZoneId(TIMEZONE);
- repository1.setVersion(VERSION);
- repository1.setCharacterEncoding(ENCODING);
- repository1.setSynchronizationTimeStamp(TIMESTAMP);
- taskRepositories.add(repository1);
-
- repository2.setTimeZoneId(TIMEZONE + SUFFIX);
- repository2.setVersion(VERSION + SUFFIX);
- repository2.setCharacterEncoding(ENCODING + SUFFIX);
- repository2.setSynchronizationTimeStamp(TIMESTAMP + SUFFIX);
- taskRepositories.add(repository2);
- }
-
- public void testExternalization() {
- TaskRepositoriesExternalizer externalizer = new TaskRepositoriesExternalizer();
- String path = "repositories.xml";
- File file = new File(path);
- file.deleteOnExit();
- externalizer.writeRepositoriesToXML(taskRepositories, file);
- taskRepositories.clear();
- assertEquals(0, taskRepositories.size());
- taskRepositories = externalizer.readRepositoriesFromXML(file);
- assertEquals(2, taskRepositories.size());
- taskRepositories.contains(repository1);
- taskRepositories.contains(repository2);
- for (TaskRepository repository : taskRepositories) {
- if (repository.getRepositoryUrl().equals(REPURL1)) {
- assertEquals(TIMEZONE, repository.getTimeZoneId());
- assertEquals(VERSION, repository.getVersion());
- assertEquals(ENCODING, repository.getCharacterEncoding());
- assertEquals(TIMESTAMP, repository.getSynchronizationTimeStamp());
- } else if (repository.getRepositoryUrl().equals(REPURL2)) {
- assertEquals(TIMEZONE + SUFFIX, repository.getTimeZoneId());
- assertEquals(VERSION + SUFFIX, repository.getVersion());
- assertEquals(ENCODING + SUFFIX, repository.getCharacterEncoding());
- assertEquals(TIMESTAMP + SUFFIX, repository.getSynchronizationTimeStamp());
- }
- }
-
- }
-
- public void testExternalizationEmptyRepository() {
- TaskRepositoriesExternalizer externalizer = new TaskRepositoriesExternalizer();
- String path = "repositories.xml";
- File file = new File(path);
- file.deleteOnExit();
- externalizer.writeRepositoriesToXML(taskRepositories, file);
- taskRepositories = externalizer.readRepositoriesFromXML(file);
- assertEquals(2, taskRepositories.size());
- taskRepositories.clear();
- externalizer.writeRepositoriesToXML(taskRepositories, file);
- taskRepositories = externalizer.readRepositoriesFromXML(file);
- assertEquals(0, taskRepositories.size());
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositoryFilterTests.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositoryFilterTests.java
deleted file mode 100644
index 49a24cc9a..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositoryFilterTests.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.internal.tasks.core.ITaskRepositoryFilter;
-import org.eclipse.mylyn.internal.tasks.core.LocalRepositoryConnector;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.tests.connector.MockRepositoryConnector;
-
-/**
- * @author Shawn Minto
- */
-public class TaskRepositoryFilterTests extends TestCase {
-
- public void testCanCreateTaskFilter() {
- ITaskRepositoryFilter canCreateTaskFilter = ITaskRepositoryFilter.CAN_CREATE_NEW_TASK;
- TaskRepository repository = new TaskRepository(MockRepositoryConnector.REPOSITORY_KIND,
- MockRepositoryConnector.REPOSITORY_URL);
- MockRepositoryConnector connector = (MockRepositoryConnector) TasksUiPlugin.getConnector(MockRepositoryConnector.REPOSITORY_KIND);
- assertFalse(canCreateTaskFilter.accept(repository, connector));
-
- connector.setCanCreateNewTask(true);
- assertTrue(canCreateTaskFilter.accept(repository, connector));
-
- repository.setOffline(true);
- assertFalse(canCreateTaskFilter.accept(repository, connector));
-
- connector.resetDefaults();
- }
-
- public void testCanQueryTaskFilter() {
- ITaskRepositoryFilter canQueryFilter = ITaskRepositoryFilter.CAN_QUERY;
- TaskRepository repository = new TaskRepository(MockRepositoryConnector.REPOSITORY_KIND,
- MockRepositoryConnector.REPOSITORY_URL);
- MockRepositoryConnector connector = (MockRepositoryConnector) TasksUiPlugin.getConnector(MockRepositoryConnector.REPOSITORY_KIND);
- assertFalse(canQueryFilter.accept(repository, connector));
-
- repository = new TaskRepository(LocalRepositoryConnector.CONNECTOR_KIND,
- LocalRepositoryConnector.REPOSITORY_URL);
- AbstractRepositoryConnector localConnector = TasksUiPlugin.getConnector(LocalRepositoryConnector.CONNECTOR_KIND);
- assertFalse(canQueryFilter.accept(repository, localConnector));
-
- // need a second mock repo
- connector.setCanQuery(true);
- assertTrue(canQueryFilter.accept(repository, connector));
-
- repository.setOffline(true);
- assertFalse(canQueryFilter.accept(repository, connector));
-
- connector.resetDefaults();
- }
-
- public void testCanCreateTaskFromKeyTaskFilter() {
- ITaskRepositoryFilter canCreateTaskFromKeyFilter = ITaskRepositoryFilter.CAN_CREATE_TASK_FROM_KEY;
- TaskRepository repository = new TaskRepository(MockRepositoryConnector.REPOSITORY_KIND,
- MockRepositoryConnector.REPOSITORY_URL);
- MockRepositoryConnector connector = (MockRepositoryConnector) TasksUiPlugin.getConnector(MockRepositoryConnector.REPOSITORY_KIND);
- assertFalse(canCreateTaskFromKeyFilter.accept(repository, connector));
-
- // need a second mock repo
- connector.setCanCreateTaskFromKey(true);
- assertTrue(canCreateTaskFromKeyFilter.accept(repository, connector));
-
- repository.setOffline(true);
- assertFalse(canCreateTaskFromKeyFilter.accept(repository, connector));
- connector.resetDefaults();
- }
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositoryLocationTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositoryLocationTest.java
deleted file mode 100644
index 523345ab8..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositoryLocationTest.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import java.net.InetSocketAddress;
-import java.net.Proxy;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.net.proxy.IProxyData;
-import org.eclipse.mylyn.commons.net.AuthenticatedProxy;
-import org.eclipse.mylyn.commons.net.AuthenticationCredentials;
-import org.eclipse.mylyn.commons.net.AuthenticationType;
-import org.eclipse.mylyn.commons.net.UnsupportedRequestException;
-import org.eclipse.mylyn.internal.tasks.core.TaskRepositoryLocation;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-public class TaskRepositoryLocationTest extends TestCase {
-
- public void testGetCredentials() {
- TaskRepository taskRepository = new TaskRepository("kind", "http://url");
- taskRepository.flushAuthenticationCredentials();
- TaskRepositoryLocation location = new TaskRepositoryLocation(taskRepository);
- assertNull(location.getCredentials(AuthenticationType.HTTP));
-
- taskRepository.setCredentials(AuthenticationType.HTTP, new AuthenticationCredentials("user", "pwd"), true);
- AuthenticationCredentials credentials = location.getCredentials(AuthenticationType.HTTP);
- assertNotNull(credentials);
- assertEquals("user", credentials.getUserName());
- assertEquals("pwd", credentials.getPassword());
-
- assertNull(location.getCredentials(AuthenticationType.PROXY));
-
- taskRepository.setCredentials(AuthenticationType.PROXY, new AuthenticationCredentials("user2", "pwd2"), true);
- credentials = location.getCredentials(AuthenticationType.PROXY);
- assertNotNull(credentials);
- assertEquals("user2", credentials.getUserName());
- assertEquals("pwd2", credentials.getPassword());
- }
-
- public void testGetProxyForHost() {
- TaskRepository taskRepository = new TaskRepository("kind", "http://url");
- TaskRepositoryLocation location = new TaskRepositoryLocation(taskRepository);
-
- assertTrue(taskRepository.isDefaultProxyEnabled());
- assertEquals(null, location.getProxyForHost("localhost", IProxyData.HTTP_PROXY_TYPE));
-
- taskRepository.setProperty(TaskRepository.PROXY_USEDEFAULT, "false");
- assertFalse(taskRepository.isDefaultProxyEnabled());
- assertEquals(Proxy.NO_PROXY, location.getProxyForHost("localhost", IProxyData.HTTP_PROXY_TYPE));
-
- taskRepository.setProperty(TaskRepository.PROXY_HOSTNAME, "host");
- taskRepository.setProperty(TaskRepository.PROXY_PORT, "1234");
- Proxy proxy = location.getProxyForHost("localhost", IProxyData.HTTP_PROXY_TYPE);
- assertNotNull(proxy);
- assertEquals(new InetSocketAddress("host", 1234), proxy.address());
-
- taskRepository.setProxyAuthenticationCredentials("user", "pwd");
- proxy = location.getProxyForHost("localhost", IProxyData.HTTP_PROXY_TYPE);
- assertNotNull(proxy);
- assertEquals(new InetSocketAddress("host", 1234), proxy.address());
-
- assertTrue(proxy instanceof AuthenticatedProxy);
- assertEquals("user", ((AuthenticatedProxy) proxy).getUserName());
- assertEquals("pwd", ((AuthenticatedProxy) proxy).getPassword());
- }
-
- public void testRequestCredentials() {
- TaskRepository taskRepository = new TaskRepository("kind", "http://url");
- TaskRepositoryLocation location = new TaskRepositoryLocation(taskRepository);
- try {
- location.requestCredentials(AuthenticationType.REPOSITORY, null, null);
- fail("Expected UnsupportedRequestException");
- } catch (UnsupportedRequestException expected) {
- }
- }
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositoryManagerTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositoryManagerTest.java
deleted file mode 100644
index daa995d69..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositoryManagerTest.java
+++ /dev/null
@@ -1,238 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import java.net.MalformedURLException;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.commons.net.AuthenticationCredentials;
-import org.eclipse.mylyn.commons.net.AuthenticationType;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryTaskHandleUtil;
-import org.eclipse.mylyn.internal.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractLegacyRepositoryConnector;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.tests.connector.MockRepositoryConnector;
-import org.eclipse.mylyn.tasks.tests.connector.MockRepositoryQuery;
-import org.eclipse.mylyn.tasks.tests.connector.MockTask;
-
-/**
- * @author Mik Kersten
- * @author Rob Elves
- */
-public class TaskRepositoryManagerTest extends TestCase {
-
- private static final String DEFAULT_KIND = MockRepositoryConnector.REPOSITORY_KIND;
-
- private static final String DEFAULT_URL = "http://eclipse.org";
-
- private static final String ANOTHER_URL = "http://codehaus.org";
-
- private TaskRepositoryManager manager;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- manager = TasksUiPlugin.getRepositoryManager();
- assertNotNull(manager);
- manager.clearRepositories(TasksUiPlugin.getDefault().getRepositoriesFilePath());
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
- if (manager != null) {
- manager.clearRepositories(TasksUiPlugin.getDefault().getRepositoriesFilePath());
- }
- }
-
- public void testRepositoryWithSlash() throws MalformedURLException {
-
- TaskRepository repository1 = new TaskRepository("bugzilla", "http://repository1/");
- manager.addRepository(repository1);
- assertNotNull(manager.getRepository("http://repository1"));
- assertNotNull(manager.getRepository("http://repository1/"));
-
- assertNotNull(manager.getRepository("bugzilla", "http://repository1"));
- assertNotNull(manager.getRepository("bugzilla", "http://repository1/"));
-
- }
-
- public void testQueryDeletion() {
- TaskRepository repository = new TaskRepository(MockRepositoryConnector.REPOSITORY_KIND,
- MockRepositoryConnector.REPOSITORY_URL);
- TasksUiPlugin.getRepositoryManager().addRepository(repository);
-
- MockTask task = new MockTask("1");
- task.setLastReadTimeStamp("now");
- MockRepositoryQuery query = new MockRepositoryQuery("Test");
- TasksUiPlugin.getTaskList().addQuery(query);
- TasksUiPlugin.getTaskList().addTask(task, query);
-
- assertNotNull(TasksUiPlugin.getTaskList().getTask(task.getHandleIdentifier()));
- TasksUiPlugin.getTaskList().deleteQuery(query);
- ITask task2 = TasksUiPlugin.getTaskList().getTask(task.getHandleIdentifier());
- assertNotNull(task2);
- assertEquals(1, ((AbstractTask) task2).getParentContainers().size());
-
- }
-
- public void testHandles() {
- String url = "http://foo.bar";
- String id = "123";
- String handle = RepositoryTaskHandleUtil.getHandle(url, id);
- assertEquals(url, RepositoryTaskHandleUtil.getRepositoryUrl(handle));
- assertEquals(id, RepositoryTaskHandleUtil.getTaskId(handle));
-// assertEquals(123, AbstractTask.getTaskIdAsInt(handle));
- }
-
- public void testMultipleNotAdded() throws MalformedURLException {
- TaskRepository repository = new TaskRepository(DEFAULT_KIND, DEFAULT_URL);
- manager.addRepository(repository);
- TaskRepository repository2 = new TaskRepository(DEFAULT_KIND, DEFAULT_URL);
- manager.addRepository(repository2);
- assertEquals(1, manager.getAllRepositories().size());
- }
-
- public void testGet() throws MalformedURLException {
- assertEquals("", TasksUiPlugin.getDefault().getPreferenceStore().getString(
- TaskRepositoryManager.PREF_REPOSITORIES));
-
- TaskRepository repository = new TaskRepository(DEFAULT_KIND, DEFAULT_URL);
- manager.addRepository(repository);
- assertEquals(repository, manager.getRepository(DEFAULT_KIND, DEFAULT_URL));
- assertNull(manager.getRepository(DEFAULT_KIND, "foo"));
- assertNull(manager.getRepository("foo", DEFAULT_URL));
- }
-
- public void testConnectorAddition() {
- AbstractLegacyRepositoryConnector connector = new MockRepositoryConnector();
- manager.addRepositoryConnector(connector);
- assertNotNull(manager.getRepositoryConnector(connector.getConnectorKind()));
- }
-
- public void testRepositoryPersistance() throws MalformedURLException {
- TaskRepository repository1 = new TaskRepository("bugzilla", "http://bugzilla");
- TaskRepository repository2 = new TaskRepository("jira", "http://jira");
- TaskRepository repository3 = new TaskRepository("local", "http://local");
- manager.addRepository(repository3);
- manager.addRepository(repository1);
- manager.addRepository(repository2);
- TasksUiPlugin.getDefault();
- TasksUiPlugin.getExternalizationManager().reLoad();
- //manager.readRepositories(TasksUiPlugin.getDefault().getRepositoriesFilePath());
-
- if (manager.getRepositoryConnector("bugzilla") != null) {
- assertTrue(manager.getAllRepositories().contains(repository2));
- }
- if (manager.getRepositoryConnector("jira") != null) {
- assertTrue(manager.getAllRepositories().contains(repository2));
- }
- assertTrue(manager.getAllRepositories().contains(repository3));
- }
-
- public void testRepositoryAttributePersistance() throws MalformedURLException {
- assertEquals("", TasksUiPlugin.getDefault().getPreferenceStore().getString(
- TaskRepositoryManager.PREF_REPOSITORIES));
-
- String version = "123";
- String encoding = "UTF-16";
- String fakeTimeZone = "nowhere";
- Date now = new Date();
- String dateString = now.toString();
-
- TaskRepository repository1 = new TaskRepository("local", "http://bugzilla");
- repository1.setVersion(version);
- repository1.setCharacterEncoding(encoding);
- repository1.setTimeZoneId(fakeTimeZone);
- repository1.setSynchronizationTimeStamp(dateString);
- manager.addRepository(repository1);
- TasksUiPlugin.getDefault();
- TasksUiPlugin.getExternalizationManager().reLoad();
- //manager.readRepositories(TasksUiPlugin.getDefault().getRepositoriesFilePath());
- TaskRepository temp = manager.getRepository(repository1.getConnectorKind(), repository1.getRepositoryUrl());
- assertNotNull(temp);
- assertEquals(version, temp.getVersion());
- assertEquals(encoding, temp.getCharacterEncoding());
- assertEquals(fakeTimeZone, temp.getTimeZoneId());
- assertEquals(dateString, temp.getSynchronizationTimeStamp());
-
- }
-
- public void testRepositoryPersistanceAfterDelete() throws MalformedURLException {
-
- TaskRepository repository = new TaskRepository(DEFAULT_KIND, DEFAULT_URL);
- manager.addRepository(repository);
- assertNotNull(manager.getRepository(repository.getConnectorKind(), repository.getRepositoryUrl()));
-
- TaskRepository repository2 = new TaskRepository(DEFAULT_KIND, ANOTHER_URL);
- manager.addRepository(repository2);
- assertNotNull(manager.getRepository(repository2.getConnectorKind(), repository2.getRepositoryUrl()));
-
- manager.removeRepository(repository2, TasksUiPlugin.getDefault().getRepositoriesFilePath());
-
- assertNull(manager.getRepository(repository2.getConnectorKind(), repository2.getRepositoryUrl()));
- }
-
- public void testRepositoryWithUnnownUrlHandler() {
- TaskRepository repository = new TaskRepository("eclipse.technology.mylar",
- "abc://news.eclipse.org/eclipse.technology.mylar");
-
- repository.setCredentials(AuthenticationType.REPOSITORY, new AuthenticationCredentials("testUser",
- "testPassword"), true);
-
- AuthenticationCredentials credentials = repository.getCredentials(AuthenticationType.REPOSITORY);
- assertNotNull(credentials);
- assertEquals("testUser", credentials.getUserName());
- assertEquals("testPassword", credentials.getPassword());
- }
-
- public void testRepositoryWithCustomAttributes() throws Exception {
-
- // Note: if a connector doesn't exist the associated repositories are not loaded (orphaned)
- // causing this test to fail.
- AbstractLegacyRepositoryConnector connector = new MockRepositoryConnector();
- manager.addRepositoryConnector(connector);
-
- TaskRepository repository = new TaskRepository(MockRepositoryConnector.REPOSITORY_KIND,
- "http://jroller.com/page/eu");
- repository.setProperty("owner", "euxx");
- manager.addRepository(repository);
- TasksUiPlugin.getDefault();
- TasksUiPlugin.getExternalizationManager().reLoad();
- //manager.readRepositories(TasksUiPlugin.getDefault().getRepositoriesFilePath());
-
- TaskRepository temp = manager.getRepository(repository.getConnectorKind(), repository.getRepositoryUrl());
- assertNotNull(temp);
- assertEquals("euxx", temp.getProperty("owner"));
- }
-
- public void testRepositoryPersistanceSameUrl() throws MalformedURLException {
- TaskRepository repository1 = new TaskRepository("local", "http://repository");
- TaskRepository repository2 = new TaskRepository("web", "http://repository");
- manager.addRepository(repository1);
- manager.addRepository(repository2);
- assertEquals(2, manager.getAllRepositories().size());
-
- List<TaskRepository> repositoryList = new ArrayList<TaskRepository>();
- repositoryList.add(repository2);
- repositoryList.add(repository1);
- //manager.readRepositories(TasksUiPlugin.getDefault().getRepositoriesFilePath());
- TasksUiPlugin.getDefault();
- TasksUiPlugin.getExternalizationManager().reLoad();
- assertEquals("got: " + manager.getAllRepositories(), 2, manager.getAllRepositories().size());
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositorySorterTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositorySorterTest.java
deleted file mode 100644
index fa6bef132..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositorySorterTest.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.internal.tasks.core.IRepositoryConstants;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskRepositoriesSorter;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-/**
- * @author Mik Kersten
- */
-public class TaskRepositorySorterTest extends TestCase {
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- public void testCategorySorting() {
- TaskRepositoriesSorter sorter = new TaskRepositoriesSorter();
- TaskRepository t1 = new TaskRepository("t1", "http://a");
- TaskRepository t2 = new TaskRepository("t2", "http://a");
- TaskRepository t3 = new TaskRepository("t3", "http://a");
- assertTrue(sorter.compare(null, t1, t2) < 0);
- assertTrue(sorter.compare(null, t3, t1) > 0);
- }
-
- public void testUrlSorting() {
- TaskRepositoriesSorter sorter = new TaskRepositoriesSorter();
- TaskRepository t1 = new TaskRepository("t", "http://a");
- TaskRepository t2 = new TaskRepository("t", "http://b");
- TaskRepository t3 = new TaskRepository("t", "http://c");
- assertTrue(sorter.compare(null, t1, t2) < 0);
- assertTrue(sorter.compare(null, t3, t1) > 0);
- }
-
- public void testLabelSorting() {
- TaskRepositoriesSorter sorter = new TaskRepositoriesSorter();
- TaskRepository t1 = new TaskRepository("kind", "http://a");
- t1.setProperty(IRepositoryConstants.PROPERTY_LABEL, "a");
- TaskRepository t2 = new TaskRepository("kind", "http://a");
- t2.setProperty(IRepositoryConstants.PROPERTY_LABEL, "b");
- TaskRepository t3 = new TaskRepository("kind", "http://a");
- t3.setProperty(IRepositoryConstants.PROPERTY_LABEL, "c");
-
- assertTrue(sorter.compare(null, t1, t2) < 0);
- assertTrue(sorter.compare(null, t3, t1) > 0);
- }
-
- public void testLabelVsNoLabel() {
- TaskRepositoriesSorter sorter = new TaskRepositoriesSorter();
- TaskRepository t1 = new TaskRepository("kind", "http://a");
- t1.setProperty(IRepositoryConstants.PROPERTY_LABEL, "a");
- TaskRepository t2 = new TaskRepository("kind", "http://a");
-
- assertTrue(sorter.compare(null, t1, t2) < 0);
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositoryTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositoryTest.java
deleted file mode 100644
index a7ce4cf6d..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositoryTest.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import java.net.URL;
-import java.util.Date;
-import java.util.Map;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.mylyn.commons.net.AuthenticationCredentials;
-import org.eclipse.mylyn.commons.net.AuthenticationType;
-import org.eclipse.mylyn.internal.tasks.core.IRepositoryConstants;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-/**
- * @author Mik Kersten
- */
-public class TaskRepositoryTest extends TestCase {
-
- public void testLabel() {
- TaskRepository repository = new TaskRepository("kind", "http://foo.bar");
- assertTrue(repository.getRepositoryLabel().equals(repository.getRepositoryUrl()));
-
- repository.setProperty(IRepositoryConstants.PROPERTY_LABEL, "label");
- assertTrue(repository.getRepositoryLabel().equals("label"));
- }
-
- public void testPassword() throws Exception {
- password(AuthenticationType.REPOSITORY);
-
- // test old API
- TaskRepository taskRepository = new TaskRepository("kind", "url");
- taskRepository.setCredentials(AuthenticationType.REPOSITORY, new AuthenticationCredentials("user", "pwd"), true);
- assertEquals("user", taskRepository.getUserName());
- assertEquals("pwd", taskRepository.getPassword());
-
- assertEquals(null, taskRepository.getHttpUser());
- assertEquals(null, taskRepository.getHttpPassword());
- }
-
- public void testHttpPassword() throws Exception {
- password(AuthenticationType.HTTP);
-
- TaskRepository taskRepository = new TaskRepository("kind", "url");
- taskRepository.setCredentials(AuthenticationType.HTTP, new AuthenticationCredentials("user", "pwd"), true);
- assertEquals("user", taskRepository.getHttpUser());
- assertEquals("pwd", taskRepository.getHttpPassword());
- }
-
- public void testProxyPassword() throws Exception {
- password(AuthenticationType.PROXY);
-
- TaskRepository taskRepository = new TaskRepository("kind", "url");
- taskRepository.setCredentials(AuthenticationType.PROXY, new AuthenticationCredentials("user", "pwd"), false);
- assertEquals("user", taskRepository.getProxyUsername());
- assertEquals("pwd", taskRepository.getProxyPassword());
- }
-
- public void testFlushCredentials() throws Exception {
- TaskRepository taskRepository = new TaskRepository("kind", "url");
- taskRepository.setCredentials(AuthenticationType.REPOSITORY, new AuthenticationCredentials("user", "pwd"),
- false);
- taskRepository.setCredentials(AuthenticationType.HTTP, new AuthenticationCredentials("user", "pwd"), true);
- taskRepository.flushAuthenticationCredentials();
- assertEquals(null, taskRepository.getUserName());
- assertEquals(null, taskRepository.getPassword());
- assertEquals(null, taskRepository.getHttpUser());
- assertEquals(null, taskRepository.getHttpPassword());
- assertNull(taskRepository.getCredentials(AuthenticationType.REPOSITORY));
- assertNull(taskRepository.getCredentials(AuthenticationType.HTTP));
- assertNull(taskRepository.getCredentials(AuthenticationType.PROXY));
- }
-
- public void testPlatformIsRunning() {
- assertTrue(Platform.isRunning());
- }
-
- // TODO e3.4 move to new api
- @SuppressWarnings("deprecation")
- public void password(AuthenticationType authType) throws Exception {
- URL url = new URL("http://url");
- TaskRepository taskRepository = new TaskRepository("kind", url.toString());
- try {
- assertNull(taskRepository.getCredentials(authType));
- assertTrue(taskRepository.getSavePassword(authType));
-
- taskRepository.setCredentials(authType, new AuthenticationCredentials("user", "pwd"), true);
- AuthenticationCredentials credentials = taskRepository.getCredentials(authType);
- assertNotNull(credentials);
- assertEquals("user", credentials.getUserName());
- assertEquals("pwd", credentials.getPassword());
-
- Map<?, ?> map = Platform.getAuthorizationInfo(url, "", "Basic");
- assertNotNull(map);
- assertTrue(map.containsValue("user"));
- assertTrue(map.containsValue("pwd"));
-
- // test not saving password
- taskRepository.setCredentials(authType, new AuthenticationCredentials("user1", "pwd1"), false);
- assertFalse(taskRepository.getSavePassword(authType));
- credentials = taskRepository.getCredentials(authType);
- assertNotNull(credentials);
- assertEquals("user1", credentials.getUserName());
- assertEquals("pwd1", credentials.getPassword());
-
- // make sure old passwords are not in the key ring
- map = Platform.getAuthorizationInfo(url, "", "Basic");
- assertNotNull(map);
- assertTrue(map.containsValue("user1"));
- assertFalse(map.containsValue("pwd1"));
- assertFalse(map.containsValue("user"));
- assertFalse(map.containsValue("pwd"));
-
- taskRepository.setCredentials(authType, new AuthenticationCredentials("user2", "pwd2"), true);
- assertTrue(taskRepository.getSavePassword(authType));
- credentials = taskRepository.getCredentials(authType);
- assertNotNull(credentials);
- assertEquals("user2", credentials.getUserName());
- assertEquals("pwd2", credentials.getPassword());
- } finally {
- taskRepository.flushAuthenticationCredentials();
- }
- }
-
- public void testConfigUpdateStoring() throws Exception {
- URL url = new URL("http://url");
- TaskRepository taskRepository = new TaskRepository("kind", url.toString());
- Date stamp = taskRepository.getConfigurationDate();
- assertNull("unset configuration date returns null", stamp);
- stamp = new Date();
- stamp.setTime(stamp.getTime() - 35000L);
-
- taskRepository.setConfigurationDate(stamp);
- assertEquals("Time stamp set", stamp.getTime(), taskRepository.getConfigurationDate().getTime());
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskTest.java
deleted file mode 100644
index 68f4c2024..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskTest.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.LocalTask;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
-
-/**
- * @author Mik Kersten
- * @author Steffen Pingel
- */
-public class TaskTest extends TestCase {
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- public void testUrl() {
- AbstractTask task = new LocalTask("handle", "label");
- task.setUrl("http://eclipse.org/mylyn/doc");
- assertTrue(TasksUiInternal.isValidUrl(task.getUrl()));
-
- task.setUrl("http://");
- assertFalse(TasksUiInternal.isValidUrl(task.getUrl()));
-
- task.setUrl("https://");
- assertFalse(TasksUiInternal.isValidUrl(task.getUrl()));
-
- task.setUrl("");
- assertFalse(TasksUiInternal.isValidUrl(task.getUrl()));
-
- task.setUrl(null);
- assertFalse(TasksUiInternal.isValidUrl(task.getUrl()));
- }
-
- public void testPriorityNeverNull() {
- ITask task = new LocalTask("handle", "label");
- assertNotNull(task.getPriority());
-
- PriorityLevel def = PriorityLevel.getDefault();
- assertNotNull(def);
- assertEquals(def, PriorityLevel.fromDescription("garbage"));
- assertEquals(def, PriorityLevel.fromString("garbage"));
- }
-
- public void testPriorityLevelFromLevel() {
- assertEquals(PriorityLevel.P1, PriorityLevel.fromLevel(Integer.MIN_VALUE));
- assertEquals(PriorityLevel.P1, PriorityLevel.fromLevel(-1));
- assertEquals(PriorityLevel.P1, PriorityLevel.fromLevel(0));
- assertEquals(PriorityLevel.P1, PriorityLevel.fromLevel(1));
- assertEquals(PriorityLevel.P2, PriorityLevel.fromLevel(2));
- assertEquals(PriorityLevel.P3, PriorityLevel.fromLevel(3));
- assertEquals(PriorityLevel.P4, PriorityLevel.fromLevel(4));
- assertEquals(PriorityLevel.P5, PriorityLevel.fromLevel(5));
- assertEquals(PriorityLevel.P5, PriorityLevel.fromLevel(6));
- assertEquals(PriorityLevel.P5, PriorityLevel.fromLevel(Integer.MAX_VALUE));
- }
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskTestUtil.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskTestUtil.java
deleted file mode 100644
index 540923ab4..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskTestUtil.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.URL;
-
-import org.eclipse.core.runtime.FileLocator;
-
-/**
- * @author Mik Kersten
- */
-public class TaskTestUtil {
-
- public static File getLocalFile(String path) {
- try {
- URL installURL = TasksTestsPlugin.getDefault().getBundle().getEntry(path);
- URL localURL = FileLocator.toFileURL(installURL);
- return new File(localURL.getFile());
- } catch (IOException e) {
- return null;
- }
- }
-
- public static File getFile(String path) throws IOException {
- if (TasksTestsPlugin.getDefault() != null) {
- URL installURL = TasksTestsPlugin.getDefault().getBundle().getEntry(path);
- URL localURL = FileLocator.toFileURL(installURL);
- return new File(localURL.getFile());
- } else {
- URL localURL = TaskTestUtil.class.getResource("");
- return new File(localURL.getFile() + "../../../../../../" + path);
- }
- }
-
- /**
- * Adaptred from Java Developers' almanac
- */
- public static void copy(File source, File dest) throws IOException {
- InputStream in = new FileInputStream(source);
- OutputStream out = new FileOutputStream(dest);
- byte[] buf = new byte[1024];
- int len;
- while ((len = in.read(buf)) > 0) {
- out.write(buf, 0, len);
- }
- in.close();
- out.close();
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskWorkingSetTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskWorkingSetTest.java
deleted file mode 100644
index 744b37a06..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskWorkingSetTest.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.Arrays;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.internal.resources.ProjectDescription;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.mylyn.internal.tasks.core.ITaskList;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.workingsets.TaskWorkingSetUpdater;
-import org.eclipse.mylyn.resources.tests.ResourceTestUtil;
-import org.eclipse.mylyn.tasks.tests.connector.MockRepositoryQuery;
-import org.eclipse.ui.IWorkingSet;
-import org.eclipse.ui.IWorkingSetManager;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-import org.eclipse.ui.internal.Workbench;
-
-public class TaskWorkingSetTest extends TestCase {
-
- private IProject project;
-
- private IWorkspaceRoot root;
-
- private IWorkingSet workingSet;
-
- private IWorkingSetManager workingSetManager;
-
- @Override
- protected void setUp() throws Exception {
- workingSetManager = Workbench.getInstance().getWorkingSetManager();
- root = ResourcesPlugin.getWorkspace().getRoot();
- }
-
- @Override
- protected void tearDown() throws Exception {
- if (workingSet != null) {
- workingSetManager.removeWorkingSet(workingSet);
- }
-
- if (project != null) {
- ResourceTestUtil.deleteProject(project);
- }
- }
-
- public void testDeleteQuery() {
- MockRepositoryQuery query = new MockRepositoryQuery("description");
- ITaskList taskList = TasksUiPlugin.getTaskList();
- taskList.addQuery(query);
- workingSet = createWorkingSet(query);
- assertTrue(Arrays.asList(workingSet.getElements()).contains(query));
- TasksUiPlugin.getTaskList().deleteQuery(query);
- assertFalse(Arrays.asList(workingSet.getElements()).contains(query));
- }
-
- public void testRenameQuery() {
- MockRepositoryQuery query = new MockRepositoryQuery("description");
- ITaskList taskList = TasksUiPlugin.getTaskList();
- taskList.addQuery(query);
- workingSet = createWorkingSet(query);
- assertTrue(workingSet.getElements().length == 1);
- IAdaptable[] elements = workingSet.getElements();
- assertTrue(elements.length == 1);
- assertTrue(elements[0] instanceof MockRepositoryQuery);
- assertTrue(((MockRepositoryQuery) elements[0]).getHandleIdentifier().equals("description"));
- assertTrue(Arrays.asList(workingSet.getElements()).contains(query));
-
- query.setHandleIdentifier("Test");
- assertTrue(workingSet.getElements().length == 1);
- elements = workingSet.getElements();
- assertTrue(elements.length == 1);
- assertTrue(elements[0] instanceof MockRepositoryQuery);
- assertTrue(((MockRepositoryQuery) elements[0]).getHandleIdentifier().equals("Test"));
- assertTrue(Arrays.asList(workingSet.getElements()).contains(query));
- }
-
- // XXX see bug 212962
-// public void testRenameQuery() {
-// MockRepositoryQuery query = new MockRepositoryQuery("description");
-// TaskList taskList = TasksUiPlugin.getTaskList();
-// taskList.addQuery(query);
-// workingSet = createWorkingSet(query);
-//
-// TasksUiPlugin.getTaskList().deleteQuery(query);
-// query = new MockRepositoryQuery("newDescription");
-// TasksUiPlugin.getTaskList().addQuery(query);
-// assertTrue(Arrays.asList(workingSet.getElements()).contains(query));
-// }
-//
-// public void testEditQuery() {
-// MockRepositoryQuery query = new MockRepositoryQuery("description");
-// TaskList taskList = TasksUiPlugin.getTaskList();
-// taskList.addQuery(query);
-// workingSet = createWorkingSet(query);
-//
-// TasksUiPlugin.getTaskList().deleteQuery(query);
-// TasksUiPlugin.getTaskList().addQuery(query);
-// assertTrue(Arrays.asList(workingSet.getElements()).contains(query));
-// }
-
- public void testRenameProject() throws Exception {
- createProject("Test Rename");
- workingSet = createWorkingSet(project);
-
- WorkspaceModifyOperation op = new WorkspaceModifyOperation() {
- @Override
- protected void execute(IProgressMonitor monitor) throws CoreException, InvocationTargetException,
- InterruptedException {
- IProjectDescription description = new ProjectDescription();
- description.setName("New Name");
- project.move(description, true, new NullProgressMonitor());
- }
- };
- op.run(new NullProgressMonitor());
-
- IProject oldProject = root.getProject("Test Rename");
- IProject newProject = root.getProject("New Name");
- assertFalse(Arrays.asList(workingSet.getElements()).contains(oldProject));
- assertTrue(Arrays.asList(workingSet.getElements()).contains(newProject));
- }
-
- private void createProject(String name) throws CoreException {
- project = root.getProject(name);
- project.create(null);
- project.open(null);
- }
-
- private IWorkingSet createWorkingSet(IAdaptable element) {
- IWorkingSet workingSet = workingSetManager.createWorkingSet("Task Working Set", new IAdaptable[] { element });
- workingSet.setId(TaskWorkingSetUpdater.ID_TASK_WORKING_SET);
- assertTrue(Arrays.asList(workingSet.getElements()).contains(element));
- workingSetManager.addWorkingSet(workingSet);
- return workingSet;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TasksTestsPlugin.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TasksTestsPlugin.java
deleted file mode 100644
index 5d8612086..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TasksTestsPlugin.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.tasks.tests;
-
-import org.eclipse.core.runtime.Plugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class TasksTestsPlugin extends Plugin {
- // The shared instance.
- private static TasksTestsPlugin plugin;
-
- /**
- * The constructor.
- */
- public TasksTestsPlugin() {
- super();
- plugin = this;
- }
-
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- @Override
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- plugin = null;
- }
-
- /**
- * Returns the shared instance.
- */
- public static TasksTestsPlugin getDefault() {
- return plugin;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TasksUiUtilTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TasksUiUtilTest.java
deleted file mode 100644
index d3b527c4e..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TasksUiUtilTest.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import java.util.Date;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.TaskCategory;
-import org.eclipse.mylyn.internal.tasks.ui.TaskListManager;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.internal.browser.WebBrowserEditor;
-import org.eclipse.ui.internal.browser.WebBrowserEditorInput;
-
-/**
- * @author Shawn Minto
- */
-public class TasksUiUtilTest extends TestCase {
-
- private TaskListManager manager;
-
- private TaskCategory cat1;
-
- private AbstractTask cat1task1;
-
- private AbstractTask cat1task2;
-
- private IWorkbenchPage activePage;
-
- @Override
- public void setUp() throws Exception {
- manager = TasksUiPlugin.getTaskListManager();
-
- TasksUiPlugin.getRepositoryManager().clearRepositories(TasksUiPlugin.getDefault().getRepositoriesFilePath());
- manager.resetTaskList();
-
- TasksUiPlugin.getDefault().getLocalTaskRepository();
-
- cat1 = new TaskCategory("First Category");
- manager.getTaskList().addCategory(cat1);
-
- cat1task1 = TasksUiInternal.createNewLocalTask("task 1");
- cat1task1.setPriority(PriorityLevel.P1.toString());
- cat1task1.setCompletionDate(new Date());
- manager.getTaskList().addTask(cat1task1, cat1);
-
- cat1task2 = TasksUiInternal.createNewLocalTask("task 2");
- cat1task2.setPriority(PriorityLevel.P2.toString());
- manager.getTaskList().addTask(cat1task2, cat1);
-
- assertEquals(cat1.getChildren().size(), 2);
-
- activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- activePage.closeAllEditors(false);
- assertEquals(0, activePage.getEditorReferences().length);
- }
-
- @Override
- public void tearDown() throws Exception {
- activePage.closeAllEditors(false);
- }
-
- public void testOpenTaskFromTask() {
- TasksUiUtil.openTask(cat1task1);
- assertEquals(1, activePage.getEditorReferences().length);
- assertTrue(activePage.getEditorReferences()[0].getEditor(true) instanceof TaskEditor);
-
- TasksUiUtil.openTask(cat1task2);
- assertEquals(2, activePage.getEditorReferences().length);
- assertTrue(activePage.getEditorReferences()[0].getEditor(true) instanceof TaskEditor);
- assertTrue(activePage.getEditorReferences()[1].getEditor(true) instanceof TaskEditor);
- }
-
- public void testOpenTaskFromString() {
- TasksUiUtil.openTask((String) null);
- assertEquals(1, activePage.getEditorReferences().length);
- assertTrue(activePage.getEditorReferences()[0].getEditor(true) instanceof WebBrowserEditor);
- }
-
- public void testOpenUrl() {
- TasksUiUtil.openUrl(null);
- assertEquals(1, activePage.getEditorReferences().length);
- IEditorPart editor = activePage.getEditorReferences()[0].getEditor(true);
- assertTrue(editor instanceof WebBrowserEditor);
- assertTrue(editor.getEditorInput() instanceof WebBrowserEditorInput);
- assertEquals(null, ((WebBrowserEditorInput) editor.getEditorInput()).getURL());
-
- TasksUiUtil.openUrl("http://eclipse.org/mylyn");
- assertEquals(2, activePage.getEditorReferences().length);
- editor = activePage.getEditorReferences()[0].getEditor(true);
- assertTrue(editor instanceof WebBrowserEditor);
- assertEquals(null, ((WebBrowserEditorInput) editor.getEditorInput()).getURL());
-
- IEditorPart editor2 = activePage.getEditorReferences()[1].getEditor(true);
- assertTrue(editor2 instanceof WebBrowserEditor);
- assertNotNull(((WebBrowserEditorInput) editor2.getEditorInput()).getURL());
- assertEquals("http://eclipse.org/mylyn", ((WebBrowserEditorInput) editor2.getEditorInput()).getURL().toString());
- }
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockAttachmentHandler.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockAttachmentHandler.java
deleted file mode 100644
index 8ca98aab6..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockAttachmentHandler.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests.connector;
-
-import java.io.ByteArrayInputStream;
-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.mylyn.internal.tasks.core.deprecated.AbstractAttachmentHandler;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.ITaskAttachment;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryAttachment;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-/**
- * @author Steffen Pingel
- */
-public class MockAttachmentHandler extends AbstractAttachmentHandler {
-
- private byte[] data;
-
- @Override
- public boolean canDeprecate(TaskRepository repository, RepositoryAttachment attachment) {
- // ignore
- return false;
- }
-
- @Override
- public boolean canDownloadAttachment(TaskRepository repository, ITask task) {
- // ignore
- return true;
- }
-
- @Override
- public boolean canUploadAttachment(TaskRepository repository, ITask task) {
- // ignore
- return true;
- }
-
- @Override
- public void downloadAttachment(TaskRepository repository, RepositoryAttachment attachment, OutputStream target,
- IProgressMonitor monitor) throws CoreException {
- try {
- target.write(data);
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
- }
-
- @Override
- public InputStream getAttachmentAsStream(TaskRepository repository, RepositoryAttachment attachment,
- IProgressMonitor monitor) throws CoreException {
- // ignore
- return new ByteArrayInputStream(data);
- }
-
- @Override
- public void updateAttachment(TaskRepository repository, RepositoryAttachment attachment) throws CoreException {
- // ignore
- }
-
- @Override
- public void uploadAttachment(TaskRepository repository, ITask task, ITaskAttachment attachment,
- String comment, IProgressMonitor monitor) throws CoreException {
- // ignore
- }
-
- public void setAttachmentData(byte[] data) {
- this.data = data;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockAttributeFactory.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockAttributeFactory.java
deleted file mode 100644
index 6cf70c82f..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockAttributeFactory.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests.connector;
-
-import java.util.Date;
-
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractAttributeFactory;
-
-/**
- * @author Rob Elves
- */
-public class MockAttributeFactory extends AbstractAttributeFactory {
-
- private static final long serialVersionUID = 7713746838934802731L;
-
- @Override
- public boolean isHidden(String key) {
- // ignore
- return false;
- }
-
- @Override
- public String getName(String key) {
- // ignore
- return key;
- }
-
- @Override
- public boolean isReadOnly(String key) {
- // ignore
- return false;
- }
-
- @Override
- public String mapCommonAttributeKey(String key) {
- return key;
- }
-
- @Override
- public Date getDateForAttributeType(String attributeKey, String dateString) {
- // ignore
- return null;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockRepositoryConnector.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockRepositoryConnector.java
deleted file mode 100644
index 79cc6e096..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockRepositoryConnector.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests.connector;
-
-import java.util.Collections;
-import java.util.HashSet;
-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.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractAttachmentHandler;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractAttributeFactory;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractLegacyRepositoryConnector;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractTaskDataHandler;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.RepositoryTemplate;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.data.TaskDataCollector;
-import org.eclipse.mylyn.tasks.core.sync.ISynchronizationSession;
-
-/**
- * @author Mik Kersten
- * @author Rob Elves
- * @author Shawn Minto
- */
-public class MockRepositoryConnector extends AbstractLegacyRepositoryConnector {
-
- public static final String REPOSITORY_KIND = "mock";
-
- public static final String REPOSITORY_URL = "http://mockrepository.test";
-
- private AbstractAttachmentHandler attachmentHandler;
-
- private boolean canQuery = false;
-
- private boolean canCreateNewTask = false;
-
- private boolean canCreateTaskFromKey = false;
-
- public void resetDefaults() {
- canQuery = false;
- canCreateNewTask = false;
- canCreateTaskFromKey = false;
- }
-
- public void setCanCreateNewTask(boolean canCreateNewTask) {
- this.canCreateNewTask = canCreateNewTask;
- }
-
- public void setCanCreateTaskFromKey(boolean canCreateTaskFromKey) {
- this.canCreateTaskFromKey = canCreateTaskFromKey;
- }
-
- public void setCanQuery(boolean canQuery) {
- this.canQuery = canQuery;
- }
-
- @Override
- public boolean canQuery(TaskRepository repository) {
- return canQuery;
- }
-
- @Override
- public boolean canCreateNewTask(TaskRepository repository) {
- return canCreateNewTask;
- }
-
- @Override
- public boolean canCreateTaskFromKey(TaskRepository repository) {
- return canCreateTaskFromKey;
- }
-
- @Override
- public AbstractAttachmentHandler getAttachmentHandler() {
- return attachmentHandler;
- }
-
- @Override
- public String getLabel() {
- return "Mock Repository (for unit tests)";
- }
-
- @Override
- public AbstractTaskDataHandler getLegacyTaskDataHandler() {
- // ignore
- return new AbstractTaskDataHandler() {
-
- @Override
- public AbstractAttributeFactory getAttributeFactory(String repositoryUrl, String repositoryKind,
- String taskKind) {
- // we don't care about the repository information right now
- return new MockAttributeFactory();
- }
-
- @Override
- public RepositoryTaskData getTaskData(TaskRepository repository, String taskId, IProgressMonitor monitor)
- throws CoreException {
- // ignore
- return null;
- }
-
- @Override
- public String postTaskData(TaskRepository repository, RepositoryTaskData taskData, IProgressMonitor monitor)
- throws CoreException {
- // ignore
- return null;
- }
-
- @Override
- public boolean initializeTaskData(TaskRepository repository, RepositoryTaskData data,
- IProgressMonitor monitor) throws CoreException {
- // ignore
- return false;
- }
-
- @Override
- public AbstractAttributeFactory getAttributeFactory(RepositoryTaskData taskData) {
- // ignore
- return new MockAttributeFactory();
- }
-
- @Override
- public Set<String> getSubTaskIds(RepositoryTaskData taskData) {
- return Collections.emptySet();
- }
-
- };
- }
-
- @Override
- public String getConnectorKind() {
- return REPOSITORY_KIND;
- }
-
- @Override
- public String getRepositoryUrlFromTaskUrl(String url) {
- // ignore
- return null;
- }
-
- @Override
- public String getTaskIdFromTaskUrl(String url) {
- // ignore
- return null;
- }
-
- @Override
- public String getTaskUrl(String repositoryUrl, String taskId) {
- return null;
- }
-
- @Override
- public void updateRepositoryConfiguration(TaskRepository repository, IProgressMonitor monitor) throws CoreException {
- // ignore
- }
-
- @Override
- public void updateTaskFromRepository(TaskRepository repository, ITask repositoryTask, IProgressMonitor monitor) {
- // ignore
- }
-
- @Override
- public AbstractTask createTask(String repositoryUrl, String id, String summary) {
- // ignore
- return null;
- }
-
- @Override
- public boolean updateTaskFromTaskData(TaskRepository repository, ITask repositoryTask, RepositoryTaskData taskData) {
- return false;
- }
-
- @Override
- public IStatus performQuery(TaskRepository repository, IRepositoryQuery query,
- TaskDataCollector resultCollector, ISynchronizationSession event, IProgressMonitor monitor) {
- return Status.OK_STATUS;
- }
-
- public void setAttachmentHandler(AbstractAttachmentHandler attachmentHandler) {
- this.attachmentHandler = attachmentHandler;
- }
-
- @Override
- public Set<RepositoryTemplate> getTemplates() {
- Set<RepositoryTemplate> templates = new HashSet<RepositoryTemplate>();
- RepositoryTemplate template = new RepositoryTemplate("Mock Template", REPOSITORY_URL, "utf-8", "1", "new",
- "prefix", "query", "newAccountUrl", false, true);
- templates.add(template);
- return templates;
- }
-
- @Override
- public RepositoryTaskData getLegacyTaskData(TaskRepository repository, String taskId, IProgressMonitor monitor)
- throws CoreException {
- return null;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockRepositoryConnectorUi.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockRepositoryConnectorUi.java
deleted file mode 100644
index e7603c5e3..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockRepositoryConnectorUi.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests.connector;
-
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.ITaskMapping;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.wizards.ITaskRepositoryPage;
-
-/**
- * @author Mik Kersten
- */
-public class MockRepositoryConnectorUi extends AbstractRepositoryConnectorUi {
-
- @Override
- public String getConnectorKind() {
- return "mock";
- }
-
- @Override
- public ITaskRepositoryPage getSettingsPage(TaskRepository taskRepository) {
- // ignore
- return null;
- }
-
- @Override
- public boolean hasSearchPage() {
- return false;
- }
-
- @Override
- public IWizard getQueryWizard(TaskRepository repository, IRepositoryQuery query) {
- // ignore
- return null;
- }
-
- @Override
- public IWizard getNewTaskWizard(TaskRepository taskRepository, ITaskMapping selection) {
- // ignore
- return null;
- }
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockRepositoryQuery.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockRepositoryQuery.java
deleted file mode 100644
index de3368846..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockRepositoryQuery.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests.connector;
-
-import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
-
-/**
- * @author Mik Kersten
- */
-public class MockRepositoryQuery extends RepositoryQuery {
-
- public String MOCK_QUERY_URL = MockRepositoryConnector.REPOSITORY_URL + ".query";
-
- public MockRepositoryQuery(String description) {
- super(description);
- super.setUrl(MOCK_QUERY_URL);
- super.setRepositoryUrl(MockRepositoryConnector.REPOSITORY_URL);
- }
-
- public MockRepositoryQuery(String description, String url) {
- super(description);
- super.setUrl(url);
- }
-
- @Override
- public String getConnectorKind() {
- return "mock";
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockTask.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockTask.java
deleted file mode 100644
index 7de6913a8..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockTask.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests.connector;
-
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-
-/**
- * @author Mik Kersten
- */
-public class MockTask extends AbstractTask {
-
- private String ownerId;
-
- public MockTask(String taskId) {
- super(MockRepositoryConnector.REPOSITORY_URL, taskId, taskId);
- }
-
- public MockTask(String repositoryUrl, String taskId) {
- super(repositoryUrl, taskId, taskId);
- }
-
- public MockTask(String repositoryUrl, String taskId, String summary) {
- super(repositoryUrl, taskId, summary);
- }
-
- @Override
- public String getConnectorKind() {
- return "mock";
- }
-
- @Override
- public void setOwner(String ownerId) {
- this.ownerId = ownerId;
- }
-
- @Override
- public String getOwner() {
- if (ownerId == null) {
- return super.getOwner();
- } else {
- return ownerId;
- }
- }
-
- @Override
- public String toString() {
- return "Mock Task: " + super.getHandleIdentifier();
- }
-
- @Override
- public boolean isLocal() {
- // ignore
- return false;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockTaskListFactory.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockTaskListFactory.java
deleted file mode 100644
index 968488506..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockTaskListFactory.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests.connector;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractTaskListFactory;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.w3c.dom.Element;
-
-/**
- * @author Mik Kersten
- * @author Jevgeni Holodkov
- */
-public class MockTaskListFactory extends AbstractTaskListFactory {
-
- private static final String QUERY_ELEMENT_NAME = "MockQuery";
-
- @Override
- public boolean canCreate(ITask task) {
- return task instanceof MockTask;
- }
-
- @Override
- public boolean canCreate(IRepositoryQuery query) {
- return query instanceof MockRepositoryQuery;
- }
-
- @Override
- public AbstractTask createTask(String repositoryUrl, String taskId, String summary, Element element) {
- MockTask task = new MockTask(repositoryUrl, taskId, summary);
- return task;
- }
-
- @Override
- public String getTaskElementName() {
- return "Mock" + AbstractTaskListFactory.KEY_TASK;
- }
-
- @Override
- public String getQueryElementName(IRepositoryQuery query) {
- return QUERY_ELEMENT_NAME;
- }
-
- @Override
- public RepositoryQuery createQuery(String repositoryUrl, String queryString, String label, Element element) {
- MockRepositoryQuery query = new MockRepositoryQuery(label, queryString);
- query.setRepositoryUrl(repositoryUrl);
- return query;
- }
-
- @Override
- public Set<String> getQueryElementNames() {
- Set<String> names = new HashSet<String>();
- names.add(QUERY_ELEMENT_NAME);
- return names;
- }
-
-// private static final String KEY_MOCK = "Mock";
-//
-// @Override
-// public boolean canCreateElementFor(AbstractRepositoryQuery query) {
-// return query instanceof MockRepositoryQuery;
-// }
-//
-// @Override
-// public boolean canCreateElementFor(AbstractTask task) {
-// return task instanceof MockRepositoryTask;
-// }
-
-// @Override
-// public boolean canCreateElementFor(AbstractQueryHit queryHit) {
-// return queryHit instanceof AbstractQueryHit;
-// }
-
-// @Override
-// public boolean canReadCategory(Node node) {
-// return false;
-// }
-//
-// @Override
-// public boolean canReadQuery(Node node) {
-// return false;
-// }
-//
-// @Override
-// public boolean canReadQueryHit(Node node) {
-// return false;
-// }
-
-// @Override
-// public String getTaskTagName() {
-// return KEY_MOCK;
-// }
-//
-// @Override
-// public AbstractTask createTask(String repositoryUrl, String taskId, String summary, Element element, TaskList taskList, AbstractTaskContainer category, AbstractTask parent)
-// throws TaskExternalizationException {
-// MockRepositoryTask task = new MockRepositoryTask(repositoryUrl, taskId, summary);
-// return task;
-// }
-
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/data/TaskDataExternalizerTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/data/TaskDataExternalizerTest.java
deleted file mode 100644
index 4b33acf2c..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/data/TaskDataExternalizerTest.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests.data;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.util.zip.ZipInputStream;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.internal.tasks.core.data.TaskDataExternalizer;
-import org.eclipse.mylyn.internal.tasks.core.data.TaskDataState;
-import org.eclipse.mylyn.tasks.core.data.ITaskDataWorkingCopy;
-import org.eclipse.mylyn.tasks.core.data.TaskData;
-import org.eclipse.mylyn.tasks.core.data.TaskMapper;
-import org.eclipse.mylyn.tasks.tests.TaskTestUtil;
-
-@SuppressWarnings("deprecation")
-public class TaskDataExternalizerTest extends TestCase {
-
- TaskDataExternalizer externalizer;
-
- @Override
- protected void setUp() throws Exception {
- externalizer = new TaskDataExternalizer(null);
- }
-
- public void testRead() throws Exception {
- File file = TaskTestUtil.getFile("testdata/taskdata-1.0-bug-219897.zip");
- ZipInputStream in = new ZipInputStream(new FileInputStream(file));
- try {
- in.getNextEntry();
- ITaskDataWorkingCopy state = externalizer.readState(in);
- } finally {
- in.close();
- }
- }
-
- public void testReadWrite() throws Exception {
- File file = TaskTestUtil.getFile("testdata/taskdata-1.0-bug-219897.zip");
- ZipInputStream in = new ZipInputStream(new FileInputStream(file));
- ITaskDataWorkingCopy state;
- try {
- in.getNextEntry();
- state = externalizer.readState(in);
- } finally {
- in.close();
- }
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- externalizer.writeState(out, state);
- System.err.println(new String(out.toByteArray()));
- TaskDataState state2 = externalizer.readState(new ByteArrayInputStream(out.toByteArray()));
- assertEquals(state.getConnectorKind(), state2.getConnectorKind());
- assertEquals(state.getRepositoryUrl(), state2.getRepositoryUrl());
- assertEquals(state.getTaskId(), state2.getTaskId());
-
- assertEquals(state.getRepositoryData().getRoot().toString(), state2.getRepositoryData().getRoot().toString());
-
- }
-
- public void testMapFromLegacy() throws Exception {
- File file = TaskTestUtil.getFile("testdata/taskdata-1.0-bug-219897.zip");
- ZipInputStream in = new ZipInputStream(new FileInputStream(file));
- ITaskDataWorkingCopy state;
- try {
- in.getNextEntry();
- state = externalizer.readState(in);
- } finally {
- in.close();
- }
-
- TaskData taskData = state.getRepositoryData();
- TaskMapper taskScheme = new TaskMapper(taskData);
-
- fail("fixme");
-// RepositoryTaskData legacyData = TaskDataUtil.toLegacyData(taskData, IdentityAttributeFactory.getInstance());
-// assertEquals(taskData.getConnectorKind(), legacyData.getConnectorKind());
-// assertEquals(taskData.getRepositoryUrl(), legacyData.getRepositoryUrl());
-// assertEquals(taskData.getTaskId(), legacyData.getTaskId());
-// assertEquals(taskScheme.getTaskKind(), legacyData.getTaskKind());
-// assertEquals(taskScheme.getComments().length, legacyData.getComments().size());
-// assertEquals(taskScheme.getAttachments().length, legacyData.getAttachments().size());
-//
-// TaskData taskData2 = TaskDataUtil.toTaskData(legacyData, IdentityAttributeMapper.getInstance());
-// assertEquals(taskData.getConnectorKind(), taskData2.getConnectorKind());
-// assertEquals(taskData.getRepositoryUrl(), taskData2.getRepositoryUrl());
-// assertEquals(taskData.getTaskId(), taskData2.getTaskId());
-//
-// assertEquals(taskData.getRoot().toString(), taskData2.getRoot().toString());
- }
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/performance/TaskContainerTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/performance/TaskContainerTest.java
deleted file mode 100644
index 3447a0b53..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/performance/TaskContainerTest.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests.performance;
-
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.tests.connector.MockTask;
-import org.eclipse.test.performance.PerformanceTestCase;
-
-/**
- * @author Steffen Pingel
- */
-public class TaskContainerTest extends PerformanceTestCase {
-
- int counter;
-
- private void addChildren(AbstractTask parent, int[] childCount, int depth) {
- for (int i = 0; i < childCount[depth]; i++) {
- MockTask task = new MockTask("task", ++counter + "");
- parent.internalAddChild(task);
- if (depth < childCount.length - 1) {
- addChildren(task, childCount, depth + 1);
- }
- }
- }
-
- public void testContains() {
- MockTask task = new MockTask(++counter + "");
- addChildren(task, new int[] { 1000, 10, 2 }, 0);
-
- for (int i = 0; i < 10; i++) {
- startMeasuring();
- task.contains("handle");
- stopMeasuring();
- }
-
- commitMeasurements();
- assertPerformance();
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/performance/TaskListPerformanceTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/performance/TaskListPerformanceTest.java
deleted file mode 100644
index 8adee7e46..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/performance/TaskListPerformanceTest.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests.performance;
-
-import java.io.File;
-
-import org.eclipse.mylyn.internal.tasks.core.TaskList;
-import org.eclipse.mylyn.internal.tasks.ui.TaskListManager;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.util.TaskListElementImporter;
-import org.eclipse.mylyn.tasks.tests.TaskTestUtil;
-import org.eclipse.test.performance.PerformanceTestCase;
-
-public class TaskListPerformanceTest extends PerformanceTestCase {
-
- private static final String TASK_LIST_4000 = "testdata/performance/tasklist-4000.xml.zip";
-
- private TaskList taskList;
-
- private TaskListManager taskListManager;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
-
- taskListManager = TasksUiPlugin.getTaskListManager();
- taskList = taskListManager.getTaskList();
- taskList.reset();
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
-
- taskList.reset();
- }
-
- public void testReadTasksWith4000Tasks() {
- final File file = TaskTestUtil.getLocalFile(TASK_LIST_4000);
- final TaskListElementImporter taskListWriter = taskListManager.getTaskListWriter();
-
- for (int i = 0; i < 10; i++) {
- startMeasuring();
- taskListWriter.readTasks(file);
- stopMeasuring();
- taskList.reset();
- }
-
- commitMeasurements();
- assertPerformance();
- }
-
- public void testReadTaskListWith4000Tasks() {
- final File file = TaskTestUtil.getLocalFile(TASK_LIST_4000);
- final TaskListElementImporter taskListWriter = taskListManager.getTaskListWriter();
-
- for (int i = 0; i < 10; i++) {
- startMeasuring();
- taskListWriter.readTaskList(taskList, file);
- stopMeasuring();
- taskList.reset();
- }
-
- commitMeasurements();
- assertPerformance();
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/web/HtmlDecodeEntityTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/web/HtmlDecodeEntityTest.java
deleted file mode 100644
index c88149884..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/web/HtmlDecodeEntityTest.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests.web;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.ITaskFactory;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.QueryHitCollector;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-import org.eclipse.mylyn.internal.web.tasks.WebRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.data.TaskDataCollector;
-
-/**
- * @author George Lindholm
- * @author Steffen Pingel
- */
-public class HtmlDecodeEntityTest extends TestCase {
-
- private final IProgressMonitor monitor = new NullProgressMonitor();
-
- private final TaskRepository repository = new TaskRepository("localhost", "file:///tmp/a");
-
- private final List<RepositoryTaskData> queryHits = new ArrayList<RepositoryTaskData>();
-
- private final ITaskFactory taskFactory = new ITaskFactory() {
- public AbstractTask createTask(RepositoryTaskData taskData, IProgressMonitor monitor) throws CoreException {
- return null;
- }
- };
-
- private final TaskDataCollector resultCollector = new QueryHitCollector(taskFactory) {
- @Override
- public void accept(RepositoryTaskData hit) {
- queryHits.add(hit);
- }
- };
-
- public void testEntities() {
- assertQuery("1:A quote &quot;", "(\\d+?):(.+)", "A quote \""); // Simple quote
- assertQuery("2:A quote '&quot;'", "(\\d+?):(.+)", "A quote '\"'"); // Simple quote
- assertQuery("3:A quote &quot;&quot; doubled", "({Id}\\d+?):({Description}.+)", "A quote \"\" doubled"); // Double quotes
- assertQuery("4:A quote &quot ;", "(\\d+?):(.+)", "A quote &quot ;"); // Bad entity syntax
- assertQuery("5:A quote & quot;", "(\\d+?):(.+)", "A quote & quot;"); // Bad entity syntax
- assertQuery("6:foo & boo", "(\\d+?):(.+)", "foo & boo"); // Non entity syntax
- assertQuery("7:foo&boo poo", "(\\d+?):(.+)", "foo&boo poo"); // Non entity syntax
- assertQuery("8:foo&boo ;poo", "(\\d+?):(.+)", "foo&boo ;poo"); // Bad, non entity syntax
- assertQuery("9:foo&boo;poo", "(\\d+?):(.+)", "foo&boo;poo"); // Invalid entity
- assertQuery("10:&#32;", "(\\d+?):(.+)", " "); // HTML decimal entity
- assertQuery("11:&#X20;", "(\\d+?):(.+)", " "); // Hexadecimal entity
- }
-
- private void assertQuery(final String entity, final String regex, final String expected) {
- queryHits.clear();
- IStatus status = WebRepositoryConnector.performQuery(entity, regex, "", monitor, resultCollector, repository);
- assertTrue(status == Status.OK_STATUS);
- assertEquals(queryHits.get(0).getSummary(), expected);
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/web/NamedPatternTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/web/NamedPatternTest.java
deleted file mode 100644
index 7e638971d..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/web/NamedPatternTest.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests.web;
-
-import java.util.regex.Matcher;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.internal.web.tasks.NamedPattern;
-
-/**
- * @author Eugene Kuleshov
- */
-public class NamedPatternTest extends TestCase {
-
- public void testNamedGroups() {
- NamedPattern p = new NamedPattern("({Hour}\\d\\d):({Minute}\\d\\d):({Second}\\d\\d)", 0);
- assertEquals("(\\d\\d):(\\d\\d):(\\d\\d)", p.getPattern().pattern());
- assertEquals(3, p.getGroups().size());
- assertEquals("Hour", p.groupName(0));
- assertEquals("Minute", p.groupName(1));
- assertEquals("Second", p.groupName(2));
-
- Matcher m = p.matcher("01:02:03");
- assertTrue(m.find());
- assertEquals("01", p.group("Hour", m));
- assertEquals("02", p.group("Minute", m));
- assertEquals("03", p.group("Second", m));
- }
-
- public void testUnnamedGroups() {
- NamedPattern p = new NamedPattern("(\\d\\d):(\\d\\d):(\\d\\d)", 0);
- assertEquals("(\\d\\d):(\\d\\d):(\\d\\d)", p.getPattern().pattern());
- assertEquals(0, p.getGroups().size());
-
- Matcher m = p.matcher("01:02:03");
- assertTrue(m.find());
- assertEquals("01", m.group(1));
- assertEquals("02", m.group(2));
- assertEquals("03", m.group(3));
- }
-
- public void testNestedGroups() {
- NamedPattern p = new NamedPattern(":({a}:({b}:({c}foo)boo)doo)", 0);
- assertEquals(":(:(:(foo)boo)doo)", p.getPattern().pattern());
- assertEquals(3, p.getGroups().size());
-
- Matcher m = p.matcher(":::fooboodoo");
- assertTrue(m.find());
- assertEquals("::fooboodoo", p.group("a", m));
- assertEquals(":fooboo", p.group("b", m));
- assertEquals("foo", p.group("c", m));
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.tests/testdata/legacy/tasklist_0_4_8.xml b/org.eclipse.mylyn.tasks.tests/testdata/legacy/tasklist_0_4_8.xml
deleted file mode 100644
index ca6d3bb41..000000000
--- a/org.eclipse.mylyn.tasks.tests/testdata/legacy/tasklist_0_4_8.xml
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><TaskList Version="1.0.1"><BugzillaTaskRegistryCategory><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-18 15:05:08.174 PST" Dirty="false" Elapsed="710333" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-121313" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=121313" Kind="" Label="121313: PDE outline broken in 3.2 M4" LastDate="1134948318985" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-02 10:04:24.144 PST" Dirty="false" Elapsed="635683" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-116503" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=116503" Kind="" Label="116503: url format in bugzilla preference page is not clear" LastDate="1133571800075" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-12-16 12:43:14.101 PST" Dirty="false" Elapsed="10248681" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-121280" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=121280" Kind="" Label="121280: create tips/tricks/quickref document" LastDate="1138147878358" Notes="" Priority="P2" Reminded="true" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-28 18:34:39.585 PST" Dirty="false" Elapsed="137758" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-117799" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=117799" Kind="" Label="117799: UI hangs after ResourceException" LastDate="1133232080872" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.438 PST" Dirty="false" Elapsed="9496954" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-103418" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=103418" Kind="" Label="103418: improve active search UI" LastDate="1121707407100" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-11-22 13:55:18.46 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-117587" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=117587" Kind="normal" Label="117587: clean up 3.1 build process" LastDate="1139867273370" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="INCOMING"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-03 16:28:12.745 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-114949" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=114949" Kind="" Label="114949: When Task List is Fast View, tasks disappear" LastDate="1131081597575" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-08-29 15:52:29.524 PDT" Dirty="false" Elapsed="67208963" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-104253" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=104253" Kind="" Label="104253: make mylar bridges extension points" LastDate="1125453336058" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-10-07 19:34:14.962 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-112016" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=112016" Kind="normal" Label="112016: text selections in xml files will get recorded twice" LastDate="1139867260542" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-08 10:51:47.725 PST" Dirty="false" Elapsed="5281739" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-114262" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=114262" Kind="" Label="114262: Ensure reporting collectors see interaction events in ascending order" LastDate="1132011200505" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-28 19:21:19.225 PDT" Dirty="false" Elapsed="22906549" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-111023" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=111023" Kind="" Label="111023: create one-to-one association tasks hyperlinks" LastDate="1138053045868" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-20 09:58:43.217 PDT" Dirty="false" Elapsed="2427962" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-110061" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=110061" Kind="" Label="110061: previous task history should be persistent" LastDate="1138053061851" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.428 PST" Dirty="false" Elapsed="8669328" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-103589" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=103589" Kind="" Label="103589: task list and active search contribution items fail to show on startup" LastDate="1134708976687" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-12-07 14:30:27.428 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-107082" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=107082" Kind="normal" Label="107082: npe in IconAndMessageDialog.getSWTImage(..)" LastDate="1140115559340" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-107146" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=107146" Kind="" Label="107146: text selections cause too much refreshing ManifestEditor" LastDate="1124771063890" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-21 14:50:04.130 PDT" Dirty="false" Elapsed="2231576" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-106933" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=106933" Kind="" Label="106933: ensure empty root nodes not shown when Package Explorer in Working Sets mode" LastDate="1132619727013" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-14 15:30:11.390 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-112718" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=112718" Kind="" Label="112718: mailing list statistics should specify list" LastDate="1130341917652" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.418 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-102676" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=102676" Kind="" Label="102676: add support for moving from study phase1 to phase2" LastDate="1121707455991" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:01:49.698 PST" Dirty="false" Elapsed="3853192" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-119372" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=119372" Kind="" Label="119372: workspace move breaks mylar paths" LastDate="1134101714271" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-01-20 11:10:22.478 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-123980" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=123980" Kind="minor" Label="123980: Deleting an active task should just deactivate it." LastDate="1139969412802" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-11-30 11:46:34.801 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-118692" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=118692" Kind="" Label="118692: support low-priority test launching" LastDate="1133576860231" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-09-13 19:17:45.440 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-109457" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109457" Kind="" Label="109457: new visualization request: timeline view" LastDate="1134154661758" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-21 12:06:28.9 PDT" Dirty="false" Elapsed="2551808" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-113397" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=113397" Kind="" Label="113397: race condition in tests causing failure on slow machine" LastDate="1134688304924" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-16 13:18:10.736 PST" Dirty="false" Elapsed="452841" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-119368" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=119368" Kind="" Label="119368: http auth dialog freezes eclipse" LastDate="1134780694517" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-14 14:36:25.782 PDT" Dirty="false" Elapsed="27005677" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-112712" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=112712" Kind="" Label="112712: make monitor reports HTML based" LastDate="1129688072602" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-12-07 14:30:27.418 PST" Dirty="false" Elapsed="14401" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-104247" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=104247" Kind="enhancement" Label="104247: support decorators in task list" LastDate="1139867211481" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="INCOMING"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-09-16 10:10:49.283 PDT" Dirty="false" Elapsed="581446" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-109770" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109770" Kind="" Label="109770: create future plan elements in summary" LastDate="1133323627373" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-11-14 10:16:05.145 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-111258" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=111258" Kind="normal" Label="111258: verify interaction of Java active search with JSP resources" LastDate="1140232916095" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="INCOMING"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.418 PST" Dirty="false" Elapsed="1653362" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-103585" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=103585" Kind="" Label="103585: package explorer refreshes too much" LastDate="1121707389826" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-31 12:08:11.699 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-114408" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=114408" Kind="" Label="114408: make bug report titles consistent" LastDate="1131421227649" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-12 11:55:27.299 PDT" Dirty="false" Elapsed="128314" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-106931" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=106931" Kind="" Label="106931: Improve icons for bugzilla tasks" LastDate="1126551639568" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-19 11:29:52.14 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-121381" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=121381" Kind="" Label="121381: Can't open mylar task view - NoClassDefFoundError" LastDate="1136427246438" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-10-28 08:45:02.117 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-114124" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=114124" Kind="normal" Label="114124: set up monitor scripts on eclipse.org" LastDate="1140232916145" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="INCOMING"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-28 20:01:29.411 PDT" Dirty="false" Elapsed="0" EndDate="2005-11-07 18:08:00.0 PST" Estimated="0" Handle="https://bugs.eclipse.org/bugs-111025" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=111025" Kind="normal" Label="111025: [Viewers] setting background color on trees with columns" LastDate="1140115552520" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-13 09:29:27.644 PST" Dirty="false" Elapsed="56431126" EndDate="" Estimated="3" Handle="https://bugs.eclipse.org/bugs-120248" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=120248" Kind="" Label="120248: Context externalization optimization" LastDate="1134686229440" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.428 PST" Dirty="false" Elapsed="8573843" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-104259" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=104259" Kind="" Label="104259: mylar open type dialog integration" LastDate="1127876303230" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2006-01-09 18:03:51.700 PST" Dirty="false" Elapsed="12574542" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-123173" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=123173" Kind="" Label="123173: make task editor update title on description change" LastDate="1137178946080" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-01-11 16:22:04.322 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-123527" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=123527" Kind="enhancement" Label="123527: support mutliple status values" LastDate="1139867232862" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-17 15:11:31.898 PDT" Dirty="false" Elapsed="15983568" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-112716" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=112716" Kind="" Label="112716: Create extension points to generalize monitor" LastDate="1130018750533" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-09-19 13:15:48.48 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-109928" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109928" Kind="normal" Label="109928: make documentation available online" LastDate="1139867253992" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="INCOMING"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-12-09 14:54:33.313 PST" Dirty="false" Elapsed="541729" EndDate="" Estimated="2" Handle="https://bugs.eclipse.org/bugs-117275" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=117275" Kind="" Label="117275: Gradient problem" LastDate="1138061378299" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-22 11:33:38.387 PDT" Dirty="false" Elapsed="10494" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-113457" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=113457" Kind="" Label="113457: improve formatting of task dates" LastDate="1138053050845" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-12-12 07:42:37.955 PST" Dirty="false" Elapsed="11093787" EndDate="" Estimated="1" Handle="https://bugs.eclipse.org/bugs-120374" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=120374" Kind="" Label="120374: task activity time reportes is too high" LastDate="1138042966244" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2006-01-05 19:42:03.528 PST" Dirty="false" Elapsed="665237" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-122845" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=122845" Kind="" Label="122845: &quot;Could not save task list&quot; NPE" LastDate="1137193138698" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-12-07 14:30:27.408 PST" Dirty="false" Elapsed="651" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-104341" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=104341" Kind="enhancement" Label="104341: add interest scaling factor control" LastDate="1139867214005" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-16 16:37:10.20 PDT" Dirty="false" Elapsed="4649526" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-109693" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109693" Kind="" Label="109693: Tasklist's filter-completed doesn't work" LastDate="1128463755466" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-04 12:28:19.465 PST" Dirty="false" Elapsed="135959" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-107261" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=107261" Kind="" Label="107261: make task list tooltips more consistent with other Eclipse views" LastDate="1138053088269" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-08-24 16:50:02.624 PDT" Dirty="false" Elapsed="20330323" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-107384" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=107384" Kind="" Label="107384: active hierarchy can contain duplicate elements" LastDate="1126925295927" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-12-19 11:29:39.205 PST" Dirty="false" Elapsed="513334635" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-120952" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=120952" Kind="normal" Label="120952: [discussion] provide task/issue repository view and extension points" LastDate="1140030392296" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-12-07 14:30:27.438 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-103516" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=103516" Kind="enhancement" Label="103516: Should be able to map highlighters to priority" LastDate="1139867210750" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-12 10:47:20.132 PDT" Dirty="false" Elapsed="2366794" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-107645" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=107645" Kind="" Label="107645: content assist not available on initial startup" LastDate="1134773588208" Notes="" Priority="P4" Reminded="true" ReminderDate="2005-09-20 09:37:25.988 PDT" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-01-23 15:18:33.51 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-124956" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=124956" Kind="" Label="124956: reduce amount of refresh needed for views that are not visible" LastDate="1138146805055" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-08-25 10:06:44.227 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-108011" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=108011" Kind="" Label="108011: prevent automatic package explorer collapse" LastDate="1128742683567" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-12-14 11:27:35.636 PST" Dirty="false" Elapsed="39427" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-120469" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=120469" Kind="enhancement" Label="120469: Decouple bugzilla task reading" LastDate="1139867229678" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="INCOMING"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-14 18:25:27.241 PDT" Dirty="false" Elapsed="736022" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-109551" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109551" Kind="" Label="109551: Provide keybinding for toggling folding" LastDate="1130545048548" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-09-23 09:21:27.499 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-104373" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=104373" Kind="normal" Label="104373: [projection] Entered text gets automatically folded away" LastDate="1140115547292" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="INCOMING"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-28 14:00:19.178 PDT" Dirty="false" Elapsed="401338" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-108305" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=108305" Kind="" Label="108305: Commenting from Mylar's Bugzilla UI doesn't update CC" LastDate="1138053059047" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2006-01-13 09:35:35.806 PST" Dirty="false" Elapsed="232316" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-123167" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=123167" Kind="" Label="123167: invalid thread access on change set management" LastDate="1137203858182" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-24 09:12:06.967 PST" Dirty="false" Elapsed="5686681" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-117926" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=117926" Kind="" Label="117926: clean up Mylar usage reporting" LastDate="1132892503341" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-09 18:57:36.359 PDT" Dirty="false" Elapsed="15209775" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-109232" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109232" Kind="" Label="109232: package explorer refreshes too much on marker change" LastDate="1126845173531" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-21 12:11:16.703 PDT" Dirty="false" Elapsed="324177" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-110236" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=110236" Kind="" Label="110236: guard against concurrent modification of context" LastDate="1128137904850" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-07 08:41:25.237 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-110472" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=110472" Kind="" Label="110472: Text CVS label decorator interferes with landmark bolding" LastDate="1129311856571" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-12-07 14:30:27.438 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-107169" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=107169" Kind="normal" Label="107169: consider making ITaskListElement(s) adapt to tasks" LastDate="1139867240143" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-15 14:14:11.417 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-116518" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=116518" Kind="" Label="116518: Submission to Bugzilla works but displays erroneous error" LastDate="1132105376411" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.428 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-104084" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=104084" Kind="" Label="104084: active search jobs should be terminated before shutdown" LastDate="1129564349999" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-11-24 19:39:43.598 PST" Dirty="false" Elapsed="123873" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-117352" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=117352" Kind="" Label="117352: resources changes as part of applying patch should become interesting" LastDate="1134709524825" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.438 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-106927" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=106927" Kind="" Label="106927: automatic refresh of bugzilla reports fails" LastDate="1125005506463" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2006-01-18 15:25:36.657 PST" Dirty="false" Elapsed="2049534" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-123882" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=123882" Kind="" Label="123882: Allow to remove taks from the task activity list on task planner" LastDate="1137629533058" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-02 13:43:01.440 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-114841" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=114841" Kind="" Label="114841: live stats problem when date is set to &quot;Last 30 days&quot;" LastDate="1131063927948" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-01-05 19:02:21.62 PST" Dirty="false" Elapsed="17728913" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-117035" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=117035" Kind="major" Label="117035: Bugzilla plugin ignores encoding" LastDate="1139969412792" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="INCOMING"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-02 08:47:50.688 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-114786" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=114786" Kind="" Label="114786: sideitems get pushed past page border on MSIE" LastDate="1131063818310" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-11-03 10:51:24.240 PST" Dirty="false" Elapsed="1009231" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-114966" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=114966" Kind="normal" Label="114966: fix web docs support" LastDate="1139867264458" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="INCOMING"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-28 16:57:30.167 PDT" Dirty="false" Elapsed="1535040" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-110993" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=110993" Kind="" Label="110993: Super-flashy folding in Java editor" LastDate="1128377896888" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-01-20 11:09:06.28 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-124572" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=124572" Kind="" Label="124572: Task Repository View not deleting properly" LastDate="1138146801700" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-08-26 08:23:29.339 PDT" Dirty="false" Elapsed="8435725" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-107304" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=107304" Kind="" Label="107304: Make key project resources always visible" LastDate="1125085600846" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-12-07 14:30:27.448 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-104052" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=104052" Kind="enhancement" Label="104052: active search of local context" LastDate="1140232915965" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.438 PST" Dirty="false" Elapsed="250920" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-104063" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=104063" Kind="" Label="104063: toggling related element providers fails to remove the search hits" LastDate="1125010426838" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-28 18:46:06.172 PST" Dirty="false" Elapsed="3067570" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-115903" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=115903" Kind="" Label="115903: newly created resources should become interesting" LastDate="1133323080327" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-14 10:17:42.896 PST" Dirty="false" Elapsed="2435811" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-115307" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=115307" Kind="" Label="115307: Mylar tasks view should be in favorites" LastDate="1132004701209" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-10-06 16:28:29.972 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-111861" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=111861" Kind="normal" Label="111861: open type history might be missing some interesting types" LastDate="1140232905850" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-21 11:27:31.739 PDT" Dirty="false" Elapsed="0" EndDate="2005-11-07 13:08:00.0 PST" Estimated="0" Handle="https://bugs.eclipse.org/bugs-113392" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=113392" Kind="normal" Label="113392: [rulers]promote annotations for folded regions" LastDate="1140115552991" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="INCOMING"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-08-26 11:26:23.409 PDT" Dirty="false" Elapsed="3042124" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-107165" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=107165" Kind="" Label="107165: disjoint/multiple selections and actions on the task list" LastDate="1134694378187" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-05 16:38:46.605 PDT" Dirty="false" Elapsed="8925291" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-111708" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=111708" Kind="" Label="111708: improve UI for opening tasks and contexts" LastDate="1130466659852" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-12 09:50:51.49 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-109312" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109312" Kind="" Label="109312: improve performance and execution of task activation/deactivation" LastDate="1128647223245" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-02 16:06:08.160 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-118942" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=118942" Kind="" Label="118942: Send statistics feedback now dialog problems" LastDate="1134789044123" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.418 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-107062" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=107062" Kind="" Label="107062: support custom queries" LastDate="1124992090362" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-11-24 18:30:01.428 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-117979" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=117979" Kind="normal" Label="117979: new selection should always make parent interest positive" LastDate="1140232916165" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="INCOMING"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-14 10:17:10.990 PST" Dirty="false" Elapsed="1608401" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-115156" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=115156" Kind="" Label="115156: unclear UI for turning off folding" LastDate="1133573889820" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-23 18:37:40.763 PST" Dirty="false" Elapsed="778116" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-117596" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=117596" Kind="" Label="117596: ConcurrentModificationException at Eclipse exit" LastDate="1132802005817" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-01-13 15:15:51.815 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-123846" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=123846" Kind="" Label="123846: improve icons and labels of task repository view and wizards" LastDate="1138146785157" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-02-09 11:58:59.361 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-109905" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109905" Kind="enhancement" Label="109905: [discussion] plan JIRA support" LastDate="1139867215297" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-02 16:06:12.336 PST" Dirty="false" Elapsed="406965" EndDate="" Estimated="1" Handle="https://bugs.eclipse.org/bugs-118238" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=118238" Kind="" Label="118238: Bugzilla rare bug" LastDate="1133570823251" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-20 15:08:09.148 PDT" Dirty="false" Elapsed="7526294" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-110111" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=110111" Kind="" Label="110111: create context activity context" LastDate="1127263189654" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-02 10:40:00.230 PST" Dirty="false" Elapsed="1246770" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-114172" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=114172" Kind="" Label="114172: Switch task data directory option on the task list" LastDate="1138053080297" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-21 12:08:59.752 PDT" Dirty="false" Elapsed="342853" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-110234" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=110234" Kind="" Label="110234: guard against failure of elements to open" LastDate="1127432024980" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-23 14:50:44.591 PDT" Dirty="false" Elapsed="12682517" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-109810" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109810" Kind="" Label="109810: Active Search / Hierarchy should display class names for methods" LastDate="1128367754203" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-27 15:36:34.237 PDT" Dirty="false" Elapsed="810483" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-113877" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=113877" Kind="" Label="113877: filter browser url tracking" LastDate="1138052473615" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-13 11:51:37.223 PST" Dirty="false" Elapsed="9992579" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-115705" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=115705" Kind="" Label="115705: dynamic change set in a sync view is not refreshed on task change" LastDate="1131998615368" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-14 10:52:24.332 PDT" Dirty="false" Elapsed="24537944" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-111945" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=111945" Kind="" Label="111945: Read-only activations of tasks" LastDate="1130342214489" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-20 15:17:29.33 PDT" Dirty="false" Elapsed="3107833" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-110113" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=110113" Kind="" Label="110113: restructure documentation" LastDate="1127273230502" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-02-15 21:48:54.426 PST" Dirty="false" Elapsed="58995" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-128126" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=128126" Kind="normal" Label="128126: New repository validate button should validate credentials" LastDate="1140232404199" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.438 PST" Dirty="false" Elapsed="982424" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-103729" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=103729" Kind="" Label="103729: add support for disjoint selections in Mylar views" LastDate="1124994915133" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-11-24 20:35:54.265 PST" Dirty="false" Elapsed="1334009" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-117517" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=117517" Kind="normal" Label="117517: add support for commit comment templates" LastDate="1139867272459" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-02 11:45:45.633 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-114419" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=114419" Kind="" Label="114419: create flash videos for 0.4" LastDate="1131672539748" Notes="working with tasks and bug reports&#13;&#10;- navigating to reports&#13;&#10;&#13;&#10;other &#13;&#10;- junit tests of active context&#13;&#10;- commit resources in context&#13;&#10;&#13;&#10;active search&#13;&#10;- qualify member names&#13;&#10;- drag-and-drop activation" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-13 19:32:43.91 PDT" Dirty="false" Elapsed="2565729" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-109459" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109459" Kind="" Label="109459: during bugzilla refresh focus is repeatedly lost.." LastDate="1138049392194" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-20 11:56:42.374 PDT" Dirty="false" Elapsed="1823323" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-113270" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=113270" Kind="" Label="113270: support URL monitoring for internal browser" LastDate="1129838098983" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-21 12:41:09.10 PDT" Dirty="false" Elapsed="15494252" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-110132" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=110132" Kind="" Label="110132: ClassCircularityError on startup" LastDate="1127487637375" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-01-17 11:40:55.180 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-119554" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=119554" Kind="enhancement" Label="119554: Generalize monitor uploading" LastDate="1139867121722" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="INCOMING"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-14 12:15:49.870 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-108294" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=108294" Kind="" Label="108294: improve active search laziness" LastDate="1126846166238" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-09-22 13:28:46.255 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-110374" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=110374" Kind="" Label="110374: recursive bug editor activation attempt" LastDate="1138046667917" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-28 18:30:44.98 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-114281" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=114281" Kind="" Label="114281: improve task list context menu action enablement" LastDate="1131417951909" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.438 PST" Dirty="false" Elapsed="3611363" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-106929" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=106929" Kind="" Label="106929: Add tooltip for description column in the tasklist" LastDate="1124994944826" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-12-07 14:30:27.418 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-102678" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=102678" Kind="enhancement" Label="102678: improve distinguishing between editor selections and edits" LastDate="1139867208777" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-01-20 17:01:02.813 PST" Dirty="false" Elapsed="204114" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-104637" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=104637" Kind="" Label="104637: Enhancment in folding" LastDate="1138046537209" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-01-12 19:39:18.379 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-123710" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=123710" Kind="" Label="123710: repository failure is silent" LastDate="1137209889077" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2006-01-17 18:41:15.820 PST" Dirty="false" Elapsed="816574" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-124222" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=124222" Kind="" Label="124222: BugzillaTaskExternalizer creates elements for non-bugzilla queries" LastDate="1137552846979" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.438 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-104888" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=104888" Kind="" Label="104888: revise docs for 0.3.2" LastDate="1122298984543" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-01-24 15:53:33.407 PST" Dirty="false" Elapsed="19233196" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-125095" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=125095" Kind="" Label="125095: make task/report editor extensible" LastDate="1138146819756" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-08-29 19:31:09.56 PDT" Dirty="false" Elapsed="1164165" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-108295" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=108295" Kind="" Label="108295: Intrusive suggestions in Java code completion" LastDate="1125370205400" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.428 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-103414" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=103414" Kind="" Label="103414: create task list documentation" LastDate="1124994926570" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-08-24 16:50:40.949 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-107949" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=107949" Kind="normal" Label="107949: active hierarchy should update based on model changes" LastDate="1139867240183" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-21 18:46:37.510 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-115128" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=115128" Kind="" Label="115128: Toggling Mylar in outline causes the editor to change to another file" LastDate="1132633898621" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-14 18:02:01.596 PST" Dirty="false" Elapsed="958759" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-115709" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=115709" Kind="" Label="115709: Allow to specify custom template for commit comments" LastDate="1132020936187" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.438 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-102090" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=102090" Kind="" Label="102090: package explorer synchronization with interest filtering off" LastDate="1121707393401" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-23 18:10:15.606 PDT" Dirty="false" Elapsed="4066079" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-110506" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=110506" Kind="" Label="110506: provide context for previous/next task actions" LastDate="1138053064544" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.438 PST" Dirty="false" Elapsed="1162" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-103107" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=103107" Kind="" Label="103107: bugzilla fails to load corrupted offline reports" LastDate="1124994942363" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.438 PST" Dirty="false" Elapsed="110170378" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-102674" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=102674" Kind="" Label="102674: reduce size of taskscapes" LastDate="1128647206732" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2006-01-24 12:37:32.2 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-124732" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=124732" Kind="" Label="124732: Move method to open URL in internal browser" LastDate="1138151676159" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-25 13:08:38.55 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-115707" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=115707" Kind="" Label="115707: support multiple active change sets" LastDate="1133415963978" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-12-19 11:29:52.14 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-121315" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=121315" Kind="normal" Label="121315: Preferences: Highlighter with label &quot;orange gradient&quot; is rendered Brown" LastDate="1139969416758" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="INCOMING"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-11-02 14:27:06.22 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-114849" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=114849" Kind="" Label="114849: flatten interaction event summary table" LastDate="1132699262262" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.418 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-103742" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=103742" Kind="" Label="103742: Packages do not reappear in Java Browsing Packages view when no task activated" LastDate="1124994931247" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-22 14:42:14.656 PST" Dirty="false" Elapsed="203632" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-117599" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=117599" Kind="" Label="117599: improve web site and phoneix use" LastDate="1133565678262" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-23 10:00:21.311 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-113476" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=113476" Kind="" Label="113476: improve gradient highlighters" LastDate="1131487916357" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.418 PST" Dirty="false" Elapsed="2748584" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-104607" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=104607" Kind="" Label="104607: create FAQ document" LastDate="1127749128849" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.418 PST" Dirty="false" Elapsed="1150297" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-103726" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=103726" Kind="" Label="103726: reopened bug reports are filtered as completed" LastDate="1134688329920" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-09-23 14:52:26.938 PDT" Dirty="false" Elapsed="4412659" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-109803" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109803" Kind="" Label="109803: tooltips on task list cause loss of focus on GTK" LastDate="1131160761127" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-08-25 10:45:19.516 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-108021" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=108021" Kind="normal" Label="108021: make monitor listen to all preference changes" LastDate="1139867241575" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="INCOMING"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-07 17:44:21.951 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-93820" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=93820" Kind="" Label="93820: [Forms] Manifest editor not sending correct selection events" LastDate="1138052566979" Notes="" Priority="P3" Reminded="true" ReminderDate="2005-11-05 10:44:12.883 PST" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.428 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-103733" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=103733" Kind="" Label="103733: support gamma settings" LastDate="1124995054894" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-05 12:26:19.242 PST" Dirty="false" Elapsed="31794163" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-119300" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=119300" Kind="" Label="119300: fix setting of elapsed time to 0" LastDate="1134101994815" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.428 PST" Dirty="false" Elapsed="2869036" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-104263" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=104263" Kind="" Label="104263: support reminders in task list" LastDate="1124995026524" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.428 PST" Dirty="false" Elapsed="6676150" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-106800" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=106800" Kind="" Label="106800: Add an option to deactivate task without closing opened editors" LastDate="1123883880986" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-12-09 10:54:37.242 PST" Dirty="false" Elapsed="1123295" EndDate="" Estimated="3" Handle="https://bugs.eclipse.org/bugs-118582" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=118582" Kind="minor" Label="118582: improve bugzilla client support for http auth" LastDate="1139969412792" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.408 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-106899" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=106899" Kind="" Label="106899: suppress filtering of active tasks" LastDate="1124994872602" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2006-01-16 20:09:10.912 PST" Dirty="false" Elapsed="45156728" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-123884" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=123884" Kind="" Label="123884: Collapse and sash controls in form editors" LastDate="1137808207006" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.428 PST" Dirty="false" Elapsed="105011" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-103236" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=103236" Kind="" Label="103236: make sure active reports can't disappear" LastDate="1124994893452" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-01-23 17:08:32.241 PST" Dirty="false" Elapsed="2689280" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-124910" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=124910" Kind="" Label="124910: improve task planner UI" LastDate="1138147875064" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.428 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-103092" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=103092" Kind="" Label="103092: improve category filtering and sorting" LastDate="1124994954340" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.428 PST" Dirty="false" Elapsed="121836" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-103940" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=103940" Kind="" Label="103940: update documentation for 0.3.2" LastDate="1124994912950" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-01-19 13:09:32.991 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-124545" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=124545" Kind="normal" Label="124545: [Viewers] FilteredTree refresh when filter is on" LastDate="1140115558108" Notes="" Priority="P3" Reminded="false" ReminderDate="2006-02-27 13:17:00.0 PST" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2006-01-04 18:30:16.573 PST" Dirty="false" Elapsed="3644520" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-122144" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=122144" Kind="" Label="122144: eclipse deadlocked while starting up" LastDate="1136522697176" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-17 16:58:06.383 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-114810" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=114810" Kind="" Label="114810: Hardware and OS attributes not auto determined in New Bug Report wizard" LastDate="1133460517749" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2006-01-23 18:17:51.25 PST" Dirty="false" Elapsed="862411" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-118151" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=118151" Kind="" Label="118151: Auto-Opening with external editors" LastDate="1138071494864" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-13 09:09:45.834 PDT" Dirty="false" Elapsed="12909242" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-108309" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=108309" Kind="" Label="108309: Improve usability of &quot;make less interesting&quot; action" LastDate="1132531380038" Notes="" Priority="P1" Reminded="true" ReminderDate="2005-09-20 09:37:30.935 PDT" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-09-21 09:22:23.843 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-110202" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=110202" Kind="" Label="110202: bug links should be clickable in bug editor" LastDate="1138061373522" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-08-26 11:32:01.114 PDT" Dirty="false" Elapsed="703962" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-107549" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=107549" Kind="" Label="107549: Accessibility of Mylar glasses in all view..." LastDate="1125081666308" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-08-25 09:56:18.287 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-108006" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=108006" Kind="" Label="108006: add UI for restoring the tasklist from the backup copy" LastDate="1125448315248" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-26 12:35:28.227 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-110701" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=110701" Kind="" Label="110701: explore drag and drop integration with browser" LastDate="1132092580337" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-01-19 16:23:01.984 PST" Dirty="false" Elapsed="486388" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-124424" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=124424" Kind="" Label="124424: Write test cases for TaskReportGenerator" LastDate="1137716637594" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-09-30 14:23:36.844 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-111266" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=111266" Kind="normal" Label="111266: make Active Search work for Ant references" LastDate="1139867260522" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="INCOMING"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-08-25 07:24:24.372 PDT" Dirty="false" Elapsed="1513406" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-82752" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=82752" Kind="" Label="82752: ProgramElement.getSourceSignature returns &quot;public&quot; for &quot;private&quot; members" LastDate="1124981375284" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-11-02 13:31:27.342 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-114837" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=114837" Kind="" Label="114837: stack overflow in layout" LastDate="1134154665473" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-06 19:57:17.426 PDT" Dirty="false" Elapsed="13559770" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-111870" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=111870" Kind="" Label="111870: hour estimates are wrong" LastDate="1138053072876" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-10-24 12:20:39.352 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-113583" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=113583" Kind="enhancement" Label="113583: improve UI for activating multiple contexts" LastDate="1139867121722" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="INCOMING"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-16 19:56:09.969 PDT" Dirty="false" Elapsed="4564380" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-109815" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109815" Kind="" Label="109815: add phase 2 upgarde popup" LastDate="1127154172716" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-02-13 10:33:10.141 PST" Dirty="false" Elapsed="3065" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-122849" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=122849" Kind="normal" Label="122849: [Model Sync] Support for change sets" LastDate="1140115553091" Notes="" Priority="P3" Reminded="false" ReminderDate="2006-02-26 10:33:26.434 PST" offlineSyncState="INCOMING"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.438 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-107754" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=107754" Kind="" Label="107754: entire tasklist can be lost if mylar is closed before load completes" LastDate="1124992095549" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-02 08:51:07.762 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-114789" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=114789" Kind="" Label="114789: red background of top tables is an eyesore when page is loading" LastDate="1131063923611" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-15 10:59:41.939 PDT" Dirty="false" Elapsed="1712705" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-109642" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109642" Kind="" Label="109642: mylar can block workspace on startup" LastDate="1126897611293" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-11 13:19:02.666 PDT" Dirty="false" Elapsed="11145163" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-108742" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=108742" Kind="" Label="108742: Eclipse's Problems filters interact badly with Mylar" LastDate="1126481794835" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-10-03 11:15:46.675 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-111362" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=111362" Kind="enhancement" Label="111362: manage resource history" LastDate="1139867215307" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-01-16 16:33:44.596 PST" Dirty="false" Elapsed="401446" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-106990" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=106990" Kind="major" Label="106990: Add support for Bugzilla integrated into Collabnet" LastDate="1139867234725" Notes="" Priority="P4" Reminded="true" ReminderDate="2006-02-13 17:00:42.132 PST" offlineSyncState="INCOMING"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-01-18 18:15:54.157 PST" Dirty="false" Elapsed="1676540" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-124225" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=124225" Kind="" Label="124225: generalize tasklist actions to be object contributions" LastDate="1138046528736" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-06 19:23:54.846 PDT" Dirty="false" Elapsed="1510302" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-111869" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=111869" Kind="" Label="111869: changing highlightre fails to refresh views" LastDate="1128724678166" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-31 11:25:14.127 PST" Dirty="false" Elapsed="187877" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-114399" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=114399" Kind="" Label="114399: make Get Description in New Task dialog use progress" LastDate="1138053083101" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:01:53.364 PST" Dirty="false" Elapsed="23191140" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-119380" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=119380" Kind="" Label="119380: MyLar Seems to Block and make Eclipse unusable when running external build" LastDate="1134160685272" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-21 09:13:14.543 PDT" Dirty="false" Elapsed="5852370" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-110200" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=110200" Kind="" Label="110200: clean up task list extension points and create JIRA plug-in" LastDate="1127502875246" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-12-14 18:33:41.591 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-121000" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=121000" Kind="normal" Label="121000: make monitor interaction event externalization consistent with core" LastDate="1139867277076" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-09-11 13:24:32.871 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-109259" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109259" Kind="normal" Label="109259: working set filter interacts badly with mylar filter" LastDate="1139867246852" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="INCOMING"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-12 14:45:38.411 PDT" Dirty="false" Elapsed="0" EndDate="2005-10-31 17:15:00.0 PST" Estimated="0" Handle="https://bugs.eclipse.org/bugs-112406" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=112406" Kind="minor" Label="112406: misleading exception when web browser is not available" LastDate="1140115547292" Notes="" Priority="P3" Reminded="true" ReminderDate="2005-11-08 10:48:17.818 PST" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-10-14 10:29:23.176 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-112669" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=112669" Kind="enhancement" Label="112669: add optional categories for completed today, completed this week" LastDate="1139867219242" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-21 13:34:49.768 PDT" Dirty="false" Elapsed="1442227" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-110248" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=110248" Kind="" Label="110248: notes field needs scroll bar and word wrap" LastDate="1130161170532" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-10-26 09:20:12.930 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-113848" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=113848" Kind="enhancement" Label="113848: support attaching context to bug report" LastDate="1139867219883" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-12 10:03:33.505 PDT" Dirty="false" Elapsed="1250510" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-109313" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109313" Kind="" Label="109313: outline view refreshes too often" LastDate="1126897669327" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-11-29 08:47:21.422 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-118443" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=118443" Kind="" Label="118443: improve task list startup performance" LastDate="1134760891962" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-15 19:37:41.591 PST" Dirty="false" Elapsed="10358805" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-116493" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=116493" Kind="" Label="116493: mylar reopen closed editors on task acticvation" LastDate="1132591133670" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-12-07 14:30:27.418 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-104782" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=104782" Kind="normal" Label="104782: ensure that mylar viewer management removes facilities on view close" LastDate="1139867238841" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.438 PST" Dirty="false" Elapsed="8805730" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-102870" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=102870" Kind="" Label="102870: provide documentation of known limitations" LastDate="1124994957354" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-23 09:05:31.714 PDT" Dirty="false" Elapsed="1395166" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-110464" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=110464" Kind="" Label="110464: make active search check box selections disjoint" LastDate="1127520726870" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-12-07 19:01:41.61 PST" Dirty="false" Elapsed="9627252" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-119557" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=119557" Kind="" Label="119557: Tasklist data doesn't change when changing workspace" LastDate="1134154737126" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-21 08:18:35.468 PDT" Dirty="false" Elapsed="589688" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-110133" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=110133" Kind="" Label="110133: Unhandled event loop exception" LastDate="1127316728097" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-09-13 19:36:49.956 PDT" Dirty="false" Elapsed="385995" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-109460" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109460" Kind="normal" Label="109460: wrong incoming status on submitted reports/comments" LastDate="1139969412682" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-04 13:19:30.271 PST" Dirty="false" Elapsed="814328" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-114162" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=114162" Kind="" Label="114162: Export to zip files" LastDate="1138053067749" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-02-09 11:12:33.675 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-125276" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=125276" Kind="normal" Label="125276: common navigation items are overly restritive and cumbersome to navigate" LastDate="1139518294878" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-12-16 13:18:16.334 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-120502" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=120502" Kind="normal" Label="120502: [performance] pauses during casual editor navigation" LastDate="1140232919580" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-12-01 09:48:38.114 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-118884" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=118884" Kind="normal" Label="118884: problems with PDE Outline update" LastDate="1140232912700" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-09-21 11:36:57.207 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-110225" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=110225" Kind="" Label="110225: plan merge with Jeff Pound's for of the Platform Team's Bugs plug-in" LastDate="1132619761563" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-29 19:33:01.991 PDT" Dirty="false" Elapsed="934144" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-111167" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=111167" Kind="" Label="111167: [Discussion] Re-activate last task when Eclipse starts" LastDate="1128377904669" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.428 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-103234" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=103234" Kind="" Label="103234: monitor seems to be storing too much for preferences" LastDate="1124994959878" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-04 17:45:27.647 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-114283" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=114283" Kind="" Label="114283: NPE setting colour of highlighter" LastDate="1131155763901" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-14 10:17:32.821 PST" Dirty="false" Elapsed="1311474" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-115183" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=115183" Kind="" Label="115183: &quot;make less interesting&quot; shortcut only decrements single element" LastDate="1132626798902" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2006-01-16 13:25:09.596 PST" Dirty="false" Elapsed="2719320" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-124038" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=124038" Kind="" Label="124038: new report creation wizard should require fewer clicks" LastDate="1137729238603" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-14 18:41:26.901 PDT" Dirty="false" Elapsed="550261" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-110127" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=110127" Kind="" Label="110127: Improvements for Alt-Click in all views with active Mylar filter" LastDate="1134752754989" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-09-27 20:05:17.75 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-110892" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=110892" Kind="normal" Label="110892: repeated searches should not induce landmark interest" LastDate="1139867260512" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.428 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-103570" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=103570" Kind="" Label="103570: ensure that task list writes versions" LastDate="1124994895776" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-12-07 14:30:27.428 PST" Dirty="false" Elapsed="11425145" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-102663" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=102663" Kind="enhancement" Label="102663: support multiple workbench windows" LastDate="1140232912760" Notes="" Priority="P3" Reminded="true" ReminderDate="" offlineSyncState="INCOMING"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-07 17:41:17.827 PDT" Dirty="false" Elapsed="283767" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-112009" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=112009" Kind="" Label="112009: editing build.properties does not induce interest properly" LastDate="1132026760442" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-08-26 11:40:39.530 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-108163" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=108163" Kind="" Label="108163: active tasks disappear" LastDate="1125085546998" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2006-01-16 14:48:14.894 PST" Dirty="false" Elapsed="2819995" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-124044" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=124044" Kind="" Label="124044: Task Repositories -&gt; Properties: IndexOutOfBounds on Mac OS X" LastDate="1137454257740" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-12-14 09:59:40.621 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-120917" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=120917" Kind="normal" Label="120917: clean up collection of Mylar usage stats" LastDate="1140232919610" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.418 PST" Dirty="false" Elapsed="657505" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-103373" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=103373" Kind="" Label="103373: on task activation expand all intersting in managed views" LastDate="1121707409614" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-02-13 18:17:26.932 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-127609" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=127609" Kind="normal" Label="127609: parametrize task completion status" LastDate="1140232905850" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-10 17:19:35.857 PST" Dirty="false" Elapsed="84689" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-114435" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=114435" Kind="" Label="114435: calendar month off-by-one" LastDate="1138053077814" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-30 06:47:43.416 PST" Dirty="false" Elapsed="9118991" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-121976" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=121976" Kind="" Label="121976: Delete Icon should be red" LastDate="1135963705640" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.438 PST" Dirty="false" Elapsed="4769748" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-104489" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=104489" Kind="" Label="104489: clean up composite context API" LastDate="1121873724873" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-01-23 11:40:59.551 PST" Dirty="false" Elapsed="1319053" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-106939" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=106939" Kind="normal" Label="106939: Bugzilla query refresh in a task list should use scheduler" LastDate="1139969416537" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.418 PST" Dirty="false" Elapsed="1151886" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-104091" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=104091" Kind="" Label="104091: predicted interest items are never removed from the contest" LastDate="1121711114722" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-08-30 11:44:13.397 PDT" Dirty="false" Elapsed="5939" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-108409" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=108409" Kind="" Label="108409: make usage summary limit results to accepted users" LastDate="1138049389470" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-11-15 14:00:12.30 PST" Dirty="false" Elapsed="2117796" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-116514" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=116514" Kind="normal" Label="116514: support building against IBM JDK" LastDate="1139867271688" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-12-19 11:29:37.362 PST" Dirty="false" Elapsed="1582" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-118542" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=118542" Kind="normal" Label="118542: Open/close Java files leave interest on packages" LastDate="1140232909165" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="INCOMING"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.438 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-104070" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=104070" Kind="" Label="104070: put back drill-down adapter on task list" LastDate="1121707402243" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-15 21:40:25.105 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-121171" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=121171" Kind="" Label="121171: improve task list filtering and decoration" LastDate="1136518714497" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.418 PST" Dirty="false" Elapsed="6520355" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-104644" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=104644" Kind="" Label="104644: monitor task activation" LastDate="1122298988699" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-28 18:46:41.538 PDT" Dirty="false" Elapsed="1062989" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-111020" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=111020" Kind="" Label="111020: Freeze editing Java file with outline view up" LastDate="1127960674847" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.428 PST" Dirty="false" Elapsed="2264" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-106926" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=106926" Kind="" Label="106926: too many &quot;download failed&quot; messages in log" LastDate="1124771110778" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-05 14:50:16.627 PST" Dirty="false" Elapsed="3883583" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-119254" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=119254" Kind="" Label="119254: New bug id error with Bugzilla 2.20 (parsing)" LastDate="1134162719217" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-09-12 10:53:40.649 PDT" Dirty="false" Elapsed="19238155" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-106678" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=106678" Kind="normal" Label="106678: hierarchical layout in package explorer shows uninteresting elements" LastDate="1140232909145" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="INCOMING"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-05 18:24:44.377 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-107675" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=107675" Kind="" Label="107675: newly created resources should become interesting" LastDate="1129564555254" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-15 14:47:31.64 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-103276" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=103276" Kind="" Label="103276: Temporarily disable server property page test" LastDate="1134686879024" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2006-01-20 11:08:03.919 PST" Dirty="false" Elapsed="4460377" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-124676" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=124676" Kind="" Label="124676: Edit on F2 in Task view truncate task description" LastDate="1137795243286" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-10-27 17:58:51.92 PDT" Dirty="false" Elapsed="516784" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-114047" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=114047" Kind="enhancement" Label="114047: allow junit test suite of current context to run with low process priority" LastDate="1139867226363" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-01-23 11:39:07.430 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-124919" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=124919" Kind="normal" Label="124919: planner should only report time Elapsed during plan period" LastDate="1139969417058" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-08-25 16:04:15.442 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-108068" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=108068" Kind="" Label="108068: update active search based on resource changes" LastDate="1125370199281" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-11-19 15:42:40.551 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-117024" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=117024" Kind="" Label="117024: Content assist doesn't show static members (eg enum instances)" LastDate="1132630525591" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-12-07 14:30:27.428 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-106428" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=106428" Kind="normal" Label="106428: Need support for deploying features depending on other features" LastDate="1140115552510" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="INCOMING"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.438 PST" Dirty="false" Elapsed="215661" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-105094" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=105094" Kind="" Label="105094: invalidate search results" LastDate="1124994996120" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-12 07:21:41.57 PST" Dirty="false" Elapsed="6798932" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-120185" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=120185" Kind="" Label="120185: make task planner run with progress" LastDate="1134419352177" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.438 PST" Dirty="false" Elapsed="2784" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-104037" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=104037" Kind="" Label="104037: ensure that monitor can progress through phases" LastDate="1121707461108" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.418 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-103289" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=103289" Kind="" Label="103289: preserve downloaded labels during refresh" LastDate="1124994905640" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-06 09:41:07.674 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-100635" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=100635" Kind="" Label="100635: Provide live, always up to date, combined online help at eclipse.org" LastDate="1128616867704" Notes="" Priority="P3" Reminded="true" ReminderDate="2005-10-13 11:02:31.211 PDT" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2006-02-10 10:11:16.684 PST" Dirty="false" Elapsed="475364" EndDate="2006-02-15 20:13:00.0 PST" Estimated="0" Handle="https://bugs.eclipse.org/bugs-126866" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=126866" Kind="normal" Label="126866: NPE in new bugzilla report wizard" LastDate="1140052509929" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2006-02-10 12:34:09.281 PST" Dirty="false" Elapsed="79043613" EndDate="2006-02-14 21:18:00.0 PST" Estimated="0" Handle="https://bugs.eclipse.org/bugs-125438" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=125438" Kind="normal" Label="125438: make tasklist icons overlay-based" LastDate="1139970010061" Notes="" Priority="P1" Reminded="true" ReminderDate="2006-02-10 16:00:00.546 PST" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-08-25 15:01:28.826 PDT" Dirty="false" Elapsed="672957" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-108063" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=108063" Kind="normal" Label="108063: create policy for re-running active searches" LastDate="1139867242766" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-10-21 12:17:58.101 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-113399" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=113399" Kind="enhancement" Label="113399: add recommended preference changes" LastDate="1140232909115" Notes="" Priority="P2" Reminded="true" ReminderDate="" offlineSyncState="INCOMING"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-01-13 09:40:42.957 PST" Dirty="false" Elapsed="83721" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-224577" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=224577" Kind="" Label="224577: Bugzilla could use a web services interface" LastDate="1139867282053" Notes="" Priority="P4" Reminded="true" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-09-20 08:35:03.28 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-110042" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=110042" Kind="normal" Label="110042: consider limiting size of active search matches" LastDate="1139867257968" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-05 14:50:12.310 PST" Dirty="false" Elapsed="566453" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-119180" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=119180" Kind="" Label="119180: Cleanup of tasklist provider schema" LastDate="1133994245259" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-29 15:00:52.18 PDT" Dirty="false" Elapsed="0" EndDate="2005-09-30 09:43:00.0 PDT" Estimated="0" Handle="https://bugs.eclipse.org/bugs-111155" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=111155" Kind="normal" Label="111155: [Contributions] wrong toolbar height if first button has a pull-down menu" LastDate="1140115552540" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-04 10:48:02.103 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-115117" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=115117" Kind="" Label="115117: contexts junit tests failing to launch on 3.2M3" LastDate="1131938430713" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-27 18:00:09.345 PDT" Dirty="false" Elapsed="2359533" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-113585" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=113585" Kind="" Label="113585: Automatically fetch task title" LastDate="1138053053168" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.438 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-103364" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=103364" Kind="" Label="103364: add timestamp to user sign-up" LastDate="1124994983251" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-03 20:16:46.734 PST" Dirty="false" Elapsed="8880173" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-115017" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=115017" Kind="" Label="115017: bugzilla 2.20 hits only result in one match" LastDate="1131155473714" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2006-01-04 18:31:45.701 PST" Dirty="false" Elapsed="110174858" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-121041" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=121041" Kind="" Label="121041: Support more than one Bugzilla account per Workspace" LastDate="1137172947572" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-27 13:20:50.857 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-113564" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=113564" Kind="" Label="113564: Bugzilla provider does not work from behind firewall" LastDate="1132028533361" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.418 PST" Dirty="false" Elapsed="1692734" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-107152" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=107152" Kind="" Label="107152: make &quot;unsure&quot; the default for questionnaire responses" LastDate="1124771103588" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-08-25 07:30:34.984 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-107991" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=107991" Kind="normal" Label="107991: make one level of subtypes show in Active Hierarchy" LastDate="1139867240904" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-10-06 17:58:45.319 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-111865" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=111865" Kind="enhancement" Label="111865: create welcome page" LastDate="1139867219162" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-18 15:41:03.794 PST" Dirty="false" Elapsed="1301522" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-121326" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=121326" Kind="" Label="121326: MylarUiPlugin fails to activate if no mylar views visible" LastDate="1134950896191" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2006-02-16 13:41:20.408 PST" Dirty="false" Elapsed="1373624" EndDate="2006-02-16 16:41:00.0 PST" Estimated="0" Handle="https://bugs.eclipse.org/bugs-128256" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=128256" Kind="critical" Label="128256: Task list disappeared on restart" LastDate="1140126239417" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-02-17 19:21:28.956 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-128500" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=128500" Kind="normal" Label="128500: hits should show resolved status" LastDate="1140232940390" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-12-07 14:30:27.408 PST" Dirty="false" Elapsed="831420" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-103283" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=103283" Kind="normal" Label="103283: make predicted interest errors work for plugin.xml and other resources" LastDate="1139867236367" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="INCOMING"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-12 10:28:56.685 PDT" Dirty="false" Elapsed="1451607" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-109315" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109315" Kind="" Label="109315: package explorer fails to unlink with editor when Mylar is enabled" LastDate="1126557631304" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-04 13:23:55.739 PDT" Dirty="false" Elapsed="7464071" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-111022" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=111022" Kind="" Label="111022: Edit .properties file should make it be important" LastDate="1128738563993" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-09 10:54:48.599 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-119553" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=119553" Kind="" Label="119553: Refactor error reporting and logging support" LastDate="1134154533774" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-08-23 20:00:12.121 PDT" Dirty="false" Elapsed="118550" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-107812" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=107812" Kind="" Label="107812: add prompt to view tutorial video on phase1 start" LastDate="1126485645903" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-07 13:35:35.792 PST" Dirty="false" Elapsed="17232461" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-115394" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=115394" Kind="" Label="115394: improve the Task Planner reporting on activity" LastDate="1138053055822" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-09-13 18:15:58.940 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-109454" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109454" Kind="normal" Label="109454: make online access mode to report trigger offline mode" LastDate="1139867250257" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-08 20:00:17.293 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-109114" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109114" Kind="" Label="109114: command failures on startup" LastDate="1126897374142" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-11 16:44:39.983 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-109262" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109262" Kind="" Label="109262: problems list filter does not retain state on startup" LastDate="1126537281236" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-12-19 11:29:35.700 PST" Dirty="false" Elapsed="1662" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-116652" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=116652" Kind="" Label="116652: Activated indicator column does not resize correctly" LastDate="1136596782292" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.418 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-107081" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=107081" Kind="" Label="107081: completed bugs don't filter from root" LastDate="1124771068697" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-26 15:52:27.854 PDT" Dirty="false" Elapsed="885419" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-113916" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=113916" Kind="" Label="113916: fix exceptions reported in logs" LastDate="1130536677341" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-19 17:30:11.868 PST" Dirty="false" Elapsed="1108444" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-117100" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=117100" Kind="" Label="117100: tasks view should not change its title when paused" LastDate="1132510052722" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.428 PST" Dirty="false" Elapsed="9465866" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-102679" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=102679" Kind="" Label="102679: add show filtered action to navigator" LastDate="1122066516762" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-08-31 08:28:22.165 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-108475" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=108475" Kind="" Label="108475: if active task is only under archive reports it still needs to show up" LastDate="1126200114284" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2006-01-18 10:48:12.635 PST" Dirty="false" Elapsed="1040414" EndDate="2006-02-07 03:54:00.0 PST" Estimated="0" Handle="https://bugs.eclipse.org/bugs-119603" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=119603" Kind="normal" Label="119603: [api][content assist] allow contributions to filter and sort proposals" LastDate="1139510945170" Notes="" Priority="P3" Reminded="true" ReminderDate="2006-01-20 11:14:38.265 PST" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-08-25 13:07:22.471 PDT" Dirty="false" Elapsed="234350" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-103419" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=103419" Kind="" Label="103419: improve active search infrastructure" LastDate="1125010575602" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-12-07 14:30:27.418 PST" Dirty="false" Elapsed="8776295" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-104287" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=104287" Kind="enhancement" Label="104287: Alt+Click does not work in the Java Browsing Perspective" LastDate="1139867211521" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-02-09 11:51:18.388 PST" Dirty="false" Elapsed="3273570" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-126842" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=126842" Kind="enhancement" Label="126842: prototype JIRA support" LastDate="1140232905850" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-14 12:19:44.848 PDT" Dirty="false" Elapsed="15581" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-109536" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109536" Kind="" Label="109536: add keybindings for common actions" LastDate="1130988941373" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-14 10:17:38.59 PST" Dirty="false" Elapsed="2416917" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-115201" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=115201" Kind="" Label="115201: Del action deletes task only on second call" LastDate="1132622491809" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-02-09 14:13:12.40 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-126237" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=126237" Kind="normal" Label="126237: copying and pasting task contexts" LastDate="1140232912750" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-10-20 12:58:36.666 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-113275" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=113275" Kind="enhancement" Label="113275: improve PDE search and include manifest files" LastDate="1140232905850" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-11-01 08:42:22.359 PST" Dirty="false" Elapsed="803727" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-114561" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=114561" Kind="normal" Label="114561: restructure and fix up documentation" LastDate="1139867264137" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="INCOMING"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-22 14:11:29.324 PDT" Dirty="false" Elapsed="28067911" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-113461" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=113461" Kind="" Label="113461: allow mylar monitor to be disabled" LastDate="1130113992716" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-02 19:36:02.153 PST" Dirty="false" Elapsed="1854941" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-112722" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=112722" Kind="" Label="112722: adding task when drilled into a category should add it to that category" LastDate="1131036515614" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-02 15:05:10.808 PST" Dirty="false" Elapsed="4063139" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-114853" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=114853" Kind="" Label="114853: group Add actions into a submenu on the popup menu" LastDate="1130989290425" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-28 16:47:47.186 PDT" Dirty="false" Elapsed="269227" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-113277" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=113277" Kind="" Label="113277: Error while stopping &quot;org.eclipse.mylyn.java_0.3.12.e31&quot;." LastDate="1130543614295" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-12-09 14:53:51.633 PST" Dirty="false" Elapsed="4175748" EndDate="" Estimated="2" Handle="https://bugs.eclipse.org/bugs-119137" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=119137" Kind="enhancement" Label="119137: Task does not remember perspective" LastDate="1140232915965" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2006-01-13 11:59:22.583 PST" Dirty="false" Elapsed="5766922" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-123817" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=123817" Kind="" Label="123817: make add of existing report use repository" LastDate="1137809376949" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-08-25 08:11:58.706 PDT" Dirty="false" Elapsed="90" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-107582" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=107582" Kind="" Label="107582: Implement F3 &quot;open declaration&quot; action for pointcuts" LastDate="1125420269367" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-13 18:48:32.309 PDT" Dirty="false" Elapsed="35045443" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-109456" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109456" Kind="" Label="109456: problems list blinks in save in filtered mode" LastDate="1126893230364" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-14 10:52:31.482 PDT" Dirty="false" Elapsed="4970260" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-112572" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=112572" Kind="" Label="112572: allow a stats generating action to specify stats collectors" LastDate="1129326360528" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-20 10:04:13.856 PST" Dirty="false" Elapsed="8203474" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-117217" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=117217" Kind="" Label="117217: create action for navigating from change set to bug report" LastDate="1132531444892" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-16 11:02:39.585 PDT" Dirty="false" Elapsed="439031" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-106797" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=106797" Kind="" Label="106797: label decorator makes Package Explorer view flicker on marker change" LastDate="1132092845268" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-02-09 12:00:44.382 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-125959" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=125959" Kind="normal" Label="125959: [OLE] in-place editor for PDFs" LastDate="1140115558959" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="INCOMING"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-01-13 11:10:16.216 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-123813" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=123813" Kind="" Label="123813: bugzilla version should be associated with repository" LastDate="1138046466267" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-23 12:59:36.219 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-110490" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=110490" Kind="" Label="110490: make the data elements of the Active Hiearchy view be java elements" LastDate="1128562010809" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-12-07 14:30:27.438 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-103365" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=103365" Kind="normal" Label="103365: monitor scrolling activity" LastDate="1139867236627" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="INCOMING"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-23 12:12:49.24 PST" Dirty="false" Elapsed="1922885" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-117775" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=117775" Kind="" Label="117775: navigating back can fail if element in nested class is selected" LastDate="1133576107329" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-19 17:47:54.926 PST" Dirty="false" Elapsed="14416227" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-116449" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=116449" Kind="" Label="116449: package explorer scrolling on activation" LastDate="1132611848731" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.428 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-102680" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=102680" Kind="" Label="102680: all views should de-register taskscape listeners when deactivated" LastDate="1125370254210" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-09-22 13:30:45.296 PDT" Dirty="false" Elapsed="1487540" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-110375" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=110375" Kind="" Label="110375: concurrent modification exception during Java search" LastDate="1135954299415" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2006-02-10 11:36:58.478 PST" Dirty="false" Elapsed="34706105" EndDate="2006-02-16 10:53:00.0 PST" Estimated="0" Handle="https://bugs.eclipse.org/bugs-127123" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=127123" Kind="normal" Label="127123: Mylar does not remember Bugzilla Repository Settings" LastDate="1140105314338" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="INCOMING"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-08 14:01:47.552 PST" Dirty="false" Elapsed="2986639" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-115496" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=115496" Kind="" Label="115496: ApplyMylarToPackageExplorerAction may not be fully initialized" LastDate="1133323740055" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-08 10:22:13.211 PDT" Dirty="false" Elapsed="2249987" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-109016" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109016" Kind="" Label="109016: NullPointerException when building configuration" LastDate="1127403592919" Notes="" Priority="P2" Reminded="true" ReminderDate="2005-09-22 18:00:45.996 PDT" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-16 17:22:59.807 PDT" Dirty="false" Elapsed="93845" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-112751" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=112751" Kind="" Label="112751: temporary zip files don't get deleted" LastDate="1129564611014" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.418 PST" Dirty="false" Elapsed="1750957" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-106930" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=106930" Kind="" Label="106930: Task list is loosing its content after each restart" LastDate="1124994973027" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2006-01-20 16:10:56.490 PST" Dirty="false" Elapsed="974120" EndDate="2006-02-14 21:20:00.0 PST" Estimated="0" Handle="https://bugs.eclipse.org/bugs-122884" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=122884" Kind="normal" Label="122884: Mylar should provide a Milestone field in the Bug entering dialog box." LastDate="1139970596464" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2006-01-13 09:34:46.4 PST" Dirty="false" Elapsed="7028571" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-107487" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=107487" Kind="" Label="107487: add &quot;validate password&quot; to bugzilla prefs page" LastDate="1137188249087" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-21 19:35:28.154 PST" Dirty="false" Elapsed="91242" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-116869" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=116869" Kind="" Label="116869: Mylar classpath broken when using alt install locations in e3.1.1" LastDate="1134613130129" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2006-02-14 18:01:40.986 PST" Dirty="false" Elapsed="175461" EndDate="2006-02-14 21:07:00.0 PST" Estimated="0" Handle="https://bugs.eclipse.org/bugs-125982" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=125982" Kind="major" Label="125982: [linux] Tooltips don't disappear" LastDate="1139969384952" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-26 14:46:23.443 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-110731" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=110731" Kind="" Label="110731: bugzilla task in category fails to activate on startup" LastDate="1128046911717" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-11-19 16:41:22.15 PST" Dirty="false" Elapsed="1245737" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-115159" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=115159" Kind="" Label="115159: could not connect to Bugzilla, could not troubleshoot" LastDate="1132630522997" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.418 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-104555" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=104555" Kind="" Label="104555: add mechanism for analyzing statistics per-user" LastDate="1122298957294" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-18 16:36:05.847 PDT" Dirty="false" Elapsed="8128573" EndDate="" Estimated="3" Handle="https://bugs.eclipse.org/bugs-107457" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=107457" Kind="" Label="107457: Make tasklist saves more eager" LastDate="1133567856655" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-23 14:53:48.585 PDT" Dirty="false" Elapsed="2931195" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-107810" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=107810" Kind="" Label="107810: toggle of folding can cause file modification when using VSSPlugin" LastDate="1127521801865" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 18:52:38.401 PST" Dirty="false" Elapsed="2477210" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-119785" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=119785" Kind="" Label="119785: Endless flicker loop after CVS exception" LastDate="1134075577625" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-12-07 14:30:27.428 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-104340" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=104340" Kind="normal" Label="104340: multiple tasks active not working correctly" LastDate="1139867237619" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-12 10:32:58.843 PDT" Dirty="false" Elapsed="6981265" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-109317" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109317" Kind="" Label="109317: inconsistent coloring in when Mylar filter is off" LastDate="1129169570136" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.418 PST" Dirty="false" Elapsed="799029" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-103915" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=103915" Kind="" Label="103915: Parameters are missing from the context assist" LastDate="1121707397366" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-08 14:24:05.886 PST" Dirty="false" Elapsed="818480" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-115199" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=115199" Kind="" Label="115199: Pause/Resume Capturing Context action should be on the toolbar" LastDate="1131500615341" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-10-27 18:42:12.994 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-114050" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=114050" Kind="normal" Label="114050: support plans in task list" LastDate="1139867264137" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="INCOMING"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-14 12:30:10.968 PDT" Dirty="false" Elapsed="2777286" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-109538" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109538" Kind="" Label="109538: make active search disable when view is not active" LastDate="1126738790857" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-03 15:09:03.983 PDT" Dirty="false" Elapsed="10351623" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-111390" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=111390" Kind="" Label="111390: improve outline refresh lainess and ensure that outline does not set selections when link mode is off" LastDate="1128648740968" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-09-21 18:53:20.151 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-110281" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=110281" Kind="normal" Label="110281: move commons dependancies to be on SDK" LastDate="1139867260432" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.428 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-104057" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=104057" Kind="" Label="104057: on startup active task's context is inactive" LastDate="1121707426028" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-02-13 12:36:09.662 PST" Dirty="false" Elapsed="107332" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-74795" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=74795" Kind="enhancement" Label="74795: [Viewers] Generic quick filter for large tree-based views" LastDate="1139867290525" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="INCOMING"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-12-07 14:30:27.438 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-104062" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=104062" Kind="enhancement" Label="104062: in &quot;new bug report&quot;, put the previously-submitted to components on top" LastDate="1139867210760" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-01-23 15:13:06.832 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-124955" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=124955" Kind="" Label="124955: modifying a task should refresh the containing query category" LastDate="1138061383156" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-08 11:52:57.262 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-115535" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=115535" Kind="" Label="115535: renamed perspective usage logged incorrectly" LastDate="1138052463590" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-21 11:41:31.6 PDT" Dirty="false" Elapsed="1539003" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-113394" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=113394" Kind="" Label="113394: refactor common per-user analysis code" LastDate="1129925458584" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-28 10:43:29.416 PDT" Dirty="false" Elapsed="4510333" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-114156" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=114156" Kind="" Label="114156: create new icons" LastDate="1130534618450" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2006-01-13 09:34:57.391 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-123681" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=123681" Kind="" Label="123681: query categories don't refresh after modification" LastDate="1137188934002" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-12-07 14:30:27.448 PST" Dirty="false" Elapsed="74535177" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-103736" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=103736" Kind="enhancement" Label="103736: add interest sorter to problems list" LastDate="1139867210750" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="INCOMING"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2006-02-09 14:22:59.134 PST" Dirty="false" Elapsed="0" EndDate="2006-02-16 00:43:00.0 PST" Estimated="0" Handle="https://bugs.eclipse.org/bugs-127182" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=127182" Kind="normal" Label="127182: bugzilla outline missing in generic task editor" LastDate="1139867126599" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 10:20:13.129 PST" Dirty="false" Elapsed="2753429" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-119692" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=119692" Kind="" Label="119692: tooltip showing current task summary on mylar task view icon" LastDate="1133982239215" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-02 11:45:41.677 PST" Dirty="false" Elapsed="740249" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-114318" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=114318" Kind="" Label="114318: Task in task list disappearing" LastDate="1131081231048" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-21 13:12:54.942 PDT" Dirty="false" Elapsed="724944" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-113292" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=113292" Kind="" Label="113292: Task summary editor tab for issue report web page" LastDate="1138053048471" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.428 PST" Dirty="false" Elapsed="2090707" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-106690" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=106690" Kind="" Label="106690: add &quot;edit highlighters&quot; button to &quot;choose highlighter&quot; menu" LastDate="1126663733675" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2006-01-13 15:11:00.797 PST" Dirty="false" Elapsed="5109170" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-123845" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=123845" Kind="" Label="123845: provide query page extensibility" LastDate="1138138923398" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-15 19:37:33.720 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-116450" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=116450" Kind="" Label="116450: making a resource less interesting fails to remove it from the commit set" LastDate="1132277808372" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-25 13:00:36.218 PDT" Dirty="false" Elapsed="928275" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-113696" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=113696" Kind="" Label="113696: make usage upload wizard aware of monitor extensions" LastDate="1130271605560" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-09 11:24:33.346 PST" Dirty="false" Elapsed="2272012" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-115514" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=115514" Kind="" Label="115514: Editors closed on task deactivation should be opened on reactivation" LastDate="1131584611098" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-26 09:14:04.591 PDT" Dirty="false" Elapsed="2832617" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-110630" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=110630" Kind="" Label="110630: java.lang.VerifyError with Mylar 0.3.9 on Eclipse 3.2M2" LastDate="1127760088249" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2006-01-13 10:43:34.153 PST" Dirty="false" Elapsed="175612" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-123806" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=123806" Kind="" Label="123806: create default perspective and shortcut locations" LastDate="1137192636346" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-08-26 10:54:54.462 PDT" Dirty="false" Elapsed="922376" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-108158" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=108158" Kind="" Label="108158: make folding state toggle with task activation" LastDate="1137785678732" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2006-01-06 08:18:19.991 PST" Dirty="false" Elapsed="1509289" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-122700" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=122700" Kind="" Label="122700: expose all task state editable via the form editor and improve form formatting" LastDate="1137105361317" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.428 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-103422" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=103422" Kind="" Label="103422: labels showing HTML characters wrong" LastDate="1124995019193" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-01-16 10:54:56.550 PST" Dirty="false" Elapsed="274706" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-124006" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=124006" Kind="" Label="124006: support sorting tasklist items as both ascending and descending" LastDate="1138147907200" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-11-08 08:04:38.712 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-115498" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=115498" Kind="normal" Label="115498: [discussion] rewind and replay of context capture" LastDate="1139867267322" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.418 PST" Dirty="false" Elapsed="17612758" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-104110" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=104110" Kind="" Label="104110: add support for resetting edges" LastDate="1125010277934" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-05 09:17:23.708 PDT" Dirty="false" Elapsed="28296573" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-111603" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=111603" Kind="" Label="111603: Allow unit tests in Mylar context to be run as a group" LastDate="1129201561141" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-08-24 16:45:30.483 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-107948" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=107948" Kind="" Label="107948: propagated interest sticks for error packages" LastDate="1133288110121" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-09-14 10:51:11.778 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-109523" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109523" Kind="" Label="109523: move flash demos to downloads area" LastDate="1137104545113" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-14 10:16:56.770 PST" Dirty="false" Elapsed="374549" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-114808" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=114808" Kind="" Label="114808: Query form is hard to use under linux" LastDate="1137798886354" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-24 08:54:25.942 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-113554" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=113554" Kind="" Label="113554: support ajsym file generation for command line builds" LastDate="1131418209029" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-13 20:43:30.27 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-109462" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109462" Kind="" Label="109462: can't change category name" LastDate="1138049395739" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.438 PST" Dirty="false" Elapsed="1122765" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-106566" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=106566" Kind="" Label="106566: make the sign-up form HTML" LastDate="1124151496496" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-18 19:49:00.645 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-113031" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=113031" Kind="" Label="113031: launching spring viewer causes workbench exit" LastDate="1130957199063" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-14 10:48:03.197 PDT" Dirty="false" Elapsed="16845435" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-109521" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109521" Kind="" Label="109521: create eclipse.org update site" LastDate="1130444453371" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-30 11:19:46.799 PST" Dirty="false" Elapsed="17679767" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-118461" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=118461" Kind="" Label="118461: code assist for static methods/fields not working" LastDate="1134491716179" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-03 15:18:28.384 PDT" Dirty="false" Elapsed="4325210" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-110747" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=110747" Kind="" Label="110747: automatically open the task list when Mylar first runs" LastDate="1128393385327" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-20 15:15:18.345 PDT" Dirty="false" Elapsed="777217" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-110112" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=110112" Kind="" Label="110112: tasks fail to get removed from root" LastDate="1127273883301" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-27 10:58:59.749 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-114009" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=114009" Kind="" Label="114009: make bugzilla depdency optional" LastDate="1130466703225" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.438 PST" Dirty="false" Elapsed="11665515" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-103748" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=103748" Kind="" Label="103748: make highlighters work with de-coupled task list" LastDate="1121707417445" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-19 09:39:58.137 PDT" Dirty="false" Elapsed="6575324" EndDate="2006-02-15 20:20:00.0 PST" Estimated="0" Handle="https://bugs.eclipse.org/bugs-109902" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109902" Kind="normal" Label="109902: integrate reminders into the task list" LastDate="1140053722062" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-01-23 10:56:34.710 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-124908" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=124908" Kind="" Label="124908: improve bugzilla notification of incoming information" LastDate="1138061370538" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-30 09:26:01.8 PDT" Dirty="false" Elapsed="3165743" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-111226" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=111226" Kind="" Label="111226: suppress active search running if view is not active" LastDate="1128113086843" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-13 18:09:45.772 PDT" Dirty="false" Elapsed="2015840" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-112019" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=112019" Kind="" Label="112019: CVS text decorator applied twice on Active Search view" LastDate="1129258727032" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.438 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-103440" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=103440" Kind="" Label="103440: support bugzilla refresh on a standard category" LastDate="1124995016870" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.418 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-102673" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=102673" Kind="" Label="102673: task editor dirty state" LastDate="1124994883859" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-09-14 18:46:27.756 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-109559" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109559" Kind="enhancement" Label="109559: add &quot;dependant project&quot; degree of separation" LastDate="1139867215107" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.418 PST" Dirty="false" Elapsed="11050791" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-107463" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=107463" Kind="" Label="107463: &quot;unfiltered&quot; view selections are reported incorrectly" LastDate="1124828168368" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-17 15:20:24.441 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-116948" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=116948" Kind="" Label="116948: Alt-Click in views not working under Linux" LastDate="1134773358999" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.408 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-102047" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=102047" Kind="" Label="102047: Drag and Drop overwrites task description" LastDate="1125370217748" Notes="" Priority="P5" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-13 13:29:05.600 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-112550" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=112550" Kind="" Label="112550: contentProviderClass extension point should be of kind &quot;class&quot;" LastDate="1130444336903" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.428 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-102916" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=102916" Kind="" Label="102916: split bugzilla into core and ui plugins" LastDate="1121299174811" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-08-24 11:09:38.698 PDT" Dirty="false" Elapsed="10291666" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-107542" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=107542" Kind="" Label="107542: Build errors should increase interest level for java files" LastDate="1124927231658" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-08 08:09:15.527 PDT" Dirty="false" Elapsed="1366330" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-108811" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=108811" Kind="" Label="108811: Installer screen freezes" LastDate="1130521761453" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.418 PST" Dirty="false" Elapsed="3591754" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-102800" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=102800" Kind="" Label="102800: selections in package explorer jump to previous location" LastDate="1123883273792" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-12-18 15:30:40.458 PST" Dirty="false" Elapsed="532009" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-121318" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=121318" Kind="" Label="121318: NumberFormatException on Preferences-&gt;Mylar-&gt;Bugzilla on Mac OS X" LastDate="1137444019938" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-23 15:31:36.796 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-115885" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=115885" Kind="" Label="115885: add a background questionnaire wizard page" LastDate="1138052460886" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.428 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-104889" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=104889" Kind="" Label="104889: differentiate between element selections of normal, decayed, interesting" LastDate="1124770953782" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-11-07 11:27:16.421 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-63692" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=63692" Kind="minor" Label="63692: [projection] Annotations in folded region are not rendered in overview ruler" LastDate="1140115547292" Notes="" Priority="P3" Reminded="false" ReminderDate="2006-02-21 15:02:00.0 PST" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.438 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-103588" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=103588" Kind="" Label="103588: use extension points in place of ITaskListActionContributor" LastDate="1124994888375" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-11 17:45:35.99 PDT" Dirty="false" Elapsed="530042" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-109147" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109147" Kind="" Label="109147: &quot;link with editor&quot; doesn't work" LastDate="1126486674692" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-26 14:13:29.665 PDT" Dirty="false" Elapsed="1570628" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-110724" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=110724" Kind="" Label="110724: background coloring of task list elements is wrong on 3.2" LastDate="1131418223970" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-01-05 12:30:52.22 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-122804" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=122804" Kind="" Label="122804: make bugzilla options refresh when repository is added" LastDate="1138146782242" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-12-07 14:30:27.418 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-103728" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=103728" Kind="enhancement" Label="103728: consider changing active search quick view to JavaOutlineInformationControl subclass" LastDate="1139867277356" Notes="" Priority="P5" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-02-17 16:45:44.521 PST" Dirty="false" Elapsed="548099" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-126271" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=126271" Kind="normal" Label="126271: support import of task list and contexts" LastDate="1140230324749" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-23 14:52:18.756 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-109804" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109804" Kind="" Label="109804: Differentiating task categories is difficult with Mylar as similar to default background on Linux-GTK" LastDate="1127519342849" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-04 18:32:26.891 PDT" Dirty="false" Elapsed="50851677" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-56779" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=56779" Kind="" Label="56779: [ajdoc] add ajdoc support for inter-type declarations and other declare forms" LastDate="1128529129351" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-04 15:08:57.194 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-115179" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=115179" Kind="" Label="115179: new bug creation fails on with bugzilla 2.20" LastDate="1131152072894" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-23 20:01:06.40 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-117631" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=117631" Kind="" Label="117631: NPE in JavaProblemListener" LastDate="1132805609229" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-03 12:37:33.521 PDT" Dirty="false" Elapsed="6079411" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-111375" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=111375" Kind="" Label="111375: improve laziness of managed viewer refresh" LastDate="1128377422455" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-12-07 14:30:27.438 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-104799" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=104799" Kind="normal" Label="104799: show filtered fails to clear root nodes in navigator view" LastDate="1139867239371" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-25 13:59:25.633 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-113711" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=113711" Kind="" Label="113711: set up automated build process" LastDate="1130453566835" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-23 14:53:37.579 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-107865" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=107865" Kind="" Label="107865: decrement interest fails to refresh label when not in filtered mode" LastDate="1129564567932" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-13 19:26:51.627 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-112586" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=112586" Kind="" Label="112586: [api] add support for toggling folding for IJavaElement's" LastDate="1129312022509" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-08-26 10:18:49.359 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-108154" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=108154" Kind="" Label="108154: navigating to previous task doesn't work if only one task has been activated then deactivated" LastDate="1125080961665" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-08-23 18:35:24.476 PDT" Dirty="false" Elapsed="4753561" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-107809" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=107809" Kind="" Label="107809: make error logging more verbose" LastDate="1124906803747" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-09 19:29:04.44 PDT" Dirty="false" Elapsed="12477313" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-109235" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109235" Kind="" Label="109235: interest should be maintained across a refactoring" LastDate="1129338671240" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-24 13:51:10.473 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-117374" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=117374" Kind="" Label="117374: adding resources to mylar commit set should add them into task context" LastDate="1132889558336" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-01-04 18:40:27.441 PST" Dirty="false" Elapsed="1621530" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-122706" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=122706" Kind="" Label="122706: create developer FAQ" LastDate="1138146810783" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-10-19 20:49:41.925 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-113185" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=113185" Kind="" Label="113185: editor jumps to previous wrong selection when navigating" LastDate="1133546448664" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-09-19 10:33:55.983 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-36961" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=36961" Kind="" Label="36961: [Navigator][Plan Item] Provide a general purpose navigator" LastDate="1138052555783" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2006-01-23 11:40:59.551 PST" Dirty="false" Elapsed="305077" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-123801" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=123801" Kind="" Label="123801: Reminder date popup is duplicated when the combo button is pressed twice" LastDate="1138156635831" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-03 12:21:57.955 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-114988" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=114988" Kind="" Label="114988: a selected type can fail to show up in the open type list" LastDate="1131418052924" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-01-16 12:39:51.407 PST" Dirty="false" Elapsed="104549" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-123883" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=123883" Kind="" Label="123883: In task planner d-n-d does not work for multiple tasks" LastDate="1137444028391" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2006-01-19 15:51:42.872 PST" Dirty="false" Elapsed="749178" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-116751" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=116751" Kind="" Label="116751: Mylar Tests Fail Under Linux" LastDate="1137715732522" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-103734" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=103734" Kind="" Label="103734: add statistics generation check for phase switch" LastDate="1124995045211" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.418 PST" Dirty="false" Elapsed="2056367" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-104873" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=104873" Kind="" Label="104873: suppress active search results showing up in package explorer" LastDate="1125005457583" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-26 11:55:48.265 PDT" Dirty="false" Elapsed="3753301" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-110688" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=110688" Kind="" Label="110688: active search causes workbench freeze" LastDate="1128113033246" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-11 08:33:02.521 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-109251" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109251" Kind="" Label="109251: context is not saved on shutdown or task deactivation" LastDate="1126480322578" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="true" Bugzilla="true" Complete="false" CreationDate="2006-02-16 18:40:51.820 PST" Dirty="false" Elapsed="21373066" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-126775" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=126775" Kind="" Label="126775: &gt;fix task archive and category duplication" LastDate="1140232905850" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-06 18:08:45.92 PDT" Dirty="false" Elapsed="2181507" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-111866" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=111866" Kind="" Label="111866: when a report is submitted, only refresh that report" LastDate="1132624870008" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-01-20 11:10:47.214 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-120499" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=120499" Kind="normal" Label="120499: Mylar should make explicitly created resources interesting, and ignore others" LastDate="1140232912730" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="INCOMING"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-11-20 15:58:12.906 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-117233" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=117233" Kind="normal" Label="117233: xml and bugzilla bridges should implement retrieving children" LastDate="1139867271718" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="INCOMING"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-11-14 10:17:07.275 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-115041" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=115041" Kind="normal" Label="115041: Task highlighters look ugly on gtk" LastDate="1139969416537" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="INCOMING"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-02-10 11:50:26.670 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-125936" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=125936" Kind="normal" Label="125936: add option to activate tasks on open" LastDate="1139867277116" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-08-31 10:23:35.516 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-108487" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=108487" Kind="" Label="108487: add object contributions to active views" LastDate="1128046776713" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-25 11:44:09.400 PST" Dirty="false" Elapsed="1253762" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-117370" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=117370" Kind="" Label="117370: commit set text is not updated when task title is changed" LastDate="1133557772856" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:01:56.989 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-119646" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=119646" Kind="" Label="119646: Mylar deadlocked eclipse while deleting a file" LastDate="1134060189346" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-14 11:49:29.898 PDT" Dirty="false" Elapsed="1387152" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-109530" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109530" Kind="" Label="109530: all hits opened via Task List could become reports" LastDate="1138169636475" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-21 11:02:05.725 PDT" Dirty="false" Elapsed="46267188" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-113386" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=113386" Kind="" Label="113386: support viewing of web docs in context" LastDate="1130202930219" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2006-01-23 15:15:39.41 PST" Dirty="false" Elapsed="2766841" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-124768" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=124768" Kind="" Label="124768: Back button broken in the add repository query wizard" LastDate="1138060040245" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-12-05 12:37:06.72 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-119307" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=119307" Kind="normal" Label="119307: resources and other moved elements should maintain interest" LastDate="1139867274171" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="INCOMING"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-16 20:04:56.997 PDT" Dirty="false" Elapsed="3571925" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-109816" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109816" Kind="" Label="109816: active search labels blink on every selection" LastDate="1127450562857" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-01-18 08:34:03.769 PST" Dirty="false" Elapsed="491120" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-124321" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=124321" Kind="normal" Label="124321: explore making local tasks be a repository" LastDate="1139969416998" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-06 11:06:13.796 PDT" Dirty="false" Elapsed="2254386" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-111813" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=111813" Kind="" Label="111813: make error interest a preference" LastDate="1129258604866" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-05 12:29:44.777 PST" Dirty="false" Elapsed="17486191" EndDate="" Estimated="1" Handle="https://bugs.eclipse.org/bugs-119301" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=119301" Kind="" Label="119301: improve task planner activity period and UI" LastDate="1134690087197" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.418 PST" Dirty="false" Elapsed="951" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-104089" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=104089" Kind="" Label="104089: on bug change refresh" LastDate="1124994985755" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-10-12 18:48:16.777 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-112424" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=112424" Kind="minor" Label="112424: test for failure of non-filtered mode refresh" LastDate="1139867236367" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-12-08 13:12:31.127 PST" Dirty="false" Elapsed="379412" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-119835" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=119835" Kind="" Label="119835: Compile eror on latest integration builds" LastDate="1134076568861" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-09-12 10:18:13.460 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-109314" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109314" Kind="normal" Label="109314: auto folding hides annotation matches" LastDate="1139867249686" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-09 10:54:19.457 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-118581" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=118581" Kind="" Label="118581: All tests failing on shared task folder test" LastDate="1134154633467" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-01-18 16:10:00.648 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-124420" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=124420" Kind="" Label="124420: allow task times to be refreshed in editors" LastDate="1138061385589" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-05 20:01:22.484 PDT" Dirty="false" Elapsed="14135329" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-111722" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=111722" Kind="" Label="111722: reactivating multiple context results in no editors opened" LastDate="1132022966266" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-09 10:55:10.911 PST" Dirty="false" Elapsed="4221393" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-119672" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=119672" Kind="" Label="119672: No Status set on new bugs created through new Bugtask Wizard" LastDate="1134165750085" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-01-02 12:05:20.848 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-122469" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=122469" Kind="enhancement" Label="122469: [performance] create structure bridge cache" LastDate="1139867229678" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="INCOMING"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-01-23 10:26:17.146 PST" Dirty="false" Elapsed="1769823" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-124224" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=124224" Kind="" Label="124224: Allow to edit priorities in the task planner" LastDate="1138061380642" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-23 07:43:46.565 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-113471" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=113471" Kind="" Label="113471: remove log file functionality" LastDate="1130114103626" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.428 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-106924" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=106924" Kind="" Label="106924: npe when no products are available" LastDate="1124771124678" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-10-19 21:17:11.226 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-113187" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=113187" Kind="normal" Label="113187: make content type an extension, not API" LastDate="1139867264077" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-02 10:04:19.808 PST" Dirty="false" Elapsed="1071491" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-116488" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=116488" Kind="" Label="116488: Priority dropdown in Tasks View behaves incorrectly" LastDate="1134772361485" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-09-09 15:19:01.310 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-109214" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109214" Kind="normal" Label="109214: create active serach UI test harness" LastDate="1139867244118" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-29 12:50:24.605 PST" Dirty="false" Elapsed="229059" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-118513" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=118513" Kind="" Label="118513: navigator should automatically expand on context activation" LastDate="1136230714959" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-20 14:07:23.534 PDT" Dirty="false" Elapsed="1723173" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-113111" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=113111" Kind="" Label="113111: JDT failing on open type (ctrl+shit+T)" LastDate="1130537425697" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-10-04 15:57:43.268 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-111540" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=111540" Kind="enhancement" Label="111540: add overlay to indicate task completion" LastDate="1139867217160" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-14 18:27:37.855 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-115931" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=115931" Kind="" Label="115931: allow customized monitor plugins to specify a version number" LastDate="1138052466054" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.418 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-102946" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=102946" Kind="" Label="102946: provide unified utility for InteractionEvent externalization" LastDate="1124994924116" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Dirty="false" Elapsed="1285688" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-107055" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=107055" Kind="" Label="107055: Task List Filter" LastDate="1124232070888" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-19 17:51:47.41 PDT" Dirty="false" Elapsed="50173973" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-106257" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=106257" Kind="" Label="106257: Proposed enhancement: Decouple UBC study" LastDate="1127493660385" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-10-21 13:04:20.412 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-113408" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=113408" Kind="" Label="113408: refactor coupling between tasklist, ui, and bugzilla" LastDate="1138041607861" Notes="" Priority="P5" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-10-06 17:33:53.494 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-111864" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=111864" Kind="enhancement" Label="111864: make open type history sorting be based on interest" LastDate="1139867218882" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2006-01-04 18:30:12.47 PST" Dirty="false" Elapsed="778837" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-121448" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=121448" Kind="" Label="121448: ConcurrentModificationException when &quot;Updating Change Sets for CVS Workspace&quot;" LastDate="1136592991580" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-28 18:16:58.654 PDT" Dirty="false" Elapsed="351746" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-110991" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=110991" Kind="" Label="110991: Shouldn't have to activate a task before choosing a highlighter" LastDate="1127957287806" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-25 13:08:33.679 PST" Dirty="false" Elapsed="7194593" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-112593" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=112593" Kind="" Label="112593: Problems found by FindBugs" LastDate="1132965949120" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-01-20 11:31:05.686 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-124702" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=124702" Kind="normal" Label="124702: [projection] redraw problem with JavaEditor.resetProject()" LastDate="1140115558879" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 08:38:12.177 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-119305" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=119305" Kind="" Label="119305: cannot find eithics/consent form (.html file)" LastDate="1138052468417" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-07 18:46:08.121 PDT" Dirty="false" Elapsed="10291154" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-111388" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=111388" Kind="" Label="111388: Add &quot;Link With Editor&quot; button to Active Search view" LastDate="1134761960409" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-26 08:37:19.580 PDT" Dirty="false" Elapsed="8243956" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-110508" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=110508" Kind="" Label="110508: Allow drag-n-drop to Active Search to create landmark" LastDate="1127763670149" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-12 12:46:58.553 PDT" Dirty="false" Elapsed="844674" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-112374" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=112374" Kind="" Label="112374: Mylar fails ungracefully when mozilla is not found" LastDate="1129201817399" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.428 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-103537" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=103537" Kind="" Label="103537: password shows up in query string when internal browser used" LastDate="1124994881665" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-02-09 11:12:05.324 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-127135" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=127135" Kind="normal" Label="127135: improve bug search integration" LastDate="1139515114565" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-12-16 12:29:06.883 PST" Dirty="false" Elapsed="3138419" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-121221" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=121221" Kind="" Label="121221: Stack traces in Eclipse log" LastDate="1135020566487" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-10-27 15:58:24.60 PDT" Dirty="false" Elapsed="12167364" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-114040" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=114040" Kind="enhancement" Label="114040: imporove web docs integration" LastDate="1139867225471" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-14 20:59:58.959 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-116369" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=116369" Kind="" Label="116369: times are wrong in comments" LastDate="1132105119201" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-01-16 11:07:08.462 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-124011" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=124011" Kind="" Label="124011: add support for exporting planner data" LastDate="1138147871879" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-06 19:19:16.210 PST" Dirty="false" Elapsed="10065326" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-119556" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=119556" Kind="" Label="119556: fix task list drag and drop" LastDate="1133931011564" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-11 08:36:15.319 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-109252" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109252" Kind="" Label="109252: active task not consistently highlighted" LastDate="1126482418232" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-12-07 14:30:27.428 PST" Dirty="false" Elapsed="649273" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-104783" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=104783" Kind="enhancement" Label="104783: landmarks blink on save" LastDate="1139867215107" Notes="" Priority="P4" Reminded="true" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.408 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-103235" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=103235" Kind="" Label="103235: support monitoring multiple workbench windows" LastDate="1124994874946" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-10-23 07:24:48.77 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-113470" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=113470" Kind="enhancement" Label="113470: apply mylar to task list" LastDate="1139867219303" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.428 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-102668" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=102668" Kind="" Label="102668: Provide mailing list statistics in the Committer tools" LastDate="1129688008560" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-27 19:28:58.498 PDT" Dirty="false" Elapsed="1836552" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-113985" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=113985" Kind="" Label="113985: Too much expansion in Package Explorer" LastDate="1130468431219" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.408 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-104553" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=104553" Kind="" Label="104553: after new report is created via task list, open it" LastDate="1121906604536" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:02:00.694 PST" Dirty="false" Elapsed="5410856" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-118584" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=118584" Kind="" Label="118584: Mylar task context and change set disagree" LastDate="1134014468601" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-17 08:49:53.754 PDT" Dirty="false" Elapsed="382590" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-112812" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=112812" Kind="" Label="112812: deactivation doesn't add task to history" LastDate="1138053075470" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-13 18:56:54.580 PST" Dirty="false" Elapsed="4342784" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-120790" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=120790" Kind="" Label="120790: recursive editor activation attempt with MyEclipse" LastDate="1134533853759" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-14 12:06:55.802 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-109534" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109534" Kind="" Label="109534: add &quot;remove from this category&quot; action" LastDate="1126846132910" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-08-24 17:00:28.224 PDT" Dirty="false" Elapsed="5441527" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-107459" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=107459" Kind="" Label="107459: Deactivate mylar filter in all views on task deactivation" LastDate="1124993586984" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-09-20 08:23:50.271 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-110037" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=110037" Kind="normal" Label="110037: find referencing contexts" LastDate="1139867256136" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="INCOMING"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-08-30 20:06:13.461 PDT" Dirty="false" Elapsed="135417" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-108441" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=108441" Kind="normal" Label="108441: make relation providers extension point based" LastDate="1139867244108" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-08-29 15:23:50.539 PDT" Dirty="false" Elapsed="6230" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-107348" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=107348" Kind="major" Label="107348: Mylar should not increase interest when scrolling trough search results" LastDate="1139867234725" Notes="" Priority="P4" Reminded="true" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-04 17:11:32.481 PDT" Dirty="false" Elapsed="3807715" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-110511" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=110511" Kind="" Label="110511: Dragging from Active search does not work" LastDate="1128474571283" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-10-28 13:59:07.895 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-114254" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=114254" Kind="enhancement" Label="114254: create new landmark manipulation icons and fix names" LastDate="1139867279519" Notes="" Priority="P5" Reminded="true" ReminderDate="" offlineSyncState="INCOMING"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-08-30 09:50:19.721 PDT" Dirty="false" Elapsed="233265" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-108398" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=108398" Kind="" Label="108398: on reactivation of context state appears to be lost" LastDate="1128654257120" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-19 11:29:52.14 PST" Dirty="false" Elapsed="4736409" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-121208" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=121208" Kind="" Label="121208: Option to open bugzilla task automatically in external browser" LastDate="1136509161747" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-08-30 10:57:21.474 PDT" Dirty="false" Elapsed="6176261" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-108408" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=108408" Kind="" Label="108408: don't allow non-existing elements to be landmarks" LastDate="1126839784231" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2006-01-05 13:47:31.366 PST" Dirty="false" Elapsed="9910820" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-122795" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=122795" Kind="" Label="122795: Unable to remove tasks from root category" LastDate="1136514758269" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-03 15:11:50.175 PST" Dirty="false" Elapsed="1575775" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-114930" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=114930" Kind="" Label="114930: support Eclipse 3.2M3" LastDate="1131064042392" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-09 09:50:39.374 PST" Dirty="false" Elapsed="5017180" EndDate="" Estimated="2" Handle="https://bugs.eclipse.org/bugs-119614" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=119614" Kind="" Label="119614: support Eclipse 3.2M4" LastDate="1134686110769" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.418 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-104074" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=104074" Kind="" Label="104074: make all Java active search categories one and add drop-downs" LastDate="1121745262596" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.438 PST" Dirty="false" Elapsed="33181410" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-106762" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=106762" Kind="" Label="106762: add within user analysis of edit ratio" LastDate="1124852156624" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-29 20:03:31.733 PST" Dirty="false" Elapsed="5654594" EndDate="" Estimated="1" Handle="https://bugs.eclipse.org/bugs-118541" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=118541" Kind="" Label="118541: mylar is tracking context with no active task" LastDate="1133568236852" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-12-19 11:29:52.14 PST" Dirty="false" Elapsed="44885" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-121329" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=121329" Kind="normal" Label="121329: ensure that there are no leaks of Color and Image" LastDate="1140232912740" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-12-19 11:29:52.14 PST" Dirty="false" Elapsed="81568" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-121442" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=121442" Kind="normal" Label="121442: Active Search hogs the CPU" LastDate="1140232919800" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="INCOMING"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.418 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-106925" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=106925" Kind="" Label="106925: error stopping bugzilla plug-in" LastDate="1124771118279" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-12-07 14:30:27.438 PST" Dirty="false" Elapsed="2182809" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-103288" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=103288" Kind="" Label="103288: &quot;close all editors&quot; not closing all" LastDate="1121884443786" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-27 18:04:28.948 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-114048" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=114048" Kind="" Label="114048: new bug wizard blank when no bugzilla credentials set" LastDate="1138049265211" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-16 11:18:16.242 PDT" Dirty="false" Elapsed="2968359" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-109783" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109783" Kind="" Label="109783: provide indication of whether task has context" LastDate="1138053070533" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2006-01-19 16:49:46.631 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-124567" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=124567" Kind="" Label="124567: task description get truncated on save" LastDate="1137784331875" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-11-20 12:54:53.400 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-117225" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=117225" Kind="" Label="117225: periodic &quot;SWTError: No more handles&quot; error" LastDate="1133546533326" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-28 19:17:03.408 PDT" Dirty="false" Elapsed="621484" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-111021" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=111021" Kind="" Label="111021: NPE in TaskSummaryEditor.addLinkToTable" LastDate="1129564720922" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-26 12:53:38.685 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-110711" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=110711" Kind="" Label="110711: add support for eclipse 3.2 problem filters" LastDate="1132014458600" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-29 16:50:57.786 PDT" Dirty="false" Elapsed="31866" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-123" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=123" Kind="" Label="123: Synchronize View: files nodes in tree should provide replace with action (1GEPBKL)" LastDate="1128037857786" Notes="" Priority="P5" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.438 PST" Dirty="false" Elapsed="2332915" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-102662" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=102662" Kind="" Label="102662: create summary statistics for perspective usage" LastDate="1138052471041" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-01-10 13:49:06.255 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-123330" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=123330" Kind="normal" Label="123330: temporarily unfiltered nodes stick if not selected" LastDate="1140232919800" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="INCOMING"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-01-09 08:50:33.774 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-123120" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=123120" Kind="enhancement" Label="123120: create full-screen screenshots of Mylar usage" LastDate="1139867232552" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-28 17:14:50.263 PDT" Dirty="false" Elapsed="7785777" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-110957" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=110957" Kind="" Label="110957: Crashes, slowness in XML outline" LastDate="1128137750017" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.418 PST" Dirty="false" Elapsed="1022350" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-104526" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=104526" Kind="" Label="104526: make highlighters and clear context action use task list extension points" LastDate="1121906627809" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-14 11:50:29.244 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-106862" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=106862" Kind="" Label="106862: use task description as comments in CVS commit" LastDate="1131570377036" Notes="" Priority="P2" Reminded="true" ReminderDate="2005-09-20 09:37:29.433 PDT" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-09-15 11:11:42.135 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-109643" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109643" Kind="normal" Label="109643: improve active search invalidation for calls" LastDate="1139867253141" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-12-16 19:08:54.375 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-121309" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=121309" Kind="normal" Label="121309: improve monitor upload facility" LastDate="1140232919620" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-12 11:20:18.877 PDT" Dirty="false" Elapsed="700272" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-106938" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=106938" Kind="" Label="106938: Implement &quot;new&quot; marker for Bugzilla query" LastDate="1126551484625" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-12 09:47:52.392 PDT" Dirty="false" Elapsed="74286824" EndDate="" Estimated="4" Handle="https://bugs.eclipse.org/bugs-109311" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109311" Kind="" Label="109311: migrate folding to 3.2M3 APIs" LastDate="1137725796794" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-09-15 14:23:01.261 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-109678" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109678" Kind="normal" Label="109678: create mylar perspectives" LastDate="1139867253231" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="INCOMING"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-12 19:08:21.53 PDT" Dirty="false" Elapsed="3731636" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-109348" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109348" Kind="" Label="109348: streamline date chooser" LastDate="1126581986571" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-21 18:39:40.130 PST" Dirty="false" Elapsed="2049888" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-116535" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=116535" Kind="" Label="116535: Bugzilla Editor shows incorrect time for comments" LastDate="1132630244116" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-13 17:32:30.795 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-115795" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=115795" Kind="" Label="115795: Predicted interest of errors not showing errors" LastDate="1132619758398" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-03 20:21:05.356 PST" Dirty="false" Elapsed="498822" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-115018" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=115018" Kind="" Label="115018: integrate web browser for Bugzilla reports" LastDate="1131079718403" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-19 11:29:52.14 PST" Dirty="false" Elapsed="222633" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-121333" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=121333" Kind="" Label="121333: Highlighter colour selection dialog doesn't use current value" LastDate="1136564220957" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-05 14:50:07.43 PST" Dirty="false" Elapsed="1514363" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-118885" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=118885" Kind="" Label="118885: Decouple task list and context reading from Eclipse" LastDate="1134068245580" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-102689" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=102689" Kind="" Label="102689: control enablement of Mylar actions" LastDate="1124995008858" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-10-12 16:28:59.788 PDT" Dirty="false" Elapsed="58190273" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-112233" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=112233" Kind="normal" Label="112233: [improve interaction for filtered element navigation" LastDate="1140232909145" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="INCOMING"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-01 08:43:24.188 PST" Dirty="false" Elapsed="5742920" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-114562" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=114562" Kind="" Label="114562: add basic support for Bugzilla 2.20" LastDate="1131078198688" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-13 14:47:38.282 PDT" Dirty="false" Elapsed="38612266" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-112563" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=112563" Kind="" Label="112563: create html structure bridge to track URL navigation" LastDate="1129833854989" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-09-11 16:15:06.783 PDT" Dirty="false" Elapsed="373657" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-109261" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109261" Kind="" Label="109261: offline reports pops up repeatedly" LastDate="1126485997969" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.428 PST" Dirty="false" Elapsed="0" EndDate="2005-08-22 18:29:00.0 PDT" Estimated="0" Handle="https://bugs.eclipse.org/bugs-79112" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=79112" Kind="normal" Label="79112: [1.5] [model] accessing annotation on Java elements" LastDate="1140115547292" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="INCOMING"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-08-25 15:57:14.377 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-108067" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=108067" Kind="normal" Label="108067: when activating a new report automatically populate context with stack" LastDate="1139867243367" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-31 11:28:45.241 PST" Dirty="false" Elapsed="30527875" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-114401" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=114401" Kind="" Label="114401: support creating new web linked tasks via drag-and-drop" LastDate="1137632099839" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-10-13 12:00:52.496 PDT" Dirty="false" Elapsed="8720224" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-106935" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=106935" Kind="enhancement" Label="106935: [discussion] add provider for Visualizer" LastDate="1139867121732" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-10-31 10:32:52.101 PST" Dirty="false" Elapsed="2157889" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-114388" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=114388" Kind="" Label="114388: create phoenix based web site" LastDate="1130961223680" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.428 PST" Dirty="false" Elapsed="11007777" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-105516" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=105516" Kind="" Label="105516: package explorer shows nothing upon eclipse startup unless mylar task list is active" LastDate="1134708966282" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-16 09:12:23.347 PST" Dirty="false" Elapsed="4080771" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-121238" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=121238" Kind="" Label="121238: fix overdue filtering and and enable dismissing tasks" LastDate="1134764209963" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-08-25 07:13:33.826 PDT" Dirty="false" Elapsed="7100" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-82730" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=82730" Kind="" Label="82730: investigate incomplete class index when using 1.5" LastDate="1124979213826" Notes="" Priority="P2" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-103237" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=103237" Kind="" Label="103237: provide mechanism to back up all task scapes, tasklist etc." LastDate="1124995043027" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2006-02-16 11:20:59.780 PST" Dirty="false" Elapsed="6014026" EndDate="2006-02-16 19:14:00.0 PST" Estimated="0" Handle="https://bugs.eclipse.org/bugs-128259" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=128259" Kind="enhancement" Label="128259: Mylar Task List should expand tree to show tasks with active contexts" LastDate="1140117766213" Notes="" Priority="P3" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-10-14 18:07:09.442 PDT" Dirty="false" Elapsed="6755653" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-112721" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=112721" Kind="normal" Label="112721: handle interest level for type refactorings and element deletion" LastDate="1139867262204" Notes="" Priority="P4" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.428 PST" Dirty="false" Elapsed="179808" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-105097" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=105097" Kind="" Label="105097: add back/forward buttons to task list" LastDate="1124995040554" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-12-02 10:04:59.635 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-118007" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=118007" Kind="enhancement" Label="118007: Ability to selectively add resources (files/folders) to context" LastDate="1140232909135" Notes="" Priority="P2" Reminded="true" ReminderDate="" offlineSyncState="INCOMING"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-11-30 11:19:55.331 PST" Dirty="false" Elapsed="1716919" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-118478" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=118478" Kind="" Label="118478: editor reopened on &quot;clear task context action&quot;" LastDate="1133556006206" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2005-10-06 10:04:07.728 PDT" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-88293" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=88293" Kind="enhancement" Label="88293: [misc] Extension-Point for HyperlinkDetectors" LastDate="1140115547282" Notes="" Priority="P3" Reminded="false" ReminderDate="2006-02-21 06:00:00.0 PST" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2006-01-18 10:57:26.241 PST" Dirty="false" Elapsed="9959567" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-124349" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=124349" Kind="" Label="124349: package proposals should not be on top of type list" LastDate="1137781958643" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2005-12-07 14:30:27.428 PST" Dirty="false" Elapsed="3736022" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-104691" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=104691" Kind="" Label="104691: make collectors support csv export and user id mapping" LastDate="1121970079747" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/></BugzillaTaskRegistryCategory><JiraTaskRegistryCategory/><TaskCategory Name="Active"><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-09-12 07:39:24.172 PDT" Elapsed="2487076" EndDate="2005-09-12 08:21:19.529 PDT" Estimated="0" Handle="task-103783" IssueURL="" Kind="" Label="fix failing tests" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-09-21 19:28:38.76 PDT" Elapsed="1471157" EndDate="2005-09-26 13:16:31.189 PDT" Estimated="0" Handle="task-103793" IssueURL="" Kind="" Label="ensure active search re-runs after activation" Notes="" Priority="P2" Reminded="true" ReminderDate="2005-09-27 08:36:01.568 PDT"/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-10-06 16:20:23.964 PDT" Elapsed="172759" EndDate="2005-10-06 17:50:04.861 PDT" Estimated="0" Handle="task-103827" IssueURL="" Kind="" Label="SET REDRAW on active views" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-10-06 16:38:56.944 PDT" Elapsed="122486" EndDate="2005-10-06 19:54:50.905 PDT" Estimated="0" Handle="task-103828" IssueURL="" Kind="" Label="RAISE children fails to lower" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-10-06 18:55:44.35 PDT" Elapsed="6105697" EndDate="2005-10-07 17:19:34.503 PDT" Estimated="0" Handle="task-103829" IssueURL="" Kind="" Label="suppress docs from active search" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-10-07 08:46:33.70 PDT" Elapsed="910131" EndDate="2005-10-07 15:41:38.3 PDT" Estimated="0" Handle="task-103831" IssueURL="" Kind="" Label="long: active search refresh" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-10-07 09:09:44.174 PDT" Elapsed="0" EndDate="2005-10-07 15:41:36.30 PDT" Estimated="0" Handle="task-103832" IssueURL="" Kind="" Label="problems list refresh fails" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-10-07 18:04:21.636 PDT" Elapsed="233817" EndDate="2005-10-07 19:41:26.793 PDT" Estimated="0" Handle="task-103834" IssueURL="" Kind="" Label="can't increment landmark interest with keys" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-10-07 20:36:55.319 PDT" Elapsed="0" EndDate="2005-10-13 04:05:24.368 PDT" Estimated="0" Handle="task-103836" IssueURL="" Kind="" Label="make active search linking stick" Notes="" Priority="P2" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="false" CreationDate="2005-10-07 16:57:21.956 PDT" Elapsed="0" EndDate="" Estimated="0" Handle="task-103833" IssueURL="" Kind="" Label="content type for Ant nodes is blank" Notes="" Priority="P5" Reminded="true" ReminderDate="2006-02-19 15:06:11.64 PST"/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-10-07 21:32:47.785 PDT" Elapsed="346981" EndDate="2005-10-11 12:56:33.499 PDT" Estimated="0" Handle="task-103837" IssueURL="" Kind="" Label="active search refresh only after click" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-10-19 06:01:24.114 PDT" Elapsed="0" EndDate="2005-10-20 13:00:24.992 PDT" Estimated="0" Handle="task-103853" IssueURL="" Kind="" Label="refresh whole explorer on task deactivation" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-10-18 16:50:23.150 PDT" Elapsed="0" EndDate="2005-10-20 12:59:59.185 PDT" Estimated="0" Handle="task-103852" IssueURL="" Kind="" Label="ensure that Ian is on contributors list" Notes="" Priority="P1" Reminded="true" ReminderDate="2005-10-20 16:50:19.595 PDT"/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-10-19 08:36:29.97 PDT" Elapsed="600624" EndDate="2005-12-02 13:30:13.700 PST" Estimated="0" Handle="task-103855" IssueURL="" Kind="" Label="update presentations" Notes="" Priority="P2" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-10-21 06:02:47.306 PDT" Elapsed="911" EndDate="2005-10-27 17:58:59.995 PDT" Estimated="0" Handle="task-103858" IssueURL="" Kind="" Label="fix refactoring test" Notes="" Priority="P2" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-10-26 08:42:59.949 PDT" Elapsed="0" EndDate="2005-10-27 17:59:13.444 PDT" Estimated="0" Handle="task-103861" IssueURL="http://" Kind="" Label="fix error interest test" Notes="" Priority="P2" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-10-26 11:07:46.899 PDT" Elapsed="282566" EndDate="2005-10-26 11:15:36.845 PDT" Estimated="0" Handle="task-103862" IssueURL="http://" Kind="" Label="remove blank elements from active search views" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-10-25 16:43:17.340 PDT" Elapsed="7155866" EndDate="2005-10-27 19:22:12.224 PDT" Estimated="0" Handle="task-103860" IssueURL="http://" Kind="" Label="fix up planning game wizard" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-10-26 14:10:42.552 PDT" Elapsed="179598" EndDate="2005-10-27 15:52:13.157 PDT" Estimated="0" Handle="task-103863" IssueURL="http://" Kind="" Label="don't show monitor warning if there isn't an extension" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-10-28 18:22:46.321 PDT" Elapsed="517857" EndDate="2005-10-31 10:31:06.645 PST" Estimated="0" Handle="task-103864" IssueURL="http://" Kind="" Label="fix minor nits" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-11-14 19:20:07.734 PST" Elapsed="412679" EndDate="2005-11-14 19:49:57.728 PST" Estimated="0" Handle="task-103882" IssueURL="http://" Kind="" Label="3.1 migration" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-11-14 21:55:04.502 PST" Elapsed="0" EndDate="2005-11-15 10:09:41.723 PST" Estimated="0" Handle="task-103883" IssueURL="http://" Kind="" Label="update flash videos in docs" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-11-15 12:49:32.344 PST" Elapsed="0" EndDate="2005-11-15 19:37:17.377 PST" Estimated="0" Handle="task-103884" IssueURL="" Kind="" Label="add FAQ entry about Java 5 failure" Notes="java.lang.NoSuchMethodError:&#13;&#10;org.eclipse.ui.internal.dialogs.FilteredTree.getFilterControl()Lorg/eclipse/swt/widgets/Text;&#13;&#10;at&#13;&#10;org.eclipse.mylyn.tasklist.ui.views.TaskListContentProvider.applyFilter(TaskListContentProvider.java:90)" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-11-15 14:42:47.886 PST" Elapsed="0" EndDate="2005-11-15 18:44:06.969 PST" Estimated="0" Handle="task-103886" IssueURL="http://" Kind="" Label="ping Make about status" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-11-15 17:33:00.634 PST" Elapsed="750615" EndDate="2005-11-15 19:37:10.16 PST" Estimated="0" Handle="task-103889" IssueURL="http://" Kind="" Label="add faq entry on bad eclipse version" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-11-16 19:33:05.434 PST" Elapsed="364774" EndDate="2005-11-20 17:06:55.303 PST" Estimated="0" Handle="task-103891" IssueURL="http://" Kind="" Label="multiple of same change set can appear" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-11-21 19:37:14.307 PST" Elapsed="12037" EndDate="2005-11-21 20:20:43.869 PST" Estimated="0" Handle="task-103895" IssueURL="http://" Kind="" Label="add preference for number of editors to open" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-11-25 13:34:26.502 PST" Elapsed="0" EndDate="2005-12-02 11:52:21.218 PST" Estimated="0" Handle="task-103905" IssueURL="http://" Kind="" Label="check on quality of hashcode method on InteractionEvent" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-11-29 13:18:58.489 PST" Elapsed="0" EndDate="2005-11-29 13:24:12.561 PST" Estimated="0" Handle="task-103906" IssueURL="http://" Kind="" Label="abstract tests should not be part of suite" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-11-30 13:08:46.963 PST" Elapsed="0" EndDate="2005-12-01 17:59:13.932 PST" Estimated="0" Handle="task-103909" IssueURL="http://" Kind="" Label="fix planner UI" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-01 18:35:25.275 PST" Elapsed="0" EndDate="2005-12-02 11:52:59.403 PST" Estimated="0" Handle="task-103913" IssueURL="http://eclipse.org/mylar/" Kind="" Label="if change set is blank, change goes outside" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-02 13:56:37.558 PST" Elapsed="0" EndDate="2005-12-02 16:38:11.716 PST" Estimated="0" Handle="task-103914" IssueURL="http://" Kind="" Label="after all resources committed failure changes to change set" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-05 17:18:17.847 PST" Elapsed="4115719" EndDate="2005-12-06 19:20:14.253 PST" Estimated="0" Handle="task-103917" IssueURL="http://" Kind="" Label="re-dragging a task to a category should not re-add it" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-08 11:34:55.85 PST" Elapsed="2323815" EndDate="2005-12-08 12:08:41.362 PST" Estimated="0" Handle="task-103923" IssueURL="http://" Kind="" Label="make bugzilla bridge open local report" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-09 14:54:01.417 PST" Elapsed="0" EndDate="2005-12-12 17:20:37.520 PST" Estimated="0" Handle="task-103925" IssueURL="http://eclipse.org/mylar/doc/faq.html#install-failure" Kind="" Label="create docs section on site" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-09 18:31:55.517 PST" Elapsed="4878811" EndDate="2005-12-09 19:43:45.374 PST" Estimated="0" Handle="task-103926" IssueURL="http://" Kind="" Label="fix schitzophrenia between task context paths and contexts" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-14 15:29:05.912 PST" Elapsed="611011" EndDate="2005-12-16 12:09:52.92 PST" Estimated="0" Handle="task-103930" IssueURL="http://" Kind="" Label="active task fails to go bold on startup" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-15 18:27:22.88 PST" Elapsed="7417485" EndDate="2006-01-23 15:04:49.117 PST" Estimated="3" Handle="task-103932" IssueURL="http://" Kind="" Label="long: task list modularity" Notes="" Priority="P3" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-16 10:00:42.536 PST" Elapsed="335243" EndDate="2005-12-16 12:28:41.86 PST" Estimated="0" Handle="task-103934" IssueURL="http://" Kind="" Label="cell editor on planner sets values to -1 when not edited" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-16 19:24:27.697 PST" Elapsed="0" EndDate="2006-02-08 21:30:40.536 PST" Estimated="0" Handle="task-103936" IssueURL="http://" Kind="" Label="fix FAQ rendering in MSIE" Notes="" Priority="P5" Reminded="true" ReminderDate="2006-01-25 15:05:17.648 PST"/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-21 17:18:42.705 PST" Elapsed="250309" EndDate="2005-12-26 11:15:03.345 PST" Estimated="0" Handle="task-103940" IssueURL="http://" Kind="" Label="make package go red when overdue task is in it" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="false" CreationDate="2005-12-26 11:15:56.201 PST" Elapsed="142393111" EndDate="" Estimated="0" Handle="task-103941" IssueURL="" Kind="" Label="long: rcp app packaging" Notes="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwxp/html/winxpicons.asp" Priority="P5" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-27 11:59:23.585 PST" Elapsed="0" EndDate="2006-02-08 21:30:44.61 PST" Estimated="0" Handle="task-103943" IssueURL="http://" Kind="" Label="adopt new mailing list doc convention" Notes=" This message is to inform all committers of upcoming changes to the newsgroup and mailing list pages on the eclipse.org website. With the move to the new design these pages will become more data driven which will result in a new option for you all.&#13;&#10;&#13;&#10;At this time the descriptions of the various newsgroups and mailing lists are statically set and you must send in a request to us for it to be changed. The update will allow each individual project to change it's description paragraph at will.&#13;&#10;&#13;&#10;What will you need to do in order to use this feature? That's easy, in the new 'project-info' directory that you have created in the top level of your web sites just insert two plain text files named 'newsgroup' and 'maillist'. The format of these files is the same and follows the following format:&#13;&#10;&#13;&#10;::name::description&#13;&#10;::name::description&#13;&#10;&#13;&#10;So and example of a newsgroup entry for say the BPEL newsgroup would be:&#13;&#10;&#13;&#10;::eclipse.technology.bpel-designer::The &lt;a href=&quot;http://www.eclipse.org/bpel&quot;&gt;BPEL Designer Editor project&lt;/a&gt; will add comprehensive support to Eclipse for the definition, editing, deploying, testing, and debugging of WS-BPEL processes (Business Process Execution Language for Web Services) in vendor neutral environments. The implementation will be extensible to third-party vendors so that runtime implementations could integrate seamlessly to the design/build/deploy/test cycle and integrate specific domain WS-BPEL constructs and extension.&#13;&#10;&#13;&#10;You can add as many newsgroups or mailing lists as you like, as long as each entry has the same format.&#13;&#10;&#13;&#10;Each time the newsgroup or mailing list pages are requested the software checks to see if these files exist, and if they do then the contents are loaded into the page. If the files cannot be found then the newsgroups and mailing lists for that project will not be included on the respective web pages.&#13;&#10;&#13;&#10;These changes will go into effect for the news pages on the 30th of December&#13;&#10;&#13;&#10;If you have any questions about these changes contact contact me.&#13;&#10;" Priority="P5" Reminded="true" ReminderDate="2006-01-26 11:59:14.643 PST"/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-28 08:07:25.289 PST" Elapsed="1172217" EndDate="2005-12-28 08:37:21.272 PST" Estimated="0" Handle="task-103944" IssueURL="" Kind="" Label="minor tasklit refactoring" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-30 07:55:04.376 PST" Elapsed="745851" EndDate="2006-01-04 18:29:16.497 PST" Estimated="0" Handle="task-103945" IssueURL="" Kind="" Label="does &quot;mark incomplete&quot; fail to color?" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-31 06:55:16.161 PST" Elapsed="790263" EndDate="2005-12-31 07:51:51.604 PST" Estimated="0" Handle="task-103946" IssueURL="http://" Kind="" Label="update j2se-1.5 compliance settings" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="false" CreationDate="2006-01-03 13:08:31.670 PST" Elapsed="0" EndDate="" Estimated="0" Handle="task-103947" IssueURL="http://" Kind="" Label="add automatic option configuration for browser mod..." Notes="- turn on automatic workspace refresh&#13;&#10;- perspective bar to top right&#13;&#10;- new (not traditional) tabs&#13;&#10;- " Priority="P5" Reminded="true" ReminderDate="2006-02-19 15:40:23.992 PST"/><Task Active="false" Bugzilla="false" Complete="false" CreationDate="2006-01-05 15:54:23.21 PST" Elapsed="0" EndDate="" Estimated="0" Handle="task-103948" IssueURL="http://" Kind="" Label="interest filter fails on extensions page" Notes="java.lang.RuntimeException: null bridge for object: class org.eclipse.pde.internal.ui.editor.plugin.ExtensionsPage&#13;&#10;&#9;at org.eclipse.mylyn.core.MylarPlugin$1.getHandleIdentifier(ContextCorePlugin.java:83)&#13;&#10;&#9;at org.eclipse.mylyn.ui.InterestFilter.select(InterestFilter.java:62)&#13;&#10;&#9;at org.eclipse.jface.viewers.ViewerFilter.filter(ViewerFilter.java:51)&#13;&#10;&#9;at org.eclipse.jface.viewers.StructuredViewer.getFilteredChildren(StructuredViewer.java:794)&#13;&#10;&#9;at org.eclipse.jface.viewers.StructuredViewer.getSortedChildren(StructuredViewer.java:905)&#13;&#10;&#9;at org.eclipse.jface.viewers.AbstractTreeViewer.updateChildren(AbstractTreeViewer.java:1720)&#13;&#10;&#9;at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefreshStruct(AbstractTreeViewer.java:1274)&#13;&#10;&#9;at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh(AbstractTreeViewer.java:1251)&#13;&#10;&#9;at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh(AbstractTreeViewer.java:1207)&#13;&#10;&#9;at org.eclipse.jface.viewers.StructuredViewer$8.run(StructuredViewer.java:1291)&#13;&#10;&#9;at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1201)&#13;&#10;&#9;at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1289)&#13;&#10;&#9;at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1246)&#13;&#10;&#9;at org.eclipse.mylyn.ui.MylarViewerManager.internalRefresh(MylarViewerManager.java:150)&#13;&#10;&#9;at org.eclipse.mylyn.ui.MylarViewerManager.access$0(MylarViewerManager.java:138" Priority="P5" Reminded="true" ReminderDate="2006-02-11 19:03:57.612 PST"/><Task Active="false" Bugzilla="false" Complete="false" CreationDate="2006-01-05 18:34:13.786 PST" Elapsed="827119" EndDate="" Estimated="0" Handle="task-103949" IssueURL="http://" Kind="" Label="suggest Eclipse API changes" Notes="To do&#13;&#10;- Package Explorer collapse suppression&#13;&#10;- content assist selection listener&#13;&#10;- PDE viewer accessibility&#13;&#10;- type history extensibility&#13;&#10;- decorator job priority: problem is that if a decorator makes elements in explorer bold, and markers change, there is a 1-2 second blink&#13;&#10;&#13;&#10;Done&#13;&#10;- expose resolveMember on MemberProposalInfo&#13;&#10;- strikethru for SWT widgets&#13;&#10;- filtered tree should refresh when filtered&#13;&#10;- folding updater&#13;&#10;&#13;&#10;&#13;&#10;" Priority="P5" Reminded="true" ReminderDate="2006-01-15 18:34:10.642 PST"/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2006-01-06 14:47:38.551 PST" Elapsed="1282688" EndDate="2006-01-06 14:51:45.626 PST" Estimated="0" Handle="task-103951" IssueURL="http://" Kind="" Label="mark complete fails to filter" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2006-01-11 07:53:38.612 PST" Elapsed="278089" EndDate="2006-01-23 12:10:27.854 PST" Estimated="0" Handle="task-103955" IssueURL="http://" Kind="" Label="add rename action to list?" Notes="" Priority="P3" Reminded="true" ReminderDate="2006-01-22 09:33:08.744 PST"/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2006-01-12 21:29:41.33 PST" Elapsed="0" EndDate="2006-01-13 09:33:00.863 PST" Estimated="0" Handle="task-103957" IssueURL="http://" Kind="" Label="fix bug hit handles" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="false" CreationDate="2006-01-13 10:12:13.431 PST" Elapsed="0" EndDate="" Estimated="0" Handle="local-103958" IssueURL="http://" Kind="" Label="wizard dialogs should have titles" Notes="" Priority="P5" Reminded="false" ReminderDate="2006-02-20 11:00:00.0 PST"/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2006-01-13 11:16:45.146 PST" Elapsed="299502" EndDate="2006-01-13 11:30:48.398 PST" Estimated="0" Handle="local-103959" IssueURL="http://" Kind="" Label="streamline migration" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2006-01-13 13:55:16.62 PST" Elapsed="1829370" EndDate="2006-01-13 15:27:32.973 PST" Estimated="0" Handle="local-103961" IssueURL="http://" Kind="" Label="fix failing tests" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="false" CreationDate="2006-01-13 14:27:25.406 PST" Elapsed="0" EndDate="" Estimated="0" Handle="local-103962" IssueURL="http://" Kind="" Label="re-eanble BugzillaSearchPluginTest" Notes="" Priority="P5" Reminded="false" ReminderDate="2006-02-26 14:27:00.0 PST"/><Task Active="false" Bugzilla="false" Complete="false" CreationDate="2006-01-13 16:26:41.95 PST" Elapsed="0" EndDate="" Estimated="0" Handle="local-103963" IssueURL="" Kind="" Label="report won't open if another with same id is open" Notes="" Priority="P5" Reminded="true" ReminderDate="2006-02-19 16:26:38.371 PST"/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2006-01-13 16:46:44.736 PST" Elapsed="27718" EndDate="2006-01-13 17:41:05.565 PST" Estimated="0" Handle="local-103964" IssueURL="http://" Kind="" Label="active context not cleared on deactivation" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="false" CreationDate="2006-01-16 08:06:29.655 PST" Elapsed="0" EndDate="" Estimated="0" Handle="local-103965" IssueURL="http://eclipse-plugins.2y.net/eclipse/plugin_details.jsp?id=1225" Kind="" Label="check on Eclipse plug-ins listing of Mylar" Notes="" Priority="P5" Reminded="true" ReminderDate="2006-02-27 14:00:00.0 PST"/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2006-01-16 16:50:55.378 PST" Elapsed="17986" EndDate="2006-01-18 17:44:25.36 PST" Estimated="0" Handle="local-103967" IssueURL="http://" Kind="" Label="fix links in release docs" Notes="" Priority="P2" Reminded="true" ReminderDate="2006-01-16 16:50:53.225 PST"/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2006-01-16 16:57:17.568 PST" Elapsed="14520" EndDate="2006-01-18 17:14:05.837 PST" Estimated="0" Handle="local-103968" IssueURL="http://" Kind="" Label="check in project formatting settings, and format all files" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2006-01-17 14:42:34.27 PST" Elapsed="155114" EndDate="2006-01-17 15:13:08.264 PST" Estimated="0" Handle="local-103970" IssueURL="http://" Kind="" Label="ensure that category is not colored red if overdue tasks are completed" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2006-01-19 16:15:57.513 PST" Elapsed="1568787" EndDate="2006-01-24 18:07:28.962 PST" Estimated="0" Handle="local-103971" IssueURL="http://" Kind="" Label="update copyrights to 2006" Notes="" Priority="P5" Reminded="true" ReminderDate="2006-01-20 11:00:59.717 PST"/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2006-01-19 19:02:57.371 PST" Elapsed="967502" EndDate="2006-01-20 11:56:41.584 PST" Estimated="0" Handle="local-103972" IssueURL="http://" Kind="" Label="fix TaskDataExport test" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2006-01-20 11:54:27.441 PST" Elapsed="839233" EndDate="2006-01-23 09:21:41.860 PST" Estimated="0" Handle="local-103973" IssueURL="http://" Kind="" Label="review auto content assist activation problem" Notes="" Priority="P1" Reminded="true" ReminderDate="2006-01-22 21:15:54.573 PST"/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2006-01-23 12:19:29.553 PST" Elapsed="254286" EndDate="2006-01-23 12:24:55.592 PST" Estimated="0" Handle="local-103974" IssueURL="http://" Kind="" Label="support multiple removals" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-11-22 15:33:56.647 PST" Elapsed="0" EndDate="2006-01-23 14:53:03.342 PST" Estimated="0" Handle="task-103897" IssueURL="http://dev.eclipse.org/mhonarc/lists/platform-ui-dev/msg02693.html" Kind="" Label="long: consider working set overlap" Notes="" Priority="P3" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="false" CreationDate="2005-09-26 14:49:21.158 PDT" Elapsed="65054" EndDate="" Estimated="0" Handle="task-103805" IssueURL="" Kind="" Label="long: docs" Notes="" Priority="P5" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="false" CreationDate="2005-11-09 08:31:36.558 PST" Elapsed="0" EndDate="" Estimated="0" Handle="task-103881" IssueURL="http://blog.enargi.com/programming/eclipse/eclipse-tips-external-plugin-directory/" Kind="" Label="long: eclipse configuration" Notes="extension directory setup:&#13;&#10;&#9;http://blog.enargi.com/programming/eclipse/eclipse-tips-external-plugin-directory/&#13;&#10;&#13;&#10;" Priority="P5" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="false" CreationDate="2005-09-27 10:19:07.947 PDT" Elapsed="616527" EndDate="" Estimated="0" Handle="task-103806" IssueURL="" Kind="" Label="long: improve conent assist" Notes="" Priority="P5" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="false" CreationDate="2005-11-23 20:03:18.841 PST" Elapsed="33790" EndDate="" Estimated="0" Handle="task-103903" IssueURL="http://" Kind="" Label="long: release messages" Notes="0.5.0&#13;&#10;- Tom Eicher and Daniel Megert for extensibility improvements in editor folding support&#13;&#10;&#13;&#10;0.4.8&#13;&#10;- Brock for improving multi-repository wizards&#13;&#10;- Brock and Eugene's ideas on task list architecture&#13;&#10;- Eugene's idea for completion bar on categories&#13;&#10;&#13;&#10;0.4.7&#13;&#10;- upgrade&#13;&#10; - after starting, open repositories view, add repository if not there, ensure correct&#13;&#10; - restart Eclipse, query categories should show up and contexts have been migrated&#13;&#10; - restart again to see tasks in query matches.&#13;&#10;- Eugene had a good idea for avoiding inducing interest on newly checked out projects&#13;&#10;- David Bari and Tomasz Smietanka: set up test bugzilla server for encodings&#13;&#10;- Brock: elegant solution to fix lazy loading of image registry, 3.2M4 detective work and fixes, highlighter fix&#13;&#10;- Rob: drag-and-drop tasks, external browser&#13;&#10;&#13;&#10;0.4.6&#13;&#10;- Brock's XML SAX externalization contribution&#13;&#10;- performance of content assist&#13;&#10;- Alexander Staubo provided useful video&#13;&#10;&#13;&#10;0.4.5&#13;&#10;- back up your task lists (support revamped, now more extensible, etc)&#13;&#10; - restore default directory before upgrading, then can copy back&#13;&#10;- Felix Knecht helped proided instructions for how to patch a bugzilla bug issue&#13;&#10;- Leah &amp; Suzanne's monitor stuff?&#13;&#10;- issue tracker discussion &#13;&#10;- brock for patch of tasklist schema and integration build fix&#13;&#10;&#13;&#10;0.4.4:&#13;&#10;- Igor Fedorenko provide a patch for an NPE in the Java Problem Listener&#13;&#10;- Vote for Mylar talk&#13;&#10;- Ian's bugzilla patch&#13;&#10;- watch for resources added to context in Error Log?&#13;&#10;- Wes added support for in-progress tasks on the planner, hard work on task list backup and improving timing." Priority="P5" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="false" CreationDate="2005-09-23 14:23:14.908 PDT" Elapsed="3722185" EndDate="" Estimated="0" Handle="task-103798" IssueURL="" Kind="" Label="long: ui issues" Notes="" Priority="P5" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="false" CreationDate="2005-09-15 15:04:04.653 PDT" Elapsed="16549725" EndDate="2005-09-19 16:28:29.52 PDT" Estimated="0" Handle="task-103788" IssueURL="" Kind="" Label="long: usage analysis" Notes="Kevin suggests running both a t-test and a wilcoxon because the wilcoxon makes less assumptions. The T-test should have normal data fed into it. He suggests just eyeballing it and doing the log trick as reasonable ways to meet that criteria.&#13;&#10;&#13;&#10;Problem: people leaving Mylar active and not using it&#13;&#10;&#13;&#10;To do by next meet:&#13;&#10;- JUST JAVA&#13;&#10;- CONSIDER JUST HOURS&#13;&#10;&#13;&#10;- shared vs. unique task content coverage&#13;&#10;- average number of selections before edit, do runs of selections get shorter? average length of a run, baseline vs. active tasks in mylar [do it based on view, not editor selections]&#13;&#10;&#13;&#10;Misc:&#13;&#10;- number of unique elements in each context&#13;&#10;- three kinds of baseline stats?&#13;&#10;- not doing: number of tasks,time mylar active (not determinable, since they could be doing something else, base on selections)&#13;&#10;- filters used in navigator/explorer&#13;&#10;- figure out how many landmarks they have&#13;&#10;- correlate additional information for accepted users (questionnaires, etc, tasks peformed)&#13;&#10;- could discard first n events of usage&#13;&#10;- buckets for individual users" Priority="P5" Reminded="true" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="false" CreationDate="2005-11-08 13:03:53.156 PST" Elapsed="505994160" EndDate="2006-01-16 11:26:34.181 PST" Estimated="0" Handle="task-103879" IssueURL="http://" Kind="" Label="long: web site update" Notes="&#13;&#10;&#13;&#10;download&#13;&#10;- General Eclipse.org newsgroup information:&#13;&#10;http://www.eclipse.org/newsgroups/index.php&#13;&#10;&#13;&#10;about:&#13;&#10;- Mylar: A Task Focused UI for Eclipse.&#13;&#10;- mention Eclipse's openness and extensibility?&#13;&#10;&#13;&#10;Using Mylar simply requires the user to identify the task-at-hand, Mylar then forms a context for that task by monitoring the user's activity.&#13;&#10;&#13;&#10;dev&#13;&#10;- add note to dev page on connecting to eclispe.org ...&#13;&#10;&#13;&#10;from Gail: i.e., the current focus is on determing which existing features are working well and adding new innovative features ... Just to give the sense that you aren't interested in support 1.4, etc." Priority="P5" Reminded="true" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="false" CreationDate="2005-09-12 12:27:21.441 PDT" Elapsed="0" EndDate="" Estimated="0" Handle="task-103784" IssueURL="" Kind="" Label="re-enable ResultUpdaterTest" Notes="" Priority="P5" Reminded="true" ReminderDate="2006-02-12 17:59:16.827 PST"/><Task Active="false" Bugzilla="false" Complete="false" CreationDate="2005-09-16 19:47:54.406 PDT" Elapsed="188381" EndDate="" Estimated="0" Handle="task-103792" IssueURL="" Kind="" Label="re-enable test in BugzillaStackTraceTest" Notes="" Priority="P5" Reminded="false" ReminderDate="2006-02-26 08:36:00.0 PST"/><Task Active="false" Bugzilla="false" Complete="false" CreationDate="2005-09-28 18:27:30.673 PDT" Elapsed="0" EndDate="" Estimated="0" Handle="task-103811" IssueURL="" Kind="" Label="submit bug: generating getters/setters can fail to..." Notes="" Priority="P5" Reminded="false" ReminderDate="2006-02-21 08:36:00.0 PST"/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-12 19:27:55.902 PST" Elapsed="1751918" EndDate="2006-02-08 21:32:32.848 PST" Estimated="1" Handle="task-103929" IssueURL="http://www.eclipse.org/projects/dev_process/project-status-infrastructure.php" Kind="" Label="update to new project web site format" Notes="" Priority="P5" Reminded="true" ReminderDate="2006-01-25 14:00:49.425 PST"/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2006-01-23 17:27:07.574 PST" Elapsed="0" EndDate="2006-01-24 17:58:34.683 PST" Estimated="0" Handle="local-103975" IssueURL="http://" Kind="" Label="migrate test naming convention" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2006-01-24 11:21:34.338 PST" Elapsed="1300643" EndDate="2006-01-24 17:58:41.73 PST" Estimated="0" Handle="local-103976" IssueURL="http://" Kind="" Label="refactor packages to internal naming convention" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2006-01-24 16:00:54.852 PST" Elapsed="247977" EndDate="2006-01-24 16:07:57.630 PST" Estimated="0" Handle="local-103979" IssueURL="http://" Kind="" Label="make folding toggle enable folding" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="false" CreationDate="2006-01-24 17:58:59.780 PST" Elapsed="0" EndDate="" Estimated="0" Handle="local-103980" IssueURL="http://" Kind="" Label="fix BugzillaCustomQueryCategory wierdness" Notes="" Priority="P5" Reminded="true" ReminderDate="2006-02-12 21:37:05.189 PST"/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2006-01-25 10:42:28.455 PST" Elapsed="0" EndDate="2006-02-15 11:03:07.431 PST" Estimated="0" Handle="local-103983" IssueURL="http://" Kind="" Label="make bug reports open with progress" Notes="" Priority="P1" Reminded="true" ReminderDate="2006-02-09 19:00:33.879 PST"/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2006-02-08 21:19:58.232 PST" Elapsed="2037357" EndDate="2006-02-09 14:38:49.841 PST" Estimated="0" Handle="local-103984" IssueURL="http://" Kind="" Label="fix failing externalization test" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><BugzillaReport Active="false" Bugzilla="true" Complete="true" CreationDate="2006-02-09 14:22:59.134 PST" Dirty="false" Elapsed="1669493" EndDate="2006-02-16 00:43:00.0 PST" Estimated="0" Handle="https://bugs.eclipse.org/bugs-127182" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=127182" Kind="normal" Label="127182: bugzilla outline missing in generic task editor" LastDate="1140068712307" Notes="" Priority="P1" Reminded="true" ReminderDate="2006-02-10 18:01:36.692 PST" offlineSyncState="SYNCHRONIZED"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-02-09 11:51:18.388 PST" Dirty="false" Elapsed="18514721" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-126842" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=126842" Kind="enhancement" Label="126842: prototype JIRA support" LastDate="1139604349347" Notes="" Priority="P1" Reminded="true" ReminderDate="2006-02-16 11:00:00.0 PST" offlineSyncState="SYNCHRONIZED"/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2006-02-10 10:09:14.869 PST" Elapsed="424024" EndDate="2006-02-10 13:55:37.400 PST" Estimated="0" Handle="local-103987" IssueURL="http://" Kind="" Label="fix task list refresh" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="false" CreationDate="2006-02-13 10:59:33.277 PST" Elapsed="0" EndDate="" Estimated="0" Handle="local-103991" IssueURL="http://" Kind="" Label="hits need completion state or filter needs fix" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="false" CreationDate="2006-02-14 10:22:19.798 PST" Elapsed="0" EndDate="" Estimated="0" Handle="local-103994" IssueURL="http://" Kind="" Label="investigate M5 migration" Notes=" I am getting tons of NPE's:&#13;&#10;&#13;&#10;java.lang.NullPointerException&#13;&#10; at&#13;&#10;org.eclipse.mylyn.internal.tasks.ui.MylarTaskListPlugin.access$1(MylarTask&#13;&#10;ListPlugin.java:433)&#13;&#10; at&#13;&#10;org.eclipse.mylyn.internal.tasks.ui.MylarTaskListPlugin$2.shellActivated(M&#13;&#10;ylarTaskListPlugin.java:190)&#13;&#10; at&#13;&#10;&#13;&#10; or this:&#13;&#10;&#13;&#10;java.lang.NullPointerException&#13;&#10;at&#13;&#10;org.eclipse.mylyn.internal.monitor.monitors.SelectionMonitor.selectionChan&#13;&#10;ged(SelectionMonitor.java:147)&#13;&#10;at&#13;&#10;org.eclipse.ui.internal.AbstractSelectionService.firePostSelection(Abstrac&#13;&#10;tSelectionService.java:179)&#13;&#10;at&#13;&#10;&#13;&#10; &#13;&#10;&#13;&#10;" Priority="P2" Reminded="true" ReminderDate="2006-02-16 10:22:00.0 PST"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-02-13 18:17:26.932 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-127609" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=127609" Kind="normal" Label="127609: parametrize task completion status" LastDate="1139883471597" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="INCOMING"/><Task Active="false" Bugzilla="false" Complete="false" CreationDate="2006-02-14 18:40:09.375 PST" Elapsed="6930" EndDate="" Estimated="0" Handle="local-103996" IssueURL="" Kind="" Label="make validate bugzilla server check login " Notes="" Priority="P1" Reminded="true" ReminderDate="2006-02-14 18:37:50.816 PST"/><Task Active="false" Bugzilla="false" Complete="false" CreationDate="2006-02-16 08:05:47.699 PST" Elapsed="0" EndDate="" Estimated="0" Handle="local-103997" IssueURL="https://bugs.eclipse.org/bugs" Kind="" Label="move new bug actoin and fix icon" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="false" CreationDate="2006-02-16 19:07:51.499 PST" Elapsed="0" EndDate="" Estimated="0" Handle="local-104000" IssueURL="http://" Kind="" Label="content assist not ranking locals" Notes="" Priority="P1" Reminded="true" ReminderDate="2006-02-17 12:00:00.0 PST"/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2006-02-17 15:22:01.268 PST" Elapsed="246046" EndDate="2006-02-17 19:10:11.903 PST" Estimated="0" Handle="local-104001" IssueURL="http://" Kind="" Label="startup bug" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="false" CreationDate="2006-02-17 18:28:44.376 PST" Elapsed="0" EndDate="" Estimated="0" Handle="local-104002" IssueURL="http://" Kind="" Label="task list label length" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="false" CreationDate="2006-02-17 18:50:46.216 PST" Elapsed="0" EndDate="" Estimated="0" Handle="local-104003" IssueURL="http://" Kind="" Label="bugzilla icon not showing up" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="false" CreationDate="2006-02-17 19:42:19.324 PST" Elapsed="0" EndDate="" Estimated="0" Handle="local-104004" IssueURL="http://" Kind="" Label="append Mylar version to tasklist.xml" Notes="" Priority="P2" Reminded="false" ReminderDate="2006-02-20 11:00:10.802 PST"/><BugzillaReport Active="false" Bugzilla="true" Complete="false" CreationDate="2006-02-17 19:21:28.956 PST" Dirty="false" Elapsed="0" EndDate="" Estimated="0" Handle="https://bugs.eclipse.org/bugs-128500" IssueURL="https://bugs.eclipse.org/bugs/show_bug.cgi?id=128500" Kind="normal" Label="128500: hits should show resolved status" LastDate="1140232940390" Notes="" Priority="P1" Reminded="false" ReminderDate="" offlineSyncState="SYNCHRONIZED"/></TaskCategory><TaskCategory Name="Archive"><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Elapsed="0" EndDate="1969-12-31 16:00:00.0 PST" Estimated="0" Handle="task-9" IssueURL="" Kind="" Label="improve task context paths" Notes="" Priority="P3" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Elapsed="0" EndDate="2005-08-12 17:28:43.833 PDT" Estimated="0" Handle="task-103759" IssueURL="" Kind="" Label="rename mylar.bugzilla plug-in" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Elapsed="0" EndDate="1969-12-31 16:00:00.0 PST" Estimated="0" Handle="task-68" IssueURL="" Kind="" Label="task context fails to clear" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-09-30 10:55:09.879 PDT" Elapsed="0" EndDate="2005-09-30 11:08:30.290 PDT" Estimated="0" Handle="task-103820" IssueURL="" Kind="" Label="OPEN LISTENER FAILS IN ACTIVE SEARCH" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-09-30 10:58:29.76 PDT" Elapsed="963226" EndDate="2005-10-03 14:12:47.608 PDT" Estimated="0" Handle="task-103821" IssueURL="" Kind="" Label="PACKAGE EXPLORER REFRESHES ON EVERY KEYSTROKE" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-09-14 15:42:25.54 PDT" Elapsed="2100704" EndDate="2005-09-14 16:29:39.49 PDT" Estimated="0" Handle="task-103786" IssueURL="" Kind="" Label="active search blinks on every selection" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-08-29 16:39:41.306 PDT" Elapsed="5612400" EndDate="2005-09-09 15:16:07.680 PDT" Estimated="0" Handle="task-103776" IssueURL="" Kind="" Label="active search view fails to refresh" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-09-11 14:59:25.754 PDT" Elapsed="585672" EndDate="2005-09-11 16:57:45.322 PDT" Estimated="0" Handle="task-103781" IssueURL="" Kind="" Label="auto folding fails" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-09-30 07:51:18.677 PDT" Elapsed="32958" EndDate="2005-09-30 13:44:04.32 PDT" Estimated="0" Handle="task-103819" IssueURL="" Kind="" Label="check scopes for XML" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-10-19 11:23:22.780 PDT" Elapsed="0" EndDate="2005-11-08 13:41:35.809 PST" Estimated="0" Handle="task-103856" IssueURL="" Kind="" Label="consulting: incremental Ant build and view" Notes="Ron: I think the most valuable first thing to do is to create ant support that can provide basic &#13;&#10;incremental compilation and then visualization inside of alien IDE's like Eclipse 2.1, IDEA 5.0, &#13;&#10;or RAD. At this stage, I think core incremental ant support is the right foundation rather than, &#13;&#10;say, Eclipse 3.1+ builders. What do you think?" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-09-28 18:14:33.716 PDT" Elapsed="0" EndDate="2005-09-29 18:15:05.186 PDT" Estimated="0" Handle="task-103810" IssueURL="" Kind="" Label="create new history icons" Notes="" Priority="P1" Reminded="true" ReminderDate="2005-09-29 18:14:29.770 PDT"/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-09-26 14:48:24.306 PDT" Elapsed="0" EndDate="2005-09-28 09:06:22.963 PDT" Estimated="0" Handle="task-103804" IssueURL="" Kind="" Label="decorators can fail to indicate landmarks" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-12 13:06:34.591 PST" Elapsed="977453" EndDate="2005-12-12 13:39:01.581 PST" Estimated="0" Handle="task-103928" IssueURL="http://" Kind="" Label="fix failing test" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-08-26 13:24:44.19 PDT" Elapsed="838867" EndDate="2005-08-26 13:35:37.869 PDT" Estimated="0" Handle="task-103774" IssueURL="" Kind="" Label="fix failing tests" Notes="" Priority="P3" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-09-22 16:32:15.431 PDT" Elapsed="9821793" EndDate="2005-09-22 19:41:18.877 PDT" Estimated="0" Handle="task-103795" IssueURL="" Kind="" Label="fix failing tests" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-09-23 12:39:39.388 PDT" Elapsed="1957736" EndDate="2005-09-23 13:12:32.25 PDT" Estimated="0" Handle="task-103797" IssueURL="" Kind="" Label="fix failing tests" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-09-29 16:02:07.303 PDT" Elapsed="9733791" EndDate="2005-09-30 13:32:27.861 PDT" Estimated="0" Handle="task-103818" IssueURL="" Kind="" Label="fix failing tests" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-10-20 10:41:44.571 PDT" Elapsed="4570528" EndDate="2005-10-20 11:57:59.965 PDT" Estimated="0" Handle="task-103857" IssueURL="" Kind="" Label="fix failing tests" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-11-02 14:42:30.292 PST" Elapsed="1527290" EndDate="2005-11-02 15:52:24.512 PST" Estimated="0" Handle="task-103866" IssueURL="http://" Kind="" Label="fix failing tests" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-11-03 16:33:07.218 PST" Elapsed="1032444" EndDate="2005-11-03 17:17:13.934 PST" Estimated="0" Handle="task-103875" IssueURL="" Kind="" Label="fix failing tests" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-09-29 10:59:59.666 PDT" Elapsed="0" EndDate="2005-09-30 11:11:41.966 PDT" Estimated="0" Handle="task-103816" IssueURL="" Kind="" Label="fix link to Ed's blog" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-10-21 06:13:35.107 PDT" Elapsed="753925" EndDate="2005-10-21 13:51:34.417 PDT" Estimated="0" Handle="task-103859" IssueURL="" Kind="" Label="fix tests" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-09-14 13:31:40.33 PDT" Elapsed="1186862" EndDate="2005-09-14 18:33:54.693 PDT" Estimated="0" Handle="task-103785" IssueURL="" Kind="" Label="give search providers proper labels" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-08-31 09:10:44.201 PDT" Elapsed="5991798" EndDate="2005-09-09 16:48:51.240 PDT" Estimated="0" Handle="task-103779" IssueURL="" Kind="" Label="make failing tests pass" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-09-11 16:54:38.924 PDT" Elapsed="2144934" EndDate="2005-09-11 17:37:30.271 PDT" Estimated="0" Handle="task-103782" IssueURL="" Kind="" Label="phase 1 message fails to show" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-08-26 13:35:49.776 PDT" Elapsed="4163179" EndDate="2005-08-30 21:46:15.381 PDT" Estimated="0" Handle="task-103775" IssueURL="" Kind="" Label="re-enable interest filter test" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-09-23 19:10:40.88 PDT" Elapsed="0" EndDate="2005-09-26 08:35:21.631 PDT" Estimated="0" Handle="task-103800" IssueURL="" Kind="" Label="remove usage view" Notes="" Priority="P2" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-08-26 08:22:04.937 PDT" Elapsed="1903977" EndDate="2005-09-14 19:11:04.880 PDT" Estimated="0" Handle="task-103772" IssueURL="" Kind="" Label="set active search defaults" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2006-01-06 14:27:46.517 PST" Elapsed="460580" EndDate="2006-01-06 14:40:33.440 PST" Estimated="0" Handle="task-103950" IssueURL="http://" Kind="" Label="set license settings per-project" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-09-14 16:27:02.624 PDT" Elapsed="4697" EndDate="2005-09-19 13:40:36.549 PDT" Estimated="0" Handle="task-103787" IssueURL="" Kind="" Label="task context activation hang?" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-08-26 08:12:45.833 PDT" Elapsed="509252" EndDate="2005-08-26 12:54:07.608 PDT" Estimated="0" Handle="task-103770" IssueURL="" Kind="" Label="verify problems list behavior" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-09-30 20:28:04.708 PDT" Elapsed="576459" EndDate="2005-10-03 15:09:58.621 PDT" Estimated="0" Handle="task-103823" IssueURL="" Kind="" Label="verify setting of structured selections of ant outline" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-09-28 09:27:38.407 PDT" Elapsed="0" EndDate="2005-10-03 15:12:11.963 PDT" Estimated="0" Handle="task-103809" IssueURL="" Kind="" Label="xml edges not reset when dos moved to 0" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Elapsed="0" EndDate="1969-12-31 16:00:00.0 PST" Estimated="0" Handle="task-26" IssueURL="" Kind="" Label="SHAWN: fix active search" Notes="" Priority="P3" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Elapsed="0" EndDate="1969-12-31 16:00:00.0 PST" Estimated="0" Handle="task-30" IssueURL="" Kind="" Label="add &quot;suppress filter&quot; button to views" Notes="" Priority="P2" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Elapsed="10175" EndDate="1969-12-31 16:00:00.0 PST" Estimated="0" Handle="task-55" IssueURL="" Kind="" Label="ensure only single click is required to add selected elements to views" Notes="" Priority="P2" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Elapsed="5189271" EndDate="1969-12-31 16:00:00.0 PST" Estimated="0" Handle="task-81" IssueURL="" Kind="" Label="error interest nodes fail to disappear" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Elapsed="0" EndDate="1969-12-31 16:00:00.0 PST" Estimated="0" Handle="task-44" IssueURL="" Kind="" Label="fix &quot;show filtered&quot; failure to select on first element" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Elapsed="3947585" EndDate="1969-12-31 16:00:00.0 PST" Estimated="0" Handle="task-79" IssueURL="" Kind="" Label="fix alt-click UI" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Elapsed="0" EndDate="1969-12-31 16:00:00.0 PST" Estimated="0" Handle="task-21" IssueURL="" Kind="" Label="fix delay in decoration when interest is manipulated" Notes="" Priority="P2" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Elapsed="0" EndDate="1969-12-31 16:00:00.0 PST" Estimated="0" Handle="task-66" IssueURL="" Kind="" Label="fix hiding of elements when pkg explorer is unfiltered, due to interest fitler checking globall" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Elapsed="0" EndDate="1969-12-31 16:00:00.0 PST" Estimated="0" Handle="task-69" IssueURL="" Kind="" Label="fix package explorer selection and filtering" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Elapsed="0" EndDate="1969-12-31 16:00:00.0 PST" Estimated="0" Handle="task-80" IssueURL="" Kind="" Label="fix selection cascade after each save" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Elapsed="0" EndDate="1969-12-31 16:00:00.0 PST" Estimated="0" Handle="task-46" IssueURL="" Kind="" Label="hook up folding button" Notes="" Priority="P2" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Elapsed="179077" EndDate="1969-12-31 16:00:00.0 PST" Estimated="0" Handle="task-87" IssueURL="" Kind="" Label="improve preference pages" Notes="" Priority="P2" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Elapsed="0" EndDate="1969-12-31 16:00:00.0 PST" Estimated="0" Handle="task-27" IssueURL="" Kind="" Label="make highlighters work" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Elapsed="0" EndDate="1969-12-31 16:00:00.0 PST" Estimated="0" Handle="task-25" IssueURL="" Kind="" Label="make sure elements exist if trying to open" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Elapsed="6086813" EndDate="1969-12-31 16:00:00.0 PST" Estimated="0" Handle="task-83" IssueURL="" Kind="" Label="outline view failing" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Elapsed="2046273" EndDate="1969-12-31 16:00:00.0 PST" Estimated="0" Handle="task-84" IssueURL="" Kind="" Label="selection cascade triggered by outline" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Elapsed="0" EndDate="1969-12-31 16:00:00.0 PST" Estimated="0" Handle="task-60" IssueURL="" Kind="" Label="verify interest filter is not reinstalled too often" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Elapsed="0" EndDate="1969-12-31 16:00:00.0 PST" Estimated="0" Handle="task-3" IssueURL="" Kind="" Label="LONG: monitoring" Notes="" Priority="P3" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Elapsed="0" EndDate="1969-12-31 16:00:00.0 PST" Estimated="0" Handle="task-103753" IssueURL="" Kind="" Label="change all project settings to show PDE errors" Notes="" Priority="P2" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Elapsed="0" EndDate="1969-12-31 16:00:00.0 PST" Estimated="0" Handle="task-103756" IssueURL="" Kind="" Label="ensure Java project can't be landmark" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Elapsed="0" EndDate="1969-12-31 16:00:00.0 PST" Estimated="0" Handle="task-2" IssueURL="" Kind="" Label="ensure that when element is selected parent interest becomes positive" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Elapsed="4453564" EndDate="1969-12-31 16:00:00.0 PST" Estimated="0" Handle="task-103751" IssueURL="" Kind="" Label="figure out listener API" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Elapsed="14091988" EndDate="1969-12-31 16:00:00.0 PST" Estimated="0" Handle="task-103754" IssueURL="" Kind="" Label="fix error interest bug" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Elapsed="6421495" EndDate="1969-12-31 16:00:00.0 PST" Estimated="0" Handle="task-103760" IssueURL="" Kind="" Label="fix failing unit tests" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Elapsed="0" EndDate="1969-12-31 16:00:00.0 PST" Estimated="0" Handle="task-6" IssueURL="" Kind="" Label="fix problem with random relationships being added on re-parsing" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Elapsed="1740733" EndDate="1969-12-31 16:00:00.0 PST" Estimated="0" Handle="task-86" IssueURL="" Kind="" Label="improve error logging" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Elapsed="1226623" EndDate="1969-12-31 16:00:00.0 PST" Estimated="0" Handle="task-82" IssueURL="" Kind="" Label="landmark update failing" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Elapsed="0" EndDate="1969-12-31 16:00:00.0 PST" Estimated="0" Handle="task-4" IssueURL="" Kind="" Label="make error interest work for non-Java" Notes="" Priority="P3" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Elapsed="0" EndDate="1969-12-31 16:00:00.0 PST" Estimated="0" Handle="Bugzilla-102249" IssueURL="" Kind="" Label="102249: on shell de-activation Mylar causes noticeable slowdown" Notes="" Priority="P2" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Elapsed="1493" EndDate="1969-12-31 16:00:00.0 PST" Estimated="0" Handle="Bugzilla-102675" IssueURL="" Kind="" Label="102675: prune dangling predicted interest nodes" Notes="" Priority="P2" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Elapsed="0" EndDate="1969-12-31 16:00:00.0 PST" Estimated="0" Handle="task-8" IssueURL="" Kind="" Label="avoid calling refresh all on package explorer when errors change" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Elapsed="0" EndDate="1969-12-31 16:00:00.0 PST" Estimated="0" Handle="task-22" IssueURL="" Kind="" Label="fix editor flicker on taskscape activation" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Elapsed="0" EndDate="1969-12-31 16:00:00.0 PST" Estimated="0" Handle="task-35" IssueURL="" Kind="" Label="folding compute additions problem" Notes="" Priority="P2" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Elapsed="0" EndDate="1969-12-31 16:00:00.0 PST" Estimated="0" Handle="task-38" IssueURL="" Kind="" Label="folding toggle is broken and requires reset" Notes="" Priority="P2" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Elapsed="0" EndDate="1969-12-31 16:00:00.0 PST" Estimated="0" Handle="task-61" IssueURL="" Kind="" Label="hook up new folding toggle button" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Elapsed="0" EndDate="1969-12-31 16:00:00.0 PST" Estimated="0" Handle="task-65" IssueURL="" Kind="" Label="improve wizards and popup menus" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Elapsed="0" EndDate="1969-12-31 16:00:00.0 PST" Estimated="0" Handle="task-1" IssueURL="" Kind="" Label="make folding trigger when switching modes" Notes="" Priority="P3" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Elapsed="0" EndDate="1969-12-31 16:00:00.0 PST" Estimated="0" Handle="task-15" IssueURL="" Kind="" Label="package explorer selections fail" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Elapsed="0" EndDate="1969-12-31 16:00:00.0 PST" Estimated="0" Handle="task-53" IssueURL="" Kind="" Label="restore selections of package declarations" Notes="" Priority="P3" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Elapsed="0" EndDate="1969-12-31 16:00:00.0 PST" Estimated="0" Handle="task-12" IssueURL="" Kind="" Label="selections not being updated in package explorer" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-12-07 14:30:27.448 PST" Elapsed="0" EndDate="1969-12-31 16:00:00.0 PST" Estimated="0" Handle="task-32" IssueURL="" Kind="" Label="suppress repretition of items in content assist" Notes="" Priority="P1" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-09-27 19:04:23.612 PDT" Elapsed="2014211" EndDate="2006-01-23 14:59:07.325 PST" Estimated="0" Handle="task-103808" IssueURL="" Kind="" Label="long: view refresh" Notes="" Priority="P3" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2005-11-08 09:01:17.569 PST" Elapsed="0" EndDate="2006-01-23 14:59:35.376 PST" Estimated="0" Handle="task-103878" IssueURL="http://appft1.uspto.gov/netahtml/PTO/search-bool.html" Kind="" Label="long: patent and prior art search" Notes="" Priority="P3" Reminded="false" ReminderDate=""/></TaskCategory><TaskCategory Name="Business"><Task Active="false" Bugzilla="false" Complete="true" CreationDate="2006-02-09 11:06:16.603 PST" Elapsed="0" EndDate="2006-02-16 11:12:01.586 PST" Estimated="0" Handle="local-103985" IssueURL="http://" Kind="" Label="update EclipseCon/AOSD bio and picture (due Feb 17)" Notes="" Priority="P3" Reminded="true" ReminderDate="2006-02-12 11:06:11.526 PST"/><Task Active="false" Bugzilla="false" Complete="false" CreationDate="2006-02-09 12:14:45.11 PST" Elapsed="0" EndDate="" Estimated="0" Handle="local-103986" IssueURL="http://" Kind="" Label="restore ThinkPad from drive failure" Notes="Lenovo: 800-565-3344, 4&#13;&#10;New case: 3780198, hard drive dispatch: 3780478, recovery CDs: 3780482, newest: 3782684&#13;&#10;Business partner: DTM, 2323 Boundary Road&#13;&#10;&#13;&#10;Nexinnovations 985 virtual, vancouver, canada, 604-216-2400, 8:30am-5pm.&#13;&#10; &#13;&#10;Drive Fitness test: Failure code: 0x20 - Device not found (TRC: 2000B51C)&#13;&#10;&#13;&#10;ERROR&#13;&#10;0200: Failure Fixed Disk 0&#13;&#10;&#13;&#10;drive setup: http://www.hitachigst.com/hdd/support/download.htm&#13;&#10;&#13;&#10;http://www-3.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-4PEN8X&#13;&#10;&#13;&#10;-------------&#13;&#10;&#13;&#10;DATA RECOVERY&#13;&#10;&#13;&#10;http://www.acsdata.com/hitachi-data-recovery.htm&#13;&#10;&#13;&#10;Clean room: $1400-$1500&#13;&#10;Non clean-room: $600&#13;&#10;&#13;&#10;Sean recommends: http://support.wdc.com/partners/recovery.asp" Priority="P2" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="false" CreationDate="2006-02-13 10:24:15.792 PST" Elapsed="0" EndDate="" Estimated="0" Handle="local-103990" IssueURL="http://www.eclipse.org/projects/dev_process/project-log.php " Kind="" Label="create Mylar IP Log" Notes="" Priority="P2" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="false" CreationDate="2006-02-13 12:32:53.720 PST" Elapsed="0" EndDate="" Estimated="0" Handle="local-103992" IssueURL="http://www.phpeclipse.de/tiki-view_forum_thread.php?forumId=5&amp;comments_parentId=2593" Kind="" Label="review PHPEclipse integration discussion" Notes="" Priority="P3" Reminded="true" ReminderDate="2006-02-21 12:32:00.0 PST"/><Task Active="false" Bugzilla="false" Complete="false" CreationDate="2006-02-13 12:34:05.513 PST" Elapsed="437204" EndDate="" Estimated="0" Handle="local-103993" IssueURL="" Kind="" Label="draft EclipseCon slides (due Feb 17)" Notes="" Priority="P1" Reminded="true" ReminderDate="2006-02-14 08:00:52.114 PST"/><Task Active="false" Bugzilla="false" Complete="false" CreationDate="2006-02-14 10:25:12.826 PST" Elapsed="0" EndDate="" Estimated="0" Handle="local-103995" IssueURL="http://" Kind="" Label="write Jolt Award summaries (due March 3)" Notes="" Priority="P5" Reminded="false" ReminderDate="2006-02-26 10:24:57.144 PST"/><Task Active="false" Bugzilla="false" Complete="false" CreationDate="2006-02-16 10:08:57.595 PST" Elapsed="0" EndDate="" Estimated="0" Handle="local-103998" IssueURL="http://" Kind="" Label="write introductory email to Atlassian" Notes="That looks really good. The only contact I have there is Jonathan Nolen mailto:jonathan@atlassian.com (their developer relations guy), but i do not konw him personally. Perhaps you should just send the email to both of them. It can't really hurt.&#13;&#10;&#13;&#10;cheers,&#13;&#10;Brock&#13;&#10;&#13;&#10;Quoting Mik Kersten &lt;beatmik@acm.org&gt;:&#13;&#10;&#13;&#10;&gt; Brock, here's a draft, what do you think? Do you have a contact there &#13;&#10;&gt; that you want to use? If not I have a pretty senior contact there, &#13;&#10;&gt; but don't know him.&#13;&#10;&gt; &#13;&#10;&gt; ------------&#13;&#10;&gt; &#13;&#10;&gt; The Mylar eclipse.org project is growing, and there has been &#13;&#10;&gt; increasing demand for providing issue tracker integration for JIRA. &#13;&#10;&gt; One of the key components of Mylar is a standalone task management UI. &#13;&#10;&gt; The Mylar Bugzilla Client extends that and provides tight integration &#13;&#10;&gt; for working with Bugzilla issues within Eclipse. To see it in action &#13;&#10;&gt; see the 2nd flash video&#13;&#10;&gt; at:&#13;&#10;&gt; http://eclipse.org/mylar/doc.php&#13;&#10;&gt; &#13;&#10;&gt; As Eclipse itself has demonstrated with it's CVS client, the quality &#13;&#10;&gt; and integration of the client UI can be more important to developer &#13;&#10;&gt; productivity than the quality of the underlying repository. Brock &#13;&#10;&gt; Janiczak has made significant progress with his JIRA Dashboard &#13;&#10;&gt; plug-in, and we have generic task/query management support in Mylar's &#13;&#10;&gt; Task List component. To meet our community's needs we would like to &#13;&#10;&gt; take the next step, and build the same level of Eclipse integration &#13;&#10;&gt; with JIRA that we currently have for Bugzilla.&#13;&#10;&gt; &#13;&#10;&gt; &#13;&#10;&gt; I can dedicate some of my Mylar development time to make this happen &#13;&#10;&gt; in order to help make Mylar the standard mechanism for task management &#13;&#10;&gt; in Eclipse. Brock Janiczak is also volunteering some time to help &#13;&#10;&gt; build the community that uses the JIRA Dashboard plug-in. But we &#13;&#10;&gt; would benefit from your support in this effort. Please let us know if &#13;&#10;&gt; this is something that you are interested in helping with.&#13;&#10;&gt; &#13;&#10;&gt; Best regards,&#13;&#10;&gt; &#13;&#10;&gt; Mik Kersten and Brock Janiczak" Priority="P3" Reminded="false" ReminderDate="2006-02-21 10:08:50.665 PST"/><Task Active="false" Bugzilla="false" Complete="false" CreationDate="2006-02-16 10:29:36.507 PST" Elapsed="0" EndDate="" Estimated="0" Handle="local-103999" IssueURL="http://www.eclipse.org/eclipse/development/eclipse_project_plan_3_2.html" Kind="" Label="read update 3.2 dev plan" Notes="" Priority="P3" Reminded="false" ReminderDate="2006-02-21 10:29:31.349 PST"/></TaskCategory><TaskCategory Name="Personal"><Task Active="false" Bugzilla="false" Complete="false" CreationDate="2006-02-13 09:54:07.51 PST" Elapsed="0" EndDate="" Estimated="0" Handle="local-103988" IssueURL="http://www.fido.ca/portal/home/homepage.jsp?lang=en " Kind="" Label="Pay Fido bill" Notes="" Priority="P3" Reminded="false" ReminderDate="2006-02-20 09:53:46.161 PST"/><Task Active="false" Bugzilla="false" Complete="false" CreationDate="2006-02-13 10:19:17.413 PST" Elapsed="0" EndDate="" Estimated="0" Handle="local-103989" IssueURL="" Kind="" Label="music to get" Notes="Global Underground - Electric Calm v.3&#13;&#10;&#13;&#10;Choice: A Collection of Classics&quot; by Danny Howells&#13;&#10;&#13;&#10;Defected in the house miami" Priority="P4" Reminded="false" ReminderDate="2006-02-21 10:19:00.0 PST"/></TaskCategory><BugzillaQuery MaxHits="-1" Name="Current" QueryString="https://bugs.eclipse.org/bugs/buglist.cgi?GoAheadAndLogIn=1&amp;Bugzilla_login=beatmik%40acm.org&amp;Bugzilla_password=1umberto&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;product=Mylar&amp;long_desc_type=allwordssubstr&amp;long_desc=&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;priority=P1&amp;priority=P2&amp;priority=P3&amp;emailassigned_to1=1&amp;emailtype1=substring&amp;email1=beatmik&amp;order=Importance" RepositoryUrl="https://bugs.eclipse.org/bugs"><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-126842" Name="126842: prototype JIRA support" Priority="P1"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-128468" Name="128468: &gt;make priority column and combo editor be icon based" Priority="P1"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-126775" Name="126775: &gt;fix task archive and category duplication" Priority="P1"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-111861" Name="111861: open type history might be missing some interesting types" Priority="P1"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-125555" Name="125555: &gt;interest filter fails on PDE extensions and other pages" Priority="P1"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-127609" Name="127609: parametrize task completion status" Priority="P1"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-113275" Name="113275: improve PDE search and include manifest files" Priority="P2"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-113399" Name="113399: add recommended preference changes" Priority="P2"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-118007" Name="118007: Ability to selectively add resources (files/folders) to context" Priority="P2"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-127293" Name="127293: &gt;bugzilla.core should not depend on mylar" Priority="P2"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-106678" Name="106678: hierarchical layout in package explorer shows uninteresting elements" Priority="P2"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-112233" Name="112233: [improve interaction for filtered element navigation" Priority="P2"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-118542" Name="118542: Open/close Java files leave interest on packages" Priority="P2"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-118884" Name="118884: problems with PDE Outline update" Priority="P2"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-120499" Name="120499: Mylar should make explicitly created resources interesting, and ignore others" Priority="P2"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-121329" Name="121329: ensure that there are no leaks of Color and Image" Priority="P2"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-123649" Name="123649: &gt;new bug wizard doesn't automatically update options" Priority="P2"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-124259" Name="124259: &gt;Can't cacel a temporarily unfilter a node" Priority="P2"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-125591" Name="125591: &gt;number of editors bloats due to auto-close suppression" Priority="P2"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-126237" Name="126237: copying and pasting task contexts" Priority="P2"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-126257" Name="126257: &gt;package explorer and other views fail to refresh on persp..." Priority="P2"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-126882" Name="126882: &gt;Not all file types preserved in Mylar filtered Package Ex..." Priority="P2"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-117518" Name="117518: &gt;Show dialog when interest set by user with no active context" Priority="P2"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-102663" Name="102663: support multiple workbench windows" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-104052" Name="104052: active search of local context" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-111107" Name="111107: &gt;improve usability and scope of dynamic working set for se..." Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-119137" Name="119137: Task does not remember perspective" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-124082" Name="124082: &gt;Add progress bar to the category" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-125987" Name="125987: &gt;Add a possibility to set more than one &amp;quot;interest filter&amp;quot;" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-126863" Name="126863: &gt;Update docs by 0.50 release" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-112020" Name="112020: &gt;limit number of visible items in active search view" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-121759" Name="121759: &gt;active search tree is automatically expanded on double-click" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-125173" Name="125173: &gt;[v0.4.7] Partial functionality failures for Bugzilla 2.21" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-117761" Name="117761: &gt;Task context commit not allowed for bug under a query cat..." Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-111258" Name="111258: verify interaction of Java active search with JSP resources" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-111290" Name="111290: &gt;Explore option to show in-editor occurences on active search" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-114124" Name="114124: set up monitor scripts on eclipse.org" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-114684" Name="114684: &gt;active search matches should navigate to referring locati..." Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-117979" Name="117979: new selection should always make parent interest positive" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-120502" Name="120502: [performance] pauses during casual editor navigation" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-120917" Name="120917: clean up collection of Mylar usage stats" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-121309" Name="121309: improve monitor upload facility" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-121316" Name="121316: &gt;Preferences: Button for colorpicker rendered half and wit..." Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-121317" Name="121317: &gt;Can't drag tasks into folder in Mylar Tasks view on Mac OS X" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-121442" Name="121442: Active Search hogs the CPU" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-121923" Name="121923: &gt;Mylar Java Editor doesn't trigger action through shortcut" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-122931" Name="122931: &gt;Mylar Tasks view: Dropdown starts with selected priority ..." Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-123330" Name="123330: temporarily unfiltered nodes stick if not selected" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-124047" Name="124047: &gt;&amp;quot;Synchronize Reports&amp;quot; doesn't update editor" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-124887" Name="124887: &gt;browser tab not loading web page for Bugzilla tasks" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-125422" Name="125422: &gt;Option to blacklist some file types" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-125733" Name="125733: &gt;minimization problem with task list" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-125883" Name="125883: &gt;Moving a new class doesn't update the filtered package view" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-126263" Name="126263: &gt;junit launch configurations broken in M5" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-126862" Name="126862: &gt;failure to bring compare editor into focus" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-126865" Name="126865: &gt;When deleting multiple selected tasks confirmation dialog..." Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-128500" Name="128500: hits should show resolved status" Priority="P1"/></BugzillaQuery><BugzillaQuery MaxHits="100" Name="Products - AspectJ" QueryString="https://bugs.eclipse.org/bugs/buglist.cgi?GoAheadAndLogIn=1&amp;Bugzilla_login=beatmik%40acm.org&amp;Bugzilla_password=1umberto&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;product=AJDT&amp;product=AspectJ&amp;long_desc_type=allwordssubstr&amp;long_desc=&amp;bug_status=UNCONFIRMED&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;emailassigned_to1=1&amp;emailtype1=exact&amp;email1=beatmik%40acm.org&amp;order=Importance" RepositoryUrl="https://bugs.eclipse.org/bugs"><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-109759" Name="109759: &gt;create pointcut matcher tool" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-42070" Name="42070: &gt;Applying a perthis modifier to an aspect cause the aspect..." Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-50928" Name="50928: &gt;Provide UI for advice execution ordering at join points" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-50929" Name="50929: &gt;Provide UI for showing call graph affected by flow advice" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-50931" Name="50931: &gt;Augment views that expose inheritance with aspect-declare..." Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-58688" Name="58688: &gt;ajbrowser filter associations button doesn't work" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-63116" Name="63116: &gt;Aspect oriented pointcuts for debugging" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-75233" Name="75233: &gt;Pointcut &amp;amp; advice definition wizards" Priority="P4"/></BugzillaQuery><BugzillaQuery MaxHits="100" Name="People - Wesley" QueryString="https://bugs.eclipse.org/bugs/buglist.cgi?GoAheadAndLogIn=1&amp;Bugzilla_login=beatmik%40acm.org&amp;Bugzilla_password=1umberto&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;long_desc_type=allwordssubstr&amp;long_desc=&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;emailassigned_to1=1&amp;emailtype1=substring&amp;email1=wes.coelho%40gmail.com&amp;order=Importance" RepositoryUrl="https://bugs.eclipse.org/bugs"><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-119554" Name="119554: Generalize monitor uploading" Priority="P2"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-106935" Name="106935: [discussion] add provider for Visualizer" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-113583" Name="113583: improve UI for activating multiple contexts" Priority="P4"/></BugzillaQuery><BugzillaQuery MaxHits="100" Name="People - Gail" QueryString="https://bugs.eclipse.org/bugs/buglist.cgi?GoAheadAndLogIn=1&amp;Bugzilla_login=beatmik%40acm.org&amp;Bugzilla_password=1umberto&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;product=Mylar&amp;long_desc_type=allwordssubstr&amp;long_desc=&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;emailassigned_to1=1&amp;emailtype1=substring&amp;email1=murphy&amp;order=Importance" RepositoryUrl="https://bugs.eclipse.org/bugs"><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-117827" Name="117827: &gt;Allow collectors to output results in a tabular format" Priority="P3"/></BugzillaQuery><BugzillaQuery MaxHits="100" Name="People - Rob" QueryString="https://bugs.eclipse.org/bugs/buglist.cgi?GoAheadAndLogIn=1&amp;Bugzilla_login=beatmik%40acm.org&amp;Bugzilla_password=1umberto&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;product=Mylar&amp;long_desc_type=allwordssubstr&amp;long_desc=&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;priority=P1&amp;priority=P2&amp;emailassigned_to1=1&amp;emailtype1=substring&amp;email1=relves&amp;order=Importance" RepositoryUrl="https://bugs.eclipse.org/bugs"><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-109460" Name="109460: wrong incoming status on submitted reports/comments" Priority="P1"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-125263" Name="125263: &gt;task list view should refresh query hits when a task changes" Priority="P1"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-126271" Name="126271: support import of task list and contexts" Priority="P1"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-126866" Name="126866: NPE in new bugzilla report wizard" Priority="P1"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-117035" Name="117035: Bugzilla plugin ignores encoding" Priority="P2"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-118582" Name="118582: improve bugzilla client support for http auth" Priority="P2"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-123980" Name="123980: Deleting an active task should just deactivate it." Priority="P2"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-106939" Name="106939: Bugzilla query refresh in a task list should use scheduler" Priority="P2"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-115041" Name="115041: Task highlighters look ugly on gtk" Priority="P2"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-121315" Name="121315: Preferences: Highlighter with label &quot;orange gradient&quot; is rendered Brown" Priority="P2"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-124321" Name="124321: explore making local tasks be a repository" Priority="P2"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-124919" Name="124919: planner should only report time Elapsed during plan period" Priority="P2"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-126444" Name="126444: &gt;doSave(..) called too many times on MylarTaskEditor" Priority="P2"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-126618" Name="126618: &gt;install buggzilla repositories on virtual server and setu..." Priority="P2"/></BugzillaQuery><BugzillaQuery MaxHits="100" Name="Products - Mozilla" QueryString="https://bugzilla.mozilla.org/buglist.cgi?GoAheadAndLogIn=1&amp;Bugzilla_login=mik.kersten%40eclipse.org&amp;Bugzilla_password=1umberto&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;long_desc_type=allwordssubstr&amp;long_desc=&amp;emailcc1=1&amp;emaillongdesc1=1&amp;emailtype1=substring&amp;email1=mik.kersten&amp;order=Importance" RepositoryUrl="https://bugs.eclipse.org/bugs"><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-224577" Name="224577: Bugzilla could use a web services interface" Priority="P4"/></BugzillaQuery><BugzillaQuery MaxHits="100" Name="Products - Eclipse" QueryString="https://bugs.eclipse.org/bugs/buglist.cgi?GoAheadAndLogIn=1&amp;Bugzilla_login=beatmik%40acm.org&amp;Bugzilla_password=1umberto&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;product=JDT&amp;product=Platform&amp;long_desc_type=allwordssubstr&amp;long_desc=&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_status=RESOLVED&amp;emailreporter1=1&amp;emailcc1=1&amp;emaillongdesc1=1&amp;emailtype1=substring&amp;email1=beatmik&amp;order=Importance" RepositoryUrl="https://bugs.eclipse.org/bugs"><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-110147" Name="110147: &gt;[preferences][content assist] preference page issues" Priority="P2"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-9355" Name="9355: &gt;Collapse function for block of code and comments hiding" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-37974" Name="37974: &gt;[Tasks] Issues with task/problem view split - go back to ..." Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-52685" Name="52685: &gt;[Plan Item] Evolve the Eclipse user experience *CONTINUED*" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-71901" Name="71901: &gt;Underline and Strikethrough Font styles" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-79056" Name="79056: &gt;[api][navigation]Providing an extension point to enable o..." Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-84988" Name="84988: &gt;Resource exclusion filters" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-88293" Name="88293: [misc] Extension-Point for HyperlinkDetectors" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-90210" Name="90210: &gt;[misc] Java editor should support guarded regions in source" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-100095" Name="100095: &gt;Consider making URLTransfer public" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-106000" Name="106000: &gt;[plan] Need API to allow code assist/completion from outs..." Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-113272" Name="113272: &gt;[Browser] allow url tracking listeners to be added to the..." Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-122611" Name="122611: &gt;Provide a facility to save and load exclusion filters fro..." Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-126748" Name="126748: &gt;[search] Provide integration with the new TextSearch UI" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-126085" Name="126085: &gt;welcome screen broken with MSIE 7 beta 2" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-63692" Name="63692: [projection] Annotations in folded region are not rendered in overview ruler" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-112406" Name="112406: misleading exception when web browser is not available" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-116334" Name="116334: &gt;org.eclipse.ui.views.showView bindings don't show up in menu" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-69315" Name="69315: &gt;Deprecated code warnings" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-79112" Name="79112: [1.5] [model] accessing annotation on Java elements" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-84431" Name="84431: &gt;Accessibility issue with new icon for Annotations" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-89843" Name="89843: &gt;[Commands] parameters: Keybinding for a View displayed bu..." Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-95634" Name="95634: &gt;[Tree] TreeColumn does not show &amp;quot;...&amp;quot; on cut-off Text and..." Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-99984" Name="99984: &gt;Sync view toolbar buttons are bigger with SWT manifest" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-101205" Name="101205: &gt;[Browser] Keybindings and menus for Copy, Paste, etc. don..." Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-104373" Name="104373: [projection] Entered text gets automatically folded away" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-106428" Name="106428: Need support for deploying features depending on other features" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-107280" Name="107280: &gt;[Workbench] ShellListener.shellClosed is not called on co..." Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-110913" Name="110913: &gt;[api][content assist] java content assist context" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-111025" Name="111025: [Viewers] setting background color on trees with columns" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-111155" Name="111155: [Contributions] wrong toolbar height if first button has a pull-down menu" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-113392" Name="113392: [rulers]promote annotations for folded regions" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-116084" Name="116084: &gt;Make ChangeSetProvider and friends API" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-117223" Name="117223: &gt;trees with columns don't show tooltips" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-117319" Name="117319: &gt;&amp;quot;Search for updates..&amp;quot; should allow update sites to be sp..." Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-125372" Name="125372: &gt;make Package Explorer collapse policy optional" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-121441" Name="121441: &gt;[LinkedResources] Slow, flashy, then out of memory when c..." Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-122849" Name="122849: [Model Sync] Support for change sets" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-124545" Name="124545: [Viewers] FilteredTree refresh when filter is on" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-124551" Name="124551: &gt;support for strikethrough fonts" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-124702" Name="124702: [projection] redraw problem with JavaEditor.resetProject()" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-125959" Name="125959: [OLE] in-place editor for PDFs" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-126767" Name="126767: &gt;problem starting plugins with I20060207-0930" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-128233" Name="128233: &gt;need to investigate scalability of FilteredTree" Priority="P3"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-19945" Name="19945: &gt;DCR: date/time widget would be useful" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-37997" Name="37997: &gt;[Plan Item] Evolve the Eclipse user experience" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-115152" Name="115152: &gt;[package explorer] Improved for compressed folders in the..." Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-107082" Name="107082: npe in IconAndMessageDialog.getSWTImage(..)" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-37154" Name="37154: &gt;[Team] Support for subversion" Priority="P5"/></BugzillaQuery><BugzillaQuery MaxHits="500" Name="Low Priority" QueryString="https://bugs.eclipse.org/bugs/buglist.cgi?GoAheadAndLogIn=1&amp;Bugzilla_login=beatmik%40acm.org&amp;Bugzilla_password=1umberto&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;product=Mylar&amp;long_desc_type=allwordssubstr&amp;long_desc=&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;priority=P4&amp;priority=P5&amp;emailassigned_to1=1&amp;emailtype1=substring&amp;email1=beatmik%40acm.org&amp;order=Importance" RepositoryUrl="https://bugs.eclipse.org/bugs"><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-58646" Name="58646: &gt;[Coop] pluggable hyperlink policy support" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-102678" Name="102678: improve distinguishing between editor selections and edits" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-102851" Name="102851: &gt;support adding attachments to reports" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-102854" Name="102854: &gt;add bug editor support for voting" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-103093" Name="103093: &gt;spell checking of bugzilla comments" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-103516" Name="103516: Should be able to map highlighters to priority" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-103736" Name="103736: add interest sorter to problems list" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-103932" Name="103932: &gt;drag-and-drop patching" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-104062" Name="104062: in &quot;new bug report&quot;, put the previously-submitted to components on top" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-104247" Name="104247: support decorators in task list" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-104287" Name="104287: Alt+Click does not work in the Java Browsing Perspective" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-104341" Name="104341: add interest scaling factor control" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-104485" Name="104485: &gt;broaden composite contexts" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-104497" Name="104497: &gt;[discussion] automatic task activation" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-104601" Name="104601: &gt;support mylar running on JDK 1.4" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-104783" Name="104783: landmarks blink on save" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-106976" Name="106976: &gt;[discussion] property-based interest filtering" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-107259" Name="107259: &gt;[discussion] provide preview of task context" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-107264" Name="107264: &gt;make active hierarchy update lazily" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-107596" Name="107596: &gt;[discussion] XP / Agile support features" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-109552" Name="109552: &gt;add workflow to task completion" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-109559" Name="109559: add &quot;dependant project&quot; degree of separation" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-109905" Name="109905: [discussion] plan JIRA support" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-110547" Name="110547: &gt;Active Search view could show additional relevant info" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-111218" Name="111218: &gt;[discussion] sharing and awareness of task context" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-111362" Name="111362: manage resource history" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-111540" Name="111540: add overlay to indicate task completion" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-111698" Name="111698: &gt;provide spring framework specific active search features" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-111700" Name="111700: &gt;provide wtp xml editor integration" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-111713" Name="111713: &gt;add mylar filter to debug view" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-111864" Name="111864: make open type history sorting be based on interest" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-111865" Name="111865: create welcome page" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-112235" Name="112235: &gt;[discussion] expose interest threshold filter" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-112669" Name="112669: add optional categories for completed today, completed this week" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-113470" Name="113470: apply mylar to task list" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-113848" Name="113848: support attaching context to bug report" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-114040" Name="114040: imporove web docs integration" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-114047" Name="114047: allow junit test suite of current context to run with low process priority" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-115200" Name="115200: &gt;Drag-n-drop of java file nodes to active search view" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-115941" Name="115941: &gt;provide web forum based issue provider" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-120469" Name="120469: Decouple bugzilla task reading" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-120504" Name="120504: &gt;Read task contexts independently of the workspace" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-122469" Name="122469: [performance] create structure bridge cache" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-123120" Name="123120: create full-screen screenshots of Mylar usage" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-123527" Name="123527: support mutliple status values" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-123699" Name="123699: &gt;Breakpoints retined by task context" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-106990" Name="106990: Add support for Bugzilla integrated into Collabnet" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-107348" Name="107348: Mylar should not increase interest when scrolling trough search results" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-112424" Name="112424: test for failure of non-filtered mode refresh" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-113024" Name="113024: &gt;Reminder date chooser forces date selection" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-120189" Name="120189: &gt;add version field to InteractionEvent" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-101724" Name="101724: &gt;differentiating between xml edits and selections" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-102853" Name="102853: &gt;bug search dialog is clunky" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-103283" Name="103283: make predicted interest errors work for plugin.xml and other resources" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-103365" Name="103365: monitor scrolling activity" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-103566" Name="103566: &gt;create UI for removing all offline reports" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-104340" Name="104340: multiple tasks active not working correctly" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-104362" Name="104362: &gt;doc comments of fields are not folded" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-104782" Name="104782: ensure that mylar viewer management removes facilities on view close" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-104799" Name="104799: show filtered fails to clear root nodes in navigator view" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-106921" Name="106921: &gt;allow columns to be configured in task list" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-106922" Name="106922: &gt;Submitting Data from bug report is blocking UI" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-106940" Name="106940: &gt;[discussion] support for QA tools" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-106943" Name="106943: &gt;Add dropdown for filters previously used on the tasklist" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-107091" Name="107091: &gt;Add preview of the task context highlighters to the prefs..." Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-107169" Name="107169: consider making ITaskListElement(s) adapt to tasks" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-107174" Name="107174: &gt;localize messages to a single class and bundle" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-107491" Name="107491: &gt;add disabled icons" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-107949" Name="107949: active hierarchy should update based on model changes" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-107991" Name="107991: make one level of subtypes show in Active Hierarchy" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-108021" Name="108021: make monitor listen to all preference changes" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-108063" Name="108063: create policy for re-running active searches" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-108067" Name="108067: when activating a new report automatically populate context with stack" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-108441" Name="108441: make relation providers extension point based" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-109214" Name="109214: create active serach UI test harness" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-109259" Name="109259: working set filter interacts badly with mylar filter" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-109314" Name="109314: auto folding hides annotation matches" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-109454" Name="109454: make online access mode to report trigger offline mode" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-109643" Name="109643: improve active search invalidation for calls" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-109678" Name="109678: create mylar perspectives" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-109928" Name="109928: make documentation available online" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-110037" Name="110037: find referencing contexts" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-110042" Name="110042: consider limiting size of active search matches" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-110281" Name="110281: move commons dependancies to be on SDK" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-110471" Name="110471: &gt;propagate highlighting to files when declarations filtere..." Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-110892" Name="110892: repeated searches should not induce landmark interest" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-111165" Name="111165: &gt;[discussion] can files be landmarks?" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-111266" Name="111266: make Active Search work for Ant references" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-111716" Name="111716: &gt;[discussion] explore exposing context model scaling factors" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-112016" Name="112016: text selections in xml files will get recorded twice" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-112721" Name="112721: handle interest level for type refactorings and element deletion" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-113187" Name="113187: make content type an extension, not API" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-114050" Name="114050: support plans in task list" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-114561" Name="114561: restructure and fix up documentation" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-114832" Name="114832: &gt;[discussion] figure out overlap between Mylar Tasks and B..." Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-114966" Name="114966: fix web docs support" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-115498" Name="115498: [discussion] rewind and replay of context capture" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-116487" Name="116487: &gt;add performance tests" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-116514" Name="116514: support building against IBM JDK" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-117233" Name="117233: xml and bugzilla bridges should implement retrieving children" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-117517" Name="117517: add support for commit comment templates" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-117587" Name="117587: clean up 3.1 build process" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-119307" Name="119307: resources and other moved elements should maintain interest" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-120952" Name="120952: [discussion] provide task/issue repository view and extension points" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-121000" Name="121000: make monitor interaction event externalization consistent with core" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-122927" Name="122927: &gt;[mac] Mylar Editor: missing rectangle around Documentatio..." Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-122928" Name="122928: &gt;[mac] task editor triangle looks ugly when it has focus" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-125936" Name="125936: add option to activate tasks on open" Priority="P4"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-103728" Name="103728: consider changing active search quick view to JavaOutlineInformationControl subclass" Priority="P5"/><BugzillaQueryHit Handle="https://bugs.eclipse.org/bugs-114254" Name="114254: create new landmark manipulation icons and fix names" Priority="P5"/></BugzillaQuery></TaskList> \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.tests/testdata/performance/tasklist-4000.xml.zip b/org.eclipse.mylyn.tasks.tests/testdata/performance/tasklist-4000.xml.zip
deleted file mode 100644
index eb1a6e4a5..000000000
--- a/org.eclipse.mylyn.tasks.tests/testdata/performance/tasklist-4000.xml.zip
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.tests/testdata/taskdata-1.0-bug-219897.zip b/org.eclipse.mylyn.tasks.tests/testdata/taskdata-1.0-bug-219897.zip
deleted file mode 100644
index 8242f5819..000000000
--- a/org.eclipse.mylyn.tasks.tests/testdata/taskdata-1.0-bug-219897.zip
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.tests/testdata/taskdataimporttest/context-history.xml b/org.eclipse.mylyn.tasks.tests/testdata/taskdataimporttest/context-history.xml
deleted file mode 100644
index dd16c2676..000000000
--- a/org.eclipse.mylyn.tasks.tests/testdata/taskdataimporttest/context-history.xml
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><InteractionHistory Id="context-history" Version="1"><InteractionEvent Delta="deactivated" EndDate="2006-02-16 16:49:47.477 PST" Interest="1.0" Kind="command" Navigation="" OriginId="org.eclipse.mylyn.core" StartDate="2006-02-16 16:49:47.477 PST" StructureHandle="attention" StructureKind="context"/><InteractionEvent Delta="activated" EndDate="2006-02-16 16:49:52.917 PST" Interest="1.0" Kind="command" Navigation="" OriginId="org.eclipse.mylyn.core" StartDate="2006-02-16 16:49:52.917 PST" StructureHandle="attention" StructureKind="context"/><InteractionEvent Delta="activated" EndDate="2006-02-16 16:50:13.483 PST" Interest="1.0" Kind="command" Navigation="" OriginId="org.eclipse.mylyn.core" StartDate="2006-02-16 16:50:13.483 PST" StructureHandle="local-69" StructureKind="context"/><InteractionEvent Delta="deactivated" EndDate="2006-02-16 16:51:07.858 PST" Interest="1.0" Kind="command" Navigation="" OriginId="org.eclipse.mylyn.core" StartDate="2006-02-16 16:51:07.858 PST" StructureHandle="local-69" StructureKind="context"/><InteractionEvent Delta="activated" EndDate="2006-02-16 16:51:11.575 PST" Interest="1.0" Kind="command" Navigation="" OriginId="org.eclipse.mylyn.core" StartDate="2006-02-16 16:51:11.575 PST" StructureHandle="local-69" StructureKind="context"/><InteractionEvent Delta="deactivated" EndDate="2006-02-16 16:51:17.455 PST" Interest="1.0" Kind="command" Navigation="" OriginId="org.eclipse.mylyn.core" StartDate="2006-02-16 16:51:17.455 PST" StructureHandle="local-69" StructureKind="context"/><InteractionEvent Delta="deactivated" EndDate="2006-02-16 16:53:18.688 PST" Interest="1.0" Kind="command" Navigation="" OriginId="org.eclipse.mylyn.core" StartDate="2006-02-16 16:53:18.688 PST" StructureHandle="attention" StructureKind="context"/><InteractionEvent Delta="activated" EndDate="2006-02-16 16:55:28.476 PST" Interest="1.0" Kind="command" Navigation="" OriginId="org.eclipse.mylyn.core" StartDate="2006-02-16 16:55:28.476 PST" StructureHandle="local-70" StructureKind="context"/><InteractionEvent Delta="deactivated" EndDate="2006-02-16 16:55:31.451 PST" Interest="1.0" Kind="command" Navigation="" OriginId="org.eclipse.mylyn.core" StartDate="2006-02-16 16:55:31.451 PST" StructureHandle="local-70" StructureKind="context"/><InteractionEvent Delta="activated" EndDate="2006-02-16 17:02:58.887 PST" Interest="1.0" Kind="command" Navigation="" OriginId="org.eclipse.mylyn.core" StartDate="2006-02-16 17:02:58.887 PST" StructureHandle="local-70" StructureKind="context"/><InteractionEvent Delta="deactivated" EndDate="2006-02-16 17:03:28.429 PST" Interest="1.0" Kind="command" Navigation="" OriginId="org.eclipse.mylyn.core" StartDate="2006-02-16 17:03:28.429 PST" StructureHandle="local-70" StructureKind="context"/></InteractionHistory> \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.tests/testdata/taskdataimporttest/local-69.xml b/org.eclipse.mylyn.tasks.tests/testdata/taskdataimporttest/local-69.xml
deleted file mode 100644
index eb65a146b..000000000
--- a/org.eclipse.mylyn.tasks.tests/testdata/taskdataimporttest/local-69.xml
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><InteractionHistory Id="local-69" Version="1"><InteractionEvent Delta="null" EndDate="2006-02-16 16:51:17.4 PST" Interest="-0.136" Kind="manipulation" Navigation="null" OriginId="org.eclipse.mylyn.core.model.interest.decay" StartDate="2006-02-16 16:51:17.4 PST" StructureHandle="=TestProject/&amp;lt;" StructureKind="java"/><InteractionEvent Delta="null" EndDate="2006-02-16 16:51:07.437 PST" Interest="-0.34000003" Kind="manipulation" Navigation="null" OriginId="org.eclipse.mylyn.core.model.interest.decay" StartDate="2006-02-16 16:51:07.437 PST" StructureHandle="=TestProject/&amp;lt;" StructureKind="java"/><InteractionEvent Delta="null" EndDate="2006-02-16 16:51:13.658 PST" Interest="19.294" Kind="propagation" Navigation="org.eclipse.mylyn.core.model.edges.containment" OriginId="org.eclipse.mylyn.core.model.interest.propagation" StartDate="2006-02-16 16:50:16.718 PST" StructureHandle="=TestProject/&amp;lt;" StructureKind="java"/><InteractionEvent Delta="null" EndDate="2006-02-16 16:51:17.4 PST" Interest="-0.136" Kind="manipulation" Navigation="null" OriginId="org.eclipse.mylyn.core.model.interest.decay" StartDate="2006-02-16 16:51:17.4 PST" StructureHandle="=TestProject" StructureKind="java"/><InteractionEvent Delta="null" EndDate="2006-02-16 16:51:07.437 PST" Interest="-0.34000003" Kind="manipulation" Navigation="null" OriginId="org.eclipse.mylyn.core.model.interest.decay" StartDate="2006-02-16 16:51:07.437 PST" StructureHandle="=TestProject" StructureKind="java"/><InteractionEvent Delta="null" EndDate="2006-02-16 16:51:13.658 PST" Interest="19.294" Kind="propagation" Navigation="org.eclipse.mylyn.core.model.edges.containment" OriginId="org.eclipse.mylyn.core.model.interest.propagation" StartDate="2006-02-16 16:50:16.718 PST" StructureHandle="=TestProject" StructureKind="java"/><InteractionEvent Delta="null" EndDate="2006-02-16 16:51:17.4 PST" Interest="-0.136" Kind="manipulation" Navigation="null" OriginId="org.eclipse.mylyn.core.model.interest.decay" StartDate="2006-02-16 16:51:17.4 PST" StructureHandle="=TestProject/&amp;lt;{TestClass2.java[TestClass2" StructureKind="java"/><InteractionEvent Delta="null" EndDate="2006-02-16 16:51:07.437 PST" Interest="-0.22100002" Kind="manipulation" Navigation="null" OriginId="org.eclipse.mylyn.core.model.interest.decay" StartDate="2006-02-16 16:51:07.437 PST" StructureHandle="=TestProject/&amp;lt;{TestClass2.java[TestClass2" StructureKind="java"/><InteractionEvent Delta="null" EndDate="2006-02-16 16:50:29.701 PST" Interest="1.0" Kind="selection" Navigation="null" OriginId="org.eclipse.jdt.ui.CompilationUnitEditor" StartDate="2006-02-16 16:50:29.701 PST" StructureHandle="=TestProject/&amp;lt;{TestClass2.java[TestClass2" StructureKind="java"/><InteractionEvent Delta="null" EndDate="2006-02-16 16:50:37.435 PST" Interest="2.0" Kind="edit" Navigation="null" OriginId="org.eclipse.jdt.ui.CompilationUnitEditor" StartDate="2006-02-16 16:50:31.184 PST" StructureHandle="=TestProject/&amp;lt;{TestClass2.java[TestClass2" StructureKind="java"/><InteractionEvent Delta="null" EndDate="2006-02-16 16:51:13.658 PST" Interest="7.3639994" Kind="propagation" Navigation="org.eclipse.mylyn.core.model.edges.containment" OriginId="org.eclipse.mylyn.core.model.interest.propagation" StartDate="2006-02-16 16:50:40.260 PST" StructureHandle="=TestProject/&amp;lt;{TestClass2.java[TestClass2" StructureKind="java"/><InteractionEvent Delta="null" EndDate="2006-02-16 16:51:17.4 PST" Interest="-0.102000006" Kind="manipulation" Navigation="null" OriginId="org.eclipse.mylyn.core.model.interest.decay" StartDate="2006-02-16 16:51:17.4 PST" StructureHandle="=TestProject/" StructureKind="java"/><InteractionEvent Delta="null" EndDate="2006-02-16 16:51:07.437 PST" Interest="-0.34000003" Kind="manipulation" Navigation="null" OriginId="org.eclipse.mylyn.core.model.interest.decay" StartDate="2006-02-16 16:51:07.437 PST" StructureHandle="=TestProject/" StructureKind="java"/><InteractionEvent Delta="null" EndDate="2006-02-16 16:51:13.658 PST" Interest="19.294" Kind="propagation" Navigation="org.eclipse.mylyn.core.model.edges.containment" OriginId="org.eclipse.mylyn.core.model.interest.propagation" StartDate="2006-02-16 16:50:16.718 PST" StructureHandle="=TestProject/" StructureKind="java"/><InteractionEvent Delta="null" EndDate="2006-02-16 16:51:17.4 PST" Interest="-0.102000006" Kind="manipulation" Navigation="null" OriginId="org.eclipse.mylyn.core.model.interest.decay" StartDate="2006-02-16 16:51:17.4 PST" StructureHandle="=TestProject/&amp;lt;{TestClass2.java" StructureKind="java"/><InteractionEvent Delta="null" EndDate="2006-02-16 16:51:07.437 PST" Interest="-0.323" Kind="manipulation" Navigation="null" OriginId="org.eclipse.mylyn.core.model.interest.decay" StartDate="2006-02-16 16:51:07.437 PST" StructureHandle="=TestProject/&amp;lt;{TestClass2.java" StructureKind="java"/><InteractionEvent Delta="null" EndDate="2006-02-16 16:51:00.525 PST" Interest="5.0" Kind="selection" Navigation="null" OriginId="org.eclipse.jdt.ui.PackageExplorer" StartDate="2006-02-16 16:50:23.49 PST" StructureHandle="=TestProject/&amp;lt;{TestClass2.java" StructureKind="java"/><InteractionEvent Delta="null" EndDate="2006-02-16 16:51:13.658 PST" Interest="9.73" Kind="propagation" Navigation="org.eclipse.mylyn.core.model.edges.containment" OriginId="org.eclipse.mylyn.core.model.interest.propagation" StartDate="2006-02-16 16:50:29.701 PST" StructureHandle="=TestProject/&amp;lt;{TestClass2.java" StructureKind="java"/><InteractionEvent Delta="null" EndDate="2006-02-16 16:51:17.4 PST" Interest="-0.08500001" Kind="manipulation" Navigation="null" OriginId="org.eclipse.mylyn.core.model.interest.decay" StartDate="2006-02-16 16:51:17.4 PST" StructureHandle="=TestProject/&amp;lt;{TestClass1.java" StructureKind="java"/><InteractionEvent Delta="null" EndDate="2006-02-16 16:51:07.437 PST" Interest="-0.34000003" Kind="manipulation" Navigation="null" OriginId="org.eclipse.mylyn.core.model.interest.decay" StartDate="2006-02-16 16:51:07.437 PST" StructureHandle="=TestProject/&amp;lt;{TestClass1.java" StructureKind="java"/><InteractionEvent Delta="null" EndDate="2006-02-16 16:51:04.1 PST" Interest="4.0" Kind="selection" Navigation="null" OriginId="org.eclipse.jdt.ui.CompilationUnitEditor" StartDate="2006-02-16 16:50:16.718 PST" StructureHandle="=TestProject/&amp;lt;{TestClass1.java" StructureKind="java"/><InteractionEvent Delta="null" EndDate="2006-02-16 16:50:27.457 PST" Interest="1.0" Kind="edit" Navigation="null" OriginId="org.eclipse.jdt.ui.CompilationUnitEditor" StartDate="2006-02-16 16:50:27.457 PST" StructureHandle="=TestProject/&amp;lt;{TestClass1.java" StructureKind="java"/><InteractionEvent Delta="null" EndDate="2006-02-16 16:51:17.4 PST" Interest="-0.08500001" Kind="manipulation" Navigation="null" OriginId="org.eclipse.mylyn.core.model.interest.decay" StartDate="2006-02-16 16:51:17.4 PST" StructureHandle="" StructureKind="java"/><InteractionEvent Delta="null" EndDate="2006-02-16 16:51:07.437 PST" Interest="-0.34000003" Kind="manipulation" Navigation="null" OriginId="org.eclipse.mylyn.core.model.interest.decay" StartDate="2006-02-16 16:51:07.437 PST" StructureHandle="" StructureKind="java"/><InteractionEvent Delta="null" EndDate="2006-02-16 16:51:13.658 PST" Interest="19.294" Kind="propagation" Navigation="org.eclipse.mylyn.core.model.edges.containment" OriginId="org.eclipse.mylyn.core.model.interest.propagation" StartDate="2006-02-16 16:50:16.718 PST" StructureHandle="" StructureKind="java"/><InteractionEvent Delta="null" EndDate="2006-02-16 16:51:17.4 PST" Interest="-0.051000003" Kind="manipulation" Navigation="null" OriginId="org.eclipse.mylyn.core.model.interest.decay" StartDate="2006-02-16 16:51:17.4 PST" StructureHandle="=TestProject/&amp;lt;{TestClass2.java[TestClass2~sayHello" StructureKind="java"/><InteractionEvent Delta="null" EndDate="2006-02-16 16:51:07.437 PST" Interest="-0.17000002" Kind="manipulation" Navigation="null" OriginId="org.eclipse.mylyn.core.model.interest.decay" StartDate="2006-02-16 16:51:07.437 PST" StructureHandle="=TestProject/&amp;lt;{TestClass2.java[TestClass2~sayHello" StructureKind="java"/><InteractionEvent Delta="null" EndDate="2006-02-16 16:51:13.658 PST" Interest="4.0" Kind="selection" Navigation="null" OriginId="org.eclipse.jdt.ui.CompilationUnitEditor" StartDate="2006-02-16 16:50:40.260 PST" StructureHandle="=TestProject/&amp;lt;{TestClass2.java[TestClass2~sayHello" StructureKind="java"/><InteractionEvent Delta="null" EndDate="2006-02-16 16:50:58.452 PST" Interest="5.0" Kind="edit" Navigation="null" OriginId="org.eclipse.jdt.ui.CompilationUnitEditor" StartDate="2006-02-16 16:50:41.271 PST" StructureHandle="=TestProject/&amp;lt;{TestClass2.java[TestClass2~sayHello" StructureKind="java"/></InteractionHistory> \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.tests/testdata/taskdataimporttest/local-70.xml b/org.eclipse.mylyn.tasks.tests/testdata/taskdataimporttest/local-70.xml
deleted file mode 100644
index 00be69490..000000000
--- a/org.eclipse.mylyn.tasks.tests/testdata/taskdataimporttest/local-70.xml
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><InteractionHistory Id="local-70" Version="1"><InteractionEvent Delta="null" EndDate="2006-02-16 17:03:27.538 PST" Interest="-0.068" Kind="manipulation" Navigation="null" OriginId="org.eclipse.mylyn.core.model.interest.decay" StartDate="2006-02-16 17:03:27.538 PST" StructureHandle="=TestProject" StructureKind="java"/><InteractionEvent Delta="null" EndDate="2006-02-16 17:03:23.491 PST" Interest="4.649" Kind="propagation" Navigation="org.eclipse.mylyn.core.model.edges.containment" OriginId="org.eclipse.mylyn.core.model.interest.propagation" StartDate="2006-02-16 17:03:04.507 PST" StructureHandle="=TestProject" StructureKind="java"/><InteractionEvent Delta="null" EndDate="2006-02-16 17:03:27.538 PST" Interest="-0.068" Kind="manipulation" Navigation="null" OriginId="org.eclipse.mylyn.core.model.interest.decay" StartDate="2006-02-16 17:03:27.538 PST" StructureHandle="=TestProject/&amp;lt;" StructureKind="java"/><InteractionEvent Delta="null" EndDate="2006-02-16 17:03:23.481 PST" Interest="4.6489997" Kind="propagation" Navigation="org.eclipse.mylyn.core.model.edges.containment" OriginId="org.eclipse.mylyn.core.model.interest.propagation" StartDate="2006-02-16 17:03:04.497 PST" StructureHandle="=TestProject/&amp;lt;" StructureKind="java"/><InteractionEvent Delta="null" EndDate="2006-02-16 17:03:27.538 PST" Interest="-0.068" Kind="manipulation" Navigation="null" OriginId="org.eclipse.mylyn.core.model.interest.decay" StartDate="2006-02-16 17:03:27.538 PST" StructureHandle="=TestProject/" StructureKind="java"/><InteractionEvent Delta="null" EndDate="2006-02-16 17:03:23.491 PST" Interest="4.649" Kind="propagation" Navigation="org.eclipse.mylyn.core.model.edges.containment" OriginId="org.eclipse.mylyn.core.model.interest.propagation" StartDate="2006-02-16 17:03:04.497 PST" StructureHandle="=TestProject/" StructureKind="java"/><InteractionEvent Delta="null" EndDate="2006-02-16 17:03:27.538 PST" Interest="-0.068" Kind="manipulation" Navigation="null" OriginId="org.eclipse.mylyn.core.model.interest.decay" StartDate="2006-02-16 17:03:27.538 PST" StructureHandle="=TestProject/&amp;lt;{TestClass2.java" StructureKind="java"/><InteractionEvent Delta="null" EndDate="2006-02-16 17:03:21.898 PST" Interest="2.0" Kind="selection" Navigation="null" OriginId="org.eclipse.jdt.ui.CompilationUnitEditor" StartDate="2006-02-16 17:03:04.497 PST" StructureHandle="=TestProject/&amp;lt;{TestClass2.java" StructureKind="java"/><InteractionEvent Delta="null" EndDate="2006-02-16 17:03:15.807 PST" Interest="1.0" Kind="edit" Navigation="null" OriginId="org.eclipse.jdt.ui.CompilationUnitEditor" StartDate="2006-02-16 17:03:15.807 PST" StructureHandle="=TestProject/&amp;lt;{TestClass2.java" StructureKind="java"/><InteractionEvent Delta="null" EndDate="2006-02-16 17:03:27.538 PST" Interest="-0.068" Kind="manipulation" Navigation="null" OriginId="org.eclipse.mylyn.core.model.interest.decay" StartDate="2006-02-16 17:03:27.538 PST" StructureHandle="" StructureKind="java"/><InteractionEvent Delta="null" EndDate="2006-02-16 17:03:23.491 PST" Interest="4.649" Kind="propagation" Navigation="org.eclipse.mylyn.core.model.edges.containment" OriginId="org.eclipse.mylyn.core.model.interest.propagation" StartDate="2006-02-16 17:03:04.507 PST" StructureHandle="" StructureKind="java"/><InteractionEvent Delta="null" EndDate="2006-02-16 17:03:27.538 PST" Interest="-0.034" Kind="manipulation" Navigation="null" OriginId="org.eclipse.mylyn.core.model.interest.decay" StartDate="2006-02-16 17:03:27.538 PST" StructureHandle="=TestProject/&amp;lt;{TestClass1.java" StructureKind="java"/><InteractionEvent Delta="null" EndDate="2006-02-16 17:03:23.481 PST" Interest="2.0" Kind="selection" Navigation="null" OriginId="org.eclipse.jdt.ui.CompilationUnitEditor" StartDate="2006-02-16 17:03:20.696 PST" StructureHandle="=TestProject/&amp;lt;{TestClass1.java" StructureKind="java"/></InteractionHistory> \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.tests/testdata/taskdataimporttest/mylardata-2006-02-16.zip b/org.eclipse.mylyn.tasks.tests/testdata/taskdataimporttest/mylardata-2006-02-16.zip
deleted file mode 100644
index 326674958..000000000
--- a/org.eclipse.mylyn.tasks.tests/testdata/taskdataimporttest/mylardata-2006-02-16.zip
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.tests/testdata/taskdataimporttest/mylardata-2007-01-19.zip b/org.eclipse.mylyn.tasks.tests/testdata/taskdataimporttest/mylardata-2007-01-19.zip
deleted file mode 100644
index 83a6ff796..000000000
--- a/org.eclipse.mylyn.tasks.tests/testdata/taskdataimporttest/mylardata-2007-01-19.zip
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.tests/testdata/taskdataimporttest/repositories.xml b/org.eclipse.mylyn.tasks.tests/testdata/taskdataimporttest/repositories.xml
deleted file mode 100644
index bb0067736..000000000
--- a/org.eclipse.mylyn.tasks.tests/testdata/taskdataimporttest/repositories.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<TaskRepositories OutputVersion="1">
-<TaskRepository encoding="UTF-8" kind="bugzilla" timezone="Canada/Pacific" url="https://bugzilla.mozilla.org/" lastsynctimestamp="2006-06-26 01:14:10 PDT" version="2.22"/>
-<TaskRepository encoding="UTF-8" kind="bugzilla" timezone="Canada/Eastern" url="https://bugs.eclipse.org/bugs" lastsynctimestamp="2006-06-26 13:30:14" version="2.20" /></TaskRepositories> \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.tests/testdata/taskdataimporttest/tasklist.xml b/org.eclipse.mylyn.tasks.tests/testdata/taskdataimporttest/tasklist.xml
deleted file mode 100644
index c5848ef42..000000000
--- a/org.eclipse.mylyn.tasks.tests/testdata/taskdataimporttest/tasklist.xml
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><TaskList Version="1.0.1"><BugzillaTaskRegistryCategory/><TaskCategory Name="Catagory 1"><Task Active="false" Bugzilla="false" Complete="false" CreationDate="2006-02-16 16:49:20.249 PST" Elapsed="0" EndDate="" Estimated="0" Handle="local-73" IssueURL="http://" Kind="" Label="Category 1 - Task 1" Notes="" Priority="P3" Reminded="false" ReminderDate=""/></TaskCategory><TaskCategory Name="Category 2"><Task Active="false" Bugzilla="false" Complete="false" CreationDate="2006-02-16 16:49:09.540 PST" Elapsed="0" EndDate="" Estimated="0" Handle="local-72" IssueURL="http://" Kind="" Label="Category 2 - Task 1" Notes="" Priority="P3" Reminded="false" ReminderDate=""/></TaskCategory><Task Active="false" Bugzilla="false" Complete="false" CreationDate="2006-02-16 16:48:09.355 PST" Elapsed="55777" EndDate="" Estimated="0" Handle="local-69" IssueURL="http://" Kind="" Label="Root Task 1" Notes="" Priority="P3" Reminded="false" ReminderDate=""/><Task Active="false" Bugzilla="false" Complete="false" CreationDate="2006-02-16 16:48:22.478 PST" Elapsed="31626" EndDate="" Estimated="0" Handle="local-70" IssueURL="http://" Kind="" Label="Root Task 2" Notes="" Priority="P3" Reminded="false" ReminderDate=""/></TaskList> \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.tests/testdata/tasklistdatamigrationtest/empty.txt b/org.eclipse.mylyn.tasks.tests/testdata/tasklistdatamigrationtest/empty.txt
deleted file mode 100644
index e69de29bb..000000000
--- a/org.eclipse.mylyn.tasks.tests/testdata/tasklistdatamigrationtest/empty.txt
+++ /dev/null
diff --git a/org.eclipse.mylyn.tasks.ui/.classpath b/org.eclipse.mylyn.tasks.ui/.classpath
deleted file mode 100644
index bf6d461ed..000000000
--- a/org.eclipse.mylyn.tasks.ui/.classpath
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
- <accessrules>
- <accessrule kind="accessible" pattern="org/eclipse/search/internal/ui/**"/>
- <accessrule kind="accessible" pattern="org/eclipse/ui/search/internal/*"/>
- <accessrule kind="accessible" pattern="org/eclipse/ui/internal/**"/>
- </accessrules>
- </classpathentry>
- <classpathentry kind="src" path="src"/>
- <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.tasks.ui/.cvsignore b/org.eclipse.mylyn.tasks.ui/.cvsignore
deleted file mode 100644
index 4a98758e6..000000000
--- a/org.eclipse.mylyn.tasks.ui/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-bin
-.fbwarnings
diff --git a/org.eclipse.mylyn.tasks.ui/.options b/org.eclipse.mylyn.tasks.ui/.options
deleted file mode 100644
index 54de56bb0..000000000
--- a/org.eclipse.mylyn.tasks.ui/.options
+++ /dev/null
@@ -1 +0,0 @@
-org.eclipse.mylyn.tasks.ui/debug/httpclient=true \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.ui/.project b/org.eclipse.mylyn.tasks.ui/.project
deleted file mode 100644
index 4e9857c70..000000000
--- a/org.eclipse.mylyn.tasks.ui/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.mylyn.tasks.ui</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.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/org.eclipse.mylyn.tasks.ui/.settings/.api_filters b/org.eclipse.mylyn.tasks.ui/.settings/.api_filters
deleted file mode 100644
index b27b9a502..000000000
--- a/org.eclipse.mylyn.tasks.ui/.settings/.api_filters
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<component id="org.eclipse.mylyn.tasks.ui" version="2">
- <resource path="src/org/eclipse/mylyn/internal/tasks/ui/dialogs/AbstractWorkingSetDialogCOPY.java" type="org.eclipse.mylyn.internal.tasks.ui.dialogs.AbstractWorkingSetDialogCOPY">
- <filter id="574619656">
- <message_arguments>
- <message_argument value="IWorkingSetSelectionDialog"/>
- <message_argument value="AbstractWorkingSetDialogCOPY"/>
- </message_arguments>
- </filter>
- </resource>
-</component>
diff --git a/org.eclipse.mylyn.tasks.ui/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.mylyn.tasks.ui/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 8b08f1b8b..000000000
--- a/org.eclipse.mylyn.tasks.ui/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,340 +0,0 @@
-#Thu Apr 24 21:03:23 PDT 2008
-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=ignore
-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,NORMAL
-org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,API
-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=false
-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.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.tasks.ui/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.mylyn.tasks.ui/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 5e70d0848..000000000
--- a/org.eclipse.mylyn.tasks.ui/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,63 +0,0 @@
-#Sat Mar 01 03:38:47 PST 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">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*******************************************************************************\n * Copyright (c) 2004, 2007 Mylyn project committers and others.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *******************************************************************************/\n\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ignore\n${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ignore</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created JavaScript files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for vars" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Jsdoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created function stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated function stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_methods=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=true
-sp_cleanup.correct_indentation=true
-sp_cleanup.format_source_code=true
-sp_cleanup.format_source_code_changes_only=false
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=true
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=true
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=true
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=true
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=true
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/org.eclipse.mylyn.tasks.ui/.settings/org.eclipse.ltk.core.refactoring.prefs b/org.eclipse.mylyn.tasks.ui/.settings/org.eclipse.ltk.core.refactoring.prefs
deleted file mode 100644
index 7ab03bdac..000000000
--- a/org.eclipse.mylyn.tasks.ui/.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.tasks.ui/.settings/org.eclipse.mylyn.tasklist.prefs b/org.eclipse.mylyn.tasks.ui/.settings/org.eclipse.mylyn.tasklist.prefs
deleted file mode 100644
index 0a2cc0b30..000000000
--- a/org.eclipse.mylyn.tasks.ui/.settings/org.eclipse.mylyn.tasklist.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Mon Jun 18 17:14:59 PDT 2007
-eclipse.preferences.version=1
-project.repository.kind=bugzilla
-project.repository.url=https\://bugs.eclipse.org/bugs
diff --git a/org.eclipse.mylyn.tasks.ui/.settings/org.eclipse.mylyn.tasks.ui.prefs b/org.eclipse.mylyn.tasks.ui/.settings/org.eclipse.mylyn.tasks.ui.prefs
deleted file mode 100644
index d8c6d26af..000000000
--- a/org.eclipse.mylyn.tasks.ui/.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.tasks.ui/.settings/org.eclipse.pde.prefs b/org.eclipse.mylyn.tasks.ui/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index e8f2d5620..000000000
--- a/org.eclipse.mylyn.tasks.ui/.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.tasks.ui/META-INF/MANIFEST.MF b/org.eclipse.mylyn.tasks.ui/META-INF/MANIFEST.MF
deleted file mode 100644
index 08ae0faed..000000000
--- a/org.eclipse.mylyn.tasks.ui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,48 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Mylyn Tasks UI
-Bundle-SymbolicName: org.eclipse.mylyn.tasks.ui;singleton:=true
-Bundle-Version: 3.0.0.qualifier
-Bundle-Activator: org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.compare,
- org.eclipse.core.runtime,
- org.eclipse.core.expressions,
- org.eclipse.core.net,
- org.eclipse.core.resources,
- org.eclipse.jface.text,
- org.eclipse.search,
- org.eclipse.ui.browser,
- org.eclipse.ui.editors,
- org.eclipse.ui.forms,
- org.eclipse.ui.ide,
- org.eclipse.ui.views,
- org.eclipse.ui.workbench.texteditor,
- org.eclipse.mylyn.context.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.mylyn.commons.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.mylyn.monitor.ui;bundle-version="[3.0.0,4.0.0)",
- 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.ui;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.mylyn.monitor.core;bundle-version="[3.0.0,4.0.0)",
- org.apache.commons.logging;bundle-version="1.0.4"
-Bundle-ActivationPolicy: lazy
-Bundle-Vendor: Eclipse.org
-Export-Package: org.eclipse.mylyn.internal.tasks.ui;x-internal:=true,
- org.eclipse.mylyn.internal.tasks.ui.actions;x-internal:=true,
- org.eclipse.mylyn.internal.tasks.ui.commands;x-internal:=true,
- org.eclipse.mylyn.internal.tasks.ui.deprecated;x-internal:=true,
- org.eclipse.mylyn.internal.tasks.ui.dialogs;x-internal:=true,
- org.eclipse.mylyn.internal.tasks.ui.editors;x-internal:=true,
- org.eclipse.mylyn.internal.tasks.ui.notifications;x-internal:=true,
- org.eclipse.mylyn.internal.tasks.ui.preferences;x-internal:=true,
- org.eclipse.mylyn.internal.tasks.ui.properties;x-internal:=true,
- org.eclipse.mylyn.internal.tasks.ui.search;x-internal:=true,
- org.eclipse.mylyn.internal.tasks.ui.util;x-internal:=true,
- org.eclipse.mylyn.internal.tasks.ui.views;x-internal:=true,
- org.eclipse.mylyn.internal.tasks.ui.wizards;x-internal:=true,
- org.eclipse.mylyn.internal.tasks.ui.workingsets;x-internal:=true,
- org.eclipse.mylyn.tasks.ui,
- org.eclipse.mylyn.tasks.ui.editors,
- org.eclipse.mylyn.tasks.ui.wizards
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/org.eclipse.mylyn.tasks.ui/about.html b/org.eclipse.mylyn.tasks.ui/about.html
deleted file mode 100644
index 0dd939c09..000000000
--- a/org.eclipse.mylyn.tasks.ui/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 7, 2007</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.tasks.ui/build.properties b/org.eclipse.mylyn.tasks.ui/build.properties
deleted file mode 100644
index cea74d346..000000000
--- a/org.eclipse.mylyn.tasks.ui/build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2006 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 = about.html,\
- .,\
- plugin.xml,\
- icons/,\
- doc/,\
- META-INF/
-src.includes = about.html,\
- schema/
-jre.compilation.profile = J2SE-1.5
-source.. = src/
diff --git a/org.eclipse.mylyn.tasks.ui/doc/book.css b/org.eclipse.mylyn.tasks.ui/doc/book.css
deleted file mode 100644
index faa4199fe..000000000
--- a/org.eclipse.mylyn.tasks.ui/doc/book.css
+++ /dev/null
@@ -1 +0,0 @@
-@import "../../PRODUCT_PLUGIN/book.css";
diff --git a/org.eclipse.mylyn.tasks.ui/doc/bugzilla.html b/org.eclipse.mylyn.tasks.ui/doc/bugzilla.html
deleted file mode 100644
index a4b06ddc8..000000000
--- a/org.eclipse.mylyn.tasks.ui/doc/bugzilla.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
- <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
- <link rel="stylesheet" href="book.css" charset="ISO-8859-1" type="text/css">
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <meta http-equiv="Content-Style-Type" content="text/css">
- <title>
- Preparing Eclipse
- </title>
- </head>
- <body>
- <h2>
- Bugzilla Client Integration</h2>
- Bug reports can be opened with either the Bug Editor or the Internal
- Web Browser.&nbsp; This can be set as a Task List preferences.&nbsp;
- When the Bug Editor is open you can click the hyperlink to show the
- report in the browser (e.g. to use a feature not yet available in
- the editor, such as voting).&nbsp; <p>
- <img border="0" src="../../org.eclipse.mylar.doc/doc/images/0.3/bugzilla-internal-browser.gif" width="344" height="157"></p>All bug reports are archived
- in a special category that is invisible by default.&nbsp; But if a
- you do a search, and the matches don't show in another category
- (e.g. because no query matches that report), the archive category,
- highlighted in blue below, gives access to that report.<p>
- <img border="0" src="../../org.eclipse.mylar.doc/doc/images/0.3/tasks-archive.gif" width="331" height="187"><p>If a bug report has information on it that has not been viewed, such
- as new comments, the blue &quot;incoming&quot; overlay is displayed.&nbsp; If
- a bug has changes on it that have been saved but have not been
- committed to Bugzilla, the gray &quot;outgoing&quot; overlay is displayed.&nbsp;
- A red overlay appears if there is a conflict.</p>
- <p>
- <img border="0" src="../../org.eclipse.mylar.doc/doc/images/0.3/bugzilla-synch.gif" width="323" height="186"></p>To create a custom Bugzilla query paste the query URL into the New
- Bugzilla Query dialog. This enables support of queries that can not
- be configured via the dialog, and as such some query hits may not
- open or format properly.<p>
- <img border="0" src="../../org.eclipse.mylar.doc/doc/images/0.3/bugzilla-query-custom.gif" width="483" height="106"></p>
-
- You can explicitly state
- whether you want to work with cached copies of Bugzilla reports and
- avoid refresh with the server.&nbsp; In offline mode the cached bug
- copy is always used.&nbsp; In online mode the Bugzilla server is
- always checked for the latest report.<p>
- <img border="0" src="../../org.eclipse.mylar.doc/doc/images/0.3/tasks-offline.gif" width="326" height="207">
-
- </body>
-</html>
-
diff --git a/org.eclipse.mylyn.tasks.ui/doc/images/tasklist-overview.gif b/org.eclipse.mylyn.tasks.ui/doc/images/tasklist-overview.gif
deleted file mode 100644
index 6cd496038..000000000
--- a/org.eclipse.mylyn.tasks.ui/doc/images/tasklist-overview.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/doc/planning.html b/org.eclipse.mylyn.tasks.ui/doc/planning.html
deleted file mode 100644
index 134f9ec66..000000000
--- a/org.eclipse.mylyn.tasks.ui/doc/planning.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
- <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
- <link rel="stylesheet" href="book.css" charset="ISO-8859-1" type="text/css">
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <meta http-equiv="Content-Style-Type" content="text/css">
- <title>
- Preparing Eclipse
- </title>
- </head>
- <body>
- <h2>
- Task Planning</h2>Set a reminder for a task when creating it, or by selecting the
- &quot;Summary&quot; tab of the Task Editor.&nbsp; When you start using Eclipse
- on the given day the reminders will come up.<p>
- <img border="0" src="../../org.eclipse.mylar.doc/doc/images/0.3/tasks-reminders.gif" width="452" height="154">
-
- </body>
-</html>
-
diff --git a/org.eclipse.mylyn.tasks.ui/doc/tasklist.html b/org.eclipse.mylyn.tasks.ui/doc/tasklist.html
deleted file mode 100644
index 97eabee3a..000000000
--- a/org.eclipse.mylyn.tasks.ui/doc/tasklist.html
+++ /dev/null
@@ -1,141 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
- <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
- <link rel="stylesheet" href="book.css" charset="ISO-8859-1" type="text/css">
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <meta http-equiv="Content-Style-Type" content="text/css">
- <title>
- Preparing Eclipse
- </title>
- </head>
- <body>
- <h1>
- Mylar Task List</h1>
- <br>&nbsp;
- <table border="0" cellpadding="0" style="border-collapse: collapse"id="table1">
- <tr>
- <td valign="top">
- The Mylar Task List provides methods for creating and maintaining tasks
- and bug reports.&nbsp; In the order that they appear on the toolbar, the
- Task List provides the following features work managing task and bug
- reports:<ul>
- <li>Create task - add new task to Task List</li>
- <li>Create category - organize tasks and bug reports into groups</li>
- <li>Add or create new bugzilla report - add a bug report into Task List</li>
- <li>Add bugzilla query - creates a category that contains all bugzilla
- <br>
- reports that match the query</li>
- <li>Refresh - refresh all bug reports and bugzilla queries</li>
- <li>Filter tasks - set filters for Task List</li>
- </ul>
- <p>&nbsp;&nbsp;</td>
- <td valign="top">
- <img border="0" src="images/tasklist-overview.gif" width="378" height="287"></td>
- </tr>
- </table>
- <h3>Tasks</h3>
- <p>A task can be created with a description and a priority level. The
- priority level can be varied from P1 through P5 which is used for sorting
- and filtering the Task List. A task can be set to complete by right clicking
- and selecting &quot;Mark Complete&quot;. The completed tasks appear in the
- Task List
- with light gray font to distinguish it from incomplete tasks. More detailed
- information such as notes and related links can be added to the task by
- double clicking on the task, which will open an editor. A task can be
- activated by selecting the glasses icon in the first column, which will
- initiate the monitoring feature of mylar to store the task context. The
- active task and its category will appear in bold on the task list. The
- context stored for each task can be cleared by right clicking the task and
- selecting &quot;Clear Task Context&quot;.</p>
- <h3>Categories</h3>
- <p>A category can be created to organize the Task List. If a category is
- selected during task creation, the task will be added to that category. The
- drag and drop feature of the Task List allows tasks and bug reports to be
- moved from one category to another.</p>
- <h3>Bugzilla Reports</h3>
- <p>Bugzilla reports can be added to the Task List via two methods. An
- existing bug report can be downloaded from a bugzilla server or a new bug
- report can be created on a bugzilla server. The Task List shows the same
- details for the bug report as it does with tasks, but the icons are
- different. When the bug report is double clicked, the bug report will be
- opened by a bugzilla editor or an internal browser, which can be toggled in
- the preferences. A bugzilla report can be activated in the same manner as
- tasks.</p>
- <h3>Bugzilla Query</h3>
- <p>A bugzilla query is a category that is made up of all bug reports that
- match a specified query. When it is created, the user is presented with a
- dialog that presents query options similar to the search page on the
- bugzilla server. All hits form the query are added to the query and can be
- used like standard bug reports.</p>
- <h3>Filters</h3>
- <p>Filters are available to manage the Task List. There are two filters, one
- for filtering completed tasks, and one for filtering based on priorities.</p>
-
-<table cellpadding="10" cellspacing="0" width="600" id="table3">
- <tr>
- <td width="30%" valign="top" align="left">
- <p align="right"><b>Focus on a single task category</b></p>
- </td>
- <td width="70%" valign="top">
- <span style="background-color: #FFFFFF">To see only the tasks for a single category
- select the &quot;Go Into Category&quot; action from the context menu.&nbsp; To
- go back to viewing all tasks and categories under the root use the
- &quot;Go Up To Root&quot; action in the Task List's toolbar pull down menu
- (visible above).</span><p>
- <img border="0" src="../../org.eclipse.mylar.doc/doc/images/0.3/tasks-go-navigation.gif" width="284" height="74"></p>
- </td>
- </tr>
-</table>
-
-<table cellpadding="10" cellspacing="0" width="600" id="table5">
- <tr>
- <td>
- <hr>
- </td>
- </tr>
-</table>
-
-<table cellpadding="10" cellspacing="0" width="600" id="table4">
- <tr>
- <td width="30%" valign="top" align="left">
- <p align="right"><b>Task history navigation</b></p>
- </td>
- <td width="70%" valign="top">
- Navigate between previously
- activate tasks using the Task List view's pull down menu (upper
- right-hand corner of the toolbar).<p>
- <img border="0" src="../../org.eclipse.mylar.doc/doc/images/0.3/tasks-history.gif"></p>
- </td>
- </tr>
- <tr>
- <td colspan="2">
- <hr>
- </td>
- </tr>
-</table>
-
-<table cellpadding="10" cellspacing="0" width="600" id="table6">
- <tr>
- <td width="30%" valign="top" align="left">
- <p align="right"><b>Quick filter</b></p>
- </td>
- <td width="70%" valign="top">
- To filter task by name or
- regexp type the filter text into the field and all matched tasks
- will display.&nbsp; Note that this will temporarily suppress all
- other filters.&nbsp; To clear the query press the &quot;x&quot; button to the
- right of the text field.<p>
- <img border="0" src="../../org.eclipse.mylar.doc/doc/images/0.3/tasks-quick-filter.gif" width="315" height="173"></p>
- </td>
- </tr>
- <tr>
- <td colspan="2">
- <hr>
- </td>
- </tr>
-</table>
-
- </body>
-</html>
-
diff --git a/org.eclipse.mylyn.tasks.ui/doc/toc.xml b/org.eclipse.mylyn.tasks.ui/doc/toc.xml
deleted file mode 100644
index 6e92f0f3b..000000000
--- a/org.eclipse.mylyn.tasks.ui/doc/toc.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?NLS TYPE="org.eclipse.help.toc"?>
-
-<toc link_to="../org.eclipse.mylyn.doc/doc/toc.xml#tasklist" label="Task List">
- <topic label="Task List" href="doc/tasklist.html">
- <!--
- <topic label="Task Planning" href="doc/planning.html"/>
- <topic label="Bugzilla Integration" href="doc/bugzilla.html"/>
- -->
- </topic>
-</toc>
-
-
diff --git a/org.eclipse.mylyn.tasks.ui/icons/archive/bug-search.gif b/org.eclipse.mylyn.tasks.ui/icons/archive/bug-search.gif
deleted file mode 100644
index b70606376..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/archive/bug-search.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/archive/filter-archive.gif b/org.eclipse.mylyn.tasks.ui/icons/archive/filter-archive.gif
deleted file mode 100644
index 8a1fd4734..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/archive/filter-archive.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/archive/find.gif b/org.eclipse.mylyn.tasks.ui/icons/archive/find.gif
deleted file mode 100644
index 2b645a88f..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/archive/find.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/archive/overlay-due.gif b/org.eclipse.mylyn.tasks.ui/icons/archive/overlay-due.gif
deleted file mode 100644
index 8ec39c96f..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/archive/overlay-due.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/archive/overlay-offline.gif b/org.eclipse.mylyn.tasks.ui/icons/archive/overlay-offline.gif
deleted file mode 100644
index 877069064..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/archive/overlay-offline.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/archive/overlay-repository-context.gif b/org.eclipse.mylyn.tasks.ui/icons/archive/overlay-repository-context.gif
deleted file mode 100644
index 9e878c2dc..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/archive/overlay-repository-context.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/archive/overlay-repository.gif b/org.eclipse.mylyn.tasks.ui/icons/archive/overlay-repository.gif
deleted file mode 100644
index 1db6015cc..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/archive/overlay-repository.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/archive/overlay-web.gif b/org.eclipse.mylyn.tasks.ui/icons/archive/overlay-web.gif
deleted file mode 100644
index b168c1c0e..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/archive/overlay-web.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/archive/task-activity.gif b/org.eclipse.mylyn.tasks.ui/icons/archive/task-activity.gif
deleted file mode 100644
index 44ed28d04..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/archive/task-activity.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/archive/task-bug.gif b/org.eclipse.mylyn.tasks.ui/icons/archive/task-bug.gif
deleted file mode 100644
index 99e9e98f2..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/archive/task-bug.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/archive/task-items.gif b/org.eclipse.mylyn.tasks.ui/icons/archive/task-items.gif
deleted file mode 100644
index 946c6e694..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/archive/task-items.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/archive/task-repository-completed.gif b/org.eclipse.mylyn.tasks.ui/icons/archive/task-repository-completed.gif
deleted file mode 100644
index c67f34739..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/archive/task-repository-completed.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/archive/task-repository-notes.gif b/org.eclipse.mylyn.tasks.ui/icons/archive/task-repository-notes.gif
deleted file mode 100644
index 77b112185..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/archive/task-repository-notes.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/archive/task-server.gif b/org.eclipse.mylyn.tasks.ui/icons/archive/task-server.gif
deleted file mode 100644
index 71b1baba1..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/archive/task-server.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/elcl16/bug-search.gif b/org.eclipse.mylyn.tasks.ui/icons/elcl16/bug-search.gif
deleted file mode 100644
index b70606376..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/elcl16/bug-search.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/bug-report.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/bug-report.gif
deleted file mode 100644
index 54525a775..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/bug-report.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/calendar.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/calendar.gif
deleted file mode 100644
index 4126b3c27..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/calendar.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/capture-pause.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/capture-pause.gif
deleted file mode 100644
index 98e774380..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/capture-pause.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/category-archive.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/category-archive.gif
deleted file mode 100644
index 36c1f658f..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/category-archive.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/category-new.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/category-new.gif
deleted file mode 100644
index d3f43d977..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/category-new.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/category.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/category.gif
deleted file mode 100644
index 7efb86ec1..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/category.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/comment.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/comment.gif
deleted file mode 100644
index fc30ce1d7..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/comment.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/compare.png b/org.eclipse.mylyn.tasks.ui/icons/etool16/compare.png
deleted file mode 100644
index 0cc6d5fb1..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/compare.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/context-add.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/context-add.gif
deleted file mode 100644
index 030eade39..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/context-add.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/context-attach.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/context-attach.gif
deleted file mode 100644
index bee8fc55f..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/context-attach.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/context-clear.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/context-clear.gif
deleted file mode 100644
index cbb71bedc..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/context-clear.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/context-retrieve.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/context-retrieve.gif
deleted file mode 100644
index 02a46c82e..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/context-retrieve.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/context-transfer.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/context-transfer.gif
deleted file mode 100644
index 0a97a2d56..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/context-transfer.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/export.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/export.gif
deleted file mode 100644
index b22923179..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/export.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/import.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/import.gif
deleted file mode 100644
index 652ca6e76..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/import.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/navigate-next.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/navigate-next.gif
deleted file mode 100644
index 8933a21a7..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/navigate-next.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/navigate-previous-active.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/navigate-previous-active.gif
deleted file mode 100644
index 21f4ef5c3..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/navigate-previous-active.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/navigate-previous-pause.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/navigate-previous-pause.gif
deleted file mode 100644
index a8259c40b..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/navigate-previous-pause.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/navigate-previous.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/navigate-previous.gif
deleted file mode 100644
index cf81b050f..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/navigate-previous.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/open-repository-task.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/open-repository-task.gif
deleted file mode 100644
index 79b22b7f9..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/open-repository-task.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/open-task.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/open-task.gif
deleted file mode 100644
index 29d488858..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/open-task.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/person.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/person.gif
deleted file mode 100644
index dc5a1af8f..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/person.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/query-new.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/query-new.gif
deleted file mode 100644
index 09fcacad3..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/query-new.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/query-unmatched.png b/org.eclipse.mylyn.tasks.ui/icons/etool16/query-unmatched.png
deleted file mode 100644
index 941bd3fbe..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/query-unmatched.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/query.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/query.gif
deleted file mode 100644
index 94e7d5d1c..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/query.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/reply.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/reply.gif
deleted file mode 100644
index afd39be0f..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/reply.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/repository-new.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/repository-new.gif
deleted file mode 100644
index b4832fc94..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/repository-new.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/repository-submit.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/repository-submit.gif
deleted file mode 100644
index 2d2e4447d..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/repository-submit.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/repository-synchronize.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/repository-synchronize.gif
deleted file mode 100644
index bb8538b39..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/repository-synchronize.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/sub-task-new.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/sub-task-new.gif
deleted file mode 100644
index ec27050fe..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/sub-task-new.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/task-active-centered.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/task-active-centered.gif
deleted file mode 100644
index eb74b26f2..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/task-active-centered.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/task-active.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/task-active.gif
deleted file mode 100644
index ca4bf9d0a..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/task-active.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/task-complete.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/task-complete.gif
deleted file mode 100644
index 9cacb96dc..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/task-complete.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/task-completed.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/task-completed.gif
deleted file mode 100644
index ec07a104e..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/task-completed.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/task-context.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/task-context.gif
deleted file mode 100644
index 407dc5495..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/task-context.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/task-inactive-centered.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/task-inactive-centered.gif
deleted file mode 100644
index 979ec18d4..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/task-inactive-centered.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/task-inactive.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/task-inactive.gif
deleted file mode 100644
index b55c1f528..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/task-inactive.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/task-incomplete.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/task-incomplete.gif
deleted file mode 100644
index f6b9f8a59..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/task-incomplete.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/task-narrow.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/task-narrow.gif
deleted file mode 100644
index 03b9e2897..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/task-narrow.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/task-new.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/task-new.gif
deleted file mode 100644
index e2cde50c2..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/task-new.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/task-notes.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/task-notes.gif
deleted file mode 100644
index fd01f49e0..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/task-notes.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/task-remote.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/task-remote.gif
deleted file mode 100644
index b06d68694..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/task-remote.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/task-repository-history.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/task-repository-history.gif
deleted file mode 100644
index 829d0797d..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/task-repository-history.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/task-repository-new.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/task-repository-new.gif
deleted file mode 100644
index 5f3396137..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/task-repository-new.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/task-repository.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/task-repository.gif
deleted file mode 100644
index 1dcbaaff9..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/task-repository.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/task-retrieve.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/task-retrieve.gif
deleted file mode 100644
index ddfa476ab..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/task-retrieve.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/task.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/task.gif
deleted file mode 100644
index a36803a98..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/task.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/tasklist-export.png b/org.eclipse.mylyn.tasks.ui/icons/etool16/tasklist-export.png
deleted file mode 100644
index 21094d9f2..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/tasklist-export.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/tasklist-import.png b/org.eclipse.mylyn.tasks.ui/icons/etool16/tasklist-import.png
deleted file mode 100644
index 3a7ad363c..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/tasklist-import.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/focus.gif b/org.eclipse.mylyn.tasks.ui/icons/eview16/focus.gif
deleted file mode 100644
index bf8439c52..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/eview16/focus.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-due.gif b/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-due.gif
deleted file mode 100644
index 8ec39c96f..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-due.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/perspective-planning.png b/org.eclipse.mylyn.tasks.ui/icons/eview16/perspective-planning.png
deleted file mode 100644
index e868d6a0f..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/eview16/perspective-planning.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/repositories-blue.gif b/org.eclipse.mylyn.tasks.ui/icons/eview16/repositories-blue.gif
deleted file mode 100644
index 4ecfd3853..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/eview16/repositories-blue.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/repositories.gif b/org.eclipse.mylyn.tasks.ui/icons/eview16/repositories.gif
deleted file mode 100644
index a07632446..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/eview16/repositories.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/repository-middle.gif b/org.eclipse.mylyn.tasks.ui/icons/eview16/repository-middle.gif
deleted file mode 100644
index ae982990d..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/eview16/repository-middle.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/repository.gif b/org.eclipse.mylyn.tasks.ui/icons/eview16/repository.gif
deleted file mode 100644
index 81a3e0340..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/eview16/repository.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/task-list.gif b/org.eclipse.mylyn.tasks.ui/icons/eview16/task-list.gif
deleted file mode 100644
index 6ab2668f7..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/eview16/task-list.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/task-search.gif b/org.eclipse.mylyn.tasks.ui/icons/eview16/task-search.gif
deleted file mode 100644
index caa4b8510..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/eview16/task-search.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/obj16/attachment-patch.gif b/org.eclipse.mylyn.tasks.ui/icons/obj16/attachment-patch.gif
deleted file mode 100644
index c0e069d0d..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/obj16/attachment-patch.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/obj16/repository-small.gif b/org.eclipse.mylyn.tasks.ui/icons/obj16/repository-small.gif
deleted file mode 100644
index ceb1f9811..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/obj16/repository-small.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/obj16/workingSet.gif b/org.eclipse.mylyn.tasks.ui/icons/obj16/workingSet.gif
deleted file mode 100644
index 19f04861d..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/obj16/workingSet.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/ovr16/overlay-local.gif b/org.eclipse.mylyn.tasks.ui/icons/ovr16/overlay-local.gif
deleted file mode 100644
index 5494ff788..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/ovr16/overlay-local.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/wizban/banner-repository-context.gif b/org.eclipse.mylyn.tasks.ui/icons/wizban/banner-repository-context.gif
deleted file mode 100644
index f916a95d3..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/wizban/banner-repository-context.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/wizban/banner-repository-settings.gif b/org.eclipse.mylyn.tasks.ui/icons/wizban/banner-repository-settings.gif
deleted file mode 100644
index 5b43097f9..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/wizban/banner-repository-settings.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/wizban/banner-repository.gif b/org.eclipse.mylyn.tasks.ui/icons/wizban/banner-repository.gif
deleted file mode 100644
index 08e472ad6..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/wizban/banner-repository.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/wizban/secur_role_wiz.gif b/org.eclipse.mylyn.tasks.ui/icons/wizban/secur_role_wiz.gif
deleted file mode 100644
index e05db64d3..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/wizban/secur_role_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/wizban/workset_wiz.png b/org.eclipse.mylyn.tasks.ui/icons/wizban/workset_wiz.png
deleted file mode 100644
index b72021483..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/wizban/workset_wiz.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/plugin.xml b/org.eclipse.mylyn.tasks.ui/plugin.xml
deleted file mode 100644
index a7a681a21..000000000
--- a/org.eclipse.mylyn.tasks.ui/plugin.xml
+++ /dev/null
@@ -1,1629 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
- <extension-point id="actions" name="Tasklist Actions" schema="schema/actions.exsd"/>
- <extension-point id="repositories" name="Task Repositories" schema="schema/repositories.exsd"/>
- <extension-point id="editors" name="Task Editors" schema="schema/editors.exsd"/>
- <extension-point id="projectLinkProviders" name="Linking Provider from Project to the Task Repository" schema="schema/projectLinkProviders.exsd"/>
- <extension-point id="duplicateDetectors" name="duplicateDetectors" schema="schema/duplicateDetectors.exsd"/>
- <extension-point id="presentations" name="presentations" schema="schema/presentations.exsd"/>
-
- <extension
- point="org.eclipse.mylyn.context.core.bridges">
- <!--
- <contextStore
- class="org.eclipse.mylyn.internal.tasks.ui.LocalContextStore">
- </contextStore>
- -->
- </extension>
- <extension
- point="org.eclipse.mylyn.tasks.ui.duplicateDetectors">
- <detector
- class="org.eclipse.mylyn.internal.tasks.ui.search.StackTraceDuplicateDetector"
- name="Stack Trace">
- </detector>
- </extension>
-
- <extension point="org.eclipse.ui.views">
- <category name="Mylyn" id="org.eclipse.mylyn.ui"/>
- <view
- allowMultiple="true"
- category="org.eclipse.mylyn.ui"
- class="org.eclipse.mylyn.internal.tasks.ui.views.TaskListView"
- icon="icons/eview16/task-list.gif"
- id="org.eclipse.mylyn.tasks.ui.views.tasks"
- name="Tasks"/>
- <view
- id="org.eclipse.mylyn.tasks.ui.views.repositories"
- allowMultiple="false"
- category="org.eclipse.mylyn.ui"
- class="org.eclipse.mylyn.internal.tasks.ui.views.TaskRepositoriesView"
- icon="icons/eview16/repositories.gif"
- name="Task Repositories">
- </view>
- </extension>
-
- <extension point="org.eclipse.ui.newWizards">
- <category name="Mylyn" id="org.eclipse.mylyn.ui.wizards.new"/>
- </extension>
-
- <extension
- name="Task List Startup (required)"
- point="org.eclipse.ui.startup">
- <startup
- class="org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin$TasksUiStartup">
- </startup>
- </extension>
-
- <!--
- <extension
- id="org.eclipse.mylyn.helpDocs"
- name="Mylyn Help"
- point="org.eclipse.help.toc">
- <toc
- file="doc/toc.xml"
- primary="false">
- </toc>
- </extension>
- -->
- <extension
- point="org.eclipse.ui.elementFactories">
- <factory
- class="org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorInputFactory"
- id="org.eclipse.mylyn.tasks.ui.elementFactories.task.editor">
- </factory>
- </extension>
- <extension point="org.eclipse.ui.newWizards">
- <!--<wizard
- canFinishEarly="true"
- category="org.eclipse.mylyn.wizards"
- class="org.eclipse.mylyn.internal.tasks.ui.wizards.NewLocalTaskWizard"
- hasPages="false"
- icon="icons/etool16/task-new.gif"
- id="org.eclipse.mylyn.tasks.ui.wizards.new.task"
- name="Task"/> -->
- <wizard
- canFinishEarly="true"
- category="org.eclipse.mylyn.ui.wizards.new"
- class="org.eclipse.mylyn.internal.tasks.ui.wizards.NewLocalCategoryWizard"
- hasPages="false"
- icon="icons/etool16/category-new.gif"
- id="org.eclipse.mylyn.tasks.ui.wizards.new.category"
- name="Category">
- </wizard>
- <wizard
- category="org.eclipse.mylyn.ui.wizards.new"
- class="org.eclipse.mylyn.internal.tasks.ui.wizards.NewTaskWizard"
- icon="icons/etool16/task-new.gif"
- id="org.eclipse.mylyn.tasks.ui.wizards.new.repository.task"
- name="Task"/>
- <wizard
- category="org.eclipse.mylyn.ui.wizards.new"
- class="org.eclipse.mylyn.internal.tasks.ui.wizards.NewQueryWizard"
- icon="icons/etool16/query-new.gif"
- id="org.eclipse.mylyn.tasks.ui.wizards.new.query"
- name="Query"/>
- </extension>
-
- <extension
- point="org.eclipse.ui.importWizards">
- <wizard
- category="org.eclipse.mylyn.tasks.ui.wizards.import.category"
- class="org.eclipse.mylyn.internal.tasks.ui.wizards.TaskDataImportWizard"
- icon="icons/etool16/tasklist-import.png"
- id="org.eclipse.mylyn.tasks.ui.wizards.import"
- name="Task Data">
- <description>
- Import task data files from file system.
- </description>
- </wizard>
- <category
- id="org.eclipse.mylyn.tasks.ui.wizards.import.category"
- name="Mylyn"/>
- </extension>
-
- <extension point="org.eclipse.ui.exportWizards">
- <wizard
- category="org.eclipse.mylyn.tasks.ui.wizards.export.category"
- class="org.eclipse.mylyn.internal.tasks.ui.wizards.TaskDataExportWizard"
- icon="icons/etool16/tasklist-export.png"
- id="org.eclipse.mylyn.tasks.ui.wizards.export"
- name="Task Data">
- <description>
- Export Task List data files to the file system.
- </description>
- </wizard>
- <category
- id="org.eclipse.mylyn.tasks.ui.wizards.export.category"
- name="Mylyn"/>
- </extension>
-
- <extension point="org.eclipse.ui.decorators">
- <decorator
- class="org.eclipse.mylyn.internal.tasks.ui.TaskLabelDecorator"
- id="org.eclipse.mylyn.tasks.ui.decorators.task"
- label="Mylyn Task Decorator"
- lightweight="true"
- state="true">
- <description>
- Overlays information such as due date notifications
- </description>
- <enablement>
- <or>
- <objectClass
- name="org.eclipse.mylyn.internal.tasks.core.AbstractTaskContainer">
- </objectClass>
- <objectClass
- name="org.eclipse.mylyn.tasks.core.TaskRepository">
- </objectClass>
- </or>
- </enablement>
- </decorator>
- </extension>
-
- <extension
- point="org.eclipse.ui.editors">
- <editor
- class="org.eclipse.mylyn.tasks.ui.editors.TaskEditor"
- contributorClass="org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorActionContributor"
- icon="icons/etool16/task.gif"
- id="org.eclipse.mylyn.tasks.ui.editors.task"
- name="Task Editor"/>
- <editor
- icon="icons/etool16/task.gif"
- class="org.eclipse.mylyn.internal.tasks.ui.editors.CategoryEditor"
- name="Category Editor"
- id="org.eclipse.mylyn.tasks.ui.editors.category"/>
- </extension>
-
- <extension point="org.eclipse.ui.perspectiveExtensions">
- <perspectiveExtension targetID="org.eclipse.jdt.ui.JavaPerspective">
- <viewShortcut id="org.eclipse.mylyn.tasks.ui.views.tasks"/>
- <view
- closeable="true"
- id="org.eclipse.mylyn.tasks.ui.views.tasks"
- minimized="false"
- moveable="true"
- ratio="0.5"
- relationship="top"
- relative="org.eclipse.ui.views.ContentOutline"
- visible="true"/>
- <newWizardShortcut
- id="org.eclipse.mylyn.tasks.ui.wizards.new.repository.task">
- </newWizardShortcut>
- </perspectiveExtension>
- <perspectiveExtension targetID="org.eclipse.jdt.ui.JavaBrowsingPerspective">
- <viewShortcut id="org.eclipse.mylyn.tasks.ui.views.tasks"/>
- </perspectiveExtension>
- <perspectiveExtension
- targetID="org.eclipse.ui.resourcePerspective">
- <viewShortcut id="org.eclipse.mylyn.tasks.ui.views.tasks"/>
- <view
- closeable="true"
- id="org.eclipse.mylyn.tasks.ui.views.tasks"
- minimized="false"
- relationship="stack"
- relative="org.eclipse.ui.views.ContentOutline">
- </view>
- <newWizardShortcut
- id="org.eclipse.mylyn.tasks.ui.wizards.new.repository.task">
- </newWizardShortcut>
- </perspectiveExtension>
- <perspectiveExtension
- targetID="org.eclipse.mylyn.tasks.ui.perspectives.planning">
- <newWizardShortcut
- id="org.eclipse.mylyn.tasks.ui.wizards.new.repository.task">
- </newWizardShortcut>
- <viewShortcut
- id="org.eclipse.mylyn.tasks.ui.views.repositories">
- </viewShortcut>
- </perspectiveExtension>
-
- <perspectiveExtension targetID="org.eclipse.team.cvs.ui.cvsPerspective">
- <view
- id="org.eclipse.mylyn.tasks.ui.views.repositories"
- minimized="false"
- ratio="0.7"
- relationship="bottom"
- relative="org.eclipse.team.ccvs.ui.RepositoriesView"
- visible="true"/>
- <viewShortcut id="org.eclipse.mylyn.tasks.ui.views.repositories"/>
- </perspectiveExtension>
-
- <perspectiveExtension targetID="org.eclipse.team.ui.TeamSynchronizingPerspective">
- <view
- id="org.eclipse.mylyn.tasks.ui.views.repositories"
- minimized="false"
- ratio="0.7"
- relationship="bottom"
- relative="org.eclipse.team.sync.views.SynchronizeView"
- visible="true"/>
- <viewShortcut id="org.eclipse.mylyn.tasks.ui.views.repositories"/>
- </perspectiveExtension>
- </extension>
-
- <extension point="org.eclipse.ui.viewActions">
- <viewContribution
- id="org.eclipse.mylyn.tasks.ui.actions.view"
- targetID="org.eclipse.mylyn.tasks.ui.views.tasks">
-
- <action
- class="org.eclipse.mylyn.internal.tasks.ui.actions.SynchronizeAllAction"
- enablesFor="*"
- icon="icons/etool16/repository-synchronize.gif"
- id="org.eclipse.mylyn.tasks.ui.synchronize.changed"
- label="Synchronize Changed"
- menubarPath="tasks"
- toolbarPath="new"
- tooltip="Synchronize Changed">
- </action>
- <action
- class="org.eclipse.mylyn.internal.tasks.ui.actions.RestoreTaskListAction"
- icon="icons/etool16/import.gif"
- id="org.eclipse.mylyn.tasks.ui.tasks.restore"
- label="Restore Tasks from History..."
- menubarPath="tasks"
- style="push">
- </action>
-
- <action
- class="org.eclipse.mylyn.internal.tasks.ui.actions.ShowTaskRepositoriesViewAction"
- enablesFor="*"
- icon="icons/eview16/repositories.gif"
- id="org.eclipse.mylyn.tasks.ui.open.repositories.view"
- label="Show Task Repositories View"
- menubarPath="tasks"
- tooltip="Show Task Repositories View">
- </action>
- <action
- class="org.eclipse.mylyn.internal.tasks.ui.actions.OpenTaskSearchAction"
- icon="icons/eview16/task-search.gif"
- id="org.eclipse.mylyn.tasks.ui.search.open"
- label="Search Repository..."
- menubarPath="tasks">
- </action>
-
- <action
- class="org.eclipse.mylyn.internal.tasks.ui.actions.NewTaskAction"
- enablesFor="*"
- icon="icons/etool16/task-new.gif"
- id="org.eclipse.mylyn.tasks.ui.actions.new.repository.task"
- label="New Task"
- style="push"
- toolbarPath="new"
- tooltip="New Task">
- </action>
- <!--<action
- class="org.eclipse.mylyn.internal.tasks.ui.actions.NewLocalTaskAction"
- icon="icons/etool16/task-new.gif"
- id="org.eclipse.mylyn.tasks.ui.actions.new.task"
- label="Task"
- style="push"
- toolbarPath="new"
- tooltip="New Task">
- </action> -->
- <!--
- <action
- class="org.eclipse.mylyn.internal.tasklist.ui.actions.CopyDetailsAction"
- id="org.eclipse.mylyn.tasklist.copy.details"
- label="Copy Details"
- style="push"/>
- -->
- </viewContribution>
- </extension>
-
- <extension point="org.eclipse.ui.popupMenus">
- <viewerContribution
- id="org.eclipse.mylyn.tasklist.ui.viewerContribution"
- targetID="org.eclipse.mylyn.tasks.ui.views.tasks">
-
- <action
- class="org.eclipse.mylyn.internal.tasks.ui.actions.SynchronizeSelectedAction"
- definitionId="org.eclipse.ui.file.refresh"
- enablesFor="*"
- icon="icons/etool16/repository-synchronize.gif"
- id="org.eclipse.mylyn.tasks.ui.actions.synchronize.selected"
- label="Synchronize"
- menubarPath="repository"
- tooltip="Synchronize with Repository">
- <enablement>
- <or>
- <objectClass name="org.eclipse.mylyn.internal.tasks.core.RepositoryQuery"/>
- <objectClass name="org.eclipse.mylyn.internal.tasks.core.AbstractTask"/>
- <objectClass name="org.eclipse.mylyn.internal.tasks.core.AbstractTaskContainer"/>
- </or>
- </enablement>
- </action>
-
- <action
- class="org.eclipse.mylyn.internal.tasks.ui.actions.QueryCloneAction"
- enablesFor="org.eclipse.mylyn.internal.tasks.core.RepositoryQuery"
- icon="icons/etool16/query-new.gif"
- id="org.eclipse.mylyn.tasks.ui.actions.clone.query"
- label="Clone Query..."
- menubarPath="org.eclipse.mylyn.tasks.ui.menu.operations/clone"
- tooltip="Clone Repository Query">
- </action>
- <action
- class="org.eclipse.mylyn.internal.tasks.ui.actions.CloneTaskAction"
- enablesFor="1"
- icon="icons/etool16/task-new.gif"
- id="org.eclipse.mylyn.tasks.ui.actions.task.query"
- label="Clone Task..."
- menubarPath="org.eclipse.mylyn.tasks.ui.menu.operations/clone"
- tooltip="Clone Task">
- <enablement>
-<!-- <and> -->
- <objectClass
- name="org.eclipse.mylyn.internal.tasks.core.AbstractTask">
- </objectClass>
-<!--
- <not>
- <objectClass
- name="org.eclipse.mylyn.internal.tasks.core.LocalTask">
- </objectClass>
- </not>
- </and>
--->
- </enablement>
- </action>
-
- <action
- class="org.eclipse.mylyn.internal.tasks.ui.actions.QueryExportAction"
- enablesFor="org.eclipse.mylyn.internal.tasks.core.RepositoryQuery"
- icon="icons/etool16/export.gif"
- id="org.eclipse.mylyn.tasks.ui.actions.export.query"
- label="Export Query..."
- menubarPath="org.eclipse.mylyn.tasks.ui.menu.operations/importexport"
- tooltip="Export Repository Query">
- </action>
-
- <action
- class="org.eclipse.mylyn.internal.tasks.ui.actions.QueryImportAction"
- enablesFor="*"
- icon="icons/etool16/import.gif"
- id="org.eclipse.mylyn.tasks.ui.actions.import.query"
- label="Import Query..."
- menubarPath="org.eclipse.mylyn.tasks.ui.menu.operations/importexport"
- tooltip="Import Repository Query">
- </action>
-
- <action
- class="org.eclipse.mylyn.internal.tasks.ui.actions.TaskExportAction"
- enablesFor="org.eclipse.mylyn.internal.tasks.core.AbstractTask"
- icon="icons/etool16/export.gif"
- id="org.eclipse.mylyn.tasks.ui.actions.export.task"
- label="Export Task..."
- menubarPath="org.eclipse.mylyn.tasks.ui.menu.operations/importexport"
- tooltip="Export Task">
- </action>
-
- <action
- class="org.eclipse.mylyn.internal.tasks.ui.actions.TaskImportAction"
- enablesFor="*"
- icon="icons/etool16/import.gif"
- id="org.eclipse.mylyn.tasks.ui.actions.import.task"
- label="Import Task..."
- menubarPath="org.eclipse.mylyn.tasks.ui.menu.operations/importexport"
- tooltip="Import Task">
- </action>
-
- <action
- class="org.eclipse.mylyn.internal.tasks.ui.actions.NewTaskAction:local"
- enablesFor="*"
- icon="icons/etool16/task-new.gif"
- id="org.eclipse.mylyn.tasks.ui.new.local.task"
- definitionId="org.eclipse.mylyn.tasks.ui.command.new.local.task"
- label="Local Task"
- menubarPath="org.eclipse.mylyn.tasks.ui.menu.new/local"
- tooltip="New Task"/>
-
- <action
- class="org.eclipse.mylyn.internal.tasks.ui.actions.NewTaskAction"
- enablesFor="*"
- icon="icons/etool16/task-new.gif"
- id="org.eclipse.mylyn.tasks.ui.new.repository.task"
- label="Task..."
- menubarPath="org.eclipse.mylyn.tasks.ui.menu.new/repository"
- tooltip="New Task"/>
-
- <action
- class="org.eclipse.mylyn.internal.tasks.ui.actions.NewQueryAction"
- enablesFor="*"
- icon="icons/etool16/query-new.gif"
- id="org.eclipse.mylyn.tasks.ui.new.query"
- menubarPath="org.eclipse.mylyn.tasks.ui.menu.new/repository"
- label="Query..."
- style="push"
- tooltip="New Query">
- </action>
-
- <action
- class="org.eclipse.mylyn.internal.tasks.ui.actions.NewSubTaskAction"
- definitionId="org.eclipse.mylyn.tasks.ui.command.new.subtask"
- enablesFor="1"
- icon="icons/etool16/sub-task-new.gif"
- id="org.eclipse.mylyn.tasks.ui.new.subtask"
- label="Subtask"
- menubarPath="org.eclipse.mylyn.tasks.ui.menu.new/afterRepository"
- tooltip="New Subtask">
- <enablement>
- <objectClass
- name="org.eclipse.mylyn.internal.tasks.core.AbstractTask">
- </objectClass>
- </enablement>
- </action>
-
- <menu
- id="org.eclipse.mylyn.tasks.ui.menu.new"
- label="New"
- path="new">
- <separator
- name="repository">
- </separator>
- <groupMarker
- name="afterRepository">
- </groupMarker>
- <separator
- name="local">
- </separator>
-
- </menu>
-
- <menu
- id="org.eclipse.mylyn.tasks.ui.menu.operations"
- label="Operations"
- path="operations">
- <separator
- name="clone">
- </separator>
- <separator
- name="import">
- </separator>
- <separator
- name="export">
- </separator>
- </menu>
-
-
- <!--<action
- class="org.eclipse.mylyn.internal.tasks.ui.actions.NewLocalTaskAction"
- icon="icons/etool16/task-new.gif"
- id="org.eclipse.mylyn.tasks.ui.actions.new.task"
- label="Task"
- menubarPath="org.eclipse.mylyn.tasks.ui.menu.new/local"
- style="push"
- tooltip="New Task">
- </action>-->
- <action
- class="org.eclipse.mylyn.internal.tasks.ui.actions.NewCategoryAction"
- icon="icons/etool16/category-new.gif"
- id="org.eclipse.mylyn.tasks.ui.actions.new.category"
- label="Category"
- menubarPath="org.eclipse.mylyn.tasks.ui.menu.new/local"
- tooltip="New Category">
- </action>
- </viewerContribution>
- <viewerContribution
- id="org.eclipse.mylyn.tasks.ui.viewerContribution"
- targetID="org.eclipse.mylyn.tasks.ui.views.repositories">
- <action
- class="org.eclipse.mylyn.internal.tasks.ui.actions.RefreshRepositoryTasksAction"
- icon="icons/etool16/repository-synchronize.gif"
- id="org.eclipse.mylyn.tasks.ui.open.task.remote"
- label="Synchronize All Tasks"
- menubarPath="repository"
- style="push"
- tooltip="Synchronize All Tasks">
- <enablement>
- <and>
- <objectState name="offline" value="false"/>
- <objectState name="hasRepository" value="true"/>
- </and>
- </enablement>
- </action>
- <action
- class="org.eclipse.mylyn.internal.tasks.ui.actions.OpenRepositoryTask"
- definitionId="org.eclipse.mylyn.tasks.ui.command.openRemoteTask"
- icon="icons/etool16/open-repository-task.gif"
- id="org.eclipse.mylyn.tasks.ui.open.task.remote"
- label="Open &amp;Repository Task..."
- menubarPath="repository"
- style="push"
- tooltip="Open Repository Task">
- <enablement>
- <and>
- <objectState name="offline" value="false"/>
- <objectState name="hasRepository" value="true"/>
- </and>
- </enablement>
- </action>
- <action
- class="org.eclipse.mylyn.internal.tasks.ui.actions.NewQueryAction:skipFirstPage"
- enablesFor="*"
- icon="icons/etool16/query-new.gif"
- id="org.eclipse.mylyn.tasks.ui.new.query"
- label="New Query..."
- menubarPath="repository"
- style="push"
- tooltip="New Query">
- <enablement>
- <and>
- <objectState name="offline" value="false"/>
- <objectState name="supportQuery" value="true"/>
- </and>
- </enablement>
- </action>
- <action
- class="org.eclipse.mylyn.internal.tasks.ui.actions.NewTaskAction:skipFirstPage"
- enablesFor="*"
- icon="icons/etool16/task-new.gif"
- id="org.eclipse.mylyn.tasks.ui.new.repository.task"
- label="New Task..."
- menubarPath="repository"
- tooltip="New Task">
- <enablement>
- <and>
- <objectState name="offline" value="false"/>
- <objectState name="supportNewTask" value="true"/>
- </and>
- </enablement>
- </action>
- </viewerContribution>
-
- <objectContribution
- adaptable="false"
- id="org.eclipse.mylyn.tasks.ui.contribution.attachment.compare"
- objectClass="org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryAttachment">
- <action
- class="org.eclipse.mylyn.internal.tasks.ui.actions.CompareAttachmentsAction"
- enablesFor="2"
- icon="icons/etool16/compare.png"
- id="org.eclipse.mylyn.tasks.ui.action.attachment.compare"
- label="Compare"
- menubarPath="actions"
- tooltip="Compare attachments"/>
- </objectContribution>
-
- </extension>
-
- <extension
- point="org.eclipse.ui.keywords">
- <keyword
- label="mylyn tasks"
- id="org.eclipse.mylyn.tasks.ui.keywords"/>
- </extension>
-
- <extension point="org.eclipse.ui.preferencePages">
- <page
- name="Mylyn"
- class="org.eclipse.mylyn.internal.tasks.ui.preferences.TaskFocusedUiPreferencePage"
- id="org.eclipse.mylyn.ui.preferences">
- <keywordReference
- id="org.eclipse.mylyn.tasks.ui.keywords"/>
- </page>
- <page
- name="Task List"
- class="org.eclipse.mylyn.internal.tasks.ui.preferences.TasksUiPreferencePage"
- id="org.eclipse.mylyn.tasks.ui.preferences"
- category="org.eclipse.mylyn.ui.preferences">
- <keywordReference id="org.eclipse.mylyn.tasks.ui.keywords"/>
- </page>
- </extension>
-
- <extension point="org.eclipse.ui.bindings">
- <key
- sequence="M2+M3+Q K"
- commandId="org.eclipse.ui.views.showView"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration">
- <parameter
- id="org.eclipse.ui.views.showView.viewId"
- value="org.eclipse.mylyn.tasks.ui.views.tasks"/>
- </key>
- <key
- platform="carbon"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="M2+M3+Q K">
- </key>
- <key
- commandId="org.eclipse.ui.views.showView"
- platform="carbon"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="COMMAND+ALT+Q K">
- <parameter
- id="org.eclipse.ui.views.showView.viewId"
- value="org.eclipse.mylyn.tasks.ui.views.tasks">
- </parameter>
- </key>
- </extension>
-
- <extension
- point="org.eclipse.ui.themes">
- <themeElementCategory
- id="org.eclipse.mylyn.tasks.ui.presentation"
- label="Tasks"/>
-
- <colorDefinition
- categoryId="org.eclipse.mylyn.tasks.ui.presentation"
- id="org.eclipse.mylyn.tasks.ui.colors.foreground.today.scheduled"
- isEditable="true"
- label="Tasks - Scheduled for Today"
- value="32,21,223">
- <description>
- Text color for tasks scheduled for today.
- </description>
- </colorDefinition>
-
- <colorDefinition
- categoryId="org.eclipse.mylyn.tasks.ui.presentation"
- id="org.eclipse.mylyn.tasks.ui.colors.foreground.past.scheduled"
- isEditable="true"
- label="Tasks - Past Scheduled Date"
- value="32,21,223">
- <description>
- Text color for tasks past their scheduled date.
- </description>
- </colorDefinition>
-
- <colorDefinition
- categoryId="org.eclipse.mylyn.tasks.ui.presentation"
- id="org.eclipse.mylyn.tasks.ui.colors.foreground.past.due"
- isEditable="true"
- label="Tasks - Past Due Date"
- value="198,4,38">
- <description>
- Text color tasks past their due date.
- </description>
- </colorDefinition>
-
- <colorDefinition
- categoryId="org.eclipse.mylyn.tasks.ui.presentation"
- id="org.eclipse.mylyn.tasks.ui.colors.foreground.thisweek.scheduled"
- isEditable="true"
- label="Tasks - Scheduled for This Week"
- value="0,0,0">
- <description>
- Text color for tasks scheduled for this week
- </description>
- </colorDefinition>
- <colorDefinition
- categoryId="org.eclipse.mylyn.tasks.ui.presentation"
- id="org.eclipse.mylyn.tasks.ui.colors.foreground.today.completed"
- isEditable="true"
- label="Tasks - Completed Today"
- value="107,169,128">
- <description>
- Text color for tasks completed today.
- </description>
- </colorDefinition>
- <colorDefinition
- categoryId="org.eclipse.mylyn.tasks.ui.presentation"
- id="org.eclipse.mylyn.tasks.ui.colors.foreground.completed"
- isEditable="true"
- label="Tasks - Completed"
- value="128,128,128">
- <description>
- Text color for completed tasks.
- </description>
- </colorDefinition>
- <colorDefinition
- categoryId="org.eclipse.mylyn.tasks.ui.presentation"
- id="org.eclipse.mylyn.tasks.ui.colors.incoming.background"
- isEditable="true"
- label="Task Editor - Incoming Changes"
- value="225,236,255">
- <description>
- Background color of attributes with incoming changes.
- </description>
- </colorDefinition>
-
- <colorDefinition
- categoryId="org.eclipse.mylyn.tasks.ui.presentation"
- id="org.eclipse.mylyn.tasks.ui.colors.category.gradient.start"
- isEditable="true"
- label="Task List - Category Gradient Top"
- value="240,240,240">
- <description>
- Background start color for Task List category gradients.
- </description>
- </colorDefinition>
-
- <colorDefinition
- categoryId="org.eclipse.mylyn.tasks.ui.presentation"
- id="org.eclipse.mylyn.tasks.ui.colors.category.gradient.end"
- isEditable="true"
- label="Task List - Category Gradient Bottom"
- value="220,220,220"> <!-- was all 220, 234,233,237 -->
- <description>
- Background end color for Task List category gradients.
- </description>
- </colorDefinition>
-
- <fontDefinition
- categoryId="org.eclipse.mylyn.tasks.ui.presentation"
- id="org.eclipse.mylyn.tasks.ui.fonts.task.editor.comment"
- isEditable="true"
- label="Task Editor - Notes and Comments"
- value="org.eclipse.jface.dialogfont">
- <fontValue
- ws="win32"
- value="Tahoma-regular-10">
- </fontValue>
- <description>
- Text font used for task editor text areas.
- </description>
- </fontDefinition>
- </extension>
- <!-- defaultsTo="org.eclipse.jface.dialogfont"-->
-
- <extension
- point="org.eclipse.ui.perspectives">
- <perspective
- class="org.eclipse.mylyn.internal.tasks.ui.PlanningPerspectiveFactory"
- fixed="false"
- icon="icons/eview16/perspective-planning.png"
- id="org.eclipse.mylyn.tasks.ui.perspectives.planning"
- name="Planning"/>
- </extension>
-
-
- <extension point="org.eclipse.mylyn.tasks.ui.actions">
- <dynamicPopupMenu
- class="org.eclipse.mylyn.internal.tasks.ui.ScheduleTaskMenuContributor"
- menuPath="tasks"/>
- <dynamicPopupMenu
- class="org.eclipse.mylyn.internal.tasks.ui.MoveToCategoryMenuContributor"
- menuPath="tasks"/>
- </extension>
-
- <extension
- point="org.eclipse.mylyn.tasks.ui.editors">
- <hyperlinkDetector
- class="org.eclipse.mylyn.internal.tasks.ui.editors.TaskHyperlinkDetector"
- id="org.eclipse.mylyn.tasks.ui.hyperlink.detector.tasks">
- </hyperlinkDetector>
- <hyperlinkDetector
- class="org.eclipse.mylyn.internal.tasks.ui.editors.TaskUrlHyperlinkDetector"
- id="org.eclipse.mylyn.tasks.ui.hyperlink.detector.url"/>
- <pageFactory
- class="org.eclipse.mylyn.internal.tasks.ui.editors.PlanningPageFactory"
- id="org.eclipse.mylyn.tasks.ui.pageFactory.Planning">
- </pageFactory>
-
- </extension>
-
- <extension
- point="org.eclipse.ui.actionSets">
- <actionSet
- id="org.eclipse.mylyn.tasks.ui.navigation"
- label="Mylyn Task Navigation"
- visible="true">
- <action
- class="org.eclipse.mylyn.internal.tasks.ui.actions.DeactivateAllTasksAction"
- definitionId="org.eclipse.mylyn.tasks.ui.command.deactivateAllTasks"
- icon="icons/etool16/task-inactive-centered.gif"
- id="org.eclipse.mylyn.tasks.ui.deactivateAllTasks"
- label="&amp;Deactivate Task"
- menubarPath="navigate/open.ext3"
- style="push"/>
- <action
- class="org.eclipse.mylyn.internal.tasks.ui.actions.ActivateTaskDialogAction"
- definitionId="org.eclipse.mylyn.tasks.ui.command.activateTask"
- icon="icons/etool16/task-active-centered.gif"
- id="org.eclipse.mylyn.tasks.ui.switchTask"
- label="&amp;Activate Task..."
- menubarPath="navigate/open.ext3"
- style="push"/>
- <action
- class="org.eclipse.mylyn.internal.tasks.ui.actions.OpenTaskAction"
- definitionId="org.eclipse.mylyn.tasks.ui.command.openTask"
- icon="icons/etool16/open-task.gif"
- id="org.eclipse.mylyn.tasks.ui.openTask"
- label="Open Tas&amp;k..."
- menubarPath="navigate/open.ext3"
- style="push"
- toolbarPath="org.eclipse.search.searchActionSet/Search"
- tooltip="Open Task"/>
- <action
- class="org.eclipse.mylyn.internal.tasks.ui.actions.SearchForRepositoryTask"
- definitionId="org.eclipse.mylyn.tasks.ui.command.searchForTask"
- icon="icons/etool16/open-repository-task.gif"
- id="org.eclipse.mylyn.tasks.ui.open.task.remote"
- label="Search for Repository Task..."
- style="push"
- tooltip="Search for Repository Task"/>
- </actionSet>
- </extension>
-
- <extension point="org.eclipse.ui.commands">
- <command id="org.eclipse.mylyn.tasks.ui.command.previousTask"
- defaultHandler="org.eclipse.mylyn.internal.tasks.ui.TaskHistoryHandler"
- name="Previous Task Command"/>
- </extension>
-
- <!-- command-based implementation of the previousTask/history dropdown,
- the problem is that it doesn't work well with the actionSet
- <extension point="org.eclipse.ui.menus">
- <menuContribution locationURI="menu:org.eclipse.mylyn.tasks.ui.previous.task">
- <dynamic
- class="org.eclipse.mylyn.internal.tasks.ui.TaskHistoryDropDown"
- id="org.eclipse.mylyn.tasks.ui.previous.task.dropdown"/>
- </menuContribution>
- </extension>
-
- <extension point="org.eclipse.ui.menus">
- <menuContribution locationURI="toolbar:org.eclipse.ui.workbench.navigate">
- <command id="org.eclipse.mylyn.tasks.ui.previous.task"
- commandId="org.eclipse.mylyn.tasks.ui.command.previousTask"
- icon="icons/etool16/navigate-previous.gif"
- label="Activate Previous Task"
- tooltip="Activate Previous Task"
- style="pulldown">
- <visibleWhen>
- <with variable="activeContexts">
- <iterate operator="or">
- <equals value="org.eclipse.mylyn.tasks.ui.navigation.additions"/>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- </menuContribution>
- </extension>
- -->
-
- <extension point="org.eclipse.ui.actionSets">
- <actionSet
- id="org.eclipse.mylyn.tasks.ui.navigation.additions"
- label="Mylyn Task Navigation Extras"
- visible="false">
- <action
- allowLabelUpdate="true"
- class="org.eclipse.mylyn.internal.tasks.ui.actions.ActivateTaskHistoryDropDownAction"
- icon="icons/etool16/navigate-previous.gif"
- id="org.eclipse.mylyn.tasks.ui.navigate.task.history"
- label="Activate Previous Task"
- style="pulldown"
- toolbarPath="org.eclipse.ui.workbench.navigate/Tasks"
- tooltip="Activate Previous Task">
- </action>
- <action
- class="org.eclipse.mylyn.internal.tasks.ui.actions.OpenRepositoryTask"
- definitionId="org.eclipse.mylyn.tasks.ui.command.openRemoteTask"
- icon="icons/etool16/open-repository-task.gif"
- id="org.eclipse.mylyn.tasks.ui.open.task.remote"
- label="Open &amp;Repository Task..."
- menubarPath="navigate/open.ext3"
- style="push"
- tooltip="Open Repository Task"/>
- </actionSet>
- </extension>
-
- <extension
- point="org.eclipse.ui.commands">
- <command
- categoryId="org.eclipse.ui.category.navigate"
- id="org.eclipse.mylyn.tasks.ui.command.openTask"
- name="Open Task"/>
- <command
- categoryId="org.eclipse.ui.category.navigate"
- id="org.eclipse.mylyn.tasks.ui.command.searchForTask"
- name="Search Repository for Task"/>
- <command
- categoryId="org.eclipse.ui.category.navigate"
- id="org.eclipse.mylyn.tasks.ui.command.openRemoteTask"
- name="Open Remote Task"/>
- <command
- categoryId="org.eclipse.ui.category.navigate"
- id="org.eclipse.mylyn.tasks.ui.command.activateTask"
- name="Activate Task"/>
- <command
- categoryId="org.eclipse.ui.category.navigate"
- id="org.eclipse.mylyn.tasks.ui.command.deactivateAllTasks"
- name="Deactivate Task"/>
- </extension>
- <extension
- point="org.eclipse.ui.bindings">
- <key
- commandId="org.eclipse.mylyn.tasks.ui.command.openTask"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="M1+F12"/>
- <key
- commandId="org.eclipse.mylyn.tasks.ui.command.openTask"
- platform="carbon"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="M1+M3+F12">
- </key>
- <key
- platform="carbon"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="M1+F12">
- </key>
- <key
- commandId="org.eclipse.mylyn.tasks.ui.command.searchForTask"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="M1+M2+F12"/>
- <key
- commandId="org.eclipse.mylyn.tasks.ui.command.openRemoteTask"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="M1+M2+M3+F12"/>
- <key
- commandId="org.eclipse.mylyn.tasks.ui.command.activateTask"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="M1+F9"/>
- <key
- commandId="org.eclipse.mylyn.tasks.ui.command.deactivateAllTasks"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="M1+M2+F9"/>
- </extension>
-
- <extension
- id="org.eclipse.mylyn.tasks.ui.search.results"
- point="org.eclipse.search.searchResultViewPages">
- <viewPage
- class="org.eclipse.mylyn.internal.tasks.ui.search.RepositorySearchResultView"
- searchResultClass="org.eclipse.mylyn.internal.tasks.ui.search.RepositorySearchResult"
- id="org.eclipse.mylyn.internal.tasks.ui.search.RepositorySearchResultView"/>
-<!-- id="org.eclipse.mylyn.bugzilla.BugzillaSearchResultPage"/>-->
- </extension>
- <extension
- id="org.eclipse.mylyn.tasks.ui.repositorySearchPage"
- name="Task Search Page"
- point="org.eclipse.search.searchPages">
- <page
- class="org.eclipse.mylyn.internal.tasks.ui.TaskSearchPage"
- enabled="true"
- icon="icons/eview16/task-search.gif"
- id="org.eclipse.mylyn.tasks.ui.search.page"
- label="Task Search"
- tabPosition="999"/>
- </extension>
- <extension
- point="org.eclipse.ui.propertyPages">
- <page
- class="org.eclipse.mylyn.internal.tasks.ui.properties.ProjectTaskRepositoryPage"
- id="org.eclipse.mylyn.tasks.ui.properties.pages.project.repository"
- name="Task Repository">
- <enabledWhen>
- <adapt
- type="org.eclipse.core.resources.IProject">
- </adapt>
- </enabledWhen>
- </page>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <category
- id="org.eclipse.mylyn.tasks.ui.commands"
- name="Task Repositories">
- </category>
- <command
- categoryId="org.eclipse.mylyn.tasks.ui.commands"
- defaultHandler="org.eclipse.mylyn.internal.tasks.ui.commands.AddTaskRepositoryHandler"
- id="org.eclipse.mylyn.tasks.ui.command.addTaskRepository"
- name="Add Task Repository">
- <commandParameter
- id="org.eclipse.mylyn.tasks.ui.command.taskRepositoryId"
- name="Repository Type"
- optional="true"
- values="org.eclipse.mylyn.internal.tasks.ui.commands.TaskRepositoryParameterValues">
- </commandParameter>
- </command>
- </extension>
- <extension
- point="org.eclipse.mylyn.tasks.ui.projectLinkProviders">
- <linkProvider
- class="org.eclipse.mylyn.internal.tasks.ui.properties.ProjectPropertiesLinkProvider"
- name="Default Repository Link"
- order="1000"
- id="org.eclipse.mylyn.tasks.ui.defaultRepositoryLinkProvider">
- </linkProvider>
- </extension>
- <extension
- point="org.eclipse.core.runtime.adapters">
- <factory
- adaptableType="org.eclipse.mylyn.internal.tasks.core.AbstractTaskContainer"
- class="org.eclipse.mylyn.internal.tasks.ui.search.SearchScoreComputerAdapterFactory">
- <adapter
- type="org.eclipse.search.ui.ISearchPageScoreComputer">
- </adapter>
- </factory>
- </extension>
-
- <extension
- point="org.eclipse.ui.workbench.texteditor.hyperlinkDetectors">
- <hyperlinkDetector
- class="org.eclipse.mylyn.internal.tasks.ui.editors.TaskHyperlinkDetector"
- id="org.eclipse.mylyn.tasks.ui.hyperlinks.detectors.task"
- name="Mylyn Tasks"
- targetId="org.eclipse.ui.DefaultTextEditor">
- </hyperlinkDetector>
- <hyperlinkDetector
- class="org.eclipse.mylyn.internal.tasks.ui.editors.TaskUrlHyperlinkDetector"
- description="Mylyn enabled URL hyperlink detector"
- id="org.eclipse.mylyn.tasks.ui.hyperlinks.detectors.url"
- name="Mylyn URLs"
- targetId="org.eclipse.ui.DefaultTextEditor">
- </hyperlinkDetector>
- </extension>
-
- <extension
- point="org.eclipse.ui.workingSets">
- <workingSet
- elementAdapterClass="org.eclipse.mylyn.internal.tasks.ui.workingsets.TaskWorkingSetElementAdapter"
- icon="icons/obj16/workingSet.gif"
- id="org.eclipse.mylyn.tasks.ui.workingSet"
- name="Tasks and Resources"
- pageClass="org.eclipse.mylyn.internal.tasks.ui.workingsets.TaskWorkingSetPage"
- updaterClass="org.eclipse.mylyn.internal.tasks.ui.workingsets.TaskWorkingSetUpdater"/>
- </extension>
-
- <extension point="org.eclipse.core.runtime.adapters">
- <factory
- adaptableType="org.eclipse.mylyn.internal.tasks.core.AbstractTaskContainer"
- class="org.eclipse.mylyn.internal.tasks.ui.workingsets.TaskWorkingSetAdapterFactory">
- <adapter type="org.eclipse.ui.IPersistableElement"/>
- </factory>
- <factory
- adaptableType="org.eclipse.mylyn.tasks.core.TaskRepository"
- class="org.eclipse.mylyn.internal.tasks.ui.TaskRepositoryAdapterFactory">
- <adapter type="org.eclipse.ui.IActionFilter"/>
- </factory>
- <factory
- adaptableType="org.eclipse.mylyn.tasks.ui.editors.TaskEditorInput"
- class="org.eclipse.mylyn.internal.tasks.ui.TasksAdapterFactory">
- <adapter
- type="org.eclipse.mylyn.tasks.core.ITask">
- </adapter>
- <adapter
- type="org.eclipse.mylyn.tasks.core.TaskRepository">
- </adapter>
- </factory>
- <factory
- adaptableType="org.eclipse.mylyn.tasks.core.ITaskAttachment"
- class="org.eclipse.mylyn.internal.tasks.ui.TasksAdapterFactory">
- <adapter
- type="org.eclipse.mylyn.tasks.core.ITask">
- </adapter>
- <adapter
- type="org.eclipse.mylyn.tasks.core.TaskRepository">
- </adapter>
- </factory>
- </extension>
-
- <extension
- point="org.eclipse.ui.elementFactories">
- <factory
- class="org.eclipse.mylyn.internal.tasks.ui.workingsets.TaskWorkingSetElementFactory"
- id="org.eclipse.mylyn.tasks.ui.workingSets.elementFactory">
- </factory>
-</extension>
- <extension
- id="org.eclipse.mylyn.tasks.local.repository"
- name="Local Task Repository"
- point="org.eclipse.mylyn.tasks.ui.repositories">
- <connectorCore
- class="org.eclipse.mylyn.internal.tasks.core.LocalRepositoryConnector"
- id="org.eclipse.mylyn.tasks.connector.local"
- name="Local Repository Connector"/>
- <connectorUi
- brandingIcon="icons/etool16/person.gif"
- class="org.eclipse.mylyn.internal.tasks.ui.LocalRepositoryConnectorUi"
- name="Local Repository Ui"
- overlayIcon="icons/ovr16/overlay-local.gif"/>
- </extension>
-
- <extension point="org.eclipse.ui.workbench.texteditor.hyperlinkDetectorTargets">
- <target id="org.eclipse.mylyn.tasks.ui.TaskEditor" name="Task Editor"/>
- </extension>
-
- <extension point="org.eclipse.mylyn.tasks.ui.presentations">
- <presentation
- class="org.eclipse.mylyn.internal.tasks.ui.CategorizedPresentation"
- icon="icons/etool16/category.gif"
- id="org.eclipse.mylyn.tasks.ui.categorized"
- name="Categorized"
- primary="true"/>
- <presentation
- class="org.eclipse.mylyn.internal.tasks.ui.ScheduledPresentation"
- icon="icons/etool16/calendar.gif"
- id="org.eclipse.mylyn.tasks.ui.scheduled"
- name="Scheduled"
- primary="true"/>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <command
- categoryId="org.eclipse.ui.category.navigate"
- defaultHandler="org.eclipse.mylyn.internal.tasks.ui.commands.GoToUnreadTaskHandler$GoToPreviousUnreadTaskHandler"
- id="org.eclipse.mylyn.tasks.ui.command.goToPreviousUnread"
- name="Go To Previous Unread Task">
- </command>
- <command
- categoryId="org.eclipse.ui.category.navigate"
- defaultHandler="org.eclipse.mylyn.internal.tasks.ui.commands.GoToUnreadTaskHandler$GoToNextUnreadTaskHandler"
- id="org.eclipse.mylyn.tasks.ui.command.goToNextUnread"
- name="Go To Next Unread Task">
- </command>
- <command
- categoryId="org.eclipse.mylyn.tasks.ui.commands"
- defaultHandler="org.eclipse.mylyn.internal.tasks.ui.commands.TaskListToolTipHandler"
- id="org.eclipse.mylyn.tasks.ui.command.showToolTip"
- name="Show Tooltip Description">
- </command>
- <command
- categoryId="org.eclipse.mylyn.tasks.ui.commands"
- defaultHandler="org.eclipse.mylyn.internal.tasks.ui.commands.MarkTaskHandler$MarkTaskReadHandler"
- id="org.eclipse.mylyn.tasks.ui.command.markTaskRead"
- name="Mark Task Read">
- </command>
- <command
- categoryId="org.eclipse.mylyn.tasks.ui.commands"
- defaultHandler="org.eclipse.mylyn.internal.tasks.ui.commands.MarkTaskHandler$MarkTaskUnreadHandler"
- id="org.eclipse.mylyn.tasks.ui.command.markTaskUnread"
- name="Mark Task Unread">
- </command>
- <command
- categoryId="org.eclipse.mylyn.tasks.ui.commands"
- defaultHandler="org.eclipse.mylyn.internal.tasks.ui.commands.MarkTaskHandler$MarkTaskReadGoToNextUnreadTaskHandler"
- id="org.eclipse.mylyn.tasks.ui.command.markTaskReadGoToNextUnread"
- name="Mark Task Read and Go To Next Unread Task">
- </command>
- <command
- categoryId="org.eclipse.mylyn.tasks.ui.commands"
- defaultHandler="org.eclipse.mylyn.internal.tasks.ui.commands.MarkTaskHandler$MarkTaskReadGoToPreviousUnreadTaskHandler"
- id="org.eclipse.mylyn.tasks.ui.command.markTaskReadGoToPreviousUnread"
- name="Mark Task Read and Go To Previous Unread Task">
- </command>
- <command
- categoryId="org.eclipse.mylyn.tasks.ui.commands"
- id="org.eclipse.mylyn.tasks.ui.command.markTaskComplete"
- name="Mark Task Complete">
- </command>
- <command
- categoryId="org.eclipse.mylyn.tasks.ui.commands"
- id="org.eclipse.mylyn.tasks.ui.command.markTaskIncomplete"
- name="Mark Task Incomplete">
- </command>
- <command
- categoryId="org.eclipse.mylyn.tasks.ui.commands"
- id="org.eclipse.mylyn.tasks.ui.command.task.clearOutgoing"
- name="Clear Outgoing Changes">
- </command>
- <command
- categoryId="org.eclipse.mylyn.tasks.ui.commands"
- defaultHandler="org.eclipse.mylyn.internal.tasks.ui.commands.NewSubTaskHandler"
- id="org.eclipse.mylyn.tasks.ui.command.new.subtask"
- name="New Subtask">
- </command>
- <command
- categoryId="org.eclipse.mylyn.tasks.ui.commands"
- defaultHandler="org.eclipse.mylyn.internal.tasks.ui.commands.NewLocalTaskHandler"
- id="org.eclipse.mylyn.tasks.ui.command.new.local.task"
- name="New Local Task">
- </command>
-
- <category
- id="org.eclipse.mylyn.tasks.ui.commands"
- name="Task">
- </category>
- <command
- categoryId="org.eclipse.mylyn.tasks.ui.commands"
- defaultHandler="org.eclipse.mylyn.internal.tasks.ui.commands.OpenSelectedTaskHandler"
- id="org.eclipse.mylyn.tasks.ui.command.openSelectedTask"
- name="Open Selected Task">
- </command>
- <command
- categoryId="org.eclipse.mylyn.tasks.ui.category.editor"
- id="org.eclipse.mylyn.tasks.ui.command.attachment.openInBrowser"
- name="Open Attachment in Browser">
- </command>
- <category
- id="org.eclipse.mylyn.tasks.ui.category.editor"
- name="Task Editor">
- </category>
- <command
- categoryId="org.eclipse.mylyn.tasks.ui.category.editor"
- id="org.eclipse.mylyn.tasks.ui.command.attachment.openInDefaultEditor"
- name="Open Attachment in Default Editor">
- </command>
- </extension>
- <extension
- point="org.eclipse.ui.bindings">
- <key
- commandId="org.eclipse.mylyn.tasks.ui.command.goToPreviousUnread"
- contextId="org.eclipse.mylyn.tasks.ui.views.tasks"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="M3+ARROW_UP">
- </key>
- <key
- commandId="org.eclipse.mylyn.tasks.ui.command.goToNextUnread"
- contextId="org.eclipse.mylyn.tasks.ui.views.tasks"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="M3+ARROW_DOWN">
- </key>
- <key
- commandId="org.eclipse.mylyn.tasks.ui.command.showToolTip"
- contextId="org.eclipse.mylyn.tasks.ui.views.tasks"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="F4">
- </key>
- <key
- commandId="org.eclipse.mylyn.tasks.ui.command.markTaskRead"
- contextId="org.eclipse.mylyn.tasks.ui.views.tasks"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="M2+M3+R">
- </key>
- <key
- commandId="org.eclipse.mylyn.tasks.ui.command.markTaskUnread"
- contextId="org.eclipse.mylyn.tasks.ui.views.tasks"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="M2+M3+U">
- </key>
- <key
- commandId="org.eclipse.mylyn.tasks.ui.command.markTaskReadGoToNextUnread"
- contextId="org.eclipse.mylyn.tasks.ui.views.tasks"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="M2+M3+ARROW_DOWN">
- </key>
- <key
- commandId="org.eclipse.mylyn.tasks.ui.command.markTaskReadGoToPreviousUnread"
- contextId="org.eclipse.mylyn.tasks.ui.views.tasks"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="M2+M3+ARROW_UP">
- </key>
- <key
- commandId="org.eclipse.mylyn.tasks.ui.command.new.subtask"
- contextId="org.eclipse.mylyn.tasks.ui.views.tasks"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="M2+INSERT">
- </key>
- <key
- commandId="org.eclipse.mylyn.tasks.ui.command.new.local.task"
- contextId="org.eclipse.mylyn.tasks.ui.views.tasks"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="INSERT">
- </key>
- <key
- commandId="org.eclipse.mylyn.tasks.ui.command.openSelectedTask"
- contextId="org.eclipse.mylyn.tasks.ui.views.tasks"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="M1+ENTER">
- </key>
- </extension>
- <extension
- point="org.eclipse.ui.contexts">
- <context
- id="org.eclipse.mylyn.tasks.ui.views.tasks"
- name="In Tasks View"
- parentId="org.eclipse.ui.contexts.window">
- </context>
- </extension>
-
-
- <extension point="org.eclipse.ui.navigator.navigatorContent">
- <commonFilter
- id="org.eclipse.mylyn.tasks.ui.navigator.filters.tasks"
- name="Task List Elements (Recommended)"
- description="Hides Task List Elements from Common Navigators"
- activeByDefault="true">
- <filterExpression>
- <instanceof
- value="org.eclipse.mylyn.internal.tasks.core.AbstractTaskContainer" />
- </filterExpression>
- </commonFilter>
- </extension>
- <extension point="org.eclipse.ui.navigator.viewer">
- <viewerContentBinding
- viewerId="org.eclipse.ui.navigator.ProjectExplorer">
- <includes>
- <contentExtension
- pattern="org.eclipse.mylyn.tasks.ui.navigator.filters.tasks" />
- </includes>
- </viewerContentBinding>
- </extension>
-
-
- <extension
- point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.mylyn.internal.tasks.ui.commands.OpenTaskListElementPropertiesHandler"
- commandId="org.eclipse.ui.file.properties">
- <activeWhen>
- <with variable="activeContexts">
- <iterate operator="or">
- <equals value="org.eclipse.mylyn.tasks.ui.views.tasks"/>
- </iterate>
- </with>
- </activeWhen>
- <enabledWhen>
- <and>
- <count
- value="1">
- </count>
- <iterate>
- <or>
- <instanceof
- value="org.eclipse.mylyn.internal.tasks.core.RepositoryQuery">
- </instanceof>
- <instanceof
- value="org.eclipse.mylyn.internal.tasks.core.TaskCategory">
- </instanceof>
- </or>
- </iterate>
- </and>
- </enabledWhen>
- </handler>
- <handler
- class="org.eclipse.mylyn.internal.tasks.ui.commands.OpenTaskAttachmentInBrowserHandler"
- commandId="org.eclipse.mylyn.tasks.ui.command.attachment.openInBrowser">
- </handler>
- <handler
- class="org.eclipse.mylyn.internal.tasks.ui.commands.OpenTaskAttachmentInDefaultEditorHandler"
- commandId="org.eclipse.mylyn.tasks.ui.command.attachment.openInDefaultEditor">
- </handler>
- <handler
- class="org.eclipse.mylyn.internal.tasks.ui.commands.MarkTaskHandler$MarkTaskCompleteHandler"
- commandId="org.eclipse.mylyn.tasks.ui.command.markTaskComplete">
- <enabledWhen>
- <iterate
- operator="or">
- <and>
- <instanceof
- value="org.eclipse.mylyn.internal.tasks.core.AbstractTask">
- </instanceof>
- <test
- property="org.eclipse.mylyn.task.hasLocalCompletionState"
- value="true">
- </test>
- <test
- property="org.eclipse.mylyn.task.isCompleted"
- value="false">
- </test>
- </and>
- </iterate>
- </enabledWhen>
- </handler>
- <handler
- class="org.eclipse.mylyn.internal.tasks.ui.commands.MarkTaskHandler$MarkTaskIncompleteHandler"
- commandId="org.eclipse.mylyn.tasks.ui.command.markTaskIncomplete">
- <enabledWhen>
- <iterate
- operator="or">
- <and>
- <instanceof
- value="org.eclipse.mylyn.internal.tasks.core.AbstractTask">
- </instanceof>
- <test
- property="org.eclipse.mylyn.task.hasLocalCompletionState"
- value="true">
- </test>
- <test
- property="org.eclipse.mylyn.task.isCompleted"
- value="true">
- </test>
- </and>
- </iterate>
- </enabledWhen>
- </handler>
- </extension>
- <extension
- point="org.eclipse.ui.menus">
- <menuContribution
- locationURI="popup:org.eclipse.mylyn.tasks.ui.views.tasks?after=properties">
- <command
- commandId="org.eclipse.ui.file.properties"
- style="push">
- <visibleWhen
- checkEnabled="true">
- </visibleWhen>
- </command>
- </menuContribution>
- <menuContribution
- locationURI="popup:org.eclipse.mylyn.tasks.ui.editor.menu.attachments">
- <separator
- name="group.open"
- visible="false">
- </separator>
- <command
- commandId="org.eclipse.mylyn.tasks.ui.command.attachment.openInBrowser"
- label="Open With Browser"
- mnemonic="O"
- style="push">
- </command>
- <menu
- label="Open With"
- mnemonic="h">
- <command
- commandId="org.eclipse.mylyn.tasks.ui.command.attachment.openInDefaultEditor"
- label="Default Editor"
- mnemonic="D"
- style="push">
- </command>
- </menu>
- <separator
- name="group.save">
- </separator>
- <separator
- name="additions"
- visible="false">
- </separator>
- </menuContribution>
- <menuContribution
- locationURI="popup:org.eclipse.ui.popup.any?before=navigate">
- <menu
- id="org.eclipse.mylyn.tasks.ui.menu.task.mark"
- label="&amp;Mark as">
- <visibleWhen
- checkEnabled="false">
- <iterate>
- <or>
- <instanceof
- value="org.eclipse.mylyn.internal.tasks.core.AbstractTask">
- </instanceof>
- </or>
- </iterate>
- </visibleWhen>
- <separator
- name="group.taskStatus"
- visible="true">
- </separator>
- <separator
- name="group.synchronizationStatus"
- visible="true">
- </separator>
- <command
- commandId="org.eclipse.mylyn.tasks.ui.command.markTaskRead"
- label="Read"
- mnemonic="R"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <iterate>
- <not>
- <instanceof
- value="org.eclipse.mylyn.internal.tasks.core.LocalTask">
- </instanceof>
- </not>
- </iterate>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.mylyn.tasks.ui.command.markTaskUnread"
- label="Unread"
- mnemonic="U"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <iterate>
- <not>
- <instanceof
- value="org.eclipse.mylyn.internal.tasks.core.LocalTask">
- </instanceof>
- </not>
- </iterate>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.mylyn.tasks.ui.command.task.clearOutgoing"
- label="Clear Outgoing"
- mnemonic="C"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <iterate>
- <not>
- <instanceof
- value="org.eclipse.mylyn.internal.tasks.core.LocalTask">
- </instanceof>
- </not>
- </iterate>
- </visibleWhen>
- </command>
- <separator
- name="additions">
- </separator>
- </menu>
- </menuContribution>
- <menuContribution
- locationURI="popup:org.eclipse.mylyn.tasks.ui.menu.task.mark?after=group.taskStatus">
- <command
- commandId="org.eclipse.mylyn.tasks.ui.command.markTaskComplete"
- icon="icons/etool16/task-complete.gif"
- label="Complete"
- mnemonic="C"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <iterate
- operator="or">
- <and>
- <instanceof
- value="org.eclipse.mylyn.internal.tasks.core.AbstractTask">
- </instanceof>
- <test
- property="org.eclipse.mylyn.task.hasLocalCompletionState"
- value="true">
- </test>
- </and>
- </iterate>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.mylyn.tasks.ui.command.markTaskIncomplete"
- icon="icons/etool16/task-incomplete.gif"
- label="Incomplete"
- mnemonic="I"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <iterate
- operator="or">
- <and>
- <instanceof
- value="org.eclipse.mylyn.internal.tasks.core.AbstractTask">
- </instanceof>
- <test
- property="org.eclipse.mylyn.task.hasLocalCompletionState"
- value="true">
- </test>
- </and>
- </iterate>
- </visibleWhen>
- </command>
- </menuContribution>
- <menuContribution
- locationURI="menu:goTo">
- <separator
- name="group.taskList"
- visible="true">
- </separator>
- <command
- commandId="org.eclipse.mylyn.tasks.ui.command.goToPreviousUnread"
- label="Previous Unread Task"
- mnemonic="P"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="activeContexts">
- <iterate
- operator="or">
- <equals
- value="org.eclipse.mylyn.tasks.ui.views.tasks">
- </equals>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.mylyn.tasks.ui.command.goToNextUnread"
- label="Next Unread Task"
- mnemonic="N"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="activeContexts">
- <iterate
- operator="or">
- <equals
- value="org.eclipse.mylyn.tasks.ui.views.tasks">
- </equals>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- </menuContribution>
- </extension>
- <extension
- point="org.eclipse.core.expressions.propertyTesters">
- <propertyTester
- class="org.eclipse.mylyn.internal.tasks.ui.util.TaskPropertyTester"
- id="org.eclipse.mylyn.tasks.ui.propertyTester.task"
- namespace="org.eclipse.mylyn.task"
- properties="canGetAttachment,canPostAttachment,connectorKind,hasLocalContext,hasLocalCompletionState,hasRepositoryContext,isCompleted,isLocal,"
- type="org.eclipse.mylyn.tasks.core.ITask">
- </propertyTester>
- </extension>
-
-</plugin>
diff --git a/org.eclipse.mylyn.tasks.ui/schema/actions.exsd b/org.eclipse.mylyn.tasks.ui/schema/actions.exsd
deleted file mode 100644
index 08a90e4ea..000000000
--- a/org.eclipse.mylyn.tasks.ui/schema/actions.exsd
+++ /dev/null
@@ -1,94 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.mylyn.tasks.ui" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.eclipse.mylyn.tasks.ui" id="providers" name="Task UI Providers"/>
- </appinfo>
- <documentation>
- Currently only a work-around for creating a dynamic popupo menu.
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appinfo>
- <meta.element internal="true" />
- </appinfo>
- </annotation>
- <complexType>
- <sequence>
- <element ref="dynamicPopupMenu" minOccurs="0" 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="dynamicPopupMenu">
- <complexType>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn=":org.eclipse.mylyn.internal.tasks.ui.IDynamicSubMenuContributor"/>
- </appinfo>
- </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>
- <attribute name="menuPath" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
-
-
-
-
-
-</schema>
diff --git a/org.eclipse.mylyn.tasks.ui/schema/duplicateDetectors.exsd b/org.eclipse.mylyn.tasks.ui/schema/duplicateDetectors.exsd
deleted file mode 100644
index 61acc182e..000000000
--- a/org.eclipse.mylyn.tasks.ui/schema/duplicateDetectors.exsd
+++ /dev/null
@@ -1,119 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.mylyn.tasks.ui">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.mylyn.tasks.ui" id="duplicateDetectors" name="duplicateDetectors"/>
- </appInfo>
- <documentation>
- [Enter description of this extension point.]
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="detector"/>
- </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="detector">
- <complexType>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.mylyn.tasks.ui.AbstractDuplicateDetector:"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="kind" type="string">
- <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>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
-</schema>
diff --git a/org.eclipse.mylyn.tasks.ui/schema/editors.exsd b/org.eclipse.mylyn.tasks.ui/schema/editors.exsd
deleted file mode 100644
index 7fe24c9e7..000000000
--- a/org.eclipse.mylyn.tasks.ui/schema/editors.exsd
+++ /dev/null
@@ -1,149 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.mylyn.tasks.ui" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.mylyn.tasks.ui" id="editors" name="Task Editors"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="editorFactory" minOccurs="0" maxOccurs="unbounded"/>
- <element ref="hyperlinkDetector" minOccurs="0" maxOccurs="unbounded"/>
- <element ref="pageFactory" minOccurs="0" 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="editorFactory">
- <complexType>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorFactory:"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="hyperlinkDetector">
- <complexType>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.jface.text.hyperlink.IHyperlinkDetector"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="pageFactory">
- <complexType>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPageFactory:"/>
- </appInfo>
- </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.tasks.ui/schema/presentations.exsd b/org.eclipse.mylyn.tasks.ui/schema/presentations.exsd
deleted file mode 100644
index 22ebe0860..000000000
--- a/org.eclipse.mylyn.tasks.ui/schema/presentations.exsd
+++ /dev/null
@@ -1,133 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.mylyn.tasks.ui" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.eclipse.mylyn.tasks.ui" id="presentations" name="presentations"/>
- </appinfo>
- <documentation>
- [Enter description of this extension point.]
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appinfo>
- <meta.element internal="true" />
- </appinfo>
- </annotation>
- <complexType>
- <sequence minOccurs="1" maxOccurs="unbounded">
- <element ref="presentation"/>
- </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="presentation">
- <complexType>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn="org.eclipse.mylyn.internal.tasks.ui.views.AbstractTaskListPresentation:"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="icon" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute kind="resource"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="primary" type="boolean">
- <annotation>
- <documentation>
- True for presentations that are intended to be primary and required for typical usage, false for additional presentations that are secondary. Reflected in the UI, e.g. by ordering secondary presentations below primary ones.
- </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.tasks.ui/schema/projectLinkProviders.exsd b/org.eclipse.mylyn.tasks.ui/schema/projectLinkProviders.exsd
deleted file mode 100644
index 1b5f7a13a..000000000
--- a/org.eclipse.mylyn.tasks.ui/schema/projectLinkProviders.exsd
+++ /dev/null
@@ -1,126 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.mylyn.tasks.ui">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.mylyn.tasks.ui" id="projectLinkProviders" name="Task Repository Link Provider"/>
- </appInfo>
- <documentation>
- Providers responsible for linking Workspace resources/projects to the Task Repositories.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="linkProvider"/>
- </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="linkProvider">
- <complexType>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.mylyn.tasks.ui.AbstractTaskRepositoryLinkProvider"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="order" 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>
- See org.eclipse.mylyn.tasks.ui.TasksUiPlugin.getRepositoryForResource(IResource resource, boolean silent)
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- [Enter information about supplied implementation of this extension point.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
-</schema>
diff --git a/org.eclipse.mylyn.tasks.ui/schema/repositories.exsd b/org.eclipse.mylyn.tasks.ui/schema/repositories.exsd
deleted file mode 100644
index b44928ea3..000000000
--- a/org.eclipse.mylyn.tasks.ui/schema/repositories.exsd
+++ /dev/null
@@ -1,244 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.mylyn.tasks.ui" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.eclipse.mylyn.tasks.ui" id="repositories" name="Repositories"/>
- </appinfo>
- <documentation>
- [Enter description of this extension point.]
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appinfo>
- <meta.element />
- </appinfo>
- <documentation>
- (no description available)
- </documentation>
- </annotation>
- <complexType>
- <sequence>
- <element ref="connectorCore"/>
- <element ref="connectorUi" minOccurs="0" maxOccurs="1"/>
- <element ref="taskListFactory" minOccurs="0" maxOccurs="1"/>
- <element ref="taskListMigrator" minOccurs="0" maxOccurs="1"/>
- </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="taskListFactory">
- <annotation>
- <appinfo>
- <meta.element labelAttribute="name" deprecated="true"/>
- </appinfo>
- <documentation>
- (no description available)
- </documentation>
- </annotation>
- <complexType>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn="org.eclipse.mylyn.tasks.core.AbstractTaskListFactory:"/>
- </appinfo>
- </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="taskListMigrator">
- <annotation>
- <appinfo>
- <meta.element labelAttribute="name"/>
- </appinfo>
- <documentation>
- (no description available)
- </documentation>
- </annotation>
- <complexType>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn="org.eclipse.mylyn.tasks.core.AbstractTaskListMigrator:"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="connectorCore">
- <annotation>
- <documentation>
- (no description available)
- </documentation>
- </annotation>
- <complexType>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn="org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="connectorUi">
- <annotation>
- <documentation>
- (no description available)
- </documentation>
- </annotation>
- <complexType>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- (no description available)
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn="org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- (no description available)
- </documentation>
- </annotation>
- </attribute>
- <attribute name="brandingIcon" type="string">
- <annotation>
- <documentation>
- (no description available)
- </documentation>
- <appinfo>
- <meta.attribute kind="resource"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- (no description available)
- </documentation>
- </annotation>
- </attribute>
- <attribute name="overlayIcon" type="string">
- <annotation>
- <documentation>
- (no description available)
- </documentation>
- <appinfo>
- <meta.attribute kind="resource"/>
- </appinfo>
- </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.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/AbstractTaskListFilter.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/AbstractTaskListFilter.java
deleted file mode 100644
index 2f060e28e..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/AbstractTaskListFilter.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.ui;
-
-import java.util.Collection;
-
-import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITaskContainer;
-import org.eclipse.mylyn.tasks.core.ITask.SynchronizationState;
-
-/**
- * Custom filters are used so that the "Find:" filter can 'see through' any filters that may have been applied.
- *
- * @author Mik Kersten
- */
-//API 3.0 duplicate implementation in hasDescendantIncoming/hasIncompleteDescendant: consider replacing this by a visitor
-public abstract class AbstractTaskListFilter {
-
- public abstract boolean select(Object parent, Object element);
-
- /**
- * NOTE: performance implication of looking down children
- *
- * TODO: Move to an internal utility class
- */
- public static boolean hasDescendantIncoming(ITaskContainer container) {
- return hasDescendantIncoming(container, ITasksCoreConstants.MAX_SUBTASK_DEPTH);
- }
-
- public static boolean hasIncompleteDescendant(ITaskContainer container) {
- return hasIncompleteDescendant(container, ITasksCoreConstants.MAX_SUBTASK_DEPTH);
- }
-
- private static boolean hasDescendantIncoming(ITaskContainer container, int depth) {
- Collection<ITask> children = container.getChildren();
- if (children == null || depth <= 0) {
- return false;
- }
-
- for (ITask task : children) {
- if (task != null) {
- ITask containedRepositoryTask = task;
- if (containedRepositoryTask.getSynchronizationState() == SynchronizationState.INCOMING) {
- return true;
- } else if (TasksUiPlugin.getDefault().groupSubtasks(container) && task instanceof ITaskContainer
- && hasDescendantIncoming((ITaskContainer) task, depth - 1)) {
- return true;
- }
- }
- }
- return false;
- }
-
- private static boolean hasIncompleteDescendant(ITaskContainer container, int depth) {
- Collection<ITask> children = container.getChildren();
- if (children == null || depth <= 0) {
- return false;
- }
-
- for (ITask task : children) {
- if (task != null) {
- ITask containedRepositoryTask = task;
- if (!containedRepositoryTask.isCompleted()) {
- return true;
- } else if (task instanceof ITaskContainer && hasIncompleteDescendant((ITaskContainer) task, depth - 1)) {
- return true;
- }
- }
- }
- return false;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ActivityExternalizationParticipant.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ActivityExternalizationParticipant.java
deleted file mode 100644
index d9c0ce6f0..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ActivityExternalizationParticipant.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.mylyn.internal.context.core.ContextCorePlugin;
-import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
-import org.eclipse.mylyn.internal.tasks.core.externalization.AbstractExternalizationParticipant;
-import org.eclipse.mylyn.internal.tasks.core.externalization.IExternalizationContext;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITaskActivityListener;
-
-/**
- * @author Rob Elves
- */
-public class ActivityExternalizationParticipant extends AbstractExternalizationParticipant implements
- ITaskActivityListener {
-
- private boolean isDirty = false;
-
- @SuppressWarnings("restriction")
- @Override
- public void execute(IExternalizationContext context, IProgressMonitor monitor) throws CoreException {
- Assert.isNotNull(context);
- switch (context.getKind()) {
- case SAVE:
- if (ContextCorePlugin.getDefault() != null && ContextCorePlugin.getContextManager() != null) {
- ContextCorePlugin.getContextManager().saveActivityMetaContext();
- setDirty(false);
- }
- break;
- case LOAD:
- ContextCorePlugin.getContextManager().loadActivityMetaContext();
- break;
- case SNAPSHOT:
- break;
- }
- }
-
- @Override
- public String getDescription() {
- return "Activity Context";
- }
-
- @Override
- public ISchedulingRule getSchedulingRule() {
- return ITasksCoreConstants.ACTIVITY_SCHEDULING_RULE;
- }
-
- @Override
- public boolean isDirty() {
- synchronized (this) {
- return isDirty;
- }
- }
-
- public void setDirty(boolean dirty) {
- synchronized (this) {
- isDirty = dirty;
- }
- }
-
- @Override
- public String getFileName() {
- // ignore
- return null;
- }
-
- @Override
- public void load(String rootPath, IProgressMonitor monitor) throws CoreException {
- // ignore
-
- }
-
- @Override
- public void save(String rootPath, IProgressMonitor monitor) throws CoreException {
- ContextCorePlugin.getContextManager().saveActivityMetaContext();
- setDirty(false);
- }
-
- public void activityReset() {
- // ignore
-
- }
-
- public void preTaskActivated(ITask task) {
- // ignore
-
- }
-
- public void preTaskDeactivated(ITask task) {
- // ignore
-
- }
-
- public void taskActivated(ITask task) {
- // ignore
-
- }
-
- public void taskDeactivated(ITask task) {
- // ignore
-
- }
-
- public void elapsedTimeUpdated(ITask task, long newElapsedTime) {
- setDirty(true);
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/AddExistingTaskJob.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/AddExistingTaskJob.java
deleted file mode 100644
index c11a68768..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/AddExistingTaskJob.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.ui;
-
-import java.text.MessageFormat;
-
-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.jobs.Job;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTaskCategory;
-import org.eclipse.mylyn.internal.tasks.core.TaskActivityUtil;
-import org.eclipse.mylyn.internal.tasks.core.TaskCategory;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Retrieves an existing repository task and adds it to the tasklist
- *
- * @author Willian Mitsuda
- */
-public class AddExistingTaskJob extends Job {
-
- /**
- * Task repository whose task will be added
- */
- private final TaskRepository repository;
-
- /**
- * Identifies a existing task on the repository
- */
- private final String taskId;
-
- /**
- * Optional; informs the task container the task initialy belongs to; if null, it will be added to the current
- * selected task's category in task list
- */
- private final AbstractTaskCategory taskContainer;
-
- public AddExistingTaskJob(TaskRepository repository, String taskId) {
- this(repository, taskId, null);
- }
-
- public AddExistingTaskJob(TaskRepository repository, String taskId, AbstractTaskCategory taskContainer) {
- super(MessageFormat.format("Adding task: \"{0}\"...", taskId));
- this.repository = repository;
- this.taskId = taskId;
- this.taskContainer = taskContainer;
- }
-
- @Override
- public IStatus run(IProgressMonitor monitor) {
- try {
- final AbstractTask newTask = (AbstractTask) TasksUiInternal.createTask(repository, taskId, monitor);
- if (newTask != null) {
- TasksUiPlugin.getTaskActivityManager().setScheduledFor(newTask, TaskActivityUtil.getCurrentWeek());
-
- TasksUiInternal.refreshAndOpenTaskListElement(newTask);
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
-
- public void run() {
- AbstractTaskCategory category = taskContainer;
- TaskListView taskListView = TaskListView.getFromActivePerspective();
- if (category == null) {
- Object selectedObject = ((IStructuredSelection) taskListView.getViewer().getSelection()).getFirstElement();
- if (selectedObject instanceof TaskCategory) {
- category = (TaskCategory) selectedObject;
- }
- }
- TasksUiInternal.getTaskList().addTask(newTask, category);
- taskListView.getViewer().setSelection(new StructuredSelection(newTask));
- }
- });
- } else {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
-
- public void run() {
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- if (window != null) {
- MessageDialog.openWarning(window.getShell(), "Add Existing Task Failed",
- MessageFormat.format("Unable to retrieve task \"{0}\" from repository.", taskId));
- }
- }
-
- });
- }
- } catch (final CoreException e) {
- TasksUiInternal.displayStatus("Unable to open task", e.getStatus());
- } finally {
- monitor.done();
- }
- return Status.OK_STATUS;
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/AttachmentUtil.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/AttachmentUtil.java
deleted file mode 100644
index 6f32c5f6c..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/AttachmentUtil.java
+++ /dev/null
@@ -1,392 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui;
-
-import java.io.File;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-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.OperationCanceledException;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.context.core.ContextCore;
-import org.eclipse.mylyn.internal.context.core.ContextCorePlugin;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.TaskAttachment;
-import org.eclipse.mylyn.internal.tasks.core.TaskDataStorageManager;
-import org.eclipse.mylyn.internal.tasks.core.data.FileTaskAttachmentSource;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractAttachmentHandler;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractLegacyRepositoryConnector;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.FileAttachment;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryAttachment;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-import org.eclipse.mylyn.internal.tasks.core.sync.SubmitTaskAttachmentJob;
-import org.eclipse.mylyn.internal.tasks.ui.actions.DownloadAttachmentJob;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITaskAttachment;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.ITask.SynchronizationState;
-import org.eclipse.mylyn.tasks.core.data.AbstractTaskAttachmentHandler;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.mylyn.tasks.core.data.TaskData;
-import org.eclipse.mylyn.tasks.core.sync.SubmitJob;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Steffen Pingel
- */
-public class AttachmentUtil {
-
- private static final String CONTEXT_DESCRIPTION = "mylyn/context/zip";
-
- private static final String CONTEXT_DESCRIPTION_LEGACY = "mylar/context/zip";
-
- private static final String CONTEXT_FILENAME = "mylyn-context.zip";
-
- private static final String CONTEXT_CONTENT_TYPE = "application/octet-stream";
-
- private static final int BUFFER_SIZE = 1024;
-
- /**
- * Attaches the associated context to <code>task</code>.
- *
- * @return false, if operation is not supported by repository
- */
- @SuppressWarnings("restriction")
- @Deprecated
- public static boolean attachContext(AbstractAttachmentHandler attachmentHandler, TaskRepository repository,
- ITask task, String longComment, IProgressMonitor monitor) throws CoreException {
- ContextCorePlugin.getContextStore().saveContext(task.getHandleIdentifier());
- final File sourceContextFile = ContextCorePlugin.getContextStore()
- .getFileForContext(task.getHandleIdentifier());
-
- SynchronizationState previousState = task.getSynchronizationState();
-
- if (sourceContextFile != null && sourceContextFile.exists()) {
- try {
- ((AbstractTask) task).setSubmitting(true);
- ((AbstractTask) task).setSynchronizationState(SynchronizationState.OUTGOING);
- FileAttachment attachment = new FileAttachment(sourceContextFile);
- attachment.setDescription(CONTEXT_DESCRIPTION);
- attachment.setFilename(CONTEXT_FILENAME);
- attachmentHandler.uploadAttachment(repository, task, attachment, longComment, monitor);
- } catch (CoreException e) {
- // TODO: Calling method should be responsible for returning
- // state of task. Wizard will have different behaviour than
- // editor.
- ((AbstractTask) task).setSynchronizationState(previousState);
- throw e;
- } catch (OperationCanceledException e) {
- return true;
- }
- }
- return true;
- }
-
- public static boolean postContext(AbstractRepositoryConnector connector, TaskRepository repository, ITask task,
- String comment, TaskAttribute attribute, IProgressMonitor monitor) throws CoreException {
- AbstractTaskAttachmentHandler attachmentHandler = connector.getTaskAttachmentHandler();
- ContextCorePlugin.getContextStore().saveContext(task.getHandleIdentifier());
- File file = ContextCorePlugin.getContextStore().getFileForContext(task.getHandleIdentifier());
- if (attachmentHandler != null && file != null && file.exists()) {
- FileTaskAttachmentSource attachment = new FileTaskAttachmentSource(file);
- attachment.setDescription(CONTEXT_DESCRIPTION);
- attachment.setName(CONTEXT_FILENAME);
- attachmentHandler.postContent(repository, task, attachment, comment, attribute, monitor);
- return true;
- }
- return false;
- }
-
- /**
- * Implementors of this repositoryOperations must perform it locally without going to the server since it is used
- * for frequent repositoryOperations such as decoration.
- *
- * @return an empty set if no contexts
- */
- public static Set<RepositoryAttachment> getLegacyContextAttachments(TaskRepository repository, ITask task) {
- TaskDataStorageManager taskDataManager = TasksUiPlugin.getTaskDataStorageManager();
- Set<RepositoryAttachment> contextAttachments = new HashSet<RepositoryAttachment>();
- if (taskDataManager != null) {
- RepositoryTaskData newData = taskDataManager.getNewTaskData(task.getRepositoryUrl(), task.getTaskId());
- if (newData != null) {
- for (RepositoryAttachment attachment : newData.getAttachments()) {
- if (attachment.getDescription().equals(CONTEXT_DESCRIPTION)) {
- contextAttachments.add(attachment);
- } else if (attachment.getDescription().equals(CONTEXT_DESCRIPTION_LEGACY)) {
- contextAttachments.add(attachment);
- }
- }
- }
- }
- return contextAttachments;
- }
-
- public static List<ITaskAttachment> getContextAttachments(TaskRepository repository, ITask task) {
- List<ITaskAttachment> contextAttachments = new ArrayList<ITaskAttachment>();
- TaskData taskData;
- try {
- taskData = TasksUi.getTaskDataManager().getTaskData(task);
- } catch (CoreException e) {
- // ignore
- return contextAttachments;
- }
- if (taskData != null) {
- List<TaskAttribute> taskAttachments = taskData.getAttributeMapper().getAttributesByType(taskData,
- TaskAttribute.TYPE_ATTACHMENT);
- for (TaskAttribute attribute : taskAttachments) {
- TaskAttachment taskAttachment = new TaskAttachment(repository, task, attribute);
- taskData.getAttributeMapper().updateTaskAttachment(taskAttachment, attribute);
- if (isContext(taskAttachment)) {
- contextAttachments.add(taskAttachment);
- }
- }
- }
- return contextAttachments;
- }
-
- public static boolean hasContext(TaskRepository repository, ITask task) {
- if (repository == null || task == null) {
- return false;
- } else {
- Set<RepositoryAttachment> remoteContextAttachments = getLegacyContextAttachments(repository, task);
- return (remoteContextAttachments != null && remoteContextAttachments.size() > 0);
- }
- }
-
- public static boolean hasContextAttachment(ITask task) {
- Assert.isNotNull(task);
- TaskRepository repository = TasksUi.getRepositoryManager().getRepository(task.getConnectorKind(),
- task.getRepositoryUrl());
- AbstractRepositoryConnector connector = TasksUi.getRepositoryManager().getRepositoryConnector(
- repository.getConnectorKind());
- if (connector instanceof AbstractLegacyRepositoryConnector) {
- Set<RepositoryAttachment> remoteContextAttachments = getLegacyContextAttachments(repository, task);
- return (remoteContextAttachments != null && remoteContextAttachments.size() > 0);
- } else {
- List<ITaskAttachment> contextAttachments = getContextAttachments(repository, task);
- return contextAttachments.size() > 0;
- }
- }
-
- private static final String MESSAGE_ATTACHMENTS_NOT_SUPPORTED = "Attachments not supported by connector: ";
-
- private static final String TITLE_DIALOG = "Mylyn Information";
-
- public static boolean downloadContext(final ITask task, final ITaskAttachment attachment,
- final IRunnableContext context) {
- final AbstractRepositoryConnector connector = TasksUi.getRepositoryManager().getRepositoryConnector(
- task.getConnectorKind());
- final TaskRepository repository = TasksUi.getRepositoryManager().getRepository(attachment.getConnectorKind(),
- attachment.getRepositoryUrl());
- final String directory = TasksUiPlugin.getDefault().getDataDirectory();
- if (task.isActive()) {
- TasksUi.getTaskActivityManager().deactivateTask(task);
- }
- boolean result = false;
-
- if (connector instanceof AbstractRepositoryConnector) {
- if (connector.getTaskAttachmentHandler() != null) {
- result = AttachmentUtil.retrieveContext(connector.getTaskAttachmentHandler(), repository, task,
- attachment, directory, context);
- }
- }
-
- if (!result) {
- MessageDialog.openInformation(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
- TITLE_DIALOG, MESSAGE_ATTACHMENTS_NOT_SUPPORTED + connector.getLabel());
- } else {
- TasksUiInternal.getTaskList().notifyElementChanged(task);
- TasksUi.getTaskActivityManager().activateTask(task);
- }
- return true;
- }
-
- public static boolean uploadContext(final TaskRepository repository, final ITask task, final String comment,
- final IRunnableContext context) {
-
- final AbstractRepositoryConnector connector = TasksUi.getRepositoryManager().getRepositoryConnector(
- repository.getConnectorKind());
-
- ContextCorePlugin.getContextStore().saveContext(task.getHandleIdentifier());
- final File sourceContextFile = ContextCorePlugin.getContextStore()
- .getFileForContext(task.getHandleIdentifier());
-
- if (!sourceContextFile.exists()) {
- return false;
- }
-
- FileTaskAttachmentSource source = new FileTaskAttachmentSource(sourceContextFile);
- source.setDescription(CONTEXT_DESCRIPTION);
- source.setContentType(CONTEXT_CONTENT_TYPE);
- final SubmitJob submitJob = TasksUiInternal.getJobFactory().createSubmitTaskAttachmentJob(connector,
- repository, task, source, comment, null);
- try {
- context.run(true, true, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- if (((SubmitTaskAttachmentJob) submitJob).run(monitor) == Status.CANCEL_STATUS) {
- throw new InterruptedException();
- }
- }
- });
-
- } catch (InvocationTargetException e) {
- if (e.getCause() instanceof CoreException) {
- TasksUiInternal.displayStatus(TITLE_DIALOG, ((CoreException) e.getCause()).getStatus());
- } else {
- StatusHandler.fail(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Unexpected error while attaching context", e));
- }
- return false;
- } catch (InterruptedException ignored) {
- // canceled
- return false;
- }
- return true;
- }
-
- public static boolean hasLocalContext(ITask task) {
- Assert.isNotNull(task);
- return ContextCore.getContextManager().hasContext(task.getHandleIdentifier());
- }
-
- @SuppressWarnings("restriction")
- @Deprecated
- public static boolean isContext(RepositoryAttachment attachment) {
- return CONTEXT_DESCRIPTION.equals(attachment.getDescription())
- || CONTEXT_DESCRIPTION_LEGACY.equals(attachment.getDescription());
- }
-
- public static boolean isContext(ITaskAttachment attachment) {
- return CONTEXT_DESCRIPTION.equals(attachment.getDescription())
- || CONTEXT_DESCRIPTION_LEGACY.equals(attachment.getDescription());
- }
-
- /**
- * Retrieves a context stored in <code>attachment</code> from <code>task</code>.
- *
- * @return false, if operation is not supported by repository
- */
- public static boolean retrieveContext(AbstractTaskAttachmentHandler attachmentHandler, TaskRepository repository,
- ITask task, ITaskAttachment attachment, String destinationPath, IRunnableContext context) {
-
- File destinationContextFile = ContextCorePlugin.getContextStore().getFileForContext(task.getHandleIdentifier());
- // TODO: add functionality for not overwriting previous context
- if (destinationContextFile.exists()) {
- if (!destinationContextFile.delete()) {
- return false;
- }
- }
-
- final DownloadAttachmentJob downloadJob = new DownloadAttachmentJob(attachment, destinationContextFile);
-
- try {
- context.run(true, true, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- if ((downloadJob).run(monitor) == Status.CANCEL_STATUS) {
- throw new InterruptedException();
- }
- }
- });
-
- } catch (InvocationTargetException e) {
- if (e.getCause() instanceof CoreException) {
- TasksUiInternal.displayStatus(TITLE_DIALOG, ((CoreException) e.getCause()).getStatus());
- } else {
- StatusHandler.fail(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Unexpected error while retrieving context", e));
- }
- return false;
- } catch (InterruptedException ignored) {
- // canceled
- return false;
- }
-
- return true;
- }
-
-// public static boolean getContext(AbstractRepositoryConnector connector, TaskRepository repository, ITask task,
-// TaskAttribute attribute, IProgressMonitor monitor) throws CoreException {
-// AbstractTaskAttachmentHandler attachmentHandler = connector.getTaskAttachmentHandler();
-// File file = ContextCorePlugin.getContextStore().getFileForContext(task.getHandleIdentifier());
-// try {
-// FileOutputStream out = new FileOutputStream(file);
-// try {
-// InputStream in = attachmentHandler.getContent(repository, task, attribute, monitor);
-// try {
-// int len;
-// byte[] buffer = new byte[BUFFER_SIZE];
-// while ((len = in.read(buffer)) != -1) {
-// out.write(buffer, 0, len);
-// }
-// } finally {
-// in.close();
-// }
-// } finally {
-// out.close();
-// }
-// } catch (IOException e) {
-// throw new CoreException(new RepositoryStatus(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
-// RepositoryStatus.ERROR_INTERNAL, "Could not create context file", e));
-// }
-// return true;
-// }
-
- public static boolean canUploadAttachment(ITask task) {
- TaskRepository repository = TasksUi.getRepositoryManager().getRepository(task.getConnectorKind(),
- task.getRepositoryUrl());
- AbstractRepositoryConnector connector = TasksUi.getRepositoryManager().getRepositoryConnector(
- repository.getConnectorKind());
- if (connector instanceof AbstractLegacyRepositoryConnector) {
- AbstractAttachmentHandler attachmentHandler = ((AbstractLegacyRepositoryConnector) connector).getAttachmentHandler();
- if (attachmentHandler != null) {
- return attachmentHandler.canUploadAttachment(repository, task);
- }
- } else {
- AbstractTaskAttachmentHandler attachmentHandler = connector.getTaskAttachmentHandler();
- if (attachmentHandler != null) {
- return attachmentHandler.canPostContent(repository, task);
- }
- }
- return false;
- }
-
- public static boolean canDownloadAttachment(ITask task) {
- TaskRepository repository = TasksUi.getRepositoryManager().getRepository(task.getConnectorKind(),
- task.getRepositoryUrl());
- AbstractRepositoryConnector connector = TasksUi.getRepositoryManager().getRepositoryConnector(
- repository.getConnectorKind());
- if (connector instanceof AbstractLegacyRepositoryConnector) {
- AbstractAttachmentHandler attachmentHandler = ((AbstractLegacyRepositoryConnector) connector).getAttachmentHandler();
- if (attachmentHandler != null) {
- return attachmentHandler.canDownloadAttachment(repository, task);
- }
- } else {
- AbstractTaskAttachmentHandler attachmentHandler = connector.getTaskAttachmentHandler();
- if (attachmentHandler != null) {
- return attachmentHandler.canGetContent(repository, task);
- }
- }
- return false;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/CategorizedPresentation.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/CategorizedPresentation.java
deleted file mode 100644
index c5d34228e..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/CategorizedPresentation.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui;
-
-import org.eclipse.mylyn.internal.tasks.ui.views.AbstractTaskListContentProvider;
-import org.eclipse.mylyn.internal.tasks.ui.views.AbstractTaskListPresentation;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListContentProvider;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-
-/**
- * @author Mik Kersten
- */
-public class CategorizedPresentation extends AbstractTaskListPresentation {
-
- public static final String ID = "org.eclipse.mylyn.tasks.ui.categorized";
-
- public CategorizedPresentation() {
- super(ID);
- }
-
- @Override
- protected AbstractTaskListContentProvider createContentProvider(TaskListView taskListView) {
- return new TaskListContentProvider(taskListView);
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ComboSelectionDialog.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ComboSelectionDialog.java
deleted file mode 100644
index 39075b230..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ComboSelectionDialog.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.ui;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * General purpose dialog for selecting an item from a combo box.
- *
- * @author This was (essentially) copied from Eclipse's internal implementation by Wesley Coelho
- */
-public class ComboSelectionDialog extends Dialog {
-
- private String fSelection = null;
-
- private final String fShellTitle;
-
- private final String fLabelText;
-
- private final String[] fAllowedStrings;
-
- private final int fInitialSelectionIndex;
-
- private int fSelectedIndex = -1;
-
- public ComboSelectionDialog(Shell parentShell, String shellTitle, String labelText, String[] comboStrings,
- int initialSelectionIndex) {
- super(parentShell);
- fShellTitle = shellTitle;
- fLabelText = labelText;
- fAllowedStrings = comboStrings;
- fInitialSelectionIndex = initialSelectionIndex;
- }
-
- public String getSelectedString() {
- return fSelection;
- }
-
- /*
- * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
- */
- @Override
- protected Control createDialogArea(Composite parent) {
- getShell().setText(fShellTitle);
-
- Composite composite = (Composite) super.createDialogArea(parent);
- Composite innerComposite = new Composite(composite, SWT.NONE);
- innerComposite.setLayoutData(new GridData());
- GridLayout gl = new GridLayout();
- gl.numColumns = 2;
- innerComposite.setLayout(gl);
-
- Label label = new Label(innerComposite, SWT.NONE);
- label.setText(fLabelText);
- label.setLayoutData(new GridData());
-
- final Combo combo = new Combo(innerComposite, SWT.READ_ONLY);
- for (String allowedString : fAllowedStrings) {
- combo.add(allowedString);
- }
- combo.select(fInitialSelectionIndex);
- fSelection = combo.getItem(combo.getSelectionIndex());
- GridData gd = new GridData();
- gd.widthHint = convertWidthInCharsToPixels(getMaxStringLength());
- combo.setLayoutData(gd);
- combo.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- fSelection = combo.getItem(combo.getSelectionIndex());
- fSelectedIndex = combo.getSelectionIndex();
- }
- });
- applyDialogFont(composite);
- return composite;
- }
-
- /**
- * Returns the array index of the selected string or -1 if no string was selected.
- */
- public int getSelectedIndex() {
- return fSelectedIndex;
- }
-
- private int getMaxStringLength() {
- int max = 0;
- for (String allowedString : fAllowedStrings) {
- max = Math.max(max, allowedString.length());
- }
- return max;
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/IDynamicSubMenuContributor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/IDynamicSubMenuContributor.java
deleted file mode 100644
index 0906cd284..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/IDynamicSubMenuContributor.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.ui;
-
-import java.util.List;
-
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-
-/**
- * @author Mik Kersten
- */
-public interface IDynamicSubMenuContributor {
-
- public abstract MenuManager getSubMenuManager(List<IRepositoryElement> selectedElements);
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ITaskCommandIds.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ITaskCommandIds.java
deleted file mode 100644
index 82b9e9bf7..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ITaskCommandIds.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui;
-
-/**
- * @author Willian Mitsuda
- * @author Mik Kersten
- */
-public interface ITaskCommandIds {
-
- public static final String OPEN_TASK = "org.eclipse.mylyn.tasks.ui.command.openTask";
-
- public static final String OPEN_TASK_REMOTE = "org.eclipse.mylyn.tasks.ui.command.openRemoteTask";
-
- public static final String ACTIVATE_TASK = "org.eclipse.mylyn.tasks.ui.command.activateTask";
-
- public static final String DEACTIVATE_TASK = "org.eclipse.mylyn.tasks.ui.command.deactivateAllTasks";
-
- public static final String ADD_TASK_REPOSITORY = "org.eclipse.mylyn.tasks.ui.command.addTaskRepository";
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ITaskHighlighter.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ITaskHighlighter.java
deleted file mode 100644
index 930f4ded0..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ITaskHighlighter.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui;
-
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @author Mik Kersten
- */
-public interface ITaskHighlighter {
-
- public Color getHighlightColor(ITask task);
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ITaskListNotificationProvider.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ITaskListNotificationProvider.java
deleted file mode 100644
index 9b39eef64..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ITaskListNotificationProvider.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui;
-
-import java.util.Set;
-
-import org.eclipse.mylyn.internal.provisional.commons.ui.AbstractNotification;
-
-/**
- * @author Rob Elves
- */
-public interface ITaskListNotificationProvider {
-
- public Set<AbstractNotification> getNotifications();
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ITasksUiPreferenceConstants.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ITasksUiPreferenceConstants.java
deleted file mode 100644
index c2756740c..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ITasksUiPreferenceConstants.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui;
-
-/**
- * @author Mik Kersten
- */
-public interface ITasksUiPreferenceConstants {
-
- public static final String ACTIVATE_MULTIPLE = "org.eclipse.mylyn.tasks.ui.activation.multipe";
-
- public static final String ACTIVATE_WHEN_OPENED = "org.eclipse.mylyn.tasks.ui.activate.when.opened";
-
- public static final String SHOW_TRIM = "org.eclipse.mylyn.tasks.ui.show.trim";
-
- public static final String BACKUP_LAST = "org.eclipse.mylyn.tasks.ui.backup.last";
-
- public static final String BACKUP_MAXFILES = "org.eclipse.mylyn.tasks.ui.backup.maxfiles";
-
- public static final String BACKUP_SCHEDULE = "org.eclipse.mylyn.tasks.ui.backup.schedule";
-
- public static final String FILTER_ARCHIVE_MODE = "org.eclipse.mylyn.tasks.ui.filters.archive";
-
- public static final String FILTER_COMPLETE_MODE = "org.eclipse.mylyn.tasks.ui.filters.complete";
-
- public static final String FILTER_PRIORITY = "org.eclipse.mylyn.tasks.ui.filters.priority";
-
- public static final String GROUP_SUBTASKS = "org.eclipse.mylyn.tasks.ui.group.subtasks";
-
- public static final String OVERLAYS_INCOMING_TIGHT = "org.eclipse.mylyn.tasks.ui.overlays.incoming.tight";
-
- public static final String NOTIFICATIONS_ENABLED = "org.eclipse.mylyn.tasks.ui.notifications.enabled";
-
- public static final String WEEK_START_DAY = "org.eclipse.mylyn.tasks.ui.planning.week.start.day";
-
- public static final String PLANNING_ENDHOUR = "org.eclipse.mylyn.tasks.ui.planning.end.hour";
-
- public static final String EDITOR_TASKS_RICH = "org.eclipse.mylyn.tasks.ui.reporting.open.editor";
-
- public static final String REPOSITORY_SYNCH_SCHEDULE_ENABLED = "org.eclipse.mylyn.tasks.ui.repositories.synch.schedule";
-
- public static final String REPOSITORY_SYNCH_SCHEDULE_MILISECONDS = "org.eclipse.mylyn.tasks.ui.repositories.synch.schedule.miliseconds";
-
- public static final String TEMPLATES_DELETED = "org.eclipse.mylyn.tasks.ui.templates.deleted";
-
- public static final String TEMPLATES_DELETED_DELIM = "|";
-
- public static final String LOCAL_SUB_TASKS_ENABLED = "org.eclipse.mylyn.tasks.ui.subtasks.local";
-
- // NOTE: legacy name, do not change
- public static final String PREF_DATA_DIR = "org.eclipse.mylyn.data.dir";
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/LegacyChangeManager.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/LegacyChangeManager.java
deleted file mode 100644
index bd81f8bbc..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/LegacyChangeManager.java
+++ /dev/null
@@ -1,252 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractAttributeFactory;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractLegacyRepositoryConnector;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractTaskDataHandler;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskAttribute;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.TaskComment;
-import org.eclipse.mylyn.internal.tasks.ui.notifications.TaskListNotification;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITask.SynchronizationState;
-
-/**
- * @author Steffen Pingel
- */
-@Deprecated
-public class LegacyChangeManager {
-
- static class Change {
-
- final List<String> added;
-
- final String field;
-
- final List<String> removed = new ArrayList<String>();
-
- public Change(String field, List<String> newValues) {
- this.field = field;
- if (newValues != null) {
- this.added = new ArrayList<String>(newValues);
- } else {
- this.added = new ArrayList<String>();
- }
- }
- }
-
- private static final int MAX_CHANGED_ATTRIBUTES = 2;
-
- static String cleanValue(String value) {
- if (value == null) {
- return "";
- }
- String commentText = value.replaceAll("\\s", " ").trim();
- if (commentText.length() > 60) {
- commentText = commentText.substring(0, 55) + "...";
- }
- return commentText;
- }
-
- static String cleanValues(List<String> values) {
- StringBuilder sb = new StringBuilder();
- boolean first = true;
- for (String value : values) {
- if (!first) {
- sb.append(", ");
- }
- sb.append(cleanValue(value));
- first = false;
- }
- return sb.toString();
- }
-
- private static String getChangedAttributes(RepositoryTaskData newTaskData, RepositoryTaskData oldTaskData) {
- List<Change> changes = new ArrayList<Change>();
- for (RepositoryTaskAttribute newAttribute : newTaskData.getAttributes()) {
- if (ignoreAttribute(newTaskData, newAttribute)) {
- continue;
- }
-
- List<String> newValues = newAttribute.getValues();
- if (newValues != null) {
- RepositoryTaskAttribute oldAttribute = oldTaskData.getAttribute(newAttribute.getId());
- if (oldAttribute == null) {
- changes.add(getDiff(newTaskData, newAttribute, null, newValues));
- }
- if (oldAttribute != null) {
- List<String> oldValues = oldAttribute.getValues();
- if (!oldValues.equals(newValues)) {
- changes.add(getDiff(newTaskData, newAttribute, oldValues, newValues));
- }
- }
- }
- }
-
- for (RepositoryTaskAttribute oldAttribute : oldTaskData.getAttributes()) {
- if (ignoreAttribute(oldTaskData, oldAttribute)) {
- continue;
- }
-
- RepositoryTaskAttribute attribute = newTaskData.getAttribute(oldAttribute.getId());
- List<String> values = oldAttribute.getValues();
- if (attribute == null && values != null && !values.isEmpty()) {
- changes.add(getDiff(oldTaskData, oldAttribute, values, null));
- }
- }
-
- if (changes.isEmpty()) {
- return "";
- }
-
- String details = "";
- String sep = "";
- int n = 0;
- for (Change change : changes) {
- String removed = cleanValues(change.removed);
- String added = cleanValues(change.added);
- details += sep + " " + change.field + " " + removed;
- if (removed.length() > 30) {
- // details += "\n ";
- details += "\n ";
- }
- details += " -> " + added;
- sep = "\n";
-
- if (++n == MAX_CHANGED_ATTRIBUTES) {
- break;
- }
- }
- // if (!details.equals("")) {
- // return details;
- // return "Attributes Changed:\n" + details;
- // }
- return details;
- }
-
- private static String getChangedDescription(RepositoryTaskData newTaskData, RepositoryTaskData oldTaskData) {
- String descriptionText = "";
-
- if (newTaskData.getComments().size() > oldTaskData.getComments().size()) {
- List<TaskComment> taskComments = newTaskData.getComments();
- if (taskComments != null && taskComments.size() > 0) {
- TaskComment lastComment = taskComments.get(taskComments.size() - 1);
- if (lastComment != null) {
- // descriptionText += "Comment by " + lastComment.getAuthor() + ":\n ";
- descriptionText += lastComment.getAuthor() + ": ";
- descriptionText += cleanValue(lastComment.getText());
- }
- }
- }
-
- return descriptionText;
- }
-
- static Change getDiff(RepositoryTaskData taskData, RepositoryTaskAttribute attribute, List<String> oldValues,
- List<String> newValues) {
- // AbstractAttributeFactory factory = taskData.getAttributeFactory();
- // if (attribute.getId().equals(factory.mapCommonAttributeKey(RepositoryTaskAttribute.DATE_MODIFIED))
- // || attribute.getId().equals(factory.mapCommonAttributeKey(RepositoryTaskAttribute.DATE_CREATION))) {
- // if (newValues != null && newValues.size() > 0) {
- // for (int i = 0; i < newValues.size(); i++) {
- // newValues.set(i, factory.getDateForAttributeType(attribute.getId(), newValues.get(i)).toString());
- // }
- // }
- //
- // Change change = new Change(attribute.getName(), newValues);
- // if (oldValues != null) {
- // for (String value : oldValues) {
- // value = factory.getDateForAttributeType(attribute.getId(), value).toString();
- // if (change.added.contains(value)) {
- // change.added.remove(value);
- // } else {
- // change.removed.add(value);
- // }
- // }
- // }
- // return change;
- // }
-
- Change change = new Change(attribute.getName(), newValues);
- if (oldValues != null) {
- for (String value : oldValues) {
- if (change.added.contains(value)) {
- change.added.remove(value);
- } else {
- change.removed.add(value);
- }
- }
- }
- return change;
- }
-
- @SuppressWarnings("restriction")
- @Deprecated
- public static TaskListNotification getIncommingNotification(AbstractRepositoryConnector connector, ITask task) {
- TaskListNotification notification = new TaskListNotification(task);
- RepositoryTaskData newTaskData = TasksUiPlugin.getTaskDataStorageManager().getNewTaskData(
- task.getRepositoryUrl(), task.getTaskId());
- RepositoryTaskData oldTaskData = TasksUiPlugin.getTaskDataStorageManager().getOldTaskData(
- task.getRepositoryUrl(), task.getTaskId());
- try {
- if (task.getSynchronizationState().equals(SynchronizationState.INCOMING)
- && ((AbstractTask) task).getLastReadTimeStamp() == null) {
- notification.setDescription("New unread task ");
- } else if (newTaskData != null && oldTaskData != null) {
- StringBuilder description = new StringBuilder();
- String changedDescription = getChangedDescription(newTaskData, oldTaskData);
- String changedAttributes = getChangedAttributes(newTaskData, oldTaskData);
- if (!"".equals(changedDescription.trim())) {
- description.append(changedDescription);
- if (!"".equals(changedAttributes)) {
- description.append('\n');
- }
- }
- if (!"".equals(changedAttributes)) {
- description.append(changedAttributes);
- }
-
- notification.setDescription(description.toString());
-
- if (connector instanceof AbstractLegacyRepositoryConnector) {
- AbstractTaskDataHandler offlineHandler = ((AbstractLegacyRepositoryConnector) connector).getLegacyTaskDataHandler();
- if (offlineHandler != null && newTaskData.getLastModified() != null) {
- Date modified = newTaskData.getAttributeFactory().getDateForAttributeType(
- RepositoryTaskAttribute.DATE_MODIFIED, newTaskData.getLastModified());
- notification.setDate(modified);
- }
- }
- } else {
- notification.setDescription("Unread task");
- }
- } catch (Throwable t) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Could not format notification for: "
- + task, t));
- }
- return notification;
- }
-
- static boolean ignoreAttribute(RepositoryTaskData taskData, RepositoryTaskAttribute attribute) {
- AbstractAttributeFactory factory = taskData.getAttributeFactory();
- return (attribute.getId().equals(factory.mapCommonAttributeKey(RepositoryTaskAttribute.DATE_MODIFIED))
- || attribute.getId().equals(factory.mapCommonAttributeKey(RepositoryTaskAttribute.DATE_CREATION))
- || "delta_ts".equals(attribute.getId()) || "longdesclength".equals(attribute.getId()));
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/LocalRepositoryConnectorUi.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/LocalRepositoryConnectorUi.java
deleted file mode 100644
index 8f83bc73d..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/LocalRepositoryConnectorUi.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.mylyn.internal.tasks.core.LocalRepositoryConnector;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.NewLocalTaskWizard;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITaskMapping;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.wizards.ITaskRepositoryPage;
-
-/**
- * @author Rob Elves
- * @author Mik Kersten
- */
-public class LocalRepositoryConnectorUi extends AbstractRepositoryConnectorUi {
-
- @Override
- public ImageDescriptor getTaskKindOverlay(ITask task) {
- return super.getTaskKindOverlay(task);
- }
-
- @Override
- public IWizard getNewTaskWizard(TaskRepository taskRepository, ITaskMapping selection) {
- return new NewLocalTaskWizard(selection);
- }
-
- @Override
- public IWizard getQueryWizard(TaskRepository repository, IRepositoryQuery queryToEdit) {
- return null;
- }
-
- @Override
- public String getConnectorKind() {
- return LocalRepositoryConnector.CONNECTOR_KIND;
- }
-
- @Override
- public ITaskRepositoryPage getSettingsPage(TaskRepository taskRepository) {
- return null;
- }
-
- @Override
- public boolean hasSearchPage() {
- return false;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/MoveToCategoryMenuContributor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/MoveToCategoryMenuContributor.java
deleted file mode 100644
index 15ca1f16d..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/MoveToCategoryMenuContributor.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTaskCategory;
-import org.eclipse.mylyn.internal.tasks.core.UnmatchedTaskContainer;
-import org.eclipse.mylyn.internal.tasks.ui.actions.NewCategoryAction;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-
-/**
- * @author Mik Kersten
- * @author Raphael Ackermann (bug 160315)
- */
-public class MoveToCategoryMenuContributor implements IDynamicSubMenuContributor {
-
- private static final String LABEL = "Move to";
-
- public MenuManager getSubMenuManager(final List<IRepositoryElement> selectedElements) {
- final MenuManager subMenuManager = new MenuManager(LABEL);
-
- // Compute selected tasks
- List<AbstractTask> selectedTasks = new ArrayList<AbstractTask>(selectedElements.size());
- for (IRepositoryElement element : selectedElements) {
- if (element instanceof ITask) {
- selectedTasks.add((AbstractTask) element);
- }
- }
- subMenuManager.setVisible(!selectedTasks.isEmpty());
-
- List<AbstractTaskCategory> categories = new ArrayList<AbstractTaskCategory>(TasksUiInternal.getTaskList()
- .getCategories());
- Collections.sort(categories);
- for (final AbstractTaskCategory category : categories) {
- if (!(category instanceof UnmatchedTaskContainer)) {
- String text = handleAcceleratorKeys(category.getSummary());
- Action action = new Action(text, IAction.AS_RADIO_BUTTON) {
- @Override
- public void run() {
- moveToCategory(selectedElements, category);
- }
- };
- action.setImageDescriptor(TasksUiImages.CATEGORY);
- if (selectedTasks.size() == 1) {
- if (category.contains(selectedTasks.get(0).getHandleIdentifier())) {
- action.setChecked(true);
- }
- }
- subMenuManager.add(action);
- }
- }
- // add New Category action at the end of the Move to Category Submenu
- // and move selected actions to this newly created category
- Action action = new NewCategoryAction() {
- @Override
- public void run() {
- super.run();
- if (super.cat != null) {
- moveToCategory(selectedElements, super.cat);
- }
- }
- };
- subMenuManager.add(new Separator());
- subMenuManager.add(action);
- return subMenuManager;
- }
-
- /**
- * public for testing
- *
- * Deals with text where user has entered a '@' or tab character but which are not meant to be accelerators. from:
- * Action#setText: Note that if you want to insert a '@' character into the text (but no accelerator, you can simply
- * insert a '@' or a tab at the end of the text. see Action#setText
- */
- public String handleAcceleratorKeys(String text) {
- if (text == null) {
- return null;
- }
-
- int index = text.lastIndexOf('\t');
- if (index == -1) {
- index = text.lastIndexOf('@');
- }
- if (index >= 0) {
- return text.concat("@");
- }
- return text;
- }
-
- /**
- * @param selectedElements
- * @param category
- */
- private void moveToCategory(final List<IRepositoryElement> selectedElements, AbstractTaskCategory category) {
- for (IRepositoryElement element : selectedElements) {
- if (element instanceof ITask) {
- TasksUiInternal.getTaskList().addTask((AbstractTask) element, category);
- }
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/OfflineCachingStorage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/OfflineCachingStorage.java
deleted file mode 100644
index 0118818c4..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/OfflineCachingStorage.java
+++ /dev/null
@@ -1,326 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui;
-
-import java.util.Map;
-import java.util.Queue;
-import java.util.Timer;
-import java.util.TimerTask;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentLinkedQueue;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.tasks.core.ITaskDataStorage;
-import org.eclipse.mylyn.internal.tasks.core.TaskDataState;
-
-/**
- * Least Recently Used (LRU) cache
- *
- * TODO: Use meta context to make cache more efficient
- *
- * API-3.0: review for race-conditions
- *
- * @author Rob Elves
- */
-public class OfflineCachingStorage implements ITaskDataStorage {
-
- private static final int DEFAULT_FLUSH_INTERVAL = 60 * 1000;
-
- private static final int MAX_READ_QUEUE_SIZE = 80;
-
- private final Map<String, Map<String, TaskDataState>> readCache = new ConcurrentHashMap<String, Map<String, TaskDataState>>();
-
- private final Map<String, Map<String, TaskDataState>> writeCache = new ConcurrentHashMap<String, Map<String, TaskDataState>>();
-
- private final Queue<TaskDataState> lruQueue = new ConcurrentLinkedQueue<TaskDataState>();
-
- private final ITaskDataStorage storage;
-
- private CacheFlushJob cacheFlushJob;
-
- private Timer cacheFlushTimer;
-
- public OfflineCachingStorage(ITaskDataStorage storage) {
- this.storage = storage;
- }
-
- /**
- * FOR TESTING PURPOSES DESTROYS ALL DATA IN STORAGE
- */
- public void clear() {
- if (cacheFlushJob != null) {
- cacheFlushJob.waitSaveCompleted();
- }
- readCache.clear();
- writeCache.clear();
- lruQueue.clear();
- storage.clear();
- }
-
- public void flush() {
- cacheFlushJob.waitSaveCompleted();
- persistToStorage();
- }
-
- public TaskDataState get(String repositoryUrl, String id) {
- TaskDataState result = null;
- result = retrieveFromCache(writeCache, repositoryUrl, id);
- if (result == null) {
- result = retrieveFromCache(readCache, repositoryUrl, id);
- }
- if (result == null) {
- result = retrieveFromStorage(repositoryUrl, id);
- }
- if (result != null) {
- pushRead(result);
- }
- return result;
- }
-
- private TaskDataState retrieveFromCache(Map<String, Map<String, TaskDataState>> cache, String repositoryUrl,
- String id) {
- Map<String, TaskDataState> idMap = cache.get(repositoryUrl);
- if (idMap != null) {
- return idMap.get(id);
- }
- return null;
- }
-
- private TaskDataState retrieveFromStorage(String repositoryUrl, String id) {
- TaskDataState result = null;
- synchronized (readCache) {
- Map<String, TaskDataState> idMap = readCache.get(repositoryUrl);
- if (idMap == null) {
- idMap = new ConcurrentHashMap<String, TaskDataState>();
- readCache.put(repositoryUrl, idMap);
- } else {
- result = idMap.get(id);
- }
-
- if (result == null) {
- result = storage.get(repositoryUrl, id);
- if (result != null) {
- idMap.put(id, result);
- }
- }
- }
- return result;
- }
-
- public void put(TaskDataState taskDataState) {
- putReadCache(taskDataState);
- putWriteCache(taskDataState);
- if (cacheFlushJob != null) {
- cacheFlushJob.requestSave();
- }
- }
-
- public void remove(String repositoryUrl, String id) {
- Map<String, TaskDataState> idMap = writeCache.get(repositoryUrl);
- if (idMap != null) {
- idMap.remove(id);
- }
- idMap = readCache.get(repositoryUrl);
- if (idMap != null) {
- idMap.remove(id);
- }
-
- lruQueue.remove(new TaskDataState(repositoryUrl, id));
-
- storage.remove(repositoryUrl, id);
- }
-
- public void start() throws Exception {
- storage.start();
- if (cacheFlushTimer == null && cacheFlushJob == null) {
- cacheFlushTimer = new Timer();
- cacheFlushTimer.schedule(new RequestSaveTimerTask(), DEFAULT_FLUSH_INTERVAL, DEFAULT_FLUSH_INTERVAL);
- cacheFlushJob = new CacheFlushJob();
- cacheFlushJob.schedule();
- }
- }
-
- public void stop() throws Exception {
- cacheFlushTimer.cancel();
- cacheFlushJob.cancel();
- this.flush();
- cacheFlushTimer = null;
- cacheFlushJob = null;
- storage.stop();
- }
-
- private void pushRead(TaskDataState state) {
-
- lruQueue.remove(state);
- lruQueue.add(state);
- if (lruQueue.size() > MAX_READ_QUEUE_SIZE) {
- flushReadCache(false);
- }
- }
-
- private void putReadCache(TaskDataState taskDataState) {
- if (taskDataState == null) {
- return;
- }
- synchronized (readCache) {
-
- Map<String, TaskDataState> idMap = readCache.get(taskDataState.getUrl());
- if (idMap == null) {
- idMap = new ConcurrentHashMap<String, TaskDataState>();
- readCache.put(taskDataState.getUrl(), idMap);
- }
-
- idMap.put(taskDataState.getId(), taskDataState);
- }
- pushRead(taskDataState);
- }
-
- private synchronized void putWriteCache(TaskDataState taskDataState) {
- if (taskDataState == null) {
- return;
- }
-
- Map<String, TaskDataState> idMap = writeCache.get(taskDataState.getUrl());
- if (idMap == null) {
- idMap = new ConcurrentHashMap<String, TaskDataState>();
- writeCache.put(taskDataState.getUrl(), idMap);
- }
- idMap.put(taskDataState.getId(), taskDataState);
- }
-
- private void persistToStorage() {
- synchronized (writeCache) {
- for (Map<String, TaskDataState> idMap : writeCache.values()) {
- for (TaskDataState state : idMap.values()) {
- storage.put(state);
- }
- idMap.clear();
- }
- }
- }
-
- private class CacheFlushJob extends Job {
-
- private volatile boolean saveRequested = false;
-
- private volatile boolean saveCompleted = true;
-
- CacheFlushJob() {
- super("Flush Cache Job");
- setPriority(Job.LONG);
- setSystem(true);
- }
-
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- while (true) {
- if (saveRequested) {
- saveRequested = false;
- saveCompleted = false;
- try {
- persistToStorage();
- } catch (Throwable t) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Error saving offline cache", t));
- }
- }
-
- if (!saveRequested) {
- synchronized (this) {
- saveCompleted = true;
- notifyAll();
- try {
- wait();
- } catch (InterruptedException ex) {
- // ignore
- }
- }
- }
- }
- }
-
- void requestSave() {
- saveRequested = true;
- }
-
- void runRequested() {
- synchronized (this) {
- notifyAll();
- }
- }
-
- void waitSaveCompleted() {
- while (!saveCompleted) {
- synchronized (this) {
- try {
- wait();
- } catch (InterruptedException ex) {
- // ignore
- }
- }
- }
- }
- }
-
- private class RequestSaveTimerTask extends TimerTask {
-
- @Override
- public void run() {
- if (!Platform.isRunning()) {
- return;
- } else {
- flushReadCache(false);
- cacheFlushJob.runRequested();
- }
- }
- }
-
- /**
- * @param reset
- * if true all read cached data is dropped if false only remove until cache lower than
- * MAX_READ_QUEUE_SIZE
- */
- public void flushReadCache(boolean reset) {
- if (reset) {
- lruQueue.clear();
- readCache.clear();
- } else {
- while (lruQueue.size() > MAX_READ_QUEUE_SIZE / 2) {
- TaskDataState state = lruQueue.poll();
- if (state != null) {
- Map<String, TaskDataState> tasksMap = readCache.get(state.getUrl());
- if (tasksMap != null) {
- tasksMap.remove(state.getId());
- }
- }
- }
- }
- }
-
- /**
- * For testing...
- */
- public Queue<TaskDataState> getReadQueue() {
- return lruQueue;
- }
-
- public Map<String, Map<String, TaskDataState>> getReadCache() {
- return readCache;
- }
-
- public Map<String, Map<String, TaskDataState>> getWriteCache() {
- return writeCache;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/OfflineFileStorage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/OfflineFileStorage.java
deleted file mode 100644
index 9addf7402..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/OfflineFileStorage.java
+++ /dev/null
@@ -1,721 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.OutputStreamWriter;
-import java.net.URLEncoder;
-import java.nio.channels.FileChannel;
-import java.nio.channels.FileLock;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipInputStream;
-import java.util.zip.ZipOutputStream;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.tasks.core.ITaskDataStorage;
-import org.eclipse.mylyn.internal.tasks.core.TaskDataState;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractAttributeFactory;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryAttachment;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryOperation;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskAttribute;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.TaskComment;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.XMLMemento;
-
-/**
- * @author Rob Elves
- */
-public class OfflineFileStorage implements ITaskDataStorage {
-
- private static final String ATTRIBUTE_TASK_KIND = "taskKind";
-
- private static final String ATTRIBUTE_IS_PATCH = "isPatch";
-
- private static final String ATTRIBUTE_IS_OBSOLETE = "isObsolete";
-
- private static final String ATTRIBUTE_CREATOR = "creator";
-
- private static final String ATTRIBUTE_NUMBER = "number";
-
- private static final String ATTRIBUTE_HAS_ATTACHMENT = "hasAttachment";
-
- private static final String ATTRIBUTE_ATTACHMENT_ID = "attachmentId";
-
- private static final String ATTRIBUTE_KNOB_NAME = "knob_name";
-
- private static final String ATTRIBUTE_OPERATION_NAME = "operationName";
-
- private static final String ATTRIBUTE_OPTION_NAME = "optionName";
-
- private static final String ATTRIBUTE_OPTION_SELECTION = "optionSelection";
-
- private static final String ATTRIBUTE_IS_CHECKED = "isChecked";
-
- private static final String ATTRIBUTE_INPUT_NAME = "inputName";
-
- private static final String ATTRIBUTE_INPUT_VALUE = "inputValue";
-
- private static final String ATTRIBUTE_READONLY = "readonly";
-
- private static final String ATTRIBUTE_HIDDEN = "hidden";
-
- private static final String ATTRIBUTE_PARAMETER = "parameter";
-
- private static final String ATTRIBUTE_VALUE = "value";
-
- private static final String ELEMENT_META_DATA = "MetaData";
-
- private static final String ELEMENT_META = "meta";
-
- private static final String ELEMENT_OPTION = "option";
-
- private static final String ELEMENT_OPTIONS = "options";
-
- private static final String ELEMENT_VALUES = "values";
-
- private static final String ELEMENT_VALUE = "value";
-
- private static final String ELEMENT_ATTRIBUTE = "Attribute";
-
- private static final String ELEMENT_NAME = "name";
-
- private static final String ELEMENT_OPTION_NAMES = "optionNames";
-
- private static final String ELEMENT_OPERATION = "Operation";
-
- private static final String ELEMENT_SELECTED = "Selected";
-
- private static final String ELEMENT_COMMENT = "Comment";
-
- private static final String ELEMENT_ATTACHMENT = "Attachment";
-
- private static final String ELEMENT_ATTACHMENTS = "Attachments";
-
- private static final String ELEMENT_COMMENTS = "Comments";
-
- private static final String ELEMENT_OPERATIONS = "Operations";
-
- private static final String ELEMENT_ATTRIBUTES = "Attributes";
-
- private static final String ATTRIBUTE_REPOSITORY_KIND = "repositoryKind";
-
- private static final String ATTRIBUTE_REPOSITORY_URL = "repositoryUrl";
-
- private static final String ATTRIBUTE_KEY = "key";
-
- private static final String ATTRIBUTE_ID = "id";
-
- private static final String ATTRIBUTE_NAME = "name";
-
- private static final String FILE_NAME_INTERNAL = "data.xml";
-
- private static final String ELEMENT_EDITS_DATA = "EditsData";
-
- private static final String ELEMENT_OLD_DATA = "OldData";
-
- private static final String ELEMENT_NEW_DATA = "NewData";
-
- private static final String ATTRIBUTE_VERSION = "version";
-
- private static final String ELEMENT_TASK_STATE = "TaskState";
-
- private static final String ENCODING_UTF_8 = "UTF-8";
-
- private static final String SCHEMA_VERSION = "1.0";
-
- private static final String EXTENSION = ".zip";
-
- private final File dataDir;
-
- // HACK: Remove attribute factories all together!!!
- private static final AbstractAttributeFactory temporaryFactory = new AbstractAttributeFactory() {
- private static final long serialVersionUID = 1L;
-
- @Override
- public Date getDateForAttributeType(String attributeKey, String dateString) {
- return null;
- }
-
- @Override
- public boolean isHidden(String key) {
- return false;
- }
-
- @Override
- public String getName(String key) {
- return key;
- }
-
- @Override
- public boolean isReadOnly(String key) {
- return false;
- }
-
- @Override
- public String mapCommonAttributeKey(String key) {
- return key;
- }
-
- };
-
- public OfflineFileStorage(File rootFolder) {
- dataDir = rootFolder;
- }
-
- public void start() throws Exception {
- if (!dataDir.exists()) {
- dataDir.mkdirs();
- }
- }
-
- public void stop() throws Exception {
- // ignore
- }
-
- public synchronized TaskDataState get(String repositoryUrl, String id) {
- TaskDataState state = null;
- FileInputStream fileInputStream = null;
- FileLock lock = null;
- try {
- File dataFile = getDataFile(URLEncoder.encode(repositoryUrl, ENCODING_UTF_8), id);
- if (dataFile != null && dataFile.exists()) {
-
- fileInputStream = new FileInputStream(dataFile);
- FileChannel channel = fileInputStream.getChannel();
- lock = channel.tryLock(0L, Long.MAX_VALUE, true);
- if (lock != null) {
- state = new TaskDataState(repositoryUrl, id);
- ZipInputStream inputStream = new ZipInputStream(fileInputStream);
- ZipEntry entry = inputStream.getNextEntry();
- if (entry != null) {
- XMLMemento input = XMLMemento.createReadRoot(new InputStreamReader(inputStream, ENCODING_UTF_8));
- if (input != null) {
- readData(state, input);
- }
- }
- }
- }
- } catch (Exception e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Error retrieving offline data", e));
- } finally {
- try {
- if (lock != null && lock.isValid()) {
- lock.release();
- }
- if (fileInputStream != null) {
- fileInputStream.close();
- }
- } catch (IOException e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Error closing offline data input stream", e));
- }
- }
-
- return state;
- }
-
- public synchronized void put(TaskDataState taskDataState) {
- FileOutputStream fileOutputStream = null;
- FileLock lock = null;
- try {
- String repositoryFolder = URLEncoder.encode(taskDataState.getNewTaskData().getRepositoryUrl(),
- ENCODING_UTF_8);
- File dataFile = getDataFile(repositoryFolder, taskDataState.getId());
- if (dataFile != null) {
- if (!dataFile.getParentFile().exists()) {
- if (!dataFile.getParentFile().mkdirs()) {
- throw new IOException("Could not create offline data folder: "
- + dataFile.getParentFile().getAbsolutePath());
- }
- }
- fileOutputStream = new FileOutputStream(dataFile);
- FileChannel channel = fileOutputStream.getChannel();
- lock = channel.tryLock();
- if (lock != null) {
- final ZipOutputStream outputStream = new ZipOutputStream(fileOutputStream);
- outputStream.setMethod(ZipOutputStream.DEFLATED);
- ZipEntry zipEntry = new ZipEntry(FILE_NAME_INTERNAL);
- outputStream.putNextEntry(zipEntry);
-
- OutputStreamWriter writer = new OutputStreamWriter(outputStream, ENCODING_UTF_8);
- XMLMemento memento = XMLMemento.createWriteRoot(ELEMENT_TASK_STATE);
- memento.putString(ATTRIBUTE_VERSION, SCHEMA_VERSION);
- if (taskDataState.getNewTaskData() != null) {
- IMemento child = memento.createChild(ELEMENT_NEW_DATA);
- addTaskData(child, taskDataState.getNewTaskData());
- }
- if (taskDataState.getOldTaskData() != null) {
- IMemento child = memento.createChild(ELEMENT_OLD_DATA);
- addTaskData(child, taskDataState.getOldTaskData());
- }
- if (taskDataState.getEdits() != null && taskDataState.getEdits().size() > 0) {
- IMemento child = memento.createChild(ELEMENT_EDITS_DATA);
- addEdits(child, taskDataState.getEdits());
- }
- memento.save(writer);
- }
- }
- } catch (Exception e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Error saving offline data"));
- } finally {
- try {
- if (lock != null && lock.isValid()) {
- lock.release();
- }
- if (fileOutputStream != null) {
- fileOutputStream.flush();
- fileOutputStream.close();
- }
- } catch (IOException e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Error closing offline data output stream"));
- }
- }
-
- }
-
- private void readData(TaskDataState taskState, XMLMemento parent) {
- IMemento newData = parent.getChild(ELEMENT_NEW_DATA);
- if (newData != null) {
- RepositoryTaskData newTaskData = readTaskData(newData);
- if (newTaskData != null) {
- taskState.setNewTaskData(newTaskData);
- }
- }
-
- IMemento oldData = parent.getChild(ELEMENT_OLD_DATA);
- if (oldData != null) {
- RepositoryTaskData oldTaskData = readTaskData(oldData);
- if (oldTaskData != null) {
- taskState.setOldTaskData(oldTaskData);
- }
- }
-
- IMemento editsData = parent.getChild(ELEMENT_EDITS_DATA);
- if (editsData != null) {
- Set<RepositoryTaskAttribute> edits = readEdits(editsData);
- if (edits != null) {
- taskState.setEdits(edits);
- }
- }
-
- }
-
- private RepositoryTaskData readTaskData(IMemento newData) {
- String kind = newData.getString(ATTRIBUTE_REPOSITORY_KIND);
- String id = newData.getString(ATTRIBUTE_ID);
- String url = newData.getString(ATTRIBUTE_REPOSITORY_URL);
- String taskKind = newData.getString(ATTRIBUTE_TASK_KIND);
-
- if (kind == null || url == null || id == null) {
- return null;
- }
-
- RepositoryTaskData data = new RepositoryTaskData(temporaryFactory, kind, url, id, taskKind);
- IMemento attMemento = newData.getChild(ELEMENT_ATTRIBUTES);
- if (attMemento != null) {
- List<RepositoryTaskAttribute> attributes = readAttributes(attMemento);
- for (RepositoryTaskAttribute repositoryTaskAttribute : attributes) {
- data.addAttribute(repositoryTaskAttribute.getId(), repositoryTaskAttribute);
- }
- }
-
- IMemento opsMemento = newData.getChild(ELEMENT_OPERATIONS);
- if (opsMemento != null) {
- List<RepositoryOperation> operations = readOperations(opsMemento);
- for (RepositoryOperation operation : operations) {
- data.addOperation(operation);
- }
- }
-
- IMemento commentsMemento = newData.getChild(ELEMENT_COMMENTS);
- if (commentsMemento != null) {
- List<TaskComment> comments = readComments(commentsMemento);
- for (TaskComment comment : comments) {
- data.addComment(comment);
- }
- }
-
- IMemento attachmentsMemento = newData.getChild(ELEMENT_ATTACHMENTS);
- if (attachmentsMemento != null) {
- List<RepositoryAttachment> attachments = readAttachments(attachmentsMemento);
- for (RepositoryAttachment attachment : attachments) {
- data.addAttachment(attachment);
- }
- }
-
- return data;
-
- }
-
- private void addEdits(IMemento parent, Set<RepositoryTaskAttribute> edits) {
- List<RepositoryTaskAttribute> changedAttributes = new ArrayList<RepositoryTaskAttribute>();
- changedAttributes.addAll(edits);
- addAttributes(parent, changedAttributes);
- }
-
- private Set<RepositoryTaskAttribute> readEdits(IMemento parent) {
- return new HashSet<RepositoryTaskAttribute>(readAttributes(parent));
- }
-
- private void addTaskData(IMemento parent, RepositoryTaskData newTaskData) {
- parent.putString(ATTRIBUTE_ID, getCleanText(newTaskData.getTaskId()));
- parent.putString(ATTRIBUTE_TASK_KIND, getCleanText(newTaskData.getTaskKind()));
- parent.putString(ATTRIBUTE_REPOSITORY_URL, getCleanText(newTaskData.getRepositoryUrl()));
- parent.putString(ATTRIBUTE_REPOSITORY_KIND, getCleanText(newTaskData.getConnectorKind()));
-
- IMemento attributes = parent.createChild(ELEMENT_ATTRIBUTES);
- addAttributes(attributes, newTaskData.getAttributes());
-
- IMemento operations = parent.createChild(ELEMENT_OPERATIONS);
- addOperations(operations, newTaskData.getOperations());
- if (newTaskData.getSelectedOperation() != null) {
- addSelectedOperation(operations, newTaskData.getSelectedOperation());
- }
-
- IMemento comments = parent.createChild(ELEMENT_COMMENTS);
- addComments(comments, newTaskData.getComments());
-
- IMemento attachments = parent.createChild(ELEMENT_ATTACHMENTS);
- addAttachments(attachments, newTaskData.getAttachments());
-
- }
-
- public void addAttachments(IMemento parent, List<RepositoryAttachment> attachments) {
- for (RepositoryAttachment attachment : attachments) {
- IMemento memento = parent.createChild(ELEMENT_ATTACHMENT);
- memento.putString(ATTRIBUTE_IS_PATCH, String.valueOf(attachment.isPatch()));
- memento.putString(ATTRIBUTE_IS_OBSOLETE, String.valueOf(attachment.isObsolete()));
- memento.putString(ATTRIBUTE_CREATOR, getCleanText(attachment.getCreator()));
- memento.putString(ATTRIBUTE_ID, getCleanText(attachment.getTaskId()));
- memento.putString(ATTRIBUTE_REPOSITORY_KIND, getCleanText(attachment.getRepositoryKind()));
- memento.putString(ATTRIBUTE_REPOSITORY_URL, getCleanText(attachment.getRepositoryUrl()));
- IMemento attributes = memento.createChild(ELEMENT_ATTRIBUTES);
- addAttributes(attributes, attachment.getAttributes());
- }
- }
-
- public List<RepositoryAttachment> readAttachments(IMemento parent) {
- List<RepositoryAttachment> attachments = new ArrayList<RepositoryAttachment>();
- for (IMemento attachmentMemento : parent.getChildren(ELEMENT_ATTACHMENT)) {
- RepositoryAttachment attachment = new RepositoryAttachment(temporaryFactory);
- String isPatch = attachmentMemento.getString(ATTRIBUTE_IS_PATCH);
- String isObsolete = attachmentMemento.getString(ATTRIBUTE_IS_OBSOLETE);
- String taskId = attachmentMemento.getString(ATTRIBUTE_ID);
- String creator = attachmentMemento.getString(ATTRIBUTE_CREATOR);
- String repositoryKind = attachmentMemento.getString(ATTRIBUTE_REPOSITORY_KIND);
- String repositoryUrl = attachmentMemento.getString(ATTRIBUTE_REPOSITORY_URL);
-
- if (isPatch != null) {
- attachment.setPatch(Boolean.parseBoolean(isPatch));
- }
- if (isObsolete != null) {
- attachment.setObsolete(Boolean.parseBoolean(isObsolete));
- }
- if (creator != null) {
- attachment.setCreator(creator);
- }
- if (repositoryKind != null) {
- attachment.setRepositoryKind(repositoryKind);
- }
- if (repositoryUrl != null) {
- attachment.setRepositoryUrl(repositoryUrl);
- }
- if (taskId != null) {
- attachment.setTaskId(taskId);
- }
- IMemento attributesMemento = attachmentMemento.getChild(ELEMENT_ATTRIBUTES);
- if (attributesMemento != null) {
- List<RepositoryTaskAttribute> attributes = readAttributes(attributesMemento);
- for (RepositoryTaskAttribute repositoryTaskAttribute : attributes) {
- attachment.addAttribute(repositoryTaskAttribute.getId(), repositoryTaskAttribute);
- }
- }
- attachments.add(attachment);
- }
- return attachments;
- }
-
- public void addComments(IMemento parent, List<TaskComment> comments) {
- for (TaskComment taskComment : comments) {
- IMemento comment = parent.createChild(ELEMENT_COMMENT);
- comment.putInteger(ATTRIBUTE_NUMBER, taskComment.getNumber());
- comment.putString(ATTRIBUTE_HAS_ATTACHMENT, String.valueOf(taskComment.hasAttachment()));
- comment.putString(ATTRIBUTE_ATTACHMENT_ID, getCleanText(taskComment.getAttachmentId()));
- IMemento attributes = comment.createChild(ELEMENT_ATTRIBUTES);
- addAttributes(attributes, taskComment.getAttributes());
- }
- }
-
- public List<TaskComment> readComments(IMemento parent) {
- List<TaskComment> comments = new ArrayList<TaskComment>();
- for (IMemento commentMemento : parent.getChildren(ELEMENT_COMMENT)) {
- Integer commentNumber = commentMemento.getInteger(ATTRIBUTE_NUMBER);
- String hasAttachment = commentMemento.getString(ATTRIBUTE_HAS_ATTACHMENT);
- String attachmentId = commentMemento.getString(ATTRIBUTE_ATTACHMENT_ID);
- if (commentNumber != null) {
- TaskComment comment = new TaskComment(temporaryFactory, commentNumber);
- if (hasAttachment != null) {
- comment.setHasAttachment(Boolean.parseBoolean(hasAttachment));
- }
- if (attachmentId != null) {
- comment.setAttachmentId(attachmentId);
- }
- IMemento attributesMemento = commentMemento.getChild(ELEMENT_ATTRIBUTES);
- if (attributesMemento != null) {
- List<RepositoryTaskAttribute> attributes = readAttributes(attributesMemento);
- for (RepositoryTaskAttribute repositoryTaskAttribute : attributes) {
- comment.addAttribute(repositoryTaskAttribute.getId(), repositoryTaskAttribute);
- }
- }
- comments.add(comment);
- }
- }
- return comments;
- }
-
- private void addSelectedOperation(IMemento operations, RepositoryOperation selectedOperation) {
- IMemento selected = operations.createChild(ELEMENT_SELECTED);
- ArrayList<RepositoryOperation> list = new ArrayList<RepositoryOperation>();
- list.add(selectedOperation);
- addOperations(selected, list);
- }
-
- public void addOperations(IMemento parent, List<RepositoryOperation> operations) {
- for (RepositoryOperation operation : operations) {
- IMemento operationMemento = parent.createChild(ELEMENT_OPERATION);
- operationMemento.putString(ATTRIBUTE_KNOB_NAME, getCleanText(operation.getKnobName()));
- operationMemento.putString(ATTRIBUTE_OPERATION_NAME, getCleanText(operation.getOperationName()));
- operationMemento.putString(ATTRIBUTE_IS_CHECKED, String.valueOf(operation.isChecked()));
- if (operation.isInput()) {
- operationMemento.putString(ATTRIBUTE_INPUT_NAME, getCleanText(operation.getInputName()));
- operationMemento.putString(ATTRIBUTE_INPUT_VALUE, getCleanText(operation.getInputValue()));
- }
- if (operation.hasOptions()) {
- operationMemento.putString(ATTRIBUTE_OPTION_NAME, getCleanText(operation.getOptionName()));
- operationMemento.putString(ATTRIBUTE_OPTION_SELECTION, getCleanText(operation.getOptionSelection()));
-
- if (operation.getOptionNames() != null && operation.getOptionNames().size() > 0) {
- IMemento optionNames = operationMemento.createChild(ELEMENT_OPTION_NAMES);
- for (String name : operation.getOptionNames()) {
- IMemento nameMemento = optionNames.createChild(ELEMENT_NAME);
- nameMemento.putTextData(getCleanText(name));
- nameMemento.putString(ATTRIBUTE_VALUE, getCleanText(operation.getOptionValue(name)));
- }
- }
- }
- }
- }
-
- /* public for testing */
- public List<RepositoryOperation> readOperations(IMemento parent) {
- List<RepositoryOperation> operations = new ArrayList<RepositoryOperation>();
- for (IMemento operationMemento : parent.getChildren(ELEMENT_OPERATION)) {
- String knobName = operationMemento.getString(ATTRIBUTE_KNOB_NAME);
- String operationName = operationMemento.getString(ATTRIBUTE_OPERATION_NAME);
- String optionName = operationMemento.getString(ATTRIBUTE_OPTION_NAME);
- String selection = operationMemento.getString(ATTRIBUTE_OPTION_SELECTION);
- String isChecked = operationMemento.getString(ATTRIBUTE_IS_CHECKED);
- String inputName = operationMemento.getString(ATTRIBUTE_INPUT_NAME);
- String inputValue = operationMemento.getString(ATTRIBUTE_INPUT_VALUE);
-
- if (knobName == null || operationName == null) {
- continue;
- }
-
- RepositoryOperation op = new RepositoryOperation(knobName, operationName);
- if (optionName != null) {
- op.setUpOptions(optionName);
- }
- if (isChecked != null) {
- op.setChecked(Boolean.parseBoolean(isChecked));
- }
- if (inputName != null) {
- op.setInputName(inputName);
- }
- if (inputValue != null) {
- op.setInputValue(inputValue);
- }
-
- IMemento optionNames = operationMemento.getChild(ELEMENT_OPTION_NAMES);
- if (optionNames != null) {
- for (IMemento nameMemento : optionNames.getChildren(ELEMENT_NAME)) {
- if (nameMemento.getTextData() != null && nameMemento.getTextData().length() > 0) {
- op.addOption(nameMemento.getTextData(), nameMemento.getString(ATTRIBUTE_VALUE));
- }
- }
- }
-
- // Selection must be applied after addition of options
- if (selection != null) {
- op.setOptionSelection(selection);
- }
-
- operations.add(op);
-
- }
- return operations;
- }
-
- /* public for testing */
- public void addAttributes(IMemento parent, List<RepositoryTaskAttribute> attributes) {
- for (RepositoryTaskAttribute attribute : attributes) {
- IMemento attribMemento = parent.createChild(ELEMENT_ATTRIBUTE);
- attribMemento.putString(ATTRIBUTE_ID, getCleanText(attribute.getId()));
- attribMemento.putString(ATTRIBUTE_NAME, getCleanText(attribute.getName()));
- attribMemento.putString(ATTRIBUTE_HIDDEN, String.valueOf(attribute.isHidden()));
- attribMemento.putString(ATTRIBUTE_READONLY, String.valueOf(attribute.isReadOnly()));
-
- IMemento values = attribMemento.createChild(ELEMENT_VALUES);
- for (String value : attribute.getValues()) {
- values.createChild(ELEMENT_VALUE).putTextData(getCleanText(value));
- }
-
- IMemento options = attribMemento.createChild(ELEMENT_OPTIONS);
- for (String optionValue : attribute.getOptions()) {
- IMemento option = options.createChild(ELEMENT_OPTION);
- option.putTextData(getCleanText(optionValue));
- String parameter = attribute.getOptionParameter(optionValue);
- if (parameter != null) {
- option.putString(ATTRIBUTE_PARAMETER, getCleanText(parameter));
- }
- }
- IMemento metaData = attribMemento.createChild(ELEMENT_META_DATA);
- Map<String, String> metadata = attribute.getMetaData();
- if (metadata != null && metadata.size() > 0) {
- for (String key : metadata.keySet()) {
- IMemento meta = metaData.createChild(ELEMENT_META);
- meta.putString(ATTRIBUTE_KEY, getCleanText(key));
- meta.putTextData(getCleanText(metadata.get(key)));
- }
- }
- }
- }
-
- private String getCleanText(String text) {
- if (text == null) {
- return "";
- }
- String result = org.eclipse.mylyn.internal.commons.core.XmlStringConverter.cleanXmlString(text);
- if (result == null) {
- result = "";
- }
- return result;
- }
-
- /* public for testing */
- public List<RepositoryTaskAttribute> readAttributes(IMemento parent) {
- List<RepositoryTaskAttribute> attributes = new ArrayList<RepositoryTaskAttribute>();
- for (IMemento attrMemento : parent.getChildren(ELEMENT_ATTRIBUTE)) {
- String id = attrMemento.getString(ATTRIBUTE_ID);
- String name = attrMemento.getString(ATTRIBUTE_NAME);
- String hidden = attrMemento.getString(ATTRIBUTE_HIDDEN);
- if (id != null && name != null && hidden != null) {
- RepositoryTaskAttribute attribute = new RepositoryTaskAttribute(id, name, Boolean.parseBoolean(hidden));
- attributes.add(attribute);
- String readOnly = attrMemento.getString(ATTRIBUTE_READONLY);
- if (readOnly != null) {
- attribute.setReadOnly(Boolean.parseBoolean(readOnly));
- }
-
- IMemento values = attrMemento.getChild(ELEMENT_VALUES);
- if (values != null) {
- for (IMemento valueMemento : values.getChildren(ELEMENT_VALUE)) {
- attribute.addValue(getCleanText(valueMemento.getTextData()));
- }
- }
-
- IMemento options = attrMemento.getChild(ELEMENT_OPTIONS);
- if (options != null) {
- for (IMemento optionMemento : options.getChildren(ELEMENT_OPTION)) {
- attribute.addOption(getCleanText(optionMemento.getTextData()),
- optionMemento.getString(ATTRIBUTE_PARAMETER));
- }
- }
-
- IMemento metaData = attrMemento.getChild(ELEMENT_META_DATA);
- if (metaData != null) {
- for (IMemento optionMemento : metaData.getChildren(ELEMENT_META)) {
- attribute.putMetaDataValue(optionMemento.getString(ATTRIBUTE_KEY),
- getCleanText(optionMemento.getTextData()));
- }
- }
- }
- }
- return attributes;
- }
-
- public void remove(String repositoryUrl, String id) {
- if (repositoryUrl == null || id == null) {
- return;
- }
- File file;
- try {
- file = getDataFile(URLEncoder.encode(repositoryUrl, ENCODING_UTF_8), id);
- if (file != null && file.exists()) {
- file.delete();
- }
-
- if (file != null && file.getParentFile() != null && file.getParentFile().exists()
- && file.getParentFile().list().length == 0) {
- file.getParentFile().delete();
- }
-
- // TODO: Remove folder if last file removed
-
- } catch (Exception e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Error removing offline data: "
- + repositoryUrl + "-" + id, e));
- }
- }
-
- private File getDataFile(String folder, String id) throws IOException {
- File repositoryFolder = new File(dataDir, folder);
- File dataFile = new File(repositoryFolder, id + EXTENSION);
- return dataFile;
- }
-
- /**
- * Delete entire offline repositoy contents, FOR TESTING ONLY
- */
- public void clear() {
- if (dataDir.exists()) {
- for (File file : dataDir.listFiles()) {
- destroy(file);
- }
- }
- }
-
- private void destroy(File folder) {
- if (folder.isDirectory()) {
- for (File file : folder.listFiles()) {
- destroy(file);
- }
- }
- folder.delete();
- }
-
- public void flush() {
- // ignore;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/OpenRepositoryTaskJob.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/OpenRepositoryTaskJob.java
deleted file mode 100644
index 87626b842..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/OpenRepositoryTaskJob.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Mik Kersten
- * @author Steffen Pingel
- * @author Rob Elves
- */
-public class OpenRepositoryTaskJob extends Job {
-
- private final String repositoryUrl;
-
- private final String repositoryKind;
-
- private final String taskId;
-
- private final String taskUrl;
-
- public OpenRepositoryTaskJob(String repositoryKind, String repositoryUrl, String taskId, String taskUrl) {
- super("Opening repository task " + taskId);
- this.repositoryKind = repositoryKind;
- this.taskId = taskId;
- this.repositoryUrl = repositoryUrl;
- this.taskUrl = taskUrl;
- }
-
- @Override
- public IStatus run(IProgressMonitor monitor) {
- monitor.beginTask("Opening Remote Task", 10);
- final TaskRepository repository = TasksUi.getRepositoryManager().getRepository(repositoryKind, repositoryUrl);
- if (repository == null) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- MessageDialog.openError(null, "Repository Not Found",
- "Could not find repository configuration for " + repositoryUrl
- + ". \nPlease set up repository via " + TasksUiPlugin.LABEL_VIEW_REPOSITORIES + ".");
- TasksUiUtil.openUrl(taskUrl);
- }
-
- });
- return Status.OK_STATUS;
- }
-
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
-
- public void run() {
-
- ITask task = TasksUi.getRepositoryModel().createTask(repository, taskId);
- TasksUiInternal.refreshAndOpenTaskListElement(task);
- }
- });
- return Status.OK_STATUS;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/PersonContentProposal.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/PersonContentProposal.java
deleted file mode 100644
index 9ea4e2ac0..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/PersonContentProposal.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.jface.fieldassist.IContentProposal;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * @author Mik Kersten
- */
-public class PersonContentProposal implements IContentProposal, Comparable<PersonContentProposal> {
-
- private final String address;
-
- private boolean isCurrentUser = false;
-
- private final String replacementText;
-
- private final int cursorPosition;
-
- public PersonContentProposal(String address, boolean isCurrentUser, String replacementText, int cursorPosition) {
- Assert.isNotNull(address);
- Assert.isNotNull(replacementText);
- this.address = address;
- this.isCurrentUser = isCurrentUser;
- this.replacementText = replacementText;
- this.cursorPosition = cursorPosition;
- }
-
- public PersonContentProposal(String address, boolean isCurrentUser) {
- this(address, isCurrentUser, address, address.length());
- }
-
- public String getLabel() {
- return address;
- }
-
- public String getDescription() {
- return null;
- }
-
- public int getCursorPosition() {
- return cursorPosition;
- }
-
- public String getContent() {
- return replacementText;
- }
-
- public Image getImage() {
- if (isCurrentUser) {
- return CommonImages.getImage(CommonImages.PERSON_ME);
- } else {
- return CommonImages.getImage(CommonImages.PERSON);
- }
- }
-
- public int compareTo(PersonContentProposal otherContentProposal) {
- if (isCurrentUser) {
- return -1;
- } else if (otherContentProposal.isCurrentUser) {
- return 1;
- }
- return address.compareToIgnoreCase(otherContentProposal.address);
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/PersonProposalLabelProvider.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/PersonProposalLabelProvider.java
deleted file mode 100644
index 5456da997..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/PersonProposalLabelProvider.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui;
-
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * @author Shawn Minto
- */
-public class PersonProposalLabelProvider extends LabelProvider {
-
- @Override
- public Image getImage(Object element) {
- if (element instanceof PersonContentProposal) {
- return ((PersonContentProposal) element).getImage();
- }
- return null;
- }
-
- @Override
- public String getText(Object element) {
- if (element instanceof PersonContentProposal) {
- return ((PersonContentProposal) element).getLabel();
- }
- return super.getText(element);
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/PersonProposalProvider.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/PersonProposalProvider.java
deleted file mode 100644
index 4dbd9f28f..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/PersonProposalProvider.java
+++ /dev/null
@@ -1,213 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui;
-
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Comparator;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.SortedSet;
-import java.util.TreeSet;
-
-import org.eclipse.jface.fieldassist.IContentProposal;
-import org.eclipse.jface.fieldassist.IContentProposalProvider;
-import org.eclipse.mylyn.commons.net.AuthenticationCredentials;
-import org.eclipse.mylyn.commons.net.AuthenticationType;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryAttachment;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.TaskComment;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.data.TaskData;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-
-/**
- * @author Shawn Minto
- * @author Eugene Kuleshov
- * @author Steffen Pingel
- */
-@SuppressWarnings( { "deprecation", "restriction" })
-public class PersonProposalProvider implements IContentProposalProvider {
-
- private final AbstractTask currentTask;
-
- private final RepositoryTaskData currentTaskData;
-
- private String currentUser;
-
- private SortedSet<String> addressSet = null;
-
- private String repositoryUrl;
-
- private String connectorKind;
-
- public PersonProposalProvider(AbstractTask task, TaskData taskData) {
- this.currentTask = task;
- // TODO EDITOR keep reference to task data
- this.currentTaskData = null;
- if (task != null) {
- repositoryUrl = task.getRepositoryUrl();
- connectorKind = task.getConnectorKind();
- } else if (taskData != null) {
- repositoryUrl = taskData.getRepositoryUrl();
- connectorKind = taskData.getConnectorKind();
- }
- }
-
- @Deprecated
- public PersonProposalProvider(AbstractTask task, RepositoryTaskData taskData) {
- this.currentTask = task;
- this.currentTaskData = taskData;
- if (task != null) {
- repositoryUrl = task.getRepositoryUrl();
- connectorKind = task.getConnectorKind();
- } else if (taskData != null) {
- repositoryUrl = taskData.getRepositoryUrl();
- connectorKind = taskData.getConnectorKind();
- }
- }
-
- public PersonProposalProvider(String repositoryUrl, String repositoryKind) {
- this.currentTask = null;
- this.currentTaskData = null;
- this.repositoryUrl = repositoryUrl;
- this.connectorKind = repositoryKind;
- }
-
- public IContentProposal[] getProposals(String contents, int position) {
- if (contents == null) {
- throw new IllegalArgumentException();
- }
-
- int leftSeparator = getIndexOfLeftSeparator(contents, position);
- int rightSeparator = getIndexOfRightSeparator(contents, position);
-
- assert leftSeparator <= position;
- assert position <= rightSeparator;
-
- String searchText = contents.substring(leftSeparator + 1, position);
- String resultPrefix = contents.substring(0, leftSeparator + 1);
- String resultPostfix = contents.substring(rightSeparator);
-
- // retrieve subset of the tree set using key range
- SortedSet<String> addressSet = getAddressSet();
- if (!searchText.equals("")) {
- searchText = searchText.toLowerCase();
- char[] nextWord = searchText.toCharArray();
- nextWord[searchText.length() - 1]++;
- addressSet = addressSet.subSet(searchText, new String(nextWord));
- }
-
- IContentProposal[] result = new IContentProposal[addressSet.size()];
- int i = 0;
- for (final String address : addressSet) {
- result[i++] = new PersonContentProposal(address, address.equalsIgnoreCase(currentUser), resultPrefix
- + address + resultPostfix, resultPrefix.length() + address.length());
- }
- Arrays.sort(result);
- return result;
- }
-
- private int getIndexOfLeftSeparator(String contents, int position) {
- int i = contents.lastIndexOf(' ', position - 1);
- i = Math.max(contents.lastIndexOf(',', position - 1), i);
- return i;
- }
-
- private int getIndexOfRightSeparator(String contents, int position) {
- int index = contents.length();
- int i = contents.indexOf(' ', position);
- if (i != -1) {
- index = Math.min(i, index);
- }
- i = contents.indexOf(',', position);
- if (i != -1) {
- index = Math.min(i, index);
- }
- return index;
- }
-
- private SortedSet<String> getAddressSet() {
- if (addressSet != null) {
- return addressSet;
- }
-
- addressSet = new TreeSet<String>(new Comparator<String>() {
- public int compare(String s1, String s2) {
- return s1.compareToIgnoreCase(s2);
- }
- });
-
- if (currentTask != null) {
- addAddress(currentTask.getOwner(), addressSet);
- }
-
- if (currentTaskData != null) {
- addAddresses(currentTaskData, addressSet);
- }
-
- if (repositoryUrl != null && connectorKind != null) {
- Set<AbstractTask> tasks = new HashSet<AbstractTask>();
- if (currentTask != null) {
- tasks.add(currentTask);
- }
-
- TaskRepository repository = TasksUi.getRepositoryManager().getRepository(connectorKind, repositoryUrl);
-
- if (repository != null) {
- AuthenticationCredentials credentials = repository.getCredentials(AuthenticationType.REPOSITORY);
- if (credentials != null && credentials.getUserName().length() > 0) {
- addressSet.add(credentials.getUserName());
- }
- }
-
- Collection<AbstractTask> allTasks = TasksUiPlugin.getTaskList().getAllTasks();
- for (AbstractTask task : allTasks) {
- if (repositoryUrl.equals(task.getRepositoryUrl())) {
- tasks.add(task);
- }
- }
-
- for (ITask task : tasks) {
- addAddresses(task, addressSet);
- }
- }
-
- return addressSet;
- }
-
- private void addAddresses(ITask task, Set<String> addressSet) {
- // TODO: Creator, and CC should be stored on AbstractTask
-
- addAddress(task.getOwner(), addressSet);
- }
-
- private void addAddresses(RepositoryTaskData data, Set<String> addressSet) {
- // addressSet.add(data.getAssignedTo()); // owner
- addAddress(data.getReporter(), addressSet); // ??
- for (String address : data.getCc()) {
- addAddress(address, addressSet);
- }
- for (TaskComment comment : currentTaskData.getComments()) {
- addAddress(comment.getAuthor(), addressSet);
- }
- for (RepositoryAttachment attachment : currentTaskData.getAttachments()) {
- addAddress(attachment.getCreator(), addressSet);
- }
- }
-
- private void addAddress(String address, Set<String> addressSet) {
- if (address != null && address.trim().length() > 0) {
- addressSet.add(address.trim());
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/PlanningPerspectiveFactory.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/PlanningPerspectiveFactory.java
deleted file mode 100644
index b24865f8c..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/PlanningPerspectiveFactory.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui;
-
-import java.util.ArrayList;
-
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.ui.IFolderLayout;
-import org.eclipse.ui.IPageLayout;
-import org.eclipse.ui.IPerspectiveFactory;
-import org.eclipse.ui.internal.PageLayout;
-
-/**
- * @author Mik Kersten
- */
-public class PlanningPerspectiveFactory implements IPerspectiveFactory {
-
- public void createInitialLayout(IPageLayout layout) {
- defineActions(layout);
- defineLayout(layout);
- }
-
- public void defineActions(IPageLayout layout) {
- layout.addShowViewShortcut(IPageLayout.ID_RES_NAV);
- layout.addShowViewShortcut(IPageLayout.ID_PROP_SHEET);
- layout.addShowViewShortcut(TaskListView.ID);
- // layout.addShowViewShortcut(TaskActivityView.ID);
-
- layout.addActionSet(IPageLayout.ID_NAVIGATE_ACTION_SET);
- removeUninterestingActionSets(layout);
- }
-
- public void defineLayout(IPageLayout layout) {
- String editorArea = layout.getEditorArea();
-
- IFolderLayout topRight = layout.createFolder("topRight", IPageLayout.RIGHT, (float) 0.6, editorArea);//$NON-NLS-1$
- topRight.addView(TaskListView.ID);
-
- // IFolderLayout bottomLeft = layout.createFolder(
- // "bottomLeft", IPageLayout.BOTTOM, (float) 0.50,//$NON-NLS-1$
- // "topLeft");//$NON-NLS-1$
- // bottomLeft.addView(TaskActivityView.ID);
- topRight.addPlaceholder(IPageLayout.ID_RES_NAV);
-
- // IFolderLayout bottomRight = layout.createFolder(
- // "bottomRight", IPageLayout.BOTTOM, (float) 0.66,//$NON-NLS-1$
- // editorArea);
- //
- // bottomRight.addView(IPageLayout.ID_TASK_LIST);
-
- }
-
- @SuppressWarnings("unchecked")
- public static void removeUninterestingActionSets(IPageLayout layout) {
- ArrayList actionSets = ((PageLayout) layout).getActionSets();
- actionSets.remove("org.eclipse.ui.edit.text.actionSet.annotationNavigation");
- actionSets.remove("org.eclipse.ui.edit.text.actionSet.convertLineDelimitersTo");
- actionSets.remove("org.eclipse.ui.externaltools.ExternalToolsSet");
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/RefactorRepositoryUrlOperation.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/RefactorRepositoryUrlOperation.java
deleted file mode 100644
index b52e4a2b9..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/RefactorRepositoryUrlOperation.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui;
-
-import java.io.File;
-import java.lang.reflect.InvocationTargetException;
-import java.net.URLDecoder;
-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.internal.context.core.ContextCorePlugin;
-import org.eclipse.mylyn.internal.context.core.InteractionContext;
-import org.eclipse.mylyn.internal.context.core.InteractionContextManager;
-import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryTaskHandleUtil;
-import org.eclipse.mylyn.internal.tasks.core.TaskDataStorageManager;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskAttribute;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-import org.eclipse.mylyn.monitor.core.InteractionEvent;
-import org.eclipse.mylyn.tasks.core.ITask;
-
-/**
- * @author Rob Elves
- */
-public class RefactorRepositoryUrlOperation extends TaskListModifyOperation {
-
- private final String oldUrl;
-
- private final String newUrl;
-
- public RefactorRepositoryUrlOperation(String oldUrl, String newUrl) {
- super(ITasksCoreConstants.ROOT_SCHEDULING_RULE);
- this.oldUrl = oldUrl;
- this.newUrl = newUrl;
- }
-
- @Override
- protected void operations(IProgressMonitor monitor) throws CoreException, InvocationTargetException,
- InterruptedException {
- if (oldUrl == null || newUrl == null || oldUrl.equals(newUrl)) {
- return;
- }
- try {
- //TasksUiPlugin.getTaskListManager().deactivateAllTasks();
- monitor.beginTask("Repository URL update", IProgressMonitor.UNKNOWN);
- refactorOfflineHandles(oldUrl, newUrl);
- getTaskList().refactorRepositoryUrl(oldUrl, newUrl);
- refactorMetaContextHandles(oldUrl, newUrl);
- refactorContextFileNames();
- TasksUiPlugin.getExternalizationManager()
- .saveNow(new SubProgressMonitor(monitor, IProgressMonitor.UNKNOWN));
- TasksUiPlugin.getTaskActivityMonitor().reloadActivityTime();
- } finally {
- monitor.done();
- }
- }
-
- @SuppressWarnings("restriction")
- public void refactorContextFileNames() {
-
- File dataDir = new File(TasksUiPlugin.getDefault().getDataDirectory(), ITasksCoreConstants.CONTEXTS_DIRECTORY);
- if (dataDir.exists() && dataDir.isDirectory()) {
- File[] files = dataDir.listFiles();
- if (files != null) {
- for (File file : dataDir.listFiles()) {
- int dotIndex = file.getName().lastIndexOf(".xml");
- if (dotIndex != -1) {
- String storedHandle;
- try {
- storedHandle = URLDecoder.decode(file.getName().substring(0, dotIndex),
- InteractionContextManager.CONTEXT_FILENAME_ENCODING);
- int delimIndex = storedHandle.lastIndexOf(RepositoryTaskHandleUtil.HANDLE_DELIM);
- if (delimIndex != -1) {
- String storedUrl = storedHandle.substring(0, delimIndex);
- if (oldUrl.equals(storedUrl)) {
- String id = RepositoryTaskHandleUtil.getTaskId(storedHandle);
- String newHandle = RepositoryTaskHandleUtil.getHandle(newUrl, id);
- File newFile = ContextCorePlugin.getContextStore().getFileForContext(newHandle);
- file.renameTo(newFile);
- }
- }
- } catch (Exception e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Could not move context file: " + file.getName(), e));
- }
- }
- }
- }
- }
- }
-
- private void refactorOfflineHandles(String oldRepositoryUrl, String newRepositoryUrl) {
- TaskDataStorageManager taskDataManager = TasksUiPlugin.getTaskDataStorageManager();
- for (ITask task : getTaskList().getAllTasks()) {
- if (task != null) {
- ITask repositoryTask = task;
- if (repositoryTask.getRepositoryUrl().equals(oldRepositoryUrl)) {
- RepositoryTaskData newTaskData = taskDataManager.getNewTaskData(repositoryTask.getRepositoryUrl(),
- repositoryTask.getTaskId());
- RepositoryTaskData oldTaskData = taskDataManager.getOldTaskData(repositoryTask.getRepositoryUrl(),
- repositoryTask.getTaskId());
- Set<RepositoryTaskAttribute> edits = taskDataManager.getEdits(repositoryTask.getRepositoryUrl(),
- repositoryTask.getTaskId());
- taskDataManager.remove(repositoryTask.getRepositoryUrl(), repositoryTask.getTaskId());
-
- if (newTaskData != null) {
- newTaskData.setRepositoryURL(newRepositoryUrl);
- taskDataManager.setNewTaskData(newTaskData);
- }
- if (oldTaskData != null) {
- oldTaskData.setRepositoryURL(newRepositoryUrl);
- taskDataManager.setOldTaskData(oldTaskData);
- }
- if (!edits.isEmpty()) {
- taskDataManager.saveEdits(newRepositoryUrl, repositoryTask.getTaskId(), edits);
- }
- }
- }
- }
- TasksUiPlugin.getTaskDataStorageManager().saveNow();
- }
-
- @SuppressWarnings("restriction")
- private void refactorMetaContextHandles(String oldRepositoryUrl, String newRepositoryUrl) {
- InteractionContext metaContext = ContextCorePlugin.getContextManager().getActivityMetaContext();
- ContextCorePlugin.getContextManager().resetActivityMetaContext();
- InteractionContext newMetaContext = ContextCorePlugin.getContextManager().getActivityMetaContext();
- for (InteractionEvent event : metaContext.getInteractionHistory()) {
- if (event.getStructureHandle() != null) {
- String storedUrl = RepositoryTaskHandleUtil.getRepositoryUrl(event.getStructureHandle());
- if (storedUrl != null) {
- if (oldRepositoryUrl.equals(storedUrl)) {
- String taskId = RepositoryTaskHandleUtil.getTaskId(event.getStructureHandle());
- if (taskId != null) {
- String newHandle = RepositoryTaskHandleUtil.getHandle(newRepositoryUrl, taskId);
- event = new InteractionEvent(event.getKind(), event.getStructureKind(), newHandle,
- event.getOriginId(), event.getNavigation(), event.getDelta(),
- event.getInterestContribution(), event.getDate(), event.getEndDate());
- }
- }
- }
- }
- newMetaContext.parseEvent(event);
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/RepositoryAwareStatusHandler.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/RepositoryAwareStatusHandler.java
deleted file mode 100644
index bc36613ae..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/RepositoryAwareStatusHandler.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Mik Kersten
- * @author Rob Elves
- */
-@Deprecated
-public class RepositoryAwareStatusHandler {
-
- protected static final String ERROR_MESSAGE = "Please report the following error at:\n"
- + "http://bugs.eclipse.org/bugs/enter_bug.cgi?product=Mylyn\n\n"
- + "Or via the popup menu in the Error Log view (see Window -> Show View)";
-
- /**
- * Used to ensure that only one dialog is open.
- */
- private static boolean errorDialogOpen = false;
-
- private static RepositoryAwareStatusHandler instance;
-
- public synchronized static RepositoryAwareStatusHandler getInstance() {
- if (instance == null) {
- new RepositoryAwareStatusHandler();
- }
- return instance;
- }
-
- public RepositoryAwareStatusHandler() {
- instance = this;
- }
-
- @Deprecated
- public void fail(final IStatus status, boolean informUser) {
- if (informUser && Platform.isRunning()) {
- try {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- Shell shell = null;
- if (PlatformUI.getWorkbench() != null
- && PlatformUI.getWorkbench().getActiveWorkbenchWindow() != null) {
- shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- }
-
- // ensure that only one dialog can be open at a time
- synchronized (shell) {
- try {
- if (!errorDialogOpen) {
- errorDialogOpen = true;
- ErrorDialog.openError(shell, "Mylyn Error", ERROR_MESSAGE, status);
- }
- } finally {
- errorDialogOpen = false;
- }
- }
- }
- });
- } catch (Throwable t) {
- status.getException().printStackTrace();
- }
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/RepositoryReport.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/RepositoryReport.java
deleted file mode 100644
index e16ea6838..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/RepositoryReport.java
+++ /dev/null
@@ -1,9 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.ui;
-
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ScheduleDatePicker.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ScheduleDatePicker.java
deleted file mode 100644
index 110cbb1c7..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ScheduleDatePicker.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui;
-
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.mylyn.internal.provisional.commons.ui.DatePicker;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.DateRange;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * @author Rob Elves
- */
-public class ScheduleDatePicker extends Composite {
-
- private Text scheduledDateText = null;
-
- private Button pickButton = null;
-
- private final List<SelectionListener> pickerListeners = new LinkedList<SelectionListener>();
-
- private final SimpleDateFormat simpleDateFormat = (SimpleDateFormat) DateFormat.getDateInstance(DateFormat.MEDIUM);
-
- private final String initialText = DatePicker.LABEL_CHOOSE;
-
- private final List<IRepositoryElement> tasks;
-
- private final ScheduleTaskMenuContributor contributor;
-
- private DateRange scheduledDate;
-
- private final boolean isFloating = false;
-
- public ScheduleDatePicker(Composite parent, AbstractTask task, int style) {
- super(parent, style);
- if (task != null) {
- if (task.getScheduledForDate() != null) {
- this.scheduledDate = task.getScheduledForDate();
- }
- }
-
- initialize((style & SWT.FLAT) > 0 ? SWT.FLAT : 0);
- contributor = new ScheduleTaskMenuContributor() {
-
- @Override
- protected DateRange getScheduledForDate(AbstractTask singleTaskSelection) {
- return ScheduleDatePicker.this.scheduledDate;
- }
-
- @Override
- protected void setScheduledDate(DateRange dateRange) {
- if (dateRange != null) {
- scheduledDate = dateRange;
- } else {
- scheduledDate = null;
- }
- updateDateText();
- notifyPickerListeners();
- }
- };
- tasks = new ArrayList<IRepositoryElement>();
- tasks.add(task);
- }
-
- public void setDatePattern(String pattern) {
- simpleDateFormat.applyPattern(pattern);
- }
-
- private void initialize(int style) {
-
- GridLayout gridLayout = new GridLayout(2, false);
- gridLayout.horizontalSpacing = 0;
- gridLayout.verticalSpacing = 0;
- gridLayout.marginWidth = 0;
- gridLayout.marginHeight = 0;
- this.setLayout(gridLayout);
-
- scheduledDateText = new Text(this, style);
- scheduledDateText.setEditable(false);
- GridData dateTextGridData = new GridData(SWT.FILL, SWT.FILL, false, false);
- dateTextGridData.widthHint = 135;
- dateTextGridData.verticalIndent = 0;
-
- scheduledDateText.setLayoutData(dateTextGridData);
- scheduledDateText.setText(initialText);
-
- pickButton = new Button(this, style | SWT.ARROW | SWT.DOWN);
- GridData pickButtonGridData = new GridData(SWT.RIGHT, SWT.FILL, false, true);
- pickButtonGridData.verticalIndent = 0;
- pickButton.setLayoutData(pickButtonGridData);
- pickButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent arg0) {
-
- MenuManager menuManager = contributor.getSubMenuManager(tasks);
- Menu menu = menuManager.createContextMenu(pickButton);
- pickButton.setMenu(menu);
- menu.setVisible(true);
- }
- });
-
- updateDateText();
- pack();
- }
-
- public void addPickerSelectionListener(SelectionListener listener) {
- pickerListeners.add(listener);
- }
-
- @Override
- public void setBackground(Color backgroundColor) {
- scheduledDateText.setBackground(backgroundColor);
- super.setBackground(backgroundColor);
- }
-
- private void notifyPickerListeners() {
- for (SelectionListener listener : pickerListeners) {
- listener.widgetSelected(null);
- }
- }
-
- private void updateDateText() {
- if (scheduledDate != null) {
- scheduledDateText.setText(scheduledDate.toString());
- } else {
- scheduledDateText.setEnabled(false);
- scheduledDateText.setText(DatePicker.LABEL_CHOOSE);
- scheduledDateText.setEnabled(true);
- }
- }
-
- @Override
- public void setEnabled(boolean enabled) {
- scheduledDateText.setEnabled(enabled);
- pickButton.setEnabled(enabled);
- super.setEnabled(enabled);
- }
-
- public DateRange getScheduledDate() {
- return scheduledDate;
- }
-
- public void setScheduledDate(DateRange date) {
- scheduledDate = date;
- updateDateText();
- }
-
- public boolean isFloatingDate() {
- return isFloating;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ScheduleTaskMenuContributor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ScheduleTaskMenuContributor.java
deleted file mode 100644
index bb44f1c9b..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ScheduleTaskMenuContributor.java
+++ /dev/null
@@ -1,255 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui;
-
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.List;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.window.Window;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.provisional.commons.ui.DatePicker;
-import org.eclipse.mylyn.internal.provisional.commons.ui.DateSelectionDialog;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.DateRange;
-import org.eclipse.mylyn.internal.tasks.core.TaskActivityUtil;
-import org.eclipse.mylyn.internal.tasks.core.WeekDateRange;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Rob Elves
- * @author Mik Kersten
- */
-public class ScheduleTaskMenuContributor implements IDynamicSubMenuContributor {
-
- private static final String LABEL_REMINDER = "Schedule for";
-
- private static final String LABEL_FUTURE = "Future";
-
- private static final String LABEL_CALENDAR = "Choose Date...";
-
- private static final String LABEL_NOT_SCHEDULED = "Not Scheduled";
-
- private AbstractTask singleTaskSelection;
-
- private final List<IRepositoryElement> taskListElementsToSchedule = new ArrayList<IRepositoryElement>();
-
- public MenuManager getSubMenuManager(final List<IRepositoryElement> selectedElements) {
-
- taskListElementsToSchedule.clear();
-
- final MenuManager subMenuManager = new MenuManager(LABEL_REMINDER);
-
- if (selectedElements.size() == 1) {
- IRepositoryElement selectedElement = selectedElements.get(0);
- if (selectedElement instanceof ITask) {
- singleTaskSelection = (AbstractTask) selectedElement;
- if (singleTaskSelection.isCompleted()) {
- Action action = new Action() {
- @Override
- public void run() {
- // ignore
- }
- };
- action.setText("Cannot schedule completed tasks");
- action.setEnabled(false);
- subMenuManager.add(action);
- return subMenuManager;
- }
- }
- }
-
- for (IRepositoryElement selectedElement : selectedElements) {
- if (selectedElement instanceof ITask) {
- taskListElementsToSchedule.add(selectedElement);
- }
- }
-
- WeekDateRange week = TaskActivityUtil.getCurrentWeek();
- int days = 0;
- for (DateRange day : week.getDaysOfWeek()) {
- if (day.includes(TaskActivityUtil.getCalendar())) {
- days++;
- // Today
- Action action = createDateSelectionAction(day, CommonImages.SCHEDULE_DAY);
- subMenuManager.add(action);
- // Special case: Over scheduled tasks always 'scheduled' for today
- if (singleTaskSelection != null && day.equals(singleTaskSelection.getScheduledForDate())
- && isPastReminder(singleTaskSelection)) {
- action.setChecked(true);
- }
- } else if (day.after(TaskActivityUtil.getCalendar())) {
- days++;
- // Week Days
- Action action = createDateSelectionAction(day, null);
- subMenuManager.add(action);
- }
- }
-
- // Next week days
- int toAdd = 7 - days;
- WeekDateRange nextWeek = TaskActivityUtil.getNextWeek();
- for (int x = 0; x < toAdd; x++) {
- DateRange day = nextWeek.getDayOfWeek(TasksUiPlugin.getTaskActivityManager().getWeekStartDay() + x);
- Action action = createDateSelectionAction(day, null);
- subMenuManager.add(action);
- }
-
- subMenuManager.add(new Separator());
-
- // This Week
- Action action = createDateSelectionAction(week, CommonImages.SCHEDULE_WEEK);
- subMenuManager.add(action);
-
- // Next Week
- action = createDateSelectionAction(week.next(), null);
- subMenuManager.add(action);
-
- // Future
- if (singleTaskSelection != null && getScheduledForDate(singleTaskSelection) != null) {
- if (singleTaskSelection.getScheduledForDate().after(week.next().getEndDate())) {
- action = new Action() {
- @Override
- public void run() {
- // ignore
- }
- };
- action.setChecked(true);
- action.setText(LABEL_FUTURE);
- subMenuManager.add(action);
- }
- }
-
- subMenuManager.add(new Separator());
-
- // Date Selection Dialog
- action = new Action() {
- @Override
- public void run() {
- Calendar theCalendar = TaskActivityUtil.getCalendar();
- if (getScheduledForDate(singleTaskSelection) != null) {
- theCalendar.setTime(getScheduledForDate(singleTaskSelection).getStartDate().getTime());
- }
- DateSelectionDialog reminderDialog = new DateSelectionDialog(PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow()
- .getShell(), theCalendar, DatePicker.TITLE_DIALOG, false, TasksUiPlugin.getDefault()
- .getPreferenceStore()
- .getInt(ITasksUiPreferenceConstants.PLANNING_ENDHOUR));
- int result = reminderDialog.open();
- if (result == Window.OK) {
- DateRange range = null;
- if (reminderDialog.getDate() != null) {
- range = TaskActivityUtil.getDayOf(reminderDialog.getDate());
- }
-
- setScheduledDate(range);
- }
- }
- };
- action.setText(LABEL_CALENDAR);
-// action.setImageDescriptor(TasksUiImages.CALENDAR);
-// action.setImageDescriptor(TasksUiImages.SCHEDULE_DAY);
- action.setEnabled(canSchedule());
- subMenuManager.add(action);
-
- action = new Action() {
- @Override
- public void run() {
- setScheduledDate(null);
- }
- };
- action.setText(LABEL_NOT_SCHEDULED);
-// action.setImageDescriptor(TasksUiImages.REMOVE);
- if (getScheduledForDate(singleTaskSelection) == null) {
- action.setChecked(true);
- }
- subMenuManager.add(action);
- return subMenuManager;
- }
-
- private Action createDateSelectionAction(final DateRange dateContainer, ImageDescriptor imageDescriptor) {
- Action action = new Action() {
- @Override
- public void run() {
- setScheduledDate(dateContainer);
- }
- };
- action.setText(dateContainer.toString());
- action.setImageDescriptor(imageDescriptor);
- action.setEnabled(canSchedule());
-
- DateRange scheduledDate = getScheduledForDate(singleTaskSelection);
- if (scheduledDate != null) {
- action.setChecked(dateContainer.equals(scheduledDate));
- }
- return action;
- }
-
- private boolean canSchedule() {
- if (taskListElementsToSchedule.size() == 0) {
- return true;
- } else if (singleTaskSelection instanceof ITask) {
- return ((!(singleTaskSelection).isCompleted()) || taskListElementsToSchedule.size() > 0);
- } else {
- return taskListElementsToSchedule.size() > 0;
- }
- }
-
-// protected void setScheduledDate(Calendar scheduledDate, boolean floating) {
-// for (AbstractTaskContainer element : taskListElementsToSchedule) {
-// AbstractTask task = getTaskForElement(element, true);
-// if (scheduledDate != null) {
-// TasksUiPlugin.getTaskActivityManager().setScheduledFor(task, scheduledDate.getTime(), floating);
-// } else {
-// TasksUiPlugin.getTaskActivityManager().setScheduledFor(task, null, floating);
-// }
-// }
-// }
-
- protected void setScheduledDate(DateRange dateContainer) {
- for (IRepositoryElement element : taskListElementsToSchedule) {
- AbstractTask task = getTaskForElement(element, true);
- if (dateContainer != null) {
- TasksUiPlugin.getTaskActivityManager().setScheduledFor(task, dateContainer);
- } else {
- TasksUiPlugin.getTaskActivityManager().setScheduledFor(task, null);
- }
- }
- }
-
- protected DateRange getScheduledForDate(final AbstractTask singleTaskSelection) {
- if (singleTaskSelection != null) {
- return singleTaskSelection.getScheduledForDate();
- }
- return null;
- }
-
-// protected boolean isFloating(AbstractTask task) {
-// return task.internalIsFloatingScheduledDate();
-// }
-
- private boolean isPastReminder(AbstractTask task) {
- return TasksUiPlugin.getTaskActivityManager().isPastReminder(task);
- }
-
- private AbstractTask getTaskForElement(IRepositoryElement element, boolean force) {
- AbstractTask task = null;
- if (element instanceof ITask) {
- task = (AbstractTask) element;
- }
- return task;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ScheduledPresentation.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ScheduledPresentation.java
deleted file mode 100644
index 28f91cec3..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ScheduledPresentation.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui;
-
-import org.eclipse.mylyn.internal.tasks.ui.views.AbstractTaskListContentProvider;
-import org.eclipse.mylyn.internal.tasks.ui.views.AbstractTaskListPresentation;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskScheduleContentProvider;
-
-/**
- * @author Mik Kersten
- */
-public class ScheduledPresentation extends AbstractTaskListPresentation {
-
- public static final String ID = "org.eclipse.mylyn.tasks.ui.scheduled";
-
- public ScheduledPresentation() {
- super(ID);
- }
-
- @Override
- public AbstractTaskListContentProvider createContentProvider(TaskListView taskListView) {
- return new TaskScheduleContentProvider(taskListView);
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskActivityMonitor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskActivityMonitor.java
deleted file mode 100644
index e49764b09..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskActivityMonitor.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui;
-
-import java.util.List;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.context.core.AbstractContextListener;
-import org.eclipse.mylyn.context.core.IInteractionElement;
-import org.eclipse.mylyn.internal.context.core.InteractionContextManager;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
-import org.eclipse.mylyn.internal.tasks.core.TaskActivityManager;
-import org.eclipse.mylyn.internal.tasks.core.TaskList;
-import org.eclipse.mylyn.monitor.core.InteractionEvent;
-import org.eclipse.mylyn.tasks.core.ITask;
-
-/**
- * Monitors task activity and maintains task activation history
- *
- * @author Robert Elves
- * @author Steffen Pingel
- * @since 3.0
- */
-@SuppressWarnings("restriction")
-public class TaskActivityMonitor {
-
- private final InteractionContextManager contextManager;
-
- private final TaskActivityManager taskActivityManager;
-
- private final TaskList taskList;
-
- private final AbstractContextListener CONTEXT_LISTENER = new AbstractContextListener() {
-
- @Override
- public void interestChanged(List<IInteractionElement> elements) {
- List<InteractionEvent> events = contextManager.getActivityMetaContext().getInteractionHistory();
- InteractionEvent event = events.get(events.size() - 1);
- parseInteractionEvent(event, false);
-
- }
- };
-
- private ActivityExternalizationParticipant externalizationParticipant;
-
- public TaskActivityMonitor(TaskActivityManager taskActivityManager, InteractionContextManager contextManager) {
- this.taskActivityManager = taskActivityManager;
- this.contextManager = contextManager;
- this.taskList = TasksUiPlugin.getTaskList();
- }
-
- public void start() {
- contextManager.addActivityMetaContextListener(CONTEXT_LISTENER);
- }
-
- /** public for testing */
- public boolean parseInteractionEvent(InteractionEvent event, boolean isReloading) {
- try {
- if (event.getKind().equals(InteractionEvent.Kind.COMMAND)) {
- if ((event.getDelta().equals(InteractionContextManager.ACTIVITY_DELTA_ACTIVATED))) {
- //addActivationHistory
- AbstractTask activatedTask = taskList.getTask(event.getStructureHandle());
- if (activatedTask != null) {
- taskActivityManager.getTaskActivationHistory().addTask(activatedTask);
- return true;
- }
- }
- } else if (event.getKind().equals(InteractionEvent.Kind.ATTENTION)) {
- boolean changed = false;
- if ((event.getDelta().equals("added") || event.getDelta().equals("add"))) {
- AbstractTask activatedTask = taskList.getTask(event.getStructureHandle());
- if (activatedTask != null) {
- taskActivityManager.addElapsedTime(activatedTask, event.getDate(), event.getEndDate());
- changed = true;
- } else {
- taskActivityManager.addElapsedNoTaskActive(event.getStructureHandle(), event.getDate(),
- event.getEndDate());
- externalizationParticipant.setDirty(true);
- changed = true;
- }
- } else if (event.getDelta().equals("removed")) {
- ITask task = taskList.getTask(event.getStructureHandle());
- if (task != null) {
- taskActivityManager.removeElapsedTime(task, event.getDate(), event.getEndDate());
- changed = true;
- }
- }
- if (!isReloading && changed == true) {
- TasksUiPlugin.getExternalizationManager().requestSave();
- }
- }
- } catch (Throwable t) {
- StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN,
- "Error parsing interaction event", t));
- }
- return false;
- }
-
- public void stop() {
- contextManager.removeActivityMetaContextListener(CONTEXT_LISTENER);
- }
-
- public void reloadActivityTime() {
- taskActivityManager.clearActivity();
- List<InteractionEvent> events = contextManager.getActivityMetaContext().getInteractionHistory();
- for (InteractionEvent event : events) {
- parseInteractionEvent(event, true);
- }
- }
-
- /**
- * Returns the task corresponding to the interaction event history item at the specified position
- */
- protected ITask getHistoryTaskAt(int pos) {
- InteractionEvent event = contextManager.getActivityMetaContext().getInteractionHistory().get(pos);
- if (event.getDelta().equals(InteractionContextManager.ACTIVITY_DELTA_ACTIVATED)) {
- return TasksUiPlugin.getTaskList().getTask(event.getStructureHandle());
- } else {
- return null;
- }
- }
-
- public void setExternalizationParticipant(ActivityExternalizationParticipant participant) {
- this.externalizationParticipant = participant;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskArchiveFilter.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskArchiveFilter.java
deleted file mode 100644
index 80b63463e..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskArchiveFilter.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.ui;
-
-import org.eclipse.mylyn.internal.tasks.core.UnmatchedTaskContainer;
-
-/**
- * @author Mik Kersten
- */
-public class TaskArchiveFilter extends AbstractTaskListFilter {
-
- @Override
- public boolean select(Object parent, Object element) {
- if (element instanceof UnmatchedTaskContainer) {
- if (((UnmatchedTaskContainer) element).isEmpty()) {
- return false;
- }
- }
-// if (element instanceof UnfiledCategory) {
-// if (((UnfiledCategory) element).isEmpty()) {
-// return false;
-// }
-// }
-// if (element instanceof TaskArchive) {
-// return false;
-// }
- return true;
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskCompletionFilter.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskCompletionFilter.java
deleted file mode 100644
index 7c46f8b2f..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskCompletionFilter.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.ui;
-
-import org.eclipse.mylyn.tasks.core.ITask;
-
-/**
- * @author Mik Kersten
- */
-public class TaskCompletionFilter extends AbstractTaskListFilter {
-
- @Override
- public boolean select(Object parent, Object element) {
- if (element instanceof ITask) {
- ITask task = (ITask) element;
- return !task.isCompleted();
- }
- return true;
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskEditorBloatMonitor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskEditorBloatMonitor.java
deleted file mode 100644
index 16eb5206a..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskEditorBloatMonitor.java
+++ /dev/null
@@ -1,73 +0,0 @@
-package org.eclipse.mylyn.internal.tasks.ui;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.mylyn.monitor.ui.AbstractEditorTracker;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IEditorReference;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-
-/**
- * @author Mik Kersten
- */
-public class TaskEditorBloatMonitor extends AbstractEditorTracker {
-
- private final int MAX_EDITORS = 12;
-
- @Override
- protected void editorBroughtToTop(IEditorPart part) {
- // ignore
- }
-
- @Override
- public void editorOpened(IEditorPart editorPartOpened) {
- IWorkbenchPage page = editorPartOpened.getSite().getPage();
- List<IEditorReference> toClose = new ArrayList<IEditorReference>();
- int totalTaskEditors = 0;
- for (IEditorReference editorReference : page.getEditorReferences()) {
- try {
- if (editorReference.getEditorInput() instanceof TaskEditorInput) {
- totalTaskEditors++;
- }
- } catch (PartInitException e) {
- // ignore
- }
- }
-
- if (totalTaskEditors > MAX_EDITORS) {
- for (IEditorReference editorReference : page.getEditorReferences()) {
- try {
- if (editorReference.getEditorInput() instanceof TaskEditorInput) {
- TaskEditorInput taskEditorInput = (TaskEditorInput) editorReference.getEditorInput();
- TaskEditor taskEditor = (TaskEditor) editorReference.getEditor(false);
- if (taskEditor == null) {
- toClose.add(editorReference);
- } else if (!taskEditor.equals(editorPartOpened) && !taskEditor.isDirty()
- && taskEditorInput.getTask() != null
- && taskEditorInput.getTask().getSynchronizationState().isSynchronized()) {
- toClose.add(editorReference);
- }
- }
- if ((totalTaskEditors - toClose.size()) < MAX_EDITORS) {
- break;
- }
- } catch (PartInitException e) {
- // ignore
- }
- }
- }
-
- if (toClose.size() > 0) {
- page.closeEditors(toClose.toArray(new IEditorReference[toClose.size()]), true);
- }
- }
-
- @Override
- public void editorClosed(IEditorPart editorPart) {
- // ignore
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskHistoryDropDown.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskHistoryDropDown.java
deleted file mode 100644
index 4b2351995..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskHistoryDropDown.java
+++ /dev/null
@@ -1,221 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui;
-
-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.IAdaptable;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.ActionContributionItem;
-import org.eclipse.jface.action.IContributionItem;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.TaskActivationHistory;
-import org.eclipse.mylyn.internal.tasks.ui.actions.ActivateTaskDialogAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.TaskActivateAction;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITaskContainer;
-import org.eclipse.mylyn.tasks.ui.TaskElementLabelProvider;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.IWorkingSet;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.CompoundContributionItem;
-import org.eclipse.ui.menus.CommandContributionItem;
-
-/**
- * @author Wesley Coelho
- * @author Mik Kersten
- * @author Leo Dos Santos
- * @author Steffen Pingel
- */
-public class TaskHistoryDropDown extends CompoundContributionItem {
-
- private class ActivateDialogAction extends Action {
-
- private final ActivateTaskDialogAction dialogAction;
-
- public ActivateDialogAction(ActivateTaskDialogAction action) {
- dialogAction = action;
- dialogAction.init(PlatformUI.getWorkbench().getActiveWorkbenchWindow());
-
- setText("Activate Task...");
- setToolTipText("Activate Task...");
- setEnabled(true);
- setChecked(false);
- setImageDescriptor(null);
- //TasksUiImages.TASK_ACTIVE);
- }
-
- @Override
- public void run() {
- dialogAction.run(null);
- }
- }
-
- private class DeactivateTaskAction extends Action {
-
- public DeactivateTaskAction() {
- setText("Deactivate Task");
- setToolTipText("Deactivate Task");
- setEnabled(true);
- setChecked(false);
- setImageDescriptor(null);
- //TasksUiImages.TASK_INACTIVE);
- }
-
- @Override
- public void run() {
- ITask active = TasksUi.getTaskActivityManager().getActiveTask();
- if (active != null) {
- TasksUi.getTaskActivityManager().deactivateTask(active);
- }
- }
-
- }
-
- /**
- * Action for navigating to a specified task. This class should be protected but has been made public for testing
- * only
- */
- private class ActivateTaskAction extends Action {
-
- private static final int MAX_LABEL_LENGTH = 40;
-
- private final AbstractTask targetTask;
-
- public ActivateTaskAction(AbstractTask task) {
- targetTask = task;
- String taskDescription = task.getSummary();
- if (taskDescription.length() > MAX_LABEL_LENGTH) {
- taskDescription = taskDescription.subSequence(0, MAX_LABEL_LENGTH - 3) + "...";
- }
- setText(taskDescription);
- setEnabled(true);
- setToolTipText(task.getSummary());
- Image image = labelProvider.getImage(task);
- setImageDescriptor(ImageDescriptor.createFromImage(image));
- }
-
- @Override
- public void run() {
- if (targetTask.isActive()) {
- return;
- }
- new TaskActivateAction().run(targetTask);
- }
- }
-
- private final static int MAX_ITEMS_TO_DISPLAY = 12;
-
- private final TaskElementLabelProvider labelProvider = new TaskElementLabelProvider(false);
-
- private boolean scopedToWorkingSet;
-
- private final TaskActivationHistory taskHistory;
-
- public TaskHistoryDropDown() {
- this(null);
- }
-
- public TaskHistoryDropDown(String id) {
- this(id, TasksUiPlugin.getTaskActivityManager().getTaskActivationHistory());
- }
-
- public TaskHistoryDropDown(String id, TaskActivationHistory taskHistory) {
- super(id);
- this.taskHistory = taskHistory;
- }
-
- @Override
- @SuppressWarnings("deprecation")
- protected IContributionItem[] getContributionItems() {
- List<AbstractTask> tasks = new ArrayList<AbstractTask>(taskHistory.getPreviousTasks());
- Set<IWorkingSet> sets = TaskListView.getActiveWorkingSets();
- if (scopedToWorkingSet && !sets.isEmpty()) {
- Set<ITask> allWorkingSetTasks = new HashSet<ITask>();
- for (IWorkingSet workingSet : sets) {
- IAdaptable[] elements = workingSet.getElements();
- for (IAdaptable adaptable : elements) {
- if (adaptable instanceof ITaskContainer) {
- allWorkingSetTasks.addAll(((ITaskContainer) adaptable).getChildren());
- }
- }
- }
- List<AbstractTask> allScopedTasks = new ArrayList<AbstractTask>(tasks);
- for (ITask task : tasks) {
- if (!allWorkingSetTasks.contains(task)) {
- allScopedTasks.remove(task);
- }
- }
- tasks = allScopedTasks;
- }
-
- if (tasks.size() > MAX_ITEMS_TO_DISPLAY) {
- tasks = tasks.subList(tasks.size() - MAX_ITEMS_TO_DISPLAY, tasks.size());
- }
-
- List<IContributionItem> items = new ArrayList<IContributionItem>();
- for (int i = tasks.size() - 1; i >= 0; i--) {
- AbstractTask currTask = tasks.get(i);
- Action taskNavAction = new ActivateTaskAction(currTask);
- ActionContributionItem item = new ActionContributionItem(taskNavAction);
- if (currTask.isActive()) {
- taskNavAction.setChecked(true);
- }
- items.add(item);
- }
-
- Separator separator = new Separator();
- items.add(separator);
-
- ITask active = TasksUi.getTaskActivityManager().getActiveTask();
- if (active != null) {
- IContributionItem pauseContributionItem = new CommandContributionItem(PlatformUI.getWorkbench(),
- "org.eclipse.mylyn.ui.context.capture.pause", // id
- "org.eclipse.mylyn.ui.context.capture.pause.command", // commandId
- Collections.EMPTY_MAP, // params
- TasksUiImages.CONTEXT_CAPTURE_PAUSE, // icon
- null, null, "Pause Capturing Context", // label
- null, // mnemonic
- "Pause Capturing Context", // tooltip
- CommandContributionItem.STYLE_CHECK);
- items.add(pauseContributionItem);
-
- Action deactivateAction = new DeactivateTaskAction();
- ActionContributionItem item = new ActionContributionItem(deactivateAction);
- items.add(item);
- } else {
- Action activateDialogAction = new ActivateDialogAction(new ActivateTaskDialogAction());
- ActionContributionItem item = new ActionContributionItem(activateDialogAction);
- items.add(item);
- }
-
- return items.toArray(new IContributionItem[items.size()]);
- }
-
- public boolean isScopedToWorkingSet() {
- return scopedToWorkingSet;
- }
-
- /**
- * If <code>scopedToWorkingSet</code> is set to true only tasks from the current working set are contributed.
- */
- public void setScopedToWorkingSet(boolean scopedToWorkingSet) {
- this.scopedToWorkingSet = scopedToWorkingSet;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskHistoryHandler.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskHistoryHandler.java
deleted file mode 100644
index 0ba1784a6..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskHistoryHandler.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui;
-
-import java.util.Map;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.Command;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.SafeRunner;
-import org.eclipse.jface.util.SafeRunnable;
-import org.eclipse.mylyn.context.core.ContextCore;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.TaskActivationHistory;
-import org.eclipse.mylyn.internal.tasks.ui.actions.ActivateTaskDialogAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.TaskActivateAction;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.commands.ICommandService;
-import org.eclipse.ui.commands.IElementUpdater;
-import org.eclipse.ui.handlers.HandlerUtil;
-import org.eclipse.ui.menus.UIElement;
-
-/**
- * @author Eugene Kuleshov
- * @author Steffen Pingel
- */
-public class TaskHistoryHandler extends AbstractHandler implements IElementUpdater {
-
- public Object execute(final ExecutionEvent event) throws ExecutionException {
- if (TasksUi.getTaskActivityManager().getActiveTask() != null) {
- if (ContextCore.getContextManager().isContextCapturePaused()) {
- IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow(event);
- if (window != null) {
- ICommandService commandService = (ICommandService) window.getService(ICommandService.class);
- if (commandService != null) {
- final Command command = commandService.getCommand("org.eclipse.mylyn.ui.context.capture.pause.command");
- if (command != null) {
- SafeRunner.run(new SafeRunnable() {
- public void run() throws Exception {
- command.executeWithChecks(event);
- }
- });
- }
- }
- }
- } else {
- TasksUi.getTaskActivityManager().deactivateActiveTask();
- }
- } else {
- TaskActivationHistory taskHistory = TasksUiPlugin.getTaskActivityManager().getTaskActivationHistory();
- if (taskHistory.hasPrevious()) {
- AbstractTask previousTask = taskHistory.getPreviousTask();
- new TaskActivateAction().run(previousTask);
- } else {
- IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow(event);
- if (window != null) {
- ActivateTaskDialogAction action = new ActivateTaskDialogAction();
- action.init(window);
- action.run(null);
- }
- }
- }
- return null;
- }
-
- @SuppressWarnings("unchecked")
- public void updateElement(UIElement element, Map parameters) {
- if (TasksUi.getTaskActivityManager().getActiveTask() == null) {
- element.setIcon(TasksUiImages.CONTEXT_HISTORY_PREVIOUS);
- } else {
- if (ContextCore.getContextManager().isContextCapturePaused()) {
- element.setIcon(TasksUiImages.CONTEXT_HISTORY_PREVIOUS_PAUSE);
- } else {
- element.setIcon(TasksUiImages.CONTEXT_HISTORY_PREVIOUS_ACTIVE);
- }
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskJobFactory.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskJobFactory.java
deleted file mode 100644
index 82e0e995d..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskJobFactory.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui;
-
-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.jobs.Job;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.ITaskJobFactory;
-import org.eclipse.mylyn.internal.tasks.core.ITaskListRunnable;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
-import org.eclipse.mylyn.internal.tasks.core.TaskList;
-import org.eclipse.mylyn.internal.tasks.core.data.TaskDataManager;
-import org.eclipse.mylyn.internal.tasks.core.sync.SubmitTaskAttachmentJob;
-import org.eclipse.mylyn.internal.tasks.core.sync.SubmitTaskJob;
-import org.eclipse.mylyn.internal.tasks.core.sync.SynchronizeQueriesJob;
-import org.eclipse.mylyn.internal.tasks.core.sync.SynchronizeRepositoriesJob;
-import org.eclipse.mylyn.internal.tasks.core.sync.SynchronizeTasksJob;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.IRepositoryManager;
-import org.eclipse.mylyn.tasks.core.IRepositoryModel;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.data.AbstractTaskAttachmentSource;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.mylyn.tasks.core.data.TaskData;
-import org.eclipse.mylyn.tasks.core.sync.SubmitJob;
-import org.eclipse.mylyn.tasks.core.sync.SynchronizationJob;
-import org.eclipse.mylyn.tasks.core.sync.TaskJob;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.ui.progress.IProgressConstants;
-
-/**
- * @author Steffen Pingel
- */
-public class TaskJobFactory implements ITaskJobFactory {
-
- private final TaskList taskList;
-
- private final TaskDataManager taskDataManager;
-
- private final IRepositoryManager repositoryManager;
-
- private final IRepositoryModel tasksModel;
-
- public TaskJobFactory(TaskList taskList, TaskDataManager taskDataManager, IRepositoryManager repositoryManager,
- IRepositoryModel tasksModel) {
- this.taskList = taskList;
- this.taskDataManager = taskDataManager;
- this.repositoryManager = repositoryManager;
- this.tasksModel = tasksModel;
- }
-
- public SynchronizationJob createSynchronizeTasksJob(AbstractRepositoryConnector connector, Set<ITask> tasks) {
- SynchronizeTasksJob job = new SynchronizeTasksJob(taskList, taskDataManager, tasksModel, connector,
- repositoryManager, tasks);
- job.setProperty(IProgressConstants.ICON_PROPERTY, TasksUiImages.REPOSITORY_SYNCHRONIZE);
- job.setPriority(Job.LONG);
- return job;
- }
-
- public SynchronizationJob createSynchronizeTasksJob(AbstractRepositoryConnector connector,
- TaskRepository taskRepository, Set<ITask> tasks) {
- SynchronizeTasksJob job = new SynchronizeTasksJob(taskList, taskDataManager, tasksModel, connector,
- taskRepository, tasks);
- job.setProperty(IProgressConstants.ICON_PROPERTY, TasksUiImages.REPOSITORY_SYNCHRONIZE);
- job.setPriority(Job.LONG);
- return job;
- }
-
- public SynchronizationJob createSynchronizeQueriesJob(AbstractRepositoryConnector connector,
- TaskRepository repository, Set<RepositoryQuery> queries) {
- SynchronizationJob job = new SynchronizeQueriesJob(taskList, taskDataManager, tasksModel, connector,
- repository, queries);
- job.setProperty(IProgressConstants.ICON_PROPERTY, TasksUiImages.REPOSITORY_SYNCHRONIZE);
- job.setPriority(Job.DECORATE);
- return job;
- }
-
- public SynchronizationJob createSynchronizeRepositoriesJob(Set<TaskRepository> repositories) {
- SynchronizeRepositoriesJob job = new SynchronizeRepositoriesJob(taskList, taskDataManager, tasksModel,
- repositoryManager, repositories);
- job.setProperty(IProgressConstants.ICON_PROPERTY, TasksUiImages.REPOSITORY_SYNCHRONIZE);
- job.setPriority(Job.DECORATE);
- return job;
- }
-
- public SubmitJob createSubmitTaskJob(AbstractRepositoryConnector connector, TaskRepository taskRepository,
- final ITask task, TaskData taskData, Set<TaskAttribute> oldAttributes) {
- SubmitJob job = new SubmitTaskJob(taskDataManager, connector, taskRepository, task, taskData, oldAttributes);
- job.setPriority(Job.INTERACTIVE);
- try {
- taskList.run(new ITaskListRunnable() {
- public void execute(IProgressMonitor monitor) throws CoreException {
- ((AbstractTask) task).setSubmitting(true);
- }
- });
- } catch (CoreException e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Unexpected error", e));
- }
- taskList.notifyElementChanged(task);
- return job;
- }
-
- public TaskJob createUpdateRepositoryConfigurationJob(final AbstractRepositoryConnector connector,
- final TaskRepository taskRepository) {
- TaskJob updateJob = new TaskJob("Refreshing repository configuration") {
- private IStatus error;
-
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- monitor.beginTask("Receiving configuration", IProgressMonitor.UNKNOWN);
- try {
- try {
- connector.updateRepositoryConfiguration(taskRepository, monitor);
- } catch (CoreException e) {
- error = e.getStatus();
- }
- } finally {
- monitor.done();
- }
- return Status.OK_STATUS;
- }
-
- @Override
- public boolean belongsTo(Object family) {
- return family == taskRepository;
- }
-
- @Override
- public IStatus getStatus() {
- return error;
- }
- };
- updateJob.setPriority(Job.INTERACTIVE);
- return updateJob;
- }
-
- public SubmitJob createSubmitTaskAttachmentJob(AbstractRepositoryConnector connector,
- TaskRepository taskRepository, final ITask task, AbstractTaskAttachmentSource source, String comment,
- TaskAttribute attachmentAttribute) {
- SubmitJob job = new SubmitTaskAttachmentJob(taskDataManager, connector, taskRepository, task, source, comment,
- attachmentAttribute);
- job.setPriority(Job.INTERACTIVE);
- try {
- taskList.run(new ITaskListRunnable() {
- public void execute(IProgressMonitor monitor) throws CoreException {
- ((AbstractTask) task).setSubmitting(true);
- }
- });
- } catch (CoreException e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Unexpected error", e));
- }
- taskList.notifyElementChanged(task);
- job.setUser(true);
- return job;
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskLabelDecorator.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskLabelDecorator.java
deleted file mode 100644
index 79a96ce8e..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskLabelDecorator.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IDecoration;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.ILightweightLabelDecorator;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-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.ITask.PriorityLevel;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-
-/**
- * @author Mik Kersten
- */
-public class TaskLabelDecorator implements ILightweightLabelDecorator {
-
- public void decorate(Object element, IDecoration decoration) {
-
- ImageDescriptor priorityOverlay = getPriorityImageDescriptor(element);
- if (priorityOverlay != null) {
- decoration.addOverlay(priorityOverlay, IDecoration.BOTTOM_LEFT);
- }
-
- if (element instanceof IRepositoryQuery) {
- IRepositoryQuery query = (IRepositoryQuery) element;
- String repositoryUrl = query.getRepositoryUrl();
- TaskRepository taskRepository = TasksUi.getRepositoryManager().getRepository(query.getConnectorKind(),
- repositoryUrl);
- if (repositoryUrl != null && taskRepository != null) {
- if (taskRepository.getRepositoryUrl().equals(taskRepository.getRepositoryLabel())) {
- try {
- URL url = new URL(repositoryUrl);
- decoration.addSuffix(" [" + url.getHost() + "]");
- } catch (MalformedURLException e) {
- decoration.addSuffix(" [ <unknown host> ]");
- }
- } else {
- decoration.addSuffix(" [" + taskRepository.getRepositoryLabel() + "]");
- }
- }
- } else if (element instanceof ITask) {
- ITask task = (ITask) element;
- if (!task.isCompleted()
- && (TasksUiPlugin.getTaskActivityManager().isDueToday(task) || TasksUiPlugin.getTaskActivityManager()
- .isOverdue(task))) {
- decoration.addOverlay(CommonImages.OVERLAY_DATE_OVERDUE, IDecoration.TOP_RIGHT);
- } else if (!task.isCompleted() && task.getDueDate() != null) {
- decoration.addOverlay(CommonImages.OVERLAY_DATE_DUE, IDecoration.TOP_RIGHT);
- }
- } else if (element instanceof TaskRepository) {
- ImageDescriptor overlay = TasksUiPlugin.getDefault().getOverlayIcon(
- ((TaskRepository) element).getConnectorKind());
- if (overlay != null) {
- decoration.addOverlay(overlay, IDecoration.BOTTOM_RIGHT);
- }
- }
- }
-
- public void addListener(ILabelProviderListener listener) {
- // ignore
- }
-
- public void dispose() {
- // ignore
- }
-
- public boolean isLabelProperty(Object element, String property) {
- return false;
- }
-
- public void removeListener(ILabelProviderListener listener) {
- // ignore
- }
-
- private ImageDescriptor getPriorityImageDescriptor(Object element) {
- AbstractRepositoryConnectorUi connectorUi;
- if (element instanceof ITask) {
- ITask repositoryTask = (ITask) element;
- connectorUi = TasksUiPlugin.getConnectorUi(((ITask) element).getConnectorKind());
- if (connectorUi != null) {
- return connectorUi.getTaskPriorityOverlay(repositoryTask);
- }
- }
- if (element instanceof ITask) {
- ITask task = (ITask) element;
- return TasksUiImages.getImageDescriptorForPriority(PriorityLevel.fromString(task.getPriority()));
- }
- return null;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListBackupManager.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListBackupManager.java
deleted file mode 100644
index 8292340c1..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListBackupManager.java
+++ /dev/null
@@ -1,290 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui;
-
-import java.io.File;
-import java.lang.reflect.InvocationTargetException;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.Locale;
-import java.util.SortedMap;
-import java.util.Timer;
-import java.util.TimerTask;
-import java.util.TreeMap;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.IJobChangeEvent;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.core.runtime.jobs.JobChangeAdapter;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
-import org.eclipse.mylyn.internal.tasks.core.TaskActivityUtil;
-import org.eclipse.mylyn.internal.tasks.ui.util.TaskDataExportOperation;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.progress.IProgressService;
-
-/**
- * @author Rob Elves
- */
-public class TaskListBackupManager implements IPropertyChangeListener {
-
- public static final String BACKUP_FILE_PREFIX = "mylyndata-";
-
- public static final Pattern MYLYN_BACKUP_REGEXP = Pattern.compile("^" + BACKUP_FILE_PREFIX + ".*");
-
- private static final String TITLE_TASKLIST_BACKUP = "Tasklist Backup";
-
- private static final String BACKUP_JOB_NAME = "Scheduled task data backup";
-
- public static final String BACKUP_FAILURE_MESSAGE = "Could not backup task data. Check backup preferences.\n";
-
- private static final long SECOND = 1000;
-
- private static final long MINUTE = 60 * SECOND;
-
- private static final long HOUR = 60 * MINUTE;
-
- //private static final long DAY = 24 * HOUR;
-
- private Timer timer;
-
- private String backupFolderPath;
-
- private ExportJob export;
-
- public TaskListBackupManager(String backupFolderPath) {
- this.backupFolderPath = backupFolderPath;
- start(30 * MINUTE);
- }
-
- public void start(long delay) {
- timer = new Timer();
- timer.schedule(new CheckBackupRequired(), delay, 30 * MINUTE);
- }
-
- public void stop() {
- timer.cancel();
- }
-
- private String getBackupFileName() {
- SimpleDateFormat format = new SimpleDateFormat(ITasksCoreConstants.FILENAME_TIMESTAMP_FORMAT, Locale.ENGLISH);
- String date = format.format(new Date());
- String backupFileName = BACKUP_FILE_PREFIX + date + ".zip";
- return backupFileName;
- }
-
- public void backupNow(boolean synchronous) {
-
- File backupFolder = new File(backupFolderPath);
- if (!backupFolder.exists()) {
- backupFolder.mkdir();
- }
-
- if (!synchronous) {
- export = new ExportJob(backupFolderPath, getBackupFileName());
- export.addJobChangeListener(new JobChangeAdapter() {
-
- @Override
- public void done(IJobChangeEvent event) {
- // TODO: Run this in separate job after snapshot has taken place
- removeOldBackups();
- }
- });
- export.schedule();
-
- } else {
-
- final TaskDataExportOperation backupJob = new TaskDataExportOperation(backupFolderPath, true, true, false,
- true, getBackupFileName(), new HashSet<AbstractTask>());
-
- IProgressService service = PlatformUI.getWorkbench().getProgressService();
- try {
- service.run(false, true, backupJob);
-
- } catch (InterruptedException e) {
- // ignore
- } catch (InvocationTargetException e) {
- MessageDialog.openError(null, TITLE_TASKLIST_BACKUP, BACKUP_FAILURE_MESSAGE);
- }
-
- }
- }
-
- public SortedMap<Long, File> getBackupFiles() {
-
- SortedMap<Long, File> filesMap = new TreeMap<Long, File>();
- String destination = backupFolderPath;
-
- File backupFolder = new File(destination);
- if (!backupFolder.exists()) {
- return filesMap;
- }
-
- File[] files = backupFolder.listFiles();
- if (files == null) {
- return filesMap;
- }
-
- ArrayList<File> backupFiles = new ArrayList<File>();
- for (File file : files) {
- Matcher matcher = MYLYN_BACKUP_REGEXP.matcher(file.getName());
- if (matcher.find()
- && file.getName().length() == BACKUP_FILE_PREFIX.length()
- + ITasksCoreConstants.FILENAME_TIMESTAMP_FORMAT.length() + 4) {
- backupFiles.add(file);
- }
- }
-
- File[] backupFileArray = backupFiles.toArray(new File[backupFiles.size()]);
-
- if (backupFileArray != null && backupFileArray.length > 0) {
-// Arrays.sort(backupFileArray, new Comparator<File>() {
-// public int compare(File file1, File file2) {
-// return new Long((file1).lastModified()).compareTo(new Long((file2).lastModified()));
-// }
-// });
-
- for (File backupFile : backupFileArray) {
- String name = backupFile.getName();
- if (name.startsWith(BACKUP_FILE_PREFIX)) {
- try {
- String dateString = name.substring(BACKUP_FILE_PREFIX.length(), BACKUP_FILE_PREFIX.length()
- + ITasksCoreConstants.FILENAME_TIMESTAMP_FORMAT.length());
- SimpleDateFormat format = new SimpleDateFormat(ITasksCoreConstants.FILENAME_TIMESTAMP_FORMAT,
- Locale.ENGLISH);
- Date date = format.parse(dateString);
- if (date.getTime() < 0) {
- continue;
- }
- filesMap.put(new Long(date.getTime()), backupFile);
- } catch (Throwable e) {
- continue;
- }
- }
- }
- }
-
- return filesMap;
- }
-
- /** public for testing purposes */
- public synchronized void removeOldBackups() {
-
- SortedMap<Long, File> filesMap = getBackupFiles();
-
- if (filesMap.size() > 0) {
-
- Calendar rangeStart = TaskActivityUtil.getCalendar();
- rangeStart.setTimeInMillis(filesMap.lastKey());
- TaskActivityUtil.snapStartOfHour(rangeStart);
- int startHour = rangeStart.get(Calendar.HOUR_OF_DAY);
- Calendar rangeEnd = TaskActivityUtil.getCalendar();
- rangeEnd.setTimeInMillis(rangeStart.getTimeInMillis());
- rangeEnd.add(Calendar.HOUR_OF_DAY, 1);
- // Keep one backup for last 8 hours of today
- for (int x = 0; x <= startHour && x < 9; x++) {
- SortedMap<Long, File> subMap = filesMap.subMap(rangeStart.getTimeInMillis(), rangeEnd.getTimeInMillis());
- if (subMap.size() > 1) {
- while (subMap.size() > 1) {
- File toDelete = subMap.remove(subMap.firstKey());
- toDelete.delete();
- }
- }
- rangeStart.add(Calendar.HOUR_OF_DAY, -1);
- rangeEnd.add(Calendar.HOUR_OF_DAY, -1);
- }
-
- // Keep one backup a day for the past 12 days
- TaskActivityUtil.snapStartOfDay(rangeEnd);
- rangeStart.add(Calendar.DAY_OF_YEAR, -1);
- for (int x = 1; x <= 12; x++) {
- SortedMap<Long, File> subMap = filesMap.subMap(rangeStart.getTimeInMillis(), rangeEnd.getTimeInMillis());
- if (subMap.size() > 1) {
- while (subMap.size() > 1) {
- File toDelete = subMap.remove(subMap.firstKey());
- toDelete.delete();
- }
- }
- rangeStart.add(Calendar.DAY_OF_YEAR, -1);
- rangeEnd.add(Calendar.DAY_OF_YEAR, -1);
- }
-
- // Remove all older backups
- SortedMap<Long, File> subMap = filesMap.subMap(0l, rangeStart.getTimeInMillis());
- if (subMap.size() > 0) {
- while (subMap.size() > 0) {
- File toDelete = subMap.remove(subMap.firstKey());
- toDelete.delete();
- }
- }
- }
- }
-
- class CheckBackupRequired extends TimerTask {
-
- @Override
- public void run() {
-// PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
-// public void run() {
- backupNow(false);
-// }
-// });
- }
- }
-
- static class ExportJob extends Job {
-
- final TaskDataExportOperation backupJob;
-
- public ExportJob(String destination, String filename) {
- super(BACKUP_JOB_NAME);
-
- backupJob = new TaskDataExportOperation(destination, true, true, false, true, filename,
- new HashSet<AbstractTask>());
- }
-
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- try {
- if (Platform.isRunning()) {
- backupJob.run(monitor);
- }
- } catch (InvocationTargetException e) {
- MessageDialog.openError(null, BACKUP_JOB_NAME,
- "Error occured during scheduled tasklist backup.\nCheck settings on Tasklist preferences page.");
- } catch (InterruptedException e) {
- return Status.CANCEL_STATUS;
- }
- return Status.OK_STATUS;
- }
-
- }
-
- public void propertyChange(PropertyChangeEvent event) {
- if (event.getProperty().equals(ITasksUiPreferenceConstants.PREF_DATA_DIR)) {
- if (export != null) {
- export.cancel();
- export = null;
- }
- backupFolderPath = TasksUiPlugin.getDefault().getBackupFolderPath();
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListHyperlink.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListHyperlink.java
deleted file mode 100644
index 878f3b957..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListHyperlink.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui;
-
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonColors;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.MouseTrackListener;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.forms.widgets.ImageHyperlink;
-
-/**
- * Enhanced <code>Hyperlink</code> for rendering tasks that truncates its text at the end rather than the middle if it
- * is wider than the available space.
- *
- * @author Leo Dos Santos
- * @author Mik Kersten
- * @author Steffen Pingel
- * @author Frank Becker
- */
-public class TaskListHyperlink extends ImageHyperlink {
-
- private final MouseTrackListener MOUSE_TRACK_LISTENER = new MouseTrackListener() {
-
- public void mouseEnter(MouseEvent e) {
- setUnderlined(true);
- }
-
- public void mouseExit(MouseEvent e) {
- setUnderlined(false);
- }
-
- public void mouseHover(MouseEvent e) {
- }
- };
-
- private boolean strikeThrough;
-
- private ITask task;
-
- public TaskListHyperlink(Composite parent, int style) {
- super(parent, style);
- setForeground(CommonColors.HYPERLINK_WIDGET);
- addMouseTrackListener(MOUSE_TRACK_LISTENER);
- }
-
- @Override
- public void dispose() {
- removeMouseTrackListener(MOUSE_TRACK_LISTENER);
- super.dispose();
- }
-
- public ITask getTask() {
- return task;
- }
-
- public boolean isStrikeThrough() {
- return strikeThrough;
- }
-
- @Override
- protected void paintText(GC gc, Rectangle bounds) {
- super.paintText(gc, bounds);
- if (strikeThrough) {
- Point totalSize = computeTextSize(SWT.DEFAULT, SWT.DEFAULT);
- int textWidth = Math.min(bounds.width, totalSize.x);
- int textHeight = totalSize.y;
-
- // int descent = gc.getFontMetrics().getDescent();
- int lineY = bounds.y + (textHeight / 2); // - descent + 1;
- gc.drawLine(bounds.x, lineY, bounds.x + textWidth, lineY);
- }
- }
-
- public void setStrikeThrough(boolean strikethrough) {
- this.strikeThrough = strikethrough;
- }
-
- public void setTask(ITask task) {
- this.task = task;
- if (task != null) {
- if ((getStyle() & SWT.SHORT) != 0) {
- setText(task.getTaskKey());
- setToolTipText(task.getTaskKey() + ": " + task.getSummary());
- setStrikeThrough(task.isCompleted());
- } else {
- setText(task.getSummary());
- setToolTipText("");
- setStrikeThrough(false);
- }
- } else {
- setText("");
- setToolTipText("");
- setStrikeThrough(false);
- }
- setUnderlined(false);
- }
-
- @Override
- protected String shortenText(GC gc, String t, int width) {
- if (t == null) {
- return null;
- }
-
- if ((getStyle() & SWT.SHORT) != 0) {
- return t;
- }
-
- String returnText = t;
- if (gc.textExtent(t).x > width) {
- for (int i = t.length(); i > 0; i--) {
- String test = t.substring(0, i);
- test = test + "...";
- if (gc.textExtent(test).x < width) {
- returnText = test;
- break;
- }
- }
- }
- return returnText;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListManager.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListManager.java
deleted file mode 100644
index 8e151dcd3..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListManager.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.ITaskList;
-import org.eclipse.mylyn.internal.tasks.core.LocalRepositoryConnector;
-import org.eclipse.mylyn.internal.tasks.core.TaskList;
-import org.eclipse.mylyn.internal.tasks.core.UnmatchedTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.externalization.TaskListExternalizationParticipant;
-import org.eclipse.mylyn.internal.tasks.ui.util.TaskListElementImporter;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-
-/**
- * Provides facilities for using and managing the Task List and task activity information.
- *
- * @author Mik Kersten
- * @author Rob Elves (task activity)
- * @author Jevgeni Holodkov (insertQueries)
- * @since 3.0
- */
-@Deprecated
-public class TaskListManager {
-
- private final TaskListElementImporter importer;
-
- private final TaskList taskList;
-
- private final TaskListExternalizationParticipant participant;
-
- public TaskListManager(TaskList taskList, TaskListExternalizationParticipant participant,
- TaskListElementImporter importer) {
- this.taskList = taskList;
- this.importer = importer;
- this.participant = participant;
- }
-
- /**
- * @deprecated moved to TasksUiPlugin
- */
- @Deprecated
- private void prepareOrphanContainers() {
- for (TaskRepository repository : TasksUi.getRepositoryManager().getAllRepositories()) {
- if (!repository.getConnectorKind().equals(LocalRepositoryConnector.CONNECTOR_KIND)) {
- taskList.addUnmatchedContainer(new UnmatchedTaskContainer(repository.getConnectorKind(),
- repository.getRepositoryUrl()));
- }
- }
- }
-
- @Deprecated
- public TaskListElementImporter getTaskListWriter() {
- return importer;
- }
-
- /**
- * @deprecated
- */
- @Deprecated
- public ITaskList resetTaskList() {
- participant.resetTaskList();
- return taskList;
- }
-
- /**
- * @deprecated use TasksUiPlugin.reloadDataDirectory()
- */
- @Deprecated
- public boolean readExistingOrCreateNewList() {
- try {
- TasksUiPlugin.getDefault().reloadDataDirectory();
- } catch (CoreException e) {
- StatusHandler.fail(e.getStatus());
- }
- return true;
- }
-
- /**
- * @deprecated use {@link TasksUiPlugin#getTaskList()} instead
- */
- @Deprecated
- public TaskList getTaskList() {
- return taskList;
- }
-
- /**
- * use <code>TasksUi.getTaskActivityManager().getActiveTask()</code>
- *
- * @deprecated
- */
- @Deprecated
- public ITask getActiveTask() {
- return TasksUi.getTaskActivityManager().getActiveTask();
- }
-
- /**
- * Will not save an empty task list to avoid losing data on bad startup.
- *
- * @deprecated use <code>TasksUiPlugin.getExternalizationManager().requestSave()</code>
- */
- @Deprecated
- public synchronized void saveTaskList() {
- TasksUiPlugin.getExternalizationManager().requestSave();
- }
-
- /**
- * use <code>TasksUi.getTaskActivityManager().activateTask(task)</code>
- *
- * @deprecated
- */
- @Deprecated
- public void activateTask(AbstractTask task) {
- TasksUi.getTaskActivityManager().activateTask(task);
- }
-
- /**
- * use <code>TasksUi.getTaskActivityManager().activateTask(task)</code>
- *
- * @deprecated
- */
- @Deprecated
- public void activateTask(AbstractTask task, boolean addToHistory) {
- TasksUi.getTaskActivityManager().activateTask(task);
- }
-
- /**
- * use <code>TasksUi.getTaskActivityManager().deactivateAllTasks()</code>
- *
- * @deprecated
- */
- @Deprecated
- public void deactivateAllTasks() {
- TasksUi.getTaskActivityManager().deactivateActiveTask();
- }
-
- /**
- * use <code>TasksUi.getTaskActivityManager().deactivateTask(task)</code>
- *
- * @deprecated
- */
- @Deprecated
- public void deactivateTask(ITask task) {
- TasksUi.getTaskActivityManager().deactivateTask(task);
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListModifyOperation.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListModifyOperation.java
deleted file mode 100644
index f6cf7f75e..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListModifyOperation.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.mylyn.internal.tasks.core.ITaskListRunnable;
-import org.eclipse.mylyn.internal.tasks.core.TaskList;
-
-/**
- * Use to perform atomic operations on the task list i.e. open/restore
- *
- * @author Rob Elves
- * @since 3.0
- */
-public abstract class TaskListModifyOperation implements IRunnableWithProgress {
-
- ISchedulingRule rule;
-
- public TaskListModifyOperation() {
- this(null);
- }
-
- public TaskListModifyOperation(ISchedulingRule rule) {
- this.rule = rule;
- }
-
- protected abstract void operations(IProgressMonitor monitor) throws CoreException, InvocationTargetException,
- InterruptedException;
-
- final public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- final InvocationTargetException[] ite = new InvocationTargetException[1];
- try {
- ITaskListRunnable runnable = new ITaskListRunnable() {
-
- public void execute(IProgressMonitor monitor) throws CoreException {
- try {
- Job.getJobManager().beginRule(rule, new SubProgressMonitor(monitor, IProgressMonitor.UNKNOWN));
- operations(monitor);
- } catch (InvocationTargetException e) {
- ite[0] = e;
- } catch (InterruptedException e) {
- throw new OperationCanceledException(e.getMessage());
- } finally {
- Job.getJobManager().endRule(rule);
- }
- }
- };
- getTaskList().run(runnable, monitor);
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- }
-
- if (ite[0] != null) {
- throw ite[0];
- }
- }
-
- protected TaskList getTaskList() {
- return TasksUiPlugin.getTaskList();
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager.java
deleted file mode 100644
index bc77a4321..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui;
-
-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.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.mylyn.internal.provisional.commons.ui.AbstractNotification;
-import org.eclipse.mylyn.internal.tasks.ui.notifications.TaskListNotificationPopup;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Rob Elves
- */
-public class TaskListNotificationManager implements IPropertyChangeListener {
-
- private static final String OPEN_NOTIFICATION_JOB = "Open Notification Job";
-
- private static final long DELAY_OPEN = 5 * 1000;
-
- private static final boolean runSystem = true;
-
- private TaskListNotificationPopup popup;
-
- private final Set<AbstractNotification> notifications = new HashSet<AbstractNotification>();
-
- private final Set<AbstractNotification> currentlyNotifying = Collections.synchronizedSet(notifications);
-
- private final List<ITaskListNotificationProvider> notificationProviders = new ArrayList<ITaskListNotificationProvider>();
-
- private final Job openJob = new Job(OPEN_NOTIFICATION_JOB) {
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- try {
-
- if (Platform.isRunning() && PlatformUI.getWorkbench() != null
- && PlatformUI.getWorkbench().getDisplay() != null
- && !PlatformUI.getWorkbench().getDisplay().isDisposed()) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
-
- public void run() {
- collectNotifications();
- synchronized (TaskListNotificationManager.class) {
- if (currentlyNotifying.size() > 0) {
-// popup.close();
- showPopup();
- }
- }
- }
- });
- }
- } finally {
- if (popup != null) {
- schedule(popup.getDelayClose() / 2);
- } else {
- schedule(DELAY_OPEN);
- }
- }
-
- if (monitor.isCanceled()) {
- return Status.CANCEL_STATUS;
- }
-
- return Status.OK_STATUS;
- }
-
- };
-
- public void showPopup() {
- if (popup != null) {
- popup.close();
- }
-
- Shell shell = new Shell(PlatformUI.getWorkbench().getDisplay());
- popup = new TaskListNotificationPopup(shell);
- popup.setFadingEnabled(TasksUiInternal.isAnimationsEnabled());
- List<AbstractNotification> toDisplay = new ArrayList<AbstractNotification>(currentlyNotifying);
- Collections.sort(toDisplay);
- popup.setContents(toDisplay);
- cleanNotified();
- popup.setBlockOnOpen(false);
- popup.open();
- }
-
- private void cleanNotified() {
- currentlyNotifying.clear();
- }
-
- /** public for testing */
- public void collectNotifications() {
- for (ITaskListNotificationProvider provider : notificationProviders) {
- currentlyNotifying.addAll(provider.getNotifications());
- }
- }
-
- public void startNotification(long initialStartupTime) {
- if (TasksUiPlugin.getDefault()
- .getPreferenceStore()
- .getBoolean(ITasksUiPreferenceConstants.NOTIFICATIONS_ENABLED)) {
- if (!openJob.cancel()) {
- try {
- openJob.join();
- } catch (InterruptedException e) {
- // ignore
- }
- }
- openJob.setSystem(runSystem);
- openJob.schedule(initialStartupTime);
- }
- }
-
- public void stopNotification() {
- openJob.cancel();
-// closeJob.cancel();
-// if (popup != null) {
-// popup.close();
-// }
- }
-
- public void addNotificationProvider(ITaskListNotificationProvider notification_provider) {
- notificationProviders.add(notification_provider);
- }
-
- public void removeNotificationProvider(ITaskListNotificationProvider notification_provider) {
- notificationProviders.remove(notification_provider);
- }
-
- /**
- * public for testing purposes
- */
- public Set<AbstractNotification> getNotifications() {
- synchronized (TaskListNotificationManager.class) {
- return currentlyNotifying;
- }
- }
-
- public void propertyChange(PropertyChangeEvent event) {
- if (event.getProperty().equals(ITasksUiPreferenceConstants.NOTIFICATIONS_ENABLED)) {
- Object newValue = event.getNewValue();
- if (!(newValue instanceof Boolean)) {
- // default if no preference value
- startNotification(0);
- } else if ((Boolean) newValue == true) {
- startNotification(0);
- } else {
- stopNotification();
- }
- }
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListSynchronizationScheduler.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListSynchronizationScheduler.java
deleted file mode 100644
index b81a39671..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListSynchronizationScheduler.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui;
-
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.runtime.jobs.IJobChangeEvent;
-import org.eclipse.core.runtime.jobs.JobChangeAdapter;
-import org.eclipse.mylyn.internal.tasks.core.ITaskJobFactory;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.sync.SynchronizationJob;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-
-/**
- * @author Steffen Pingel
- */
-public class TaskListSynchronizationScheduler {
-
- private long interval;
-
- private final ITaskJobFactory jobFactory;
-
- private SynchronizationJob refreshJob;
-
- public TaskListSynchronizationScheduler(ITaskJobFactory jobFactory) {
- this.jobFactory = jobFactory;
- }
-
- private SynchronizationJob createRefreshJob() {
- Set<TaskRepository> repositories = new HashSet<TaskRepository>(TasksUi.getRepositoryManager()
- .getAllRepositories());
- SynchronizationJob job = jobFactory.createSynchronizeRepositoriesJob(repositories);
- job.setUser(false);
- job.setFullSynchronization(true);
- return job;
- }
-
- public synchronized SynchronizationJob getRefreshJob() {
- return refreshJob;
- }
-
- private synchronized void reschedule() {
- if (this.interval != 0) {
- refreshJob.schedule(interval);
- }
- }
-
- public synchronized void setInterval(long interval) {
- setInterval(interval, interval);
- }
-
- public synchronized void setInterval(long delay, long interval) {
- if (this.interval != interval) {
- this.interval = interval;
- if (refreshJob != null) {
- refreshJob.cancel();
- refreshJob = null;
- }
-
- if (interval > 0) {
- refreshJob = createRefreshJob();
- refreshJob.addJobChangeListener(new JobChangeAdapter() {
- @Override
- public void done(IJobChangeEvent event) {
- reschedule();
- }
-
- });
- refreshJob.schedule(delay);
- }
- }
- }
-
- public SynchronizationJob synchronize(TaskRepository repository) {
- // TODO check if a synchronization for repository is already running
- SynchronizationJob job = jobFactory.createSynchronizeRepositoriesJob(Collections.singleton(repository));
- job.setUser(false);
- job.setFullSynchronization(false);
- job.schedule();
- return job;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskPriorityFilter.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskPriorityFilter.java
deleted file mode 100644
index 9eaca0159..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskPriorityFilter.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.ui;
-
-import org.eclipse.mylyn.internal.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
-
-/**
- * @author Mik Kersten
- * @author Ken Sueda
- */
-public class TaskPriorityFilter extends AbstractTaskListFilter {
-
- private static final String PRIORITY_PREFIX = "P";
-
- private String priorityLevel = PriorityLevel.P5.toString();
-
- public TaskPriorityFilter() {
- displayPrioritiesAbove(TaskListView.getCurrentPriorityLevel());
- }
-
- public void displayPrioritiesAbove(String level) {
- priorityLevel = level;
- }
-
- @Override
- public boolean select(Object parent, Object element) {
- if (element instanceof IRepositoryElement) {
- String priority = ((AbstractTaskContainer) element).getPriority();
- if (priority == null || !(priority.startsWith(PRIORITY_PREFIX))) {
- return true;
- }
- if (priorityLevel.compareTo(((AbstractTaskContainer) element).getPriority()) >= 0) {
- return true;
- }
- return false;
- }
- return true;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskRepositoryAdapterFactory.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskRepositoryAdapterFactory.java
deleted file mode 100644
index 1774e416a..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskRepositoryAdapterFactory.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.mylyn.internal.tasks.core.LocalRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.ui.IActionFilter;
-
-/**
- * Adapter factory for adapting TaskRepository to org.eclipse.ui.IActionFilter
- *
- * @author Eugene Kuleshov
- */
-public class TaskRepositoryAdapterFactory implements IAdapterFactory {
-
- @SuppressWarnings("unchecked")
- private static final Class[] ADAPTER_TYPES = new Class[] { IActionFilter.class };
-
- @SuppressWarnings("unchecked")
- public Class[] getAdapterList() {
- return ADAPTER_TYPES;
- }
-
- public Object getAdapter(final Object adaptable, @SuppressWarnings("unchecked") Class adapterType) {
- if (adaptable instanceof TaskRepository) {
- return new IActionFilter() {
- public boolean testAttribute(Object target, String name, String value) {
- TaskRepository repository = (TaskRepository) target;
- if ("offline".equals(name)) {
- return Boolean.valueOf(value).booleanValue() == repository.isOffline();
- } else if ("supportQuery".equals(name)) {
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(repository.getConnectorKind());
- AbstractRepositoryConnector connector = TasksUiPlugin.getRepositoryManager()
- .getRepositoryConnector(repository.getConnectorKind());
- return null != connectorUi.getQueryWizard(repository, null) && connector.canQuery(repository);
- } else if ("supportNewTask".equals(name)) {
- AbstractRepositoryConnector connector = TasksUi.getRepositoryManager().getRepositoryConnector(
- repository.getConnectorKind());
- return connector.canCreateNewTask(repository);
- } else if ("hasRepository".equals(name)) {
- return !repository.getConnectorKind().equals(LocalRepositoryConnector.CONNECTOR_KIND);
- }
- return false;
- }
- };
- }
- return null;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskRepositoryLocationUi.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskRepositoryLocationUi.java
deleted file mode 100644
index 0a1708b71..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskRepositoryLocationUi.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.ui;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.jface.window.Window;
-import org.eclipse.mylyn.commons.core.CoreUtil;
-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.commons.net.UnsupportedRequestException;
-import org.eclipse.mylyn.internal.tasks.core.TaskRepositoryLocation;
-import org.eclipse.mylyn.internal.tasks.ui.dialogs.TaskRepositoryCredentialsDialog;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Steffen Pingel
- */
-public class TaskRepositoryLocationUi extends TaskRepositoryLocation {
-
- private static Object lock = new Object();
-
- public TaskRepositoryLocationUi(TaskRepository taskRepository) {
- super(taskRepository);
- }
-
- @Override
- public void requestCredentials(AuthenticationType authType, String message, IProgressMonitor monitor)
- throws UnsupportedRequestException {
- if (CoreUtil.TEST_MODE) {
- throw new UnsupportedRequestException();
- }
-
- AuthenticationCredentials oldCredentials = taskRepository.getCredentials(authType);
- // synchronize on a static lock to ensure that only one password dialog is displayed at a time
- synchronized (lock) {
- // check if the credentials changed while the thread was waiting for the lock
- if (!areEqual(oldCredentials, taskRepository.getCredentials(authType))) {
- return;
- }
-
- if (Policy.isBackgroundMonitor(monitor)) {
- throw new UnsupportedRequestException();
- }
-
- PasswordRunner runner = new PasswordRunner(authType, message);
- PlatformUI.getWorkbench().getDisplay().syncExec(runner);
- if (runner.isCanceled()) {
- throw new OperationCanceledException();
- }
- if (!runner.isChanged()) {
- throw new UnsupportedRequestException();
- }
- }
- }
-
- private boolean areEqual(AuthenticationCredentials oldCredentials, AuthenticationCredentials credentials) {
- if (oldCredentials == null) {
- return (credentials == null);
- } else {
- return oldCredentials.equals(credentials);
- }
- }
-
- private class PasswordRunner implements Runnable {
-
- private final AuthenticationType authType;
-
- private boolean changed;
-
- private final String message;
-
- private boolean canceled;
-
- public PasswordRunner(AuthenticationType credentialType, String message) {
- this.authType = credentialType;
- this.message = message;
- }
-
- public boolean isChanged() {
- return changed;
- }
-
- public boolean isCanceled() {
- return canceled;
- }
-
- public void run() {
- Shell shell = Display.getCurrent().getActiveShell();
- if (shell != null && !shell.isDisposed()) {
- TaskRepositoryCredentialsDialog dialog = TaskRepositoryCredentialsDialog.createDialog(shell);
- initializeDialog(dialog);
- int resultCode = dialog.open();
- if (resultCode == Window.OK) {
- apply(dialog);
- changed = true;
- } else if (resultCode == TaskRepositoryCredentialsDialog.TASK_REPOSITORY_CHANGED) {
- changed = true;
- } else {
- canceled = true;
- }
- }
- }
-
- private void initializeDialog(TaskRepositoryCredentialsDialog dialog) {
- dialog.setTaskRepository(taskRepository);
-
- AuthenticationCredentials credentials = taskRepository.getCredentials(authType);
- if (credentials != null) {
- dialog.setUsername(credentials.getUserName());
- dialog.setPassword(credentials.getPassword());
- }
-
- // caller provided message takes precedence
- if (message != null) {
- dialog.setMessage(message);
- } else {
- dialog.setMessage(getDefaultMessage());
- }
- }
-
- private String getDefaultMessage() {
- if (AuthenticationType.REPOSITORY.equals(authType)) {
- return "Enter repository password";
- } else if (AuthenticationType.HTTP.equals(authType)) {
- return "Enter HTTP password";
- } else if (AuthenticationType.PROXY.equals(authType)) {
- return "Enter proxy password";
- }
- return null;
- }
-
- private void apply(TaskRepositoryCredentialsDialog dialog) {
- AuthenticationCredentials credentials = new AuthenticationCredentials(dialog.getUserName(),
- dialog.getPassword());
- taskRepository.setCredentials(authType, credentials, dialog.getSavePassword());
- TasksUiPlugin.getRepositoryManager().notifyRepositorySettingsChanged(taskRepository);
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskRepositoryUtil.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskRepositoryUtil.java
deleted file mode 100644
index 9f0b9ce4d..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskRepositoryUtil.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui;
-
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.RepositoryTemplate;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-
-/**
- * @author Rob Elves
- */
-public class TaskRepositoryUtil {
-
- /**
- * Is auto add of template repository disabled for repositoryUrl
- *
- * @since 2.1
- */
- public static boolean isAddAutomaticallyDisabled(String repositoryUrl) {
- String deletedTemplates = TasksUiPlugin.getDefault().getPreferenceStore().getString(
- ITasksUiPreferenceConstants.TEMPLATES_DELETED);
- String[] templateUrls = deletedTemplates.split("\\" + ITasksUiPreferenceConstants.TEMPLATES_DELETED_DELIM);
- for (String deletedUrl : templateUrls) {
- if (deletedUrl.equalsIgnoreCase(repositoryUrl)) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Disable template repository from being automatically added
- *
- * @since 2.1
- */
- public static void disableAddAutomatically(String repositoryUrl) {
- if (!isAddAutomaticallyDisabled(repositoryUrl) && isAddAutomatically(repositoryUrl)) {
- String deletedTemplates = TasksUiPlugin.getDefault().getPreferenceStore().getString(
- ITasksUiPreferenceConstants.TEMPLATES_DELETED);
- deletedTemplates += ITasksUiPreferenceConstants.TEMPLATES_DELETED_DELIM + repositoryUrl;
- TasksUiPlugin.getDefault().getPreferenceStore().setValue(ITasksUiPreferenceConstants.TEMPLATES_DELETED,
- deletedTemplates);
- TasksUiPlugin.getDefault().savePluginPreferences();
- }
- }
-
- /**
- * Template exists and is auto add enabled
- */
- private static boolean isAddAutomatically(String repositoryUrl) {
- for (AbstractRepositoryConnector connector : TasksUi.getRepositoryManager().getRepositoryConnectors()) {
- for (RepositoryTemplate template : TasksUiPlugin.getRepositoryTemplateManager().getTemplates(
- connector.getConnectorKind())) {
- if (template.repositoryUrl != null && template.repositoryUrl.equalsIgnoreCase(repositoryUrl)
- && template.addAutomatically) {
- return true;
- }
- }
- }
- return false;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskSearchPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskSearchPage.java
deleted file mode 100644
index c6df56176..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskSearchPage.java
+++ /dev/null
@@ -1,615 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.ui;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.DialogPage;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.internal.tasks.ui.search.SearchHitCollector;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.mylyn.tasks.ui.wizards.AbstractRepositoryQueryPage;
-import org.eclipse.mylyn.tasks.ui.wizards.ITaskSearchPage;
-import org.eclipse.mylyn.tasks.ui.wizards.ITaskSearchPageContainer;
-import org.eclipse.search.internal.ui.SearchPlugin;
-import org.eclipse.search.ui.ISearchPage;
-import org.eclipse.search.ui.ISearchPageContainer;
-import org.eclipse.search.ui.ISearchQuery;
-import org.eclipse.search.ui.ISearchResultViewPart;
-import org.eclipse.search.ui.NewSearchUI;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.KeyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.forms.events.HyperlinkAdapter;
-import org.eclipse.ui.forms.events.HyperlinkEvent;
-import org.eclipse.ui.forms.widgets.Hyperlink;
-import org.eclipse.ui.forms.widgets.ImageHyperlink;
-
-/**
- * @author Rob Elves
- * @author Mik Kersten
- * @author Steffen Pingel
- */
-public class TaskSearchPage extends DialogPage implements ISearchPage {
-
- public static final String ID = "org.eclipse.mylyn.tasks.ui.search.page";
-
- private static final String PAGE_KEY = "page";
-
- private static final String TITLE_REPOSITORY_SEARCH = "Repository Search";
-
- private static final String PAGE_NAME = "TaskSearchPage";
-
- private static final String STORE_REPO_ID = PAGE_NAME + ".REPO";
-
- private Combo repositoryCombo;
-
- private Text keyText;
-
- private TaskRepository repository;
-
- private Composite fParentComposite;
-
- private IDialogSettings fDialogSettings;
-
- private int currentPageIndex = -1;
-
- private boolean firstView = true;
-
- private Control[] queryPages;
-
- private ISearchPageContainer pageContainer;
-
- private ITaskSearchPageContainer taskSearchPageContainer;
-
- public boolean performAction() {
- saveDialogSettings();
- String key = keyText.getText();
- if (key != null && key.trim().length() > 0) {
- key = key.trim();
- boolean openSuccessful = TasksUiUtil.openTask(repository, key);
- if (!openSuccessful) {
- MessageDialog.openInformation(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
- "Task Search", "No task found matching key: " + key);
- }
- return openSuccessful;
- } else {
- ITaskSearchPage page = (ITaskSearchPage) queryPages[currentPageIndex].getData(PAGE_KEY);
- return page.performSearch();
- }
- }
-
- public void setContainer(ISearchPageContainer container) {
- this.pageContainer = container;
- this.taskSearchPageContainer = new ITaskSearchPageContainer() {
- public IRunnableContext getRunnableContext() {
- return pageContainer.getRunnableContext();
- }
-
- public void setPerformActionEnabled(boolean enabled) {
- pageContainer.setPerformActionEnabled(enabled);
- }
- };
- }
-
- public void createControl(Composite parent) {
- fParentComposite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout(1, false);
- // layout.marginHeight = 0;
- // layout.marginWidth = 0;
- fParentComposite.setLayout(layout);
- GridData gd = new GridData(GridData.FILL_BOTH);
- fParentComposite.setLayoutData(gd);
-
- createRepositoryGroup(fParentComposite);
- createSeparator(fParentComposite);
- this.setControl(fParentComposite);
- }
-
- private void createSeparator(Composite parent) {
- Label separator = new Label(parent, SWT.NONE);
- separator.setVisible(false);
- GridData data = new GridData(GridData.FILL, GridData.FILL, false, false, 2, 1);
- data.heightHint = convertHeightInCharsToPixels(1) / 3;
- separator.setLayoutData(data);
- }
-
- private void createRepositoryGroup(Composite control) {
- Composite group = new Composite(control, SWT.NONE);
- GridLayout layout = new GridLayout(6, false);
- group.setLayout(layout);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- group.setLayoutData(gd);
-
- Label label = new Label(group, SWT.NONE);
- label.setText("Se&lect Repository: ");
-
- repositoryCombo = new Combo(group, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
- repositoryCombo.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- displayQueryPage(repositoryCombo.getSelectionIndex());
- }
- });
- label = new Label(group, SWT.NONE);
- label.setText(" ");
-
- Label labelKey = new Label(group, SWT.NONE);
- labelKey.setText("Task Key/ID: ");
- keyText = new Text(group, SWT.BORDER);
- keyText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
-
- String findText = null;
- TaskListView taskListView = TaskListView.getFromActivePerspective();
- if (taskListView != null) {
- findText = taskListView.getFilteredTree().getFilterControl().getText();
- if (findText != null && findText.trim().length() > 0 && isTaskKeyCandidate(findText.trim())) {
- pageContainer.setPerformActionEnabled(true);
- keyText.setText(findText.trim());
- keyText.setFocus();
- }
- }
-
- keyText.addKeyListener(new KeyListener() {
-
- public void keyPressed(KeyEvent e) {
- // ignore
- }
-
- public void keyReleased(KeyEvent e) {
- updatePageEnablement();
- }
- });
-
- ImageHyperlink clearKey = new ImageHyperlink(group, SWT.NONE);
- clearKey.setImage(CommonImages.getImage(CommonImages.REMOVE));
- clearKey.addHyperlinkListener(new HyperlinkAdapter() {
-
- @Override
- public void linkActivated(HyperlinkEvent e) {
- keyText.setText("");
- updatePageEnablement();
- }
- });
- }
-
- private void updatePageEnablement() {
- if (keyText.getText() != null && keyText.getText().trim().length() > 0) {
- //setControlsEnabled(queryPages[currentPageIndex], false);
- if (queryPages != null && queryPages[currentPageIndex] != null
- && queryPages[currentPageIndex].getData(PAGE_KEY) instanceof AbstractRepositoryQueryPage) {
- ((AbstractRepositoryQueryPage) queryPages[currentPageIndex].getData(PAGE_KEY)).setControlsEnabled(false);
- }
- if (repositoryCombo.getSelectionIndex() > -1) {
- pageContainer.setPerformActionEnabled(true);
- }
- } else {
- //setControlsEnabled(queryPages[currentPageIndex], true);
- if (queryPages != null && queryPages[currentPageIndex] != null
- && queryPages[currentPageIndex].getData(PAGE_KEY) instanceof AbstractRepositoryQueryPage) {
- ((AbstractRepositoryQueryPage) queryPages[currentPageIndex].getData(PAGE_KEY)).setControlsEnabled(true);
- }
- //setControlsEnabled(queryPages[currentPageIndex], true);
- //pageContainer.setPerformActionEnabled(false);
- }
- }
-
- private Control createPage(TaskRepository repository, ITaskSearchPage searchPage) {
- // Page wrapper
- final Composite pageWrapper = new Composite(fParentComposite, SWT.NONE);
- pageWrapper.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- GridLayout layout = new GridLayout();
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- pageWrapper.setLayout(layout);
-
- searchPage.setContainer(taskSearchPageContainer);
- try {
- searchPage.createControl(pageWrapper);
- } catch (Exception e) {
- pageWrapper.dispose();
- searchPage.dispose();
-
- searchPage = new DeadSearchPage(repository);
- searchPage.setContainer(taskSearchPageContainer);
- searchPage.createControl(fParentComposite);
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Error occurred while constructing search page for " + repository.getRepositoryUrl() + " ["
- + repository.getConnectorKind() + "]", e));
- searchPage.getControl().setData(PAGE_KEY, searchPage);
- return searchPage.getControl();
- }
-
- // XXX: work around for initial search page size issue bug#198493
- IDialogSettings searchDialogSettings = SearchPlugin.getDefault().getDialogSettingsSection(
- "DialogBounds_SearchDialog");
- if (searchDialogSettings.get("DIALOG_WIDTH") == null) {
- fParentComposite.getParent().getShell().pack();
- }
- pageWrapper.setData(PAGE_KEY, searchPage);
- return pageWrapper;
- }
-
- private void displayQueryPage(int pageIndex) {
- if (currentPageIndex == pageIndex || pageIndex < 0) {
- return;
- }
-
- // TODO: if repository == null display invalid page?
- if (currentPageIndex != -1 && queryPages[currentPageIndex] != null) {
- queryPages[currentPageIndex].setVisible(false);
- ITaskSearchPage page = (ITaskSearchPage) queryPages[currentPageIndex].getData(PAGE_KEY);
- page.setVisible(false);
- GridData data = (GridData) queryPages[currentPageIndex].getLayoutData();
- data.exclude = true;
- queryPages[currentPageIndex].setLayoutData(data);
- }
-
- String repositoryLabel = repositoryCombo.getItem(pageIndex);
- repository = (TaskRepository) repositoryCombo.getData(repositoryLabel);
-
- if (queryPages[pageIndex] == null) {
- if (repository != null) {
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(repository.getConnectorKind());
- if (connectorUi != null) {
- ITaskSearchPage searchPage = getSearchPage(connectorUi);
- if (searchPage != null) {
- queryPages[pageIndex] = createPage(repository, searchPage);
- } else {
- AbstractRepositoryConnector connector = TasksUi.getRepositoryManager().getRepositoryConnector(
- repository.getConnectorKind());
- if (connector.canCreateTaskFromKey(repository)) {
- queryPages[pageIndex] = createPage(repository, new NoSearchPage(repository));
- }
- }
- }
-
- }
- }
-
- // update enablement of the task id field
- if (repository != null) {
- AbstractRepositoryConnector connector = TasksUi.getRepositoryManager().getRepositoryConnector(
- repository.getConnectorKind());
- if (connector.canCreateTaskFromKey(repository)) {
- keyText.setEnabled(true);
- } else {
- keyText.setEnabled(false);
- }
- }
-
- if (queryPages[pageIndex] != null) {
- GridData data = (GridData) queryPages[pageIndex].getLayoutData();
- if (data == null) {
- data = new GridData();
- }
- data.exclude = false;
- queryPages[pageIndex].setLayoutData(data);
- queryPages[pageIndex].setVisible(true);
- ITaskSearchPage page = (ITaskSearchPage) queryPages[pageIndex].getData(PAGE_KEY);
- page.setVisible(true);
- }
-
- currentPageIndex = pageIndex;
- fParentComposite.getParent().layout(true, true);
- updatePageEnablement();
-
- }
-
- private ITaskSearchPage getSearchPage(AbstractRepositoryConnectorUi connectorUi) {
- if (connectorUi.hasSearchPage()) {
- return connectorUi.getSearchPage(repository, null);
- }
- return null;
- }
-
- @Override
- public void setVisible(boolean visible) {
- if (firstView) {
- getControl().setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
-
- List<TaskRepository> repositories = TasksUi.getRepositoryManager().getAllRepositories();
- List<TaskRepository> searchableRepositories = new ArrayList<TaskRepository>();
- for (TaskRepository repository : repositories) {
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(repository.getConnectorKind());
- AbstractRepositoryConnector connector = TasksUi.getRepositoryManager().getRepositoryConnector(
- repository.getConnectorKind());
- if ((connectorUi != null && connectorUi.hasSearchPage() && !repository.isOffline())
- || connector.canCreateTaskFromKey(repository)) {
- searchableRepositories.add(repository);
- }
- }
-
- String[] repositoryUrls = new String[searchableRepositories.size()];
- int i = 0;
- int indexToSelect = 0;
- for (TaskRepository currRepsitory : searchableRepositories) {
- if (repository != null && repository.equals(currRepsitory)) {
- indexToSelect = i;
- }
- repositoryUrls[i] = currRepsitory.getRepositoryUrl();
- i++;
- }
-
- IDialogSettings settings = getDialogSettings();
- if (repositoryCombo != null) {
- for (int x = 0; x < searchableRepositories.size(); x++) {
- repositoryCombo.add(searchableRepositories.get(x).getRepositoryLabel());
- repositoryCombo.setData(searchableRepositories.get(x).getRepositoryLabel(),
- searchableRepositories.get(x));
- }
- if (repositoryUrls.length == 0) {
- MessageDialog.openInformation(Display.getCurrent().getActiveShell(), TITLE_REPOSITORY_SEARCH,
- TaskRepositoryManager.MESSAGE_NO_REPOSITORY);
- } else {
- String selectRepo = settings.get(STORE_REPO_ID);
- if (selectRepo != null && repositoryCombo.indexOf(selectRepo) > -1) {
- repositoryCombo.select(repositoryCombo.indexOf(selectRepo));
- repository = (TaskRepository) repositoryCombo.getData(selectRepo);
- if (repository == null) {
- // TODO: Display no repository error
- }
- } else {
- repositoryCombo.select(indexToSelect);
- }
-
- // TODO: Create one page per connector and repopulate based on repository
- queryPages = new Control[repositoryUrls.length];
- displayQueryPage(repositoryCombo.getSelectionIndex());
- // updateAttributesFromRepository(repositoryCombo.getText(),
- // null, false);
- }
- }
- firstView = false;
- }
-
- if (queryPages == null) {
- pageContainer.setPerformActionEnabled(false);
- }
-
- super.setVisible(visible);
-
- setDefaultValuesAndFocus();
- }
-
- private void setDefaultValuesAndFocus() {
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- if (window != null) {
- IWorkbenchPage page = window.getActivePage();
- if (page != null) {
- String repositoryUrl = null;
- IWorkbenchPart part = page.getActivePart();
- if (part instanceof ISearchResultViewPart) {
- ISearchQuery[] queries = NewSearchUI.getQueries();
- if (queries.length > 0) {
- if (queries[0] instanceof SearchHitCollector) {
- repositoryUrl = ((SearchHitCollector) queries[0]).getRepositoryQuery().getRepositoryUrl();
- }
- }
- }
-// if (repositoryUrl == null) {
-// IEditorPart editor = page.getActiveEditor();
-// if (editor instanceof TaskEditor) {
-// repositoryUrl = ((TaskEditor) editor).getTaskEditorInput().getTask().getRepositoryUrl();
-// }
-// }
-// if (repositoryUrl == null) {
-// TaskListView taskListView = TaskListView.getFromActivePerspective();
-// if (taskListView != null) {
-// AbstractTask selectedTask = taskListView.getSelectedTask();
-// if (selectedTask != null) {
-// repositoryUrl = selectedTask.getRepositoryUrl();
-// }
-// }
-// }
- if (repositoryUrl != null) {
- TaskRepository repository = TasksUiPlugin.getRepositoryManager().getRepository(repositoryUrl);
- if (repository != null) {
- int index = 0;
- for (String repositoryLabel : repositoryCombo.getItems()) {
- if (repositoryLabel.equals(repository.getRepositoryLabel())) {
- repositoryCombo.select(index);
- }
- index++;
- }
- displayQueryPage(repositoryCombo.getSelectionIndex());
- }
- }
- }
- }
-
- if (keyText.getText() != null && keyText.getText().trim().length() > 0) {
- keyText.setFocus();
- keyText.setSelection(0, keyText.getText().length());
- } else {
- Clipboard clipboard = new Clipboard(Display.getDefault());
- TextTransfer transfer = TextTransfer.getInstance();
- String contents = (String) clipboard.getContents(transfer);
- if (contents != null) {
- if (isTaskKeyCandidate(contents.trim())) {
- keyText.setText(contents.trim());
- keyText.setFocus();
- keyText.setSelection(0, keyText.getText().length());
- }
- }
- }
- updatePageEnablement();
- }
-
- private boolean isTaskKeyCandidate(String contents) {
- boolean looksLikeKey = false;
- try {
- Integer.parseInt(contents);
- looksLikeKey = true;
- } catch (NumberFormatException nfe) {
- }
- if (!looksLikeKey) {
- try {
- Integer.parseInt(contents.substring(contents.lastIndexOf('-')));
- looksLikeKey = true;
- } catch (Exception e) {
- }
- }
- return looksLikeKey;
- }
-
- public IDialogSettings getDialogSettings() {
- IDialogSettings settings = TasksUiPlugin.getDefault().getDialogSettings();
- fDialogSettings = settings.getSection(PAGE_NAME);
- if (fDialogSettings == null) {
- fDialogSettings = settings.addNewSection(PAGE_NAME);
- }
- return fDialogSettings;
- }
-
- private void saveDialogSettings() {
- IDialogSettings settings = getDialogSettings();
- settings.put(STORE_REPO_ID, repositoryCombo.getText());
- }
-
- @Override
- public void dispose() {
- if (queryPages != null) {
- for (Control control : queryPages) {
- if (control != null) {
- ITaskSearchPage page = (ITaskSearchPage) control.getData(PAGE_KEY);
- page.dispose();
- }
- }
- }
- super.dispose();
- }
-
- private class DeadSearchPage extends AbstractRepositoryQueryPage {
-
- public DeadSearchPage(TaskRepository rep) {
- super("Search page error", rep);
- }
-
- public void createControl(Composite parent) {
- Hyperlink hyperlink = new Hyperlink(parent, SWT.NONE);
- hyperlink.setText("ERROR: Unable to present query page, ensure repository configuration is valid and retry");
- hyperlink.setUnderlined(true);
- hyperlink.addHyperlinkListener(new HyperlinkAdapter() {
- @Override
- public void linkActivated(HyperlinkEvent e) {
- TaskSearchPage.this.getControl().getShell().close();
- TasksUiUtil.openEditRepositoryWizard(getTaskRepository());
- // TODO: Re-construct this page with new
- // repository data
- }
-
- });
-
- GridDataFactory.fillDefaults().applyTo(hyperlink);
- setControl(hyperlink);
- }
-
- @Override
- public IRepositoryQuery getQuery() {
- return null;
- }
-
- @Override
- public boolean isPageComplete() {
- return false;
- }
-
- @Override
- public void setVisible(boolean visible) {
- super.setVisible(visible);
- if (visible) {
- getSearchContainer().setPerformActionEnabled(false);
- }
- }
-
- @Override
- public String getQueryTitle() {
- return null;
- }
-
- @Override
- public void applyTo(IRepositoryQuery query) {
- // ignore
- }
-
- }
-
- private class NoSearchPage extends AbstractRepositoryQueryPage {
-
- public NoSearchPage(TaskRepository rep) {
- super("No search page", rep);
- }
-
- public void createControl(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- composite.setLayout(new GridLayout());
- setControl(composite);
- }
-
- @Override
- public IRepositoryQuery getQuery() {
- return null;
- }
-
- @Override
- public boolean isPageComplete() {
- return false;
- }
-
- @Override
- public void setVisible(boolean visible) {
- super.setVisible(visible);
- if (visible) {
- getSearchContainer().setPerformActionEnabled(false);
- }
- }
-
- @Override
- public String getQueryTitle() {
- return null;
- }
-
- @Override
- public void applyTo(IRepositoryQuery query) {
- // ignore
- }
-
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskTransfer.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskTransfer.java
deleted file mode 100644
index 9a06b3927..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskTransfer.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.swt.dnd.ByteArrayTransfer;
-import org.eclipse.swt.dnd.TransferData;
-
-/**
- * @author Mik Kersten
- * @author Steffen Pingel
- */
-public class TaskTransfer extends ByteArrayTransfer {
-
- private static final TaskTransfer INSTANCE = new TaskTransfer();
-
- private static final String TYPE_NAME = "task-transfer-format:" + System.currentTimeMillis() + ":"
- + INSTANCE.hashCode();
-
- private static final int TYPEID = registerType(TYPE_NAME);
-
- private TaskTransfer() {
- }
-
- public static TaskTransfer getInstance() {
- return INSTANCE;
- }
-
- @Override
- protected int[] getTypeIds() {
- return new int[] { TYPEID };
- }
-
- @Override
- protected String[] getTypeNames() {
- return new String[] { TYPE_NAME };
- }
-
- @Override
- protected void javaToNative(Object data, TransferData transferData) {
- if (!(data instanceof ITask[])) {
- return;
- }
-
- ITask[] tasks = (ITask[]) data;
- int resourceCount = tasks.length;
-
- try {
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- DataOutputStream dataOut = new DataOutputStream(out);
-
- // write the number of resources
- dataOut.writeInt(resourceCount);
-
- // write each resource
- for (ITask task : tasks) {
- writeTask(dataOut, task);
- }
-
- // cleanup
- dataOut.close();
- out.close();
- byte[] bytes = out.toByteArray();
- super.javaToNative(bytes, transferData);
- } catch (IOException e) {
- //it's best to send nothing if there were problems
- }
- }
-
- @Override
- protected Object nativeToJava(TransferData transferData) {
- byte[] bytes = (byte[]) super.nativeToJava(transferData);
- if (bytes == null) {
- return null;
- }
- DataInputStream in = new DataInputStream(new ByteArrayInputStream(bytes));
- try {
- int count = in.readInt();
- ITask[] results = new ITask[count];
- for (int i = 0; i < count; i++) {
- results[i] = readTask(in);
- }
- return results;
- } catch (IOException e) {
- return null;
- }
- }
-
- private ITask readTask(DataInputStream dataIn) throws IOException {
- String handle = dataIn.readUTF();
- return TasksUiPlugin.getTaskList().getTask(handle);
- }
-
- private void writeTask(DataOutputStream dataOut, ITask task) throws IOException {
- dataOut.writeUTF(task.getHandleIdentifier());
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskTrimWidget.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskTrimWidget.java
deleted file mode 100644
index 66cbe1382..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskTrimWidget.java
+++ /dev/null
@@ -1,366 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.mylyn.internal.tasks.ui.actions.CopyTaskDetailsAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.OpenTaskListElementAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.OpenWithBrowserAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.TaskActivateAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.TaskDeactivateAction;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITaskActivationListener;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-import org.eclipse.mylyn.tasks.core.TaskActivationAdapter;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.MenuDetectEvent;
-import org.eclipse.swt.events.MenuDetectListener;
-import org.eclipse.swt.events.MouseAdapter;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.forms.events.HyperlinkAdapter;
-import org.eclipse.ui.forms.events.HyperlinkEvent;
-import org.eclipse.ui.internal.ObjectActionContributorManager;
-import org.eclipse.ui.internal.WorkbenchWindow;
-import org.eclipse.ui.internal.layout.IWindowTrim;
-import org.eclipse.ui.menus.WorkbenchWindowControlContribution;
-
-/**
- * @author Mik Kersten
- * @author Leo Dos Santos
- */
-public class TaskTrimWidget extends WorkbenchWindowControlContribution {
-
- public static String ID_CONTAINER = "org.eclipse.mylyn.tasks.ui.trim.container";
-
- public static String ID_CONTROL = "org.eclipse.mylyn.tasks.ui.trim.control";
-
- private Composite composite = null;
-
- private ITask activeTask = null;
-
- private MenuManager menuManager = null;
-
- private Menu menu = null;
-
- private TaskListHyperlink activeTaskLabel;
-
- private final OpenWithBrowserAction openWithBrowserAction = new OpenWithBrowserAction();
-
- private final CopyTaskDetailsAction copyTaskDetailsAction = new CopyTaskDetailsAction();
-
- private Point p;
-
- private final ITaskActivationListener TASK_ACTIVATION_LISTENER = new TaskActivationAdapter() {
-
- @Override
- public void taskActivated(ITask task) {
- activeTask = task;
- indicateActiveTask();
- }
-
- @Override
- public void taskDeactivated(ITask task) {
- activeTask = null;
- indicateNoActiveTask();
- }
-
- };
-
- private final IPropertyChangeListener SHOW_TRIM_LISTENER = new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- String property = event.getProperty();
- if (property.equals(ITasksUiPreferenceConstants.SHOW_TRIM)) {
- setTrimVisible((Boolean) event.getNewValue());
- }
- }
- };
-
- public TaskTrimWidget() {
- TasksUi.getTaskActivityManager().addActivationListener(TASK_ACTIVATION_LISTENER);
- TasksUiPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(SHOW_TRIM_LISTENER);
- hookContextMenu();
- }
-
- private void setTrimVisible(boolean visible) {
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- if (window instanceof WorkbenchWindow) {
- IWindowTrim trim = ((WorkbenchWindow) window).getTrimManager().getTrim(ID_CONTAINER);
- if (trim != null) {
- ((WorkbenchWindow) window).getTrimManager().setTrimVisible(trim, visible);
- }
- }
- }
-
- @Override
- public void dispose() {
- if (composite != null && !composite.isDisposed()) {
- composite.dispose();
- }
- composite = null;
-
- if (menuManager != null) {
- menuManager.removeAll();
- menuManager.dispose();
- }
- menuManager = null;
-
- if (menu != null && !menu.isDisposed()) {
- menu.dispose();
- }
- menu = null;
-
- TasksUi.getTaskActivityManager().removeActivationListener(TASK_ACTIVATION_LISTENER);
- TasksUiPlugin.getDefault().getPreferenceStore().removePropertyChangeListener(SHOW_TRIM_LISTENER);
- }
-
- @Override
- protected Control createControl(Composite parent) {
- composite = new Composite(parent, SWT.NONE);
-
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- layout.horizontalSpacing = 0;
- layout.marginHeight = 0;
- layout.marginLeft = 0;
- layout.marginRight = 0;
- composite.setLayout(layout);
-
- composite.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, true));
-
- createStatusComposite(composite);
-
- parent.getDisplay().asyncExec(new Runnable() {
- public void run() {
- IPreferenceStore uiPreferenceStore = TasksUiPlugin.getDefault().getPreferenceStore();
- setTrimVisible(uiPreferenceStore.getBoolean(ITasksUiPreferenceConstants.SHOW_TRIM));
- }
- });
-
- return composite;
- }
-
- private Composite createStatusComposite(final Composite container) {
- GC gc = new GC(container);
- p = gc.textExtent("WWWWWWWWWWWWWWW");
- gc.dispose();
-
- activeTaskLabel = new TaskListHyperlink(container, SWT.RIGHT);
- // activeTaskLabel.setLayoutData(new GridData(p.x, SWT.DEFAULT));
- GridData gridData = new GridData(SWT.LEFT, SWT.CENTER, false, true);
- gridData.widthHint = p.x;
- gridData.minimumWidth = p.x;
- gridData.horizontalIndent = 0;
- activeTaskLabel.setLayoutData(gridData);
- activeTaskLabel.setText("<no task active>");
-
- activeTask = TasksUi.getTaskActivityManager().getActiveTask();
- if (activeTask != null) {
- indicateActiveTask();
- }
-
- activeTaskLabel.addMenuDetectListener(new MenuDetectListener() {
- public void menuDetected(MenuDetectEvent e) {
- if (menu != null) {
- menu.dispose();
- }
- menu = menuManager.createContextMenu(container);
- menu.setVisible(true);
- }
- });
-
- activeTaskLabel.addHyperlinkListener(new HyperlinkAdapter() {
- @Override
- public void linkActivated(HyperlinkEvent e) {
- TaskListView taskListView = TaskListView.getFromActivePerspective();
- if (taskListView != null && taskListView.getDrilledIntoCategory() != null) {
- taskListView.goUpToRoot();
- }
- TasksUiInternal.refreshAndOpenTaskListElement((TasksUi.getTaskActivityManager().getActiveTask()));
- }
- });
-
- activeTaskLabel.addMouseListener(new MouseAdapter() {
- @Override
- public void mouseDown(MouseEvent e) {
- if (activeTask == null) {
- return;
- }
-
- TaskListView taskListView = TaskListView.getFromActivePerspective();
- if (taskListView != null && taskListView.getDrilledIntoCategory() != null) {
- taskListView.goUpToRoot();
- }
-
- TasksUiInternal.refreshAndOpenTaskListElement(activeTask);
- }
- });
-
- return activeTaskLabel;
- }
-
- private void hookContextMenu() {
- menuManager = new MenuManager("#PopupMenu");
- menuManager.setRemoveAllWhenShown(true);
- menuManager.addMenuListener(new IMenuListener() {
- public void menuAboutToShow(IMenuManager manager) {
- fillContextMenu(manager);
- }
- });
- }
-
- // Inspired by TaskListView, TaskEditorActionContributor.
- private void fillContextMenu(IMenuManager manager) {
- if (activeTask != null) {
- IStructuredSelection selection = new StructuredSelection(activeTask);
- openWithBrowserAction.selectionChanged(selection);
- copyTaskDetailsAction.selectionChanged(selection);
-
- manager.add(new OpenTaskListElementAction(null) {
- @Override
- public void run() {
- TasksUiInternal.refreshAndOpenTaskListElement(activeTask);
- }
- });
-
- manager.add(openWithBrowserAction);
- if (TasksUiInternal.isValidUrl(activeTask.getUrl())) {
- openWithBrowserAction.setEnabled(true);
- } else {
- openWithBrowserAction.setEnabled(false);
- }
-
- if (activeTask.isActive()) {
- manager.add(new TaskDeactivateAction() {
- @Override
- public void run() {
- super.run(activeTask);
- }
- });
- } else {
- manager.add(new TaskActivateAction() {
- @Override
- public void run() {
-// TasksUiPlugin.getTaskListManager().getTaskActivationHistory().addTask(activeTask);
- super.run(activeTask);
- }
- });
- }
-
- manager.add(new Separator());
-
- for (String menuPath : TasksUiPlugin.getDefault().getDynamicMenuMap().keySet()) {
- for (IDynamicSubMenuContributor contributor : TasksUiPlugin.getDefault().getDynamicMenuMap().get(
- menuPath)) {
- List<IRepositoryElement> selectedElements = new ArrayList<IRepositoryElement>();
- selectedElements.add(activeTask);
- MenuManager subMenuManager = contributor.getSubMenuManager(selectedElements);
- if (subMenuManager != null) {
- manager.add(subMenuManager);
- }
- }
- }
-
- manager.add(new Separator());
- manager.add(copyTaskDetailsAction);
- manager.add(new Separator());
-
- ObjectActionContributorManager.getManager().contributeObjectActions(null, manager,
- new ISelectionProvider() {
-
- public void addSelectionChangedListener(ISelectionChangedListener listener) {
- // ignore
- }
-
- public ISelection getSelection() {
- return new StructuredSelection(activeTask);
- }
-
- public void removeSelectionChangedListener(ISelectionChangedListener listener) {
- // ignore
- }
-
- public void setSelection(ISelection selection) {
- // ignore
- }
- });
- }
- }
-
- public void indicateActiveTask() {
- if (activeTaskLabel != null && activeTaskLabel.isDisposed()) {
- return;
- }
-
- //activeTaskLabel.setText(shortenText(activeTask.getSummary()));
- activeTaskLabel.setText(activeTask.getSummary());
- activeTaskLabel.setUnderlined(true);
- activeTaskLabel.setToolTipText(activeTask.getSummary());
- }
-
- public void indicateNoActiveTask() {
- if (activeTaskLabel != null && activeTaskLabel.isDisposed()) {
- return;
- }
-
- activeTaskLabel.setText("<no active task>");
- activeTaskLabel.setUnderlined(false);
- activeTaskLabel.setToolTipText("");
- }
-
-// // From PerspectiveBarContributionItem
-// private String shortenText(String taskLabel) {
-// if (taskLabel == null || composite == null || composite.isDisposed()) {
-// return null;
-// }
-//
-// String returnText = taskLabel;
-// GC gc = new GC(composite);
-// int maxWidth = p.x;
-//
-// if (gc.textExtent(taskLabel).x > maxWidth) {
-// for (int i = taskLabel.length(); i > 0; i--) {
-// String test = taskLabel.substring(0, i);
-// test = test + "...";
-// if (gc.textExtent(test).x < maxWidth) {
-// returnText = test;
-// break;
-// }
-// }
-// }
-//
-// gc.dispose();
-// return returnText;
-// }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskWorkingSetFilter.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskWorkingSetFilter.java
deleted file mode 100644
index eef1fcc82..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskWorkingSetFilter.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.ui;
-
-import java.util.Arrays;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.LocalTask;
-import org.eclipse.mylyn.internal.tasks.core.ScheduledTaskContainer;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITaskContainer;
-import org.eclipse.ui.IWorkingSet;
-
-/**
- * AbstractTaskListFilter for task working sets
- *
- * @author Eugene Kuleshov
- * @author Rob Elves
- * @author Steffen Pingel
- */
-public class TaskWorkingSetFilter extends AbstractTaskListFilter {
-
- private IAdaptable[] elements;
-
- @Override
- public boolean select(Object parent, Object element) {
- if (parent instanceof ITask) {
- return true;
- }
-
- if (parent == null && element instanceof ScheduledTaskContainer) {
- return true;
- }
-
- if (parent == null && element instanceof IRepositoryElement) {
- return isContainedInWorkingSet((IRepositoryElement) element);
- }
- if (parent instanceof ITaskContainer && !(parent instanceof ScheduledTaskContainer)) {
- return isContainedInWorkingSet((IRepositoryElement) parent);
- }
- if (element instanceof LocalTask) {
- for (IRepositoryElement container : ((LocalTask) element).getParentContainers()) {
- return isContainedInWorkingSet(container);
- }
- }
- if (parent instanceof ScheduledTaskContainer && element instanceof ITask) {
- for (IRepositoryElement query : ((AbstractTask) element).getParentContainers()) {
- if (isContainedInWorkingSet(query)) {
- return true;
- }
- }
- return false;
- }
- return true;
- }
-
- private boolean isContainedInWorkingSet(IRepositoryElement container) {
- if (elements == null) {
- return true;
- }
-
- boolean seenTaskWorkingSets = false;
- String handleIdentifier = container.getHandleIdentifier();
- for (IAdaptable adaptable : elements) {
- if (adaptable instanceof IRepositoryElement) {
- seenTaskWorkingSets = true;
- if (handleIdentifier.equals(((IRepositoryElement) adaptable).getHandleIdentifier())) {
- return true;
- }
- }
- }
- return !seenTaskWorkingSets;
- }
-
- public boolean updateWorkingSet(IWorkingSet currentWorkingSet) {
- IAdaptable[] newElements = currentWorkingSet.getElements();
- if (!Arrays.equals(this.elements, newElements)) {
- this.elements = newElements;
- return true;
- }
- return false;
- }
-
- public IAdaptable[] getElements() {
- return elements;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksAdapterFactory.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksAdapterFactory.java
deleted file mode 100644
index fc902f807..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksAdapterFactory.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITaskAttachment;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditorInput;
-
-/**
- * Factory for adapting objects to task elements.
- *
- * @author Steffen Pingel
- */
-public class TasksAdapterFactory implements IAdapterFactory {
-
- private static final Class<?>[] ADAPTER_LIST = new Class[] { ITask.class, TaskRepository.class };
-
- @SuppressWarnings("unchecked")
- public Class[] getAdapterList() {
- return ADAPTER_LIST;
- }
-
- public Object getAdapter(final Object adaptable, @SuppressWarnings("unchecked") Class adapterType) {
- if (adapterType == ITask.class) {
- if (adaptable instanceof TaskEditorInput) {
- return ((TaskEditorInput) adaptable).getTask();
- } else if (adaptable instanceof ITaskAttachment) {
- return ((ITaskAttachment) adaptable).getTask();
- }
- }
- if (adapterType == TaskRepository.class) {
- if (adaptable instanceof TaskEditorInput) {
- return ((TaskEditorInput) adaptable).getTaskRepository();
- } else if (adaptable instanceof ITaskAttachment) {
- return ((ITaskAttachment) adaptable).getTaskRepository();
- }
- }
- return null;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksReminderDialog.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksReminderDialog.java
deleted file mode 100644
index 549253ae9..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksReminderDialog.java
+++ /dev/null
@@ -1,267 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.ui;
-
-import java.text.DateFormat;
-import java.util.Date;
-import java.util.List;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.TaskActivityUtil;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-
-/**
- * @author Ken Sueda
- */
-public class TasksReminderDialog extends Dialog {
- private List<AbstractTask> tasks = null;
-
- private Table table = null;
-
- private TableViewer tableViewer = null;
-
- private final String[] columnNames = new String[] { "Description", "Priority", "Reminder Day" };
-
- private static final int DISMISS_ALL_ID = 200;
-
- private static final int DISMISS_ID = 201;
-
- private static final int SNOOZE_ID = 202;
-
- private static final String DISMISS_ALL_LABEL = "Dismiss All";
-
- private static final String DISMISS_LABEL = "Dismiss Selected";
-
- private static final String SNOOZE_ALL_LABEL = "Remind tommorrow";
-
- private static long DAY = 24 * 3600 * 1000;
-
- public TasksReminderDialog(Shell parentShell, List<AbstractTask> remTasks) {
- super(parentShell);
- tasks = remTasks;
- setShellStyle(SWT.CLOSE | SWT.MIN | SWT.MODELESS | SWT.BORDER | SWT.TITLE);
- }
-
- @Override
- protected void configureShell(Shell shell) {
- super.configureShell(shell);
- shell.setText("Reminders");
- }
-
- @Override
- protected Control createDialogArea(Composite parent) {
- Composite composite = (Composite) super.createDialogArea(parent);
- setBlockOnOpen(false);
- GridLayout gl = new GridLayout(1, false);
- composite.setLayout(gl);
- GridData data = new GridData(GridData.FILL_BOTH);
- composite.setLayoutData(data);
-
- Composite container = new Composite(composite, SWT.NONE);
- gl = new GridLayout(1, false);
- container.setLayout(gl);
- createTable(container);
- createTableViewer();
-
- return composite;
- }
-
- @Override
- protected void createButtonsForButtonBar(Composite parent) {
- createButton(parent, DISMISS_ALL_ID, DISMISS_ALL_LABEL, false);
- createButton(parent, DISMISS_ID, DISMISS_LABEL, false);
- createButton(parent, SNOOZE_ID, SNOOZE_ALL_LABEL, true);
- }
-
- private void createTable(Composite parent) {
- int style = SWT.SINGLE | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION | SWT.HIDE_SELECTION;
- table = new Table(parent, style);
- GridLayout tlayout = new GridLayout();
- table.setLayout(tlayout);
- GridData wd = new GridData(GridData.FILL_BOTH);
- wd.heightHint = 300;
- table.setLayoutData(wd);
-
- table.setLinesVisible(true);
- table.setHeaderVisible(true);
-
- TableColumn column = new TableColumn(table, SWT.LEFT, 0);
- column.setText(columnNames[0]);
- column.setWidth(180);
- column.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- tableViewer.setSorter(new ReminderTaskSorter(ReminderTaskSorter.DESCRIPTION));
-
- }
- });
-
- column = new TableColumn(table, SWT.LEFT, 1);
- column.setText(columnNames[1]);
- column.setWidth(50);
- column.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- tableViewer.setSorter(new ReminderTaskSorter(ReminderTaskSorter.PRIORITY));
- }
- });
-
- column = new TableColumn(table, SWT.LEFT, 2);
- column.setText(columnNames[2]);
- column.setWidth(100);
- column.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- tableViewer.setSorter(new ReminderTaskSorter(ReminderTaskSorter.DATE));
- }
- });
- }
-
- private void createTableViewer() {
- tableViewer = new TableViewer(table);
- tableViewer.setUseHashlookup(true);
- tableViewer.setContentProvider(new ReminderTasksContentProvider());
- tableViewer.setLabelProvider(new ReminderTasksLabelProvider());
- tableViewer.setInput(tasks);
- }
-
- @Override
- protected void buttonPressed(int buttonId) {
- if (buttonId == DISMISS_ALL_ID) {
- for (ITask t : tasks) {
- ((AbstractTask) t).setReminded(true);
- }
- okPressed();
- } else if (buttonId == DISMISS_ID) {
- Object sel = ((IStructuredSelection) tableViewer.getSelection()).getFirstElement();
- if (sel != null && sel instanceof ITask) {
- ITask t = (ITask) sel;
- ((AbstractTask) t).setReminded(true);
- tasks.remove(t);
- if (tasks.isEmpty()) {
- okPressed();
- } else {
- tableViewer.refresh();
- }
- }
- } else if (buttonId == SNOOZE_ID) {
- Object sel = ((IStructuredSelection) tableViewer.getSelection()).getFirstElement();
- if (sel != null && sel instanceof ITask) {
- ITask t = (ITask) sel;
- ((AbstractTask) t).setReminded(false);
- ((AbstractTask) t).setScheduledForDate(TaskActivityUtil.getDayOf(new Date(new Date().getTime() + DAY)));
- tasks.remove(t);
- if (tasks.isEmpty()) {
- okPressed();
- } else {
- tableViewer.refresh();
- }
- }
- }
- super.buttonPressed(buttonId);
- }
-
- private class ReminderTasksContentProvider implements IStructuredContentProvider {
-
- public Object[] getElements(Object inputElement) {
- return tasks.toArray();
- }
-
- public void dispose() {
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
- }
-
- private static class ReminderTasksLabelProvider extends LabelProvider implements ITableLabelProvider {
- public Image getColumnImage(Object element, int columnIndex) {
- return null;
- }
-
- public String getColumnText(Object element, int columnIndex) {
- if (element instanceof ITask) {
- AbstractTask task = (AbstractTask) element;
- switch (columnIndex) {
- case 0:
- return task.getSummary();
- case 1:
- return task.getPriority();
- case 2:
- return DateFormat.getDateInstance(DateFormat.MEDIUM).format(task.getScheduledForDate());
- }
- }
- return null;
- }
-
- }
-
- private static class ReminderTaskSorter extends ViewerSorter {
-
- public final static int DESCRIPTION = 1;
-
- public final static int PRIORITY = 2;
-
- public final static int DATE = 3;
-
- private final int criteria;
-
- public ReminderTaskSorter(int criteria) {
- super();
- this.criteria = criteria;
- }
-
- @Override
- public int compare(Viewer viewer, Object obj1, Object obj2) {
- ITask t1 = (ITask) obj1;
- ITask t2 = (ITask) obj2;
-
- switch (criteria) {
- case DESCRIPTION:
- return compareDescription(t1, t2);
- case PRIORITY:
- return comparePriority(t1, t2);
- case DATE:
- return compareDate((AbstractTask) t1, (AbstractTask) t2);
- default:
- return 0;
- }
- }
-
- private int compareDescription(ITask task1, ITask task2) {
- return task1.getSummary().compareToIgnoreCase(task2.getSummary());
- }
-
- private int comparePriority(ITask task1, ITask task2) {
- return task1.getPriority().compareTo(task2.getPriority());
- }
-
- private int compareDate(AbstractTask task1, AbstractTask task2) {
- return task2.getScheduledForDate().compareTo(task1.getScheduledForDate());
- }
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksUiMessages.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksUiMessages.java
deleted file mode 100644
index 978616ea5..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksUiMessages.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui;
-
-/**
- * @author Mik Kersten
- */
-public class TasksUiMessages {
-
- public static final String DIALOG_EDITOR = "Task Editor";
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksUiPlugin.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksUiPlugin.java
deleted file mode 100644
index b6ae86fc0..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksUiPlugin.java
+++ /dev/null
@@ -1,1204 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.ui;
-
-import java.io.File;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Collection;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeSet;
-
-import org.eclipse.core.net.proxy.IProxyChangeEvent;
-import org.eclipse.core.net.proxy.IProxyChangeListener;
-import org.eclipse.core.net.proxy.IProxyService;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ISaveContext;
-import org.eclipse.core.resources.ISaveParticipant;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.ISafeRunnable;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.SafeRunner;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.text.hyperlink.IHyperlinkDetector;
-import org.eclipse.jface.util.SafeRunnable;
-import org.eclipse.mylyn.commons.core.CoreUtil;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.commons.net.WebClientLog;
-import org.eclipse.mylyn.commons.net.WebUtil;
-import org.eclipse.mylyn.context.core.ContextCore;
-import org.eclipse.mylyn.internal.context.core.ContextCorePlugin;
-import org.eclipse.mylyn.internal.provisional.commons.ui.AbstractNotification;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonColors;
-import org.eclipse.mylyn.internal.tasks.core.AbstractSearchHandler;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.IRepositoryModelListener;
-import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
-import org.eclipse.mylyn.internal.tasks.core.LocalRepositoryConnector;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryExternalizationParticipant;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryTemplateManager;
-import org.eclipse.mylyn.internal.tasks.core.TaskActivityManager;
-import org.eclipse.mylyn.internal.tasks.core.TaskActivityUtil;
-import org.eclipse.mylyn.internal.tasks.core.TaskDataStorageManager;
-import org.eclipse.mylyn.internal.tasks.core.TaskList;
-import org.eclipse.mylyn.internal.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.internal.tasks.core.TasksModel;
-import org.eclipse.mylyn.internal.tasks.core.data.TaskDataManager;
-import org.eclipse.mylyn.internal.tasks.core.data.TaskDataStore;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractLegacyRepositoryConnector;
-import org.eclipse.mylyn.internal.tasks.core.externalization.ExternalizationManager;
-import org.eclipse.mylyn.internal.tasks.core.externalization.IExternalizationParticipant;
-import org.eclipse.mylyn.internal.tasks.core.externalization.TaskListExternalizationParticipant;
-import org.eclipse.mylyn.internal.tasks.core.externalization.TaskListExternalizer;
-import org.eclipse.mylyn.internal.tasks.ui.deprecated.AbstractTaskEditorFactory;
-import org.eclipse.mylyn.internal.tasks.ui.notifications.TaskListNotification;
-import org.eclipse.mylyn.internal.tasks.ui.notifications.TaskListNotificationQueryIncoming;
-import org.eclipse.mylyn.internal.tasks.ui.notifications.TaskListNotificationReminder;
-import org.eclipse.mylyn.internal.tasks.ui.notifications.TaskListNotifier;
-import org.eclipse.mylyn.internal.tasks.ui.util.TaskListElementImporter;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiExtensionReader;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskRepositoriesView;
-import org.eclipse.mylyn.tasks.core.AbstractDuplicateDetector;
-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.ITaskActivationListener;
-import org.eclipse.mylyn.tasks.core.ITaskContainer;
-import org.eclipse.mylyn.tasks.core.RepositoryTemplate;
-import org.eclipse.mylyn.tasks.core.TaskActivationAdapter;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
-import org.eclipse.mylyn.tasks.core.ITask.SynchronizationState;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.AbstractTaskRepositoryLinkProvider;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPageFactory;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.IStartup;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.eclipse.ui.progress.IProgressService;
-import org.eclipse.ui.progress.UIJob;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-
-/**
- * Main entry point for the Tasks UI.
- *
- * @author Mik Kersten
- * @since 3.0
- */
-public class TasksUiPlugin extends AbstractUIPlugin {
-
- private static final int DELAY_QUERY_REFRESH_ON_STARTUP = 20 * 1000;
-
- private static final int LINK_PROVIDER_TIMEOUT_SECONDS = 5;
-
- public static final String LABEL_VIEW_REPOSITORIES = "Task Repositories";
-
- public static final String ID_PLUGIN = "org.eclipse.mylyn.tasks.ui";
-
- private static final String FOLDER_OFFLINE = "offline";
-
- private static final String DIRECTORY_METADATA = ".metadata";
-
- private static final String NAME_DATA_DIR = ".mylyn";
-
- private static final char DEFAULT_PATH_SEPARATOR = '/';
-
- private static final int NOTIFICATION_DELAY = 5000;
-
- private static TasksUiPlugin INSTANCE;
-
- private static ExternalizationManager externalizationManager;
-
- private static TaskListManager taskListManager;
-
- private static TaskActivityManager taskActivityManager;
-
- private static TaskRepositoryManager repositoryManager;
-
- private static TaskListSynchronizationScheduler synchronizationScheduler;
-
- private static TaskDataManager taskDataManager;
-
- private static Map<String, AbstractRepositoryConnectorUi> repositoryConnectorUiMap = new HashMap<String, AbstractRepositoryConnectorUi>();
-
- //private TaskListSaveManager taskListSaveManager;
-
- private TaskListNotificationManager taskListNotificationManager;
-
- private TaskListBackupManager taskListBackupManager;
-
- private TaskDataStorageManager taskDataStorageManager;
-
- private RepositoryTemplateManager repositoryTemplateManager;
-
- private final Set<AbstractTaskEditorFactory> taskEditorFactories = new HashSet<AbstractTaskEditorFactory>();
-
- private final Set<AbstractTaskEditorPageFactory> taskEditorPageFactories = new HashSet<AbstractTaskEditorPageFactory>();
-
- private final Set<IHyperlinkDetector> hyperlinkDetectors = new HashSet<IHyperlinkDetector>();
-
- private final TreeSet<AbstractTaskRepositoryLinkProvider> repositoryLinkProviders = new TreeSet<AbstractTaskRepositoryLinkProvider>(
- new OrderComparator());
-
- private TaskListExternalizer taskListExternalizer;
-
- private ITaskHighlighter highlighter;
-
- private final Map<String, Image> brandingIcons = new HashMap<String, Image>();
-
- private final Map<String, ImageDescriptor> overlayIcons = new HashMap<String, ImageDescriptor>();
-
- private final Set<AbstractDuplicateDetector> duplicateDetectors = new HashSet<AbstractDuplicateDetector>();
-
- private ISaveParticipant saveParticipant;
-
- private TaskEditorBloatMonitor taskEditorBloatManager;
-
- private TaskJobFactory tasksJobFactory;
-
- private final List<AbstractSearchHandler> searchHandlers = new ArrayList<AbstractSearchHandler>();
-
- private static final boolean DEBUG_HTTPCLIENT = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.mylyn.tasks.ui/debug/httpclient"));
-
- // XXX reconsider if this is necessary
- public static class TasksUiStartup implements IStartup {
-
- public void earlyStartup() {
- // ignore
- }
- }
-
- private static final class OrderComparator implements Comparator<AbstractTaskRepositoryLinkProvider> {
- public int compare(AbstractTaskRepositoryLinkProvider p1, AbstractTaskRepositoryLinkProvider p2) {
- return p1.getOrder() - p2.getOrder();
- }
- }
-
- public enum TaskListSaveMode {
- ONE_HOUR, THREE_HOURS, DAY;
- @Override
- public String toString() {
- switch (this) {
- case ONE_HOUR:
- return "1 hour";
- case THREE_HOURS:
- return "3 hours";
- case DAY:
- return "1 day";
- default:
- return "3 hours";
- }
- }
-
- public static TaskListSaveMode fromString(String string) {
- if (string == null) {
- return null;
- }
- if (string.equals("1 hour")) {
- return ONE_HOUR;
- }
- if (string.equals("3 hours")) {
- return THREE_HOURS;
- }
- if (string.equals("1 day")) {
- return DAY;
- }
- return null;
- }
-
- public static long fromStringToLong(String string) {
- long hour = 3600 * 1000;
- switch (fromString(string)) {
- case ONE_HOUR:
- return hour;
- case THREE_HOURS:
- return hour * 3;
- case DAY:
- return hour * 24;
- default:
- return hour * 3;
- }
- }
- }
-
- public enum ReportOpenMode {
- EDITOR, INTERNAL_BROWSER, EXTERNAL_BROWSER;
- }
-
- private static ITaskActivationListener CONTEXT_TASK_ACTIVATION_LISTENER = new TaskActivationAdapter() {
-
- @Override
- public void taskActivated(final ITask task) {
- ContextCore.getContextManager().activateContext(task.getHandleIdentifier());
- }
-
- @Override
- public void taskDeactivated(final ITask task) {
- ContextCore.getContextManager().deactivateContext(task.getHandleIdentifier());
- }
-
- };
-
- private static ITaskListNotificationProvider REMINDER_NOTIFICATION_PROVIDER = new ITaskListNotificationProvider() {
-
- public Set<AbstractNotification> getNotifications() {
- Collection<AbstractTask> allTasks = TasksUiPlugin.getTaskList().getAllTasks();
- Set<AbstractNotification> reminders = new HashSet<AbstractNotification>();
- for (AbstractTask task : allTasks) {
- if (task.isPastReminder() && !task.isReminded()) {
- reminders.add(new TaskListNotificationReminder(task));
- task.setReminded(true);
- }
- }
- return reminders;
- }
- };
-
- private static ITaskListNotificationProvider INCOMING_NOTIFICATION_PROVIDER = new ITaskListNotificationProvider() {
-
- @SuppressWarnings( { "deprecation", "restriction" })
- public Set<AbstractNotification> getNotifications() {
- Set<AbstractNotification> notifications = new HashSet<AbstractNotification>();
- // Incoming Changes
- for (TaskRepository repository : getRepositoryManager().getAllRepositories()) {
- AbstractRepositoryConnector connector = getRepositoryManager().getRepositoryConnector(
- repository.getConnectorKind());
- if (connector instanceof AbstractLegacyRepositoryConnector) {
- AbstractRepositoryConnectorUi connectorUi = getConnectorUi(repository.getConnectorKind());
- if (connectorUi != null && !connectorUi.hasCustomNotifications()) {
- for (ITask itask : TasksUiPlugin.getTaskList().getTasks(repository.getRepositoryUrl())) {
- if (itask instanceof AbstractTask) {
- AbstractTask task = (AbstractTask) itask;
- if ((task.getLastReadTimeStamp() == null || task.getSynchronizationState() == SynchronizationState.INCOMING)
- && task.isNotified() == false) {
- TaskListNotification notification = LegacyChangeManager.getIncommingNotification(
- connector, task);
- notifications.add(notification);
- task.setNotified(true);
- }
- }
- }
- }
- }
- }
- // New query hits
- for (RepositoryQuery query : TasksUiPlugin.getTaskList().getQueries()) {
- TaskRepository repository = getRepositoryManager().getRepository(query.getRepositoryUrl());
- if (repository != null) {
- AbstractRepositoryConnector connector = getRepositoryManager().getRepositoryConnector(
- repository.getConnectorKind());
- if (connector instanceof AbstractLegacyRepositoryConnector) {
- AbstractRepositoryConnectorUi connectorUi = getConnectorUi(query.getConnectorKind());
- if (!connectorUi.hasCustomNotifications()) {
- for (ITask hit : query.getChildren()) {
- if (((AbstractTask) hit).isNotified() == false) {
- notifications.add(new TaskListNotificationQueryIncoming(hit));
- ((AbstractTask) hit).setNotified(true);
- }
- }
- }
- }
- }
- }
- return notifications;
- }
- };
-
-// private final IPropertyChangeListener PREFERENCE_LISTENER = new IPropertyChangeListener() {
-//
-// public void propertyChange(PropertyChangeEvent event) {
-// // TODO: do we ever get here?
-//// if (event.getProperty().equals(ContextPreferenceContstants.PREF_DATA_DIR)) {
-//// if (event.getOldValue() instanceof String) {
-//// reloadDataDirectory();
-//// }
-//// }
-// }
-// };
-
- private final org.eclipse.jface.util.IPropertyChangeListener PROPERTY_LISTENER = new org.eclipse.jface.util.IPropertyChangeListener() {
-
- public void propertyChange(org.eclipse.jface.util.PropertyChangeEvent event) {
-// if (event.getProperty().equals(ContextPreferenceContstants.PREF_DATA_DIR)) {
-// if (event.getOldValue() instanceof String) {
-// reloadDataDirectory();
-// }
-// }
-
- if (event.getProperty().equals(ITasksUiPreferenceConstants.PLANNING_ENDHOUR)
- || event.getProperty().equals(ITasksUiPreferenceConstants.WEEK_START_DAY)) {
- updateTaskActivityManager();
- }
-
- if (event.getProperty().equals(ITasksUiPreferenceConstants.REPOSITORY_SYNCH_SCHEDULE_ENABLED)
- || event.getProperty().equals(ITasksUiPreferenceConstants.REPOSITORY_SYNCH_SCHEDULE_MILISECONDS)) {
- updateSynchronizationScheduler(false);
- }
- }
- };
-
- private TaskActivityMonitor taskActivityMonitor;
-
- private ServiceReference proxyServiceReference;
-
- private IProxyChangeListener proxyChangeListener;
-
- private TaskListExternalizationParticipant taskListSaveParticipant;
-
- private final Set<IRepositoryModelListener> listeners = new HashSet<IRepositoryModelListener>();
-
- private static TaskList taskList;
-
- private static TasksModel tasksModel;
-
- private class TasksUiInitializationJob extends UIJob {
-
- public TasksUiInitializationJob() {
- super("Initializing Task List");
- setSystem(true);
- }
-
- @Override
- public IStatus runInUIThread(IProgressMonitor monitor) {
- // NOTE: failure in one part of the initialization should
- // not prevent others
- monitor.beginTask("Initializing Task List", 5);
- try {
- // Needs to run after workbench is loaded because it
- // relies on images.
- TasksUiExtensionReader.initWorkbenchUiExtensions();
-
- if (externalizationManager.getLoadStatus() != null) {
- // XXX: recovery from task list load failure (Rendered in task list)
- }
-
- // Needs to happen asynchronously to avoid bug 159706
- for (AbstractTask task : taskListManager.getTaskList().getAllTasks()) {
- if (task.isActive()) {
- taskListManager.activateTask(task);
- break;
- }
- }
- //taskActivityMonitor.reloadActivityTime();
- } catch (Throwable t) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Could not initialize task activity", t));
- }
- monitor.worked(1);
-
- try {
- taskListNotificationManager = new TaskListNotificationManager();
- taskListNotificationManager.addNotificationProvider(REMINDER_NOTIFICATION_PROVIDER);
- taskListNotificationManager.addNotificationProvider(INCOMING_NOTIFICATION_PROVIDER);
- taskListNotificationManager.addNotificationProvider(new TaskListNotifier(getRepositoryModel(),
- getTaskDataManager()));
- taskListNotificationManager.startNotification(NOTIFICATION_DELAY);
- getPreferenceStore().addPropertyChangeListener(taskListNotificationManager);
- } catch (Throwable t) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Could not initialize notifications", t));
- }
- monitor.worked(1);
-
- try {
- taskListBackupManager = new TaskListBackupManager(getBackupFolderPath());
- getPreferenceStore().addPropertyChangeListener(taskListBackupManager);
-
- synchronizationScheduler = new TaskListSynchronizationScheduler(tasksJobFactory);
- updateSynchronizationScheduler(true);
- } catch (Throwable t) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Could not initialize task list backup and synchronization", t));
- }
- monitor.worked(1);
-
- try {
-
- getPreferenceStore().addPropertyChangeListener(PROPERTY_LISTENER);
-
- // TODO: get rid of this, hack to make decorators show
- // up on startup
- TaskRepositoriesView repositoriesView = TaskRepositoriesView.getFromActivePerspective();
- if (repositoriesView != null) {
- repositoriesView.getViewer().refresh();
- }
-
- taskEditorBloatManager = new TaskEditorBloatMonitor();
- taskEditorBloatManager.install(PlatformUI.getWorkbench());
- } catch (Throwable t) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Could not finish Tasks UI initialization", t));
- } finally {
- monitor.done();
- }
- return new Status(IStatus.OK, TasksUiPlugin.ID_PLUGIN, IStatus.OK, "", null);
- }
- }
-
- public TasksUiPlugin() {
- super();
- INSTANCE = this;
- }
-
- private void updateSynchronizationScheduler(boolean initial) {
- boolean enabled = TasksUiPlugin.getDefault().getPreferenceStore().getBoolean(
- ITasksUiPreferenceConstants.REPOSITORY_SYNCH_SCHEDULE_ENABLED);
- if (enabled) {
- long interval = TasksUiPlugin.getDefault().getPreferenceStore().getLong(
- ITasksUiPreferenceConstants.REPOSITORY_SYNCH_SCHEDULE_MILISECONDS);
- if (initial) {
- synchronizationScheduler.setInterval(DELAY_QUERY_REFRESH_ON_STARTUP, interval);
- } else {
- synchronizationScheduler.setInterval(interval);
- }
- } else {
- synchronizationScheduler.setInterval(0);
- }
- }
-
- @SuppressWarnings( { "deprecation", "restriction" })
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- // NOTE: startup order is very sensitive
- try {
- // initialize framework and settings
- WebUtil.init();
- WebClientLog.setLoggingEnabled(DEBUG_HTTPCLIENT);
- initializePreferences(getPreferenceStore());
-
- File dataDir = new File(getDataDirectory());
- dataDir.mkdirs();
-
- // create data model
- externalizationManager = new ExternalizationManager(getDataDirectory());
-
- repositoryManager = new TaskRepositoryManager();
- IExternalizationParticipant repositoryParticipant = new RepositoryExternalizationParticipant(
- externalizationManager, repositoryManager);
- externalizationManager.addParticipant(repositoryParticipant);
-
- taskList = new TaskList();
- tasksModel = new TasksModel(taskList, repositoryManager);
- taskListExternalizer = new TaskListExternalizer(tasksModel);
- TaskListElementImporter taskListImporter = new TaskListElementImporter(repositoryManager, tasksModel);
-
- taskListSaveParticipant = new TaskListExternalizationParticipant(taskList, taskListExternalizer,
- externalizationManager, repositoryManager);
- //externalizationManager.load(taskListSaveParticipant);
- externalizationManager.addParticipant(taskListSaveParticipant);
- taskList.addChangeListener(taskListSaveParticipant);
-
- taskActivityManager = new TaskActivityManager(repositoryManager, taskList);
-
- taskListManager = new TaskListManager(taskList, taskListSaveParticipant, taskListImporter);
-
- // initialize
- updateTaskActivityManager();
-
- proxyServiceReference = context.getServiceReference(IProxyService.class.getName());
- if (proxyServiceReference != null) {
- IProxyService proxyService = (IProxyService) context.getService(proxyServiceReference);
- if (proxyService != null) {
- proxyChangeListener = new IProxyChangeListener() {
- public void proxyInfoChanged(IProxyChangeEvent event) {
- List<TaskRepository> repos = repositoryManager.getAllRepositories();
- for (TaskRepository repo : repos) {
- if (repo.isDefaultProxyEnabled()) {
- repositoryManager.notifyRepositorySettingsChanged(repo);
- }
- }
- }
- };
- proxyService.addProxyChangeListener(proxyChangeListener);
- }
- }
-
- repositoryTemplateManager = new RepositoryTemplateManager();
-
- // NOTE: initializing extensions in start(..) has caused race
- // conditions previously
- TasksUiExtensionReader.initStartupExtensions(taskListExternalizer, taskListImporter);
-
- // instantiates taskDataManager
- File root = new File(this.getDataDirectory() + '/' + FOLDER_OFFLINE);
- OfflineFileStorage storage = new OfflineFileStorage(root);
- OfflineCachingStorage cachedStorage = new OfflineCachingStorage(storage);
- taskDataStorageManager = new TaskDataStorageManager(repositoryManager, cachedStorage);
- taskDataStorageManager.start();
-
- TaskDataStore taskDataStore = new TaskDataStore(repositoryManager);
-
- taskDataManager = new TaskDataManager(taskDataStorageManager, taskDataStore, repositoryManager,
- taskListManager.getTaskList(), taskActivityManager);
- taskDataManager.setDataPath(getDataDirectory());
-
- for (AbstractRepositoryConnector connector : repositoryManager.getRepositoryConnectors()) {
- if (connector instanceof AbstractLegacyRepositoryConnector) {
- ((AbstractLegacyRepositoryConnector) connector).init(taskDataManager);
- }
- }
-
- tasksJobFactory = new TaskJobFactory(taskListManager.getTaskList(), taskDataManager, repositoryManager,
- tasksModel);
-
- taskActivityManager.addActivationListener(CONTEXT_TASK_ACTIVATION_LISTENER);
-
- taskActivityMonitor = new TaskActivityMonitor(taskActivityManager, ContextCorePlugin.getContextManager());
- taskActivityMonitor.start();
-
- saveParticipant = new ISaveParticipant() {
-
- public void doneSaving(ISaveContext context) {
- }
-
- public void prepareToSave(ISaveContext context) throws CoreException {
- }
-
- public void rollback(ISaveContext context) {
- }
-
- public void saving(ISaveContext context) throws CoreException {
- if (context.getKind() == ISaveContext.FULL_SAVE) {
- externalizationManager.stop();
- taskDataStorageManager.stop();
- }
- }
- };
- ResourcesPlugin.getWorkspace().addSaveParticipant(this, saveParticipant);
-
- ActivityExternalizationParticipant ACTIVITY_EXTERNALIZTAION_PARTICIPANT = new ActivityExternalizationParticipant();
- externalizationManager.addParticipant(ACTIVITY_EXTERNALIZTAION_PARTICIPANT);
- taskActivityManager.addActivityListener(ACTIVITY_EXTERNALIZTAION_PARTICIPANT);
- taskActivityMonitor.setExternalizationParticipant(ACTIVITY_EXTERNALIZTAION_PARTICIPANT);
- loadDataSources();
- new TasksUiInitializationJob().schedule();
- } catch (Exception e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Task list initialization failed", e));
- }
- }
-
- private void updateTaskActivityManager() {
- int endHour = getPreferenceStore().getInt(ITasksUiPreferenceConstants.PLANNING_ENDHOUR);
-// if (taskActivityManager.getEndHour() != endHour) {
-// taskActivityManager.setEndHour(endHour);
- TaskActivityUtil.setEndHour(endHour);
-// }
-
- int newWeekStartDay = getPreferenceStore().getInt(ITasksUiPreferenceConstants.WEEK_START_DAY);
- int oldWeekStartDay = taskActivityManager.getWeekStartDay();
- if (oldWeekStartDay != newWeekStartDay) {
- taskActivityManager.setWeekStartDay(newWeekStartDay);
-// taskActivityManager.setStartTime(new Date());
- }
-
- // event.getProperty().equals(TaskListPreferenceConstants.PLANNING_STARTDAY)
- // scheduledStartHour =
- // TasksUiPlugin.getDefault().getPreferenceStore().getInt(
- // TaskListPreferenceConstants.PLANNING_STARTHOUR);
- }
-
- private void loadTemplateRepositories() {
- // Add standard local task repository
- TaskRepository localRepository = getLocalTaskRepository();
- localRepository.setRepositoryLabel(LocalRepositoryConnector.REPOSITORY_LABEL);
-
- // Add the automatically created templates
- for (AbstractRepositoryConnector connector : repositoryManager.getRepositoryConnectors()) {
- for (RepositoryTemplate template : repositoryTemplateManager.getTemplates(connector.getConnectorKind())) {
-
- if (template.addAutomatically && !TaskRepositoryUtil.isAddAutomaticallyDisabled(template.repositoryUrl)) {
- try {
- TaskRepository taskRepository = repositoryManager.getRepository(connector.getConnectorKind(),
- template.repositoryUrl);
- if (taskRepository == null) {
- taskRepository = new TaskRepository(connector.getConnectorKind(), template.repositoryUrl);
- taskRepository.setVersion(template.version);
- taskRepository.setRepositoryLabel(template.label);
- taskRepository.setCharacterEncoding(template.characterEncoding);
- taskRepository.setAnonymous(template.anonymous);
- repositoryManager.addRepository(taskRepository);
- }
- } catch (Throwable t) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Could not load repository template", t));
- }
- }
- }
- }
- }
-
- /**
- * Returns the local task repository. If the repository does not exist it is created and added to the task
- * repository manager.
- *
- * @return the local task repository; never <code>null</code>
- * @since 3.0
- */
- public TaskRepository getLocalTaskRepository() {
- TaskRepository localRepository = repositoryManager.getRepository(LocalRepositoryConnector.CONNECTOR_KIND,
- LocalRepositoryConnector.REPOSITORY_URL);
- if (localRepository == null) {
- localRepository = new TaskRepository(LocalRepositoryConnector.CONNECTOR_KIND,
- LocalRepositoryConnector.REPOSITORY_URL);
- localRepository.setVersion(LocalRepositoryConnector.REPOSITORY_VERSION);
- localRepository.setRepositoryLabel(LocalRepositoryConnector.REPOSITORY_LABEL);
- localRepository.setAnonymous(true);
- repositoryManager.addRepository(localRepository);
- }
- return localRepository;
- }
-
- @Override
- public void stop(BundleContext context) throws Exception {
- try {
- if (taskActivityMonitor != null) {
- taskActivityMonitor.stop();
- }
-
- if (ResourcesPlugin.getWorkspace() != null) {
- ResourcesPlugin.getWorkspace().removeSaveParticipant(this);
- }
-
- if (proxyServiceReference != null) {
- IProxyService proxyService = (IProxyService) context.getService(proxyServiceReference);
- if (proxyService != null) {
- proxyService.removeProxyChangeListener(proxyChangeListener);
- }
- context.ungetService(proxyServiceReference);
- }
-
- if (PlatformUI.isWorkbenchRunning()) {
- getPreferenceStore().removePropertyChangeListener(taskListNotificationManager);
- getPreferenceStore().removePropertyChangeListener(taskListBackupManager);
- getPreferenceStore().removePropertyChangeListener(PROPERTY_LISTENER);
- //taskListManager.getTaskList().removeChangeListener(taskListSaveManager);
- CommonColors.dispose();
-// if (ContextCorePlugin.getDefault() != null) {
-// ContextCorePlugin.getDefault().getPluginPreferences().removePropertyChangeListener(
-// PREFERENCE_LISTENER);
-// }
- taskEditorBloatManager.dispose(PlatformUI.getWorkbench());
- INSTANCE = null;
- }
- } catch (Exception e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Task list stop terminated abnormally", e));
- } finally {
- super.stop(context);
- }
- }
-
- public String getDefaultDataDirectory() {
- return ResourcesPlugin.getWorkspace().getRoot().getLocation().toString() + '/' + DIRECTORY_METADATA + '/'
- + NAME_DATA_DIR;
- }
-
- public String getDataDirectory() {
- return getPreferenceStore().getString(ITasksUiPreferenceConstants.PREF_DATA_DIR);
- }
-
- /**
- * Save first, then load from <code>newPath</code>. Sets the new data directory, which upon setting results in
- * reload of task list information from the <code>newPath</code> supplied.
- *
- * @throws CoreException
- */
- @SuppressWarnings("restriction")
- public void setDataDirectory(final String newPath, IProgressMonitor monitor) throws CoreException {
- externalizationManager.saveNow(monitor);
- loadDataDirectory(newPath);
- getPreferenceStore().setValue(ITasksUiPreferenceConstants.PREF_DATA_DIR, newPath);
- File newFile = new File(newPath, ITasksCoreConstants.CONTEXTS_DIRECTORY);
- if (!newFile.exists()) {
- newFile.mkdirs();
- }
- ContextCorePlugin.getContextStore().setContextDirectory(newFile);
- }
-
- public void reloadDataDirectory() throws CoreException {
- // no save just load what is there
- loadDataDirectory(getDataDirectory());
- }
-
- /**
- * Load's data sources from <code>newPath</code> and executes with progress
- */
- private synchronized void loadDataDirectory(final String newPath) throws CoreException {
-
- IRunnableWithProgress setDirectoryRunnable = new IRunnableWithProgress() {
-
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
-
- try {
- monitor.beginTask("Load Data Directory", IProgressMonitor.UNKNOWN);
- Job.getJobManager().beginRule(ITasksCoreConstants.ROOT_SCHEDULING_RULE,
- new SubProgressMonitor(monitor, 1));
- if (monitor.isCanceled()) {
- throw new InterruptedException();
- }
- TasksUi.getTaskActivityManager().deactivateActiveTask();
- externalizationManager.setRootFolderPath(newPath);
-
- loadDataSources();
- } finally {
- Job.getJobManager().endRule(ITasksCoreConstants.ROOT_SCHEDULING_RULE);
- monitor.done();
- }
- }
-
- };
-
- IProgressService service = PlatformUI.getWorkbench().getProgressService();
- try {
- if (!CoreUtil.TEST_MODE) {
- service.run(false, false, setDirectoryRunnable);
- } else {
- setDirectoryRunnable.run(new NullProgressMonitor());
- }
- } catch (InvocationTargetException e) {
- throw new CoreException(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Failed to set data directory",
- e.getCause()));
- } catch (InterruptedException e) {
- throw new OperationCanceledException();
- }
-
- }
-
- /**
- * called on startup and when the mylyn data structures are reloaded from disk
- */
- @SuppressWarnings("restriction")
- private void loadDataSources() {
- File storeFile = getContextStoreDir();
- ContextCorePlugin.getContextStore().setContextDirectory(storeFile);
-
- externalizationManager.reLoad();
- // TODO: Move management of template repositories to TaskRepositoryManager
- loadTemplateRepositories();
-
- taskActivityManager.clear();
- ContextCorePlugin.getContextManager().loadActivityMetaContext();
- taskActivityMonitor.reloadActivityTime();
- taskActivityManager.reloadPlanningData();
-
- for (final IRepositoryModelListener listener : listeners) {
- SafeRunner.run(new ISafeRunnable() {
-
- public void handleException(Throwable exception) {
- StatusHandler.log(new Status(IStatus.WARNING, TasksUiPlugin.ID_PLUGIN, "Listener failed: "
- + listener.getClass(), exception));
- }
-
- public void run() throws Exception {
- listener.loaded();
- }
- });
- }
- }
-
- private File getContextStoreDir() {
- File storeFile = new File(getDataDirectory(), ITasksCoreConstants.CONTEXTS_DIRECTORY);
- if (!storeFile.exists()) {
- storeFile.mkdirs();
- }
- return storeFile;
- }
-
- private void initializePreferences(IPreferenceStore store) {
- store.setDefault(ITasksUiPreferenceConstants.PREF_DATA_DIR, getDefaultDataDirectory());
- store.setDefault(ITasksUiPreferenceConstants.GROUP_SUBTASKS, true);
- store.setDefault(ITasksUiPreferenceConstants.NOTIFICATIONS_ENABLED, true);
- store.setDefault(ITasksUiPreferenceConstants.FILTER_PRIORITY, PriorityLevel.P5.toString());
- store.setDefault(ITasksUiPreferenceConstants.EDITOR_TASKS_RICH, true);
- store.setDefault(ITasksUiPreferenceConstants.ACTIVATE_WHEN_OPENED, false);
- store.setDefault(ITasksUiPreferenceConstants.SHOW_TRIM, false);
- store.setDefault(ITasksUiPreferenceConstants.LOCAL_SUB_TASKS_ENABLED, false);
-
- store.setDefault(ITasksUiPreferenceConstants.REPOSITORY_SYNCH_SCHEDULE_ENABLED, true);
- store.setDefault(ITasksUiPreferenceConstants.REPOSITORY_SYNCH_SCHEDULE_MILISECONDS, "" + (20 * 60 * 1000));
-
- //store.setDefault(TasksUiPreferenceConstants.BACKUP_SCHEDULE, 1);
- store.setDefault(ITasksUiPreferenceConstants.BACKUP_MAXFILES, 20);
- store.setDefault(ITasksUiPreferenceConstants.BACKUP_LAST, 0f);
-
- store.setDefault(ITasksUiPreferenceConstants.FILTER_ARCHIVE_MODE, true);
- store.setDefault(ITasksUiPreferenceConstants.ACTIVATE_MULTIPLE, false);
- store.setValue(ITasksUiPreferenceConstants.ACTIVATE_MULTIPLE, false);
-
- store.setDefault(ITasksUiPreferenceConstants.WEEK_START_DAY, Calendar.getInstance().getFirstDayOfWeek());
- //store.setDefault(TasksUiPreferenceConstants.PLANNING_STARTHOUR, 9);
- store.setDefault(ITasksUiPreferenceConstants.PLANNING_ENDHOUR, 18);
- }
-
- public static TaskListManager getTaskListManager() {
- return taskListManager;
- }
-
- public static TaskActivityManager getTaskActivityManager() {
- return taskActivityManager;
- }
-
- public static TaskListNotificationManager getTaskListNotificationManager() {
- return INSTANCE.taskListNotificationManager;
- }
-
- /**
- * Returns the shared instance.
- */
- public static TasksUiPlugin getDefault() {
- return INSTANCE;
- }
-
- public boolean groupSubtasks(ITaskContainer element) {
- boolean groupSubtasks = TasksUiPlugin.getDefault().getPreferenceStore().getBoolean(
- ITasksUiPreferenceConstants.GROUP_SUBTASKS);
-
- if (element instanceof ITask) {
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(((ITask) element).getConnectorKind());
- if (connectorUi != null) {
- if (connectorUi.hasStrictSubtaskHierarchy()) {
- groupSubtasks = true;
- }
- }
- }
-
- if (element instanceof IRepositoryQuery) {
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(((IRepositoryQuery) element).getConnectorKind());
- if (connectorUi != null) {
- if (connectorUi.hasStrictSubtaskHierarchy()) {
- groupSubtasks = true;
- }
- }
- }
-
- return groupSubtasks;
- }
-
- private final Map<String, List<IDynamicSubMenuContributor>> menuContributors = new HashMap<String, List<IDynamicSubMenuContributor>>();
-
- public Map<String, List<IDynamicSubMenuContributor>> getDynamicMenuMap() {
- return menuContributors;
- }
-
- // API-3.0: move to a standard dynamic menu mechanism?
- public void addDynamicPopupContributor(String menuPath, IDynamicSubMenuContributor contributor) {
- List<IDynamicSubMenuContributor> contributors = menuContributors.get(menuPath);
- if (contributors == null) {
- contributors = new ArrayList<IDynamicSubMenuContributor>();
- menuContributors.put(menuPath, contributors);
- }
- contributors.add(contributor);
- }
-
- public String[] getSaveOptions() {
- String[] options = { TaskListSaveMode.ONE_HOUR.toString(), TaskListSaveMode.THREE_HOURS.toString(),
- TaskListSaveMode.DAY.toString() };
- return options;
- }
-
- public String getBackupFolderPath() {
- return getDataDirectory() + DEFAULT_PATH_SEPARATOR + ITasksCoreConstants.DEFAULT_BACKUP_FOLDER_NAME;
- }
-
- public ITaskHighlighter getHighlighter() {
- return highlighter;
- }
-
- public void setHighlighter(ITaskHighlighter highlighter) {
- this.highlighter = highlighter;
- }
-
- /**
- * @since 3.0
- */
- public AbstractTaskEditorPageFactory[] getTaskEditorPageFactories() {
- return taskEditorPageFactories.toArray(new AbstractTaskEditorPageFactory[0]);
- }
-
- public Set<AbstractTaskEditorFactory> getTaskEditorFactories() {
- return taskEditorFactories;
- }
-
- public void addContextEditor(AbstractTaskEditorFactory contextEditor) {
- if (contextEditor != null) {
- this.taskEditorFactories.add(contextEditor);
- }
- }
-
- /**
- * @since 3.0
- */
- public void addTaskEditorPageFactory(AbstractTaskEditorPageFactory factory) {
- Assert.isNotNull(factory);
- taskEditorPageFactories.add(factory);
- }
-
- /**
- * @since 3.0
- */
- public void removeTaskEditorPageFactory(AbstractTaskEditorPageFactory factory) {
- Assert.isNotNull(factory);
- taskEditorPageFactories.remove(factory);
- }
-
- public static TaskRepositoryManager getRepositoryManager() {
- return repositoryManager;
- }
-
- /**
- * @since 3.0
- */
- public static RepositoryTemplateManager getRepositoryTemplateManager() {
- return INSTANCE.repositoryTemplateManager;
- }
-
- public void addBrandingIcon(String repositoryType, Image icon) {
- brandingIcons.put(repositoryType, icon);
- }
-
- public Image getBrandingIcon(String repositoryType) {
- return brandingIcons.get(repositoryType);
- }
-
- public void addOverlayIcon(String repositoryType, ImageDescriptor icon) {
- overlayIcons.put(repositoryType, icon);
- }
-
- public ImageDescriptor getOverlayIcon(String repositoryType) {
- return overlayIcons.get(repositoryType);
- }
-
- public void addRepositoryLinkProvider(AbstractTaskRepositoryLinkProvider repositoryLinkProvider) {
- if (repositoryLinkProvider != null) {
- this.repositoryLinkProviders.add(repositoryLinkProvider);
- }
- }
-
- public static TaskListBackupManager getBackupManager() {
- return INSTANCE.taskListBackupManager;
- }
-
- public static TaskDataStorageManager getTaskDataStorageManager() {
- return INSTANCE.taskDataStorageManager;
- }
-
- public void addRepositoryConnectorUi(AbstractRepositoryConnectorUi repositoryConnectorUi) {
- if (!repositoryConnectorUiMap.values().contains(repositoryConnectorUi)) {
- repositoryConnectorUiMap.put(repositoryConnectorUi.getConnectorKind(), repositoryConnectorUi);
- }
- }
-
- /**
- * @since 3.0
- */
- public static AbstractRepositoryConnector getConnector(String kind) {
- return getRepositoryManager().getRepositoryConnector(kind);
- }
-
- public static AbstractRepositoryConnectorUi getConnectorUi(String kind) {
- return repositoryConnectorUiMap.get(kind);
- }
-
- public static TaskListSynchronizationScheduler getSynchronizationScheduler() {
- return synchronizationScheduler;
- }
-
- /**
- * @since 3.0
- */
- public static TaskDataManager getTaskDataManager() {
- return taskDataManager;
- }
-
- /**
- * @since 3.0
- */
- public static TaskJobFactory getTasksJobFactory() {
- return INSTANCE.tasksJobFactory;
- }
-
- public void addDuplicateDetector(AbstractDuplicateDetector duplicateDetector) {
- Assert.isNotNull(duplicateDetector);
- duplicateDetectors.add(duplicateDetector);
- }
-
- public Set<AbstractDuplicateDetector> getDuplicateSearchCollectorsList() {
- return duplicateDetectors;
- }
-
- public String getRepositoriesFilePath() {
- return getDataDirectory() + File.separator + TaskRepositoryManager.DEFAULT_REPOSITORIES_FILE;
- }
-
- public void addModelListener(IRepositoryModelListener listener) {
- listeners.add(listener);
- }
-
- public void removeModelListener(IRepositoryModelListener listener) {
- listeners.remove(listener);
- }
-
- public boolean canSetRepositoryForResource(IResource resource) {
- if (resource == null) {
- return false;
- }
-
- // find first provider that can link repository
- for (AbstractTaskRepositoryLinkProvider linkProvider : repositoryLinkProviders) {
- TaskRepository repository = linkProvider.getTaskRepository(resource, getRepositoryManager());
- if (repository != null) {
- return linkProvider.canSetTaskRepository(resource);
- }
- }
- // find first provider that can set new repository
- for (AbstractTaskRepositoryLinkProvider linkProvider : repositoryLinkProviders) {
- if (linkProvider.canSetTaskRepository(resource)) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Associate a Task Repository with a workbench project
- *
- * @param resource
- * project or resource belonging to a project
- * @param repository
- * task repository to associate with given project
- * @throws CoreException
- */
- public void setRepositoryForResource(IResource resource, TaskRepository repository) throws CoreException {
- if (resource == null || repository == null) {
- return;
- }
-
- for (AbstractTaskRepositoryLinkProvider linkProvider : repositoryLinkProviders) {
- TaskRepository r = linkProvider.getTaskRepository(resource, getRepositoryManager());
- boolean canSetRepository = linkProvider.canSetTaskRepository(resource);
- if (r != null && !canSetRepository) {
- return;
- }
- if (canSetRepository) {
- linkProvider.setTaskRepository(resource, repository);
- return;
- }
- }
- }
-
- /**
- * Retrieve the task repository that has been associated with the given project (or resource belonging to a project)
- *
- * NOTE: if call does not return in LINK_PROVIDER_TIMEOUT_SECONDS, the provide will be disabled until the next time
- * that the Workbench starts.
- */
- public TaskRepository getRepositoryForResource(final IResource resource) {
- Assert.isNotNull(resource);
- Set<AbstractTaskRepositoryLinkProvider> defectiveLinkProviders = new HashSet<AbstractTaskRepositoryLinkProvider>();
- for (final AbstractTaskRepositoryLinkProvider linkProvider : repositoryLinkProviders) {
- long startTime = System.nanoTime();
- final TaskRepository[] repository = new TaskRepository[1];
- SafeRunnable.run(new ISafeRunnable() {
- public void handleException(Throwable e) {
- StatusHandler.log(new Status(IStatus.ERROR, ID_PLUGIN, "Repository link provider failed: \""
- + linkProvider.getId() + "\"", e));
- }
-
- public void run() throws Exception {
- repository[0] = linkProvider.getTaskRepository(resource, getRepositoryManager());
- }
- });
- long elapsed = System.nanoTime() - startTime;
- if (elapsed > LINK_PROVIDER_TIMEOUT_SECONDS * 1000 * 1000 * 1000) {
- defectiveLinkProviders.add(linkProvider);
- }
- if (repository[0] != null) {
- return repository[0];
- }
- }
- if (!defectiveLinkProviders.isEmpty()) {
- repositoryLinkProviders.removeAll(defectiveLinkProviders);
- StatusHandler.log(new Status(IStatus.WARNING, ID_PLUGIN,
- "Repository link provider took over 5s to execute and was timed out: \"" + defectiveLinkProviders
- + "\""));
- }
- return null;
- }
-
- @Deprecated
- public TaskRepository getRepositoryForResource(final IResource resource, boolean silent) {
- TaskRepository repository = getRepositoryForResource(resource);
- if (repository == null && !silent) {
- MessageDialog.openInformation(null, "No Repository Found",
- "No repository was found. Associate a Task Repository with this project via the project's property page.");
- }
- return repository;
- }
-
- public String getNextNewRepositoryTaskId() {
- return getTaskDataStorageManager().getNewRepositoryTaskId();
- }
-
- public static ExternalizationManager getExternalizationManager() {
- return externalizationManager;
- }
-
- public static TaskActivityMonitor getTaskActivityMonitor() {
- return INSTANCE.taskActivityMonitor;
- }
-
- public static TaskList getTaskList() {
- return taskList;
- }
-
- public static TasksModel getRepositoryModel() {
- return tasksModel;
- }
-
- public void addSearchHandler(AbstractSearchHandler searchHandler) {
- searchHandlers.add(searchHandler);
- }
-
- public void removeSearchHandler(AbstractSearchHandler searchHandler) {
- searchHandlers.remove(searchHandler);
- }
-
- public AbstractSearchHandler getSearchHandler(String connectorKind) {
- Assert.isNotNull(connectorKind);
- for (AbstractSearchHandler searchHandler : searchHandlers) {
- if (searchHandler.getConnectorKind().equals(connectorKind)) {
- return searchHandler;
- }
- }
- return null;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AbstractChangeCompletionAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AbstractChangeCompletionAction.java
deleted file mode 100644
index 08714170f..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AbstractChangeCompletionAction.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import java.util.List;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-import org.eclipse.mylyn.tasks.core.ITask;
-
-/**
- * @author Mik Kersten
- */
-public class AbstractChangeCompletionAction extends Action {
-
- protected boolean shouldEnable(List<IRepositoryElement> selectedElements) {
- boolean allLocalTasks = true;
- for (IRepositoryElement abstractTaskContainer : selectedElements) {
- if (!(abstractTaskContainer instanceof ITask)) {
- allLocalTasks = false;
- break;
- } else if (!((AbstractTask) abstractTaskContainer).isLocal()) {
- allLocalTasks = false;
- break;
- }
- }
- return allLocalTasks;
- }
-
- protected String generateMessage(List<AbstractTask> toComplete, String status) {
- String message = "Mark selected local tasks " + status + "?\n\n";
- int i = 0;
- for (ITask task : toComplete) {
- i++;
- if (i < 20) {
- message += " ";
- if (task.getTaskKey() != null) {
- message += task.getTaskKey() + ": ";
- }
- message += task.getSummary() + "\n";
- } else {
- message += "...";
- break;
- }
- }
- return message;
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AbstractTaskAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AbstractTaskAction.java
deleted file mode 100644
index 5a7bc456b..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AbstractTaskAction.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import java.util.List;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITaskContainer;
-
-/**
- * @author Rob Elves
- */
-public abstract class AbstractTaskAction extends Action {
-
- protected List<IRepositoryElement> selectedElements;
-
- @Override
- public void run() {
- for (IRepositoryElement element : selectedElements) {
- if (element instanceof ITask) {
- AbstractTask repositoryTask = (AbstractTask) element;
- performActionOnTask(repositoryTask);
- } else if (element instanceof IRepositoryQuery) {
- RepositoryQuery repositoryQuery = (RepositoryQuery) element;
- for (ITask queryHit : repositoryQuery.getChildren()) {
- performActionOnTask(queryHit);
- }
- } else if (element instanceof ITaskContainer) {
- ITaskContainer container = (ITaskContainer) element;
- for (ITask task : container.getChildren()) {
- if (task != null) {
- ITask repositoryTask = task;
- performActionOnTask(repositoryTask);
- }
- }
- }
- }
- }
-
- protected abstract void performActionOnTask(ITask repositoryTask);
-
- protected boolean containsArchiveContainer(List<AbstractTaskContainer> selectedElements) {
- return false;//selectedElements.contains(TasksUiPlugin.getTaskList().getArchiveContainer());
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AbstractTaskEditorAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AbstractTaskEditorAction.java
deleted file mode 100644
index 3b5a57a88..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AbstractTaskEditorAction.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITask.SynchronizationState;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.actions.BaseSelectionListenerAction;
-
-/**
- * @author Rob Elves
- */
-public abstract class AbstractTaskEditorAction extends BaseSelectionListenerAction {
-
- protected TaskEditor editor;
-
- public AbstractTaskEditorAction(String text) {
- super(text);
- }
-
- public void setEditor(TaskEditor taskEditor) {
- this.editor = taskEditor;
- }
-
- protected boolean taskDirty(ITask task) {
- return (((editor != null && editor.isDirty())
- || task.getSynchronizationState().equals(SynchronizationState.OUTGOING) || task.getSynchronizationState()
- .equals(SynchronizationState.CONFLICT)));
-
- }
-
- protected void openInformationDialog(String label, String text) {
-
- Shell shell = null;
- if (editor != null) {
- shell = editor.getSite().getShell();
- }
- MessageDialog.openInformation(shell, label, text);
- if (editor != null) {
- editor.showBusy(false);
- }
- return;
- }
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AbstractTaskRepositoryAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AbstractTaskRepositoryAction.java
deleted file mode 100644
index fe61f0e0b..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AbstractTaskRepositoryAction.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.ui.actions.BaseSelectionListenerAction;
-
-/**
- * @author Shawn Minto
- * @author Steffen Pingel
- */
-public abstract class AbstractTaskRepositoryAction extends BaseSelectionListenerAction {
-
- public AbstractTaskRepositoryAction(String text) {
- super(text);
- }
-
- @Override
- protected boolean updateSelection(IStructuredSelection selection) {
- if (selection != null && !selection.isEmpty()) {
- return getTaskRepository(selection.getFirstElement()) != null;
- }
- return false;
- }
-
- protected TaskRepository getTaskRepository(IStructuredSelection selection) {
- if (selection != null && !selection.isEmpty()) {
- return getTaskRepository(selection.getFirstElement());
- }
- return null;
- }
-
- protected TaskRepository getTaskRepository(Object selectedObject) {
- TaskRepository taskRepository = null;
- if (selectedObject instanceof TaskRepository) {
- taskRepository = (TaskRepository) selectedObject;
- } else if (selectedObject instanceof IRepositoryQuery) {
- IRepositoryQuery query = (IRepositoryQuery) selectedObject;
- taskRepository = TasksUi.getRepositoryManager().getRepository(query.getConnectorKind(),
- query.getRepositoryUrl());
- }
-
- if (taskRepository != null && isUserManaged(taskRepository)) {
- return taskRepository;
- }
- return null;
- }
-
- protected boolean isUserManaged(TaskRepository taskRepository) {
- AbstractRepositoryConnector connector = TasksUi.getRepositoryManager().getRepositoryConnector(
- taskRepository.getConnectorKind());
- return connector != null && connector.isUserManaged();
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ActivateTaskDialogAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ActivateTaskDialogAction.java
deleted file mode 100644
index 6a21acc87..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ActivateTaskDialogAction.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.window.Window;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-import org.eclipse.ui.actions.ActionDelegate;
-
-/**
- * @author Willian Mitsuda
- * @author Mik Kersten
- */
-public class ActivateTaskDialogAction extends ActionDelegate implements IWorkbenchWindowActionDelegate {
-
- private IWorkbenchWindow window;
-
- public void init(IWorkbenchWindow window) {
- this.window = window;
- }
-
- @Override
- public void run(IAction action) {
- TaskSelectionDialog dlg = new TaskSelectionDialog(window.getShell());
- dlg.setTitle("Activate Task");
- dlg.setMessage("&Select a task to activate (? = any character, * = any String):");
-
- if (dlg.open() != Window.OK) {
- return;
- }
-
- Object result = dlg.getFirstResult();
- if (result instanceof ITask) {
- AbstractTask task = (AbstractTask) result;
- TasksUi.getTaskActivityManager().activateTask(task);
-// manager.getTaskActivationHistory().addTask(task);
- }
- if (TaskListView.getFromActivePerspective() != null) {
- TaskListView.getFromActivePerspective().refresh();
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ActivateTaskHistoryDropDownAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ActivateTaskHistoryDropDownAction.java
deleted file mode 100644
index ea00fee48..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ActivateTaskHistoryDropDownAction.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IMenuCreator;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.TaskActivationHistory;
-import org.eclipse.mylyn.internal.tasks.ui.TaskHistoryDropDown;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowPulldownDelegate;
-
-/**
- * @author Wesley Coelho
- * @author Mik Kersten
- * @author Leo Dos Santos
- * @author Steffen Pingel
- */
-public class ActivateTaskHistoryDropDownAction extends Action implements IWorkbenchWindowPulldownDelegate, IMenuCreator {
-
- public static final String ID = "org.eclipse.mylyn.tasklist.actions.navigate.previous";
-
- private static final String LABEL = "Activate Previous Task";
-
- private Menu dropDownMenu;
-
- private final TaskActivationHistory taskHistory;
-
- private final TaskHistoryDropDown taskHistoryDropDown;
-
- public ActivateTaskHistoryDropDownAction() {
- this.taskHistory = TasksUiPlugin.getTaskActivityManager().getTaskActivationHistory();
- this.taskHistoryDropDown = new TaskHistoryDropDown(null, taskHistory);
- setText(LABEL);
- setToolTipText(LABEL);
- setId(ID);
- setEnabled(true);
- setImageDescriptor(TasksUiImages.CONTEXT_HISTORY_PREVIOUS);
- }
-
- public void dispose() {
- // ignore
- }
-
- public Menu getMenu(Control parent) {
- if (dropDownMenu != null) {
- dropDownMenu.dispose();
- }
- dropDownMenu = new Menu(parent);
- taskHistoryDropDown.fill(dropDownMenu, -1);
- return dropDownMenu;
- }
-
- public Menu getMenu(Menu parent) {
- if (dropDownMenu != null) {
- dropDownMenu.dispose();
- }
- dropDownMenu = new Menu(parent);
- taskHistoryDropDown.fill(dropDownMenu, -1);
- return dropDownMenu;
- }
-
- public void init(IWorkbenchWindow window) {
- // ignore
- }
-
- @Override
- public void run() {
- if (taskHistory.hasPrevious()) {
- AbstractTask previousTask = taskHistory.getPreviousTask();
- if (previousTask != null && !previousTask.isActive()) {
- TasksUiPlugin.getTaskListManager().activateTask(previousTask, false);
- if (TaskListView.getFromActivePerspective() != null) {
- TaskListView.getFromActivePerspective().refresh();
- }
- }
- setEnabled(taskHistory.getPreviousTasks() != null && taskHistory.getPreviousTasks().size() > 0);
- }
- }
-
- public void run(IAction action) {
- run();
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- // ignore
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AddRepositoryAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AddRepositoryAction.java
deleted file mode 100644
index 6b6f15850..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AddRepositoryAction.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.tasks.ui.ITaskCommandIds;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.handlers.IHandlerService;
-
-/**
- * @author Mik Kersten
- * @author Balazs Brinkus (bug 174473)
- * @author Steffen Pingel
- */
-// API 3.0 rename to AddTaskRepositoryAction
-public class AddRepositoryAction extends Action {
-
- private static final String PREF_ADD_QUERY = "org.eclipse.mylyn.internal.tasks.add.query";
-
- // TODO externalize and move to messages class
- public static final String TITLE = "Add Task Repository";
-
- private static final String ID = "org.eclipse.mylyn.tasklist.repositories.add";
-
- private boolean promptToAddQuery = true;
-
- public AddRepositoryAction() {
- setImageDescriptor(TasksUiImages.REPOSITORY_NEW);
- setText(TITLE);
- setId(ID);
- setEnabled(TasksUiPlugin.getRepositoryManager().hasUserManagedRepositoryConnectors());
- }
-
- public boolean getPromptToAddQuery() {
- return promptToAddQuery;
- }
-
- public void setPromptToAddQuery(boolean promptToAddQuery) {
- this.promptToAddQuery = promptToAddQuery;
- }
-
- @Override
- public void run() {
- showWizard();
- }
-
- public TaskRepository showWizard() {
- IHandlerService handlerSvc = (IHandlerService) PlatformUI.getWorkbench().getService(IHandlerService.class);
- try {
- Object result = handlerSvc.executeCommand(ITaskCommandIds.ADD_TASK_REPOSITORY, null);
- if (result instanceof TaskRepository) {
- if (getPromptToAddQuery()) {
- TaskRepository repository = (TaskRepository) result;
- AbstractRepositoryConnector connector = TasksUiPlugin.getConnector(repository.getConnectorKind());
- if (connector != null && connector.canQuery(repository)) {
- promptToAddQuery(repository);
- }
- }
- return (TaskRepository) result;
- }
- } catch (Exception e) {
- StatusHandler.fail(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, e.getMessage(), e));
- }
- return null;
- }
-
- public void promptToAddQuery(TaskRepository taskRepository) {
- IPreferenceStore preferenceStore = TasksUiPlugin.getDefault().getPreferenceStore();
- if (!preferenceStore.getBoolean(PREF_ADD_QUERY)) {
- Shell shell = PlatformUI.getWorkbench().getDisplay().getActiveShell();
- MessageDialogWithToggle messageDialog = MessageDialogWithToggle.openYesNoQuestion(shell, "Add new query",
- "Would you like to add a query to the Task List for this repository?", "Do not show again", false,
- preferenceStore, PREF_ADD_QUERY);
- preferenceStore.setValue(PREF_ADD_QUERY, messageDialog.getToggleState());
- if (messageDialog.getReturnCode() == IDialogConstants.YES_ID) {
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(taskRepository.getConnectorKind());
- IWizard queryWizard = connectorUi.getQueryWizard(taskRepository, null);
- ((Wizard) queryWizard).setForcePreviousAndNextButtons(true);
-
- WizardDialog queryDialog = new WizardDialog(shell, queryWizard);
- queryDialog.create();
- queryDialog.setTitle("Add Repository Query");
- queryDialog.setBlockOnOpen(true);
- queryDialog.open();
- }
- }
-
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AddRepositoryTaskAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AddRepositoryTaskAction.java
deleted file mode 100644
index 163a1060e..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AddRepositoryTaskAction.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.window.Window;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.AddExistingTaskWizard;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Mik Kersten
- * @author Eugene Kuleshov
- */
-public class AddRepositoryTaskAction extends Action implements IViewActionDelegate {
-
- private static final String WIZARD_LABEL = "Add an existing repository task/issue";
-
- public void run(IAction action) {
- try {
- AddExistingTaskWizard wizard = new AddExistingTaskWizard();
- Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- if (shell != null && !shell.isDisposed()) {
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.create();
- dialog.setTitle(WIZARD_LABEL);
- dialog.setBlockOnOpen(true);
- if (dialog.open() == Window.CANCEL) {
- dialog.close();
- return;
- }
- }
- } catch (Exception e) {
- StatusHandler.fail(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, e.getMessage(), e));
- }
- }
-
- public void init(IViewPart view) {
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AttachAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AttachAction.java
deleted file mode 100644
index 14d4bb33e..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AttachAction.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractAttachmentHandler;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractLegacyRepositoryConnector;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.NewAttachmentWizard;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.NewAttachmentWizardDialog;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.internal.WorkbenchImages;
-
-/**
- * @author Mik Kersten
- */
-public class AttachAction extends AbstractTaskEditorAction {
-
- public static final String LABEL = "Attach...";
-
- public AttachAction(String label) {
- super(label);
- }
-
- public AttachAction() {
- super(LABEL);
- setId("org.eclipse.mylyn.tasks.ui.actions.add.attachment");
- setImageDescriptor(WorkbenchImages.getImageDescriptor(ISharedImages.IMG_OBJ_FILE));
- }
-
- @Override
- public void run() {
- if (editor != null) {
- editor.showBusy(true);
- }
- Object selection = this.getStructuredSelection().getFirstElement();
- if (selection instanceof ITask) {
- if (taskDirty((ITask) selection)) {
- openInformationDialog(LABEL, "Submit changes or synchronize task before adding attachments.");
- return;
- }
-
- AbstractTask repositoryTask = (AbstractTask) selection;
- TaskRepository repository = TasksUi.getRepositoryManager().getRepository(repositoryTask.getConnectorKind(),
- repositoryTask.getRepositoryUrl());
-
- NewAttachmentWizard attachmentWizard = new NewAttachmentWizard(repository, repositoryTask);
- NewAttachmentWizardDialog dialog = new NewAttachmentWizardDialog(PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow()
- .getShell(), attachmentWizard, false) {
- @Override
- public boolean close() {
- boolean closed = super.close();
- if (closed && editor != null) {
- editor.showBusy(false);
- }
- return closed;
- }
- };
- attachmentWizard.setDialog(dialog);
- dialog.create();
- dialog.open();
- }
- }
-
- @Override
- protected boolean updateSelection(IStructuredSelection selection) {
- if (selection.getFirstElement() instanceof ITask) {
- ITask task = (ITask) selection.getFirstElement();
- TaskRepository repository = TasksUi.getRepositoryManager().getRepository(task.getConnectorKind(),
- task.getRepositoryUrl());
- if (repository != null) {
- AbstractLegacyRepositoryConnector connector = (AbstractLegacyRepositoryConnector) TasksUi.getRepositoryManager()
- .getRepositoryConnector(task.getConnectorKind());
- if (connector != null) {
- AbstractAttachmentHandler handler = connector.getAttachmentHandler();
- return handler != null && handler.canUploadAttachment(repository, task);
- }
- }
- return false;
- }
- return super.updateSelection(selection);
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AttachScreenshotAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AttachScreenshotAction.java
deleted file mode 100644
index 185be8e71..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AttachScreenshotAction.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.NewAttachmentWizard;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.NewAttachmentWizardDialog;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Mik Kersten
- */
-public class AttachScreenshotAction extends AttachAction {
-
- public static final String LABEL = "Attach Screenshot...";
-
- public AttachScreenshotAction() {
- super(LABEL);
- setId("org.eclipse.mylyn.tasks.ui.actions.add.screenshot");
- setImageDescriptor(CommonImages.IMAGE_CAPTURE);
- }
-
- @Override
- public void run() {
- if (editor != null) {
- editor.showBusy(true);
- }
- Object selection = super.getStructuredSelection().getFirstElement();
- if (selection instanceof ITask) {
- if (taskDirty((ITask) selection)) {
- openInformationDialog(LABEL, "Submit changes or synchronize task before adding attachments.");
- return;
- }
- AbstractTask repositoryTask = (AbstractTask) selection;
- TaskRepository repository = TasksUi.getRepositoryManager().getRepository(
- repositoryTask.getConnectorKind(), repositoryTask.getRepositoryUrl());
-
- NewAttachmentWizard attachmentWizard = new NewAttachmentWizard(repository, repositoryTask, true);
- NewAttachmentWizardDialog dialog = new NewAttachmentWizardDialog(PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow()
- .getShell(), attachmentWizard, false) {
- @Override
- public boolean close() {
- boolean closed = super.close();
- if (closed && editor != null) {
- editor.showBusy(false);
- }
- return closed;
- }
- };
- attachmentWizard.setDialog(dialog);
- dialog.create();
- dialog.open();
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ClearOutgoingAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ClearOutgoingAction.java
deleted file mode 100644
index f4e08f71c..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ClearOutgoingAction.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-import org.eclipse.mylyn.tasks.core.ITask.SynchronizationState;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-
-/**
- * Discard outgoing changes on selected task TODO: Enable multi task discard?
- *
- * @author Rob Elves
- */
-public class ClearOutgoingAction extends Action {
-
- private static final String ACTION_NAME = "Clear outgoing";
-
- public static final String ID = "org.eclipse.mylyn.tasklist.actions.mark.discard";
-
- private final List<IRepositoryElement> selectedElements;
-
- public ClearOutgoingAction(List<IRepositoryElement> selectedElements) {
- this.selectedElements = selectedElements;
- setText(ACTION_NAME);
- setToolTipText(ACTION_NAME);
- setImageDescriptor(CommonImages.CLEAR);
- setId(ID);
- if (selectedElements.size() == 1 && (selectedElements.get(0) instanceof ITask)) {
- ITask task = (ITask) selectedElements.get(0);
- setEnabled(hasOutgoingChanges(task));
- } else {
- setEnabled(false);
- }
- }
-
- private boolean hasOutgoingChanges(ITask task) {
- return task.getSynchronizationState().equals(SynchronizationState.OUTGOING)
- || task.getSynchronizationState().equals(SynchronizationState.CONFLICT);
- }
-
- @Override
- public void run() {
- ArrayList<AbstractTask> toClear = new ArrayList<AbstractTask>();
- for (Object selectedObject : selectedElements) {
- if (selectedObject instanceof ITask && hasOutgoingChanges((ITask) selectedObject)) {
- toClear.add(((AbstractTask) selectedObject));
- }
- }
- if (toClear.size() > 0) {
- AbstractTask task = toClear.get(0);
- boolean confirm = MessageDialog.openConfirm(null, "Confirm discard", "Discard all outgoing changes?\n\n"
- + task.getSummary());
- if (confirm) {
- TasksUiPlugin.getTaskDataManager().discardOutgoing(task);
- try {
- TasksUi.getTaskDataManager().discardEdits(task);
- } catch (CoreException e) {
- TasksUiInternal.displayStatus("Clear outgoing failed", e.getStatus());
- }
- }
- }
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CloneTaskAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CloneTaskAction.java
deleted file mode 100644
index b50f9a816..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CloneTaskAction.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.LocalTask;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.TaskSelection;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.BaseSelectionListenerAction;
-
-/**
- * @author Maarten Meijer
- * @author Mik Kersten
- * @author Steffen Pingel
- */
-public class CloneTaskAction extends BaseSelectionListenerAction implements IViewActionDelegate {
-
- private static final String LABEL = "Clone This Task";
-
- private static final String ID = "org.eclipse.mylyn.tasklist.actions.clone";
-
- protected ISelection selection;
-
- public CloneTaskAction() {
- super(LABEL);
- setId(ID);
- setImageDescriptor(TasksUiImages.TASK_NEW);
- setAccelerator(SWT.MOD1 + 'd');
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- if (selection instanceof IStructuredSelection) {
- super.selectionChanged((IStructuredSelection) selection);
- }
- }
-
- public void run(IAction action) {
- run();
- }
-
- @SuppressWarnings( { "deprecation", "restriction" })
- @Override
- public void run() {
- try {
- for (Object selectedObject : getStructuredSelection().toList()) {
- if (selectedObject instanceof AbstractTask) {
- AbstractTask task = (AbstractTask) selectedObject;
-
- String description = "Cloned from: " + CopyTaskDetailsAction.getTextForTask(task);
-
- final TaskSelection taskSelection;
- RepositoryTaskData taskData = TasksUiPlugin.getTaskDataStorageManager().getNewTaskData(
- task.getRepositoryUrl(), task.getTaskId());
- if (taskData != null) {
- taskSelection = new TaskSelection(taskData);
- taskSelection.getLegacyTaskData().setDescription(
- description + "\n\n> " + taskData.getDescription());
- } else {
- taskSelection = new TaskSelection(task);
- if (task instanceof LocalTask) {
- String notes = task.getNotes();
- if (!"".equals(notes)) {
- taskSelection.getLegacyTaskData().setDescription(description + "\n\n" + notes);
- } else {
- taskSelection.getLegacyTaskData().setDescription(description);
- }
- } else {
- taskSelection.getLegacyTaskData().setDescription(description);
- }
- }
-
- Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- if (!TasksUiUtil.openNewTaskEditor(shell, taskSelection, null)) {
- // do not process other tasks if canceled
- return;
- }
- }
- }
- } catch (NullPointerException e) {
- // FIXME check for null instead?
- StatusHandler.fail(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Could not remove task from category, it may still be refreshing.", e));
- }
- }
-
- public void init(IViewPart view) {
- // ignore
- }
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CollapseAllAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CollapseAllAction.java
deleted file mode 100644
index d1bcd324c..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CollapseAllAction.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-
-/**
- * @author Mik Kersten
- */
-public class CollapseAllAction extends Action {
-
- private static final String LABEL = "Collapse All";
-
- public static final String ID = "org.eclipse.mylyn.tasklist.actions.collapse.all";
-
- private final TaskListView taskListView;
-
- public CollapseAllAction(TaskListView taskListView) {
- super(LABEL);
- this.taskListView = taskListView;
- setId(ID);
- setText(LABEL);
- setToolTipText(LABEL);
- setImageDescriptor(CommonImages.COLLAPSE_ALL);
- }
-
- @Override
- public void run() {
- if (taskListView.getViewer() != null) {
- taskListView.getViewer().collapseAll();
- }
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CompareAttachmentsAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CompareAttachmentsAction.java
deleted file mode 100644
index 078bb519b..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CompareAttachmentsAction.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.InputStream;
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.compare.CompareEditorInput;
-import org.eclipse.compare.CompareUI;
-import org.eclipse.compare.IStreamContentAccessor;
-import org.eclipse.compare.ITypedElement;
-import org.eclipse.compare.structuremergeviewer.DiffNode;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractAttachmentHandler;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractLegacyRepositoryConnector;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryAttachment;
-import org.eclipse.mylyn.internal.tasks.ui.AttachmentUtil;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.actions.BaseSelectionListenerAction;
-import org.eclipse.ui.internal.WorkbenchImages;
-
-/**
- * @author Eugene Kuleshov
- */
-public class CompareAttachmentsAction extends BaseSelectionListenerAction implements IViewActionDelegate {
-
- private ISelection currentSelection;
-
- public CompareAttachmentsAction() {
- super("Compare Attachments");
- }
-
- protected CompareAttachmentsAction(String text) {
- super(text);
- }
-
- public void init(IViewPart view) {
- // ignore
- }
-
- public void run(IAction action) {
- if (currentSelection instanceof IStructuredSelection) {
- IStructuredSelection selection = (IStructuredSelection) currentSelection;
- Object[] elements = selection.toArray();
-
- final RepositoryAttachment attachment1 = (RepositoryAttachment) elements[0];
- final RepositoryAttachment attachment2 = (RepositoryAttachment) elements[1];
-
- CompareConfiguration cc = new CompareConfiguration();
-
- cc.setLeftEditable(false);
- cc.setLeftLabel(attachment1.getFilename());
- cc.setLeftImage(getImage(attachment1));
-
- cc.setRightEditable(false);
- cc.setRightLabel(attachment2.getFilename());
- cc.setRightImage(getImage(attachment2));
-
- CompareEditorInput editorInput = new CompareEditorInput(cc) {
-
- @Override
- public String getTitle() {
- return "Compare (" + attachment1.getFilename() + " - " + attachment2.getFilename() + ")";
- }
-
- @Override
- protected Object prepareInput(IProgressMonitor pm) throws InvocationTargetException {
- byte[] data1 = downloadAttachment(attachment1, pm);
- byte[] data2 = downloadAttachment(attachment2, pm);
- CompareItem left = new CompareItem(attachment1.getFilename(), data1);
- CompareItem right = new CompareItem(attachment2.getFilename(), data2);
- return new DiffNode(left, right);
- }
-
- private byte[] downloadAttachment(RepositoryAttachment attachment, IProgressMonitor pm)
- throws InvocationTargetException {
- try {
- TaskRepository repository = TasksUi.getRepositoryManager().getRepository(
- attachment.getRepositoryKind(), attachment.getRepositoryUrl());
- AbstractLegacyRepositoryConnector connector = (AbstractLegacyRepositoryConnector) TasksUi.getRepositoryManager()
- .getRepositoryConnector(attachment.getRepositoryKind());
- AbstractAttachmentHandler handler = connector.getAttachmentHandler();
-
- ByteArrayOutputStream os = new ByteArrayOutputStream();
- handler.downloadAttachment(repository, attachment, os, pm);
- return os.toByteArray();
- } catch (CoreException ex) {
- throw new InvocationTargetException(ex);
- }
- }
- };
-
- CompareUI.openCompareEditor(editorInput);
- }
- }
-
- private static final String[] IMAGE_EXTENSIONS = { ".jpg", ".gif", ".png", ".tiff", ".tif", ".bmp" };
-
- private Image getImage(RepositoryAttachment attachment) {
- if (AttachmentUtil.isContext(attachment)) {
- return CommonImages.getImage(TasksUiImages.CONTEXT_TRANSFER);
- } else if (attachment.isPatch()) {
- return CommonImages.getImage(TasksUiImages.TASK_ATTACHMENT_PATCH);
- } else {
- String filename = attachment.getFilename();
- if (filename != null) {
- filename = filename.toLowerCase();
- for (String extension : IMAGE_EXTENSIONS) {
- if (filename.endsWith(extension)) {
- return CommonImages.getImage(CommonImages.IMAGE_FILE);
- }
- }
- }
- return WorkbenchImages.getImage(ISharedImages.IMG_OBJ_FILE);
- }
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- this.currentSelection = selection;
- }
-
- class CompareItem implements IStreamContentAccessor, ITypedElement {
-
- private final String filename;
-
- private final byte[] data;
-
- public CompareItem(String filename, byte[] data) {
- this.filename = filename;
- this.data = data;
- }
-
- public InputStream getContents() throws CoreException {
- return new ByteArrayInputStream(data);
- }
-
- public Image getImage() {
- return null;
- }
-
- public String getName() {
- return filename;
- }
-
- public String getType() {
- // ImageMergeViewerCreator - gif,jpg,jpeg,png,bmp,ico,tif,tiff
- // BinaryCompareViewerCreator - class,exe,dll,binary,zip,jar
- // TextMergeViewerCreator - txt
- // PropertiesFileMergeViewerCreator - properties,properties2
- // JavaContentViewerCreator - java,java2"
- // RefactoringDescriptorCompareViewerCreator - refactoring_descriptor
- //
- int n = filename.lastIndexOf('.');
- if (n > -1) {
- return filename.substring(n + 1);
- }
-
- return ITypedElement.TEXT_TYPE;
- }
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CopyAttachmentToClipboardJob.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CopyAttachmentToClipboardJob.java
deleted file mode 100644
index 0ba06ec78..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CopyAttachmentToClipboardJob.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import java.io.ByteArrayOutputStream;
-
-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.jobs.Job;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractAttachmentHandler;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractLegacyRepositoryConnector;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryAttachment;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.core.RepositoryStatus;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Steffen Pingel
- */
-public class CopyAttachmentToClipboardJob extends Job {
-
- private final RepositoryAttachment attachment;
-
- public CopyAttachmentToClipboardJob(RepositoryAttachment attachment) {
- super("Copying Attachment to Clipboard");
-
- if (attachment == null) {
- throw new IllegalArgumentException("attachment may not be null");
- }
-
- this.attachment = attachment;
- }
-
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- TaskRepository repository = TasksUi.getRepositoryManager().getRepository(attachment.getRepositoryKind(),
- attachment.getRepositoryUrl());
- AbstractLegacyRepositoryConnector connector = (AbstractLegacyRepositoryConnector) TasksUi.getRepositoryManager()
- .getRepositoryConnector(attachment.getRepositoryKind());
- AbstractAttachmentHandler handler = connector.getAttachmentHandler();
- if (handler == null) {
- return new RepositoryStatus(IStatus.INFO, TasksUiPlugin.ID_PLUGIN, RepositoryStatus.ERROR_INTERNAL,
- "The repository does not support attachments.");
- }
-
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- try {
- handler.downloadAttachment(repository, attachment, out, monitor);
- } catch (final CoreException e) {
- TasksUiInternal.displayStatus("Copy Attachment to Clipboard", e.getStatus());
- return Status.OK_STATUS;
- }
-
- String contents = new String(out.toByteArray());
- contents = contents.replaceAll("\r\n|\n", System.getProperty("line.separator"));
- copyToClipboard(contents);
-
- return Status.OK_STATUS;
- }
-
- private void copyToClipboard(final String contents) {
- PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
- public void run() {
- Clipboard clipboard = new Clipboard(PlatformUI.getWorkbench().getDisplay());
- clipboard.setContents(new Object[] { contents }, new Transfer[] { TextTransfer.getInstance() });
- clipboard.dispose();
- }
- });
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CopyTaskDetailsAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CopyTaskDetailsAction.java
deleted file mode 100644
index 02eaba55b..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CopyTaskDetailsAction.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-import org.eclipse.mylyn.internal.tasks.ui.editors.RepositoryTaskSelection;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.BaseSelectionListenerAction;
-
-/**
- * @author Mik Kersten
- */
-public class CopyTaskDetailsAction extends BaseSelectionListenerAction {
-
- private static final String LABEL = "Copy Details";
-
- public static final String ID = "org.eclipse.mylyn.tasklist.actions.copy";
-
- private final Clipboard clipboard;
-
- public CopyTaskDetailsAction() {
- super(LABEL);
- setToolTipText(LABEL);
- setId(ID);
- setImageDescriptor(CommonImages.COPY);
- // FIXME the clipboard is not disposed
- Display display = PlatformUI.getWorkbench().getDisplay();
- clipboard = new Clipboard(display);
- }
-
- @Override
- public void run() {
- ISelection selection = getStructuredSelection();
- StringBuilder sb = new StringBuilder();
- Object[] seletedElements = ((IStructuredSelection) selection).toArray();
- for (int i = 0; i < seletedElements.length; i++) {
- if (i > 0) {
- sb.append("\n\n");
- }
- sb.append(getTextForTask(seletedElements[i]));
- }
- if (sb.length() > 0) {
- TextTransfer textTransfer = TextTransfer.getInstance();
- clipboard.setContents(new Object[] { sb.toString() }, new Transfer[] { textTransfer });
- }
- }
-
- // API 3.0: move to TasksUiUtil / into core
- public static String getTextForTask(Object object) {
- String text = "";
- if (object instanceof ITask) {
- AbstractTask task = (AbstractTask) object;
- if (task.getTaskKey() != null) {
- text += task.getTaskKey() + ": ";
- }
-
- text += task.getSummary();
- if (TasksUiInternal.isValidUrl(task.getUrl())) {
- text += "\n" + task.getUrl();
- }
- } else if (object instanceof RepositoryTaskData) {
- RepositoryTaskData taskData = (RepositoryTaskData) object;
- if (taskData.getTaskKey() != null) {
- text += taskData.getTaskKey() + ": ";
- }
-
- text += taskData.getSummary();
- AbstractRepositoryConnector connector = TasksUi.getRepositoryManager().getRepositoryConnector(
- taskData.getConnectorKind());
- if (connector != null) {
- text += "\n" + connector.getTaskUrl(taskData.getRepositoryUrl(), taskData.getTaskId());
- }
- } else if (object instanceof IRepositoryQuery) {
- RepositoryQuery query = (RepositoryQuery) object;
- text += query.getSummary();
- text += "\n" + query.getUrl();
- } else if (object instanceof IRepositoryElement) {
- IRepositoryElement element = (IRepositoryElement) object;
- text = element.getSummary();
- } else if (object instanceof RepositoryTaskSelection) {
- RepositoryTaskSelection selection = (RepositoryTaskSelection) object;
- text += selection.getId() + ": " + selection.getBugSummary();
- AbstractRepositoryConnector connector = TasksUi.getRepositoryManager().getRepositoryConnector(
- selection.getRepositoryKind());
- if (connector != null) {
- text += "\n" + connector.getTaskUrl(selection.getRepositoryUrl(), selection.getId());
- } else {
- text += "\n" + selection.getRepositoryUrl();
- }
- }
- return text;
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DeactivateAllTasksAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DeactivateAllTasksAction.java
deleted file mode 100644
index a73eb32bb..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DeactivateAllTasksAction.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-import org.eclipse.ui.actions.ActionDelegate;
-
-/**
- * @author Willian Mitsuda
- */
-public class DeactivateAllTasksAction extends ActionDelegate implements IWorkbenchWindowActionDelegate {
-
- public void init(IWorkbenchWindow window) {
- // ignore
- }
-
- @Override
- public void run(IAction action) {
- TasksUi.getTaskActivityManager().deactivateActiveTask();
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DeleteAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DeleteAction.java
deleted file mode 100644
index bc9a90e61..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DeleteAction.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import java.util.List;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.mylyn.context.core.ContextCore;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
-import org.eclipse.mylyn.internal.tasks.core.TaskCategory;
-import org.eclipse.mylyn.internal.tasks.core.UnmatchedTaskContainer;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.internal.WorkbenchImages;
-import org.eclipse.ui.texteditor.IWorkbenchActionDefinitionIds;
-
-/**
- * @author Mik Kersten
- */
-public class DeleteAction extends Action {
-
- public static final String ID = "org.eclipse.mylyn.tasklist.actions.delete";
-
- public DeleteAction() {
- setText("Delete");
- setId(ID);
- setImageDescriptor(WorkbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_DELETE));
- setActionDefinitionId(IWorkbenchActionDefinitionIds.DELETE);
- }
-
- @Override
- public void run() {
- ISelection selection = TaskListView.getFromActivePerspective().getViewer().getSelection();
-
- List<?> toDelete = ((IStructuredSelection) selection).toList();
-
- String elements = "";
- int i = 0;
- for (Object object : toDelete) {
- if (object instanceof UnmatchedTaskContainer) {
- continue;
- }
-
- i++;
- if (i < 20) {
- // TODO this action should be based on the action enablement and check if the container is user managed or not
- if (object instanceof IRepositoryElement) {
- elements += " " + ((IRepositoryElement) object).getSummary() + "\n";
- }
- } else {
- elements += "...";
- break;
- }
- }
-
- String message;
-
- if (toDelete.size() == 1) {
- Object object = toDelete.get(0);
- if (object instanceof ITask) {
- if (((AbstractTask) object).isLocal()) {
- message = "Permanently delete the task listed below?";
- } else {
- message = "Delete the planning information and context for the repository task? The server"
- + " copy will not be deleted and the task will remain in queries that match it.";
- }
- } else if (object instanceof TaskCategory) {
- message = "Permanently delete the category? Local tasks will be moved to the Uncategorized folder. Repository tasks will be moved to the Unmatched folder.";
- } else if (object instanceof IRepositoryQuery) {
- message = "Permanently delete the query? Contained tasks will be moved to the Unmatched folder.";
- } else {
- message = "Permanently delete the element listed below?";
- }
- } else {
- message = "Delete the elements listed below? If categories or queries are selected contained tasks"
- + " will not be deleted. Contexts will be deleted for selected tasks.";
- }
-
- message += "\n\n" + elements;
-
- boolean deleteConfirmed = MessageDialog.openQuestion(PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow()
- .getShell(), "Confirm Delete", message);
- if (!deleteConfirmed) {
- return;
- }
-
- for (Object selectedObject : toDelete) {
- if (selectedObject instanceof ITask) {
- AbstractTask task = null;
- task = (AbstractTask) selectedObject;
- TasksUi.getTaskActivityManager().deactivateTask(task);
- TasksUiInternal.getTaskList().deleteTask(task);
- ContextCore.getContextManager().deleteContext(task.getHandleIdentifier());
- TasksUiInternal.closeEditorInActivePage(task, false);
- } else if (selectedObject instanceof IRepositoryQuery) {
- // boolean deleteConfirmed =
- // MessageDialog.openQuestion(PlatformUI.getWorkbench()
- // .getActiveWorkbenchWindow().getShell(), "Confirm delete",
- // "Delete the selected query? Task data will not be deleted.");
- // if (deleteConfirmed) {
- TasksUiInternal.getTaskList().deleteQuery((RepositoryQuery) selectedObject);
- // }
- } else if (selectedObject instanceof TaskCategory) {
- // boolean deleteConfirmed =
- // MessageDialog.openQuestion(PlatformUI.getWorkbench()
- // .getActiveWorkbenchWindow().getShell(), "Confirm Delete",
- // "Delete the selected category? Contained tasks will be moved
- // to the root.");
- // if (!deleteConfirmed)
- // return;
- TaskCategory cat = (TaskCategory) selectedObject;
- for (ITask task : cat.getChildren()) {
- ContextCore.getContextManager().deleteContext(task.getHandleIdentifier());
- TasksUiInternal.closeEditorInActivePage(task, false);
- }
- TasksUiInternal.getTaskList().deleteCategory(cat);
- } else if (selectedObject instanceof UnmatchedTaskContainer) {
- // ignore
- } else {
- MessageDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
- "Delete failed", "Nothing selected.");
- return;
- }
- }
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DeleteTaskRepositoryAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DeleteTaskRepositoryAction.java
deleted file mode 100644
index 469663dd1..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DeleteTaskRepositoryAction.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
-import org.eclipse.mylyn.internal.tasks.ui.TaskRepositoryUtil;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.internal.WorkbenchImages;
-import org.eclipse.ui.texteditor.IWorkbenchActionDefinitionIds;
-
-/**
- * @author Mik Kersten
- */
-public class DeleteTaskRepositoryAction extends AbstractTaskRepositoryAction {
-
- private static final String ID = "org.eclipse.mylyn.tasklist.repositories.delete";
-
- public DeleteTaskRepositoryAction() {
- super("Delete Repository");
- setImageDescriptor(WorkbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_DELETE));
- setId(ID);
- setEnabled(false);
- setActionDefinitionId(IWorkbenchActionDefinitionIds.DELETE);
- }
-
- public void init(IViewPart view) {
- // ignore
- }
-
- @Override
- public void run() {
- try {
-
- boolean deleteConfirmed = MessageDialog.openQuestion(PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow()
- .getShell(), "Confirm Delete", "Delete the selected task repositories?");
- if (deleteConfirmed) {
- IStructuredSelection selection = getStructuredSelection();
- Set<RepositoryQuery> queries = TasksUiInternal.getTaskList().getQueries();
- List<TaskRepository> repositoriesInUse = new ArrayList<TaskRepository>();
- List<TaskRepository> repositoriesToDelete = new ArrayList<TaskRepository>();
- for (Object selectedObject : selection.toList()) {
- if (selectedObject instanceof TaskRepository) {
- TaskRepository taskRepository = (TaskRepository) selectedObject;
- if (queries != null && queries.size() > 0) {
- for (IRepositoryQuery query : queries) {
- if (query.getRepositoryUrl().equals(taskRepository.getRepositoryUrl())) {
- repositoriesInUse.add(taskRepository);
- break;
- }
- }
- }
- if (!repositoriesInUse.contains(taskRepository)) {
- repositoriesToDelete.add(taskRepository);
- }
- }
- }
-
- for (TaskRepository taskRepository : repositoriesToDelete) {
- TasksUiPlugin.getRepositoryManager().removeRepository(taskRepository,
- TasksUiPlugin.getDefault().getRepositoriesFilePath());
- // if repository is contributed via template, ensure it isn't added again
- TaskRepositoryUtil.disableAddAutomatically(taskRepository.getRepositoryUrl());
- }
-
- if (repositoriesInUse.size() > 0) {
- MessageDialog.openInformation(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
- "Repository In Use",
- "One or more of the selected repositories is being used by a query and can not be deleted.");
- }
- }
- } catch (Exception e) {
- StatusHandler.fail(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, e.getMessage(), e));
- }
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DownloadAttachmentJob.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DownloadAttachmentJob.java
deleted file mode 100644
index 088c9e387..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DownloadAttachmentJob.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-
-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.jobs.Job;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.ITaskAttachment;
-import org.eclipse.mylyn.tasks.core.RepositoryStatus;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.data.AbstractTaskAttachmentHandler;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-
-/**
- * @author Steffen Pingel
- */
-public class DownloadAttachmentJob extends Job {
-
- private static final int BUFFER_SIZE = 1024;
-
- private final ITaskAttachment attachment;
-
- private final File targetFile;
-
- public DownloadAttachmentJob(ITaskAttachment attachment, File targetFile) {
- super("Downloading Attachment");
-
- if (attachment == null) {
- throw new IllegalArgumentException("attachment must not be null");
- }
- if (targetFile == null) {
- throw new IllegalArgumentException("target must not be null");
- }
-
- this.attachment = attachment;
- this.targetFile = targetFile;
- }
-
- @Override
- public IStatus run(IProgressMonitor monitor) {
- TaskRepository repository = TasksUi.getRepositoryManager().getRepository(attachment.getConnectorKind(),
- this.attachment.getRepositoryUrl());
- AbstractRepositoryConnector connector = TasksUi.getRepositoryManager().getRepositoryConnector(
- this.attachment.getConnectorKind());
- AbstractTaskAttachmentHandler handler = connector.getTaskAttachmentHandler();
- if (handler == null) {
- return new RepositoryStatus(repository, IStatus.INFO, TasksUiPlugin.ID_PLUGIN,
- RepositoryStatus.ERROR_INTERNAL, "The repository does not support attachments.");
- }
-
- FileOutputStream out = null;
- try {
- out = new FileOutputStream(this.targetFile);
- try {
- InputStream in = handler.getContent(repository, attachment.getTask(), attachment.getTaskAttribute(),
- monitor);
-
- try {
- int len;
- byte[] buffer = new byte[BUFFER_SIZE];
- while ((len = in.read(buffer)) != -1) {
- out.write(buffer, 0, len);
- }
- } finally {
- in.close();
- }
- } finally {
- out.close();
- }
-
- } catch (final CoreException e) {
- TasksUiInternal.displayStatus("Download Attachment", e.getStatus());
- return Status.OK_STATUS;
- } catch (IOException e) {
- return new RepositoryStatus(repository, IStatus.WARNING, TasksUiPlugin.ID_PLUGIN,
- RepositoryStatus.ERROR_IO, "Error while retrieving attachment file.", e);
- } finally {
- if (out != null) {
- try {
- out.close();
- } catch (IOException e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Could not close attachment file: " + this.targetFile.getAbsolutePath(), e));
- }
- }
- }
-
- return Status.OK_STATUS;
- }
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/EditRepositoryPropertiesAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/EditRepositoryPropertiesAction.java
deleted file mode 100644
index 16dd07b05..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/EditRepositoryPropertiesAction.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-
-/**
- * @author Mik Kersten
- * @author Steffen Pingel
- */
-public class EditRepositoryPropertiesAction extends AbstractTaskRepositoryAction implements IViewActionDelegate {
-
- private static final String ID = "org.eclipse.mylyn.tasklist.repositories.properties";
-
- public EditRepositoryPropertiesAction() {
- super("Properties");
- setId(ID);
- setEnabled(false);
- }
-
- @Override
- public void run() {
- TaskRepository taskRepository = getTaskRepository(getStructuredSelection());
- if (taskRepository != null) {
- TasksUiUtil.openEditRepositoryWizard(taskRepository);
- }
- }
-
- public void init(IViewPart view) {
- }
-
- public void run(IAction action) {
- run();
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- if (selection instanceof IStructuredSelection) {
- selectionChanged((IStructuredSelection) selection);
- action.setEnabled(this.isEnabled());
- } else {
- clearCache();
- action.setEnabled(false);
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ExpandAllAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ExpandAllAction.java
deleted file mode 100644
index bfea6df31..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ExpandAllAction.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-
-/**
- * @author Mik Kersten
- */
-public class ExpandAllAction extends Action {
-
- private static final String LABEL = "Expand All";
-
- public static final String ID = "org.eclipse.mylyn.tasklist.actions.expand.all";
-
- private final TaskListView taskListView;
-
- public ExpandAllAction(TaskListView taskListView) {
- super(LABEL);
- this.taskListView = taskListView;
- setId(ID);
- setText(LABEL);
- setToolTipText(LABEL);
- setImageDescriptor(CommonImages.EXPAND_ALL);
- }
-
- @Override
- public void run() {
- if (taskListView.getViewer() != null) {
- taskListView.getViewer().expandAll();
- }
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/FilterArchiveContainerAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/FilterArchiveContainerAction.java
deleted file mode 100644
index 4f16ab301..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/FilterArchiveContainerAction.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.ITasksUiPreferenceConstants;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-
-/**
- * @author Mik Kersten
- * @deprecated
- */
-@Deprecated
-public class FilterArchiveContainerAction extends Action {
-
- public static final String ID = "org.eclipse.mylyn.tasklist.actions.filter.archive";
-
- private static final String LABEL = "Filter Archives";
-
- private final TaskListView view;
-
- public FilterArchiveContainerAction(TaskListView view) {
- this.view = view;
- setText(LABEL);
- setToolTipText(LABEL);
- setId(ID);
- setImageDescriptor(CommonImages.FILTER_ARCHIVE);
- setChecked(TasksUiPlugin.getDefault().getPreferenceStore().contains(
- ITasksUiPreferenceConstants.FILTER_ARCHIVE_MODE));
- }
-
- @Override
- public void run() {
- TasksUiPlugin.getDefault().getPreferenceStore().setValue(ITasksUiPreferenceConstants.FILTER_ARCHIVE_MODE,
- isChecked());
- if (isChecked()) {
- view.addFilter(view.getArchiveFilter());
- } else {
- view.removeFilter(view.getArchiveFilter());
- }
- this.view.refresh();
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/FilterCompletedTasksAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/FilterCompletedTasksAction.java
deleted file mode 100644
index cac955fe2..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/FilterCompletedTasksAction.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.ITasksUiPreferenceConstants;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-
-/**
- * @author Mik Kersten
- */
-public class FilterCompletedTasksAction extends Action {
-
- public static final String ID = "org.eclipse.mylyn.tasklist.actions.filter.completed";
-
- private static final String LABEL = "Filter Completed Tasks";
-
- private final TaskListView view;
-
- public FilterCompletedTasksAction(TaskListView view) {
- this.view = view;
- setText(LABEL);
- setToolTipText(LABEL);
- setId(ID);
- setImageDescriptor(CommonImages.FILTER_COMPLETE);
- setChecked(TasksUiPlugin.getDefault().getPreferenceStore().contains(
- ITasksUiPreferenceConstants.FILTER_COMPLETE_MODE));
- }
-
- @Override
- public void run() {
- TasksUiPlugin.getDefault().getPreferenceStore().setValue(ITasksUiPreferenceConstants.FILTER_COMPLETE_MODE,
- isChecked());
- if (isChecked()) {
- view.addFilter(view.getCompleteFilter());
- } else {
- view.removeFilter(view.getCompleteFilter());
- }
- this.view.refresh();
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/GoIntoAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/GoIntoAction.java
deleted file mode 100644
index b4e58db87..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/GoIntoAction.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-
-/**
- * @author Mik Kersten
- */
-public class GoIntoAction extends Action implements IViewActionDelegate {
-
- private static final String LABEL = "Go Into";
-
- public static final String ID = "org.eclipse.mylyn.tasklist.actions.view.go.into";
-
- //
- // private DrillDownAdapter drillDownAdapter;
- //
- public GoIntoAction() {
- setId(ID);
- setText(LABEL);
- setToolTipText(LABEL);
- setImageDescriptor(CommonImages.GO_INTO);
- }
-
- public void init(IViewPart view) {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public void run() {
- if (TaskListView.getFromActivePerspective() != null) {
- TaskListView.getFromActivePerspective().getFilteredTree().setFilterText("");
- TaskListView.getFromActivePerspective().goIntoCategory();
- }
- }
-
- public void run(IAction action) {
- run();
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- // TODO Auto-generated method stub
-
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/GoUpAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/GoUpAction.java
deleted file mode 100644
index c46b1284f..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/GoUpAction.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.ui.part.DrillDownAdapter;
-
-public class GoUpAction extends Action {
-
- public static final String ID = "org.eclipse.mylyn.tasklist.actions.view.go.up";
-
- public GoUpAction(DrillDownAdapter drillDownAdapter) {
- setText("Go Up To Root");
- setToolTipText("Go Up To Root");
- setId(ID);
- setImageDescriptor(CommonImages.GO_UP);
- }
-
- @Override
- public void run() {
- if (TaskListView.getFromActivePerspective() != null) {
- TaskListView.getFromActivePerspective().goUpToRoot();
- }
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/GroupSubTasksAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/GroupSubTasksAction.java
deleted file mode 100644
index 09586adf0..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/GroupSubTasksAction.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.ITasksUiPreferenceConstants;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-
-/**
- * @author Rob Elves
- * @author Mik Kersten
- */
-public class GroupSubTasksAction extends Action {
-
- public static final String ID = "org.eclipse.mylyn.tasklist.actions.filter.subtasks";
-
- private static final String LABEL = "Group Subtasks";
-
- private final TaskListView view;
-
- public GroupSubTasksAction(TaskListView view) {
- this.view = view;
- setText(LABEL);
- setToolTipText(LABEL);
- setId(ID);
- // setImageDescriptor(TasksUiImages.FILTER_COMPLETE);
- setChecked(TasksUiPlugin.getDefault()
- .getPreferenceStore()
- .getBoolean(ITasksUiPreferenceConstants.GROUP_SUBTASKS));
- }
-
- @Override
- public void run() {
- TasksUiPlugin.getDefault()
- .getPreferenceStore()
- .setValue(ITasksUiPreferenceConstants.GROUP_SUBTASKS, isChecked());
- // TODO: refresh not getting rid of subtasks
-
- view.refresh(true);
-// try {
-// view.getViewer().getControl().setRedraw(false);
-// view.getViewer().collapseAll();
-// if (view.isFocusedMode()) {
-// view.getViewer().expandAll();
-// }
-// view.getViewer().refresh();
-// } finally {
-// view.getViewer().getControl().setRedraw(true);
-// }
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/LinkWithEditorAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/LinkWithEditorAction.java
deleted file mode 100644
index 428db8a8c..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/LinkWithEditorAction.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-
-/**
- * @author Willian Mitsuda
- */
-public class LinkWithEditorAction extends Action {
-
- private final TaskListView taskListView;
-
- public LinkWithEditorAction(TaskListView taskListView) {
- super("&Link with Editor", IAction.AS_CHECK_BOX);
- setImageDescriptor(CommonImages.LINK_EDITOR);
- this.taskListView = taskListView;
- }
-
- @Override
- public void run() {
- taskListView.setLinkWithEditor(isChecked());
- }
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ManageEditorsAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ManageEditorsAction.java
deleted file mode 100644
index 3e0373215..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ManageEditorsAction.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-/**
- * @author Mik Kersten
- */
-//public class ManageEditorsAction extends Action {
-//
-// public static final String ID = "org.eclipse.mylyn.ui.editors.auto.manage";
-// public ManageEditorsAction() {
-// super("Manage Editors with Context", IAction.AS_CHECK_BOX);
-// setId(ID);
-// update(MylarTaskListPlugin.getPrefs().getBoolean(TaskListPreferenceConstants.AUTO_MANAGE_EDITORS));
-// }
-//
-// @Override
-// public void run() {
-// update(isChecked());
-// }
-//
-// public void update(boolean on) {
-// setChecked(on);
-// MylarTaskListPlugin.getPrefs().setValue(TaskListPreferenceConstants.AUTO_MANAGE_EDITORS, on);
-//
-// if (on) {
-// boolean previousValue = WorkbenchPlugin.getDefault().getPreferenceStore().getBoolean(
-// IPreferenceConstants.REUSE_EDITORS_BOOLEAN);
-// MylarTaskListPlugin.getPrefs().setValue(IPreferenceConstants.REUSE_EDITORS_BOOLEAN, previousValue);
-// WorkbenchPlugin.getDefault().getPreferenceStore().setValue(IPreferenceConstants.REUSE_EDITORS_BOOLEAN,
-// false);
-// } else {
-// boolean previousValue = MylarTaskListPlugin.getPrefs().getBoolean(
-// IPreferenceConstants.REUSE_EDITORS_BOOLEAN);
-// WorkbenchPlugin.getDefault().getPreferenceStore().setValue(IPreferenceConstants.REUSE_EDITORS_BOOLEAN,
-// previousValue);
-// }
-// }
-//}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/MarkTaskCompleteAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/MarkTaskCompleteAction.java
deleted file mode 100644
index ef1be7b2a..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/MarkTaskCompleteAction.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.ITaskList;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Mik Kersten
- * @author Eugene Kuleshov
- */
-public class MarkTaskCompleteAction extends AbstractChangeCompletionAction {
-
- public static final String ID = "org.eclipse.mylyn.tasklist.actions.mark.completed";
-
- private static final String ACTION_NAME = "Complete";
-
- private final List<IRepositoryElement> selectedElements;
-
- public MarkTaskCompleteAction(List<IRepositoryElement> selectedElements) {
- this.selectedElements = selectedElements;
- setText(ACTION_NAME);
- setToolTipText("Mark " + ACTION_NAME);
- setId(ID);
- setImageDescriptor(TasksUiImages.TASK_COMPLETE);
-
- setEnabled(shouldEnable(selectedElements));
-// if (allLocalTasks) {
-// setEnabled(selectedElements.size() > 0);
-// }
- }
-
- @Override
- public void run() {
- List<AbstractTask> toComplete = new ArrayList<AbstractTask>();
- for (Object selectedObject : selectedElements) {
- if (selectedObject instanceof ITask) {
- AbstractTask task = (AbstractTask) selectedObject;
- if (task.isLocal()) {
- toComplete.add(task);
- }
- }
- }
- if (toComplete.isEmpty()) {
- return;
- } else if (toComplete.size() > 1) {
- String message = generateMessage(toComplete, ACTION_NAME);
- boolean markConfirmed = MessageDialog.openQuestion(PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow()
- .getShell(), "Confirm Mark Completed", message);
- if (!markConfirmed) {
- return;
- }
- }
-
- ITaskList taskList = TasksUiInternal.getTaskList();
- for (AbstractTask task : toComplete) {
- task.setCompletionDate(new Date());
- taskList.notifyElementChanged(task);
- }
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/MarkTaskIncompleteAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/MarkTaskIncompleteAction.java
deleted file mode 100644
index ec05e54ba..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/MarkTaskIncompleteAction.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.ITaskList;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Mik Kersten and
- * @author Ken Sueda
- * @author Eugene Kuleshov
- */
-public class MarkTaskIncompleteAction extends AbstractChangeCompletionAction {
-
- private static final String ACTION_NAME = "Incomplete";
-
- public static final String ID = "org.eclipse.mylyn.tasklist.actions.mark.incomplete";
-
- private final List<IRepositoryElement> selectedElements;
-
- public MarkTaskIncompleteAction(List<IRepositoryElement> selectedElements) {
- this.selectedElements = selectedElements;
- setText(ACTION_NAME);
- setToolTipText("Mark " + ACTION_NAME);
- setId(ID);
- setImageDescriptor(TasksUiImages.TASK_INCOMPLETE);
-
- setEnabled(shouldEnable(selectedElements));
- }
-
- @Override
- public void run() {
- List<AbstractTask> toComplete = new ArrayList<AbstractTask>();
- for (Object selectedObject : selectedElements) {
- if (selectedObject instanceof ITask) {
- AbstractTask task = (AbstractTask) selectedObject;
- if (task.isLocal()) {
- toComplete.add(task);
- }
- }
- }
- if (toComplete.isEmpty()) {
- return;
- } else if (toComplete.size() > 1) {
-
- String message = generateMessage(toComplete, ACTION_NAME);
- boolean markConfirmed = MessageDialog.openQuestion(PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow()
- .getShell(), "Confirm Mark Incompleted", message);
- if (!markConfirmed) {
- return;
- }
- }
-
- ITaskList taskList = TasksUiInternal.getTaskList();
- for (AbstractTask task : toComplete) {
- task.setCompletionDate(null);
- taskList.notifyElementChanged(task);
- }
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/MoveTaskToRootAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/MoveTaskToRootAction.java
deleted file mode 100644
index 76756df96..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/MoveTaskToRootAction.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-
-/**
- * @author Mik Kersten and Ken Sueda
- */
-public class MoveTaskToRootAction extends Action {
-
- public static final String ID = "org.eclipse.mylyn.tasklist.actions.move.toroot";
-
- // private final TaskListView view;
- public MoveTaskToRootAction(TaskListView view) {
- // this.view = view;
- setText("Move Task to Root");
- setToolTipText("Move Task to Root");
- setId(ID);
- }
-
- @Override
- public void run() {
- throw new RuntimeException("unimplemented");
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewCategoryAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewCategoryAction.java
deleted file mode 100644
index e4d8cadf8..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewCategoryAction.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import java.util.Set;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.InputDialog;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.window.Window;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTaskCategory;
-import org.eclipse.mylyn.internal.tasks.core.TaskCategory;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Mik Kersten
- */
-public class NewCategoryAction extends Action implements IViewActionDelegate {
-
- public static final String ID = "org.eclipse.mylyn.tasks.ui.actions.create.category";
-
-// private final TaskListView view;
-
- protected TaskCategory cat = null;
-
- public NewCategoryAction() {
- setText("New Category...");
- setToolTipText("New Category...");
- setId(ID);
- setImageDescriptor(TasksUiImages.CATEGORY_NEW);
- }
-
- public void init(IViewPart view) {
- }
-
- public void run(IAction action) {
- run();
- }
-
- @Override
- public void run() {
- InputDialog dialog = new InputDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
- "Enter name", "Enter a name for the Category: ", "", null);
- int dialogResult = dialog.open();
- if (dialogResult == Window.OK) {
- String name = dialog.getValue();
- Set<RepositoryQuery> queries = TasksUiInternal.getTaskList().getQueries();
- Set<AbstractTaskCategory> categories = TasksUiInternal.getTaskList().getCategories();
-
- for (AbstractTaskCategory category : categories) {
- if (name != null && name.equals(category.getSummary())) {
- MessageDialog.openInformation(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
- "New Category", "A category with this name already exists, please choose another name.");
- return;
- }
- }
- for (RepositoryQuery query : queries) {
- if (name != null && name.equals(query.getSummary())) {
- MessageDialog.openInformation(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
- "New Category", "A query with this name already exists, please choose another name.");
- return;
- }
- }
-
- this.cat = new TaskCategory(name);
- TasksUiPlugin.getTaskList().addCategory(cat);
-// this.view.getViewer().refresh();
- }
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewQueryAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewQueryAction.java
deleted file mode 100644
index 3645e41d9..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewQueryAction.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import java.util.List;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExecutableExtension;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.window.Window;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.tasks.ui.LocalRepositoryConnectorUi;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.NewQueryWizard;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Mik Kersten
- * @author Eugene Kuleshov
- */
-public class NewQueryAction extends Action implements IViewActionDelegate, IExecutableExtension {
-
- private static final String WIZARD_LABEL = "Add or modify repository query";
-
- private boolean skipRepositoryPage;
-
- public void run(IAction action) {
- IWizard wizard = null;
- List<TaskRepository> repositories = TasksUi.getRepositoryManager().getAllRepositories();
- if (repositories.size() == 2) {
- // NOTE: this click-saving should be generalized
- for (TaskRepository taskRepository : repositories) {
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(taskRepository.getConnectorKind());
- if (!(connectorUi instanceof LocalRepositoryConnectorUi)) {
- wizard = connectorUi.getQueryWizard(taskRepository, null);
- if (wizard == null) {
- continue;
- }
- ((Wizard) wizard).setForcePreviousAndNextButtons(true);
- }
- }
- } else if (skipRepositoryPage) {
- TaskRepository taskRepository = TasksUiUtil.getSelectedRepository();
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(taskRepository.getConnectorKind());
- wizard = connectorUi.getQueryWizard(taskRepository, null);
- ((Wizard) wizard).setForcePreviousAndNextButtons(true);
- if (connectorUi instanceof LocalRepositoryConnectorUi) {
- wizard.performFinish();
- return;
- }
- } else {
- wizard = new NewQueryWizard();
- }
-
- try {
- Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- if (shell != null && !shell.isDisposed()) {
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.create();
- dialog.setTitle(WIZARD_LABEL);
- dialog.setBlockOnOpen(true);
- if (dialog.open() == Window.CANCEL) {
- dialog.close();
- return;
- }
- }
- } catch (Exception e) {
- StatusHandler.fail(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, e.getMessage(), e));
- }
- }
-
- public void init(IViewPart view) {
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- }
-
- public void setInitializationData(IConfigurationElement config, String propertyName, Object data)
- throws CoreException {
- if ("skipFirstPage".equals(data)) {
- this.skipRepositoryPage = true;
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewSubTaskAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewSubTaskAction.java
deleted file mode 100644
index 7ff0050a1..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewSubTaskAction.java
+++ /dev/null
@@ -1,279 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExecutableExtension;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.LocalRepositoryConnector;
-import org.eclipse.mylyn.internal.tasks.core.LocalTask;
-import org.eclipse.mylyn.internal.tasks.core.TaskList;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractAttributeFactory;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractLegacyRepositoryConnector;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-import org.eclipse.mylyn.internal.tasks.ui.ITasksUiPreferenceConstants;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.deprecated.NewTaskEditorInput;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
-import org.eclipse.mylyn.tasks.core.data.AbstractTaskDataHandler;
-import org.eclipse.mylyn.tasks.core.data.TaskAttributeMapper;
-import org.eclipse.mylyn.tasks.core.data.TaskData;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.progress.IProgressService;
-
-/**
- * @author Steffen Pingel
- */
-public class NewSubTaskAction extends Action implements IViewActionDelegate, IExecutableExtension {
-
- private static final String TOOLTIP = "Create a new subtask";
-
- private static final String LABEL = "Subtask";
-
- public static final String ID = "org.eclipse.mylyn.tasks.ui.new.subtask";
-
- private AbstractTask selectedTask;
-
- public NewSubTaskAction() {
- super(LABEL);
- setToolTipText(TOOLTIP);
- setId(ID);
- setImageDescriptor(TasksUiImages.TASK_NEW_SUB);
- }
-
- @SuppressWarnings( { "deprecation", "restriction" })
- @Override
- public void run() {
- if (selectedTask == null) {
- return;
- }
-
- if (selectedTask instanceof LocalTask) {
- // XXX code copied from NewLocalTaskWizard.performFinish() and TaskListManager.createNewLocalTask()
- TaskList taskList = TasksUiPlugin.getTaskList();
- LocalTask newTask = new LocalTask("" + taskList.getNextLocalTaskId(),
- LocalRepositoryConnector.DEFAULT_SUMMARY);
- newTask.setPriority(PriorityLevel.P3.toString());
- TasksUiPlugin.getTaskActivityManager().scheduleNewTask(newTask);
- taskList.addTask(newTask, selectedTask);
- TasksUiUtil.openTask(newTask);
- return;
- }
-
- AbstractRepositoryConnector connector = TasksUi.getRepositoryManager().getRepositoryConnector(
- selectedTask.getConnectorKind());
- if (connector instanceof AbstractLegacyRepositoryConnector) {
- createLegacyTask((AbstractLegacyRepositoryConnector) connector);
- return;
- }
-
- TaskData taskData = createTaskData(connector);
- if (taskData != null) {
- try {
- TasksUiInternal.createAndOpenNewTask(taskData);
- } catch (CoreException e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Failed to open new sub task", e));
- TasksUiInternal.displayStatus("Unable to create subtask", new Status(IStatus.ERROR,
- TasksUiPlugin.ID_PLUGIN, "Failed to create new sub task: " + e.getMessage()));
- }
- }
- }
-
- private TaskData createTaskData(AbstractRepositoryConnector connector) {
- final AbstractTaskDataHandler taskDataHandler = connector.getTaskDataHandler();
- if (taskDataHandler == null) {
- return null;
- }
-
- String repositoryUrl = selectedTask.getRepositoryUrl();
- TaskData parentTaskData = null;
- try {
- parentTaskData = TasksUi.getTaskDataManager().getTaskData(selectedTask);
- } catch (CoreException e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Could not retrieve task data for task: " + selectedTask.getUrl(), e));
- }
- if (parentTaskData == null) {
- TasksUiInternal.displayStatus("Unable to create subtask", new Status(IStatus.WARNING,
- TasksUiPlugin.ID_PLUGIN, "Could not retrieve task data for task: " + selectedTask.getUrl()));
- return null;
- }
-
- final TaskRepository taskRepository = TasksUiPlugin.getRepositoryManager().getRepository(repositoryUrl);
- if (!taskDataHandler.canInitializeSubTaskData(taskRepository, selectedTask)) {
- return null;
- }
-
- final TaskData selectedTaskData = parentTaskData;
- final TaskAttributeMapper attributeMapper = taskDataHandler.getAttributeMapper(taskRepository);
- final TaskData taskData = new TaskData(attributeMapper, taskRepository.getConnectorKind(),
- taskRepository.getRepositoryUrl(), "");
- final boolean[] result = new boolean[1];
- IProgressService service = PlatformUI.getWorkbench().getProgressService();
- try {
- service.busyCursorWhile(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- result[0] = taskDataHandler.initializeSubTaskData(taskRepository, taskData, selectedTaskData,
- new NullProgressMonitor());
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- } catch (InvocationTargetException e) {
- if (e.getCause() instanceof CoreException) {
- TasksUiInternal.displayStatus("Unable to create subtask", ((CoreException) e.getCause()).getStatus());
- } else {
- StatusHandler.fail(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Could not initialize sub task data for task: " + selectedTask.getUrl(), e));
- }
- return null;
- } catch (InterruptedException e) {
- // canceled
- return null;
- }
-
- if (result[0]) {
- // open editor
- return taskData;
- } else {
- TasksUiInternal.displayStatus("Unable to create subtask", new Status(IStatus.INFO, TasksUiPlugin.ID_PLUGIN,
- "The connector does not support creating subtasks for this task"));
- }
- return null;
- }
-
- @Deprecated
- private void createLegacyTask(AbstractLegacyRepositoryConnector connector) {
- final org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractTaskDataHandler taskDataHandler = connector.getLegacyTaskDataHandler();
- if (taskDataHandler == null) {
- return;
- }
-
- String repositoryUrl = selectedTask.getRepositoryUrl();
- final RepositoryTaskData selectedTaskData = TasksUiPlugin.getTaskDataStorageManager().getNewTaskData(
- repositoryUrl, selectedTask.getTaskId());
- if (selectedTaskData == null) {
- TasksUiInternal.displayStatus("Unable to create subtask", new Status(IStatus.WARNING,
- TasksUiPlugin.ID_PLUGIN, "Could not retrieve task data for task: " + selectedTask.getUrl()));
- // TODO try to retrieve task data or fall back to invoking connector code
- return;
- }
-
- if (!taskDataHandler.canInitializeSubTaskData(selectedTask, selectedTaskData)) {
- return;
- }
-
- final TaskRepository taskRepository = TasksUiPlugin.getRepositoryManager().getRepository(repositoryUrl);
- AbstractAttributeFactory attributeFactory = taskDataHandler.getAttributeFactory(
- taskRepository.getRepositoryUrl(), taskRepository.getConnectorKind(), AbstractTask.DEFAULT_TASK_KIND);
- final RepositoryTaskData taskData = new RepositoryTaskData(attributeFactory, selectedTask.getConnectorKind(),
- taskRepository.getRepositoryUrl(), TasksUiPlugin.getDefault().getNextNewRepositoryTaskId());
- taskData.setNew(true);
-
- final boolean[] result = new boolean[1];
- IProgressService service = PlatformUI.getWorkbench().getProgressService();
- try {
- service.busyCursorWhile(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- result[0] = taskDataHandler.initializeSubTaskData(taskRepository, taskData, selectedTaskData,
- new NullProgressMonitor());
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- } catch (InvocationTargetException e) {
- TasksUiInternal.displayStatus("Unable to create subtask", ((CoreException) e.getCause()).getStatus());
- return;
- } catch (InterruptedException e) {
- // canceled
- return;
- }
-
- if (result[0]) {
- // open editor
- NewTaskEditorInput editorInput = new NewTaskEditorInput(taskRepository, taskData);
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- TasksUiUtil.openEditor(editorInput, TaskEditor.ID_EDITOR, page);
- } else {
- TasksUiInternal.displayStatus("Unable to create subtask", new Status(IStatus.INFO, TasksUiPlugin.ID_PLUGIN,
- "The connector does not support creating subtasks for this task"));
- }
- }
-
- public void run(IAction action) {
- run();
- }
-
- public void init(IViewPart view) {
- }
-
- @SuppressWarnings( { "deprecation", "restriction" })
- public void selectionChanged(IAction action, ISelection selection) {
- selectedTask = null;
- if (selection instanceof StructuredSelection) {
- Object selectedObject = ((StructuredSelection) selection).getFirstElement();
- if (selectedObject instanceof LocalTask) {
- if (TasksUiPlugin.getDefault().getPreferenceStore().getBoolean(
- ITasksUiPreferenceConstants.LOCAL_SUB_TASKS_ENABLED)) {
- selectedTask = (AbstractTask) selectedObject;
- }
- } else if (selectedObject instanceof ITask) {
- selectedTask = (AbstractTask) selectedObject;
- AbstractRepositoryConnector connector = TasksUi.getRepositoryManager().getRepositoryConnector(
- selectedTask.getConnectorKind());
- if (connector instanceof AbstractLegacyRepositoryConnector) {
- org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractTaskDataHandler taskDataHandler = ((AbstractLegacyRepositoryConnector) connector).getLegacyTaskDataHandler();
- if (taskDataHandler == null || !taskDataHandler.canInitializeSubTaskData(selectedTask, null)) {
- selectedTask = null;
- }
- } else {
- AbstractTaskDataHandler taskDataHandler = connector.getTaskDataHandler();
- if (taskDataHandler == null || !taskDataHandler.canInitializeSubTaskData(null, selectedTask)) {
- selectedTask = null;
- }
- }
- }
- }
-
- action.setEnabled(selectedTask != null);
- }
-
- public void setInitializationData(IConfigurationElement config, String propertyName, Object data)
- throws CoreException {
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewTaskAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewTaskAction.java
deleted file mode 100644
index 2d17b65df..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewTaskAction.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExecutableExtension;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Mik Kersten
- * @author Eugene Kuleshov
- * @author Steffen Pingel
- */
-public class NewTaskAction extends Action implements IViewActionDelegate, IExecutableExtension {
-
- public static final String ID = "org.eclipse.mylyn.tasklist.ui.repositories.actions.create";
-
- private boolean skipRepositoryPage = false;
-
- private boolean localTask = false;
-
- @Override
- public void run() {
- Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- if (shell != null && !shell.isDisposed()) {
- if (localTask) {
- TasksUiUtil.openNewLocalTaskEditor(shell, null);
- } else {
- if (skipRepositoryPage) {
- TasksUiUtil.openNewTaskEditor(shell, null, TasksUiUtil.getSelectedRepository());
- } else {
- TasksUiUtil.openNewTaskEditor(shell, null, null);
- }
- }
- }
- }
-
- public void run(IAction action) {
- run();
- }
-
- public void init(IViewPart view) {
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- }
-
- public void setInitializationData(IConfigurationElement config, String propertyName, Object data)
- throws CoreException {
- if ("skipFirstPage".equals(data)) {
- this.skipRepositoryPage = true;
- }
- if ("local".equals(data)) {
- this.localTask = true;
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewTaskFromSelectionAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewTaskFromSelectionAction.java
deleted file mode 100644
index 82be5ffca..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewTaskFromSelectionAction.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.text.TextSelection;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.TaskComment;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.TaskSelection;
-import org.eclipse.mylyn.internal.tasks.ui.editors.RepositoryTaskSelection;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.IRepositoryManager;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Frank Becker
- * @author Steffen Pingel
- */
-public class NewTaskFromSelectionAction extends Action {
-
- private static final String LABEL = "New Task from Selection";
-
- public static final String ID = "org.eclipse.mylyn.tasks.ui.actions.newTaskFromSelection";
-
- private TaskSelection taskSelection;
-
- public NewTaskFromSelectionAction() {
- super(LABEL);
- setId(ID);
- setImageDescriptor(TasksUiImages.TASK_NEW);
- }
-
- public TaskSelection getTaskSelection() {
- return taskSelection;
- }
-
- public void run(IAction action) {
- run();
- }
-
- @Override
- public void run() {
- if (taskSelection == null) {
- MessageDialog.openError(null, LABEL, "Nothing selected to create task from.");
- return;
- }
-
- Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- TasksUiUtil.openNewTaskEditor(shell, taskSelection, null);
- }
-
- public void selectionChanged(ISelection selection) {
- if (selection instanceof TextSelection) {
- TextSelection textSelection = (TextSelection) selection;
- String text = textSelection.getText();
- if (text != null && text.length() > 0) {
- taskSelection = new TaskSelection("", text);
- } else {
- taskSelection = null;
- }
- } else if (selection instanceof RepositoryTaskSelection) {
- RepositoryTaskSelection repositoryTaskSelection = (RepositoryTaskSelection) selection;
- IRepositoryManager repositoryManager = TasksUi.getRepositoryManager();
- AbstractRepositoryConnector connector = repositoryManager.getRepositoryConnector(repositoryTaskSelection.getRepositoryKind());
-
- TaskComment comment = repositoryTaskSelection.getComment();
- if (comment != null) {
- StringBuilder sb = new StringBuilder();
- sb.append("\n-- Created from Comment --");
- if (connector != null) {
- sb.append("\nURL: ");
- sb.append(connector.getTaskUrl(repositoryTaskSelection.getRepositoryUrl(),
- repositoryTaskSelection.getId()));
- }
- sb.append("\nComment: ");
- sb.append(comment.getNumber());
-
- sb.append("\n\n");
- if (taskSelection != null) {
- // if text was selected, prefer that
- sb.append(taskSelection.getLegacyTaskData().getDescription());
- } else {
- sb.append(comment.getText());
- }
-
- taskSelection = new TaskSelection("", sb.toString());
- } else if (taskSelection != null) {
- StringBuilder sb = new StringBuilder();
- if (connector != null) {
- sb.append("\n-- Created from Task --");
- sb.append("\nURL: ");
- sb.append(connector.getTaskUrl(repositoryTaskSelection.getRepositoryUrl(),
- repositoryTaskSelection.getId()));
- }
-
- sb.append("\n\n");
- sb.append(taskSelection.getLegacyTaskData().getDescription());
-
- taskSelection = new TaskSelection("", sb.toString());
- }
- }
-
- setEnabled(taskSelection != null);
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenRepositoryTask.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenRepositoryTask.java
deleted file mode 100644
index d7b5da312..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenRepositoryTask.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.window.Window;
-import org.eclipse.mylyn.internal.tasks.ui.AddExistingTaskJob;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.commands.RemoteTaskSelectionDialog;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.progress.IProgressService;
-
-/**
- * @author Mik Kersten
- */
-public class OpenRepositoryTask extends Action implements IWorkbenchWindowActionDelegate, IViewActionDelegate {
-
- private static final String OPEN_REMOTE_TASK_DIALOG_DIALOG_SETTINGS = "org.eclipse.mylyn.tasks.ui.open.remote";
-
- public void run(IAction action) {
- RemoteTaskSelectionDialog dlg = new RemoteTaskSelectionDialog(PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow()
- .getShell());
- dlg.setTitle("Open Repository Task");
-
- IDialogSettings settings = TasksUiPlugin.getDefault().getDialogSettings();
- IDialogSettings dlgSettings = settings.getSection(OPEN_REMOTE_TASK_DIALOG_DIALOG_SETTINGS);
- if (dlgSettings == null) {
- dlgSettings = settings.addNewSection(OPEN_REMOTE_TASK_DIALOG_DIALOG_SETTINGS);
- }
- dlg.setDialogBoundsSettings(dlgSettings, Dialog.DIALOG_PERSISTLOCATION | Dialog.DIALOG_PERSISTSIZE);
-
- if (dlg.open() == Window.OK) {
- if (dlg.getSelectedTask() != null) {
- openExistingTask(dlg);
- } else {
- openRemoteTask(dlg);
- }
- }
- }
-
- /**
- * Selected a existing task; handle category move, if needed
- */
- private void openExistingTask(RemoteTaskSelectionDialog dlg) {
- if (dlg.shouldAddToTaskList()) {
- TasksUiInternal.getTaskList().addTask(dlg.getSelectedTask(), dlg.getSelectedCategory());
- }
- TasksUiInternal.refreshAndOpenTaskListElement(dlg.getSelectedTask());
- }
-
- /**
- * Selected a repository, so try to obtain the task using taskId
- */
- private void openRemoteTask(RemoteTaskSelectionDialog dlg) {
- String[] selectedIds = dlg.getSelectedIds();
- if (dlg.shouldAddToTaskList()) {
- for (String id : selectedIds) {
- final IProgressService svc = PlatformUI.getWorkbench().getProgressService();
- final AddExistingTaskJob job = new AddExistingTaskJob(dlg.getSelectedTaskRepository(), id,
- dlg.getSelectedCategory());
- job.schedule();
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
-
- public void run() {
- svc.showInDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), job);
- }
-
- });
- }
- } else {
- boolean openSuccessful = false;
- for (String id : selectedIds) {
- boolean opened = TasksUiUtil.openTask(dlg.getSelectedTaskRepository(), id);
- if (opened) {
- openSuccessful = true;
- }
- }
- if (!openSuccessful) {
- MessageDialog.openInformation(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
- "Open Task", "Could not find matching repository task.");
- }
- }
- }
-
- public void dispose() {
- }
-
- public void init(IWorkbenchWindow window) {
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- }
-
- public void init(IViewPart view) {
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTaskAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTaskAction.java
deleted file mode 100644
index ef3776f6a..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTaskAction.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.window.Window;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-import org.eclipse.ui.actions.ActionDelegate;
-
-/**
- * @author Willian Mitsuda
- */
-public class OpenTaskAction extends ActionDelegate implements IWorkbenchWindowActionDelegate {
-
- private IWorkbenchWindow window;
-
- public void init(IWorkbenchWindow window) {
- this.window = window;
- }
-
- @Override
- public void run(IAction action) {
- TaskSelectionDialog dlg = new TaskSelectionDialog(window.getShell());
- dlg.setTitle("Open Task");
- dlg.setMessage("&Select a task to open (? = any character, * = any String):");
- dlg.setShowExtendedOpeningOptions(true);
-
- if (dlg.open() != Window.OK) {
- return;
- }
-
- Object result = dlg.getFirstResult();
- if (result instanceof ITask) {
- AbstractTask task = (AbstractTask) result;
- if (dlg.getOpenInBrowser()) {
- if (TasksUiInternal.isValidUrl(task.getUrl())) {
- TasksUiUtil.openUrl(task.getUrl());
- }
- } else {
- TasksUiInternal.refreshAndOpenTaskListElement(task);
- }
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTaskListElementAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTaskListElementAction.java
deleted file mode 100644
index 0e7c4a069..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTaskListElementAction.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import java.util.List;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Event;
-
-/**
- * @author Mik Kersten
- */
-public class OpenTaskListElementAction extends Action {
-
- public static final String ID = "org.eclipse.mylyn.tasklist.actions.open";
-
- private final TreeViewer viewer;
-
- public OpenTaskListElementAction(TreeViewer view) {
- this.viewer = view;
- setText("Open");
- setToolTipText("Open Task List Element");
- setId(ID);
- }
-
- @Override
- public void run() {
- runWithEvent(null);
- }
-
- @Override
- public void runWithEvent(Event event) {
- ISelection selection = viewer.getSelection();
- List<?> list = ((IStructuredSelection) selection).toList();
- for (Object element : list) {
- if (element instanceof ITask && event != null && (event.keyCode & SWT.MOD1) != 0) {
- TasksUiInternal.openTaskInBackground((AbstractTask) element, true);
- } else if (element instanceof ITask) {
- TasksUiInternal.refreshAndOpenTaskListElement((ITask) element);
- } else {
- if (viewer.getExpandedState(element)) {
- viewer.collapseToLevel(element, 1);
- } else {
- viewer.expandToLevel(element, 1);
- }
- }
- }
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTaskSearchAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTaskSearchAction.java
deleted file mode 100644
index 7a0d5b36a..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTaskSearchAction.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.mylyn.internal.tasks.ui.TaskSearchPage;
-import org.eclipse.search.ui.NewSearchUI;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Mik Kersten
- * @author Steffen Pingel
- */
-public class OpenTaskSearchAction extends Action implements IViewActionDelegate {
-
- public OpenTaskSearchAction() {
- }
-
- public void init(IViewPart view) {
- // ignore
- }
-
- @Override
- public void run() {
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- if (window != null) {
- NewSearchUI.openSearchDialog(window, TaskSearchPage.ID);
- }
- }
-
- public void run(IAction action) {
- run();
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- // ignore
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTasksUiPreferencesAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTasksUiPreferencesAction.java
deleted file mode 100644
index 8377c30e9..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTasksUiPreferencesAction.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.preference.PreferenceDialog;
-import org.eclipse.mylyn.internal.tasks.ui.preferences.TasksUiPreferencePage;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.PreferencesUtil;
-
-/**
- * @author Mik Kersten
- */
-public class OpenTasksUiPreferencesAction extends Action {
-
- public static final String ID = "org.eclipse.mylyn.tasks.ui.actions.preferences.open";
-
- private static final String LABEL = "Preferences...";
-
- public OpenTasksUiPreferencesAction() {
- setText(LABEL);
- setToolTipText(LABEL);
- setId(ID);
- }
-
- @Override
- public void run() {
- PreferenceDialog dlg = PreferencesUtil.createPreferenceDialogOn(PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow()
- .getShell(), TasksUiPreferencePage.ID, new String[] { TasksUiPreferencePage.ID }, null);
- dlg.open();
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenWithBrowserAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenWithBrowserAction.java
deleted file mode 100644
index 929fae60b..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenWithBrowserAction.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import java.util.Iterator;
-
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.ui.actions.BaseSelectionListenerAction;
-
-/**
- * @author Mik Kersten
- * @author Rob Elves
- */
-public class OpenWithBrowserAction extends BaseSelectionListenerAction {
-
- private static final String LABEL = "Open with Browser";
-
- public static final String ID = "org.eclipse.mylyn.tasklist.actions.open.browser";
-
- public OpenWithBrowserAction() {
- super(LABEL);
- setToolTipText(LABEL);
- setId(ID);
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public void run() {
- if (super.getStructuredSelection() != null) {
- for (Iterator iter = super.getStructuredSelection().iterator(); iter.hasNext();) {
- runWithSelection(iter.next());
- }
- }
- }
-
- private void runWithSelection(Object selectedObject) {
- String urlString = null;
- if (selectedObject instanceof ITask) {
- AbstractTask task = (AbstractTask) selectedObject;
- if (TasksUiInternal.isValidUrl(task.getUrl())) {
- urlString = task.getUrl();
- }
- } else if (selectedObject instanceof IRepositoryElement) {
- IRepositoryElement query = (IRepositoryElement) selectedObject;
- urlString = query.getUrl();
- }
-
- if (urlString != null) {
- TasksUiUtil.openUrl(urlString);
- }
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/PresentationDropDownSelectionAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/PresentationDropDownSelectionAction.java
deleted file mode 100644
index f1a579608..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/PresentationDropDownSelectionAction.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import java.util.List;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.ActionContributionItem;
-import org.eclipse.jface.action.IMenuCreator;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.tasks.ui.views.AbstractTaskListPresentation;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Menu;
-
-/**
- * @author Rob Elves
- */
-public class PresentationDropDownSelectionAction extends Action implements IMenuCreator {
-
- private static final String LABEL_NAME = "Task Presentation";
-
- public static final String ID = "org.eclipse.mylyn.tasklist.actions.presentationselection";
-
- private final TaskListView view;
-
- protected Menu dropDownMenu = null;
-
- public PresentationDropDownSelectionAction(TaskListView view) {
- super();
- this.view = view;
- setMenuCreator(this);
- setText(LABEL_NAME);
- setToolTipText(LABEL_NAME);
- setId(ID);
- setEnabled(true);
- setImageDescriptor(CommonImages.PRESENTATION);
- }
-
- protected void addActionsToMenu() {
- for (AbstractTaskListPresentation presentation : TaskListView.getPresentations()) {
- if (presentation.isPrimary()) {
- PresentationSelectionAction action = new PresentationSelectionAction(presentation);
- ActionContributionItem item = new ActionContributionItem(action);
- action.setText(presentation.getName());
- action.setImageDescriptor(presentation.getImageDescriptor());
- action.setChecked(view.getCurrentPresentation().getId().equals(presentation.getId()));
- item.fill(dropDownMenu, -1);
- }
- }
- boolean separatorAdded = false;
-
- for (AbstractTaskListPresentation presentation : TaskListView.getPresentations()) {
- if (!presentation.isPrimary()) {
- if (!separatorAdded) {
- new Separator().fill(dropDownMenu, -1);
- separatorAdded = true;
- }
-
- PresentationSelectionAction action = new PresentationSelectionAction(presentation);
- ActionContributionItem item = new ActionContributionItem(action);
- action.setText(presentation.getName());
- action.setImageDescriptor(presentation.getImageDescriptor());
- action.setChecked(view.getCurrentPresentation().getId().equals(presentation.getId()));
- item.fill(dropDownMenu, -1);
- }
- }
- }
-
- @Override
- public void run() {
- AbstractTaskListPresentation current = view.getCurrentPresentation();
- List<AbstractTaskListPresentation> all = TaskListView.getPresentations();
- int index = all.indexOf(current) + 1;
- if (index < all.size()) {
- view.applyPresentation(all.get(index));
- } else {
- view.applyPresentation(all.get(0));
- }
- }
-
- public void dispose() {
- if (dropDownMenu != null) {
- dropDownMenu.dispose();
- dropDownMenu = null;
- }
- }
-
- public Menu getMenu(Control parent) {
- if (dropDownMenu != null) {
- dropDownMenu.dispose();
- }
- dropDownMenu = new Menu(parent);
- addActionsToMenu();
- return dropDownMenu;
- }
-
- public Menu getMenu(Menu parent) {
- if (dropDownMenu != null) {
- dropDownMenu.dispose();
- }
- dropDownMenu = new Menu(parent);
- addActionsToMenu();
- return dropDownMenu;
- }
-
- private class PresentationSelectionAction extends Action {
-
- private final AbstractTaskListPresentation presentation;
-
- public PresentationSelectionAction(AbstractTaskListPresentation presentation) {
- this.presentation = presentation;
- setText(presentation.getName());
- }
-
- @Override
- public void run() {
- view.applyPresentation(presentation);
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/QueryCloneAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/QueryCloneAction.java
deleted file mode 100644
index cde3801f9..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/QueryCloneAction.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.PlatformUI;
-import org.w3c.dom.Document;
-
-/**
- * Allow to clone a selected query.
- *
- * @author Jevgeni Holodkov
- */
-public class QueryCloneAction extends Action implements IViewActionDelegate {
-
- protected ISelection selection;
-
- public void init(IViewPart view) {
- // ignore
- }
-
- public void run(IAction action) {
- run(getSelectedQuery(selection));
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- this.selection = selection;
- IRepositoryQuery selectedQuery = getSelectedQuery(selection);
- action.setEnabled(true);
- if (selectedQuery != null) {
- action.setEnabled(true);
- } else {
- action.setEnabled(false);
- }
- }
-
- protected RepositoryQuery getSelectedQuery(ISelection newSelection) {
- if (selection instanceof StructuredSelection) {
- // allow to select only one element
- if (((StructuredSelection) selection).size() == 1) {
- Object selectedObject = ((StructuredSelection) selection).getFirstElement();
- if (selectedObject instanceof IRepositoryQuery) {
- return (RepositoryQuery) selectedObject;
- }
- }
- }
- return null;
- }
-
- public void run(RepositoryQuery selectedQuery) {
- if (selectedQuery == null) {
- MessageDialog.openInformation(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
- "Clone Query", "No query selected.");
- return;
- }
-
- List<RepositoryQuery> queries = new ArrayList<RepositoryQuery>();
- queries.add(selectedQuery);
-
- Document queryDoc = TasksUiPlugin.getTaskListManager().getTaskListWriter().createQueryDocument(queries);
- List<RepositoryQuery> clonedQueries = TasksUiPlugin.getTaskListManager().getTaskListWriter().readQueryDocument(
- queryDoc);
-
- if (clonedQueries.size() > 0) {
- for (RepositoryQuery query : clonedQueries) {
- String handle = QueryImportAction.resolveIdentifiersConflict(query);
- query.setHandleIdentifier(handle);
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(query.getConnectorKind());
- TasksUiInternal.openEditQueryDialog(connectorUi, query);
- }
- } else {
- // cannot happen
- StatusHandler.fail(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Query cloning did not succeeded.",
- new IllegalStateException(selectedQuery.toString())));
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/QueryExportAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/QueryExportAction.java
deleted file mode 100644
index d9dad371d..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/QueryExportAction.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import java.io.File;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.Locale;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
-import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Makes able to export selected query to the file system.
- *
- * @author Jevgeni Holodkov
- */
-public class QueryExportAction extends Action implements IViewActionDelegate {
-
- protected ISelection selection;
-
- public void init(IViewPart view) {
- // ignore
- }
-
- public void run(IAction action) {
- run(getSelectedQueries(selection));
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- this.selection = selection;
- List<RepositoryQuery> selectedQueries = getSelectedQueries(selection);
- action.setEnabled(true);
- if (selectedQueries.size() > 0) {
- action.setEnabled(true);
- } else {
- action.setEnabled(false);
- }
- }
-
- @SuppressWarnings("unchecked")
- protected List<RepositoryQuery> getSelectedQueries(ISelection newSelection) {
- List<RepositoryQuery> selectedQueries = new ArrayList<RepositoryQuery>();
- if (selection instanceof StructuredSelection) {
- List selectedObjects = ((StructuredSelection) selection).toList();
- for (Object selectedObject : selectedObjects) {
- if (selectedObject instanceof IRepositoryQuery) {
- selectedQueries.add((RepositoryQuery) selectedObject);
- }
- }
- }
- return selectedQueries;
- }
-
- public void run(List<RepositoryQuery> queries) {
- Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- FileDialog dialog = new FileDialog(shell, SWT.PRIMARY_MODAL | SWT.SAVE);
- dialog.setFilterExtensions(new String[] { "*" + ITasksCoreConstants.FILE_EXTENSION });
- if (queries.size() == 1) {
- dialog.setFileName(queries.get(0).getHandleIdentifier() + ITasksCoreConstants.FILE_EXTENSION);
- } else {
- String fomratString = "yyyy-MM-dd";
- SimpleDateFormat format = new SimpleDateFormat(fomratString, Locale.ENGLISH);
- String date = format.format(new Date());
- dialog.setFileName(date + "-exported-queries" + ITasksCoreConstants.FILE_EXTENSION);
- }
-
- String path = dialog.open();
- if (path != null) {
- File file = new File(path);
- if (file.isDirectory()) {
- MessageDialog.openError(shell, "Query Export Error",
- "Could not export query because specified location is a folder");
- return;
- }
-
- // Prompt the user to confirm if save operation will cause an overwrite
- if (file.exists()) {
- if (!MessageDialog.openConfirm(shell, "Confirm File Replace", "The file " + file.getPath()
- + " already exists. Do you want to overwrite it?")) {
- return;
- }
- }
-
- TasksUiPlugin.getTaskListManager().getTaskListWriter().writeQueries(queries, file);
- }
- return;
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/QueryImportAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/QueryImportAction.java
deleted file mode 100644
index 25d8e5ea5..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/QueryImportAction.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Makes able to select an exported query file and import it back to the system.
- *
- * @author Jevgeni Holodkov
- */
-public class QueryImportAction extends Action implements IViewActionDelegate {
-
- protected ISelection selection;
-
- public void init(IViewPart view) {
- // ignore
- }
-
- public void run(IAction action) {
- run();
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- // ignore
- }
-
- @Override
- public void run() {
- Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- FileDialog dialog = new FileDialog(shell);
- dialog.setFilterExtensions(new String[] { "*" + ITasksCoreConstants.FILE_EXTENSION });
-
- String path = dialog.open();
- if (path != null) {
- File file = new File(path);
- if (file.isFile()) {
- try {
- List<RepositoryQuery> queries = TasksUiPlugin.getTaskListManager().getTaskListWriter().readQueries(
- file);
- Set<TaskRepository> repositories = TasksUiPlugin.getTaskListManager()
- .getTaskListWriter()
- .readRepositories(file);
- if (queries.size() > 0) {
- importQueries(queries, repositories, shell);
- } else {
- MessageDialog.openError(shell, "Query Import Error",
- "The specified file is not an exported query. Please, check that you have provided the correct file.");
- }
- } catch (IOException e) {
- MessageDialog.openError(shell, "Query Import Error",
- "The specified file is not an exported query. Please, check that you have provided the correct file.");
- }
- }
- }
- }
-
- /**
- * @param queries
- * @param repositories
- * @param shell
- */
- public void importQueries(List<RepositoryQuery> queries, Set<TaskRepository> repositories, Shell shell) {
- TasksUiPlugin.getRepositoryManager().insertRepositories(repositories,
- TasksUiPlugin.getDefault().getRepositoriesFilePath());
- List<RepositoryQuery> badQueries = insertQueries(queries);
-
- // notify user about importing
- String message = "The following queries were imported successfully: ";
- for (RepositoryQuery imported : queries) {
- if (!badQueries.contains(imported)) {
- message += "\n" + imported.getHandleIdentifier();
- }
- }
-
- if (badQueries.size() > 0) {
- message += "\n\n These queries were not imported, since their repository was not found: ";
- for (RepositoryQuery bad : badQueries) {
- message += "\n" + bad.getHandleIdentifier();
- }
- }
-
- MessageDialog.openInformation(shell, "Query Import Completed", message);
- }
-
- /**
- * Imports Queries to the TaskList and synchronize them with the repository. If the imported query have the name
- * that overlaps with the existing one, the the suffix [x] is added, where x is a number starting from 1.
- *
- * @param queries
- * to insert
- * @return the list queries, which were not inserted since because the related repository was not found.
- */
- public List<RepositoryQuery> insertQueries(List<RepositoryQuery> queries) {
- List<RepositoryQuery> badQueries = new ArrayList<RepositoryQuery>();
-
- for (RepositoryQuery query : queries) {
-
- TaskRepository repository = TasksUi.getRepositoryManager().getRepository(query.getConnectorKind(),
- query.getRepositoryUrl());
- if (repository == null) {
- badQueries.add(query);
- continue;
- }
-
- String handle = resolveIdentifiersConflict(query);
- query.setHandleIdentifier(handle);
-
- // add query
- TasksUiInternal.getTaskList().addQuery(query);
-
- AbstractRepositoryConnector connector = TasksUi.getRepositoryManager().getRepositoryConnector(
- repository.getConnectorKind());
- if (connector != null) {
- TasksUiInternal.synchronizeQuery(connector, query, null, true);
- }
-
- }
-
- return badQueries;
- }
-
- /**
- * Utility method that checks, if there is already a query with the same identifier.
- *
- * @param query
- * @return a handle, that is not in conflict with any existed one in the system. If there were no conflict in the
- * beginning, then the query's own identifier is returned. If there were, then the suffix [x] is applied the
- * query's identifier, where x is a number.
- * @since 2.1
- */
- public static String resolveIdentifiersConflict(RepositoryQuery query) {
- String patternStr = "\\[(\\d+)\\]$"; // all string that end with [x], where x is a number
- Pattern pattern = Pattern.compile(patternStr);
-
- // resolve name conflict
- Set<RepositoryQuery> existingQueries = TasksUiPlugin.getTaskListManager().getTaskList().getQueries();
- Map<String, RepositoryQuery> queryMap = new HashMap<String, RepositoryQuery>();
- for (RepositoryQuery existingQuery : existingQueries) {
- queryMap.put(existingQuery.getHandleIdentifier(), existingQuery);
- }
-
- // suggest a new handle if needed
- String handle = query.getHandleIdentifier();
-
- while (queryMap.get(handle) != null) {
- Matcher matcher = pattern.matcher(handle);
- boolean matchFound = matcher.find();
- if (matchFound) {
- // increment index
- int index = Integer.parseInt(matcher.group(1));
- index++;
- handle = matcher.replaceAll("[" + index + "]");
- } else {
- handle += "[1]";
- }
- }
-
- return handle;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RefreshRepositoryTasksAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RefreshRepositoryTasksAction.java
deleted file mode 100644
index ca5ad0de3..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RefreshRepositoryTasksAction.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import java.util.Iterator;
-import java.util.Set;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-
-/**
- * @author Steffen Pingel
- */
-public class RefreshRepositoryTasksAction extends AbstractTaskRepositoryAction implements IViewActionDelegate {
-
- private static final String ID = "org.eclipse.mylyn.tasklist.repositories.refreshAllTasks";
-
- public RefreshRepositoryTasksAction() {
- super("Refresh All Tasks");
- setId(ID);
- setEnabled(false);
- }
-
- @Override
- public void run() {
- IStructuredSelection selection = getStructuredSelection();
- for (Iterator<?> iter = selection.iterator(); iter.hasNext();) {
- Object selectedObject = iter.next();
- if (selectedObject instanceof TaskRepository) {
- TaskRepository repository = (TaskRepository) selectedObject;
- synchronizeAllTasks(repository);
- }
- }
- }
-
- private void synchronizeAllTasks(TaskRepository repository) {
- AbstractRepositoryConnector connector = TasksUi.getRepositoryManager().getRepositoryConnector(
- repository.getConnectorKind());
- if (connector != null) {
- Set<ITask> repositoryTasks = TasksUiPlugin.getTaskList().getTasks(
- repository.getRepositoryUrl());
- TasksUiInternal.synchronizeTasks(connector, repositoryTasks, true, null);
- }
- }
-
- public void init(IViewPart view) {
- }
-
- public void run(IAction action) {
- run();
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- selectionChanged((IStructuredSelection) selection);
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RemoveFromCategoryAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RemoveFromCategoryAction.java
deleted file mode 100644
index 9a51a31bc..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RemoveFromCategoryAction.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTaskCategory;
-import org.eclipse.mylyn.internal.tasks.core.TaskCategory;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.tasks.core.ITask;
-
-/**
- * @author Ken Sueda
- * @author Mik Kersten
- */
-public class RemoveFromCategoryAction extends Action {
-
- private static final String LABEL = "Remove From Category";
-
- public static final String ID = "org.eclipse.mylyn.tasklist.actions.remove";
-
- private final TaskListView view;
-
- public RemoveFromCategoryAction(TaskListView view) {
- this.view = view;
- setText(LABEL);
- setId(ID);
- setImageDescriptor(CommonImages.REMOVE);
- }
-
- @Override
- public void run() {
- ISelection selection = view.getViewer().getSelection();
- for (Object selectedObject : ((IStructuredSelection) selection).toList()) {
- if (selectedObject instanceof ITask) {
- AbstractTask task = (AbstractTask) selectedObject;
- AbstractTaskCategory category = TaskCategory.getParentTaskCategory(task);
- if (category != null) {
- TasksUiInternal.getTaskList().removeFromContainer(category, task);
- }
- }
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RenameAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RenameAction.java
deleted file mode 100644
index 956f3dc1d..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RenameAction.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTaskCategory;
-import org.eclipse.mylyn.internal.tasks.core.LocalTask;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.swt.SWT;
-import org.eclipse.ui.actions.BaseSelectionListenerAction;
-
-/**
- * @author Mik Kersten
- */
-public class RenameAction extends BaseSelectionListenerAction {
-
- private static final String LABEL_NAME = "Rename";
-
- public static final String ID = "org.eclipse.mylyn.tasklist.actions.rename";
-
- private final TaskListView view;
-
- public RenameAction(TaskListView view) {
- super(LABEL_NAME);
- this.view = view;
- setId(ID);
- setAccelerator(SWT.F2);
- }
-
- @Override
- public void run() {
- Object selectedObject = ((IStructuredSelection) this.view.getViewer().getSelection()).getFirstElement();
- if (selectedObject instanceof IRepositoryElement) {
- IRepositoryElement element = (IRepositoryElement) selectedObject;
- view.setInRenameAction(true);
- view.getViewer().editElement(element, 0);
- view.setInRenameAction(false);
- }
- }
-
- @Override
- protected boolean updateSelection(IStructuredSelection selection) {
- Object selectedObject = selection.getFirstElement();
- if (selectedObject instanceof AbstractTaskCategory) {
- AbstractTaskCategory container = (AbstractTaskCategory) selectedObject;
- return container.isUserManaged();
- } else if (selectedObject instanceof IRepositoryQuery) {
- return true;
- }
- return (selectedObject instanceof LocalTask);
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RestoreTaskListAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RestoreTaskListAction.java
deleted file mode 100644
index 5fd180dd9..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RestoreTaskListAction.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.window.Window;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.TaskDataImportWizard;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Mik Kersten
- */
-public class RestoreTaskListAction implements IViewActionDelegate, IWorkbenchWindowActionDelegate {
-
- public void init(IViewPart view) {
- }
-
- public void run(IAction action) {
- try {
- IWizard wizard = new TaskDataImportWizard();
- Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- if (shell != null && !shell.isDisposed()) {
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.create();
- dialog.setTitle("Restore Task List from History");
- dialog.setBlockOnOpen(true);
- if (dialog.open() == Window.CANCEL) {
- dialog.close();
- return;
- }
- }
- } catch (Exception e) {
- StatusHandler.fail(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, e.getMessage(), e));
- }
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- }
-
- public void dispose() {
- // ignore
-
- }
-
- public void init(IWorkbenchWindow window) {
- // ignore
-
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/SearchForRepositoryTask.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/SearchForRepositoryTask.java
deleted file mode 100644
index bd9ad650b..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/SearchForRepositoryTask.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.mylyn.internal.tasks.ui.TaskSearchPage;
-import org.eclipse.search.internal.ui.SearchDialog;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Mik Kersten
- */
-public class SearchForRepositoryTask extends Action implements IWorkbenchWindowActionDelegate, IViewActionDelegate {
-
- public void run(IAction action) {
- new SearchDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow(), TaskSearchPage.ID).open();
- }
-
- public void dispose() {
- }
-
- public void init(IWorkbenchWindow window) {
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- }
-
- public void init(IViewPart view) {
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ShowInTaskListAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ShowInTaskListAction.java
deleted file mode 100644
index 80144d5d9..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ShowInTaskListAction.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.ui.actions.BaseSelectionListenerAction;
-
-/**
- * @author Willian Mitsuda
- */
-public class ShowInTaskListAction extends BaseSelectionListenerAction {
-
- public ShowInTaskListAction() {
- super("&Show In Task List");
- }
-
- @Override
- public void run() {
- IStructuredSelection struSel = getStructuredSelection();
- if (!struSel.isEmpty()) {
- Object element = struSel.getFirstElement();
- if (element instanceof ITask) {
- TasksUiUtil.openTasksViewInActivePerspective();
- TaskListView.getFromActivePerspective().selectedAndFocusTask((AbstractTask) element);
- }
- }
- }
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ShowTaskRepositoriesViewAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ShowTaskRepositoriesViewAction.java
deleted file mode 100644
index 31ac69dc6..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ShowTaskRepositoriesViewAction.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskRepositoriesView;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-
-/**
- * @author Mik Kersten
- */
-public class ShowTaskRepositoriesViewAction implements IViewActionDelegate {
-
- public void init(IViewPart view) {
- }
-
- public void run(IAction action) {
- TaskRepositoriesView.openInActivePerspective();
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- // ignore
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/SynchronizeAllAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/SynchronizeAllAction.java
deleted file mode 100644
index 3ade8d6ea..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/SynchronizeAllAction.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-
-/**
- * @author Mik Kersten
- * @author Rob Elves
- */
-public class SynchronizeAllAction implements IViewActionDelegate {
-
- public void init(IViewPart view) {
- // ignore
- }
-
- public void run(IAction action) {
- TasksUiInternal.synchronizeAllRepositories(true);
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- // ignore
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/SynchronizeAutomaticallyAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/SynchronizeAutomaticallyAction.java
deleted file mode 100644
index e68307a69..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/SynchronizeAutomaticallyAction.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.ITasksUiPreferenceConstants;
-
-/**
- * @author Mik Kersten
- */
-public class SynchronizeAutomaticallyAction extends Action {
-
- public static final String ID = "org.eclipse.mylyn.tasks.ui.actions.synchronize.background";
-
- private static final String LABEL = "Synchronize Automatically";
-
- public SynchronizeAutomaticallyAction() {
- setText(LABEL);
- setToolTipText(LABEL);
- setId(ID);
- setChecked(TasksUiPlugin.getDefault().getPreferenceStore().getBoolean(
- ITasksUiPreferenceConstants.REPOSITORY_SYNCH_SCHEDULE_ENABLED));
- }
-
- @Override
- public void run() {
- TasksUiPlugin.getDefault().getPreferenceStore().setValue(
- ITasksUiPreferenceConstants.REPOSITORY_SYNCH_SCHEDULE_ENABLED, isChecked());
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/SynchronizeEditorAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/SynchronizeEditorAction.java
deleted file mode 100644
index e0a6be8d5..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/SynchronizeEditorAction.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.jobs.IJobChangeEvent;
-import org.eclipse.core.runtime.jobs.JobChangeAdapter;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.tasks.ui.deprecated.AbstractRepositoryTaskEditor;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.BaseSelectionListenerAction;
-
-/**
- * @author Rob Elves
- */
-public class SynchronizeEditorAction extends BaseSelectionListenerAction {
-
- private static final String LABEL = "Synchronize";
-
- private static final String TOOLTIP = "Synchronize Incoming Changes";
-
- public static final String ID = "org.eclipse.mylyn.tasklist.actions.synchronize.editor";
-
- public SynchronizeEditorAction() {
- super(LABEL);
- setToolTipText(TOOLTIP);
- setId(ID);
- setImageDescriptor(CommonImages.REFRESH_SMALL);
- // setAccelerator(SWT.MOD1 + 'r');
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public void run() {
- if (getStructuredSelection() != null) {
- for (Iterator it = getStructuredSelection().iterator(); it.hasNext();) {
- runWithSelection(it.next());
- }
- }
- }
-
- @SuppressWarnings( { "deprecation" })
- private void runWithSelection(final Object selectedObject) {
- ITask task = null;
- if (selectedObject instanceof TaskEditor) {
- TaskEditor editor = (TaskEditor) selectedObject;
- task = editor.getTaskEditorInput().getTask();
- } else if (selectedObject instanceof AbstractRepositoryTaskEditor) {
- AbstractRepositoryTaskEditor editor = (AbstractRepositoryTaskEditor) selectedObject;
- task = editor.getRepositoryTask();
- }
-
- if (task != null) {
- AbstractRepositoryConnector connector = TasksUi.getRepositoryManager().getRepositoryConnector(
- task.getConnectorKind());
- if (connector != null) {
- TasksUiInternal.synchronizeTask(connector, task, true, new JobChangeAdapter() {
- @Override
- public void done(IJobChangeEvent event) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- if (selectedObject instanceof TaskEditor) {
- TaskEditor editor = (TaskEditor) selectedObject;
- editor.refreshEditorContents();
- } else if (selectedObject instanceof AbstractRepositoryTaskEditor) {
- ((AbstractRepositoryTaskEditor) selectedObject).refreshEditor();
- }
- }
- });
-
- }
- });
- }
- }
-
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/SynchronizeSelectedAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/SynchronizeSelectedAction.java
deleted file mode 100644
index 9abd7a117..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/SynchronizeSelectedAction.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.TaskCategory;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-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.ITaskDataManager;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.actions.ActionDelegate;
-import org.eclipse.ui.actions.ActionFactory;
-
-/**
- * @author Mik Kersten
- * @author Rob Elves
- */
-public class SynchronizeSelectedAction extends ActionDelegate implements IViewActionDelegate {
-
- private final Map<AbstractRepositoryConnector, List<RepositoryQuery>> queriesToSyncMap = new LinkedHashMap<AbstractRepositoryConnector, List<RepositoryQuery>>();
-
- private final Map<AbstractRepositoryConnector, List<ITask>> tasksToSyncMap = new LinkedHashMap<AbstractRepositoryConnector, List<ITask>>();
-
- @Override
- public void run(IAction action) {
-
- if (TaskListView.getFromActivePerspective() != null) {
-
- ISelection selection = TaskListView.getFromActivePerspective().getViewer().getSelection();
- for (Object obj : ((IStructuredSelection) selection).toList()) {
- if (obj instanceof IRepositoryQuery) {
- final RepositoryQuery repositoryQuery = (RepositoryQuery) obj;
- AbstractRepositoryConnector client = TasksUi.getRepositoryManager().getRepositoryConnector(
- repositoryQuery.getConnectorKind());
- if (client != null) {
- List<RepositoryQuery> queriesToSync = queriesToSyncMap.get(client);
- if (queriesToSync == null) {
- queriesToSync = new ArrayList<RepositoryQuery>();
- queriesToSyncMap.put(client, queriesToSync);
- }
- queriesToSync.add(repositoryQuery);
- }
- } else if (obj instanceof TaskCategory) {
- TaskCategory cat = (TaskCategory) obj;
- for (ITask task : cat.getChildren()) {
- AbstractRepositoryConnector client = TasksUi.getRepositoryManager().getRepositoryConnector(
- task.getConnectorKind());
- addTaskToSync(client, task);
- }
- } else if (obj instanceof ITask) {
- AbstractTask repositoryTask = (AbstractTask) obj;
- AbstractRepositoryConnector client = TasksUi.getRepositoryManager().getRepositoryConnector(
- repositoryTask.getConnectorKind());
- addTaskToSync(client, repositoryTask);
- }
- }
-
- ITaskDataManager syncManager = TasksUiPlugin.getTaskDataManager();
- if (!queriesToSyncMap.isEmpty()) {
-
- // determine which repositories to synch changed tasks for
- HashMap<TaskRepository, Set<RepositoryQuery>> repositoriesToSync = new HashMap<TaskRepository, Set<RepositoryQuery>>();
- for (AbstractRepositoryConnector connector : queriesToSyncMap.keySet()) {
- List<RepositoryQuery> queriesToSync = queriesToSyncMap.get(connector);
- if (queriesToSync == null || queriesToSync.isEmpty()) {
- continue;
- }
-
- for (RepositoryQuery query : queriesToSync) {
- TaskRepository repos = TasksUi.getRepositoryManager().getRepository(query.getConnectorKind(),
- query.getRepositoryUrl());
- Set<RepositoryQuery> queries = repositoriesToSync.get(repos);
- if (queries == null) {
- queries = new HashSet<RepositoryQuery>();
- repositoriesToSync.put(repos, queries);
- }
- queries.add(query);
- }
- }
-
- for (Map.Entry<TaskRepository, Set<RepositoryQuery>> entry : repositoriesToSync.entrySet()) {
- TaskRepository repository = entry.getKey();
- AbstractRepositoryConnector connector = TasksUi.getRepositoryManager().getRepositoryConnector(
- repository.getConnectorKind());
- Set<RepositoryQuery> queries = entry.getValue();
- TasksUiInternal.synchronizeQueries(connector, repository, queries, null, true);
- }
- }
- if (!tasksToSyncMap.isEmpty()) {
- for (AbstractRepositoryConnector connector : tasksToSyncMap.keySet()) {
- List<ITask> tasksToSync = tasksToSyncMap.get(connector);
- if (tasksToSync != null && tasksToSync.size() > 0) {
- TasksUiInternal.synchronizeTasks(connector, new HashSet<ITask>(tasksToSync), true, null);
- }
- }
- }
-
- }
-
- queriesToSyncMap.clear();
- tasksToSyncMap.clear();
-
-// TasksUiPlugin.getTaskList().notifyContainerUpdated(null);
-
-// if (TaskListView.getFromActivePerspective() != null) {
-// TaskListView.getFromActivePerspective().getViewer().refresh();
-// }
- }
-
- private void addTaskToSync(AbstractRepositoryConnector client, ITask repositoryTask) {
- if (client != null) {
- List<ITask> tasksToSync = tasksToSyncMap.get(client);
- if (tasksToSync == null) {
- tasksToSync = new ArrayList<ITask>();
- tasksToSyncMap.put(client, tasksToSync);
- }
- tasksToSync.add(repositoryTask);
- }
- }
-
- private IAction action;
-
- @Override
- public void init(IAction action) {
- this.action = action;
- }
-
- public void init(IViewPart view) {
- IActionBars actionBars = view.getViewSite().getActionBars();
- actionBars.setGlobalActionHandler(ActionFactory.REFRESH.getId(), action);
- actionBars.updateActionBars();
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskActivateAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskActivateAction.java
deleted file mode 100644
index 99f3c23c0..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskActivateAction.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-
-/**
- * @author Mik Kersten
- */
-public class TaskActivateAction extends Action implements IViewActionDelegate {
-
- public static final String ID = "org.eclipse.mylyn.tasklist.actions.context.activate";
-
- public TaskActivateAction() {
- setId(ID);
- setText("Activate");
- setImageDescriptor(TasksUiImages.CONTEXT_ACTIVE_CENTERED);
- }
-
- public void init(IViewPart view) {
- // ignore
- }
-
- @Override
- public void run() {
- run(TaskListView.getFromActivePerspective().getSelectedTask());
- }
-
- public void run(ITask task) {
- if (task != null && !task.isActive()) {
- TasksUi.getTaskActivityManager().activateTask(task);
- }
- }
-
- public void run(IAction action) {
- run();
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- // ignore
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskDeactivateAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskDeactivateAction.java
deleted file mode 100644
index 85dde9fb6..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskDeactivateAction.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.action.Action;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-
-/**
- * @author Mik Kersten
- */
-public class TaskDeactivateAction extends Action {
-
- public static final String ID = "org.eclipse.mylyn.tasklist.actions.context.deactivate";
-
- public TaskDeactivateAction() {
- setId(ID);
- setText("Deactivate");
- setImageDescriptor(TasksUiImages.CONTEXT_INACTIVE_EMPTY);
- }
-
- public void run(ITask task) {
- try {
- if (task != null) {
- TasksUi.getTaskActivityManager().deactivateTask(task);
- }
- } catch (Exception e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Closing task editor on task deactivation failed", e));
- }
- }
-
- @Override
- public void run() {
- run(TaskListView.getFromActivePerspective().getSelectedTask());
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskEditorCopyAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskEditorCopyAction.java
deleted file mode 100644
index 6141b833a..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskEditorCopyAction.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-/*
- * Created on 20-Jan-2005
- */
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import org.eclipse.jface.action.Action;
-
-/**
- * TODO: delete?
- */
-public class TaskEditorCopyAction extends Action {
-
- public TaskEditorCopyAction() {
- setText("TaskInfoEditor.copy.text");
- }
-
- @Override
- public void run() {
- // if (editorPart instanceof TaskInfoEditor)
- // ((TaskInfoEditor)editorPart).getCurrentText().copy();
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskExportAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskExportAction.java
deleted file mode 100644
index bfe549570..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskExportAction.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.DirectoryDialog;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Action to export a task to an external file.
- *
- * @author Jevgeni Holodkov
- */
-public class TaskExportAction extends Action implements IViewActionDelegate {
-
- protected ISelection selection;
-
- public void init(IViewPart view) {
- // ignore
- }
-
- public void run(IAction action) {
- run(getSelectedTasks(selection));
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- this.selection = selection;
- List<AbstractTask> tasks = getSelectedTasks(selection);
- action.setEnabled(true);
- if (tasks.size() > 0) {
- action.setEnabled(true);
- } else {
- action.setEnabled(false);
- }
- }
-
- protected List<AbstractTask> getSelectedTasks(ISelection newSelection) {
- List<AbstractTask> selectedQueries = new ArrayList<AbstractTask>();
- if (selection instanceof StructuredSelection) {
- List<?> selectedObjects = ((StructuredSelection) selection).toList();
- for (Object selectedObject : selectedObjects) {
- if (selectedObject instanceof ITask) {
- selectedQueries.add((AbstractTask) selectedObject);
- }
- }
- }
- return selectedQueries;
- }
-
- public void run(List<AbstractTask> tasks) {
- Map<AbstractTask, File> taskFiles = new HashMap<AbstractTask, File>();
-
- Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
-
- if (tasks.size() == 1) {
- // open FileDialog
- FileDialog dialog = new FileDialog(shell, SWT.PRIMARY_MODAL | SWT.SAVE);
- dialog.setFilterExtensions(new String[] { "*" + ITasksCoreConstants.FILE_EXTENSION });
-
- AbstractTask task = tasks.get(0);
-
- dialog.setFileName(encodeName(task));
- String path = dialog.open();
-
- if (path != null) {
- File file = new File(path);
- if (file.isDirectory()) {
- MessageDialog.openError(shell, "Task Export Error",
- "Could not export task because specified location is a folder");
- return;
- }
- taskFiles.put(task, file);
- }
- } else {
- // open DirectoryDialog
- DirectoryDialog dialog = new DirectoryDialog(shell, SWT.PRIMARY_MODAL | SWT.SAVE);
- String path = dialog.open();
- for (AbstractTask task : tasks) {
- File file = new File(path, encodeName(task));
- taskFiles.put(task, file);
- }
- }
-
- for (Entry<AbstractTask, File> entry : taskFiles.entrySet()) {
- AbstractTask task = entry.getKey();
- File file = entry.getValue();
-
- // Prompt the user to confirm if save operation will cause an overwrite
- if (file.exists()) {
- if (!MessageDialog.openQuestion(shell, "Confirm File Replace", "The file " + file.getPath()
- + " already exists. Do you want to overwrite it?")) {
- continue;
- }
- }
-
- TasksUiPlugin.getTaskListManager().getTaskListWriter().writeTask(task, file);
- }
- return;
- }
-
- private String encodeName(ITask task) {
- String fileName = task.getSummary();
- if (fileName.length() > 50) {
- fileName = fileName.substring(0, 50);
- }
- fileName = task.getTaskId() + " - " + fileName + ITasksCoreConstants.FILE_EXTENSION;
- return fileName;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskImportAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskImportAction.java
deleted file mode 100644
index 75b2573be..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskImportAction.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import java.io.File;
-import java.util.Collection;
-import java.util.Set;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Action to import a task from an external file. Imports also task's related repository and context information.
- *
- * @author Jevgeni Holodkov
- */
-public class TaskImportAction extends Action implements IViewActionDelegate {
-
- protected ISelection selection;
-
- public void init(IViewPart view) {
- // ignore
- }
-
- public void run(IAction action) {
- run();
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- // ignore
- }
-
- @Override
- public void run() {
- Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- FileDialog dialog = new FileDialog(shell);
- dialog.setFilterExtensions(new String[] { "*" + ITasksCoreConstants.FILE_EXTENSION });
-
- String path = dialog.open();
- if (path != null) {
- File file = new File(path);
- if (file.isFile()) {
- Set<TaskRepository> repositories = TasksUiPlugin.getTaskListManager()
- .getTaskListWriter()
- .readRepositories(file);
- Collection<AbstractTask> readTasks = TasksUiPlugin.getTaskListManager().getTaskListWriter().readTasks(
- file);
- if (readTasks.size() > 0) {
- TasksUiInternal.importTasks(readTasks, repositories, file, shell);
-// refreshTaskListView();
- } else {
- MessageDialog.openError(shell, "Task Import Error",
- "The specified file is not an exported task. Please, check that you have provided the correct file.");
- return;
- }
- }
- }
- return;
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskListSortAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskListSortAction.java
deleted file mode 100644
index 34f46adc7..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskListSortAction.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.mylyn.internal.tasks.ui.dialogs.TaskListSortDialog;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.ui.IWorkbenchPartSite;
-
-public class TaskListSortAction extends Action {
-
- private final TaskListSortDialog dialog;
-
- public TaskListSortAction(IWorkbenchPartSite site, TaskListView taskListView) {
- super("Sort...");
- setEnabled(true);
- dialog = new TaskListSortDialog(site, taskListView);
- }
-
- @Override
- public void run() {
- dialog.open();
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskSelectionDialog.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskSelectionDialog.java
deleted file mode 100644
index 91ad43f08..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskSelectionDialog.java
+++ /dev/null
@@ -1,722 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-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.jface.action.Action;
-import org.eclipse.jface.action.ActionContributionItem;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.jface.layout.GridLayoutFactory;
-import org.eclipse.jface.text.ITextSelection;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.window.Window;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonColors;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.TaskActivationHistory;
-import org.eclipse.mylyn.internal.tasks.core.TaskList;
-import org.eclipse.mylyn.internal.tasks.ui.TaskSearchPage;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskDetailLabelProvider;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListFilteredTree;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.internal.tasks.ui.workingsets.TaskWorkingSetUpdater;
-import org.eclipse.mylyn.internal.tasks.ui.workingsets.WorkingSetLabelComparator;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITaskContainer;
-import org.eclipse.mylyn.tasks.ui.TaskElementLabelProvider;
-import org.eclipse.search.internal.ui.SearchDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkingSet;
-import org.eclipse.ui.IWorkingSetManager;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.FilteredItemsSelectionDialog;
-import org.eclipse.ui.dialogs.IWorkingSetEditWizard;
-import org.eclipse.ui.dialogs.IWorkingSetSelectionDialog;
-import org.eclipse.ui.dialogs.SearchPattern;
-import org.eclipse.ui.forms.events.HyperlinkAdapter;
-import org.eclipse.ui.forms.events.HyperlinkEvent;
-import org.eclipse.ui.forms.widgets.ImageHyperlink;
-
-/**
- * @author Willian Mitsuda
- * @author Mik Kersten
- * @author Eugene Kuleshov
- * @author Shawn Minto
- */
-public class TaskSelectionDialog extends FilteredItemsSelectionDialog {
-
- private class DeselectWorkingSetAction extends Action {
-
- public DeselectWorkingSetAction() {
- super("&Deselect Working Set", IAction.AS_PUSH_BUTTON);
- }
-
- @Override
- public void run() {
- setSelectedWorkingSet(null);
- }
- }
-
- private class EditWorkingSetAction extends Action {
-
- public EditWorkingSetAction() {
- super("&Edit Active Working Set...", IAction.AS_PUSH_BUTTON);
- }
-
- @Override
- public void run() {
- IWorkingSetEditWizard wizard = PlatformUI.getWorkbench().getWorkingSetManager().createWorkingSetEditWizard(
- selectedWorkingSet);
- if (wizard != null) {
- WizardDialog dlg = new WizardDialog(getShell(), wizard);
- dlg.open();
- }
- }
- }
-
- private class FilterWorkingSetAction extends Action {
-
- private final IWorkingSet workingSet;
-
- public FilterWorkingSetAction(IWorkingSet workingSet, int shortcutKeyNumber) {
- super("", IAction.AS_RADIO_BUTTON);
- this.workingSet = workingSet;
- if (shortcutKeyNumber >= 1 && shortcutKeyNumber <= 9) {
- setText("&" + String.valueOf(shortcutKeyNumber) + " " + workingSet.getLabel());
- } else {
- setText(workingSet.getLabel());
- }
- setImageDescriptor(workingSet.getImageDescriptor());
- }
-
- @Override
- public void run() {
- setSelectedWorkingSet(workingSet);
- }
- }
-
- private class SelectWorkingSetAction extends Action {
-
- public SelectWorkingSetAction() {
- super("Select &Working Set...", IAction.AS_PUSH_BUTTON);
- }
-
- @Override
- public void run() {
- IWorkingSetSelectionDialog dlg = PlatformUI.getWorkbench()
- .getWorkingSetManager()
- .createWorkingSetSelectionDialog(getShell(), false,
- new String[] { TaskWorkingSetUpdater.ID_TASK_WORKING_SET });
- if (selectedWorkingSet != null) {
- dlg.setSelection(new IWorkingSet[] { selectedWorkingSet });
- }
- if (dlg.open() == Window.OK) {
- IWorkingSet[] selection = dlg.getSelection();
- if (selection.length == 0) {
- setSelectedWorkingSet(null);
- } else {
- setSelectedWorkingSet(selection[0]);
- }
- }
- }
- }
-
- private class ShowCompletedTasksAction extends Action {
-
- public ShowCompletedTasksAction() {
- super("Show &Completed Tasks", IAction.AS_CHECK_BOX);
- }
-
- @Override
- public void run() {
- showCompletedTasks = isChecked();
- applyFilter();
- }
-
- }
-
- private class TaskHistoryItemsComparator implements Comparator<Object> {
-
- Map<AbstractTask, Integer> positionByTask = new HashMap<AbstractTask, Integer>();
-
- public TaskHistoryItemsComparator(List<AbstractTask> history) {
- for (int i = 0; i < history.size(); i++) {
- positionByTask.put(history.get(i), i);
- }
- }
-
- public int compare(Object o1, Object o2) {
- Integer p1 = positionByTask.get(o1);
- Integer p2 = positionByTask.get(o2);
- if (p1 != null && p2 != null) {
- return p2.compareTo(p1);
- }
- return labelProvider.getText(o1).compareTo(labelProvider.getText(o2));
- }
-
- }
-
- /**
- * Integrates {@link FilteredItemsSelectionDialog} history management with Mylyn's task list activation history
- * <p>
- * Due to {@link SelectionHistory} use of memento-based history storage, many methods are overridden
- */
- private class TaskSelectionHistory extends SelectionHistory {
-
- @Override
- public synchronized void accessed(Object object) {
- // ignore, handled by TaskActivationHistory
- }
-
- @Override
- public synchronized boolean contains(Object object) {
- return history.contains(object);
- }
-
- @Override
- public synchronized Object[] getHistoryItems() {
- return history.toArray();
- }
-
- @Override
- public synchronized boolean isEmpty() {
- return history.isEmpty();
- }
-
- @Override
- public void load(IMemento memento) {
- // do nothing because tasklist history handles this
- }
-
- @Override
- public synchronized boolean remove(Object object) {
- taskActivationHistory.removeTask((ITask) object);
- return history.remove(object);
- }
-
- @Override
- protected Object restoreItemFromMemento(IMemento memento) {
- // do nothing because tasklist history handles this
- return null;
- }
-
- @Override
- public void save(IMemento memento) {
- // do nothing because tasklist history handles this
- }
-
- @Override
- protected void storeItemToMemento(Object item, IMemento memento) {
- // do nothing because tasklist history handles this
- }
- }
-
- /**
- * Supports filtering of completed tasks.
- */
- private class TasksFilter extends ItemsFilter {
-
- private Set<ITask> allTasksFromWorkingSets;
-
- /**
- * Stores the task containers from selected working set; empty, which can come from no working set selection or
- * working set with no task containers selected, means no filtering
- */
- private final Set<AbstractTaskContainer> elements;
-
- private final boolean showCompletedTasks;
-
- public TasksFilter(boolean showCompletedTasks, IWorkingSet selectedWorkingSet) {
- super(new SearchPattern());
- // Little hack to force always a match inside any part of task text
- patternMatcher.setPattern("*" + patternMatcher.getPattern());
- this.showCompletedTasks = showCompletedTasks;
-
- elements = new HashSet<AbstractTaskContainer>();
- if (selectedWorkingSet != null) {
- for (IAdaptable adaptable : selectedWorkingSet.getElements()) {
- AbstractTaskContainer container = (AbstractTaskContainer) adaptable.getAdapter(AbstractTaskContainer.class);
- if (container != null) {
- elements.add(container);
- }
- }
- }
- }
-
- @Override
- public boolean equalsFilter(ItemsFilter filter) {
- if (!super.equalsFilter(filter)) {
- return false;
- }
- if (filter instanceof TasksFilter) {
- TasksFilter tasksFilter = (TasksFilter) filter;
- if (showCompletedTasks != tasksFilter.showCompletedTasks) {
- return false;
- }
- return elements.equals(tasksFilter.elements);
- }
- return true;
- }
-
- @Override
- public boolean isConsistentItem(Object item) {
- return item instanceof ITask;
- }
-
- @Override
- public boolean isSubFilter(ItemsFilter filter) {
- if (!super.isSubFilter(filter)) {
- return false;
- }
- if (filter instanceof TasksFilter) {
- TasksFilter tasksFilter = (TasksFilter) filter;
- if (!showCompletedTasks && tasksFilter.showCompletedTasks) {
- return false;
- }
- if (elements.isEmpty()) {
- return true;
- }
- if (tasksFilter.elements.isEmpty()) {
- return false;
- }
- return elements.containsAll(tasksFilter.elements);
- }
- return true;
- }
-
- @Override
- public boolean matchItem(Object item) {
- if (!(item instanceof ITask)) {
- return false;
- }
- if (!showCompletedTasks && ((ITask) item).isCompleted()) {
- return false;
- }
- if (!elements.isEmpty()) {
- if (allTasksFromWorkingSets == null) {
- populateTasksFromWorkingSets();
- }
- if (!allTasksFromWorkingSets.contains(item)) {
- return false;
- }
- }
- return matches(labelProvider.getText(item));
- }
-
- private void populateTasksFromWorkingSets() {
- allTasksFromWorkingSets = new HashSet<ITask>(1000);
- for (ITaskContainer container : elements) {
- allTasksFromWorkingSets.addAll(container.getChildren());
- }
- }
- }
-
- private static final int SEARCH_ID = IDialogConstants.CLIENT_ID + 1;
-
- private static final int CREATE_ID = SEARCH_ID + 1;
-
- private static final String IS_USING_WINDOW_WORKING_SET_SETTING = "IsUsingWindowWorkingSet";
-
- private static final String OPEN_IN_BROWSER_SETTING = "OpenInBrowser";
-
- private static final String SHOW_COMPLETED_TASKS_SETTING = "ShowCompletedTasks";
-
- private static final String TASK_SELECTION_DIALOG_SECTION = "TaskSelectionDialogSection";
-
- private static final String WORKING_SET_NAME_SETTING = "WorkingSetName";
-
- /**
- * Caches all tasks; populated at first access
- */
- private Set<AbstractTask> allTasks;
-
- private Button createTaskButton;
-
- /**
- * Mylyn's task activation history
- */
- private final List<AbstractTask> history;
-
- private final TaskHistoryItemsComparator itemsComparator;
-
- private final TaskElementLabelProvider labelProvider;
-
- private boolean needsCreateTask;
-
- private boolean openInBrowser;
-
- private Button openInBrowserCheck;
-
- /**
- * Set of filtered working sets
- */
- private IWorkingSet selectedWorkingSet;
-
- private boolean showCompletedTasks;
-
- private final ShowCompletedTasksAction showCompletedTasksAction;
-
- private boolean showExtendedOpeningOptions;
-
- /**
- * Caches the window working set
- */
- private final IWorkingSet windowWorkingSet;
-
- /**
- * Refilters if the current working set content has changed
- */
- private final IPropertyChangeListener workingSetListener = new IPropertyChangeListener() {
-
- public void propertyChange(PropertyChangeEvent event) {
- if (event.getProperty().equals(IWorkingSetManager.CHANGE_WORKING_SET_CONTENT_CHANGE)) {
- if (event.getNewValue().equals(selectedWorkingSet)) {
- applyFilter();
- }
- }
- }
-
- };
-
- private final TaskActivationHistory taskActivationHistory;
-
- public TaskSelectionDialog(Shell parent) {
- super(parent);
- this.taskActivationHistory = TasksUiPlugin.getTaskActivityManager().getTaskActivationHistory();
- this.history = new ArrayList<AbstractTask>(taskActivationHistory.getPreviousTasks());
- this.itemsComparator = new TaskHistoryItemsComparator(this.history);
- this.needsCreateTask = true;
- this.labelProvider = new TaskElementLabelProvider(false);
- this.showCompletedTasksAction = new ShowCompletedTasksAction();
-
- setSelectionHistory(new TaskSelectionHistory());
- setListLabelProvider(labelProvider);
-
-// setListLabelProvider(new DecoratingLabelProvider(labelProvider, PlatformUI.getWorkbench()
-// .getDecoratorManager()
-// .getLabelDecorator()));
- setDetailsLabelProvider(new TaskDetailLabelProvider());
- setSeparatorLabel(TaskListView.LABEL_VIEW + " matches");
-
- // If there is a text selection, use it as the initial filter
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- ISelection selection = window.getSelectionService().getSelection();
- if (selection instanceof ITextSelection) {
- // Get only get first line
- String text = ((ITextSelection) selection).getText();
- int n = text.indexOf('\n');
- if (n > -1) {
- text.substring(0, n);
- }
- setInitialPattern(text);
- }
-
- windowWorkingSet = window.getActivePage().getAggregateWorkingSet();
- selectedWorkingSet = windowWorkingSet;
-
- PlatformUI.getWorkbench().getWorkingSetManager().addPropertyChangeListener(workingSetListener);
- }
-
- @Override
- public boolean close() {
- PlatformUI.getWorkbench().getWorkingSetManager().removePropertyChangeListener(workingSetListener);
- if (openInBrowserCheck != null) {
- openInBrowser = openInBrowserCheck.getSelection();
- }
- return super.close();
- }
-
- @Override
- protected Control createButtonBar(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 0; // create
- layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
- layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
- layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
- layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
-
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- // create help control if needed
- if (isHelpAvailable()) {
- createHelpControl(composite);
- }
- if (needsCreateTask) {
- createTaskButton = createButton(composite, CREATE_ID, "New Task...", true);
- createTaskButton.addSelectionListener(new SelectionListener() {
-
- public void widgetDefaultSelected(SelectionEvent e) {
- // ignore
- }
-
- public void widgetSelected(SelectionEvent e) {
- close();
- new NewTaskAction().run();
- }
- });
- }
-
- Label filler = new Label(composite, SWT.NONE);
- filler.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
- layout.numColumns++;
- super.createButtonsForButtonBar(composite); // cancel button
-
- return composite;
- }
-
- @Override
- protected Control createExtendedContentArea(Composite parent) {
- if (!showExtendedOpeningOptions) {
- return null;
- }
-
- Composite composite = new Composite(parent, SWT.NONE);
- composite.setLayout(GridLayoutFactory.swtDefaults().margins(0, 5).create());
- composite.setLayoutData(GridDataFactory.fillDefaults().create());
-
- openInBrowserCheck = new Button(composite, SWT.CHECK);
- openInBrowserCheck.setText("Open with &Browser");
- openInBrowserCheck.setSelection(openInBrowser);
-
- ImageHyperlink openHyperlink = new ImageHyperlink(composite, SWT.NONE);
- openHyperlink.setText(TaskListFilteredTree.LABEL_SEARCH);
- openHyperlink.setForeground(CommonColors.HYPERLINK_WIDGET);
- openHyperlink.setUnderlined(true);
- openHyperlink.addHyperlinkListener(new HyperlinkAdapter() {
-
- @Override
- public void linkActivated(HyperlinkEvent e) {
- getShell().close();
- new SearchDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow(), TaskSearchPage.ID).open();
- }
-
- });
-
- return composite;
- }
-
- @Override
- protected ItemsFilter createFilter() {
- return new TasksFilter(showCompletedTasks, selectedWorkingSet);
- }
-
- @Override
- protected void fillContentProvider(AbstractContentProvider contentProvider, ItemsFilter itemsFilter,
- IProgressMonitor progressMonitor) throws CoreException {
- progressMonitor.beginTask("Search for tasks", 100);
-
- if (allTasks == null) {
- allTasks = new HashSet<AbstractTask>();
- TaskList taskList = TasksUiPlugin.getTaskList();
- allTasks.addAll(taskList.getAllTasks());
- }
- progressMonitor.worked(10);
-
- SubProgressMonitor subMonitor = new SubProgressMonitor(progressMonitor, 90);
- subMonitor.beginTask("Scanning tasks", allTasks.size());
- for (ITask task : allTasks) {
- contentProvider.add(task, itemsFilter);
- subMonitor.worked(1);
- }
- subMonitor.done();
-
- progressMonitor.done();
- }
-
- @Override
- protected void fillViewMenu(IMenuManager menuManager) {
- super.fillViewMenu(menuManager);
- menuManager.add(showCompletedTasksAction);
- menuManager.add(new Separator());
-
- // Fill existing tasks working sets
- menuManager.add(new SelectWorkingSetAction());
- final DeselectWorkingSetAction deselectAction = new DeselectWorkingSetAction();
- menuManager.add(deselectAction);
- final EditWorkingSetAction editAction = new EditWorkingSetAction();
- menuManager.add(editAction);
- menuManager.add(new Separator("lruActions"));
- final FilterWorkingSetAction windowWorkingSetAction = new FilterWorkingSetAction(windowWorkingSet, 1);
- menuManager.add(windowWorkingSetAction);
-
- menuManager.addMenuListener(new IMenuListener() {
-
- private final List<ActionContributionItem> lruActions = new ArrayList<ActionContributionItem>();
-
- public void menuAboutToShow(IMenuManager manager) {
- deselectAction.setEnabled(selectedWorkingSet != null);
- editAction.setEnabled(selectedWorkingSet != null && selectedWorkingSet.isEditable());
-
- // Remove previous LRU actions
- for (ActionContributionItem action : lruActions) {
- manager.remove(action);
- }
- lruActions.clear();
-
- // Adds actual LRU actions
- IWorkingSet[] workingSets = PlatformUI.getWorkbench().getWorkingSetManager().getRecentWorkingSets();
- Arrays.sort(workingSets, new WorkingSetLabelComparator());
- int count = 2;
- for (IWorkingSet workingSet : workingSets) {
- if (workingSet.getId().equalsIgnoreCase(TaskWorkingSetUpdater.ID_TASK_WORKING_SET)) {
- IAction action = new FilterWorkingSetAction(workingSet, count++);
- if (workingSet.equals(selectedWorkingSet)) {
- action.setChecked(true);
- }
- ActionContributionItem ci = new ActionContributionItem(action);
- lruActions.add(ci);
- manager.appendToGroup("lruActions", ci);
- }
- }
- windowWorkingSetAction.setChecked(windowWorkingSet.equals(selectedWorkingSet));
- }
-
- });
- }
-
- @Override
- protected IDialogSettings getDialogSettings() {
- IDialogSettings settings = TasksUiPlugin.getDefault().getDialogSettings();
- IDialogSettings section = settings.getSection(TASK_SELECTION_DIALOG_SECTION);
- if (section == null) {
- section = settings.addNewSection(TASK_SELECTION_DIALOG_SECTION);
- section.put(OPEN_IN_BROWSER_SETTING, false);
- section.put(SHOW_COMPLETED_TASKS_SETTING, true);
- section.put(IS_USING_WINDOW_WORKING_SET_SETTING, true);
- section.put(WORKING_SET_NAME_SETTING, "");
- }
- return section;
- }
-
- @Override
- public String getElementName(Object item) {
- return labelProvider.getText(item);
- }
-
- /**
- * Sort tasks by summary
- */
- @SuppressWarnings("unchecked")
- @Override
- protected Comparator getItemsComparator() {
- return itemsComparator;
- }
-
- public boolean getOpenInBrowser() {
- return openInBrowser;
- }
-
- public boolean getShowExtendedOpeningOptions() {
- return showExtendedOpeningOptions;
- }
-
- public boolean needsCreateTask() {
- return needsCreateTask;
- }
-
- @Override
- protected void restoreDialog(IDialogSettings settings) {
- openInBrowser = settings.getBoolean(OPEN_IN_BROWSER_SETTING);
- showCompletedTasks = settings.getBoolean(SHOW_COMPLETED_TASKS_SETTING);
- showCompletedTasksAction.setChecked(showCompletedTasks);
- boolean isUsingWindowWorkingSet = settings.getBoolean(IS_USING_WINDOW_WORKING_SET_SETTING);
- if (isUsingWindowWorkingSet) {
- selectedWorkingSet = windowWorkingSet;
- } else {
- String workingSetName = settings.get(WORKING_SET_NAME_SETTING);
- if (workingSetName != null) {
- selectedWorkingSet = PlatformUI.getWorkbench().getWorkingSetManager().getWorkingSet(workingSetName);
- }
- }
- super.restoreDialog(settings);
- }
-
- public void setNeedsCreateTask(boolean value) {
- needsCreateTask = value;
- }
-
- public void setOpenInBrowser(boolean openInBrowser) {
- this.openInBrowser = openInBrowser;
- }
-
- /**
- * All working set filter changes should be made through this method; ensures proper history handling and triggers
- * refiltering
- */
- private void setSelectedWorkingSet(IWorkingSet workingSet) {
- selectedWorkingSet = workingSet;
- if (workingSet != null) {
- PlatformUI.getWorkbench().getWorkingSetManager().addRecentWorkingSet(workingSet);
- }
- applyFilter();
- }
-
- public void setShowExtendedOpeningOptions(boolean showExtendedOpeningOptions) {
- this.showExtendedOpeningOptions = showExtendedOpeningOptions;
- }
-
- @Override
- protected void storeDialog(IDialogSettings settings) {
- settings.put(OPEN_IN_BROWSER_SETTING, openInBrowser);
- settings.put(SHOW_COMPLETED_TASKS_SETTING, showCompletedTasks);
- settings.put(IS_USING_WINDOW_WORKING_SET_SETTING, selectedWorkingSet == windowWorkingSet);
- if (selectedWorkingSet == null) {
- settings.put(WORKING_SET_NAME_SETTING, "");
- } else {
- settings.put(WORKING_SET_NAME_SETTING, selectedWorkingSet.getName());
- }
- super.storeDialog(settings);
- }
-
- @Override
- protected IStatus validateItem(Object item) {
- if (item instanceof ITask) {
- return Status.OK_STATUS;
- }
- return new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Selected item is not a task");
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskWorkingSetAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskWorkingSetAction.java
deleted file mode 100644
index fadf3ea58..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskWorkingSetAction.java
+++ /dev/null
@@ -1,366 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.ActionContributionItem;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IMenuCreator;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.viewers.ArrayContentProvider;
-import org.eclipse.jface.viewers.CheckboxTableViewer;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.mylyn.internal.tasks.ui.dialogs.AbstractWorkingSetDialogCOPY;
-import org.eclipse.mylyn.internal.tasks.ui.workingsets.TaskWorkingSetUpdater;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkingSet;
-import org.eclipse.ui.IWorkingSetManager;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.IWorkingSetEditWizard;
-import org.eclipse.ui.internal.WorkbenchMessages;
-import org.eclipse.ui.internal.WorkbenchPlugin;
-import org.eclipse.ui.internal.WorkingSetComparator;
-import org.eclipse.ui.internal.dialogs.WorkingSetFilter;
-import org.eclipse.ui.internal.dialogs.WorkingSetLabelProvider;
-
-/**
- * Derived from SelectWorkingSetsAction
- *
- * @author Leo Dos Santos
- * @author Mik Kersten
- */
-public class TaskWorkingSetAction extends Action implements IMenuCreator {
-
- public static final String LABEL_SETS_NONE = "All";
-
- public static String TASK_WORKING_SET_TEXT_LABEL = "Select and Edit Working Sets";
-
- private Menu dropDownMenu = null;
-
- public TaskWorkingSetAction() {
- super();
- setText("Sets");
- setToolTipText(TASK_WORKING_SET_TEXT_LABEL);
- setImageDescriptor(TasksUiImages.TASK_WORKING_SET);
- setEnabled(true);
- setMenuCreator(this);
- }
-
- public void dispose() {
- if (dropDownMenu != null) {
- dropDownMenu.dispose();
- dropDownMenu = null;
- }
- }
-
- public Menu getMenu(Control parent) {
- if (dropDownMenu != null) {
- dropDownMenu.dispose();
- }
- dropDownMenu = new Menu(parent);
- addActionsToMenu();
- return dropDownMenu;
- }
-
- public Menu getMenu(Menu parent) {
- if (dropDownMenu != null) {
- dropDownMenu.dispose();
- }
- dropDownMenu = new Menu(parent);
- addActionsToMenu();
- return dropDownMenu;
- }
-
- @SuppressWarnings("unchecked")
- private void addActionsToMenu() {
- IWorkingSet[] workingSets = PlatformUI.getWorkbench().getWorkingSetManager().getWorkingSets();
-
- if (doTaskWorkingSetsExist()) {
- ActionContributionItem itemAll = new ActionContributionItem(new ToggleAllWorkingSetsAction(
- PlatformUI.getWorkbench().getActiveWorkbenchWindow()));
-// ActionContributionItem itemNone = new ActionContributionItem(new ToggleNoWorkingSetsAction());
-
- List<IWorkingSet> sortedWorkingSets = Arrays.asList(workingSets);
- Collections.sort(sortedWorkingSets, new WorkingSetComparator());
-
- Iterator<IWorkingSet> iter = sortedWorkingSets.iterator();
- while (iter.hasNext()) {
- IWorkingSet workingSet = iter.next();
- if (workingSet != null
- && workingSet.getId().equalsIgnoreCase(TaskWorkingSetUpdater.ID_TASK_WORKING_SET)) {
- ActionContributionItem itemSet = new ActionContributionItem(new ToggleWorkingSetAction(workingSet));
- itemSet.fill(dropDownMenu, -1);
- }
- }
-
- Separator separator = new Separator();
- separator.fill(dropDownMenu, -1);
- itemAll.fill(dropDownMenu, -1);
- }
-
- ActionContributionItem editItem = new ActionContributionItem(new ManageWorkingSetsAction());
- editItem.fill(dropDownMenu, -1);
- }
-
- private boolean doTaskWorkingSetsExist() {
- IWorkingSet[] workingSets = PlatformUI.getWorkbench().getWorkingSetManager().getWorkingSets();
- for (IWorkingSet workingSet : workingSets) {
- if (workingSet != null && workingSet.getId().equalsIgnoreCase(TaskWorkingSetUpdater.ID_TASK_WORKING_SET)) {
- return true;
- }
- }
- return false;
- }
-
- @Override
- public void run() {
- String[] ids = new String[1];
- ids[0] = TaskWorkingSetUpdater.ID_TASK_WORKING_SET;
- ConfigureWindowWorkingSetsDialog dialog = new ConfigureWindowWorkingSetsDialog(PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow(), ids);
- dialog.open();
- }
-
- public void run(IAction action) {
- this.run();
- }
-
- public void run(IWorkingSet editWorkingSet) {
- IWorkingSetManager manager = WorkbenchPlugin.getDefault().getWorkingSetManager();
- IWorkingSetEditWizard wizard = manager.createWorkingSetEditWizard(editWorkingSet);
- WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), wizard);
-
-// dialog.create();
- dialog.open();
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(dialog.getShell(),
-// IWorkbenchHelpContextIds.WORKING_SET_EDIT_WIZARD);
-// if (dialog.open() == Window.OK) {
-// editWorkingSet = wizard.getSelection();
-// availableWorkingSetsChanged();
-// // make sure ok button is enabled when the selected working set
-// // is edited. Fixes bug 33386.
-// updateButtonAvailability();
-// }
-// editedWorkingSets.put(editWorkingSet, originalWorkingSet);
- }
-
- private class ManageWorkingSetsAction extends Action {
- ManageWorkingSetsAction() {
- super(WorkbenchMessages.Edit);
- }
-
- @Override
- public void run() {
- TaskWorkingSetAction.this.run(this);
- }
- }
-
- // TODO: remove?
- protected class ToggleEnableAllSetsAction extends Action {
-
- ToggleEnableAllSetsAction() {
- super("Deselect All", IAction.AS_CHECK_BOX);
-// setImageDescriptor(TasksUiImages.TASK_WORKING_SET);
-// setChecked(!areAllTaskWorkingSetsEnabled());
- }
-
- @Override
- public void runWithEvent(Event event) {
- Set<IWorkingSet> newList = new HashSet<IWorkingSet>(Arrays.asList(TaskWorkingSetUpdater.getEnabledSets()));
-
- Set<IWorkingSet> tempList = new HashSet<IWorkingSet>();
- Iterator<IWorkingSet> iter = newList.iterator();
- while (iter.hasNext()) {
- IWorkingSet workingSet = iter.next();
- if (workingSet != null
- && workingSet.getId().equalsIgnoreCase(TaskWorkingSetUpdater.ID_TASK_WORKING_SET)) {
- tempList.add(workingSet);
- }
- }
- newList.removeAll(tempList);
-
- if (isChecked()) {
- IWorkingSet[] allWorkingSets = PlatformUI.getWorkbench().getWorkingSetManager().getWorkingSets();
- for (IWorkingSet workingSet : allWorkingSets) {
- if (workingSet != null
- && workingSet.getId().equalsIgnoreCase(TaskWorkingSetUpdater.ID_TASK_WORKING_SET)) {
- newList.add(workingSet);
- }
- }
- }
-
- PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().setWorkingSets(
- newList.toArray(new IWorkingSet[newList.size()]));
- }
-
- }
-
- class ConfigureWindowWorkingSetsDialog extends AbstractWorkingSetDialogCOPY {
-
- private final static int SIZING_SELECTION_WIDGET_HEIGHT = 200;
-
- private final static int SIZING_SELECTION_WIDGET_WIDTH = 50;
-
- private final IWorkbenchWindow window;
-
- private CheckboxTableViewer viewer;
-
- private Set<String> taskWorkingSetIds;
-
- protected ConfigureWindowWorkingSetsDialog(IWorkbenchWindow window, String[] workingSetIds) {
- super(window.getShell(), workingSetIds, true);
- setShellStyle(getShellStyle() | SWT.RESIZE);
- this.window = window;
- //setTitle(WorkbenchMessages.WorkingSetSelectionDialog_title_multiSelect);
- setTitle(TASK_WORKING_SET_TEXT_LABEL);
- setMessage(WorkbenchMessages.WorkingSetSelectionDialog_message_multiSelect);
-
- if (workingSetIds == null || workingSetIds.length == 0) {
- taskWorkingSetIds = null;
- } else {
- taskWorkingSetIds = new HashSet<String>();
- for (String id : workingSetIds) {
- taskWorkingSetIds.add(id);
- }
- }
- }
-
- @Override
- protected Control createDialogArea(Composite parent) {
- initializeDialogUnits(parent);
-
- Composite composite = (Composite) super.createDialogArea(parent);
-
- Composite viewerComposite = new Composite(composite, SWT.NONE);
- GridLayout layout = new GridLayout(2, false);
- layout.marginHeight = layout.marginWidth = 0;
- layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
- layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
- viewerComposite.setLayout(layout);
-
- GridData data = new GridData(GridData.FILL_BOTH);
- data.heightHint = SIZING_SELECTION_WIDGET_HEIGHT;
- data.widthHint = SIZING_SELECTION_WIDGET_WIDTH + 300; // fudge? I like fudge.
- viewerComposite.setLayoutData(data);
-
- viewer = CheckboxTableViewer.newCheckList(viewerComposite, SWT.BORDER);
- viewer.getControl().setLayoutData(new GridData(GridData.FILL_BOTH));
- viewer.setLabelProvider(new WorkingSetLabelProvider());
- viewer.setContentProvider(new ArrayContentProvider());
- viewer.addFilter(new WorkingSetFilter(taskWorkingSetIds));
- viewer.setInput(window.getWorkbench().getWorkingSetManager().getWorkingSets());
-
- viewer.setCheckedElements(window.getActivePage().getWorkingSets());
-
- viewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- handleSelectionChanged();
- }
- });
-
- data = new GridData(GridData.FILL_BOTH);
- data.heightHint = SIZING_SELECTION_WIDGET_HEIGHT;
- data.widthHint = SIZING_SELECTION_WIDGET_WIDTH;
-
- viewer.getControl().setLayoutData(data);
- addModifyButtons(viewerComposite);
-
- addSelectionButtons(composite);
-
- availableWorkingSetsChanged();
-
- Dialog.applyDialogFont(composite);
-
- return composite;
- }
-
- @Override
- protected void okPressed() {
- Set<IWorkingSet> newList = new HashSet<IWorkingSet>(Arrays.asList(TaskWorkingSetUpdater.getEnabledSets()));
- Set<IWorkingSet> tempList = new HashSet<IWorkingSet>();
- for (IWorkingSet workingSet : newList) {
- for (String id : taskWorkingSetIds) {
- if (workingSet.getId().equalsIgnoreCase(id)) {
- tempList.add(workingSet);
- }
- }
- }
- newList.removeAll(tempList);
-
- Object[] selection = viewer.getCheckedElements();
- IWorkingSet[] setsToEnable = new IWorkingSet[selection.length];
- System.arraycopy(selection, 0, setsToEnable, 0, selection.length);
- newList.addAll(new HashSet<IWorkingSet>(Arrays.asList(setsToEnable)));
-
- window.getActivePage().setWorkingSets(newList.toArray(new IWorkingSet[newList.size()]));
- super.okPressed();
- }
-
- @Override
- protected List<?> getSelectedWorkingSets() {
- ISelection selection = viewer.getSelection();
- if (selection instanceof IStructuredSelection) {
- return ((IStructuredSelection) selection).toList();
- }
- return null;
- }
-
- @Override
- protected void availableWorkingSetsChanged() {
- viewer.setInput(window.getWorkbench().getWorkingSetManager().getWorkingSets());
- super.availableWorkingSetsChanged();
- }
-
- /**
- * Called when the selection has changed.
- */
- void handleSelectionChanged() {
- updateButtonAvailability();
- }
-
- @Override
- protected void configureShell(Shell shell) {
- super.configureShell(shell);
- }
-
- @Override
- protected void selectAllSets() {
- viewer.setCheckedElements(window.getWorkbench().getWorkingSetManager().getWorkingSets());
- updateButtonAvailability();
- }
-
- @Override
- protected void deselectAllSets() {
- viewer.setCheckedElements(new Object[0]);
- updateButtonAvailability();
- }
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ToggleAllWorkingSetsAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ToggleAllWorkingSetsAction.java
deleted file mode 100644
index 0b9462d69..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ToggleAllWorkingSetsAction.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.mylyn.internal.tasks.ui.workingsets.TaskWorkingSetUpdater;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkingSet;
-
-/**
- * @author Mik Kersten
- */
-public class ToggleAllWorkingSetsAction extends Action {
-
- private final IWorkbenchWindow window;
-
- public ToggleAllWorkingSetsAction(IWorkbenchWindow window) {
- super("Show All", IAction.AS_CHECK_BOX);
- super.setChecked(TaskWorkingSetUpdater.areNoTaskWorkingSetsEnabled());
- this.window = window;
- }
-
- @Override
- public void run() {
- Set<IWorkingSet> newList = new HashSet<IWorkingSet>(Arrays.asList(TaskWorkingSetUpdater.getEnabledSets()));
-
- Set<IWorkingSet> tempList = new HashSet<IWorkingSet>();
- Iterator<IWorkingSet> iter = newList.iterator();
- while (iter.hasNext()) {
- IWorkingSet workingSet = iter.next();
- if (workingSet != null && workingSet.getId() != null
- && workingSet.getId().equalsIgnoreCase(TaskWorkingSetUpdater.ID_TASK_WORKING_SET)) {
- tempList.add(workingSet);
- }
- }
- newList.removeAll(tempList);
- window.getActivePage().setWorkingSets(newList.toArray(new IWorkingSet[newList.size()]));
- }
-
- @Override
- public void runWithEvent(Event event) {
- run();
- }
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ToggleTaskActivationAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ToggleTaskActivationAction.java
deleted file mode 100644
index d7cbba5a1..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ToggleTaskActivationAction.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITaskActivityListener;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-
-/**
- * @author Mik Kersten
- */
-public class ToggleTaskActivationAction extends Action implements ITaskActivityListener {
-
- public static final String ID = "org.eclipse.mylyn.tasks.ui.actions.task.activation.toggle";
-
- private static final String LABEL_ACTIVATE = "Activate Task";
-
- private static final String LABEL_DEACTIVATE = "Deactivate Task";
-
- private final ITask task;
-
- private final IToolBarManager toolBarManager;
-
- /**
- * @param task
- * cannot be null
- * @param toolBarManager
- * cannot be null
- */
- public ToggleTaskActivationAction(ITask task, IToolBarManager toolBarManager) {
- this.task = task;
- this.toolBarManager = toolBarManager;
- setId(ID);
- setImageDescriptor(TasksUiImages.CONTEXT_ACTIVE_CENTERED);
- update();
- TasksUi.getTaskActivityManager().addActivityListener(this);
- }
-
- public void dispose() {
- TasksUi.getTaskActivityManager().removeActivityListener(this);
- }
-
- private void update() {
- setChecked(task.isActive());
- if (task.isActive()) {
- setText(LABEL_DEACTIVATE);
- setToolTipText(LABEL_DEACTIVATE);
- } else {
- setText(LABEL_ACTIVATE);
- setToolTipText(LABEL_ACTIVATE);
- }
- }
-
- @Override
- public void run() {
- if (!task.isActive()) {
- TasksUi.getTaskActivityManager().activateTask(task);
- } else {
- TasksUi.getTaskActivityManager().deactivateTask(task);
- }
- update();
-// toolBarManager.add(this);
- }
-
- public void taskActivated(ITask task) {
- update();
- toolBarManager.update(true);
- }
-
- public void taskDeactivated(ITask task) {
- update();
- toolBarManager.update(true);
- }
-
- public void preTaskActivated(ITask task) {
- // ignore
- }
-
- public void preTaskDeactivated(ITask task) {
- // ignore
- }
-
- public void activityReset() {
- // ignore
- }
-
- public void elapsedTimeUpdated(ITask task, long newElapsedTime) {
- // ignore
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ToggleWorkingSetAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ToggleWorkingSetAction.java
deleted file mode 100644
index 75b7cfe8d..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ToggleWorkingSetAction.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.actions;
-
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.bindings.keys.IKeyLookup;
-import org.eclipse.jface.bindings.keys.KeyLookupFactory;
-import org.eclipse.mylyn.internal.tasks.ui.workingsets.TaskWorkingSetUpdater;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.ui.IWorkingSet;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Mik Kersten
- */
-public class ToggleWorkingSetAction extends Action {
-
- private final IWorkingSet workingSet;
-
- public ToggleWorkingSetAction(IWorkingSet set) {
- super(set.getLabel(), IAction.AS_CHECK_BOX);
- setImageDescriptor(set.getImageDescriptor());
- this.workingSet = set;
- setChecked(TaskWorkingSetUpdater.isWorkingSetEnabled(set));
- }
-
- @Override
- public void run() {
- runWithEvent(null);
- }
-
- @Override
- public void runWithEvent(Event event) {
- Set<IWorkingSet> newList = new HashSet<IWorkingSet>(Arrays.asList(TaskWorkingSetUpdater.getEnabledSets()));
-
- boolean modified = false;
- if (event != null) {
- modified = (event.stateMask & KeyLookupFactory.getDefault().formalModifierLookup(IKeyLookup.M1_NAME)) != 0;
- }
-
- if (!modified) {
- // Default behavior is to act as a radio button.
- Set<IWorkingSet> tempList = new HashSet<IWorkingSet>();
- Iterator<IWorkingSet> iter = newList.iterator();
- while (iter.hasNext()) {
- IWorkingSet workingSet = iter.next();
- if (workingSet != null && workingSet.getId() != null
- && workingSet.getId().equalsIgnoreCase(TaskWorkingSetUpdater.ID_TASK_WORKING_SET)) {
- tempList.add(workingSet);
- }
- }
- newList.removeAll(tempList);
-
- if (isChecked()) {
- newList.add(workingSet);
- } else {
- // If multiples were previously selected, make this action active
- if (!TaskWorkingSetUpdater.isOnlyTaskWorkingSetEnabled(workingSet)) {
- newList.add(workingSet);
- }
- }
- } else {
- // If modifier key is pressed, de/selections are additive.
- if (isChecked()) {
- newList.add(workingSet);
- } else {
- newList.remove(workingSet);
- }
- }
-
- PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().setWorkingSets(
- newList.toArray(new IWorkingSet[newList.size()]));
- }
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/AbstractTaskHandler.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/AbstractTaskHandler.java
deleted file mode 100644
index 955d35e98..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/AbstractTaskHandler.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.commands;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-/**
- * @author Steffen Pingel
- */
-public abstract class AbstractTaskHandler extends AbstractHandler {
-
- public Object execute(ExecutionEvent event) throws ExecutionException {
- ISelection selection = HandlerUtil.getCurrentSelection(event);
- if (selection instanceof IStructuredSelection) {
- Object[] items = ((IStructuredSelection) selection).toArray();
- for (Object item : items) {
- if (item instanceof ITask) {
- execute(event, (ITask) item);
- }
- }
- }
- return null;
- }
-
- protected void execute(ExecutionEvent event, ITask task) throws ExecutionException {
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/AbstractTaskListViewHandler.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/AbstractTaskListViewHandler.java
deleted file mode 100644
index 378ceb3a1..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/AbstractTaskListViewHandler.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.commands;
-
-import java.util.Iterator;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.jface.viewers.ITreeSelection;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-import org.eclipse.ui.IViewSite;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchSite;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-/**
- * @author Steffen Pingel
- */
-public abstract class AbstractTaskListViewHandler extends AbstractHandler {
-
- public Object execute(ExecutionEvent event) throws ExecutionException {
- IWorkbenchSite site = HandlerUtil.getActiveSite(event);
- if (site instanceof IViewSite) {
- IViewSite viewSite = (IViewSite) site;
- IWorkbenchPart part = viewSite.getPart();
- if (part instanceof TaskListView) {
- TaskListView taskListView = (TaskListView) part;
- execute(event, taskListView);
- }
- }
- return null;
- }
-
- protected void execute(ExecutionEvent event, TaskListView taskListView) throws ExecutionException {
- ITreeSelection selection = (ITreeSelection) taskListView.getViewer().getSelection();
- for (Iterator<?> it = selection.iterator(); it.hasNext();) {
- Object item = it.next();
- if (item instanceof IRepositoryElement) {
- execute(event, taskListView, (IRepositoryElement) item);
- }
- }
- }
-
- protected void execute(ExecutionEvent event, TaskListView taskListView, IRepositoryElement item)
- throws ExecutionException {
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/AddTaskRepositoryHandler.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/AddTaskRepositoryHandler.java
deleted file mode 100644
index 2b66232b0..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/AddTaskRepositoryHandler.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.commands;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.jface.window.Window;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.NewRepositoryWizard;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-/**
- * Displays a wizard dialog for adding a new task repository.
- *
- * @author Willian Mitsuda
- * @author Steffen Pingel
- */
-public class AddTaskRepositoryHandler extends AbstractHandler {
-
- public Object execute(ExecutionEvent event) throws ExecutionException {
- Shell shell = HandlerUtil.getActiveShell(event);
- if (shell != null && !shell.isDisposed()) {
- String param = event.getParameter("org.eclipse.mylyn.tasks.command.taskRepositoryId");
- NewRepositoryWizard repositoryWizard = new NewRepositoryWizard(param);
-
- WizardDialog repositoryDialog = new WizardDialog(shell, repositoryWizard);
- repositoryDialog.create();
- repositoryDialog.getShell().setText("Add Task Repository");
- repositoryDialog.setBlockOnOpen(true);
- repositoryDialog.open();
- if (repositoryDialog.getReturnCode() == Window.OK) {
- return repositoryWizard.getTaskRepository();
- }
- }
-
- return null;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/GoToUnreadTaskHandler.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/GoToUnreadTaskHandler.java
deleted file mode 100644
index 80d782b30..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/GoToUnreadTaskHandler.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.commands;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.jface.viewers.TreePath;
-import org.eclipse.jface.viewers.TreeSelection;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.mylyn.internal.commons.ui.TreeWalker;
-import org.eclipse.mylyn.internal.commons.ui.TreeWalker.Direction;
-import org.eclipse.mylyn.internal.commons.ui.TreeWalker.TreeVisitor;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITask.SynchronizationState;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeItem;
-
-/**
- * @author Steffen Pingel
- */
-public abstract class GoToUnreadTaskHandler extends AbstractTaskListViewHandler {
-
- public static final String ID_NEXT = "org.eclipse.mylyn.tasklist.actions.goToNextUnread";
-
- public static final String ID_PREVIOUS = "org.eclipse.mylyn.tasklist.actions.goToPreviousUnread";
-
- private Direction direction = Direction.DOWN;
-
- public Direction getDirection() {
- return direction;
- }
-
- private TreePath getUnreadItem(TreeViewer treeViewer, Tree tree) {
- TreeItem[] selection = tree.getSelection();
- TreeItem selectedItem = (selection.length > 0) ? selection[0] : null;
-
- TreeVisitor visitor = new TreeVisitor() {
- @Override
- public boolean visit(Object object) {
- if (object instanceof ITask) {
- ITask task = (ITask) object;
- if (task.getSynchronizationState() == SynchronizationState.INCOMING) {
- return true;
- }
- }
- return false;
- }
- };
-
- TreeWalker treeWalker = new TreeWalker(treeViewer);
- treeWalker.setDirection(direction);
- treeWalker.setExpandNodes(true);
- return treeWalker.walk(visitor, selectedItem);
- }
-
- @Override
- protected void execute(ExecutionEvent event, TaskListView taskListView, IRepositoryElement item) {
- TreeViewer treeViewer = taskListView.getViewer();
- Tree tree = treeViewer.getTree();
-
- // need to expand nodes to traverse the tree, disable redraw to avoid flickering
- TreePath treePath = null;
- try {
- tree.setRedraw(false);
- treePath = getUnreadItem(treeViewer, tree);
- } finally {
- tree.setRedraw(true);
- }
-
- if (treePath != null) {
- treeViewer.expandToLevel(treePath, 0);
- treeViewer.setSelection(new TreeSelection(treePath), true);
- }
- }
-
- public void setDirection(Direction direction) {
- this.direction = direction;
- }
-
- public static void execute(ExecutionEvent event, Direction direction) throws ExecutionException {
- GoToUnreadTaskHandler handler = new GoToUnreadTaskHandler() {
- };
- handler.setDirection(direction);
- handler.execute(event);
- }
-
- public static class GoToNextUnreadTaskHandler extends GoToUnreadTaskHandler {
-
- public GoToNextUnreadTaskHandler() {
- setDirection(Direction.DOWN);
- }
-
- }
-
- public static class GoToPreviousUnreadTaskHandler extends GoToUnreadTaskHandler {
-
- public GoToPreviousUnreadTaskHandler() {
- setDirection(Direction.UP);
- }
-
- }
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/MarkTaskHandler.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/MarkTaskHandler.java
deleted file mode 100644
index 630e195f3..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/MarkTaskHandler.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.commands;
-
-import java.util.Date;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.mylyn.internal.commons.ui.TreeWalker.Direction;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-import org.eclipse.mylyn.tasks.core.ITask;
-
-/**
- * @author Steffen Pingel
- */
-public abstract class MarkTaskHandler extends AbstractTaskHandler {
-
- public static class MarkTaskCompleteHandler extends AbstractTaskHandler {
- @Override
- protected void execute(ExecutionEvent event, ITask task) throws ExecutionException {
- if (TasksUiInternal.hasLocalCompletionState(task)) {
- task.setCompletionDate(new Date());
- TasksUiPlugin.getTaskList().notifyElementChanged(task);
- }
- }
- }
-
- public static class MarkTaskIncompleteHandler extends AbstractTaskHandler {
- @Override
- protected void execute(ExecutionEvent event, ITask task) throws ExecutionException {
- if (TasksUiInternal.hasLocalCompletionState(task)) {
- task.setCompletionDate(null);
- TasksUiPlugin.getTaskList().notifyElementChanged(task);
- }
- }
- }
-
- public static class MarkTaskReadHandler extends AbstractTaskHandler {
- @Override
- protected void execute(ExecutionEvent event, ITask task) throws ExecutionException {
- TasksUiPlugin.getTaskDataManager().setTaskRead(task, true);
- }
- }
-
- public static class MarkTaskUnreadHandler extends AbstractTaskHandler {
- @Override
- protected void execute(ExecutionEvent event, ITask task) throws ExecutionException {
- TasksUiPlugin.getTaskDataManager().setTaskRead(task, false);
- }
- }
-
- public static class MarkTaskReadGoToNextUnreadTaskHandler extends AbstractTaskListViewHandler {
- @Override
- protected void execute(ExecutionEvent event, TaskListView taskListView, IRepositoryElement item)
- throws ExecutionException {
- if (item instanceof ITask) {
- ITask task = (ITask) item;
- TasksUiPlugin.getTaskDataManager().setTaskRead(task, true);
- GoToUnreadTaskHandler.execute(event, Direction.DOWN);
- }
- }
- }
-
- public static class MarkTaskReadGoToPreviousUnreadTaskHandler extends AbstractTaskListViewHandler {
- @Override
- protected void execute(ExecutionEvent event, TaskListView taskListView, IRepositoryElement item)
- throws ExecutionException {
- if (item instanceof ITask) {
- ITask task = (ITask) item;
- TasksUiPlugin.getTaskDataManager().setTaskRead(task, true);
- GoToUnreadTaskHandler.execute(event, Direction.UP);
- }
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/NewLocalTaskHandler.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/NewLocalTaskHandler.java
deleted file mode 100644
index e4fc32273..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/NewLocalTaskHandler.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.commands;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.mylyn.internal.tasks.ui.actions.NewTaskAction;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.ui.IViewSite;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchSite;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-/**
- * @author Steffen Pingel
- */
-public class NewLocalTaskHandler extends AbstractHandler {
-
- public Object execute(ExecutionEvent event) throws ExecutionException {
- IWorkbenchSite site = HandlerUtil.getActiveSite(event);
- if (site instanceof IViewSite) {
- IViewSite viewSite = (IViewSite) site;
- IWorkbenchPart part = viewSite.getPart();
- if (part instanceof TaskListView) {
- TaskListView taskListView = (TaskListView) part;
- NewTaskAction action = new NewTaskAction();
- try {
- action.setInitializationData(null, null, "local");
- } catch (CoreException e) {
- throw new ExecutionException("Could not create local task", e);
- }
- action.selectionChanged(action, taskListView.getViewer().getSelection());
- if (action.isEnabled()) {
- action.run();
- }
- }
- }
- return null;
- }
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/NewSubTaskHandler.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/NewSubTaskHandler.java
deleted file mode 100644
index 0ebc7d855..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/NewSubTaskHandler.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.commands;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.mylyn.internal.tasks.ui.actions.NewSubTaskAction;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.ui.IViewSite;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchSite;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-/**
- * @author Shawn Minto
- */
-public class NewSubTaskHandler extends AbstractHandler {
-
- public Object execute(ExecutionEvent event) throws ExecutionException {
- IWorkbenchSite site = HandlerUtil.getActiveSite(event);
- if (site instanceof IViewSite) {
- IViewSite viewSite = (IViewSite) site;
- IWorkbenchPart part = viewSite.getPart();
- if (part instanceof TaskListView) {
- TaskListView taskListView = (TaskListView) part;
- NewSubTaskAction action = new NewSubTaskAction();
- action.selectionChanged(action, taskListView.getViewer().getSelection());
- if (action.isEnabled()) {
- action.run();
- }
- return null;
- }
- }
- return null;
- }
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/OpenSelectedTaskHandler.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/OpenSelectedTaskHandler.java
deleted file mode 100644
index 856ffd369..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/OpenSelectedTaskHandler.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.commands;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-import org.eclipse.mylyn.tasks.core.ITask;
-
-/**
- * @author Steffen Pingel
- */
-public class OpenSelectedTaskHandler extends AbstractTaskListViewHandler {
-
- @Override
- protected void execute(ExecutionEvent event, TaskListView taskListView, IRepositoryElement item) {
- if (item instanceof ITask) {
- TasksUiInternal.openTaskInBackground((AbstractTask) item, true);
- }
- }
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/OpenTaskAttachmentInBrowserHandler.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/OpenTaskAttachmentInBrowserHandler.java
deleted file mode 100644
index 2b516f170..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/OpenTaskAttachmentInBrowserHandler.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.commands;
-
-import java.util.List;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.mylyn.tasks.core.ITaskAttachment;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-/**
- * @author Steffen Pingel
- */
-public class OpenTaskAttachmentInBrowserHandler extends AbstractHandler {
-
- public Object execute(ExecutionEvent event) throws ExecutionException {
- ISelection selection = HandlerUtil.getCurrentSelection(event);
- if (selection instanceof IStructuredSelection) {
- List<?> items = ((IStructuredSelection) selection).toList();
- for (Object item : items) {
- if (item instanceof ITaskAttachment) {
- TasksUiUtil.openUrl(((ITaskAttachment) item).getUrl());
- }
- }
- }
- return null;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/OpenTaskAttachmentInDefaultEditorHandler.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/OpenTaskAttachmentInDefaultEditorHandler.java
deleted file mode 100644
index 6da179126..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/OpenTaskAttachmentInDefaultEditorHandler.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.commands;
-
-import java.util.List;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.editors.TaskAttachmentEditorInput;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.core.ITaskAttachment;
-import org.eclipse.ui.IEditorDescriptor;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-/**
- * @author Steffen Pingel
- */
-public class OpenTaskAttachmentInDefaultEditorHandler extends AbstractHandler {
-
- public Object execute(ExecutionEvent event) throws ExecutionException {
- IWorkbenchPage page = null;
- ISelection selection = HandlerUtil.getCurrentSelection(event);
- if (selection instanceof IStructuredSelection) {
- List<?> items = ((IStructuredSelection) selection).toList();
- for (Object item : items) {
- if (item instanceof ITaskAttachment) {
- if (page == null) {
- IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event);
- page = window.getActivePage();
- if (page == null) {
- throw new ExecutionException("No active workbench page");
- }
- }
- openAttachment(page, (ITaskAttachment) item);
- }
- }
- }
- return null;
- }
-
- private void openAttachment(IWorkbenchPage page, ITaskAttachment attachment) throws ExecutionException {
- TaskAttachmentEditorInput input = new TaskAttachmentEditorInput(attachment);
- IEditorDescriptor description = PlatformUI.getWorkbench().getEditorRegistry().getDefaultEditor(input.getName());
- if (description == null) {
- TasksUiInternal.displayStatus("Open Attachment Failed", new Status(IStatus.WARNING,
- TasksUiPlugin.ID_PLUGIN, "No default editor for \"" + input.getName() + "\" found"));
- } else {
- try {
- page.openEditor(input, description.getId());
- } catch (PartInitException e) {
- throw new ExecutionException("Failed to open editor", e);
- }
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/OpenTaskListElementPropertiesHandler.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/OpenTaskListElementPropertiesHandler.java
deleted file mode 100644
index 055d16068..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/OpenTaskListElementPropertiesHandler.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.commands;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.mylyn.internal.tasks.core.TaskCategory;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-
-/**
- * @author Steffen Pingel
- */
-public class OpenTaskListElementPropertiesHandler extends AbstractTaskListViewHandler {
-
- @Override
- protected void execute(ExecutionEvent event, TaskListView taskListView, IRepositoryElement item) {
- if (item instanceof TaskCategory || item instanceof IRepositoryQuery) {
- TasksUiInternal.refreshAndOpenTaskListElement(item);
- }
- }
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/RemoteTaskSelectionDialog.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/RemoteTaskSelectionDialog.java
deleted file mode 100644
index 096d3f5ec..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/RemoteTaskSelectionDialog.java
+++ /dev/null
@@ -1,329 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.commands;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.commands.common.CommandException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.jface.layout.GridLayoutFactory;
-import org.eclipse.jface.viewers.ArrayContentProvider;
-import org.eclipse.jface.viewers.ComboViewer;
-import org.eclipse.jface.viewers.DecoratingLabelProvider;
-import org.eclipse.jface.viewers.IOpenListener;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.OpenEvent;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTaskCategory;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.ITaskRepositoryFilter;
-import org.eclipse.mylyn.internal.tasks.core.TaskList;
-import org.eclipse.mylyn.internal.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.internal.tasks.ui.ITaskCommandIds;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskRepositoryLabelProvider;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TaskElementLabelProvider;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.SelectionStatusDialog;
-import org.eclipse.ui.handlers.IHandlerService;
-
-/**
- * @author Willian Mitsuda
- */
-public class RemoteTaskSelectionDialog extends SelectionStatusDialog {
-
- public RemoteTaskSelectionDialog(Shell parent) {
- super(parent);
- setShellStyle(getShellStyle() | SWT.RESIZE);
- setStatusLineAboveButtons(true);
- }
-
- private Text idText;
-
- private TableViewer tasksViewer;
-
- private ComboViewer repositoriesViewer;
-
- private Button addToTaskListCheck;
-
- private ComboViewer categoryViewer;
-
- // TODO: copy'n pasted code; make API?
- private List<TaskRepository> getTaskRepositories() {
- List<TaskRepository> repositories = new ArrayList<TaskRepository>();
- TaskRepositoryManager repositoryManager = TasksUiPlugin.getRepositoryManager();
- for (AbstractRepositoryConnector connector : repositoryManager.getRepositoryConnectors()) {
- Set<TaskRepository> connectorRepositories = repositoryManager.getRepositories(connector.getConnectorKind());
- for (TaskRepository repository : connectorRepositories) {
- if (ITaskRepositoryFilter.CAN_CREATE_TASK_FROM_KEY.accept(repository, connector)) {
- repositories.add(repository);
- }
- }
- }
- return repositories;
- }
-
- @Override
- protected Control createDialogArea(Composite parent) {
- Composite area = (Composite) super.createDialogArea(parent);
-
- Label idLabel = new Label(area, SWT.NULL);
- idLabel.setText("Enter Key/&ID (use comma for multiple): ");
- idText = new Text(area, SWT.BORDER);
- idText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
-
- Label matchingTasksLabel = new Label(area, SWT.NONE);
- matchingTasksLabel.setText("&Matching tasks:");
- tasksViewer = new TableViewer(area, SWT.SINGLE | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
- tasksViewer.getControl().setLayoutData(GridDataFactory.fillDefaults().grab(true, true).hint(400, 200).create());
- tasksViewer.setLabelProvider(new DecoratingLabelProvider(new TaskElementLabelProvider(true),
- PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator()));
- tasksViewer.setContentProvider(new ArrayContentProvider());
- tasksViewer.addFilter(new ViewerFilter() {
-
- @Override
- public boolean select(Viewer viewer, Object parentElement, Object element) {
- if (selectedIds == null) {
- return false;
- }
-
- // Only shows exact task matches
- if (!(element instanceof ITask)) {
- return false;
- }
- ITask task = (ITask) element;
- String taskId = task.getTaskKey();
- for (String id : selectedIds) {
- if (id.equals(taskId)) {
- return true;
- }
- }
- return false;
- }
-
- });
- tasksViewer.setInput(TasksUiPlugin.getTaskList().getAllTasks());
- idText.addModifyListener(new ModifyListener() {
-
- public void modifyText(ModifyEvent e) {
- computeIds();
- validate();
- tasksViewer.refresh(false);
- }
-
- });
- tasksViewer.addSelectionChangedListener(new ISelectionChangedListener() {
-
- public void selectionChanged(SelectionChangedEvent event) {
- validate();
- }
-
- });
- tasksViewer.addOpenListener(new IOpenListener() {
-
- public void open(OpenEvent event) {
- if (getOkButton().getEnabled()) {
- okPressed();
- }
- }
-
- });
- Table table = tasksViewer.getTable();
- table.showSelection();
-
- Composite repositoriesComposite = new Composite(area, SWT.NONE);
- repositoriesComposite.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create());
- repositoriesComposite.setLayout(GridLayoutFactory.fillDefaults().numColumns(3).create());
-
- Label repositoriesLabel = new Label(repositoriesComposite, SWT.NONE);
- repositoriesLabel.setText("&Select a task repository:");
-
- repositoriesViewer = new ComboViewer(repositoriesComposite, SWT.DROP_DOWN | SWT.READ_ONLY);
- repositoriesViewer.setLabelProvider(new TaskRepositoryLabelProvider());
- repositoriesViewer.setContentProvider(new ArrayContentProvider());
- repositoriesViewer.setInput(getTaskRepositories());
- TaskRepository currentRepository = TasksUiUtil.getSelectedRepository(null);
- if (currentRepository != null) {
- repositoriesViewer.setSelection(new StructuredSelection(currentRepository), true);
- }
- repositoriesViewer.getControl().setLayoutData(GridDataFactory.fillDefaults().grab(true, false).create());
- repositoriesViewer.addSelectionChangedListener(new ISelectionChangedListener() {
-
- public void selectionChanged(SelectionChangedEvent event) {
- tasksViewer.setSelection(StructuredSelection.EMPTY);
- validate();
- }
-
- });
-
- Button addRepositoryButton = new Button(repositoriesComposite, SWT.NONE);
- addRepositoryButton.setText("&Add...");
- addRepositoryButton.setEnabled(TasksUiPlugin.getRepositoryManager().hasUserManagedRepositoryConnectors());
- addRepositoryButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent event) {
- IHandlerService hndSvc = (IHandlerService) PlatformUI.getWorkbench().getService(IHandlerService.class);
- try {
- hndSvc.executeCommand(ITaskCommandIds.ADD_TASK_REPOSITORY, null);
- repositoriesViewer.setInput(getTaskRepositories());
- } catch (CommandException e) {
- StatusHandler.fail(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, e.getMessage(), e));
- }
- }
- });
-
- Composite addToTaskListComposite = new Composite(area, SWT.NONE);
- addToTaskListComposite.setLayout(GridLayoutFactory.fillDefaults().numColumns(2).create());
-
- addToTaskListCheck = new Button(addToTaskListComposite, SWT.CHECK);
- addToTaskListCheck.setText("Add to Task &List category:");
-
- categoryViewer = new ComboViewer(addToTaskListComposite, SWT.DROP_DOWN | SWT.READ_ONLY);
- categoryViewer.setContentProvider(new ArrayContentProvider());
- TaskList taskList = TasksUiPlugin.getTaskList();
- LinkedList<AbstractTaskContainer> categories = new LinkedList<AbstractTaskContainer>(taskList.getCategories());
- categories.addFirst(taskList.getDefaultCategory());
- categoryViewer.setInput(categories);
- categoryViewer.setLabelProvider(new LabelProvider() {
-
- @Override
- public String getText(Object element) {
- if (element instanceof IRepositoryElement) {
- return ((IRepositoryElement) element).getSummary();
- }
- return super.getText(element);
- }
-
- });
- categoryViewer.setSelection(new StructuredSelection(taskList.getDefaultCategory()));
-
- categoryViewer.getControl().setEnabled(addToTaskListCheck.getSelection());
- addToTaskListCheck.addSelectionListener(new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- categoryViewer.getControl().setEnabled(addToTaskListCheck.getSelection());
- }
-
- });
-
- idText.addKeyListener(new KeyAdapter() {
-
- @Override
- public void keyPressed(KeyEvent e) {
- if (e.keyCode == SWT.ARROW_DOWN) {
- tasksViewer.getControl().setFocus();
- }
- }
-
- });
-
- return area;
- }
-
- private void validate() {
- if (idText.getText().trim().equals("")) {
- updateStatus(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, 0, "Enter a valid task ID", null));
- return;
- }
- if (tasksViewer.getSelection().isEmpty() && repositoriesViewer.getSelection().isEmpty()) {
- updateStatus(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, 0, "Select a task or repository", null));
- return;
- }
- updateStatus(new Status(IStatus.OK, TasksUiPlugin.ID_PLUGIN, 0, "", null));
- }
-
- private String[] selectedIds;
-
- private TaskRepository selectedRepository;
-
- private AbstractTask selectedTask;
-
- private boolean shouldAddToTaskList;
-
- private AbstractTaskCategory selectedCategory;
-
- public String[] getSelectedIds() {
- return selectedIds;
- }
-
- public TaskRepository getSelectedTaskRepository() {
- return selectedRepository;
- }
-
- public AbstractTask getSelectedTask() {
- return selectedTask;
- }
-
- public boolean shouldAddToTaskList() {
- return shouldAddToTaskList;
- }
-
- public AbstractTaskCategory getSelectedCategory() {
- return selectedCategory;
- }
-
- @Override
- protected void computeResult() {
- computeIds();
-
- ISelection taskSelection = tasksViewer.getSelection();
- if (!taskSelection.isEmpty()) {
- selectedTask = (AbstractTask) ((IStructuredSelection) taskSelection).getFirstElement();
- } else {
- selectedRepository = (TaskRepository) ((IStructuredSelection) repositoriesViewer.getSelection()).getFirstElement();
- }
- shouldAddToTaskList = addToTaskListCheck.getSelection();
- if (shouldAddToTaskList) {
- selectedCategory = (AbstractTaskCategory) ((IStructuredSelection) categoryViewer.getSelection()).getFirstElement();
- }
- }
-
- private void computeIds() {
- selectedIds = idText.getText().split(",");
- for (String id : selectedIds) {
- id = id.trim();
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/TaskListToolTipHandler.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/TaskListToolTipHandler.java
deleted file mode 100644
index bb05d1a6b..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/TaskListToolTipHandler.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.commands;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListToolTip;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeItem;
-
-/**
- * @author Steffen Pingel
- */
-public class TaskListToolTipHandler extends AbstractTaskListViewHandler {
-
- @Override
- protected void execute(ExecutionEvent event, TaskListView taskListView) throws ExecutionException {
- TaskListToolTip toolTip = taskListView.getToolTip();
- if (toolTip.isVisible()) {
- toolTip.hide();
- } else {
- taskListView.getViewer().getControl().getBounds();
- Tree tree = taskListView.getViewer().getTree();
- TreeItem[] selection = tree.getSelection();
- if (selection.length > 0) {
- toolTip.show(new Point(selection[0].getBounds().x, selection[0].getBounds().y));
- }
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/TaskRepositoryParameterValues.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/TaskRepositoryParameterValues.java
deleted file mode 100644
index 95189a024..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/TaskRepositoryParameterValues.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.commands;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.commands.IParameterValues;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-
-/**
- * Compute repository connectors type/label map
- *
- * @author Willian Mitsuda
- */
-public class TaskRepositoryParameterValues implements IParameterValues {
-
- public Map<String, String> getParameterValues() {
- Collection<AbstractRepositoryConnector> connectors = TasksUi.getRepositoryManager().getRepositoryConnectors();
- Map<String, String> values = new HashMap<String, String>();
- for (AbstractRepositoryConnector connector : connectors) {
- values.put(connector.getConnectorKind(), connector.getLabel());
- }
- return values;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/deprecated/AbstractNewRepositoryTaskEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/deprecated/AbstractNewRepositoryTaskEditor.java
deleted file mode 100644
index 59a575075..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/deprecated/AbstractNewRepositoryTaskEditor.java
+++ /dev/null
@@ -1,535 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.ui.deprecated;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTaskCategory;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.DateRange;
-import org.eclipse.mylyn.internal.tasks.core.ITaskList;
-import org.eclipse.mylyn.internal.tasks.core.TaskCategory;
-import org.eclipse.mylyn.internal.tasks.ui.ScheduleDatePicker;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.editors.RepositoryTaskOutlineNode;
-import org.eclipse.mylyn.internal.tasks.ui.editors.RepositoryTaskSelection;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditorInput;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CCombo;
-import org.eclipse.swt.custom.VerifyKeyListener;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.VerifyEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Spinner;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.forms.editor.FormEditor;
-import org.eclipse.ui.forms.events.HyperlinkAdapter;
-import org.eclipse.ui.forms.events.HyperlinkEvent;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-import org.eclipse.ui.forms.widgets.ImageHyperlink;
-import org.eclipse.ui.forms.widgets.Section;
-
-/**
- * An editor used to view a locally created bug that does not yet exist on a server.
- *
- * @author Rob Elves (modifications)
- * @since 2.0
- * @deprecated use {@link TaskEditorInput} instead
- */
-@Deprecated
-public abstract class AbstractNewRepositoryTaskEditor extends AbstractRepositoryTaskEditor {
-
- private static final int DESCRIPTION_WIDTH = 79 * 7; // 500;
-
- private static final int DESCRIPTION_HEIGHT = 10 * 14;
-
- private static final int DEFAULT_FIELD_WIDTH = 150;
-
- private static final int DEFAULT_ESTIMATED_TIME = 1;
-
- private static final String LABEL_SUMBIT = "Submit";
-
- private static final String ERROR_CREATING_BUG_REPORT = "Error creating bug report";
-
- protected ScheduleDatePicker scheduledForDate;
-
- protected Spinner estimatedTime;
-
- @Deprecated
- protected String newSummary = "";
-
- protected Button addToCategory;
-
- protected CCombo categoryChooser;
-
- /**
- * @author Raphael Ackermann (bug 195514)
- */
- protected class TabVerifyKeyListener implements VerifyKeyListener {
-
- public void verifyKey(VerifyEvent event) {
- // if there is a tab key, do not "execute" it and instead select the Attributes section
- if (event.keyCode == SWT.TAB) {
- event.doit = false;
- focusAttributes();
- }
- }
- }
-
- public AbstractNewRepositoryTaskEditor(FormEditor editor) {
- super(editor);
- }
-
- @Override
- public void init(IEditorSite site, IEditorInput input) {
- if (!(input instanceof NewTaskEditorInput)) {
- return;
- }
-
- initTaskEditor(site, (RepositoryTaskEditorInput) input);
-
- setTaskOutlineModel(RepositoryTaskOutlineNode.parseBugReport(taskData, false));
- newSummary = taskData.getSummary();
- }
-
- @Override
- protected void createDescriptionLayout(Composite composite) {
- FormToolkit toolkit = this.getManagedForm().getToolkit();
- Section section = toolkit.createSection(composite, ExpandableComposite.TITLE_BAR);
- section.setText(getSectionLabel(SECTION_NAME.DESCRIPTION_SECTION));
- section.setExpanded(true);
- section.setLayout(new GridLayout());
- section.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- Composite descriptionComposite = toolkit.createComposite(section);
- GridLayout descriptionLayout = new GridLayout();
-
- descriptionComposite.setLayout(descriptionLayout);
- GridData descriptionData = new GridData(GridData.FILL_BOTH);
- descriptionData.grabExcessVerticalSpace = true;
- descriptionComposite.setLayoutData(descriptionData);
- section.setClient(descriptionComposite);
-
- descriptionTextViewer = addTextEditor(repository, descriptionComposite, taskData.getDescription(), true,
- SWT.FLAT | SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
- descriptionTextViewer.setEditable(true);
- GridData gd = new GridData(GridData.FILL_BOTH);
- gd.widthHint = DESCRIPTION_WIDTH;
- gd.minimumHeight = DESCRIPTION_HEIGHT;
- gd.grabExcessHorizontalSpace = true;
- gd.grabExcessVerticalSpace = true;
- descriptionTextViewer.getControl().setLayoutData(gd);
- descriptionTextViewer.getControl().setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
-
- addDuplicateDetection(descriptionComposite);
-
- toolkit.paintBordersFor(descriptionComposite);
- }
-
- /**
- * @author Raphael Ackermann (modifications) (bug 195514)
- * @param composite
- */
- @Override
- protected void createSummaryLayout(Composite composite) {
- addSummaryText(composite);
- if (summaryTextViewer != null) {
- summaryTextViewer.prependVerifyKeyListener(new TabVerifyKeyListener());
- // TODO: Eliminate this and newSummary field when api can be changed
- summaryTextViewer.getTextWidget().addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- String sel = summaryText.getText();
- if (!(newSummary.equals(sel))) {
- newSummary = sel;
- }
- }
- });
- }
- }
-
- @Override
- protected void createAttachmentLayout(Composite comp) {
- // currently can't attach while creating new bug
- }
-
- @Override
- protected void createCommentLayout(Composite comp) {
- // ignore
- }
-
- @Override
- protected void createNewCommentLayout(Composite comp) {
- createPlanningLayout(comp);
- }
-
- protected void createPlanningLayout(Composite comp) {
- Section section = createSection(comp, "Personal Planning");
- section.setLayout(new GridLayout());
- section.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- section.setExpanded(true);
-
- Composite sectionClient = getManagedForm().getToolkit().createComposite(section);
- section.setClient(sectionClient);
- GridLayout layout = new GridLayout();
- layout.numColumns = 7;
- layout.makeColumnsEqualWidth = false;
- sectionClient.setLayout(layout);
- GridData clientDataLayout = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- sectionClient.setLayoutData(clientDataLayout);
-
- // Scheduled date
- getManagedForm().getToolkit().createLabel(sectionClient, "Scheduled for:");
- // label.setForeground(toolkit.getColors().getColor(FormColors.TITLE));
- scheduledForDate = new ScheduleDatePicker(sectionClient, null, SWT.FLAT);
- scheduledForDate.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
- scheduledForDate.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
-// Calendar newTaskSchedule = TaskActivityUtil.getCalendar();
-// int scheduledEndHour = TasksUiPlugin.getDefault().getPreferenceStore().getInt(
-// TasksUiPreferenceConstants.PLANNING_ENDHOUR);
- // If past scheduledEndHour set for following day
-// if (newTaskSchedule.get(Calendar.HOUR_OF_DAY) >= scheduledEndHour) {
-// TaskActivityUtil.snapForwardNumDays(newTaskSchedule, 1);
-// } else {
-// TaskActivityUtil.snapEndOfWorkDay(newTaskSchedule);
-// }
-// scheduledForDate.setDate(newTaskSchedule);
-// Button removeReminder = getManagedForm().getToolkit().createButton(sectionClient, "Clear",
-// SWT.PUSH | SWT.CENTER);
-// removeReminder.addSelectionListener(new SelectionAdapter() {
-// @Override
-// public void widgetSelected(SelectionEvent e) {
-// scheduledForDate.setDate(null);
-// }
-// });
-
- ImageHyperlink clearReminder = getManagedForm().getToolkit().createImageHyperlink(sectionClient, SWT.NONE);
- clearReminder.setImage(CommonImages.getImage(CommonImages.REMOVE));
- clearReminder.setToolTipText("Clear");
- clearReminder.addHyperlinkListener(new HyperlinkAdapter() {
- @Override
- public void linkActivated(HyperlinkEvent e) {
- scheduledForDate.setScheduledDate(null);
- }
- });
-
- // 1 Blank column after Reminder clear button
- Label dummy = getManagedForm().getToolkit().createLabel(sectionClient, "");
- GridData dummyLabelDataLayout = new GridData(GridData.HORIZONTAL_ALIGN_CENTER);
- dummyLabelDataLayout.horizontalSpan = 1;
- dummyLabelDataLayout.widthHint = 30;
- dummy.setLayoutData(dummyLabelDataLayout);
-
- // Estimated time
- getManagedForm().getToolkit().createLabel(sectionClient, "Estimated hours:");
- // label.setForeground(toolkit.getColors().getColor(FormColors.TITLE));
- // estimatedTime = new Spinner(sectionClient, SWT.FLAT);
- estimatedTime = new Spinner(sectionClient, SWT.FLAT);
- estimatedTime.setDigits(0);
- estimatedTime.setMaximum(100);
- estimatedTime.setMinimum(0);
- estimatedTime.setIncrement(1);
- estimatedTime.setSelection(DEFAULT_ESTIMATED_TIME);
- estimatedTime.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
- GridData estimatedDataLayout = new GridData();
- estimatedDataLayout.widthHint = 30;
- estimatedTime.setLayoutData(estimatedDataLayout);
- // getManagedForm().getToolkit().createLabel(sectionClient, "hours ");
- // label.setForeground(toolkit.getColors().getColor(FormColors.TITLE));
-
- ImageHyperlink clearEstimated = getManagedForm().getToolkit().createImageHyperlink(sectionClient, SWT.NONE);
- clearEstimated.setImage(CommonImages.getImage(CommonImages.REMOVE));
- clearEstimated.setToolTipText("Clear");
- clearEstimated.addHyperlinkListener(new HyperlinkAdapter() {
- @Override
- public void linkActivated(HyperlinkEvent e) {
- estimatedTime.setSelection(0);
- }
- });
-
- getManagedForm().getToolkit().paintBordersFor(sectionClient);
- }
-
- @Override
- protected void addRadioButtons(Composite buttonComposite) {
- // Since NewBugModels have no special submitting actions,
- // no radio buttons are required.
- }
-
- @Override
- protected void createCustomAttributeLayout(Composite composite) {
- // ignore
- }
-
- @Override
- protected void saveTaskOffline(IProgressMonitor progressMonitor) {
- taskData.setSummary(newSummary);
- taskData.setDescription(descriptionTextViewer.getTextWidget().getText());
- updateEditorTitle();
- }
-
- /**
- * A listener for selection of the summary textbox.
- */
- protected class DescriptionListener implements Listener {
- public void handleEvent(Event event) {
- fireSelectionChanged(new SelectionChangedEvent(selectionProvider, new StructuredSelection(
- new RepositoryTaskSelection(taskData.getTaskId(), taskData.getRepositoryUrl(),
- taskData.getConnectorKind(), "New Description", false, taskData.getSummary()))));
- }
- }
-
- @Override
- protected void validateInput() {
- // ignore
- }
-
- @Override
- public boolean isDirty() {
- return true;
- }
-
- /**
- * @author Raphael Ackermann (bug 198526)
- */
- @Override
- public void setFocus() {
- if (summaryText != null) {
- summaryText.setFocus();
- }
- }
-
- @Override
- public boolean isSaveAsAllowed() {
- return false;
- }
-
- /**
- * Creates the button layout. This displays options and buttons at the bottom of the editor to allow actions to be
- * performed on the bug.
- */
- @Override
- protected void createActionsLayout(Composite formComposite) {
- Section section = getManagedForm().getToolkit().createSection(formComposite, ExpandableComposite.TITLE_BAR);
-
- section.setText(getSectionLabel(SECTION_NAME.ACTIONS_SECTION));
- section.setExpanded(true);
- section.setLayout(new GridLayout());
- GridDataFactory.fillDefaults().align(SWT.FILL, SWT.TOP).grab(true, true).applyTo(section);
-
- Composite buttonComposite = getManagedForm().getToolkit().createComposite(section);
- buttonComposite.setLayout(new GridLayout(4, false));
- buttonComposite.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
- section.setClient(buttonComposite);
-
- addToCategory = getManagedForm().getToolkit().createButton(buttonComposite, "Add to Category", SWT.CHECK);
- categoryChooser = new CCombo(buttonComposite, SWT.FLAT | SWT.READ_ONLY);
- categoryChooser.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
- categoryChooser.setLayoutData(GridDataFactory.swtDefaults().hint(150, SWT.DEFAULT).create());
- getManagedForm().getToolkit().adapt(categoryChooser, true, true);
- categoryChooser.setFont(TEXT_FONT);
- ITaskList taskList = TasksUiInternal.getTaskList();
- List<AbstractTaskCategory> categories = new ArrayList<AbstractTaskCategory>(taskList.getCategories());
- Collections.sort(categories, new Comparator<AbstractTaskContainer>() {
-
- public int compare(AbstractTaskContainer c1, AbstractTaskContainer c2) {
- if (c1.equals(TasksUiPlugin.getTaskList().getDefaultCategory())) {
- return -1;
- } else if (c2.equals(TasksUiPlugin.getTaskList().getDefaultCategory())) {
- return 1;
- } else {
- return c1.getSummary().compareToIgnoreCase(c2.getSummary());
- }
- }
-
- });
-
- for (IRepositoryElement category : categories) {
- categoryChooser.add(category.getSummary());
- }
-
- categoryChooser.select(0);
- categoryChooser.setEnabled(false);
- categoryChooser.setData(categories);
- addToCategory.addSelectionListener(new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- categoryChooser.setEnabled(addToCategory.getSelection());
- }
-
- });
-
- GridDataFactory.fillDefaults().hint(DEFAULT_FIELD_WIDTH, SWT.DEFAULT).span(3, SWT.DEFAULT).applyTo(
- categoryChooser);
-
- addActionButtons(buttonComposite);
-
- getManagedForm().getToolkit().paintBordersFor(buttonComposite);
- }
-
- /**
- * Returns the {@link AbstractTaskContainer category} the new task belongs to
- *
- * @return {@link AbstractTaskContainer category} where the new task must be added to, or null if it must not be
- * added to the task list
- */
- @Override
- @SuppressWarnings("unchecked")
- protected AbstractTaskCategory getCategory() {
- int index = categoryChooser.getSelectionIndex();
- if (addToCategory.getSelection() && index != -1) {
- return ((List<AbstractTaskCategory>) categoryChooser.getData()).get(index);
- }
- return null;
- }
-
- @Override
- protected void addActionButtons(Composite buttonComposite) {
- FormToolkit toolkit = new FormToolkit(buttonComposite.getDisplay());
- submitButton = toolkit.createButton(buttonComposite, LABEL_SUMBIT, SWT.NONE);
- GridData submitButtonData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- submitButtonData.widthHint = 100;
- submitButton.setImage(CommonImages.getImage(TasksUiImages.REPOSITORY_SUBMIT));
- submitButton.setLayoutData(submitButtonData);
- submitButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- submitToRepository();
- }
- });
- submitButton.setToolTipText("Submit to " + this.repository.getRepositoryUrl());
- }
-
- protected boolean prepareSubmit() {
- submitButton.setEnabled(false);
- showBusy(true);
-
- if (summaryText != null && summaryText.getText().trim().equals("")) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- MessageDialog.openInformation(AbstractNewRepositoryTaskEditor.this.getSite().getShell(),
- ERROR_CREATING_BUG_REPORT, "A summary must be provided with new bug reports.");
- summaryText.setFocus();
- submitButton.setEnabled(true);
- showBusy(false);
- }
- });
- return false;
- }
-
- if (descriptionTextViewer != null && descriptionTextViewer.getTextWidget().getText().trim().equals("")) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- MessageDialog.openInformation(AbstractNewRepositoryTaskEditor.this.getSite().getShell(),
- ERROR_CREATING_BUG_REPORT, "A summary must be provided with new reports.");
- descriptionTextViewer.getTextWidget().setFocus();
- submitButton.setEnabled(true);
- showBusy(false);
- }
- });
- return false;
- }
-
- return true;
- }
-
- @Override
- protected void createPeopleLayout(Composite composite) {
- // ignore, new editor doesn't have people section
- }
-
- @Override
- public AbstractTask updateSubmittedTask(String id, IProgressMonitor monitor) throws CoreException {
- final AbstractTask newTask = super.updateSubmittedTask(id, monitor);
-
- if (newTask != null) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- DateRange selectedDate = null;
- if (scheduledForDate != null) {
- selectedDate = scheduledForDate.getScheduledDate();
- }
- if (selectedDate != null) {
- TasksUiPlugin.getTaskActivityManager().setScheduledFor(newTask, selectedDate);
- }
-
- if (estimatedTime != null) {
- newTask.setEstimatedTimeHours(estimatedTime.getSelection());
- }
-
- Object selectedObject = null;
- if (TaskListView.getFromActivePerspective() != null) {
- selectedObject = ((IStructuredSelection) TaskListView.getFromActivePerspective()
- .getViewer()
- .getSelection()).getFirstElement();
- }
-
- if (selectedObject instanceof TaskCategory) {
- TasksUiInternal.getTaskList().addTask(newTask, ((TaskCategory) selectedObject));
- }
- }
- });
- }
-
- return newTask;
- }
-
- @Override
- public void doSave(IProgressMonitor monitor) {
- new MessageDialog(null, "Operation not supported", null,
- "Save of un-submitted new tasks is not currently supported.\nPlease submit all new tasks.",
- MessageDialog.INFORMATION, new String[] { IDialogConstants.OK_LABEL }, 0).open();
- monitor.setCanceled(true);
- return;
- }
-
- @Override
- public boolean searchForDuplicates() {
- // called so that the description text is set on taskData before we
- // search for duplicates
- this.saveTaskOffline(new NullProgressMonitor());
- return super.searchForDuplicates();
- }
-
- @Override
- protected boolean supportsRefreshAttributes() {
- // see bug 212475
- return false;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/deprecated/AbstractRepositoryQueryWizard.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/deprecated/AbstractRepositoryQueryWizard.java
deleted file mode 100644
index 2afc89ad8..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/deprecated/AbstractRepositoryQueryWizard.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.deprecated;
-
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.ui.wizards.AbstractRepositoryQueryPage;
-
-/**
- * Extend to provide a custom edit query dialog, typically invoked by the user requesting properties on a query node in
- * the Task List.
- *
- * @author Mik Kersten
- * @since 3.0
- */
-@Deprecated
-public abstract class AbstractRepositoryQueryWizard extends Wizard {
-
- private static final String TITLE = "Edit Repository Query";
-
- protected final TaskRepository repository;
-
- protected IRepositoryQuery query;
-
- protected AbstractRepositoryQueryPage page;
-
- /**
- * @since 3.0
- */
- public AbstractRepositoryQueryWizard(TaskRepository repository, IRepositoryQuery query) {
- this.repository = repository;
- this.query = query;
- setNeedsProgressMonitor(true);
- setWindowTitle(TITLE);
- setDefaultPageImageDescriptor(TasksUiImages.BANNER_REPOSITORY);
- }
-
- @Override
- public boolean performFinish() {
- if (query != null) {
- TasksUiInternal.getTaskList().deleteQuery((RepositoryQuery) query);
- }
- IRepositoryQuery queryToRun = page != null ? page.getQuery() : this.query;
- if (queryToRun != null) {
- TasksUiInternal.getTaskList().addQuery((RepositoryQuery) queryToRun);
-
- AbstractRepositoryConnector connector = TasksUi.getRepositoryManager().getRepositoryConnector(
- repository.getConnectorKind());
- if (connector != null) {
- TasksUiInternal.synchronizeQuery(connector, (RepositoryQuery) queryToRun, null, true);
- }
- }
-
- return true;
- }
-
- public String getQuerySummary() {
- if (query != null) {
- return query.getSummary();
- }
- return null;
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/deprecated/AbstractRepositoryTaskEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/deprecated/AbstractRepositoryTaskEditor.java
deleted file mode 100644
index 76096a6cb..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/deprecated/AbstractRepositoryTaskEditor.java
+++ /dev/null
@@ -1,4060 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.deprecated;
-
-import java.io.File;
-import java.lang.reflect.Method;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Date;
-import java.util.HashMap;
-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.NullProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.core.runtime.jobs.IJobChangeEvent;
-import org.eclipse.core.runtime.jobs.IJobChangeListener;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.core.runtime.jobs.JobChangeAdapter;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.ControlContribution;
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.action.ToolBarManager;
-import org.eclipse.jface.dialogs.IMessageProvider;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.fieldassist.ContentProposalAdapter;
-import org.eclipse.jface.fieldassist.ControlDecoration;
-import org.eclipse.jface.fieldassist.FieldDecoration;
-import org.eclipse.jface.fieldassist.FieldDecorationRegistry;
-import org.eclipse.jface.fieldassist.IContentProposalProvider;
-import org.eclipse.jface.fieldassist.TextContentAdapter;
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.text.ITextListener;
-import org.eclipse.jface.text.Region;
-import org.eclipse.jface.text.TextEvent;
-import org.eclipse.jface.text.TextViewer;
-import org.eclipse.jface.text.hyperlink.IHyperlink;
-import org.eclipse.jface.util.SafeRunnable;
-import org.eclipse.jface.viewers.ColumnViewerToolTipSupport;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.jface.window.ToolTip;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonThemes;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTaskCategory;
-import org.eclipse.mylyn.internal.tasks.core.CommentQuoter;
-import org.eclipse.mylyn.internal.tasks.core.ITaskListChangeListener;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
-import org.eclipse.mylyn.internal.tasks.core.TaskContainerDelta;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractLegacyDuplicateDetector;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractLegacyRepositoryConnector;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractTaskDataHandler;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryAttachment;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryOperation;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskAttribute;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.TaskComment;
-import org.eclipse.mylyn.internal.tasks.ui.AttachmentUtil;
-import org.eclipse.mylyn.internal.tasks.ui.PersonProposalLabelProvider;
-import org.eclipse.mylyn.internal.tasks.ui.PersonProposalProvider;
-import org.eclipse.mylyn.internal.tasks.ui.TaskListHyperlink;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.actions.AbstractTaskEditorAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.AttachAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.AttachScreenshotAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.ClearOutgoingAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.CopyAttachmentToClipboardJob;
-import org.eclipse.mylyn.internal.tasks.ui.actions.DownloadAttachmentJob;
-import org.eclipse.mylyn.internal.tasks.ui.actions.NewSubTaskAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.SynchronizeEditorAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.ToggleTaskActivationAction;
-import org.eclipse.mylyn.internal.tasks.ui.editors.AttachmentTableLabelProvider;
-import org.eclipse.mylyn.internal.tasks.ui.editors.AttachmentsTableContentProvider;
-import org.eclipse.mylyn.internal.tasks.ui.editors.ContentOutlineTools;
-import org.eclipse.mylyn.internal.tasks.ui.editors.IRepositoryTaskAttributeListener;
-import org.eclipse.mylyn.internal.tasks.ui.editors.IRepositoryTaskSelection;
-import org.eclipse.mylyn.internal.tasks.ui.editors.RepositoryAttachmentEditorInput;
-import org.eclipse.mylyn.internal.tasks.ui.editors.RepositoryTaskEditorDropListener;
-import org.eclipse.mylyn.internal.tasks.ui.editors.RepositoryTaskOutlineNode;
-import org.eclipse.mylyn.internal.tasks.ui.editors.RepositoryTaskOutlinePage;
-import org.eclipse.mylyn.internal.tasks.ui.editors.RepositoryTaskSelection;
-import org.eclipse.mylyn.internal.tasks.ui.editors.TaskListChangeAdapter;
-import org.eclipse.mylyn.internal.tasks.ui.editors.TaskUrlHyperlink;
-import org.eclipse.mylyn.internal.tasks.ui.search.SearchHitCollector;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.internal.tasks.ui.views.UpdateRepositoryConfigurationAction;
-import org.eclipse.mylyn.tasks.core.AbstractDuplicateDetector;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITaskAttachment;
-import org.eclipse.mylyn.tasks.core.RepositoryStatus;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.ITask.SynchronizationState;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractRenderingEngine;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPage;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.search.ui.NewSearchUI;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.browser.Browser;
-import org.eclipse.swt.browser.LocationAdapter;
-import org.eclipse.swt.browser.LocationEvent;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.custom.CCombo;
-import org.eclipse.swt.custom.CTabFolder;
-import org.eclipse.swt.custom.StackLayout;
-import org.eclipse.swt.custom.StyledText;
-import org.eclipse.swt.custom.VerifyKeyListener;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.dnd.DND;
-import org.eclipse.swt.dnd.DropTarget;
-import org.eclipse.swt.dnd.FileTransfer;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.swt.events.ControlAdapter;
-import org.eclipse.swt.events.ControlEvent;
-import org.eclipse.swt.events.FocusAdapter;
-import org.eclipse.swt.events.FocusEvent;
-import org.eclipse.swt.events.FocusListener;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.KeyListener;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.events.VerifyEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Cursor;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.layout.RowLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Link;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.Spinner;
-import org.eclipse.swt.widgets.TabFolder;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.ui.IEditorDescriptor;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.ISelectionListener;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.IStorageEditorInput;
-import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.FilteredTree;
-import org.eclipse.ui.fieldassist.ContentAssistCommandAdapter;
-import org.eclipse.ui.forms.IFormColors;
-import org.eclipse.ui.forms.IManagedForm;
-import org.eclipse.ui.forms.editor.FormEditor;
-import org.eclipse.ui.forms.events.ExpansionAdapter;
-import org.eclipse.ui.forms.events.ExpansionEvent;
-import org.eclipse.ui.forms.events.HyperlinkAdapter;
-import org.eclipse.ui.forms.events.HyperlinkEvent;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-import org.eclipse.ui.forms.widgets.Hyperlink;
-import org.eclipse.ui.forms.widgets.ImageHyperlink;
-import org.eclipse.ui.forms.widgets.ScrolledForm;
-import org.eclipse.ui.forms.widgets.Section;
-import org.eclipse.ui.internal.ObjectActionContributorManager;
-import org.eclipse.ui.internal.WorkbenchImages;
-import org.eclipse.ui.keys.IBindingService;
-import org.eclipse.ui.themes.IThemeManager;
-import org.eclipse.ui.views.contentoutline.ContentOutline;
-import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
-
-/**
- * Extend to provide customized task editing.
- *
- * @author Mik Kersten
- * @author Rob Elves
- * @author Jeff Pound (Attachment work)
- * @author Steffen Pingel
- * @author Xiaoyang Guan (Wiki HTML preview)
- * @since 2.0
- * @deprecated use {@link AbstractTaskEditorPage} instead
- */
-@Deprecated
-public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
-
- private static final String PREF_SORT_ORDER_PREFIX = "org.eclipse.mylyn.editor.comments.sortDirectionUp.";
-
- private static final String ERROR_NOCONNECTIVITY = "Unable to submit at this time. Check connectivity and retry.";
-
- private static final String LABEL_HISTORY = "History";
-
- private static final String LABEL_REPLY = "Reply";
-
- private static final String LABEL_JOB_SUBMIT = "Submitting to repository";
-
- private static final String HEADER_DATE_FORMAT = "yyyy-MM-dd HH:mm";
-
- private static final String ATTACHMENT_DEFAULT_NAME = "attachment";
-
- private static final String CTYPE_ZIP = "zip";
-
- private static final String CTYPE_OCTET_STREAM = "octet-stream";
-
- private static final String CTYPE_TEXT = "text";
-
- private static final String CTYPE_HTML = "html";
-
- private static final String LABEL_BROWSER = "Browser";
-
- private static final String LABEL_DEFAULT_EDITOR = "Default Editor";
-
- private static final String LABEL_TEXT_EDITOR = "Text Editor";
-
- protected static final String CONTEXT_MENU_ID = "#MylynRepositoryEditor";
-
- private FormToolkit toolkit;
-
- private ScrolledForm form;
-
- protected TaskRepository repository;
-
- private static final int RADIO_OPTION_WIDTH = 120;
-
- private static final Font TITLE_FONT = JFaceResources.getBannerFont();
-
- protected static final Font TEXT_FONT = JFaceResources.getDefaultFont();
-
- private static final int DESCRIPTION_WIDTH = 79 * 7; // 500;
-
- private static final int DESCRIPTION_HEIGHT = 10 * 14;
-
- protected static final int SUMMARY_HEIGHT = 20;
-
- private static final String LABEL_BUTTON_SUBMIT = "Submit";
-
- private static final String LABEL_COPY_URL_TO_CLIPBOARD = "Copy &URL";
-
- private static final String LABEL_COPY_TO_CLIPBOARD = "Copy Contents";
-
- private static final String LABEL_SAVE = "Save...";
-
- private static final String LABEL_SEARCH_DUPS = "Search";
-
- private static final String LABEL_SELECT_DETECTOR = "Duplicate Detection";
-
- private RepositoryTaskEditorInput editorInput;
-
- private TaskEditor parentEditor = null;
-
- private RepositoryTaskOutlineNode taskOutlineModel = null;
-
- private boolean expandedStateAttributes = false;
-
- protected Button submitButton;
-
- private Table attachmentsTable;
-
- private boolean refreshEnabled = true;
-
- private TableViewer attachmentsTableViewer;
-
- private final String[] attachmentsColumns = { "Name", "Description", "Type", "Size", "Creator", "Created" };
-
- private final int[] attachmentsColumnWidths = { 140, 160, 100, 70, 100, 100 };
-
- private Composite editorComposite;
-
- protected TextViewer summaryTextViewer;
-
- private ImageHyperlink sortHyperlink;
-
- private boolean commentSortIsUp = true;
-
- private boolean commentSortEnable = false;
-
- private Composite addCommentsComposite;
-
- /**
- * WARNING: This is present for backward compatibility only. You can get and set text on this widget but all ui
- * related changes to this widget will have no affect as ui is now being presented with a StyledText widget. This
- * simply proxies get/setText calls to the StyledText widget.
- */
- protected Text summaryText;
-
- private TextViewer newCommentTextViewer;
-
- private org.eclipse.swt.widgets.List ccList;
-
- private Section commentsSection;
-
- private Color colorIncoming;
-
- private boolean hasAttributeChanges = false;
-
- private boolean showAttachments = true;
-
- private boolean attachContextEnabled = true;
-
- protected Button searchForDuplicates;
-
- protected CCombo duplicateDetectorChooser;
-
- protected Label duplicateDetectorLabel;
-
- private boolean ignoreLocationEvents = false;
-
- private boolean refreshing = false;
-
- private TaskComment selectedComment = null;
-
- /**
- * @author Raphael Ackermann (bug 195514)
- */
- private class TabVerifyKeyListener implements VerifyKeyListener {
-
- public void verifyKey(VerifyEvent event) {
- // if there is a tab key, do not "execute" it and instead select the Status control
- if (event.keyCode == SWT.TAB) {
- event.doit = false;
- if (headerInfoComposite != null) {
- headerInfoComposite.setFocus();
- }
- }
- }
-
- }
-
- protected enum SECTION_NAME {
- ATTRIBTUES_SECTION("Attributes"), ATTACHMENTS_SECTION("Attachments"), DESCRIPTION_SECTION("Description"), COMMENTS_SECTION(
- "Comments"), NEWCOMMENT_SECTION("New Comment"), ACTIONS_SECTION("Actions"), PEOPLE_SECTION("People"), RELATEDBUGS_SECTION(
- "Related Tasks");
-
- private String prettyName;
-
- public String getPrettyName() {
- return prettyName;
- }
-
- SECTION_NAME(String prettyName) {
- this.prettyName = prettyName;
- }
- }
-
- private final List<IRepositoryTaskAttributeListener> attributesListeners = new ArrayList<IRepositoryTaskAttributeListener>();
-
- protected RepositoryTaskData taskData;
-
- protected final ISelectionProvider selectionProvider = new ISelectionProvider() {
- public void addSelectionChangedListener(ISelectionChangedListener listener) {
- selectionChangedListeners.add(listener);
- }
-
- public ISelection getSelection() {
- RepositoryTaskSelection selection = new RepositoryTaskSelection(taskData.getTaskId(),
- taskData.getRepositoryUrl(), taskData.getConnectorKind(), "", selectedComment,
- taskData.getSummary());
- selection.setIsDescription(true);
- return selection;
- }
-
- public void removeSelectionChangedListener(ISelectionChangedListener listener) {
- selectionChangedListeners.remove(listener);
- }
-
- public void setSelection(ISelection selection) {
- // No implementation.
- }
- };
-
- private final ITaskListChangeListener TASKLIST_CHANGE_LISTENER = new TaskListChangeAdapter() {
-
- @Override
- public void containersChanged(Set<TaskContainerDelta> containers) {
- ITask taskToRefresh = null;
- for (TaskContainerDelta taskContainerDelta : containers) {
- if (!localChange && repositoryTask != null && repositoryTask.equals(taskContainerDelta.getElement())) {
- if (taskContainerDelta.getKind().equals(TaskContainerDelta.Kind.CONTENT)
- && !taskContainerDelta.isTransient() && !refreshing) {
- taskToRefresh = (ITask) taskContainerDelta.getElement();
- break;
- }
- }
- }
- if (taskToRefresh != null) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- if (repositoryTask.getSynchronizationState() == SynchronizationState.INCOMING
- || repositoryTask.getSynchronizationState() == SynchronizationState.CONFLICT) {
- parentEditor.setMessage("Task has incoming changes", IMessageProvider.WARNING,
- new HyperlinkAdapter() {
- @Override
- public void linkActivated(HyperlinkEvent e) {
- refreshEditor();
- }
- });
- setSubmitEnabled(false);
- } else {
- refreshEditor();
- }
- }
- });
- }
- }
- };
-
- private final List<ISelectionChangedListener> selectionChangedListeners = new ArrayList<ISelectionChangedListener>();
-
- private IRepositoryTaskSelection lastSelected = null;
-
- /**
- * Focuses on form widgets when an item in the outline is selected.
- */
- private final ISelectionListener selectionListener = new ISelectionListener() {
- public void selectionChanged(IWorkbenchPart part, ISelection selection) {
- if ((part instanceof ContentOutline) && (selection instanceof StructuredSelection)) {
- Object select = ((StructuredSelection) selection).getFirstElement();
- if (select instanceof RepositoryTaskOutlineNode) {
- RepositoryTaskOutlineNode n = (RepositoryTaskOutlineNode) select;
-
- if (lastSelected != null
- && ContentOutlineTools.getHandle(n).equals(ContentOutlineTools.getHandle(lastSelected))) {
- // we don't need to set the selection if it is already
- // set
- return;
- }
- lastSelected = n;
-
- boolean highlight = true;
- if (n.getKey().equals(RepositoryTaskOutlineNode.LABEL_COMMENTS)) {
- highlight = false;
- }
-
- Object data = n.getData();
- if (n.getKey().equals(RepositoryTaskOutlineNode.LABEL_NEW_COMMENT)) {
- selectNewComment();
- } else if (n.getKey().equals(RepositoryTaskOutlineNode.LABEL_DESCRIPTION)
- && descriptionTextViewer.isEditable()) {
- focusDescription();
- } else if (data != null) {
- select(data, highlight);
- }
- }
- part.setFocus();
- }
- }
- };
-
- private AbstractTask repositoryTask;
-
- private Set<RepositoryTaskAttribute> changedAttributes;
-
- private Menu menu;
-
- private SynchronizeEditorAction synchronizeEditorAction;
-
- private ToggleTaskActivationAction activateAction;
-
- private Action historyAction;
-
- private Action clearOutgoingAction;
-
- private Action openBrowserAction;
-
- private NewSubTaskAction newSubTaskAction;
-
- private Control lastFocusControl;
-
- private boolean localChange = false;
-
- /**
- * Call upon change to attribute value
- *
- * @param attribute
- * changed attribute
- */
- protected boolean attributeChanged(RepositoryTaskAttribute attribute) {
- if (attribute == null) {
- return false;
- }
- changedAttributes.add(attribute);
- markDirty(true);
- validateInput();
- return true;
- }
-
- @Override
- public void init(IEditorSite site, IEditorInput input) {
- if (!(input instanceof RepositoryTaskEditorInput)) {
- return;
- }
-
- initTaskEditor(site, (RepositoryTaskEditorInput) input);
-
- if (taskData != null) {
- editorInput.setToolTipText(taskData.getLabel());
- taskOutlineModel = RepositoryTaskOutlineNode.parseBugReport(taskData);
- }
- hasAttributeChanges = hasVisibleAttributeChanges();
- TasksUiInternal.getTaskList().addChangeListener(TASKLIST_CHANGE_LISTENER);
- }
-
- protected void initTaskEditor(IEditorSite site, RepositoryTaskEditorInput input) {
- changedAttributes = new HashSet<RepositoryTaskAttribute>();
- editorInput = input;
- repositoryTask = editorInput.getRepositoryTask();
- repository = editorInput.getRepository();
- taskData = editorInput.getTaskData();
- if (repositoryTask != null) {
- TasksUiPlugin.getTaskDataManager().setTaskRead(repositoryTask, true);
- }
- connector = (AbstractLegacyRepositoryConnector) TasksUi.getRepositoryManager().getRepositoryConnector(
- repository.getConnectorKind());
- commentSortIsUp = TasksUiPlugin.getDefault().getPreferenceStore().getBoolean(
- PREF_SORT_ORDER_PREFIX + repository.getConnectorKind());
- setSite(site);
- setInput(input);
-
- isDirty = false;
- }
-
- public AbstractTask getRepositoryTask() {
- return repositoryTask;
- }
-
- // @Override
- // public void markDirty(boolean dirty) {
- // if (repositoryTask != null) {
- // repositoryTask.setDirty(dirty);
- // }
- // super.markDirty(dirty);
- // }
-
-// /**
-// * Update task state
-// */
-// protected void updateTask() {
-// if (taskData == null)
-// return;
-// if (repositoryTask != null) {
-// TasksUiPlugin.getSynchronizationManager().saveOutgoing(repositoryTask, changedAttributes);
-// }
-// if (parentEditor != null) {
-// parentEditor.notifyTaskChanged();
-// }
-// markDirty(false);
-// }
-
- protected abstract void validateInput();
-
- /**
- * Creates a new <code>AbstractTaskEditor</code>.
- */
- public AbstractRepositoryTaskEditor(FormEditor editor) {
- // set the scroll increments so the editor scrolls normally with the
- // scroll wheel
- super(editor, "id", "label"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- protected boolean supportsCommentSort() {
- return false;
- }
-
- @Override
- protected void createFormContent(final IManagedForm managedForm) {
- IThemeManager themeManager = getSite().getWorkbenchWindow().getWorkbench().getThemeManager();
- colorIncoming = themeManager.getCurrentTheme().getColorRegistry().get(CommonThemes.COLOR_INCOMING_BACKGROUND);
-
- super.createFormContent(managedForm);
- form = managedForm.getForm();
- form.setRedraw(false);
- try {
- refreshEnabled = false;
-
- toolkit = managedForm.getToolkit();
- registerDropListener(form);
-
- editorComposite = form.getBody();
- GridLayout editorLayout = new GridLayout();
- editorComposite.setLayout(editorLayout);
- editorComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- if (taskData != null) {
- createSections();
- }
-
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(repository.getConnectorKind());
- if (connectorUi == null) {
- parentEditor.setMessage("The editor may not be fully loaded", IMessageProvider.INFORMATION,
- new HyperlinkAdapter() {
- @Override
- public void linkActivated(HyperlinkEvent e) {
- refreshEditor();
- }
- });
- }
-
- updateHeaderControls();
- if (summaryTextViewer != null) {
- summaryTextViewer.getTextWidget().setFocus();
- }
-
- form.setRedraw(true);
- } finally {
- refreshEnabled = true;
- }
-
- form.reflow(true);
- }
-
- private void updateHeaderControls() {
- if (taskData == null) {
- parentEditor.setMessage(
- "Task data not available. Press synchronize button (right) to retrieve latest data.",
- IMessageProvider.WARNING, new HyperlinkAdapter() {
- @Override
- public void linkActivated(HyperlinkEvent e) {
- if (synchronizeEditorAction != null) {
- synchronizeEditorAction.run();
- }
- }
- });
- }
- getParentEditor().updateHeaderToolBar();
- }
-
- /**
- * Override for customizing the toolbar.
- *
- * @since 2.1 (NOTE: likely to change for 3.0)
- */
- public void fillToolBar(IToolBarManager toolBarManager) {
- ControlContribution repositoryLabelControl = new ControlContribution("Title") { //$NON-NLS-1$
- @Override
- protected Control createControl(Composite parent) {
- Composite composite = toolkit.createComposite(parent);
- composite.setLayout(new RowLayout());
- composite.setBackground(null);
- String label = repository.getRepositoryLabel();
- if (label.indexOf("//") != -1) {
- label = label.substring((repository.getRepositoryUrl().indexOf("//") + 2));
- }
-
- Hyperlink link = new Hyperlink(composite, SWT.NONE);
- link.setText(label);
- link.setFont(TITLE_FONT);
- link.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
- link.addHyperlinkListener(new HyperlinkAdapter() {
-
- @Override
- public void linkActivated(HyperlinkEvent e) {
- TasksUiUtil.openEditRepositoryWizard(repository);
- }
- });
-
- return composite;
- }
- };
- toolBarManager.add(repositoryLabelControl);
-
- if ((taskData != null && !taskData.isNew()) || repositoryTask != null) {
- synchronizeEditorAction = new SynchronizeEditorAction();
- synchronizeEditorAction.selectionChanged(new StructuredSelection(this));
- toolBarManager.add(synchronizeEditorAction);
- }
-
- if (taskData != null && !taskData.isNew()) {
- if (repositoryTask != null) {
- clearOutgoingAction = new ClearOutgoingAction(
- Collections.singletonList((IRepositoryElement) repositoryTask));
-
- if (clearOutgoingAction.isEnabled()) {
- toolBarManager.add(clearOutgoingAction);
- }
-
- newSubTaskAction = new NewSubTaskAction();
- newSubTaskAction.selectionChanged(newSubTaskAction, new StructuredSelection(getRepositoryTask()));
- if (newSubTaskAction.isEnabled()) {
- toolBarManager.add(newSubTaskAction);
- }
- }
-
- if (getHistoryUrl() != null) {
- historyAction = new Action() {
- @Override
- public void run() {
- TasksUiUtil.openUrl(getHistoryUrl());
- }
- };
-
- historyAction.setImageDescriptor(TasksUiImages.TASK_REPOSITORY_HISTORY);
- historyAction.setToolTipText(LABEL_HISTORY);
- toolBarManager.add(historyAction);
- }
-
- if (connector != null) {
- String taskUrl = connector.getTaskUrl(taskData.getRepositoryUrl(), taskData.getTaskKey());
- if (taskUrl == null && repositoryTask != null && TasksUiInternal.hasValidUrl(repositoryTask)) {
- taskUrl = repositoryTask.getUrl();
- }
-
- final String taskUrlToOpen = taskUrl;
-
- if (taskUrlToOpen != null) {
- openBrowserAction = new Action() {
- @Override
- public void run() {
- TasksUiUtil.openUrl(taskUrlToOpen);
- }
- };
-
- openBrowserAction.setImageDescriptor(CommonImages.BROWSER_OPEN_TASK);
- openBrowserAction.setToolTipText("Open with Web Browser");
- toolBarManager.add(openBrowserAction);
- }
- }
- }
- }
-
- private void createSections() {
- createSummaryLayout(editorComposite);
-
- Composite attribComp = createAttributeSection();
- createAttributeLayout(attribComp);
- createCustomAttributeLayout(attribComp);
-
- createRelatedBugsSection(editorComposite);
-
- if (showAttachments) {
- createAttachmentLayout(editorComposite);
- }
- createDescriptionLayout(editorComposite);
- createCommentLayout(editorComposite);
- createNewCommentLayout(editorComposite);
- Composite bottomComposite = toolkit.createComposite(editorComposite);
- bottomComposite.setLayout(new GridLayout(2, false));
- GridDataFactory.fillDefaults().grab(true, false).applyTo(bottomComposite);
-
- createActionsLayout(bottomComposite);
- createPeopleLayout(bottomComposite);
- bottomComposite.pack(true);
-
- getSite().getPage().addSelectionListener(selectionListener);
- getSite().setSelectionProvider(selectionProvider);
-
- FocusListener listener = new FocusAdapter() {
- @Override
- public void focusGained(FocusEvent e) {
- lastFocusControl = (Control) e.widget;
- }
- };
- addFocusListener(editorComposite, listener);
- }
-
- private void addFocusListener(Composite composite, FocusListener listener) {
- Control[] children = composite.getChildren();
- for (Control control : children) {
- if ((control instanceof Text) || (control instanceof Button) || (control instanceof Combo)
- || (control instanceof CCombo) || (control instanceof Tree) || (control instanceof Table)
- || (control instanceof Spinner) || (control instanceof Link) || (control instanceof List)
- || (control instanceof TabFolder) || (control instanceof CTabFolder)
- || (control instanceof Hyperlink) || (control instanceof FilteredTree)
- || (control instanceof StyledText)) {
- control.addFocusListener(listener);
- }
- if (control instanceof Composite) {
- addFocusListener((Composite) control, listener);
- }
- }
- }
-
- private void removeSections() {
- menu = editorComposite.getMenu();
- setMenu(editorComposite, null);
- for (Control control : editorComposite.getChildren()) {
- control.dispose();
- }
- lastFocusControl = null;
- }
-
- /**
- * @author Raphael Ackermann (modifications) (bug 195514)
- */
- protected void createSummaryLayout(Composite composite) {
- addSummaryText(composite);
- if (summaryTextViewer != null) {
- summaryTextViewer.prependVerifyKeyListener(new TabVerifyKeyListener());
- }
-
- headerInfoComposite = toolkit.createComposite(composite);
- GridLayout headerLayout = new GridLayout(11, false);
- headerLayout.verticalSpacing = 1;
- headerLayout.marginHeight = 1;
- headerLayout.marginHeight = 1;
- headerLayout.marginWidth = 1;
- headerLayout.horizontalSpacing = 6;
- headerInfoComposite.setLayout(headerLayout);
-
- RepositoryTaskAttribute statusAtribute = taskData.getAttribute(RepositoryTaskAttribute.STATUS);
- addNameValue(headerInfoComposite, statusAtribute);
- toolkit.paintBordersFor(headerInfoComposite);
-
- RepositoryTaskAttribute priorityAttribute = taskData.getAttribute(RepositoryTaskAttribute.PRIORITY);
- addNameValue(headerInfoComposite, priorityAttribute);
-
- String idLabel = (repositoryTask != null) ? repositoryTask.getTaskKey() : taskData.getTaskKey();
- if (idLabel != null) {
-
- Composite nameValue = toolkit.createComposite(headerInfoComposite);
- nameValue.setLayout(new GridLayout(2, false));
- Label label = toolkit.createLabel(nameValue, "ID:");// .setFont(TITLE_FONT);
- label.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
- // toolkit.createText(nameValue, idLabel, SWT.FLAT | SWT.READ_ONLY);
- Text text = new Text(nameValue, SWT.FLAT | SWT.READ_ONLY);
- toolkit.adapt(text, true, true);
- text.setText(idLabel);
- }
-
- String openedDateString = "";
- String modifiedDateString = "";
- final AbstractTaskDataHandler taskDataManager = connector.getLegacyTaskDataHandler();
- if (taskDataManager != null) {
- Date created = taskData.getAttributeFactory().getDateForAttributeType(
- RepositoryTaskAttribute.DATE_CREATION, taskData.getCreated());
- openedDateString = created != null ? new SimpleDateFormat(HEADER_DATE_FORMAT).format(created) : "";
-
- Date modified = taskData.getAttributeFactory().getDateForAttributeType(
- RepositoryTaskAttribute.DATE_MODIFIED, taskData.getLastModified());
- modifiedDateString = modified != null ? new SimpleDateFormat(HEADER_DATE_FORMAT).format(modified) : "";
- }
-
- RepositoryTaskAttribute creationAttribute = taskData.getAttribute(RepositoryTaskAttribute.DATE_CREATION);
- if (creationAttribute != null) {
- Composite nameValue = toolkit.createComposite(headerInfoComposite);
- nameValue.setLayout(new GridLayout(2, false));
- createLabel(nameValue, creationAttribute);
- // toolkit.createText(nameValue, openedDateString, SWT.FLAT |
- // SWT.READ_ONLY);
- Text text = new Text(nameValue, SWT.FLAT | SWT.READ_ONLY);
- toolkit.adapt(text, true, true);
- text.setText(openedDateString);
- }
-
- RepositoryTaskAttribute modifiedAttribute = taskData.getAttribute(RepositoryTaskAttribute.DATE_MODIFIED);
- if (modifiedAttribute != null) {
- Composite nameValue = toolkit.createComposite(headerInfoComposite);
- nameValue.setLayout(new GridLayout(2, false));
- createLabel(nameValue, modifiedAttribute);
- // toolkit.createText(nameValue, modifiedDateString, SWT.FLAT |
- // SWT.READ_ONLY);
- Text text = new Text(nameValue, SWT.FLAT | SWT.READ_ONLY);
- toolkit.adapt(text, true, true);
- text.setText(modifiedDateString);
- }
- }
-
- private void addNameValue(Composite parent, RepositoryTaskAttribute attribute) {
- Composite nameValue = toolkit.createComposite(parent);
- nameValue.setLayout(new GridLayout(2, false));
- if (attribute != null) {
- createLabel(nameValue, attribute);
- createTextField(nameValue, attribute, SWT.FLAT | SWT.READ_ONLY);
- }
- }
-
- /**
- * Utility method to create text field sets background to TaskListColorsAndFonts.COLOR_ATTRIBUTE_CHANGED if
- * attribute has changed.
- *
- * @param composite
- * @param attribute
- * @param style
- */
- protected Text createTextField(Composite composite, RepositoryTaskAttribute attribute, int style) {
- String value;
- if (attribute == null || attribute.getValue() == null) {
- value = "";
- } else {
- value = attribute.getValue();
- }
-
- final Text text;
- if ((SWT.READ_ONLY & style) == SWT.READ_ONLY) {
- text = new Text(composite, style);
- toolkit.adapt(text, true, true);
- text.setData(FormToolkit.KEY_DRAW_BORDER, Boolean.FALSE);
- text.setText(value);
- } else {
- text = toolkit.createText(composite, value, style);
- }
-
- if (attribute != null && !attribute.isReadOnly()) {
- text.setData(attribute);
- text.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- String newValue = text.getText();
- RepositoryTaskAttribute attribute = (RepositoryTaskAttribute) text.getData();
- attribute.setValue(newValue);
- attributeChanged(attribute);
- }
- });
- }
- if (hasChanged(attribute)) {
- text.setBackground(colorIncoming);
- }
- return text;
- }
-
- protected Label createLabel(Composite composite, RepositoryTaskAttribute attribute) {
- Label label;
- if (hasOutgoingChange(attribute)) {
- label = toolkit.createLabel(composite, "*" + attribute.getName());
- } else {
- label = toolkit.createLabel(composite, attribute.getName());
- }
- label.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
- GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(label);
- return label;
- }
-
- public String getSectionLabel(SECTION_NAME labelName) {
- return labelName.getPrettyName();
- }
-
- protected Composite createAttributeSection() {
- attributesSection = createSection(editorComposite, getSectionLabel(SECTION_NAME.ATTRIBTUES_SECTION),
- expandedStateAttributes || hasAttributeChanges);
-
- Composite toolbarComposite = toolkit.createComposite(attributesSection);
- toolbarComposite.setBackground(null);
- RowLayout rowLayout = new RowLayout();
- rowLayout.marginTop = 0;
- rowLayout.marginBottom = 0;
- toolbarComposite.setLayout(rowLayout);
- UpdateRepositoryConfigurationAction repositoryConfigRefresh = new UpdateRepositoryConfigurationAction() {
- @Override
- public void performUpdate(TaskRepository repository, AbstractRepositoryConnector connector,
- IProgressMonitor monitor) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
-
- public void run() {
- setGlobalBusy(true);
-
- }
- });
- try {
- super.performUpdate(repository, connector, monitor);
- if (connector != null) {
- TasksUiInternal.synchronizeTask(connector, repositoryTask, true, new JobChangeAdapter() {
-
- @Override
- public void done(IJobChangeEvent event) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
-
- public void run() {
- refreshEditor();
- }
- });
-
- }
- });
- }
- } catch (Exception e) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
-
- public void run() {
- refreshEditor();
- }
- });
- }
- }
- };
- repositoryConfigRefresh.setImageDescriptor(TasksUiImages.REPOSITORY_SYNCHRONIZE);
- repositoryConfigRefresh.selectionChanged(new StructuredSelection(repository));
- repositoryConfigRefresh.setToolTipText("Refresh attributes");
-
- ToolBarManager barManager = new ToolBarManager(SWT.FLAT);
- barManager.add(repositoryConfigRefresh);
- repositoryConfigRefresh.setEnabled(supportsRefreshAttributes());
- barManager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
- barManager.createControl(toolbarComposite);
- attributesSection.setTextClient(toolbarComposite);
-
- // Attributes Composite- this holds all the combo fields and text fields
- final Composite attribComp = toolkit.createComposite(attributesSection);
- attribComp.addListener(SWT.MouseDown, new Listener() {
- public void handleEvent(Event event) {
- Control focus = event.display.getFocusControl();
- if (focus instanceof Text && ((Text) focus).getEditable() == false) {
- form.setFocus();
- }
- }
- });
- attributesSection.setClient(attribComp);
-
- GridLayout attributesLayout = new GridLayout();
- attributesLayout.numColumns = 4;
- attributesLayout.horizontalSpacing = 5;
- attributesLayout.verticalSpacing = 4;
- attribComp.setLayout(attributesLayout);
-
- GridData attributesData = new GridData(GridData.FILL_BOTH);
- attributesData.horizontalSpan = 1;
- attributesData.grabExcessVerticalSpace = false;
- attribComp.setLayoutData(attributesData);
-
- return attribComp;
- }
-
- /**
- * @since 2.2
- */
- protected boolean supportsRefreshAttributes() {
- return true;
- }
-
- /**
- * Creates the attribute section, which contains most of the basic attributes of the task (some of which are
- * editable).
- */
- protected void createAttributeLayout(Composite attributesComposite) {
- int numColumns = ((GridLayout) attributesComposite.getLayout()).numColumns;
- int currentCol = 1;
-
- for (final RepositoryTaskAttribute attribute : taskData.getAttributes()) {
- if (attribute.isHidden()) {
- continue;
- }
-
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- data.horizontalSpan = 1;
-
- if (attribute.hasOptions() && !attribute.isReadOnly()) {
- Label label = createLabel(attributesComposite, attribute);
- GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(label);
- final CCombo attributeCombo = new CCombo(attributesComposite, SWT.FLAT | SWT.READ_ONLY);
- toolkit.adapt(attributeCombo, true, true);
- attributeCombo.setFont(TEXT_FONT);
- attributeCombo.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
- if (hasChanged(attribute)) {
- attributeCombo.setBackground(colorIncoming);
- }
- attributeCombo.setLayoutData(data);
-
- List<String> values = attribute.getOptions();
- if (values != null) {
- for (String val : values) {
- if (val != null) {
- attributeCombo.add(val);
- }
- }
- }
-
- String value = attribute.getValue();
- if (value == null) {
- value = "";
- }
- if (attributeCombo.indexOf(value) != -1) {
- attributeCombo.select(attributeCombo.indexOf(value));
- }
- attributeCombo.clearSelection();
- attributeCombo.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent event) {
- if (attributeCombo.getSelectionIndex() > -1) {
- String sel = attributeCombo.getItem(attributeCombo.getSelectionIndex());
- attribute.setValue(sel);
- attributeChanged(attribute);
- attributeCombo.clearSelection();
- }
- }
- });
- currentCol += 2;
- } else {
- Label label = createLabel(attributesComposite, attribute);
- GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(label);
- Composite textFieldComposite = toolkit.createComposite(attributesComposite);
- GridLayout textLayout = new GridLayout();
- textLayout.marginWidth = 1;
- textLayout.marginHeight = 2;
- textFieldComposite.setLayout(textLayout);
- GridData textData = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- textData.horizontalSpan = 1;
- textData.widthHint = 135;
-
- if (attribute.isReadOnly()) {
- final Text text = createTextField(textFieldComposite, attribute, SWT.FLAT | SWT.READ_ONLY);
- text.setLayoutData(textData);
- } else {
- final Text text = createTextField(textFieldComposite, attribute, SWT.FLAT);
- // text.setFont(COMMENT_FONT);
- text.setLayoutData(textData);
- toolkit.paintBordersFor(textFieldComposite);
- text.setData(attribute);
-
- if (hasContentAssist(attribute)) {
- ContentAssistCommandAdapter adapter = applyContentAssist(text,
- createContentProposalProvider(attribute));
-
- ILabelProvider propsalLabelProvider = createProposalLabelProvider(attribute);
- if (propsalLabelProvider != null) {
- adapter.setLabelProvider(propsalLabelProvider);
- }
- adapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
- }
- }
-
- currentCol += 2;
- }
-
- if (currentCol > numColumns) {
- currentCol -= numColumns;
- }
- }
-
- // make sure that we are in the first column
- if (currentCol > 1) {
- while (currentCol <= numColumns) {
- toolkit.createLabel(attributesComposite, "");
- currentCol++;
- }
- }
-
- toolkit.paintBordersFor(attributesComposite);
- }
-
- /**
- * Adds a related bugs section to the bug editor
- */
- protected void createRelatedBugsSection(Composite composite) {
-// Section relatedBugsSection = createSection(editorComposite, getSectionLabel(SECTION_NAME.RELATEDBUGS_SECTION));
-// Composite relatedBugsComposite = toolkit.createComposite(relatedBugsSection);
-// relatedBugsComposite.setLayout(new GridLayout(4, false));
-// relatedBugsComposite.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
-// relatedBugsSection.setClient(relatedBugsComposite);
-// relatedBugsSection.setExpanded(repositoryTask == null);
-//
-// List<AbstractDuplicateDetector> allCollectors = new ArrayList<AbstractDuplicateDetector>();
-// if (getDuplicateSearchCollectorsList() != null) {
-// allCollectors.addAll(getDuplicateSearchCollectorsList());
-// }
-// if (!allCollectors.isEmpty()) {
-// duplicateDetectorLabel = new Label(relatedBugsComposite, SWT.LEFT);
-// duplicateDetectorLabel.setText(LABEL_SELECT_DETECTOR);
-//
-// duplicateDetectorChooser = new CCombo(relatedBugsComposite, SWT.FLAT | SWT.READ_ONLY | SWT.BORDER);
-//
-// duplicateDetectorChooser.setLayoutData(GridDataFactory.swtDefaults().hint(150, SWT.DEFAULT).create());
-// duplicateDetectorChooser.setFont(TEXT_FONT);
-//
-// Collections.sort(allCollectors, new Comparator<AbstractDuplicateDetector>() {
-//
-// public int compare(AbstractDuplicateDetector c1, AbstractDuplicateDetector c2) {
-// return c1.getName().compareToIgnoreCase(c2.getName());
-// }
-//
-// });
-//
-// for (AbstractDuplicateDetector detector : allCollectors) {
-// duplicateDetectorChooser.add(detector.getName());
-// }
-//
-// duplicateDetectorChooser.select(0);
-// duplicateDetectorChooser.setEnabled(true);
-// duplicateDetectorChooser.setData(allCollectors);
-//
-// if (allCollectors.size() > 0) {
-//
-// searchForDuplicates = toolkit.createButton(relatedBugsComposite, LABEL_SEARCH_DUPS, SWT.NONE);
-// GridData searchDuplicatesButtonData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
-// searchForDuplicates.setLayoutData(searchDuplicatesButtonData);
-// searchForDuplicates.addListener(SWT.Selection, new Listener() {
-// public void handleEvent(Event e) {
-// searchForDuplicates();
-// }
-// });
-// }
-// } else {
-// Label label = new Label(relatedBugsComposite, SWT.LEFT);
-// label.setText(LABEL_NO_DETECTOR);
-// }
- }
-
- /**
- * @since 3.0
- */
- protected AbstractLegacyDuplicateDetector getDuplicateDetector(String name) {
- String duplicateDetectorName = name.equals("default") ? "Stack Trace" : name;
- Set<AbstractLegacyDuplicateDetector> allDetectors = getDuplicateDetectorList();
-
- for (AbstractLegacyDuplicateDetector detector : allDetectors) {
- if (detector.getName().equals(duplicateDetectorName)) {
- return detector;
- }
- }
- // didn't find it
- return null;
- }
-
- /**
- * @since 3.0
- */
- protected Set<AbstractLegacyDuplicateDetector> getDuplicateDetectorList() {
- Set<AbstractLegacyDuplicateDetector> duplicateDetectors = new HashSet<AbstractLegacyDuplicateDetector>();
- for (AbstractDuplicateDetector abstractDuplicateDetector : TasksUiPlugin.getDefault()
- .getDuplicateSearchCollectorsList()) {
- if (abstractDuplicateDetector instanceof AbstractLegacyDuplicateDetector
- && (abstractDuplicateDetector.getConnectorKind() == null || abstractDuplicateDetector.getConnectorKind()
- .equals(getConnector().getConnectorKind()))) {
- duplicateDetectors.add((AbstractLegacyDuplicateDetector) abstractDuplicateDetector);
- }
- }
- return duplicateDetectors;
- }
-
- public boolean searchForDuplicates() {
- String duplicateDetectorName = duplicateDetectorChooser.getItem(duplicateDetectorChooser.getSelectionIndex());
- AbstractLegacyDuplicateDetector duplicateDetector = getDuplicateDetector(duplicateDetectorName);
- if (duplicateDetector != null) {
- RepositoryQuery duplicatesQuery = duplicateDetector.getDuplicatesQuery(repository, taskData);
- if (duplicatesQuery != null) {
- SearchHitCollector collector = new SearchHitCollector(TasksUiInternal.getTaskList(), repository,
- duplicatesQuery);
- NewSearchUI.runQueryInBackground(collector);
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * Adds content assist to the given text field.
- *
- * @param text
- * text field to decorate.
- * @param proposalProvider
- * instance providing content proposals
- * @return the ContentAssistCommandAdapter for the field.
- */
- protected ContentAssistCommandAdapter applyContentAssist(Text text, IContentProposalProvider proposalProvider) {
- ControlDecoration controlDecoration = new ControlDecoration(text, (SWT.TOP | SWT.LEFT));
- controlDecoration.setMarginWidth(0);
- controlDecoration.setShowHover(true);
- controlDecoration.setShowOnlyOnFocus(true);
-
- FieldDecoration contentProposalImage = FieldDecorationRegistry.getDefault().getFieldDecoration(
- FieldDecorationRegistry.DEC_CONTENT_PROPOSAL);
- controlDecoration.setImage(contentProposalImage.getImage());
-
- TextContentAdapter textContentAdapter = new TextContentAdapter();
-
- ContentAssistCommandAdapter adapter = new ContentAssistCommandAdapter(text, textContentAdapter,
- proposalProvider, "org.eclipse.ui.edit.text.contentAssist.proposals", new char[0]);
-
- IBindingService bindingService = (IBindingService) PlatformUI.getWorkbench().getService(IBindingService.class);
- controlDecoration.setDescriptionText(NLS.bind("Content Assist Available ({0})",
- bindingService.getBestActiveBindingFormattedFor(adapter.getCommandId())));
-
- return adapter;
- }
-
- /**
- * Creates an IContentProposalProvider to provide content assist proposals for the given attribute.
- *
- * @param attribute
- * attribute for which to provide content assist.
- * @return the IContentProposalProvider.
- */
- protected IContentProposalProvider createContentProposalProvider(RepositoryTaskAttribute attribute) {
- return new PersonProposalProvider(repositoryTask, taskData);
- }
-
- /**
- * Creates an IContentProposalProvider to provide content assist proposals for the given operation.
- *
- * @param operation
- * operation for which to provide content assist.
- * @return the IContentProposalProvider.
- */
- protected IContentProposalProvider createContentProposalProvider(RepositoryOperation operation) {
-
- return new PersonProposalProvider(repositoryTask, taskData);
- }
-
- protected ILabelProvider createProposalLabelProvider(RepositoryTaskAttribute attribute) {
- return new PersonProposalLabelProvider();
- }
-
- protected ILabelProvider createProposalLabelProvider(RepositoryOperation operation) {
-
- return new PersonProposalLabelProvider();
- }
-
- /**
- * Called to check if there's content assist available for the given attribute.
- *
- * @param attribute
- * the attribute
- * @return true if content assist is available for the specified attribute.
- */
- protected boolean hasContentAssist(RepositoryTaskAttribute attribute) {
- return false;
- }
-
- /**
- * Called to check if there's content assist available for the given operation.
- *
- * @param operation
- * the operation
- * @return true if content assist is available for the specified operation.
- */
- protected boolean hasContentAssist(RepositoryOperation operation) {
- return false;
- }
-
- /**
- * Adds a text editor with spell checking enabled to display and edit the task's summary.
- *
- * @author Raphael Ackermann (modifications) (bug 195514)
- * @param attributesComposite
- * The composite to add the text editor to.
- */
- protected void addSummaryText(Composite attributesComposite) {
- Composite summaryComposite = toolkit.createComposite(attributesComposite);
- GridLayout summaryLayout = new GridLayout(2, false);
- summaryLayout.verticalSpacing = 0;
- summaryLayout.marginHeight = 2;
- summaryComposite.setLayout(summaryLayout);
- GridDataFactory.fillDefaults().grab(true, false).applyTo(summaryComposite);
-
- if (taskData != null) {
- RepositoryTaskAttribute attribute = taskData.getAttribute(RepositoryTaskAttribute.SUMMARY);
- if (attribute == null) {
- taskData.setAttributeValue(RepositoryTaskAttribute.SUMMARY, "");
- attribute = taskData.getAttribute(RepositoryTaskAttribute.SUMMARY);
- }
-
- final RepositoryTaskAttribute summaryAttribute = attribute;
-
- summaryTextViewer = addTextEditor(repository, summaryComposite, attribute.getValue(), true, SWT.FLAT
- | SWT.SINGLE);
- Composite hiddenComposite = new Composite(summaryComposite, SWT.NONE);
- hiddenComposite.setLayout(new GridLayout());
- GridData hiddenLayout = new GridData();
- hiddenLayout.exclude = true;
- hiddenComposite.setLayoutData(hiddenLayout);
-
- // bugg#210695 - work around for 2.0 api breakage
- summaryText = new Text(hiddenComposite, SWT.NONE);
- summaryText.setText(attribute.getValue());
- summaryText.addKeyListener(new KeyListener() {
-
- public void keyPressed(KeyEvent e) {
- if (summaryTextViewer != null && !summaryTextViewer.getTextWidget().isDisposed()) {
- String newValue = summaryText.getText();
- String oldValue = summaryTextViewer.getTextWidget().getText();
- if (!newValue.equals(oldValue)) {
- summaryTextViewer.getTextWidget().setText(newValue);
- summaryAttribute.setValue(newValue);
- attributeChanged(summaryAttribute);
- }
- }
- }
-
- public void keyReleased(KeyEvent e) {
- // ignore
- }
- });
-
- summaryText.addFocusListener(new FocusListener() {
-
- public void focusGained(FocusEvent e) {
- summaryTextViewer.getTextWidget().setFocus();
- }
-
- public void focusLost(FocusEvent e) {
- // ignore
- }
- });
-
- summaryTextViewer.setEditable(true);
- summaryTextViewer.getTextWidget().setIndent(2);
- GridDataFactory.fillDefaults().grab(true, false).applyTo(summaryTextViewer.getControl());
-
- if (hasChanged(attribute)) {
- summaryTextViewer.getTextWidget().setBackground(colorIncoming);
- }
- summaryTextViewer.getControl().setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
-
- summaryTextViewer.addTextListener(new ITextListener() {
- public void textChanged(TextEvent event) {
- String newValue = summaryTextViewer.getTextWidget().getText();
- if (!newValue.equals(summaryAttribute.getValue())) {
- summaryAttribute.setValue(newValue);
- attributeChanged(summaryAttribute);
- }
- if (summaryText != null && !newValue.equals(summaryText.getText())) {
- summaryText.setText(newValue);
- }
- }
- });
-
- }
- toolkit.paintBordersFor(summaryComposite);
- }
-
- protected boolean supportsAttachmentDelete() {
- return false;
- }
-
- protected void deleteAttachment(RepositoryAttachment attachment) {
-
- }
-
- protected void createAttachmentLayout(Composite composite) {
- // TODO: expand to show new attachments
- Section section = createSection(composite, getSectionLabel(SECTION_NAME.ATTACHMENTS_SECTION), false);
- section.setText(section.getText() + " (" + taskData.getAttachments().size() + ")");
- final Composite attachmentsComposite = toolkit.createComposite(section);
- attachmentsComposite.setLayout(new GridLayout(1, false));
- attachmentsComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
- section.setClient(attachmentsComposite);
-
- if (taskData.getAttachments().size() > 0) {
-
- attachmentsTable = toolkit.createTable(attachmentsComposite, SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION);
- attachmentsTable.setLinesVisible(true);
- attachmentsTable.setHeaderVisible(true);
- attachmentsTable.setLayout(new GridLayout());
- GridData tableGridData = new GridData(SWT.FILL, SWT.FILL, true, true);
- attachmentsTable.setLayoutData(tableGridData);
-
- for (int i = 0; i < attachmentsColumns.length; i++) {
- TableColumn column = new TableColumn(attachmentsTable, SWT.LEFT, i);
- column.setText(attachmentsColumns[i]);
- column.setWidth(attachmentsColumnWidths[i]);
- }
- attachmentsTable.getColumn(3).setAlignment(SWT.RIGHT);
-
- attachmentsTableViewer = new TableViewer(attachmentsTable);
- attachmentsTableViewer.setUseHashlookup(true);
- attachmentsTableViewer.setColumnProperties(attachmentsColumns);
- ColumnViewerToolTipSupport.enableFor(attachmentsTableViewer, ToolTip.NO_RECREATE);
-
- final AbstractTaskDataHandler offlineHandler = connector.getLegacyTaskDataHandler();
- if (offlineHandler != null) {
- attachmentsTableViewer.setSorter(new ViewerSorter() {
- @Override
- public int compare(Viewer viewer, Object e1, Object e2) {
- RepositoryAttachment attachment1 = (RepositoryAttachment) e1;
- RepositoryAttachment attachment2 = (RepositoryAttachment) e2;
- Date created1 = taskData.getAttributeFactory().getDateForAttributeType(
- RepositoryTaskAttribute.ATTACHMENT_DATE, attachment1.getDateCreated());
- Date created2 = taskData.getAttributeFactory().getDateForAttributeType(
- RepositoryTaskAttribute.ATTACHMENT_DATE, attachment2.getDateCreated());
- if (created1 != null && created2 != null) {
- return created1.compareTo(created2);
- } else if (created1 == null && created2 != null) {
- return -1;
- } else if (created1 != null && created2 == null) {
- return 1;
- } else {
- return 0;
- }
- }
- });
- }
-
- attachmentsTableViewer.setContentProvider(new AttachmentsTableContentProvider(taskData.getAttachments()));
-
- attachmentsTableViewer.setLabelProvider(new AttachmentTableLabelProvider(this, new LabelProvider(),
- PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator()));
-
- attachmentsTableViewer.addDoubleClickListener(new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent event) {
- if (!event.getSelection().isEmpty()) {
- StructuredSelection selection = (StructuredSelection) event.getSelection();
- RepositoryAttachment attachment = (RepositoryAttachment) selection.getFirstElement();
- TasksUiUtil.openUrl(attachment.getUrl());
- }
- }
- });
-
- attachmentsTableViewer.setInput(taskData);
-
- final Action openWithBrowserAction = new Action(LABEL_BROWSER) {
- @Override
- public void run() {
- RepositoryAttachment attachment = (RepositoryAttachment) (((StructuredSelection) attachmentsTableViewer.getSelection()).getFirstElement());
- if (attachment != null) {
- TasksUiUtil.openUrl(attachment.getUrl());
- }
- }
- };
-
- final Action openWithDefaultAction = new Action(LABEL_DEFAULT_EDITOR) {
- @Override
- public void run() {
- // browser shortcut
- RepositoryAttachment attachment = (RepositoryAttachment) (((StructuredSelection) attachmentsTableViewer.getSelection()).getFirstElement());
- if (attachment == null) {
- return;
- }
-
- if (attachment.getContentType().endsWith(CTYPE_HTML)) {
- TasksUiUtil.openUrl(attachment.getUrl());
- return;
- }
-
- IStorageEditorInput input = new RepositoryAttachmentEditorInput(repository, attachment);
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- if (page == null) {
- return;
- }
- IEditorDescriptor desc = PlatformUI.getWorkbench().getEditorRegistry().getDefaultEditor(
- input.getName());
- try {
- page.openEditor(input, desc.getId());
- } catch (PartInitException e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Unable to open editor for: " + attachment.getDescription(), e));
- }
- }
- };
-
- final Action openWithTextEditorAction = new Action(LABEL_TEXT_EDITOR) {
- @Override
- public void run() {
- RepositoryAttachment attachment = (RepositoryAttachment) (((StructuredSelection) attachmentsTableViewer.getSelection()).getFirstElement());
- IStorageEditorInput input = new RepositoryAttachmentEditorInput(repository, attachment);
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- if (page == null) {
- return;
- }
-
- try {
- page.openEditor(input, "org.eclipse.ui.DefaultTextEditor");
- } catch (PartInitException e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Unable to open editor for: " + attachment.getDescription(), e));
- }
- }
- };
-
- final Action saveAction = new Action(LABEL_SAVE) {
- @Override
- public void run() {
- ITaskAttachment attachment = (ITaskAttachment) (((StructuredSelection) attachmentsTableViewer.getSelection()).getFirstElement());
- /* Launch Browser */
- FileDialog fileChooser = new FileDialog(attachmentsTable.getShell(), SWT.SAVE);
- String fname = attachment.getFileName();
- // Default name if none is found
- if (fname.equals("")) {
- String ctype = attachment.getContentType();
- if (ctype.endsWith(CTYPE_HTML)) {
- fname = ATTACHMENT_DEFAULT_NAME + ".html";
- } else if (ctype.startsWith(CTYPE_TEXT)) {
- fname = ATTACHMENT_DEFAULT_NAME + ".txt";
- } else if (ctype.endsWith(CTYPE_OCTET_STREAM)) {
- fname = ATTACHMENT_DEFAULT_NAME;
- } else if (ctype.endsWith(CTYPE_ZIP)) {
- fname = ATTACHMENT_DEFAULT_NAME + "." + CTYPE_ZIP;
- } else {
- fname = ATTACHMENT_DEFAULT_NAME + "." + ctype.substring(ctype.indexOf("/") + 1);
- }
- }
- fileChooser.setFileName(fname);
- String filePath = fileChooser.open();
- // Check if the dialog was canceled or an error occurred
- if (filePath == null) {
- return;
- }
-
- DownloadAttachmentJob job = new DownloadAttachmentJob(attachment, new File(filePath));
- job.setUser(true);
- job.schedule();
- }
- };
-
- final Action copyURLToClipAction = new Action(LABEL_COPY_URL_TO_CLIPBOARD) {
- @Override
- public void run() {
- RepositoryAttachment attachment = (RepositoryAttachment) (((StructuredSelection) attachmentsTableViewer.getSelection()).getFirstElement());
- Clipboard clip = new Clipboard(PlatformUI.getWorkbench().getDisplay());
- clip.setContents(new Object[] { attachment.getUrl() },
- new Transfer[] { TextTransfer.getInstance() });
- clip.dispose();
- }
- };
-
- final Action copyToClipAction = new Action(LABEL_COPY_TO_CLIPBOARD) {
- @Override
- public void run() {
- RepositoryAttachment attachment = (RepositoryAttachment) (((StructuredSelection) attachmentsTableViewer.getSelection()).getFirstElement());
- CopyAttachmentToClipboardJob job = new CopyAttachmentToClipboardJob(attachment);
- job.setUser(true);
- job.schedule();
- }
- };
-
- final MenuManager popupMenu = new MenuManager();
- final Menu menu = popupMenu.createContextMenu(attachmentsTable);
- attachmentsTable.setMenu(menu);
- final MenuManager openMenu = new MenuManager("Open With");
- popupMenu.addMenuListener(new IMenuListener() {
- public void menuAboutToShow(IMenuManager manager) {
- popupMenu.removeAll();
-
- IStructuredSelection selection = (IStructuredSelection) attachmentsTableViewer.getSelection();
- if (selection.isEmpty()) {
- return;
- }
-
- if (selection.size() == 1) {
- RepositoryAttachment att = (RepositoryAttachment) ((StructuredSelection) selection).getFirstElement();
-
- // reinitialize open menu
- popupMenu.add(openMenu);
- openMenu.removeAll();
-
- IStorageEditorInput input = new RepositoryAttachmentEditorInput(repository, att);
- IEditorDescriptor desc = PlatformUI.getWorkbench().getEditorRegistry().getDefaultEditor(
- input.getName());
- if (desc != null) {
- openMenu.add(openWithDefaultAction);
- }
- openMenu.add(openWithBrowserAction);
- openMenu.add(openWithTextEditorAction);
-
- popupMenu.add(new Separator());
- popupMenu.add(saveAction);
-
- popupMenu.add(copyURLToClipAction);
- if (att.getContentType().startsWith(CTYPE_TEXT) || att.getContentType().endsWith("xml")) {
- popupMenu.add(copyToClipAction);
- }
- }
- popupMenu.add(new Separator("actions"));
-
- // TODO: use workbench mechanism for this?
- ObjectActionContributorManager.getManager().contributeObjectActions(
- AbstractRepositoryTaskEditor.this, popupMenu, attachmentsTableViewer);
- }
- });
- } else {
- Label label = toolkit.createLabel(attachmentsComposite, "No attachments");
- registerDropListener(label);
- }
-
- final Composite attachmentControlsComposite = toolkit.createComposite(attachmentsComposite);
- attachmentControlsComposite.setLayout(new GridLayout(2, false));
- attachmentControlsComposite.setLayoutData(new GridData(GridData.BEGINNING));
-
- Button attachFileButton = toolkit.createButton(attachmentControlsComposite, AttachAction.LABEL, SWT.PUSH);
- attachFileButton.setImage(WorkbenchImages.getImage(ISharedImages.IMG_OBJ_FILE));
-
- Button attachScreenshotButton = toolkit.createButton(attachmentControlsComposite, AttachScreenshotAction.LABEL,
- SWT.PUSH);
- attachScreenshotButton.setImage(CommonImages.getImage(CommonImages.IMAGE_CAPTURE));
-
- final ITask task = TasksUiInternal.getTaskList().getTask(repository.getRepositoryUrl(), taskData.getTaskId());
- if (task == null) {
- attachFileButton.setEnabled(false);
- attachScreenshotButton.setEnabled(false);
- }
-
- attachFileButton.addSelectionListener(new SelectionListener() {
- public void widgetDefaultSelected(SelectionEvent e) {
- // ignore
- }
-
- public void widgetSelected(SelectionEvent e) {
- AbstractTaskEditorAction attachFileAction = new AttachAction();
- attachFileAction.selectionChanged(new StructuredSelection(task));
- attachFileAction.setEditor(parentEditor);
- attachFileAction.run();
- }
- });
-
- attachScreenshotButton.addSelectionListener(new SelectionListener() {
- public void widgetDefaultSelected(SelectionEvent e) {
- // ignore
- }
-
- public void widgetSelected(SelectionEvent e) {
- AttachScreenshotAction attachScreenshotAction = new AttachScreenshotAction();
- attachScreenshotAction.selectionChanged(new StructuredSelection(task));
- attachScreenshotAction.setEditor(parentEditor);
- attachScreenshotAction.run();
- }
- });
-
- Button deleteAttachmentButton = null;
- if (supportsAttachmentDelete()) {
- deleteAttachmentButton = toolkit.createButton(attachmentControlsComposite, "Delete Attachment...", SWT.PUSH);
-
- deleteAttachmentButton.addSelectionListener(new SelectionListener() {
- public void widgetDefaultSelected(SelectionEvent e) {
- // ignore
- }
-
- public void widgetSelected(SelectionEvent e) {
- ITask task = TasksUiInternal.getTaskList().getTask(repository.getRepositoryUrl(),
- taskData.getTaskId());
- if (task == null) {
- // Should not happen
- return;
- }
- if (AbstractRepositoryTaskEditor.this.isDirty
- || task.getSynchronizationState().equals(SynchronizationState.OUTGOING)) {
- MessageDialog.openInformation(attachmentsComposite.getShell(),
- "Task not synchronized or dirty editor",
- "Commit edits or synchronize task before deleting attachments.");
- return;
- } else {
- if (attachmentsTableViewer != null
- && attachmentsTableViewer.getSelection() != null
- && ((StructuredSelection) attachmentsTableViewer.getSelection()).getFirstElement() != null) {
- RepositoryAttachment attachment = (RepositoryAttachment) (((StructuredSelection) attachmentsTableViewer.getSelection()).getFirstElement());
- deleteAttachment(attachment);
- submitToRepository();
- }
- }
- }
- });
-
- }
- registerDropListener(section);
- registerDropListener(attachmentsComposite);
- registerDropListener(attachFileButton);
- if (supportsAttachmentDelete()) {
- registerDropListener(deleteAttachmentButton);
- }
- }
-
- private void registerDropListener(final Control control) {
- DropTarget target = new DropTarget(control, DND.DROP_COPY | DND.DROP_DEFAULT);
- final TextTransfer textTransfer = TextTransfer.getInstance();
- final FileTransfer fileTransfer = FileTransfer.getInstance();
- Transfer[] types = new Transfer[] { textTransfer, fileTransfer };
- target.setTransfer(types);
-
- // Adapted from eclipse.org DND Article by Veronika Irvine, IBM OTI Labs
- // http://www.eclipse.org/articles/Article-SWT-DND/DND-in-SWT.html#_dt10D
- target.addDropListener(new RepositoryTaskEditorDropListener(this, repository, taskData, fileTransfer,
- textTransfer, control));
- }
-
- protected void createDescriptionLayout(Composite composite) {
- Section descriptionSection = createSection(composite, getSectionLabel(SECTION_NAME.DESCRIPTION_SECTION));
- final Composite sectionComposite = toolkit.createComposite(descriptionSection);
- descriptionSection.setClient(sectionComposite);
- GridLayout addCommentsLayout = new GridLayout();
- addCommentsLayout.numColumns = 1;
- sectionComposite.setLayout(addCommentsLayout);
-
- RepositoryTaskAttribute attribute = taskData.getDescriptionAttribute();
- if (attribute != null && !attribute.isReadOnly()) {
- if (getRenderingEngine() != null) {
- // composite with StackLayout to hold text editor and preview widget
- Composite descriptionComposite = toolkit.createComposite(sectionComposite);
- descriptionComposite.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
- GridData descriptionGridData = new GridData(GridData.FILL_BOTH);
- descriptionGridData.widthHint = DESCRIPTION_WIDTH;
- descriptionGridData.minimumHeight = DESCRIPTION_HEIGHT;
- descriptionGridData.grabExcessHorizontalSpace = true;
- descriptionComposite.setLayoutData(descriptionGridData);
- final StackLayout descriptionLayout = new StackLayout();
- descriptionComposite.setLayout(descriptionLayout);
-
- descriptionTextViewer = addTextEditor(repository, descriptionComposite, taskData.getDescription(),
- true, SWT.FLAT | SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
- descriptionLayout.topControl = descriptionTextViewer.getControl();
- descriptionComposite.layout();
-
- // composite for edit/preview button
- Composite buttonComposite = toolkit.createComposite(sectionComposite);
- buttonComposite.setLayout(new GridLayout());
- createPreviewButton(buttonComposite, descriptionTextViewer, descriptionComposite, descriptionLayout);
- } else {
- descriptionTextViewer = addTextEditor(repository, sectionComposite, taskData.getDescription(), true,
- SWT.FLAT | SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
- final GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- // wrap text at this margin, see comment below
- gd.widthHint = DESCRIPTION_WIDTH;
- gd.minimumHeight = DESCRIPTION_HEIGHT;
- gd.grabExcessHorizontalSpace = true;
- descriptionTextViewer.getControl().setLayoutData(gd);
- descriptionTextViewer.getControl().setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
- // the goal is to make the text viewer as big as the text so it does not require scrolling when first drawn
- // on screen: when the descriptionTextViewer calculates its height it wraps the text according to the widthHint
- // which does not reflect the actual size of the widget causing the widget to be taller
- // (actual width > gd.widhtHint) or shorter (actual width < gd.widthHint) therefore the widthHint is tweaked
- // once in the listener
- sectionComposite.addControlListener(new ControlAdapter() {
- private boolean first;
-
- @Override
- public void controlResized(ControlEvent e) {
- if (!first) {
- first = true;
- int width = sectionComposite.getSize().x;
- Point size = descriptionTextViewer.getTextWidget().computeSize(width, SWT.DEFAULT, true);
- // limit width to parent widget
- gd.widthHint = width;
- // limit height to avoid dynamic resizing of the text widget
- gd.heightHint = Math.min(Math.max(DESCRIPTION_HEIGHT, size.y), DESCRIPTION_HEIGHT * 4);
- sectionComposite.layout();
- }
- }
- });
- }
- descriptionTextViewer.setEditable(true);
- descriptionTextViewer.addTextListener(new ITextListener() {
- public void textChanged(TextEvent event) {
- String newValue = descriptionTextViewer.getTextWidget().getText();
- RepositoryTaskAttribute attribute = taskData.getAttribute(RepositoryTaskAttribute.DESCRIPTION);
- if (attribute != null && !newValue.equals(attribute.getValue())) {
- attribute.setValue(newValue);
- attributeChanged(attribute);
- taskData.setDescription(newValue);
- }
- }
- });
- StyledText styledText = descriptionTextViewer.getTextWidget();
- controlBySelectableObject.put(taskData.getDescription(), styledText);
- } else {
- String text = taskData.getDescription();
- descriptionTextViewer = addTextViewer(repository, sectionComposite, text, SWT.MULTI | SWT.WRAP);
- StyledText styledText = descriptionTextViewer.getTextWidget();
- GridDataFactory.fillDefaults().hint(DESCRIPTION_WIDTH, SWT.DEFAULT).applyTo(
- descriptionTextViewer.getControl());
-
- controlBySelectableObject.put(text, styledText);
- }
-
- if (hasChanged(taskData.getAttribute(RepositoryTaskAttribute.DESCRIPTION))) {
- descriptionTextViewer.getTextWidget().setBackground(colorIncoming);
- }
- descriptionTextViewer.getTextWidget().addListener(SWT.FocusIn, new DescriptionListener());
-
- Composite replyComp = toolkit.createComposite(descriptionSection);
- replyComp.setLayout(new RowLayout());
- replyComp.setBackground(null);
-
- createReplyHyperlink(0, replyComp, taskData.getDescription());
- descriptionSection.setTextClient(replyComp);
- addDuplicateDetection(sectionComposite);
- toolkit.paintBordersFor(sectionComposite);
-
- if (descriptionTextViewer.isEditable()) {
- descriptionSection.setExpanded(true);
- }
- }
-
- protected ImageHyperlink createReplyHyperlink(final int commentNum, Composite composite, final String commentBody) {
- final ImageHyperlink replyLink = new ImageHyperlink(composite, SWT.NULL);
- toolkit.adapt(replyLink, true, true);
- replyLink.setImage(CommonImages.getImage(TasksUiImages.COMMENT_REPLY));
- replyLink.setToolTipText(LABEL_REPLY);
- // no need for the background - transparency will take care of it
- replyLink.setBackground(null);
- // replyLink.setBackground(section.getTitleBarGradientBackground());
- replyLink.addHyperlinkListener(new HyperlinkAdapter() {
- @Override
- public void linkActivated(HyperlinkEvent e) {
- String oldText = newCommentTextViewer.getDocument().get();
- StringBuilder strBuilder = new StringBuilder();
- strBuilder.append(oldText);
- if (strBuilder.length() != 0) {
- strBuilder.append("\n");
- }
- strBuilder.append(" (In reply to comment #" + commentNum + ")\n");
- CommentQuoter quoter = new CommentQuoter();
- strBuilder.append(quoter.quote(commentBody));
- newCommentTextViewer.getDocument().set(strBuilder.toString());
- RepositoryTaskAttribute attribute = taskData.getAttribute(RepositoryTaskAttribute.COMMENT_NEW);
- if (attribute != null) {
- attribute.setValue(strBuilder.toString());
- attributeChanged(attribute);
- }
- selectNewComment();
- newCommentTextViewer.getTextWidget().setCaretOffset(strBuilder.length());
- }
- });
-
- return replyLink;
- }
-
- protected void addDuplicateDetection(Composite composite) {
- List<AbstractLegacyDuplicateDetector> allCollectors = new ArrayList<AbstractLegacyDuplicateDetector>();
- if (getDuplicateDetectorList() != null) {
- allCollectors.addAll(getDuplicateDetectorList());
- }
- if (!allCollectors.isEmpty()) {
- Section duplicatesSection = toolkit.createSection(composite, ExpandableComposite.TWISTIE
- | ExpandableComposite.SHORT_TITLE_BAR);
- duplicatesSection.setText(LABEL_SELECT_DETECTOR);
- duplicatesSection.setLayout(new GridLayout());
- GridDataFactory.fillDefaults().indent(SWT.DEFAULT, 15).applyTo(duplicatesSection);
- Composite relatedBugsComposite = toolkit.createComposite(duplicatesSection);
- relatedBugsComposite.setLayout(new GridLayout(4, false));
- relatedBugsComposite.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
- duplicatesSection.setClient(relatedBugsComposite);
- duplicateDetectorLabel = new Label(relatedBugsComposite, SWT.LEFT);
- duplicateDetectorLabel.setText("Detector:");
-
- duplicateDetectorChooser = new CCombo(relatedBugsComposite, SWT.FLAT | SWT.READ_ONLY);
- toolkit.adapt(duplicateDetectorChooser, true, true);
- duplicateDetectorChooser.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
- duplicateDetectorChooser.setFont(TEXT_FONT);
- duplicateDetectorChooser.setLayoutData(GridDataFactory.swtDefaults().hint(150, SWT.DEFAULT).create());
-
- Collections.sort(allCollectors, new Comparator<AbstractLegacyDuplicateDetector>() {
-
- public int compare(AbstractLegacyDuplicateDetector c1, AbstractLegacyDuplicateDetector c2) {
- return c1.getName().compareToIgnoreCase(c2.getName());
- }
-
- });
-
- for (AbstractLegacyDuplicateDetector detector : allCollectors) {
- duplicateDetectorChooser.add(detector.getName());
- }
-
- duplicateDetectorChooser.select(0);
- duplicateDetectorChooser.setEnabled(true);
- duplicateDetectorChooser.setData(allCollectors);
-
- if (allCollectors.size() > 0) {
-
- searchForDuplicates = toolkit.createButton(relatedBugsComposite, LABEL_SEARCH_DUPS, SWT.NONE);
- GridData searchDuplicatesButtonData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- searchForDuplicates.setLayoutData(searchDuplicatesButtonData);
- searchForDuplicates.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- searchForDuplicates();
- }
- });
- }
-// } else {
-// Label label = new Label(composite, SWT.LEFT);
-// label.setText(LABEL_NO_DETECTOR);
-
- toolkit.paintBordersFor(relatedBugsComposite);
-
- }
-
- }
-
- protected void createCustomAttributeLayout(Composite composite) {
- // override
- }
-
- protected void createPeopleLayout(Composite composite) {
- Section peopleSection = createSection(composite, getSectionLabel(SECTION_NAME.PEOPLE_SECTION));
- GridDataFactory.fillDefaults().align(SWT.FILL, SWT.TOP).grab(true, true).applyTo(peopleSection);
- Composite peopleComposite = toolkit.createComposite(peopleSection);
- GridLayout layout = new GridLayout(2, false);
- layout.marginWidth = 5;
- peopleComposite.setLayout(layout);
-
- addAssignedTo(peopleComposite);
- boolean haveRealName = false;
- RepositoryTaskAttribute reporterAttribute = taskData.getAttribute(RepositoryTaskAttribute.USER_REPORTER_NAME);
- if (reporterAttribute == null) {
- reporterAttribute = taskData.getAttribute(RepositoryTaskAttribute.USER_REPORTER);
- } else {
- haveRealName = true;
- }
- if (reporterAttribute != null) {
- Label label = createLabel(peopleComposite, reporterAttribute);
- GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(label);
- Text textField = createTextField(peopleComposite, reporterAttribute, SWT.FLAT | SWT.READ_ONLY);
- GridDataFactory.fillDefaults().grab(true, false).applyTo(textField);
- if (haveRealName) {
- textField.setText(textField.getText() + " <"
- + taskData.getAttributeValue(RepositoryTaskAttribute.USER_REPORTER) + ">");
- }
- }
- addSelfToCC(peopleComposite);
- addCCList(peopleComposite);
- getManagedForm().getToolkit().paintBordersFor(peopleComposite);
- peopleSection.setClient(peopleComposite);
- peopleSection.setEnabled(true);
- }
-
- protected void addCCList(Composite attributesComposite) {
-
- RepositoryTaskAttribute addCCattribute = taskData.getAttribute(RepositoryTaskAttribute.NEW_CC);
- if (addCCattribute == null) {
- // TODO: remove once TRAC is priming taskData with NEW_CC attribute
- taskData.setAttributeValue(RepositoryTaskAttribute.NEW_CC, "");
- addCCattribute = taskData.getAttribute(RepositoryTaskAttribute.NEW_CC);
- }
- if (addCCattribute != null) {
- Label label = createLabel(attributesComposite, addCCattribute);
- GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(label);
- Text text = createTextField(attributesComposite, addCCattribute, SWT.FLAT);
- GridDataFactory.fillDefaults().hint(150, SWT.DEFAULT).applyTo(text);
-
- if (hasContentAssist(addCCattribute)) {
- ContentAssistCommandAdapter adapter = applyContentAssist(text,
- createContentProposalProvider(addCCattribute));
- ILabelProvider propsalLabelProvider = createProposalLabelProvider(addCCattribute);
- if (propsalLabelProvider != null) {
- adapter.setLabelProvider(propsalLabelProvider);
- }
- adapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
- }
- }
-
- RepositoryTaskAttribute CCattribute = taskData.getAttribute(RepositoryTaskAttribute.USER_CC);
- if (CCattribute != null) {
- Label label = createLabel(attributesComposite, CCattribute);
- GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.TOP).applyTo(label);
- ccList = new org.eclipse.swt.widgets.List(attributesComposite, SWT.MULTI | SWT.V_SCROLL);// SWT.BORDER
- ccList.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
- ccList.setFont(TEXT_FONT);
- GridData ccListData = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- ccListData.horizontalSpan = 1;
- ccListData.widthHint = 150;
- ccListData.heightHint = 95;
- ccList.setLayoutData(ccListData);
- if (hasChanged(taskData.getAttribute(RepositoryTaskAttribute.USER_CC))) {
- ccList.setBackground(colorIncoming);
- }
- java.util.List<String> ccs = taskData.getCc();
- if (ccs != null) {
- for (String cc : ccs) {
- ccList.add(cc);
- }
- }
- java.util.List<String> removedCCs = taskData.getAttributeValues(RepositoryTaskAttribute.REMOVE_CC);
- if (removedCCs != null) {
- for (String item : removedCCs) {
- int i = ccList.indexOf(item);
- if (i != -1) {
- ccList.select(i);
- }
- }
- }
- ccList.addSelectionListener(new SelectionListener() {
-
- public void widgetSelected(SelectionEvent e) {
- for (String cc : ccList.getItems()) {
- int index = ccList.indexOf(cc);
- if (ccList.isSelected(index)) {
- List<String> remove = taskData.getAttributeValues(RepositoryTaskAttribute.REMOVE_CC);
- if (!remove.contains(cc)) {
- taskData.addAttributeValue(RepositoryTaskAttribute.REMOVE_CC, cc);
- }
- } else {
- taskData.removeAttributeValue(RepositoryTaskAttribute.REMOVE_CC, cc);
- }
- }
- attributeChanged(taskData.getAttribute(RepositoryTaskAttribute.REMOVE_CC));
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- }
- });
- toolkit.createLabel(attributesComposite, "");
- label = toolkit.createLabel(attributesComposite, "(Select to remove)");
- GridDataFactory.fillDefaults().align(SWT.CENTER, SWT.CENTER).applyTo(label);
- }
-
- }
-
- /**
- * A listener for selection of the summary field.
- *
- * @since 2.1
- */
- protected class DescriptionListener implements Listener {
- public DescriptionListener() {
- }
-
- public void handleEvent(Event event) {
- fireSelectionChanged(new SelectionChangedEvent(selectionProvider, new StructuredSelection(
- new RepositoryTaskSelection(taskData.getTaskId(), taskData.getRepositoryUrl(),
- taskData.getConnectorKind(), getSectionLabel(SECTION_NAME.DESCRIPTION_SECTION), true,
- taskData.getSummary()))));
- }
- }
-
- protected boolean supportsCommentDelete() {
- return false;
- }
-
- protected void deleteComment(TaskComment comment) {
-
- }
-
- private boolean expandCommentSection() {
- for (final TaskComment taskComment : taskData.getComments()) {
- if ((repositoryTask != null && repositoryTask.getLastReadTimeStamp() == null)
- || editorInput.getOldTaskData() == null) {
- return true;
- } else if (isNewComment(taskComment)) {
- return true;
- }
- }
-
- if (taskData.getComments() == null || taskData.getComments().size() == 0) {
- return false;
- } else if (editorInput.getTaskData() != null && editorInput.getOldTaskData() != null) {
- List<TaskComment> newTaskComments = editorInput.getTaskData().getComments();
- List<TaskComment> oldTaskComments = editorInput.getOldTaskData().getComments();
- if (newTaskComments == null || oldTaskComments == null) {
- return true;
- } else if (newTaskComments.size() != oldTaskComments.size()) {
- return true;
- }
- }
- return false;
- }
-
- protected void createCommentLayout(Composite composite) {
- commentsSection = createSection(composite, getSectionLabel(SECTION_NAME.COMMENTS_SECTION),
- expandCommentSection());
- commentsSection.setText(commentsSection.getText() + " (" + taskData.getComments().size() + ")");
-
- final Composite commentsSectionClient = toolkit.createComposite(commentsSection);
- RowLayout rowLayout = new RowLayout();
- rowLayout.pack = true;
- rowLayout.marginLeft = 0;
- rowLayout.marginBottom = 0;
- rowLayout.marginTop = 0;
- commentsSectionClient.setLayout(rowLayout);
- commentsSectionClient.setBackground(null);
-
- if (supportsCommentSort()) {
- sortHyperlink = new ImageHyperlink(commentsSectionClient, SWT.NONE);
- sortHyperlink.setToolTipText("Change order of comments");
- toolkit.adapt(sortHyperlink, true, true);
- sortHyperlink.setBackground(null);
-
- sortHyperlink.addHyperlinkListener(new HyperlinkAdapter() {
- @Override
- public void linkActivated(HyperlinkEvent e) {
- sortComments();
- }
- });
- sortHyperlinkState(false);
- }
-
- if (taskData.getComments().size() > 0) {
- commentsSection.setEnabled(true);
- commentsSection.addExpansionListener(new ExpansionAdapter() {
- @Override
- public void expansionStateChanged(ExpansionEvent e) {
- if (commentsSection.isExpanded()) {
- if (supportsCommentSort()) {
- sortHyperlinkState(true);
- }
- } else {
- if (supportsCommentSort()) {
- sortHyperlinkState(false);
- }
- }
- }
- });
-
- ImageHyperlink collapseAllHyperlink = new ImageHyperlink(commentsSectionClient, SWT.NONE);
- collapseAllHyperlink.setToolTipText("Collapse All Comments");
- toolkit.adapt(collapseAllHyperlink, true, true);
- collapseAllHyperlink.setBackground(null);
- collapseAllHyperlink.setImage(CommonImages.getImage(CommonImages.COLLAPSE_ALL));
- collapseAllHyperlink.addHyperlinkListener(new HyperlinkAdapter() {
- @Override
- public void linkActivated(HyperlinkEvent e) {
- hideAllComments();
- }
- });
-
- ImageHyperlink expandAllHyperlink = new ImageHyperlink(commentsSectionClient, SWT.NONE);
- expandAllHyperlink.setToolTipText("Expand All Comments");
- toolkit.adapt(expandAllHyperlink, true, true);
- expandAllHyperlink.setBackground(null);
- expandAllHyperlink.setImage(CommonImages.getImage(CommonImages.EXPAND_ALL));
- expandAllHyperlink.addHyperlinkListener(new HyperlinkAdapter() {
- @Override
- public void linkActivated(HyperlinkEvent e) {
- BusyIndicator.showWhile(getControl().getDisplay(), new Runnable() {
- public void run() {
- revealAllComments();
- if (supportsCommentSort()) {
- sortHyperlinkState(true);
- }
- }
- });
- }
- });
- commentsSection.setTextClient(commentsSectionClient);
- } else {
- commentsSection.setEnabled(false);
- }
-
- // Additional (read-only) Comments Area
- addCommentsComposite = toolkit.createComposite(commentsSection);
- commentsSection.setClient(addCommentsComposite);
- GridLayout addCommentsLayout = new GridLayout();
- addCommentsLayout.numColumns = 1;
- addCommentsComposite.setLayout(addCommentsLayout);
- GridDataFactory.fillDefaults().grab(true, false).applyTo(addCommentsComposite);
-
- boolean foundNew = false;
-
- for (final TaskComment taskComment : taskData.getComments()) {
- final ExpandableComposite expandableComposite = toolkit.createExpandableComposite(addCommentsComposite,
- ExpandableComposite.TREE_NODE | ExpandableComposite.LEFT_TEXT_CLIENT_ALIGNMENT);
-
- expandableComposite.setTitleBarForeground(toolkit.getColors().getColor(IFormColors.TITLE));
-
- final Composite toolbarComp = toolkit.createComposite(expandableComposite);
- rowLayout = new RowLayout();
- rowLayout.pack = true;
- rowLayout.marginLeft = 0;
- rowLayout.marginBottom = 0;
- rowLayout.marginTop = 0;
- toolbarComp.setLayout(rowLayout);
- toolbarComp.setBackground(null);
-
- ImageHyperlink formHyperlink = toolkit.createImageHyperlink(toolbarComp, SWT.NONE);
- formHyperlink.setBackground(null);
- formHyperlink.setFont(expandableComposite.getFont());
- formHyperlink.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
- if (taskComment.getAuthor() != null && taskComment.getAuthor().equalsIgnoreCase(repository.getUserName())) {
- formHyperlink.setImage(CommonImages.getImage(CommonImages.PERSON_ME_NARROW));
- } else {
- formHyperlink.setImage(CommonImages.getImage(CommonImages.PERSON_NARROW));
- }
-
- String authorName = taskComment.getAuthorName();
- String tooltipText = taskComment.getAuthor();
- if (authorName.length() == 0) {
- authorName = taskComment.getAuthor();
- tooltipText = null;
- }
-
- formHyperlink.setText(taskComment.getNumber() + ": " + authorName + ", "
- + formatDate(taskComment.getCreated()));
-
- formHyperlink.setToolTipText(tooltipText);
- formHyperlink.setEnabled(true);
- formHyperlink.setUnderlined(false);
-
- final Composite toolbarButtonComp = toolkit.createComposite(toolbarComp);
- RowLayout buttonCompLayout = new RowLayout();
- buttonCompLayout.marginBottom = 0;
- buttonCompLayout.marginTop = 0;
- toolbarButtonComp.setLayout(buttonCompLayout);
- toolbarButtonComp.setBackground(null);
-
- if (supportsCommentDelete()) {
- final ImageHyperlink deleteComment = new ImageHyperlink(toolbarButtonComp, SWT.NULL);
- toolkit.adapt(deleteComment, true, true);
- deleteComment.setImage(CommonImages.getImage(CommonImages.REMOVE));
- deleteComment.setToolTipText("Remove");
-
- deleteComment.addHyperlinkListener(new HyperlinkAdapter() {
-
- @Override
- public void linkActivated(HyperlinkEvent e) {
- deleteComment(taskComment);
- submitToRepository();
- }
- });
-
- }
-
- final ImageHyperlink replyLink = createReplyHyperlink(taskComment.getNumber(), toolbarButtonComp,
- taskComment.getText());
-
- formHyperlink.addHyperlinkListener(new HyperlinkAdapter() {
-
- @Override
- public void linkActivated(HyperlinkEvent e) {
- toggleExpandableComposite(!expandableComposite.isExpanded(), expandableComposite);
- }
-
- @Override
- public void linkEntered(HyperlinkEvent e) {
- replyLink.setUnderlined(true);
- super.linkEntered(e);
- }
-
- @Override
- public void linkExited(HyperlinkEvent e) {
- replyLink.setUnderlined(false);
- super.linkExited(e);
- }
- });
-
- expandableComposite.setTextClient(toolbarComp);
-
- toolbarButtonComp.setVisible(expandableComposite.isExpanded());
-
- // HACK: This is necessary
- // due to a bug in SWT's ExpandableComposite.
- // 165803: Expandable bars should expand when clicking anywhere
- // https://bugs.eclipse.org/bugs/show_bug.cgi?taskId=165803
- expandableComposite.setData(toolbarButtonComp);
-
- expandableComposite.setLayout(new GridLayout());
- expandableComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- final Composite ecComposite = toolkit.createComposite(expandableComposite);
- GridLayout ecLayout = new GridLayout();
- ecLayout.marginHeight = 0;
- ecLayout.marginBottom = 3;
- ecLayout.marginLeft = 15;
- ecComposite.setLayout(ecLayout);
- ecComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- expandableComposite.setClient(ecComposite);
- // code for outline
- commentComposites.add(expandableComposite);
- controlBySelectableObject.put(taskComment, expandableComposite);
- expandableComposite.addExpansionListener(new ExpansionAdapter() {
- @Override
- public void expansionStateChanged(ExpansionEvent e) {
- toolbarButtonComp.setVisible(expandableComposite.isExpanded());
- TextViewer viewer = null;
- if (e.getState() && expandableComposite.getData("viewer") == null) {
- viewer = addTextViewer(repository, ecComposite, taskComment.getText().trim(), SWT.MULTI
- | SWT.WRAP);
- expandableComposite.setData("viewer", viewer.getTextWidget());
- viewer.getTextWidget().addFocusListener(new FocusListener() {
-
- public void focusGained(FocusEvent e) {
- selectedComment = taskComment;
-
- }
-
- public void focusLost(FocusEvent e) {
- selectedComment = null;
- }
- });
-
- StyledText styledText = viewer.getTextWidget();
- GridDataFactory.fillDefaults().hint(DESCRIPTION_WIDTH, SWT.DEFAULT).applyTo(styledText);
- resetLayout();
- } else {
- // dispose viewer
- if (expandableComposite.getData("viewer") instanceof StyledText) {
- ((StyledText) expandableComposite.getData("viewer")).dispose();
- expandableComposite.setData("viewer", null);
- }
- resetLayout();
- }
- }
- });
-
- if ((repositoryTask != null && repositoryTask.getLastReadTimeStamp() == null)
- || editorInput.getOldTaskData() == null) {
- // hit or lost task data, expose all comments
- toggleExpandableComposite(true, expandableComposite);
- foundNew = true;
- } else if (isNewComment(taskComment)) {
- expandableComposite.setBackground(colorIncoming);
- toggleExpandableComposite(true, expandableComposite);
- foundNew = true;
- }
-
- }
- if (supportsCommentSort()) {
- if (commentSortIsUp) {
- commentSortIsUp = !commentSortIsUp;
- sortComments();
- } else {
- sortHyperlinkState(commentSortEnable);
- }
- }
- if (foundNew) {
- if (supportsCommentSort()) {
- sortHyperlinkState(true);
- }
- } else if (taskData.getComments() == null || taskData.getComments().size() == 0) {
- if (supportsCommentSort()) {
- sortHyperlinkState(false);
- }
- } else if (editorInput.getTaskData() != null && editorInput.getOldTaskData() != null) {
- List<TaskComment> newTaskComments = editorInput.getTaskData().getComments();
- List<TaskComment> oldTaskComments = editorInput.getOldTaskData().getComments();
- if (newTaskComments == null || oldTaskComments == null) {
- if (supportsCommentSort()) {
- sortHyperlinkState(true);
- }
- } else if (newTaskComments.size() != oldTaskComments.size()) {
- if (supportsCommentSort()) {
- sortHyperlinkState(true);
- }
- }
- }
- }
-
- public String formatDate(String dateString) {
- return dateString;
- }
-
- private boolean isNewComment(TaskComment comment) {
-
- // Simple test (will not reveal new comments if offline data was lost
- if (editorInput.getOldTaskData() != null) {
- return (comment.getNumber() > editorInput.getOldTaskData().getComments().size());
- }
- return false;
-
- // OLD METHOD FOR DETERMINING NEW COMMENTS
- // if (repositoryTask != null) {
- // if (repositoryTask.getLastSyncDateStamp() == null) {
- // // new hit
- // return true;
- // }
- // AbstractRepositoryConnector connector = (AbstractRepositoryConnector)
- // TasksUiPlugin.getRepositoryManager()
- // .getRepositoryConnector(taskData.getRepositoryKind());
- // AbstractTaskDataHandler offlineHandler = connector.getTaskDataHandler();
- // if (offlineHandler != null) {
- //
- // Date lastSyncDate =
- // taskData.getAttributeFactory().getDateForAttributeType(
- // RepositoryTaskAttribute.DATE_MODIFIED,
- // repositoryTask.getLastSyncDateStamp());
- //
- // if (lastSyncDate != null) {
- //
- // // reduce granularity to minutes
- // Calendar calLastMod = Calendar.getInstance();
- // calLastMod.setTimeInMillis(lastSyncDate.getTime());
- // calLastMod.set(Calendar.SECOND, 0);
- //
- // Date commentDate =
- // taskData.getAttributeFactory().getDateForAttributeType(
- // RepositoryTaskAttribute.COMMENT_DATE, comment.getCreated());
- // if (commentDate != null) {
- //
- // Calendar calComment = Calendar.getInstance();
- // calComment.setTimeInMillis(commentDate.getTime());
- // calComment.set(Calendar.SECOND, 0);
- // if (calComment.after(calLastMod)) {
- // return true;
- // }
- // }
- // }
- // }
- // }
- // return false;
-
- }
-
- /**
- * Subclasses that support HTML preview of ticket description and comments override this method to return an
- * instance of AbstractRenderingEngine
- *
- * @return <code>null</code> if HTML preview is not supported for the repository (default)
- * @since 2.1
- */
- protected AbstractRenderingEngine getRenderingEngine() {
- return null;
- }
-
- protected void createNewCommentLayout(Composite composite) {
- // Section newCommentSection = createSection(composite,
- // getSectionLabel(SECTION_NAME.NEWCOMMENT_SECTION));
-
- Section newCommentSection = toolkit.createSection(composite, ExpandableComposite.TITLE_BAR);
- newCommentSection.setText(getSectionLabel(SECTION_NAME.NEWCOMMENT_SECTION));
- newCommentSection.setLayout(new GridLayout());
- newCommentSection.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- Composite newCommentsComposite = toolkit.createComposite(newCommentSection);
- newCommentsComposite.setLayout(new GridLayout());
-
- // HACK: new new comment attribute not created by connector, create one.
- if (taskData.getAttribute(RepositoryTaskAttribute.COMMENT_NEW) == null) {
- taskData.setAttributeValue(RepositoryTaskAttribute.COMMENT_NEW, "");
- }
- final RepositoryTaskAttribute attribute = taskData.getAttribute(RepositoryTaskAttribute.COMMENT_NEW);
-
- if (getRenderingEngine() != null) {
- // composite with StackLayout to hold text editor and preview widget
- Composite editPreviewComposite = toolkit.createComposite(newCommentsComposite);
- GridData editPreviewData = new GridData(GridData.FILL_BOTH);
- editPreviewData.widthHint = DESCRIPTION_WIDTH;
- editPreviewData.minimumHeight = DESCRIPTION_HEIGHT;
- editPreviewData.grabExcessHorizontalSpace = true;
- editPreviewComposite.setLayoutData(editPreviewData);
- editPreviewComposite.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
-
- final StackLayout editPreviewLayout = new StackLayout();
- editPreviewComposite.setLayout(editPreviewLayout);
-
- newCommentTextViewer = addTextEditor(repository, editPreviewComposite, attribute.getValue(), true, SWT.FLAT
- | SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
-
- editPreviewLayout.topControl = newCommentTextViewer.getControl();
- editPreviewComposite.layout();
-
- // composite for edit/preview button
- Composite buttonComposite = toolkit.createComposite(newCommentsComposite);
- buttonComposite.setLayout(new GridLayout());
- createPreviewButton(buttonComposite, newCommentTextViewer, editPreviewComposite, editPreviewLayout);
- } else {
- newCommentTextViewer = addTextEditor(repository, newCommentsComposite, attribute.getValue(), true, SWT.FLAT
- | SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
- GridData addCommentsTextData = new GridData(GridData.FILL_BOTH);
- addCommentsTextData.widthHint = DESCRIPTION_WIDTH;
- addCommentsTextData.minimumHeight = DESCRIPTION_HEIGHT;
- addCommentsTextData.grabExcessHorizontalSpace = true;
- newCommentTextViewer.getControl().setLayoutData(addCommentsTextData);
- newCommentTextViewer.getControl().setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
- }
- newCommentTextViewer.setEditable(true);
- newCommentTextViewer.addTextListener(new ITextListener() {
- public void textChanged(TextEvent event) {
- String newValue = addCommentsTextBox.getText();
- if (!newValue.equals(attribute.getValue())) {
- attribute.setValue(newValue);
- attributeChanged(attribute);
- }
- }
- });
-
- newCommentTextViewer.getTextWidget().addListener(SWT.FocusIn, new NewCommentListener());
- addCommentsTextBox = newCommentTextViewer.getTextWidget();
-
- newCommentSection.setClient(newCommentsComposite);
-
- toolkit.paintBordersFor(newCommentsComposite);
- }
-
- private Browser addBrowser(Composite parent, int style) {
- Browser browser = new Browser(parent, style);
- // intercept links to open tasks in rich editor and urls in separate browser
- browser.addLocationListener(new LocationAdapter() {
- @Override
- public void changing(LocationEvent event) {
- // ignore events that are caused by manually setting the contents of the browser
- if (ignoreLocationEvents) {
- return;
- }
-
- if (event.location != null && !event.location.startsWith("about")) {
- event.doit = false;
- IHyperlink link = new TaskUrlHyperlink(
- new Region(0, 0)/* a fake region just to make constructor happy */, event.location);
- link.open();
- }
- }
-
- });
-
- return browser;
- }
-
- /**
- * Creates and sets up the button for switching between text editor and HTML preview. Subclasses that support HTML
- * preview of new comments must override this method.
- *
- * @param buttonComposite
- * the composite that holds the button
- * @param editor
- * the TextViewer for editing text
- * @param previewBrowser
- * the Browser for displaying the preview
- * @param editorLayout
- * the StackLayout of the <code>editorComposite</code>
- * @param editorComposite
- * the composite that holds <code>editor</code> and <code>previewBrowser</code>
- * @since 2.1
- */
- private void createPreviewButton(final Composite buttonComposite, final TextViewer editor,
- final Composite editorComposite, final StackLayout editorLayout) {
- // create an anonymous object that encapsulates the edit/preview button together with
- // its state and String constants for button text;
- // this implementation keeps all information needed to set up the button
- // in this object and the method parameters, and this method is reused by both the
- // description section and new comments section.
- new Object() {
- private static final String LABEL_BUTTON_PREVIEW = "Preview";
-
- private static final String LABEL_BUTTON_EDIT = "Edit";
-
- private int buttonState = 0;
-
- private Button previewButton;
-
- private Browser previewBrowser;
-
- {
- previewButton = toolkit.createButton(buttonComposite, LABEL_BUTTON_PREVIEW, SWT.PUSH);
- GridData previewButtonData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- previewButtonData.widthHint = 100;
- //previewButton.setImage(TasksUiImages.getImage(TasksUiImages.PREVIEW));
- previewButton.setLayoutData(previewButtonData);
- previewButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- if (previewBrowser == null) {
- previewBrowser = addBrowser(editorComposite, SWT.NONE);
- }
-
- buttonState = ++buttonState % 2;
- if (buttonState == 1) {
- setText(previewBrowser, "Loading preview...");
- previewWiki(previewBrowser, editor.getTextWidget().getText());
- }
- previewButton.setText(buttonState == 0 ? LABEL_BUTTON_PREVIEW : LABEL_BUTTON_EDIT);
- editorLayout.topControl = (buttonState == 0 ? editor.getControl() : previewBrowser);
- editorComposite.layout();
- }
- });
- }
-
- };
- }
-
- private void setText(Browser browser, String html) {
- try {
- ignoreLocationEvents = true;
- browser.setText((html != null) ? html : "");
- } finally {
- ignoreLocationEvents = false;
- }
-
- }
-
- private void previewWiki(final Browser browser, String sourceText) {
- final class PreviewWikiJob extends Job {
- private final String sourceText;
-
- private String htmlText;
-
- private IStatus jobStatus;
-
- public PreviewWikiJob(String sourceText) {
- super("Formatting Wiki Text");
-
- if (sourceText == null) {
- throw new IllegalArgumentException("source text must not be null");
- }
-
- this.sourceText = sourceText;
- }
-
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- AbstractRenderingEngine htmlRenderingEngine = getRenderingEngine();
- if (htmlRenderingEngine == null) {
- jobStatus = new RepositoryStatus(repository, IStatus.INFO, TasksUiPlugin.ID_PLUGIN,
- RepositoryStatus.ERROR_INTERNAL, "The repository does not support HTML preview.");
- return Status.OK_STATUS;
- }
-
- jobStatus = Status.OK_STATUS;
- try {
- htmlText = htmlRenderingEngine.renderAsHtml(repository, sourceText, monitor);
- } catch (CoreException e) {
- jobStatus = e.getStatus();
- }
- return Status.OK_STATUS;
- }
-
- public String getHtmlText() {
- return htmlText;
- }
-
- public IStatus getStatus() {
- return jobStatus;
- }
-
- }
-
- final PreviewWikiJob job = new PreviewWikiJob(sourceText);
-
- job.addJobChangeListener(new JobChangeAdapter() {
-
- @Override
- public void done(final IJobChangeEvent event) {
- if (!form.isDisposed()) {
- if (job.getStatus().isOK()) {
- getPartControl().getDisplay().asyncExec(new Runnable() {
- public void run() {
- AbstractRepositoryTaskEditor.this.setText(browser, job.getHtmlText());
- parentEditor.setMessage(null, IMessageProvider.NONE);
- }
- });
- } else {
- getPartControl().getDisplay().asyncExec(new Runnable() {
- public void run() {
- parentEditor.setMessage(job.getStatus().getMessage(), IMessageProvider.ERROR);
- }
- });
- }
- }
- super.done(event);
- }
- });
-
- job.setUser(true);
- job.schedule();
- }
-
- /**
- * Creates the button layout. This displays options and buttons at the bottom of the editor to allow actions to be
- * performed on the bug.
- */
- protected void createActionsLayout(Composite composite) {
- Section section = createSection(composite, getSectionLabel(SECTION_NAME.ACTIONS_SECTION));
- GridDataFactory.fillDefaults().align(SWT.FILL, SWT.TOP).grab(true, true).applyTo(section);
- Composite buttonComposite = toolkit.createComposite(section);
- GridLayout buttonLayout = new GridLayout();
- GridDataFactory.fillDefaults().align(SWT.FILL, SWT.TOP).applyTo(buttonComposite);
- buttonLayout.numColumns = 4;
- buttonComposite.setLayout(buttonLayout);
- addRadioButtons(buttonComposite);
- addActionButtons(buttonComposite);
- section.setClient(buttonComposite);
- }
-
- protected Section createSection(Composite composite, String title) {
- return createSection(composite, title, true);
- }
-
- /**
- * @Since 2.3
- */
- private Section createSection(Composite composite, String title, boolean expandedState) {
- int style = ExpandableComposite.TITLE_BAR | Section.TWISTIE;
- if (expandedState) {
- style |= ExpandableComposite.EXPANDED;
- }
- Section section = toolkit.createSection(composite, style);
- section.setText(title);
- section.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- return section;
- }
-
- /**
- * Adds buttons to this composite. Subclasses can override this method to provide different/additional buttons.
- *
- * @param buttonComposite
- * Composite to add the buttons to.
- */
- protected void addActionButtons(Composite buttonComposite) {
- submitButton = toolkit.createButton(buttonComposite, LABEL_BUTTON_SUBMIT, SWT.NONE);
- GridData submitButtonData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- submitButtonData.widthHint = 100;
- submitButton.setImage(CommonImages.getImage(TasksUiImages.REPOSITORY_SUBMIT));
- submitButton.setLayoutData(submitButtonData);
- submitButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- submitToRepository();
- }
- });
-
- setSubmitEnabled(true);
-
- toolkit.createLabel(buttonComposite, " ");
-
- ITask task = TasksUiInternal.getTaskList().getTask(repository.getRepositoryUrl(), taskData.getTaskId());
- if (attachContextEnabled && task != null) {
- addAttachContextButton(buttonComposite, task);
- }
- }
-
- private void setSubmitEnabled(boolean enabled) {
- if (submitButton != null && !submitButton.isDisposed()) {
- submitButton.setEnabled(enabled);
- if (enabled) {
- submitButton.setToolTipText("Submit to " + this.repository.getRepositoryUrl());
- }
- }
- }
-
- /**
- * Override to make hyperlink available. If not overridden hyperlink will simply not be displayed.
- *
- * @return url String form of url that points to task's past activity
- */
- protected String getHistoryUrl() {
- return null;
- }
-
- protected void saveTaskOffline(IProgressMonitor progressMonitor) {
- if (taskData == null) {
- return;
- }
- if (repositoryTask != null) {
- try {
- localChange = true;
-
- TasksUiPlugin.getTaskDataManager().saveOutgoing(repositoryTask, changedAttributes);
- } finally {
- localChange = false;
- }
- }
- markDirty(false);
- }
-
- // once the following bug is fixed, this check for first focus is probably
- // not needed -> Bug# 172033: Restore editor focus
- private boolean firstFocus = true;
-
- @Override
- public void setFocus() {
- if (lastFocusControl != null && !lastFocusControl.isDisposed()) {
- lastFocusControl.setFocus();
- } else if (firstFocus && summaryTextViewer != null) {
- summaryTextViewer.getControl().setFocus();
- firstFocus = false;
- }
- }
-
- /**
- * Updates the title of the editor
- *
- */
- protected void updateEditorTitle() {
- setPartName(editorInput.getName());
- ((TaskEditor) this.getEditor()).updateTitle(editorInput.getName());
- }
-
- @Override
- public boolean isSaveAsAllowed() {
- return false;
- }
-
- @Override
- public void doSave(IProgressMonitor monitor) {
- saveTaskOffline(monitor);
- updateEditorTitle();
- updateHeaderControls();
-// fillToolBar(getParentEditor().getTopForm().getToolBarManager());
- }
-
- @Override
- public void doSaveAs() {
- // we don't save, so no need to implement
- }
-
- /**
- * @return The composite for the whole editor.
- */
- public Composite getEditorComposite() {
- return editorComposite;
- }
-
- @Override
- public void dispose() {
- TasksUiInternal.getTaskList().removeChangeListener(TASKLIST_CHANGE_LISTENER);
- getSite().getPage().removeSelectionListener(selectionListener);
- if (waitCursor != null) {
- waitCursor.dispose();
- }
- if (activateAction != null) {
- activateAction.dispose();
- }
- super.dispose();
- }
-
- /**
- * Fires a <code>SelectionChangedEvent</code> to all listeners registered under
- * <code>selectionChangedListeners</code>.
- *
- * @param event
- * The selection event.
- */
- protected void fireSelectionChanged(final SelectionChangedEvent event) {
- Object[] listeners = selectionChangedListeners.toArray();
- for (Object listener : listeners) {
- final ISelectionChangedListener l = (ISelectionChangedListener) listener;
- SafeRunnable.run(new SafeRunnable() {
- public void run() {
- l.selectionChanged(event);
- }
- });
- }
- }
-
- /*----------------------------------------------------------*
- * CODE TO SCROLL TO A COMMENT OR OTHER PIECE OF TEXT
- *----------------------------------------------------------*/
-
- private final HashMap<Object, Control> controlBySelectableObject = new HashMap<Object, Control>();
-
- private final List<ExpandableComposite> commentComposites = new ArrayList<ExpandableComposite>();
-
- private StyledText addCommentsTextBox = null;
-
- protected TextViewer descriptionTextViewer = null;
-
- private void revealAllComments() {
- try {
- form.setRedraw(false);
- refreshEnabled = false;
- if (supportsCommentSort()) {
- sortHyperlinkState(false);
- }
-
- if (commentsSection != null && !commentsSection.isExpanded()) {
- commentsSection.setExpanded(true);
- if (supportsCommentSort()) {
- sortHyperlinkState(true);
- }
- }
- for (ExpandableComposite composite : commentComposites) {
- if (composite.isDisposed()) {
- continue;
- }
- if (!composite.isExpanded()) {
- toggleExpandableComposite(true, composite);
- }
-// Composite comp = composite.getParent();
-// while (comp != null && !comp.isDisposed()) {
-// if (comp instanceof ExpandableComposite && !comp.isDisposed()) {
-// ExpandableComposite ex = (ExpandableComposite) comp;
-// setExpandableCompositeState(true, ex);
-//
-// // HACK: This is necessary
-// // due to a bug in SWT's ExpandableComposite.
-// // 165803: Expandable bars should expand when clicking
-// // anywhere
-// // https://bugs.eclipse.org/bugs/show_bug.cgi?taskId=165803
-// if (ex.getData() != null && ex.getData() instanceof Composite) {
-// ((Composite) ex.getData()).setVisible(true);
-// }
-//
-// break;
-// }
-// comp = comp.getParent();
-// }
- }
- } finally {
- refreshEnabled = true;
- form.setRedraw(true);
- }
- resetLayout();
- }
-
- private void hideAllComments() {
- try {
- refreshEnabled = false;
-
- for (ExpandableComposite composite : commentComposites) {
- if (composite.isDisposed()) {
- continue;
- }
-
- if (composite.isExpanded()) {
- toggleExpandableComposite(false, composite);
- }
-
-// Composite comp = composite.getParent();
-// while (comp != null && !comp.isDisposed()) {
-// if (comp instanceof ExpandableComposite && !comp.isDisposed()) {
-// ExpandableComposite ex = (ExpandableComposite) comp;
-// setExpandableCompositeState(false, ex);
-//
-// // HACK: This is necessary
-// // due to a bug in SWT's ExpandableComposite.
-// // 165803: Expandable bars should expand when clicking anywhere
-// // https://bugs.eclipse.org/bugs/show_bug.cgi?taskId=165803
-// if (ex.getData() != null && ex.getData() instanceof Composite) {
-// ((Composite) ex.getData()).setVisible(false);
-// }
-//
-// break;
-// }
-// comp = comp.getParent();
-// }
- }
-
-// if (commentsSection != null) {
-// commentsSection.setExpanded(false);
-// }
-
- } finally {
- refreshEnabled = true;
- }
- resetLayout();
- }
-
- private void sortHyperlinkState(boolean enabled) {
- commentSortEnable = enabled;
-
- if (sortHyperlink == null) {
- return;
- }
-
- sortHyperlink.setEnabled(enabled);
- if (enabled) {
- if (commentSortIsUp) {
- sortHyperlink.setImage(CommonImages.getImage(TasksUiImages.COMMENT_SORT_UP));
- } else {
- sortHyperlink.setImage(CommonImages.getImage(TasksUiImages.COMMENT_SORT_DOWN));
- }
- } else {
- if (commentSortIsUp) {
- sortHyperlink.setImage(CommonImages.getImage(TasksUiImages.COMMENT_SORT_UP_GRAY));
- } else {
- sortHyperlink.setImage(CommonImages.getImage(TasksUiImages.COMMENT_SORT_DOWN_GRAY));
- }
- }
- }
-
- private void sortComments() {
- if (addCommentsComposite != null) {
- Control[] commentControlList = addCommentsComposite.getChildren();
- int commentControlListLength = commentControlList.length;
- for (int i = 1; i < commentControlListLength; i++) {
- commentControlList[commentControlListLength - i].moveAbove(commentControlList[0]);
- }
- }
- commentSortIsUp = !commentSortIsUp;
- TasksUiPlugin.getDefault().getPreferenceStore().setValue(
- PREF_SORT_ORDER_PREFIX + repository.getConnectorKind(), commentSortIsUp);
- sortHyperlinkState(commentSortEnable);
- resetLayout();
- }
-
- /**
- * Selects the given object in the editor.
- *
- * @param o
- * The object to be selected.
- * @param highlight
- * Whether or not the object should be highlighted.
- */
- public boolean select(Object o, boolean highlight) {
- Control control = controlBySelectableObject.get(o);
- if (control != null && !control.isDisposed()) {
-
- // expand all children
- if (control instanceof ExpandableComposite) {
- ExpandableComposite ex = (ExpandableComposite) control;
- if (!ex.isExpanded()) {
- toggleExpandableComposite(true, ex);
- }
- }
-
- // expand all parents of control
- Composite comp = control.getParent();
- while (comp != null) {
- if (comp instanceof Section) {
- if (!((Section) comp).isExpanded()) {
- ((Section) comp).setExpanded(true);
- }
- } else if (comp instanceof ExpandableComposite) {
- ExpandableComposite ex = (ExpandableComposite) comp;
- if (!ex.isExpanded()) {
- toggleExpandableComposite(true, ex);
- }
-
- // HACK: This is necessary
- // due to a bug in SWT's ExpandableComposite.
- // 165803: Expandable bars should expand when clicking anywhere
- // https://bugs.eclipse.org/bugs/show_bug.cgi?taskId=165803
- if (ex.getData() != null && ex.getData() instanceof Composite) {
- ((Composite) ex.getData()).setVisible(true);
- }
- }
- comp = comp.getParent();
- }
- focusOn(control, highlight);
- } else if (o instanceof RepositoryTaskData) {
- focusOn(null, highlight);
- } else {
- return false;
- }
- return true;
- }
-
- /**
- * Programmatically expand the provided ExpandableComposite, using reflection to fire the expansion listeners (see
- * bug#70358)
- *
- * @param comp
- */
- private void toggleExpandableComposite(boolean expanded, ExpandableComposite comp) {
- if (comp.isExpanded() != expanded) {
- Method method = null;
- try {
- method = comp.getClass().getDeclaredMethod("programmaticToggleState");
- method.setAccessible(true);
- method.invoke(comp);
- } catch (Exception e) {
- // ignore
- }
- }
- }
-
- private void selectNewComment() {
- focusOn(addCommentsTextBox, false);
- }
-
- /**
- * @author Raphael Ackermann (bug 195514)
- * @since 2.1
- */
- protected void focusAttributes() {
- if (attributesSection != null) {
- focusOn(attributesSection, false);
- }
- }
-
- private void focusDescription() {
- if (descriptionTextViewer != null) {
- focusOn(descriptionTextViewer.getTextWidget(), false);
- }
- }
-
- /**
- * Scroll to a specified piece of text
- *
- * @param selectionComposite
- * The StyledText to scroll to
- */
- private void focusOn(Control selectionComposite, boolean highlight) {
- int pos = 0;
- // if (previousText != null && !previousText.isDisposed()) {
- // previousText.setsetSelection(0);
- // }
-
- // if (selectionComposite instanceof FormText)
- // previousText = (FormText) selectionComposite;
-
- if (selectionComposite != null) {
-
- // if (highlight && selectionComposite instanceof FormText &&
- // !selectionComposite.isDisposed())
- // ((FormText) selectionComposite).set.setSelection(0, ((FormText)
- // selectionComposite).getText().length());
-
- // get the position of the text in the composite
- pos = 0;
- Control s = selectionComposite;
- if (s.isDisposed()) {
- return;
- }
- s.setEnabled(true);
- s.setFocus();
- s.forceFocus();
- while (s != null && s != getEditorComposite()) {
- if (!s.isDisposed()) {
- pos += s.getLocation().y;
- s = s.getParent();
- }
- }
-
- pos = pos - 60; // form.getOrigin().y;
-
- }
- if (!form.getBody().isDisposed()) {
- form.setOrigin(0, pos);
- }
- }
-
- private RepositoryTaskOutlinePage outlinePage = null;
-
- @SuppressWarnings("unchecked")
- @Override
- public Object getAdapter(Class adapter) {
- return getAdapterDelgate(adapter);
- }
-
- public Object getAdapterDelgate(Class<?> adapter) {
- if (IContentOutlinePage.class.equals(adapter)) {
- if (outlinePage == null && editorInput != null && taskOutlineModel != null) {
- outlinePage = new RepositoryTaskOutlinePage(taskOutlineModel);
- }
- return outlinePage;
- }
- return super.getAdapter(adapter);
- }
-
- public RepositoryTaskOutlinePage getOutline() {
- return outlinePage;
- }
-
- private Button[] radios;
-
- private Control[] radioOptions;
-
- private Button attachContextButton;
-
- private AbstractLegacyRepositoryConnector connector;
-
- private Cursor waitCursor;
-
- private boolean formBusy = false;
-
- private Composite headerInfoComposite;
-
- private Section attributesSection;
-
- public void close() {
- Display activeDisplay = getSite().getShell().getDisplay();
- activeDisplay.asyncExec(new Runnable() {
- public void run() {
- if (getSite() != null && getSite().getPage() != null && !getManagedForm().getForm().isDisposed()) {
- if (parentEditor != null) {
- getSite().getPage().closeEditor(parentEditor, false);
- } else {
- getSite().getPage().closeEditor(AbstractRepositoryTaskEditor.this, false);
- }
- }
- }
- });
- }
-
- public void addAttributeListener(IRepositoryTaskAttributeListener listener) {
- attributesListeners.add(listener);
- }
-
- public void removeAttributeListener(IRepositoryTaskAttributeListener listener) {
- attributesListeners.remove(listener);
- }
-
- public void setParentEditor(TaskEditor parentEditor) {
- this.parentEditor = parentEditor;
- }
-
- /**
- * @since 2.1
- */
- public TaskEditor getParentEditor() {
- return parentEditor;
- }
-
- public RepositoryTaskOutlineNode getTaskOutlineModel() {
- return taskOutlineModel;
- }
-
- public void setTaskOutlineModel(RepositoryTaskOutlineNode taskOutlineModel) {
- this.taskOutlineModel = taskOutlineModel;
- }
-
- /**
- * A listener for selection of the textbox where a new comment is entered in.
- */
- private class NewCommentListener implements Listener {
- public void handleEvent(Event event) {
- fireSelectionChanged(new SelectionChangedEvent(selectionProvider, new StructuredSelection(
- new RepositoryTaskSelection(taskData.getTaskId(), taskData.getRepositoryUrl(),
- taskData.getConnectorKind(), getSectionLabel(SECTION_NAME.NEWCOMMENT_SECTION), false,
- taskData.getSummary()))));
- }
- }
-
- public Control getControl() {
- return form;
- }
-
- public void setSummaryText(String text) {
- if (summaryTextViewer != null && summaryTextViewer.getTextWidget() != null) {
- summaryTextViewer.getTextWidget().setText(text);
- }
- }
-
- public void setDescriptionText(String text) {
- this.descriptionTextViewer.getDocument().set(text);
- }
-
- protected void addRadioButtons(Composite buttonComposite) {
- int i = 0;
- Button selected = null;
- radios = new Button[taskData.getOperations().size()];
- radioOptions = new Control[taskData.getOperations().size()];
- for (RepositoryOperation o : taskData.getOperations()) {
- radios[i] = toolkit.createButton(buttonComposite, "", SWT.RADIO);
- radios[i].setFont(TEXT_FONT);
- GridData radioData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- if (!o.hasOptions() && !o.isInput()) {
- radioData.horizontalSpan = 4;
- } else {
- radioData.horizontalSpan = 1;
- }
- radioData.heightHint = 20;
- String opName = o.getOperationName();
- opName = opName.replaceAll("</.*>", "");
- opName = opName.replaceAll("<.*>", "");
- radios[i].setText(opName);
- radios[i].setLayoutData(radioData);
- // radios[i].setBackground(background);
- radios[i].addSelectionListener(new RadioButtonListener());
-
- if (o.hasOptions()) {
- radioData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- radioData.horizontalSpan = 3;
- radioData.heightHint = 20;
- radioData.widthHint = RADIO_OPTION_WIDTH;
- radioOptions[i] = new CCombo(buttonComposite, SWT.FLAT | SWT.READ_ONLY);
- radioOptions[i].setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
- toolkit.adapt(radioOptions[i], true, true);
- radioOptions[i].setFont(TEXT_FONT);
- radioOptions[i].setLayoutData(radioData);
-
- Object[] a = o.getOptionNames().toArray();
- Arrays.sort(a);
- for (int j = 0; j < a.length; j++) {
- if (a[j] != null) {
- ((CCombo) radioOptions[i]).add((String) a[j]);
- if (((String) a[j]).equals(o.getOptionSelection())) {
- ((CCombo) radioOptions[i]).select(j);
- }
- }
- }
- ((CCombo) radioOptions[i]).addSelectionListener(new RadioButtonListener());
- } else if (o.isInput()) {
- radioData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- radioData.horizontalSpan = 3;
- radioData.widthHint = RADIO_OPTION_WIDTH - 10;
-
- String assignmentValue = "";
- // NOTE: removed this because we now have content assit
-// if (opName.equals(REASSIGN_BUG_TO)) {
-// assignmentValue = repository.getUserName();
-// }
- radioOptions[i] = toolkit.createText(buttonComposite, assignmentValue);
- radioOptions[i].setFont(TEXT_FONT);
- radioOptions[i].setLayoutData(radioData);
- // radioOptions[i].setBackground(background);
- ((Text) radioOptions[i]).setText(o.getInputValue());
- ((Text) radioOptions[i]).addModifyListener(new RadioButtonListener());
-
- if (hasContentAssist(o)) {
- ContentAssistCommandAdapter adapter = applyContentAssist((Text) radioOptions[i],
- createContentProposalProvider(o));
- ILabelProvider propsalLabelProvider = createProposalLabelProvider(o);
- if (propsalLabelProvider != null) {
- adapter.setLabelProvider(propsalLabelProvider);
- }
- adapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
- }
- }
-
- if (i == 0 || o.isChecked()) {
- if (selected != null) {
- selected.setSelection(false);
- }
- selected = radios[i];
- radios[i].setSelection(true);
- if (o.hasOptions() && o.getOptionSelection() != null) {
- int j = 0;
- for (String s : ((CCombo) radioOptions[i]).getItems()) {
- if (s.compareTo(o.getOptionSelection()) == 0) {
- ((CCombo) radioOptions[i]).select(j);
- }
- j++;
- }
- }
- taskData.setSelectedOperation(o);
- }
-
- i++;
- }
-
- toolkit.paintBordersFor(buttonComposite);
- }
-
- /**
- * If implementing custom attributes you may need to override this method
- *
- * @return true if one or more attributes exposed in the editor have
- */
- protected boolean hasVisibleAttributeChanges() {
- if (taskData == null) {
- return false;
- }
- for (RepositoryTaskAttribute attribute : taskData.getAttributes()) {
- if (!attribute.isHidden()) {
- if (hasChanged(attribute)) {
- return true;
- }
- }
- }
- return false;
- }
-
- protected boolean hasOutgoingChange(RepositoryTaskAttribute newAttribute) {
- return editorInput.getOldEdits().contains(newAttribute);
- }
-
- protected boolean hasChanged(RepositoryTaskAttribute newAttribute) {
- if (newAttribute == null) {
- return false;
- }
- RepositoryTaskData oldTaskData = editorInput.getOldTaskData();
- if (oldTaskData == null) {
- return false;
- }
-
- if (hasOutgoingChange(newAttribute)) {
- return false;
- }
-
- RepositoryTaskAttribute oldAttribute = oldTaskData.getAttribute(newAttribute.getId());
- if (oldAttribute == null) {
- return true;
- }
- if (oldAttribute.getValue() != null && !oldAttribute.getValue().equals(newAttribute.getValue())) {
- return true;
- } else if (oldAttribute.getValues() != null && !oldAttribute.getValues().equals(newAttribute.getValues())) {
- return true;
- }
- return false;
- }
-
- protected void addAttachContextButton(Composite buttonComposite, ITask task) {
- attachContextButton = toolkit.createButton(buttonComposite, "Attach Context", SWT.CHECK);
- attachContextButton.setImage(CommonImages.getImage(TasksUiImages.CONTEXT_ATTACH));
- }
-
- /**
- * Creates a check box for adding the repository user to the cc list. Does nothing if the repository does not have a
- * valid username, the repository user is the assignee, reporter or already on the the cc list.
- */
- protected void addSelfToCC(Composite composite) {
-
- if (repository.getUserName() == null) {
- return;
- }
-
- RepositoryTaskAttribute owner = taskData.getAttribute(RepositoryTaskAttribute.USER_ASSIGNED);
- if (owner != null && owner.getValue().indexOf(repository.getUserName()) != -1) {
- return;
- }
-
- RepositoryTaskAttribute reporter = taskData.getAttribute(RepositoryTaskAttribute.USER_REPORTER);
- if (reporter != null && reporter.getValue().indexOf(repository.getUserName()) != -1) {
- return;
- }
-
- RepositoryTaskAttribute ccAttribute = taskData.getAttribute(RepositoryTaskAttribute.USER_CC);
- if (ccAttribute != null && ccAttribute.getValues().contains(repository.getUserName())) {
- return;
- }
-
- FormToolkit toolkit = getManagedForm().getToolkit();
- toolkit.createLabel(composite, "");
- final Button addSelfButton = toolkit.createButton(composite, "Add me to CC", SWT.CHECK);
- addSelfButton.setSelection(RepositoryTaskAttribute.TRUE.equals(taskData.getAttributeValue(RepositoryTaskAttribute.ADD_SELF_CC)));
- addSelfButton.setImage(CommonImages.getImage(CommonImages.PERSON));
- addSelfButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (addSelfButton.getSelection()) {
- taskData.setAttributeValue(RepositoryTaskAttribute.ADD_SELF_CC, RepositoryTaskAttribute.TRUE);
- } else {
- taskData.setAttributeValue(RepositoryTaskAttribute.ADD_SELF_CC, RepositoryTaskAttribute.FALSE);
- }
- RepositoryTaskAttribute attribute = taskData.getAttribute(RepositoryTaskAttribute.ADD_SELF_CC);
- changedAttributes.add(attribute);
- markDirty(true);
- }
- });
- }
-
- public boolean getAttachContext() {
- if (attachContextButton == null || attachContextButton.isDisposed()) {
- return false;
- } else {
- return attachContextButton.getSelection();
- }
- }
-
- public void setExpandAttributeSection(boolean expandAttributeSection) {
- this.expandedStateAttributes = expandAttributeSection;
- }
-
- public void setAttachContextEnabled(boolean attachContextEnabled) {
- this.attachContextEnabled = attachContextEnabled;
-// if (attachContextButton != null && attachContextButton.isEnabled()) {
-// attachContextButton.setSelection(attachContext);
-// }
- }
-
- @Override
- public void showBusy(boolean busy) {
- if (!getManagedForm().getForm().isDisposed() && busy != formBusy) {
- // parentEditor.showBusy(busy);
- if (synchronizeEditorAction != null) {
- synchronizeEditorAction.setEnabled(!busy);
- }
-
- if (activateAction != null) {
- activateAction.setEnabled(!busy);
- }
-
- if (openBrowserAction != null) {
- openBrowserAction.setEnabled(!busy);
- }
-
- if (historyAction != null) {
- historyAction.setEnabled(!busy);
- }
-
- if (newSubTaskAction != null) {
- newSubTaskAction.setEnabled(!busy);
- }
-
- if (clearOutgoingAction != null) {
- clearOutgoingAction.setEnabled(!busy);
- }
-
- if (submitButton != null && !submitButton.isDisposed()) {
- submitButton.setEnabled(!busy);
- }
-
- setEnabledState(editorComposite, !busy);
-
- formBusy = busy;
- }
- }
-
- private void setEnabledState(Composite composite, boolean enabled) {
- if (!composite.isDisposed()) {
- composite.setEnabled(enabled);
- for (Control control : composite.getChildren()) {
- control.setEnabled(enabled);
- if (control instanceof Composite) {
- setEnabledState(((Composite) control), enabled);
- }
- }
- }
- }
-
- public void setGlobalBusy(boolean busy) {
- if (parentEditor != null) {
- parentEditor.showBusy(busy);
- } else {
- showBusy(busy);
- }
- }
-
- public void submitToRepository() {
- setGlobalBusy(true);
-
- if (isDirty()) {
- saveTaskOffline(new NullProgressMonitor());
- markDirty(false);
- }
-
- final boolean attachContext = getAttachContext();
-
- Job submitJob = new Job(LABEL_JOB_SUBMIT) {
-
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- AbstractTask modifiedTask = null;
- try {
- monitor.beginTask("Submitting task", 3);
- String taskId = connector.getLegacyTaskDataHandler().postTaskData(repository, taskData,
- new SubProgressMonitor(monitor, 1));
- final boolean isNew = taskData.isNew();
- if (isNew) {
- if (taskId != null) {
- modifiedTask = updateSubmittedTask(taskId, new SubProgressMonitor(monitor, 1));
- } else {
- // null taskId, assume task could not be created...
- throw new CoreException(
- new RepositoryStatus(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- RepositoryStatus.ERROR_INTERNAL,
- "Task could not be created. No additional information was provided by the connector."));
- }
- } else {
- modifiedTask = (AbstractTask) TasksUiInternal.getTaskList().getTask(
- repository.getRepositoryUrl(), taskData.getTaskId());
- }
-
- // Synchronization accounting...
- if (modifiedTask != null) {
- // Attach context if required
- if (attachContext && connector.getAttachmentHandler() != null) {
- AttachmentUtil.attachContext(connector.getAttachmentHandler(), repository, modifiedTask,
- "", new SubProgressMonitor(monitor, 1));
- }
-
- modifiedTask.setSubmitting(true);
- final AbstractTask finalModifiedTask = modifiedTask;
- TasksUiInternal.synchronizeTask(connector, modifiedTask, true, new JobChangeAdapter() {
-
- @Override
- public void done(IJobChangeEvent event) {
-
- if (isNew) {
- close();
- TasksUiPlugin.getTaskDataManager().setTaskRead(finalModifiedTask, true);
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- TasksUiUtil.openTask(finalModifiedTask);
- }
- });
- } else {
-// PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
-// public void run() {
-// refreshEditor();
-// }
-// });
- }
- }
- });
- TasksUiPlugin.getSynchronizationScheduler().synchronize(repository);
- } else {
- close();
- // For some reason the task wasn't retrieved.
- // Try to
- // open local then via web browser...
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- TasksUiUtil.openTask(repository.getRepositoryUrl(), taskData.getTaskId(),
- connector.getTaskUrl(taskData.getRepositoryUrl(), taskData.getTaskId()));
- }
- });
- }
-
- return Status.OK_STATUS;
- } catch (OperationCanceledException e) {
- if (modifiedTask != null) {
- modifiedTask.setSubmitting(false);
- }
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- setGlobalBusy(false);// enableButtons();
- }
- });
- return Status.CANCEL_STATUS;
- } catch (CoreException e) {
- if (modifiedTask != null) {
- modifiedTask.setSubmitting(false);
- }
- return handleSubmitError(e);
- } catch (Exception e) {
- if (modifiedTask != null) {
- modifiedTask.setSubmitting(false);
- }
- StatusHandler.fail(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, e.getMessage(), e));
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- setGlobalBusy(false);// enableButtons();
- }
- });
- } finally {
- monitor.done();
- }
- return Status.OK_STATUS;
- }
-
- };
-
- IJobChangeListener jobListener = getSubmitJobListener();
- if (jobListener != null) {
- submitJob.addJobChangeListener(jobListener);
- }
- submitJob.schedule();
- }
-
- /**
- * @since 2.0 If existing task editor, update contents in place
- */
- public void refreshEditor() {
- try {
- if (!getManagedForm().getForm().isDisposed()) {
- if (this.isDirty && taskData != null && !taskData.isNew()) {
- this.doSave(new NullProgressMonitor());
- }
- setGlobalBusy(true);
- changedAttributes.clear();
- commentComposites.clear();
- controlBySelectableObject.clear();
- editorInput.refreshInput();
-
- // Note: Marking read must run synchronously
- // If not, incomings resulting from subsequent synchronization
- // can get marked as read (without having been viewed by user
- if (repositoryTask != null) {
- try {
- refreshing = true;
- TasksUiPlugin.getTaskDataManager().setTaskRead(repositoryTask, true);
- } finally {
- refreshing = false;
- }
- }
-
- this.setInputWithNotify(this.getEditorInput());
- this.init(this.getEditorSite(), this.getEditorInput());
-
- // Header must be updated after init is called to task data is available
- updateHeaderControls();
-
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
-
- public void run() {
- if (editorComposite != null && !editorComposite.isDisposed()) {
- if (taskData != null) {
- updateEditorTitle();
- menu = editorComposite.getMenu();
- removeSections();
- editorComposite.setMenu(menu);
- createSections();
- form.reflow(true);
- // setFormHeaderLabel();
- markDirty(false);
- parentEditor.setMessage(null, 0);
- AbstractRepositoryTaskEditor.this.getEditor().setActivePage(
- AbstractRepositoryTaskEditor.this.getId());
-
- // Activate editor disabled: bug#179078
- // AbstractTaskEditor.this.getEditor().getEditorSite().getPage().activate(
- // AbstractTaskEditor.this);
-
- // TODO: expand sections that were previously
- // expanded
-
- if (taskOutlineModel != null && outlinePage != null
- && !outlinePage.getControl().isDisposed()) {
- outlinePage.getOutlineTreeViewer().setInput(taskOutlineModel);
- outlinePage.getOutlineTreeViewer().refresh(true);
- }
-
-// if (repositoryTask != null) {
-// TasksUiPlugin.getTaskDataManager().setTaskRead(repositoryTask, true);
-// }
-
- setSubmitEnabled(true);
- }
- }
- }
- });
-
- } else {
- // Editor possibly closed as part of submit, mark read
-
- // Note: Marking read must run synchronously
- // If not, incomings resulting from subsequent synchronization
- // can get marked as read (without having been viewed by user
- if (repositoryTask != null) {
- TasksUiPlugin.getTaskDataManager().setTaskRead(repositoryTask, true);
- }
- }
- } finally {
- if (!getManagedForm().getForm().isDisposed()) {
- setGlobalBusy(false);
- }
- }
- }
-
- /**
- * Used to prevent form menu from being disposed when disposing elements on the form during refresh
- */
- private void setMenu(Composite comp, Menu menu) {
- if (!comp.isDisposed()) {
- comp.setMenu(null);
- for (Control child : comp.getChildren()) {
- child.setMenu(null);
- if (child instanceof Composite) {
- setMenu((Composite) child, menu);
- }
- }
- }
- }
-
- protected IJobChangeListener getSubmitJobListener() {
- return null;
- }
-
- protected AbstractTaskCategory getCategory() {
- return null;
- }
-
- protected IStatus handleSubmitError(final CoreException exception) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- if (form != null && !form.isDisposed()) {
- if (exception.getStatus().getCode() == RepositoryStatus.ERROR_IO) {
- parentEditor.setMessage(ERROR_NOCONNECTIVITY, IMessageProvider.ERROR);
- StatusHandler.log(exception.getStatus());
- } else if (exception.getStatus().getCode() == RepositoryStatus.REPOSITORY_COMMENT_REQUIRED) {
- TasksUiInternal.displayStatus("Comment required", exception.getStatus());
- if (!getManagedForm().getForm().isDisposed() && newCommentTextViewer != null
- && !newCommentTextViewer.getControl().isDisposed()) {
- newCommentTextViewer.getControl().setFocus();
- }
- } else if (exception.getStatus().getCode() == RepositoryStatus.ERROR_REPOSITORY_LOGIN) {
- if (TasksUiUtil.openEditRepositoryWizard(repository) == MessageDialog.OK) {
- submitToRepository();
- return;
- }
- } else {
- TasksUiInternal.displayStatus("Submit failed", exception.getStatus());
- }
- setGlobalBusy(false);
- }
- }
-
- });
- return Status.OK_STATUS;
- }
-
- protected AbstractTask updateSubmittedTask(String postResult, IProgressMonitor monitor) throws CoreException {
- final AbstractTask newTask = (AbstractTask) TasksUiInternal.createTask(repository, postResult, monitor);
-
- if (newTask != null) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- if (getCategory() != null) {
- TasksUiInternal.getTaskList().addTask(newTask, getCategory());
- }
- }
- });
- }
-
- return newTask;
- }
-
- /**
- * Class to handle the selection change of the radio buttons.
- */
- private class RadioButtonListener implements SelectionListener, ModifyListener {
-
- public void widgetDefaultSelected(SelectionEvent e) {
- widgetSelected(e);
- }
-
- public void widgetSelected(SelectionEvent e) {
- Button selected = null;
- for (Button radio : radios) {
- if (radio.getSelection()) {
- selected = radio;
- }
- }
- // determine the operation to do to the bug
- for (int i = 0; i < radios.length; i++) {
- if (radios[i] != e.widget && radios[i] != selected) {
- radios[i].setSelection(false);
- }
-
- if (e.widget == radios[i]) {
- RepositoryOperation o = taskData.getOperation(radios[i].getText());
- taskData.setSelectedOperation(o);
- markDirty(true);
- } else if (e.widget == radioOptions[i]) {
- RepositoryOperation o = taskData.getOperation(radios[i].getText());
- o.setOptionSelection(((CCombo) radioOptions[i]).getItem(((CCombo) radioOptions[i]).getSelectionIndex()));
-
- if (taskData.getSelectedOperation() != null) {
- taskData.getSelectedOperation().setChecked(false);
- }
- o.setChecked(true);
-
- taskData.setSelectedOperation(o);
- radios[i].setSelection(true);
- if (selected != null && selected != radios[i]) {
- selected.setSelection(false);
- }
- markDirty(true);
- }
- }
- validateInput();
- }
-
- public void modifyText(ModifyEvent e) {
- Button selected = null;
- for (Button radio : radios) {
- if (radio.getSelection()) {
- selected = radio;
- }
- }
- // determine the operation to do to the bug
- for (int i = 0; i < radios.length; i++) {
- if (radios[i] != e.widget && radios[i] != selected) {
- radios[i].setSelection(false);
- }
-
- if (e.widget == radios[i]) {
- RepositoryOperation o = taskData.getOperation(radios[i].getText());
- taskData.setSelectedOperation(o);
- markDirty(true);
- } else if (e.widget == radioOptions[i]) {
- RepositoryOperation o = taskData.getOperation(radios[i].getText());
- o.setInputValue(((Text) radioOptions[i]).getText());
-
- if (taskData.getSelectedOperation() != null) {
- taskData.getSelectedOperation().setChecked(false);
- }
- o.setChecked(true);
-
- taskData.setSelectedOperation(o);
- radios[i].setSelection(true);
- if (selected != null && selected != radios[i]) {
- selected.setSelection(false);
- }
- markDirty(true);
- }
- }
- validateInput();
- }
- }
-
- public AbstractRepositoryConnector getConnector() {
- return connector;
- }
-
- public void setShowAttachments(boolean showAttachments) {
- this.showAttachments = showAttachments;
- }
-
- public String getCommonDateFormat() {
- return HEADER_DATE_FORMAT;
- }
-
- public Color getColorIncoming() {
- return colorIncoming;
- }
-
- /**
- * @see #select(Object, boolean)
- */
- public void addSelectableControl(Object item, Control control) {
- controlBySelectableObject.put(item, control);
- }
-
- /**
- * @see #addSelectableControl(Object, Control)
- */
- public void removeSelectableControl(Object item) {
- controlBySelectableObject.remove(item);
- }
-
- /**
- * This method allow you to overwrite the generation of the form area for "assigned to" in the peopleLayout.<br>
- * <br>
- * The overwrite is used for Bugzilla Versions > 3.0
- *
- * @since 2.1
- * @author Frank Becker (bug 198027)
- */
- protected void addAssignedTo(Composite peopleComposite) {
- boolean haveRealName = false;
- RepositoryTaskAttribute assignedAttribute = taskData.getAttribute(RepositoryTaskAttribute.USER_ASSIGNED_NAME);
- if (assignedAttribute == null) {
- assignedAttribute = taskData.getAttribute(RepositoryTaskAttribute.USER_ASSIGNED);
- } else {
- haveRealName = true;
- }
- if (assignedAttribute != null) {
- Label label = createLabel(peopleComposite, assignedAttribute);
- GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(label);
- Text textField;
- if (assignedAttribute.isReadOnly()) {
- textField = createTextField(peopleComposite, assignedAttribute, SWT.FLAT | SWT.READ_ONLY);
- } else {
- textField = createTextField(peopleComposite, assignedAttribute, SWT.FLAT);
- ContentAssistCommandAdapter adapter = applyContentAssist(textField,
- createContentProposalProvider(assignedAttribute));
- ILabelProvider propsalLabelProvider = createProposalLabelProvider(assignedAttribute);
- if (propsalLabelProvider != null) {
- adapter.setLabelProvider(propsalLabelProvider);
- }
- adapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
- }
- GridDataFactory.fillDefaults().grab(true, false).applyTo(textField);
- if (haveRealName) {
- textField.setText(textField.getText() + " <"
- + taskData.getAttributeValue(RepositoryTaskAttribute.USER_ASSIGNED) + ">");
- }
-
- }
- }
-
- /**
- * force a re-layout of entire form
- */
- protected void resetLayout() {
- if (refreshEnabled) {
- form.layout(true, true);
- form.reflow(true);
- }
- }
-
- /**
- * @since 2.3
- */
- protected Hyperlink createTaskListHyperlink(Composite parent, final String taskId, final String taskUrl,
- final AbstractTask task) {
- TaskListHyperlink hyperlink = new TaskListHyperlink(parent, SWT.SHORT
- | getManagedForm().getToolkit().getOrientation());
- getManagedForm().getToolkit().adapt(hyperlink, true, true);
- getManagedForm().getToolkit().getHyperlinkGroup().add(hyperlink);
- hyperlink.setTask(task);
- if (task == null) {
- hyperlink.setText(taskId);
- }
- hyperlink.addHyperlinkListener(new HyperlinkAdapter() {
- @Override
- public void linkActivated(HyperlinkEvent e) {
- if (task != null) {
- TasksUiInternal.refreshAndOpenTaskListElement(task);
- } else {
- TasksUiUtil.openTask(repository.getRepositoryUrl(), taskId, taskUrl);
- }
- }
- });
- return hyperlink;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/deprecated/AbstractRepositoryTaskEditorInput.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/deprecated/AbstractRepositoryTaskEditorInput.java
deleted file mode 100644
index ff7e5cad4..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/deprecated/AbstractRepositoryTaskEditorInput.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.deprecated;
-
-import java.util.Set;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskAttribute;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditorInput;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IPersistableElement;
-
-/**
- * Input for task editors.
- *
- * NOTE: likely to change for 3.0
- *
- * @author Rob Elves (modifications)
- * @since 2.0
- * @deprecated use {@link TaskEditorInput} instead
- */
-@Deprecated
-public abstract class AbstractRepositoryTaskEditorInput implements IEditorInput {
-
- protected String toolTipText = "";
-
- final protected TaskRepository repository;
-
- final private String taskId;
-
- private RepositoryTaskData editableTaskData;
-
- private RepositoryTaskData oldTaskData;
-
- private Set<RepositoryTaskAttribute> oldEdits;
-
- protected AbstractRepositoryTaskEditorInput(TaskRepository repository, String taskId) {
- this.taskId = taskId;
- this.repository = repository;
- this.refreshInput();
- }
-
- /**
- * Sets the tool tip text for this editor input.
- *
- * @param str
- * The new tool tip text.
- */
- protected void setToolTipText(String str) {
- // 03-20-03 Allows editor to store title (once it is known)
- toolTipText = str;
- }
-
- public boolean exists() {
- return true;
- }
-
- /**
- * returns the new task data
- */
- public RepositoryTaskData getTaskData() {
- return editableTaskData;
- }
-
- /**
- * returns the old task data
- */
- public RepositoryTaskData getOldTaskData() {
- return oldTaskData;
- }
-
- public Set<RepositoryTaskAttribute> getOldEdits() {
- return oldEdits;
- }
-
- public ImageDescriptor getImageDescriptor() {
- return TasksUiImages.REPOSITORY_SMALL;
- }
-
- public IPersistableElement getPersistable() {
- return null;
- }
-
- public String getToolTipText() {
- return getName();
- }
-
- @SuppressWarnings("unchecked")
- public Object getAdapter(Class adapter) {
- return null;
- }
-
- /**
- * @return <code>true</code> if the argument is an editor input on the same bug.
- */
- @Override
- public abstract boolean equals(Object o);
-
- public TaskRepository getRepository() {
- return repository;
- }
-
- protected void setEditableTaskData(RepositoryTaskData editableTaskData) {
-// if (editableTaskData == null) {
-// throw new IllegalArgumentException();
-// }
- this.editableTaskData = editableTaskData;
- }
-
- protected void setOldTaskData(RepositoryTaskData oldTaskData) {
- this.oldTaskData = oldTaskData;
- }
-
- /**
- * @since 2.2
- */
- protected void setOldEdits(Set<RepositoryTaskAttribute> oldEdits) {
- this.oldEdits = oldEdits;
- }
-
- public void refreshInput() {
- setEditableTaskData(TasksUiPlugin.getTaskDataStorageManager().getEditableCopy(repository.getRepositoryUrl(),
- taskId));
- setOldTaskData(TasksUiPlugin.getTaskDataStorageManager().getOldTaskData(repository.getRepositoryUrl(), taskId));
- setOldEdits(TasksUiPlugin.getTaskDataStorageManager().getEdits(repository.getRepositoryUrl(), taskId));
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/deprecated/AbstractTaskEditorFactory.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/deprecated/AbstractTaskEditorFactory.java
deleted file mode 100644
index 073e2d05f..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/deprecated/AbstractTaskEditorFactory.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.deprecated;
-
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPageFactory;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-
-/**
- * Extend to add tabs to task editors.
- *
- * @author Mik Kersten
- * @since 2.0
- * @deprecated use {@link AbstractTaskEditorPageFactory} instead
- */
-@Deprecated
-public abstract class AbstractTaskEditorFactory {
-
- public abstract IEditorPart createEditor(TaskEditor parentEditor, IEditorInput editorInput);
-
- /**
- * @since 3.0
- */
- public abstract IEditorInput createEditorInput(ITask task);
-
- public abstract String getTitle();
-
- /**
- * @since 3.0
- */
- public abstract boolean canCreateEditorFor(ITask task);
-
- public abstract boolean canCreateEditorFor(IEditorInput input);
-
- public boolean providesOutline() {
- return false;
- }
-
- /**
- * @return A higher integer for high priority, low integer for low priority. Higher priority editors will be placed
- * earlier in the tab list.
- */
- public int getTabOrderPriority() {
- return 1;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/deprecated/NewTaskEditorInput.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/deprecated/NewTaskEditorInput.java
deleted file mode 100644
index 645b1dc5b..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/deprecated/NewTaskEditorInput.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.deprecated;
-
-import java.util.Collections;
-import java.util.Set;
-
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskAttribute;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditorInput;
-
-/**
- * Provides input to editors with unsubmitted tasks (i.e., those that do not yet exist on the repository).
- *
- * @author Rob Elves
- * @since 2.0
- * @deprecated use {@link TaskEditorInput} instead
- */
-@Deprecated
-public class NewTaskEditorInput extends RepositoryTaskEditorInput {
-
- public NewTaskEditorInput(TaskRepository repository, RepositoryTaskData taskData) {
- super(repository, taskData.getTaskId(), "");
- setOldTaskData(taskData);
- Set<RepositoryTaskAttribute> edits = Collections.emptySet();
- setOldEdits(edits);
- setEditableTaskData(taskData);
- }
-
- @Override
- public String getName() {
- return this.toolTipText;
- }
-
- @Override
- public boolean equals(Object o) {
- if (o instanceof NewTaskEditorInput) {
- NewTaskEditorInput input = (NewTaskEditorInput) o;
- return input.getTaskData().equals(this.getTaskData());
- }
- return false;
- }
-
- @Override
- public void refreshInput() {
- // does nothing
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/deprecated/RepositoryTaskEditorInput.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/deprecated/RepositoryTaskEditorInput.java
deleted file mode 100644
index 7ec52dc6e..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/deprecated/RepositoryTaskEditorInput.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.ui.deprecated;
-
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditorInput;
-
-/**
- * Input to editors for existing tasks (i.e., those that exist present in the repository).
- *
- * @author Mik Kersten
- * @author Rob Elves
- * @since 2.0
- * @deprecated use {@link TaskEditorInput} instead
- */
-@Deprecated
-public class RepositoryTaskEditorInput extends AbstractRepositoryTaskEditorInput {
-
- protected String taskId;
-
- protected String url;
-
- protected AbstractTask repositoryTask = null;
-
- public RepositoryTaskEditorInput(TaskRepository repository, String taskId, String taskUrl) {
- super(repository, taskId);
- this.taskId = taskId;
- this.url = taskUrl;
- AbstractTask task = (AbstractTask) TasksUiInternal.getTaskList().getTask(repository.getRepositoryUrl(), taskId);
- if (task != null) {
- this.repositoryTask = task;
- }
- }
-
- public AbstractTask getRepositoryTask() {
- return repositoryTask;
- }
-
- public String getName() {
- if (repositoryTask != null) {
- String idLabel = repositoryTask.getTaskKey();
-
- String label = "";
- if (idLabel != null) {
- label += idLabel + ": ";
- }
- label += repositoryTask.getSummary();
- return label;
- } else if (getTaskData() != null && getTaskData().getLabel() != null) {
- return getTaskData().getTaskKey() + ": " + getTaskData().getLabel();
- } else if (taskId != null) {
- return taskId;
- } else {
- return "<unknown>";
- }
- }
-
- /**
- * @return The taskId of the bug for this editor input.
- */
- public String getId() {
- return taskId;
- }
-
- @Override
- public int hashCode() {
- final int PRIME = 31;
- int result = 1;
- result = PRIME * result + ((repositoryTask == null) ? 0 : repositoryTask.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;
- }
- final RepositoryTaskEditorInput other = (RepositoryTaskEditorInput) obj;
- if (repositoryTask == null) {
- if (other.repositoryTask != null) {
- return false;
- } else if (!other.getId().equals(this.getId())) {
- return false;
- }
- } else if (!repositoryTask.equals(other.repositoryTask)) {
- return false;
- }
- return true;
- }
-
- /**
- * @return url for the repositoryTask/hit. Used by TaskEditor when opening browser
- */
- public String getUrl() {
- return url;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/deprecated/TaskFactory.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/deprecated/TaskFactory.java
deleted file mode 100644
index 5c5f926a3..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/deprecated/TaskFactory.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.deprecated;
-
-import java.util.Set;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.ITaskList;
-import org.eclipse.mylyn.internal.tasks.core.TaskDataStorageManager;
-import org.eclipse.mylyn.internal.tasks.core.data.TaskDataManager;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractLegacyRepositoryConnector;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractTaskDataHandler;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.ITaskFactory;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.ITask.SynchronizationState;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-
-/**
- * Used for creating tasks from repository task data.
- *
- * NOTE: likely to change for 3.0.
- *
- * @author Rob Elves
- * @deprecated
- */
-@Deprecated
-public class TaskFactory implements ITaskFactory {
-
- private final AbstractLegacyRepositoryConnector connector;
-
- private final TaskDataManager synchManager;
-
- private final TaskRepository repository;
-
- private final ITaskList taskList;
-
- private final AbstractTaskDataHandler dataHandler;
-
- private final boolean updateTasklist;
-
- private final boolean forced;
-
- public TaskFactory(TaskRepository repository, boolean updateTasklist, boolean forced) {
- this.repository = repository;
- this.updateTasklist = updateTasklist;
- this.forced = forced;
- connector = (AbstractLegacyRepositoryConnector) TasksUi.getRepositoryManager().getRepositoryConnector(
- repository.getConnectorKind());
- synchManager = TasksUiPlugin.getTaskDataManager();
- taskList = TasksUiInternal.getTaskList();
- //dataManager = TasksUiPlugin.getTaskDataManager();
- dataHandler = connector.getLegacyTaskDataHandler();
- }
-
- @Deprecated
- public TaskFactory(TaskRepository repository) {
- this(repository, true, false);
- }
-
- /**
- * @param updateTasklist
- * - synchronize task with the provided taskData
- * @param forced
- * - user requested synchronization
- * @throws CoreException
- */
- public AbstractTask createTask(RepositoryTaskData taskData, IProgressMonitor monitor) throws CoreException {
- AbstractTask repositoryTask = (AbstractTask) taskList.getTask(taskData.getRepositoryUrl(), taskData.getTaskId());
- if (repositoryTask == null) {
- repositoryTask = createTaskFromTaskData(connector, repository, taskData, updateTasklist, monitor);
- repositoryTask.setSynchronizationState(SynchronizationState.INCOMING);
- if (updateTasklist) {
- taskList.addTask(repositoryTask);
- synchManager.saveIncoming(repositoryTask, taskData, forced);
- } else {
- synchManager.saveOffline(repositoryTask, taskData);
- }
-
- } else {
- if (updateTasklist) {
- synchManager.saveIncoming(repositoryTask, taskData, forced);
- connector.updateTaskFromTaskData(repository, repositoryTask, taskData);
- if (dataHandler != null) {
- for (ITask child : repositoryTask.getChildren()) {
- taskList.removeFromContainer(repositoryTask, child);
- }
- Set<String> subTaskIds = dataHandler.getSubTaskIds(taskData);
- if (subTaskIds != null) {
- for (String subId : subTaskIds) {
- if (subId == null || subId.trim().equals("")) {
- continue;
- }
- AbstractTask subTask = createTaskFromExistingId(connector, repository, subId, false,
- new SubProgressMonitor(monitor, 1));
- if (subTask != null) {
- taskList.addTask(subTask, repositoryTask);
- }
- }
- }
- }
- }
- }
- return repositoryTask;
- }
-
- /**
- * Creates a new task from the given task data. Does NOT add resulting task to the tasklist
- */
- private AbstractTask createTaskFromTaskData(AbstractLegacyRepositoryConnector connector, TaskRepository repository,
- RepositoryTaskData taskData, boolean retrieveSubTasks, IProgressMonitor monitor) throws CoreException {
- AbstractTask repositoryTask = null;
- if (monitor == null) {
- monitor = new NullProgressMonitor();
- }
- try {
- TaskDataStorageManager taskDataManager = TasksUiPlugin.getTaskDataStorageManager();
- if (taskData != null) {
- // Use connector task factory
- repositoryTask = connector.createTask(repository.getRepositoryUrl(), taskData.getTaskId(),
- taskData.getTaskId() + ": " + taskData.getDescription());
- connector.updateTaskFromTaskData(repository, repositoryTask, taskData);
- taskDataManager.setNewTaskData(taskData);
-
- if (retrieveSubTasks) {
- monitor.beginTask("Creating task", connector.getLegacyTaskDataHandler()
- .getSubTaskIds(taskData)
- .size());
- for (String subId : connector.getLegacyTaskDataHandler().getSubTaskIds(taskData)) {
- if (subId == null || subId.trim().equals("")) {
- continue;
- }
- AbstractTask subTask = createTaskFromExistingId(connector, repository, subId, false,
- new SubProgressMonitor(monitor, 1));
- if (subTask != null) {
- taskList.addTask(subTask, repositoryTask);
- }
- }
- }
- }
- } finally {
- monitor.done();
- }
- return repositoryTask;
- }
-
- /**
- * Create new repository task, adding result to tasklist
- */
- private AbstractTask createTaskFromExistingId(AbstractLegacyRepositoryConnector connector,
- TaskRepository repository, String id, boolean retrieveSubTasks, IProgressMonitor monitor)
- throws CoreException {
- AbstractTask repositoryTask = (AbstractTask) taskList.getTask(repository.getRepositoryUrl(), id);
- if (repositoryTask == null && connector.getLegacyTaskDataHandler() != null) {
- RepositoryTaskData taskData = null;
- taskData = connector.getLegacyTaskDataHandler().getTaskData(repository, id,
- new SubProgressMonitor(monitor, 1));
- if (taskData != null) {
- repositoryTask = createTaskFromTaskData(connector, repository, taskData, retrieveSubTasks,
- new SubProgressMonitor(monitor, 1));
- if (repositoryTask != null) {
- repositoryTask.setSynchronizationState(SynchronizationState.INCOMING);
- taskList.addTask(repositoryTask);
- }
- }
- } // TODO: Handle case similar to web tasks (no taskDataHandler but
- // have tasks)
-
- return repositoryTask;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/deprecated/TaskFormPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/deprecated/TaskFormPage.java
deleted file mode 100644
index 7fe037609..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/deprecated/TaskFormPage.java
+++ /dev/null
@@ -1,750 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.deprecated;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.commands.IHandler;
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.commands.ActionHandler;
-import org.eclipse.jface.text.DefaultInformationControl;
-import org.eclipse.jface.text.Document;
-import org.eclipse.jface.text.IInformationControl;
-import org.eclipse.jface.text.IInformationControlCreator;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.ITextHover;
-import org.eclipse.jface.text.ITextListener;
-import org.eclipse.jface.text.ITextOperationTarget;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.Position;
-import org.eclipse.jface.text.TextEvent;
-import org.eclipse.jface.text.TextViewer;
-import org.eclipse.jface.text.source.Annotation;
-import org.eclipse.jface.text.source.AnnotationModel;
-import org.eclipse.jface.text.source.IAnnotationAccess;
-import org.eclipse.jface.text.source.IAnnotationAccessExtension;
-import org.eclipse.jface.text.source.IAnnotationHover;
-import org.eclipse.jface.text.source.ISharedTextColors;
-import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.jface.text.source.ImageUtilities;
-import org.eclipse.jface.text.source.SourceViewer;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonColors;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonThemes;
-import org.eclipse.mylyn.internal.tasks.ui.editors.RepositoryTextViewer;
-import org.eclipse.mylyn.internal.tasks.ui.editors.RepositoryTextViewerConfiguration;
-import org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorActionContributor;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPage;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.StyledText;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.events.FocusEvent;
-import org.eclipse.swt.events.FocusListener;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.widgets.Canvas;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.ActiveShellExpression;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.ActionFactory;
-import org.eclipse.ui.editors.text.EditorsUI;
-import org.eclipse.ui.editors.text.TextSourceViewerConfiguration;
-import org.eclipse.ui.forms.IManagedForm;
-import org.eclipse.ui.forms.editor.FormEditor;
-import org.eclipse.ui.forms.editor.FormPage;
-import org.eclipse.ui.handlers.IHandlerActivation;
-import org.eclipse.ui.handlers.IHandlerService;
-import org.eclipse.ui.texteditor.AnnotationPreference;
-import org.eclipse.ui.texteditor.DefaultMarkerAnnotationAccess;
-import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
-import org.eclipse.ui.texteditor.MarkerAnnotationPreferences;
-import org.eclipse.ui.texteditor.SourceViewerDecorationSupport;
-import org.eclipse.ui.themes.IThemeManager;
-
-/**
- * Used by the task editor. Not recommended to extend.
- *
- * NOTE: likely to change for 3.0.
- *
- * @author Rob Elves
- * @author Eugene Kuleshov (spelling correction)
- *
- * ref: PDEFormPage.class ref:
- * ref: http://dev.eclipse.org/newslists/news.eclipse.platform.swt/msg19676.html
- * @deprecated use {@link AbstractTaskEditorPage} instead
- */
-@Deprecated
-public class TaskFormPage extends FormPage {
-
- protected boolean isDirty;
-
- private TaskEditor taskEditor = null;
-
- private TaskEditorActionContributor actionContributor;
-
- protected List<TextViewer> textViewers = new ArrayList<TextViewer>();
-
- private IHandlerActivation handlerActivation;
-
- private IHandlerActivation handlerCompletion;
-
- private void addTextViewer(TextViewer viewer) {
- textViewers.add(viewer);
- }
-
- public TaskFormPage(FormEditor editor, String id, String title) {
- super(editor, id, title);
- taskEditor = (TaskEditor) editor;
- }
-
- public boolean canPerformAction(String actionId) {
- Control focusControl = getFocusControl();
- if (focusControl instanceof StyledText) {
- StyledText text = (StyledText) focusControl;
- for (TextViewer viewer : textViewers) {
- if (viewer.getTextWidget() == text) {
- return canDoGlobalAction(actionId, viewer);
- }
- }
- } else {
- if (actionId.equals(ActionFactory.UNDO.getId()) || actionId.equals(ActionFactory.REDO.getId())) {
- return false;
- } else {
- return true;
- }
- }
- // else if (focusControl instanceof Text) {
- //
- // Text textControl = (Text) focusControl;
- // if (actionId.equals(ActionFactory.CUT.getId())) {
- // return textControl.getSelectionText().length() > 0;
- // }
- // if (actionId.equals(ActionFactory.COPY.getId())) {
- // return textControl.getSelectionText().length() > 0;
- // }
- // if (actionId.equals(ActionFactory.PASTE.getId())) {
- // return true;
- // }
- // if (actionId.equals(ActionFactory.SELECT_ALL.getId())) {
- // return textControl.getText().length() > 0;
- // }
- // if (actionId.equals(ActionFactory.DELETE.getId())) {
- // return textControl.getSelectionText().length() > 0;
- // }
- // }
- return false;
- }
-
- public void doAction(String actionId) {
- Control focusControl = getFocusControl();
- if (focusControl == null) {
- return;
- }
- if (canPerformDirectly(actionId, focusControl)) {
- return;
- }
- if (focusControl instanceof StyledText) {
- StyledText text = (StyledText) focusControl;
- for (TextViewer viewer : textViewers) {
- if (viewer.getTextWidget() == text) {
- doGlobalAction(actionId, viewer);
- return;
- }
- }
- }
- }
-
- protected boolean canPerformDirectly(String id, Control control) {
- if (control instanceof Text) {
- Text text = (Text) control;
- if (id.equals(ActionFactory.CUT.getId())) {
- text.cut();
- return true;
- }
- if (id.equals(ActionFactory.COPY.getId())) {
- text.copy();
- return true;
- }
- if (id.equals(ActionFactory.PASTE.getId())) {
- text.paste();
- return true;
- }
- if (id.equals(ActionFactory.SELECT_ALL.getId())) {
- text.selectAll();
- return true;
- }
- if (id.equals(ActionFactory.DELETE.getId())) {
- int count = text.getSelectionCount();
- if (count == 0) {
- int caretPos = text.getCaretPosition();
- text.setSelection(caretPos, caretPos + 1);
- }
- text.insert(""); //$NON-NLS-1$
- return true;
- }
- }
- return false;
- }
-
- protected Control getFocusControl() {
- IManagedForm form = getManagedForm();
- if (form == null) {
- return null;
- }
- Control control = form.getForm();
- if (control == null || control.isDisposed()) {
- return null;
- }
- Display display = control.getDisplay();
- Control focusControl = display.getFocusControl();
- if (focusControl == null || focusControl.isDisposed()) {
- return null;
- }
- return focusControl;
- }
-
- private boolean doGlobalAction(String actionId, TextViewer textViewer) {
- if (actionId.equals(ActionFactory.CUT.getId())) {
- textViewer.doOperation(ITextOperationTarget.CUT);
- return true;
- } else if (actionId.equals(ActionFactory.COPY.getId())) {
- textViewer.doOperation(ITextOperationTarget.COPY);
- return true;
- } else if (actionId.equals(ActionFactory.PASTE.getId())) {
- textViewer.doOperation(ITextOperationTarget.PASTE);
- return true;
- } else if (actionId.equals(ActionFactory.DELETE.getId())) {
- textViewer.doOperation(ITextOperationTarget.DELETE);
- return true;
- } else if (actionId.equals(ActionFactory.UNDO.getId())) {
- textViewer.doOperation(ITextOperationTarget.UNDO);
- return true;
- } else if (actionId.equals(ActionFactory.REDO.getId())) {
- textViewer.doOperation(ITextOperationTarget.REDO);
- return true;
- } else if (actionId.equals(ActionFactory.SELECT_ALL.getId())) {
- textViewer.doOperation(ITextOperationTarget.SELECT_ALL);
- return true;
- }
- return false;
- }
-
- private boolean canDoGlobalAction(String actionId, TextViewer textViewer) {
- if (actionId.equals(ActionFactory.CUT.getId())) {
- return textViewer.canDoOperation(ITextOperationTarget.CUT);
- } else if (actionId.equals(ActionFactory.COPY.getId())) {
- return textViewer.canDoOperation(ITextOperationTarget.COPY);
- } else if (actionId.equals(ActionFactory.PASTE.getId())) {
- return textViewer.canDoOperation(ITextOperationTarget.PASTE);
- } else if (actionId.equals(ActionFactory.DELETE.getId())) {
- return textViewer.canDoOperation(ITextOperationTarget.DELETE);
- } else if (actionId.equals(ActionFactory.UNDO.getId())) {
- return textViewer.canDoOperation(ITextOperationTarget.UNDO);
- } else if (actionId.equals(ActionFactory.REDO.getId())) {
- return textViewer.canDoOperation(ITextOperationTarget.REDO);
- } else if (actionId.equals(ActionFactory.SELECT_ALL.getId())) {
- return textViewer.canDoOperation(ITextOperationTarget.SELECT_ALL);
- }
- return false;
- }
-
- /**
- * Text viewer generally used for displaying non-editable text. No annotation model or spell checking support.
- * Supports cut/copy/paste/etc..
- */
- protected TextViewer addTextViewer(TaskRepository repository, Composite composite, String text, int style) {
-
- if (actionContributor == null) {
- actionContributor = (TaskEditorActionContributor) getEditorSite().getActionBarContributor();
- }
-
- final RepositoryTextViewer commentViewer = new RepositoryTextViewer(repository, composite, style);
-
- // NOTE: Configuration must be applied before the document is set in
- // order for
- // Hyperlink colouring to work. (Presenter needs document object up
- // front)
- RepositoryTextViewerConfiguration repositoryViewerConfig = new RepositoryTextViewerConfiguration(repository,
- false);
- commentViewer.configure(repositoryViewerConfig);
-
- IThemeManager themeManager = getSite().getWorkbenchWindow().getWorkbench().getThemeManager();
-
- commentViewer.getTextWidget().setFont(
- themeManager.getCurrentTheme().getFontRegistry().get(CommonThemes.FONT_EDITOR_COMMENT));
-
- commentViewer.addSelectionChangedListener(actionContributor);
-
- commentViewer.getTextWidget().addFocusListener(new FocusListener() {
-
- public void focusGained(FocusEvent e) {
-
- actionContributor.updateSelectableActions(commentViewer.getSelection());
-
- }
-
- public void focusLost(FocusEvent e) {
- StyledText st = (StyledText) e.widget;
- st.setSelectionRange(st.getCaretOffset(), 0);
- actionContributor.forceActionsEnabled();
- }
- });
-
- commentViewer.addTextListener(new ITextListener() {
- public void textChanged(TextEvent event) {
- actionContributor.updateSelectableActions(commentViewer.getSelection());
- }
- });
-
- commentViewer.setEditable(false);
- MenuManager manager = commentViewer.getMenuManager();
- taskEditor.configureContextMenuManager(manager);
- commentViewer.setMenu(manager.createContextMenu(commentViewer.getTextWidget()));
- Document document = new Document(text);
- commentViewer.setDocument(document);
-
- addTextViewer(commentViewer);
- return commentViewer;
- }
-
- /**
- * For viewing and editing text. Spell checking w/ annotations supported One or two max per editor, any more and the
- * spell checker will bring the editor to a grinding halt.
- */
- protected TextViewer addTextEditor(TaskRepository repository, Composite composite, String text, boolean spellCheck,
- int style) {
-
- if (actionContributor == null) {
- actionContributor = (TaskEditorActionContributor) getEditorSite().getActionBarContributor();
- }
-
- AnnotationModel annotationModel = new AnnotationModel();
- final RepositoryTextViewer commentViewer = new RepositoryTextViewer(null, null, repository, composite, style);
- commentViewer.showAnnotations(false);
- commentViewer.showAnnotationsOverview(false);
-
- IAnnotationAccess annotationAccess = new DefaultMarkerAnnotationAccess();
-
- final SourceViewerDecorationSupport support = new SourceViewerDecorationSupport(commentViewer, null,
- annotationAccess, EditorsUI.getSharedTextColors());
-
- @SuppressWarnings("unchecked")
- Iterator e = new MarkerAnnotationPreferences().getAnnotationPreferences().iterator();
- while (e.hasNext()) {
- support.setAnnotationPreference((AnnotationPreference) e.next());
- }
-
- support.install(EditorsUI.getPreferenceStore());
-
- commentViewer.getTextWidget().setIndent(2);
- commentViewer.getTextWidget().addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- support.uninstall();
- }
- });
-
- final IHandlerService handlerService = (IHandlerService) PlatformUI.getWorkbench().getService(
- IHandlerService.class);
-
- IThemeManager themeManager = getSite().getWorkbenchWindow().getWorkbench().getThemeManager();
-
- commentViewer.getTextWidget().setFont(
- themeManager.getCurrentTheme().getFontRegistry().get(CommonThemes.FONT_EDITOR_COMMENT));
-
- commentViewer.addSelectionChangedListener(actionContributor);
-
- commentViewer.getTextWidget().addFocusListener(new FocusListener() {
-
- public void focusGained(FocusEvent e) {
- actionContributor.updateSelectableActions(commentViewer.getSelection());
- activate();
- }
-
- public void focusLost(FocusEvent e) {
- StyledText st = (StyledText) e.widget;
- st.setSelectionRange(st.getCaretOffset(), 0);
- actionContributor.forceActionsEnabled();
-
- deactivate();
- }
-
- private void activate() {
- deactivate();
- if (handlerActivation == null) {
- handlerActivation = handlerService.activateHandler( //
- ITextEditorActionDefinitionIds.QUICK_ASSIST, //
- createQuickFixActionHandler(commentViewer), //
- new ActiveShellExpression(commentViewer.getTextWidget().getShell()));
- }
- if (handlerCompletion == null) {
- handlerCompletion = handlerService.activateHandler( //
- ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS, //
- createContentAssistActionHandler(commentViewer), //
- new ActiveShellExpression(commentViewer.getTextWidget().getShell()));
- }
- }
-
- private void deactivate() {
- if (handlerCompletion != null) {
- handlerService.deactivateHandler(handlerCompletion);
- handlerCompletion = null;
- }
- if (handlerActivation != null) {
- handlerService.deactivateHandler(handlerActivation);
- handlerActivation = null;
- }
- }
- });
-
- commentViewer.addTextListener(new ITextListener() {
- public void textChanged(TextEvent event) {
- actionContributor.updateSelectableActions(commentViewer.getSelection());
- }
- });
-
- commentViewer.setEditable(false);
- MenuManager manager = commentViewer.getMenuManager();
- taskEditor.configureContextMenuManager(manager);
- commentViewer.setMenu(manager.createContextMenu(commentViewer.getTextWidget()));
- Document document = new Document(text);
-
- // NOTE: Configuration must be applied before the document is set in order for
- // Hyperlink coloring to work. (Presenter needs document object up front)
- TextSourceViewerConfiguration viewerConfig = new RepositoryTextViewerConfiguration(repository, spellCheck);
- commentViewer.configure(viewerConfig);
-
- commentViewer.setDocument(document, annotationModel);
-
- // !Do Not Delete! hover manager that shows text when we hover
- // AnnotationBarHoverManager fAnnotationHoverManager = new AnnotationBarHoverManager(fCompositeRuler,
- // commentViewer, new AnnotationHover(fAnnotationModel), new AnnotationConfiguration());
- // fAnnotationHoverManager.install(annotationRuler.getControl());
-
- // !Do Not Delete! Sample debugging code
- // document.set("Here's some texst so that we have somewhere to show an error");
- //
- // // // add an annotation
- // ErrorAnnotation errorAnnotation = new ErrorAnnotation(1, "");
- // // lets underline the word "texst"
- // fAnnotationModel.addAnnotation(errorAnnotation, new Position(12, 5));
-
- // CoreSpellingProblem iProblem = new CoreSpellingProblem(12, 5, 1,
- // "problem message", "theword", false, false, document, "task editor");
- // editorInput.getName()
- //
- // fAnnotationModel.addAnnotation(new ProblemAnnotation(iProblem, null), new Position(12, 5));
-
- addTextViewer(commentViewer);
- return commentViewer;
- }
-
- private IHandler createQuickFixActionHandler(final SourceViewer viewer) {
- Action quickFixAction = new Action() {
- @Override
- public void run() {
- if (viewer.canDoOperation(ISourceViewer.QUICK_ASSIST)) {
- viewer.doOperation(ISourceViewer.QUICK_ASSIST);
- }
- }
- };
- quickFixAction.setActionDefinitionId(ITextEditorActionDefinitionIds.QUICK_ASSIST);
- return new ActionHandler(quickFixAction);
- }
-
- private IHandler createContentAssistActionHandler(final SourceViewer viewer) {
- Action quickFixAction = new Action() {
- @Override
- public void run() {
- if (viewer.canDoOperation(ISourceViewer.CONTENTASSIST_PROPOSALS)) {
- viewer.doOperation(ISourceViewer.CONTENTASSIST_PROPOSALS);
- }
- }
- };
- quickFixAction.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
- return new ActionHandler(quickFixAction);
- }
-
- @Override
- public boolean isDirty() {
- return isDirty;
- }
-
- public void markDirty(boolean dirty) {
- isDirty = dirty;
- getManagedForm().dirtyStateChanged();
- return;
- }
-
- static class AnnotationMarkerAccess implements IAnnotationAccess, IAnnotationAccessExtension {
- public Object getType(Annotation annotation) {
- return annotation.getType();
- }
-
- public boolean isMultiLine(Annotation annotation) {
- return true;
- }
-
- public boolean isTemporary(Annotation annotation) {
- return !annotation.isPersistent();
- }
-
- public String getTypeLabel(Annotation annotation) {
- if (annotation instanceof ErrorAnnotation) {
- return "Errors";
- }
-
- return null;
- }
-
- public int getLayer(Annotation annotation) {
- if (annotation instanceof ErrorAnnotation) {
- return ((ErrorAnnotation) annotation).getLayer();
- }
-
- return 0;
- }
-
- public void paint(Annotation annotation, GC gc, Canvas canvas, Rectangle bounds) {
- ImageUtilities.drawImage(((ErrorAnnotation) annotation).getImage(), gc, canvas, bounds, SWT.CENTER, SWT.TOP);
- }
-
- public boolean isPaintable(Annotation annotation) {
- if (annotation instanceof ErrorAnnotation) {
- return ((ErrorAnnotation) annotation).getImage() != null;
- }
-
- return false;
- }
-
- public boolean isSubtype(Object annotationType, Object potentialSupertype) {
- if (annotationType.equals(potentialSupertype)) {
- return true;
- }
-
- return false;
-
- }
-
- public Object[] getSupertypes(Object annotationType) {
- return new Object[0];
- }
- }
-
- static class AnnotationHover implements IAnnotationHover, ITextHover {
-
- AnnotationModel fAnnotationModel = null;
-
- public AnnotationHover(AnnotationModel model) {
- this.fAnnotationModel = model;
- }
-
- @SuppressWarnings("unchecked")
- public String getHoverInfo(ISourceViewer sourceViewer, int lineNumber) {
- Iterator ite = fAnnotationModel.getAnnotationIterator();
-
- ArrayList<String> all = new ArrayList<String>();
-
- while (ite.hasNext()) {
- Annotation a = (Annotation) ite.next();
- if (a instanceof ErrorAnnotation) {
- all.add(((ErrorAnnotation) a).getText());
- }
- }
-
- StringBuffer total = new StringBuffer();
- for (int x = 0; x < all.size(); x++) {
- String str = all.get(x);
- total.append(" " + str + (x == (all.size() - 1) ? "" : "\n"));
- }
-
- return total.toString();
- }
-
- public String getHoverInfo(ITextViewer textViewer, IRegion hoverRegion) {
- return null;
- }
-
- public IRegion getHoverRegion(ITextViewer textViewer, int offset) {
- return null;
- }
- }
-
- public static class ErrorAnnotation extends Annotation {
-
- public static String ERROR_TYPE = "spelling.error";
-
- // ProblemAnnotation.SPELLING_ANNOTATION_TYPE;
-
- private final IMarker marker;
-
- private String text;
-
- private int line;
-
- private Position position;
-
- public ErrorAnnotation(IMarker marker) {
- this.marker = marker;
- }
-
- public ErrorAnnotation(int line, String text) {
- super(ERROR_TYPE, true, null);
- this.marker = null;
- this.line = line;
- this.text = text;
- }
-
- public IMarker getMarker() {
- return marker;
- }
-
- public int getLine() {
- return line;
- }
-
- @Override
- public String getText() {
- return text;
- }
-
- public Image getImage() {
- return null;// ERROR_IMAGE;
- }
-
- public int getLayer() {
- return 3;
- }
-
- @Override
- public String getType() {
- return ERROR_TYPE;
- }
-
- public Position getPosition() {
- return position;
- }
-
- public void setPosition(Position position) {
- this.position = position;
- }
- }
-
- // NOTE: See commented code below for example implementation
- static class SharedTextColors implements ISharedTextColors {
-
- /** Creates an returns a shared color manager. */
- public SharedTextColors() {
- super();
- }
-
- public Color getColor(RGB rgb) {
- return CommonColors.TEXT_SPELLING_ERROR;
- }
-
- public void dispose() {
- return;
- }
- }
-
- // DND relves
- //// From org.eclipse.ui.internal.editors.text.SharedTextColors
- // static class SharedTextColors implements ISharedTextColors {
- // /** The display table. */
- // @SuppressWarnings("unchecked")
- // private Map fDisplayTable;
- //
- // /** Creates an returns a shared color manager. */
- // public SharedTextColors() {
- // super();
- // }
- //
- // /*
- // * @see ISharedTextColors#getColor(RGB)
- // */
- // @SuppressWarnings("unchecked")
- // public Color getColor(RGB rgb) {
- // if (rgb == null)
- // return null;
- //
- // if (fDisplayTable == null)
- // fDisplayTable = new HashMap(2);
- //
- // Display display = Display.getCurrent();
- //
- // Map colorTable = (Map) fDisplayTable.get(display);
- // if (colorTable == null) {
- // colorTable = new HashMap(10);
- // fDisplayTable.put(display, colorTable);
- // }
- //
- // Color color = (Color) colorTable.get(rgb);
- // if (color == null) {
- // color = new Clr(display, rgb);
- // colorTable.put(rgb, color);
- // }
- //
- // return color;
- // }
- //
- // /*
- // * @see ISharedTextColors#dispose()
- // */
- // @SuppressWarnings("unchecked")
- // public void dispose() {
- // if (fDisplayTable != null) {
- // Iterator j = fDisplayTable.values().iterator();
- // while (j.hasNext()) {
- // Iterator i = ((Map) j.next()).values().iterator();
- // while (i.hasNext())
- // ((Color) i.next()).dispose();
- // }
- // }
- // }
- // }
-
- static class AnnotationConfiguration implements IInformationControlCreator {
- public IInformationControl createInformationControl(Shell shell) {
- return new DefaultInformationControl(shell);
- }
- }
-
- /**
- * @since 2.2
- */
- // API 3.0 remove method
- public String getSelectionText() {
- Control focusControl = getFocusControl();
- if (focusControl == null) {
- return null;
- }
- if (focusControl instanceof StyledText) {
- StyledText text = (StyledText) focusControl;
- for (TextViewer viewer : textViewers) {
- if (viewer.getTextWidget() == text) {
- return text.getSelectionText();
- }
- }
- }
- return null;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/AbstractWorkingSetDialogCOPY.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/AbstractWorkingSetDialogCOPY.java
deleted file mode 100644
index aa1dbdc67..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/AbstractWorkingSetDialogCOPY.java
+++ /dev/null
@@ -1,410 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Sebastian Davids <sdavids@gmx.de> - Fix for bug 19346 - Dialog font
- * should be activated and used by other components.
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.ui.dialogs;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.window.Window;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkingSet;
-import org.eclipse.ui.IWorkingSetManager;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.IWorkingSetEditWizard;
-import org.eclipse.ui.dialogs.IWorkingSetNewWizard;
-import org.eclipse.ui.dialogs.IWorkingSetSelectionDialog;
-import org.eclipse.ui.dialogs.SelectionDialog;
-import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
-import org.eclipse.ui.internal.WorkbenchMessages;
-import org.eclipse.ui.internal.WorkbenchPlugin;
-import org.eclipse.ui.internal.WorkingSet;
-import org.eclipse.ui.internal.registry.WorkingSetRegistry;
-
-/**
- * Abstract baseclass for various working set dialogs.
- *
- * COPIED FROM: AbstractWorkingSetDialog
- */
-@SuppressWarnings( { "unchecked", "null" })
-public abstract class AbstractWorkingSetDialogCOPY extends SelectionDialog implements IWorkingSetSelectionDialog {
-
- private static final int ID_NEW = IDialogConstants.CLIENT_ID + 1;
-
- private static final int ID_DETAILS = ID_NEW + 1;
-
- private static final int ID_REMOVE = ID_DETAILS + 1;
-
- private static final int ID_SELECTALL = ID_REMOVE + 1;
-
- private static final int ID_DESELECTALL = ID_SELECTALL + 1;
-
- private Button newButton;
-
- private Button detailsButton;
-
- private Button removeButton;
-
- private Button selectAllButton;
-
- private Button deselectAllButton;
-
- private IWorkingSet[] result;
-
- private List addedWorkingSets;
-
- private List removedWorkingSets;
-
- private Map editedWorkingSets;
-
- private List removedMRUWorkingSets;
-
- private Set workingSetIds;
-
- private final boolean canEdit;
-
- protected AbstractWorkingSetDialogCOPY(Shell parentShell, String[] workingSetIds, boolean canEdit) {
- super(parentShell);
- if (workingSetIds != null) {
- this.workingSetIds = new HashSet();
- for (String workingSetId : workingSetIds) {
- this.workingSetIds.add(workingSetId);
- }
- }
- this.canEdit = canEdit;
- }
-
- /**
- * Return the set of supported working set types.
- *
- * @return the supported working set types
- */
- protected Set getSupportedWorkingSetIds() {
- return workingSetIds;
- }
-
- /**
- * Adds the modify buttons to the dialog.
- *
- * @param composite
- * Composite to add the buttons to
- */
- protected void addModifyButtons(Composite composite) {
- Composite buttonComposite = new Composite(composite, SWT.RIGHT);
- GridLayout layout = new GridLayout();
- layout.marginHeight = layout.marginWidth = 0;
- layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
- buttonComposite.setLayout(layout);
- GridData data = new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.GRAB_VERTICAL);
- buttonComposite.setLayoutData(data);
-
- newButton = createButton(buttonComposite, ID_NEW, WorkbenchMessages.WorkingSetSelectionDialog_newButton_label,
- false);
- newButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- createWorkingSet();
- }
- });
-
- if (canEdit) {
- detailsButton = createButton(buttonComposite, ID_DETAILS,
- WorkbenchMessages.WorkingSetSelectionDialog_detailsButton_label, false);
- detailsButton.setEnabled(false);
- detailsButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- editSelectedWorkingSet();
- }
- });
-
- removeButton = createButton(buttonComposite, ID_REMOVE,
- WorkbenchMessages.WorkingSetSelectionDialog_removeButton_label, false);
- removeButton.setEnabled(false);
- removeButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- removeSelectedWorkingSets();
- }
- });
- }
-
- layout.numColumns = 1; // must manually reset the number of columns because createButton increments it - we want these buttons to be laid out vertically.
- }
-
- /**
- * Add the select/deselect buttons.
- *
- * @param composite
- * Composite to add the buttons to
- */
- protected void addSelectionButtons(Composite composite) {
- Composite buttonComposite = new Composite(composite, SWT.NONE);
- GridLayout layout = new GridLayout(2, false);
- layout.marginHeight = layout.marginWidth = 0;
- layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
- buttonComposite.setLayout(layout);
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- buttonComposite.setLayoutData(data);
-
- selectAllButton = createButton(buttonComposite, ID_SELECTALL, WorkbenchMessages.SelectionDialog_selectLabel,
- false);
- selectAllButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- selectAllSets();
- }
- });
-
- deselectAllButton = createButton(buttonComposite, ID_DESELECTALL,
- WorkbenchMessages.SelectionDialog_deselectLabel, false);
- deselectAllButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- deselectAllSets();
- }
- });
- }
-
- /**
- * Select all working sets.
- */
- protected abstract void selectAllSets();
-
- /**
- * Deselect all working sets.
- */
- protected abstract void deselectAllSets();
-
- /**
- * Opens a working set wizard for editing the currently selected working set.
- *
- * @see org.eclipse.ui.dialogs.IWorkingSetPage
- */
- void editSelectedWorkingSet() {
- IWorkingSetManager manager = WorkbenchPlugin.getDefault().getWorkingSetManager();
- IWorkingSet editWorkingSet = (IWorkingSet) getSelectedWorkingSets().get(0);
- IWorkingSetEditWizard wizard = manager.createWorkingSetEditWizard(editWorkingSet);
- WizardDialog dialog = new WizardDialog(getShell(), wizard);
- IWorkingSet originalWorkingSet = (IWorkingSet) editedWorkingSets.get(editWorkingSet);
- boolean firstEdit = originalWorkingSet == null;
-
- // save the original working set values for restoration when selection
- // dialog is cancelled.
- if (firstEdit) {
- originalWorkingSet = new WorkingSet(editWorkingSet.getName(), editWorkingSet.getLabel(),
- editWorkingSet.getElements());
- } else {
- editedWorkingSets.remove(editWorkingSet);
- }
- dialog.create();
- PlatformUI.getWorkbench().getHelpSystem().setHelp(dialog.getShell(),
- IWorkbenchHelpContextIds.WORKING_SET_EDIT_WIZARD);
- if (dialog.open() == Window.OK) {
- editWorkingSet = wizard.getSelection();
- availableWorkingSetsChanged();
- // make sure ok button is enabled when the selected working set
- // is edited. Fixes bug 33386.
- updateButtonAvailability();
- }
- editedWorkingSets.put(editWorkingSet, originalWorkingSet);
- }
-
- /**
- * Opens a working set wizard for creating a new working set.
- */
- void createWorkingSet() {
- IWorkingSetManager manager = WorkbenchPlugin.getDefault().getWorkingSetManager();
- String ids[] = null;
- if (workingSetIds != null) {
- ids = (String[]) workingSetIds.toArray(new String[workingSetIds.size()]);
- }
- IWorkingSetNewWizard wizard = manager.createWorkingSetNewWizard(ids);
- // the wizard can never be null since we have at least a resource
- // working set
- // creation page
- WizardDialog dialog = new WizardDialog(getShell(), wizard);
-
- dialog.create();
- PlatformUI.getWorkbench().getHelpSystem().setHelp(dialog.getShell(),
- IWorkbenchHelpContextIds.WORKING_SET_NEW_WIZARD);
- if (dialog.open() == Window.OK) {
- IWorkingSet workingSet = wizard.getSelection();
- manager.addWorkingSet(workingSet);
- addedWorkingSets.add(workingSet);
- availableWorkingSetsChanged();
- }
- }
-
- protected abstract List getSelectedWorkingSets();
-
- /**
- * Notifies the dialog that there has been a change to the sets available for use. In other words, the user has
- * either added, deleted or renamed a set.
- * <p>
- * Subclasses should override, but should call <code>super.availableWorkingSetsChanged</code> to update the
- * selection button enablements.
- * </p>
- */
- protected void availableWorkingSetsChanged() {
- boolean enable = PlatformUI.getWorkbench().getWorkingSetManager().getWorkingSets().length > 0;
- if (!(selectAllButton == null || selectAllButton.isDisposed())) {
- selectAllButton.setEnabled(enable);
- }
- if (!(deselectAllButton == null || deselectAllButton.isDisposed())) {
- deselectAllButton.setEnabled(enable);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.dialogs.IWorkingSetSelectionDialog#getSelection()
- */
- public IWorkingSet[] getSelection() {
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.dialogs.IWorkingSetSelectionDialog#setSelection(org.eclipse.ui.IWorkingSet[])
- */
- public void setSelection(IWorkingSet[] selection) {
- result = selection;
- }
-
- /**
- * Overrides method in Dialog
- *
- * @see org.eclipse.jface.dialogs.Dialog#open()
- */
- @Override
- public int open() {
- addedWorkingSets = new ArrayList();
- removedWorkingSets = new ArrayList();
- editedWorkingSets = new HashMap();
- removedMRUWorkingSets = new ArrayList();
- return super.open();
- }
-
- /**
- * Return the list of working sets that were added during the life of this dialog.
- *
- * @return the working sets
- */
- protected final List getAddedWorkingSets() {
- return addedWorkingSets;
- }
-
- /**
- * Return the map of working sets that were edited during the life of this dialog.
- *
- * @return the working sets
- */
- protected final Map getEditedWorkingSets() {
- return editedWorkingSets;
- }
-
- /**
- * Return the list of working sets that were removed from the MRU list during the life of this dialog.
- *
- * @return the working sets
- */
- protected final List getRemovedMRUWorkingSets() {
- return removedMRUWorkingSets;
- }
-
- /**
- * Return the list of working sets that were removed during the life of this dialog.
- *
- * @return the working sets
- */
- protected final List getRemovedWorkingSets() {
- return removedWorkingSets;
- }
-
- /**
- * Updates the modify buttons' enabled state based on the current seleciton.
- */
- protected void updateButtonAvailability() {
- List selection = getSelectedWorkingSets();
- boolean hasSelection = selection != null && !selection.isEmpty();
- boolean hasSingleSelection = hasSelection;
- WorkingSetRegistry registry = WorkbenchPlugin.getDefault().getWorkingSetRegistry();
-
- newButton.setEnabled(registry.hasNewPageWorkingSetDescriptor());
-
- if (canEdit) {
- removeButton.setEnabled(hasSelection);
- }
-
- IWorkingSet selectedWorkingSet = null;
- if (hasSelection) {
- hasSingleSelection = selection.size() == 1;
- if (hasSingleSelection) {
- selectedWorkingSet = (IWorkingSet) selection.get(0);
- }
- }
- if (canEdit) {
- detailsButton.setEnabled(hasSingleSelection && selectedWorkingSet.isEditable());
- }
-
- getOkButton().setEnabled(true);
- }
-
- /**
- * Removes the selected working sets from the workbench.
- */
- protected void removeSelectedWorkingSets() {
- List selection = getSelectedWorkingSets();
- removeSelectedWorkingSets(selection);
- }
-
- /**
- * Remove the working sets contained in the provided selection from the working set manager.
- *
- * @param selection
- * the sets
- */
- protected void removeSelectedWorkingSets(List selection) {
- IWorkingSetManager manager = WorkbenchPlugin.getDefault().getWorkingSetManager();
- Iterator iter = selection.iterator();
- while (iter.hasNext()) {
- IWorkingSet workingSet = (IWorkingSet) iter.next();
- if (getAddedWorkingSets().contains(workingSet)) {
- getAddedWorkingSets().remove(workingSet);
- } else {
- IWorkingSet[] recentWorkingSets = manager.getRecentWorkingSets();
- for (IWorkingSet recentWorkingSet : recentWorkingSets) {
- if (workingSet.equals(recentWorkingSet)) {
- getRemovedMRUWorkingSets().add(workingSet);
- break;
- }
- }
- getRemovedWorkingSets().add(workingSet);
- }
- manager.removeWorkingSet(workingSet);
- }
- availableWorkingSetsChanged();
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/TaskListSortDialog.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/TaskListSortDialog.java
deleted file mode 100644
index 7cf39e1f1..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/TaskListSortDialog.java
+++ /dev/null
@@ -1,264 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.dialogs;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Comparator;
-
-import org.eclipse.jface.window.IShellProvider;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListTableSorter.SortByIndex;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.ui.dialogs.SelectionDialog;
-
-public class TaskListSortDialog extends SelectionDialog {
- private Combo[] priorityCombos;
-
- private Button[] ascendingButtons;
-
- private Button[] descendingButtons;
-
- private final String[] propertyText;
-
- private boolean dirty = false;
-
- private final TaskListView taskListView;
-
- public TaskListSortDialog(IShellProvider parentShell, TaskListView taskListView) {
- super(parentShell.getShell());
- propertyText = new String[3];
- propertyText[0] = "Priority";
- propertyText[1] = "Summary";
- propertyText[2] = "Date Created";
- this.taskListView = taskListView;
- setTitle(TaskListView.LABEL_VIEW + " Sorting");
- }
-
- @Override
- protected Control createDialogArea(Composite parent) {
- Composite composite = (Composite) super.createDialogArea(parent);
-
- initializeDialogUnits(composite);
-
- Composite prioritiesArea = new Composite(composite, SWT.NULL);
- prioritiesArea.setLayout(new GridLayout(3, false));
-
- Label sortByLabel = new Label(prioritiesArea, SWT.NULL);
- sortByLabel.setText("Sort order:");
- GridData data = new GridData();
- data.horizontalSpan = 3;
- sortByLabel.setLayoutData(data);
-
- ascendingButtons = new Button[2];
- descendingButtons = new Button[2];
- priorityCombos = new Combo[2];
-
- for (int i = 0; i < 2; i++) {
- final int index = i;
- Label numberLabel = new Label(prioritiesArea, SWT.NULL);
- numberLabel.setText("" + (i + 1) + ".");
- priorityCombos[i] = new Combo(prioritiesArea, SWT.READ_ONLY);
- priorityCombos[i].setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- Composite directionGroup = new Composite(prioritiesArea, SWT.NONE);
- directionGroup.setLayout(new GridLayout(2, false));
- ascendingButtons[i] = new Button(directionGroup, SWT.RADIO);
- ascendingButtons[i].setText("Ascending");
- ascendingButtons[i].addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- markDirty();
- }
- });
- descendingButtons[i] = new Button(directionGroup, SWT.RADIO);
- descendingButtons[i].setText("Descending");
- descendingButtons[i].addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- markDirty();
- }
- });
- if (i < priorityCombos.length - 1) {
- priorityCombos[i].addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- int oldSelectionDirection = 1;
- if (descendingButtons[index].getSelection()) {
- oldSelectionDirection = -1;
- }
- ArrayList<String> oldSelectionList = new ArrayList<String>(
- Arrays.asList(priorityCombos[index].getItems()));
- oldSelectionList.removeAll(Arrays.asList(priorityCombos[index + 1].getItems()));
- if (oldSelectionList.size() != 1) {
- return;
- }
- String oldSelection = oldSelectionList.get(0);
- String newSelection = priorityCombos[index].getItem(priorityCombos[index].getSelectionIndex());
- if (oldSelection.equals(newSelection)) {
- return;
- }
- for (int j = index + 1; j < priorityCombos.length; j++) {
- int newSelectionIndex = priorityCombos[j].indexOf(newSelection);
- //this combo's current selection is equal to newSelection
- if (priorityCombos[j].getSelectionIndex() == newSelectionIndex) {
- priorityCombos[j].remove(newSelection);
- int insertionPoint = -1
- - Arrays.binarySearch(priorityCombos[j].getItems(), oldSelection,
- columnComparator);
- if (insertionPoint >= 0 && insertionPoint <= priorityCombos[j].getItemCount()) {
- priorityCombos[j].add(oldSelection, insertionPoint);
- } else {
- priorityCombos[j].add(oldSelection);
- }
- priorityCombos[j].select(priorityCombos[j].indexOf(oldSelection));
- ascendingButtons[index].setSelection(ascendingButtons[j].getSelection());
- descendingButtons[index].setSelection(descendingButtons[j].getSelection());
- ascendingButtons[j].setSelection(oldSelectionDirection == 1);
- descendingButtons[j].setSelection(oldSelectionDirection == -1);
- }
- //this combo contains newSelection
- else if (newSelectionIndex >= 0) {
- String currentText = priorityCombos[j].getText();
- priorityCombos[j].remove(newSelection);
- int insertionPoint = -1
- - Arrays.binarySearch(priorityCombos[j].getItems(), oldSelection,
- columnComparator);
- if (insertionPoint >= 0 && insertionPoint <= priorityCombos[j].getItemCount()) {
- priorityCombos[j].add(oldSelection, insertionPoint);
- priorityCombos[j].select(priorityCombos[j].indexOf(currentText));
- } else {
- priorityCombos[j].add(oldSelection);
- }
- }
- }
- markDirty();
- }
- });
- } else {
- priorityCombos[i].addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- markDirty();
- }
- });
- }
-
- }
- int a[] = new int[2];
- int b[] = new int[2];
- switch (taskListView.getSorter().getSortByIndex()) {
- case PRIORITY:
- a[0] = 0;
- break;
- case SUMMARY:
- a[0] = 1;
- break;
- case DATE_CREATED:
- a[0] = 2;
- break;
- }
-
- switch (taskListView.getSorter().getSortByIndex2()) {
- case PRIORITY:
- a[1] = 0;
- break;
- case SUMMARY:
- a[1] = 1;
- break;
- case DATE_CREATED:
- a[1] = 2;
- break;
- }
- b[0] = taskListView.getSorter().getSortDirection();
- b[1] = taskListView.getSorter().getSortDirection2();
- updateUI(a, b);
- return composite;
- }
-
- @Override
- protected void okPressed() {
- if (isDirty()) {
- taskListView.getSorter().setSortByIndex(
- SortByIndex.valueOf(priorityCombos[0].getItem(priorityCombos[0].getSelectionIndex()).replace(' ',
- '_').toUpperCase()));
- taskListView.getSorter().setSortByIndex2(
- SortByIndex.valueOf(priorityCombos[1].getItem(priorityCombos[1].getSelectionIndex()).replace(' ',
- '_').toUpperCase()));
- if (descendingButtons[0].getSelection()) {
- taskListView.getSorter().setSortDirection(-1);
- } else {
- taskListView.getSorter().setSortDirection(1);
- }
- if (descendingButtons[1].getSelection()) {
- taskListView.getSorter().setSortDirection2(-1);
- } else {
- taskListView.getSorter().setSortDirection2(1);
- }
-
- }
- super.okPressed();
- }
-
- /**
- * @return boolean
- */
- public boolean isDirty() {
- return dirty;
- }
-
- /**
- * Sets the dirty flag to true.
- */
- public void markDirty() {
- dirty = true;
- }
-
- private final Comparator<String> columnComparator = new Comparator<String>() {
- public int compare(String arg0, String arg1) {
- int index0 = -1;
- int index1 = -1;
- for (int i = 0; i < propertyText.length; i++) {
- if (propertyText[i].equals(arg0)) {
- index0 = i;
- }
- if (propertyText[i].equals(arg1)) {
- index1 = i;
- }
- }
- return index0 - index1;
- }
- };
-
- private void updateUI(int[] priorities, int[] directions) {
- ArrayList<String> availablePriorities = new ArrayList<String>(Arrays.asList(propertyText));
-
- for (int i = 0; i < priorityCombos.length; i++) {
- priorityCombos[i].removeAll();
- for (int j = 0; j < availablePriorities.size(); j++) {
- priorityCombos[i].add(availablePriorities.get(j));
- }
- priorityCombos[i].select(priorityCombos[i].indexOf(propertyText[priorities[i]]));
- availablePriorities.remove(propertyText[priorities[i]]);
-
- ascendingButtons[i].setSelection(directions[i] == 1);
- descendingButtons[i].setSelection(directions[i] == -1);
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/TaskRepositoryCredentialsDialog.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/TaskRepositoryCredentialsDialog.java
deleted file mode 100644
index 6871151b6..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/TaskRepositoryCredentialsDialog.java
+++ /dev/null
@@ -1,292 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.ui.dialogs;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.TitleAreaDialog;
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.window.Window;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Link;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-
-/**
- * @author Frank Becker
- * @author Steffen Pingel
- */
-public class TaskRepositoryCredentialsDialog extends TitleAreaDialog {
-
- private static final String DIALOG_TITLE = "Enter Credentials";
-
- private static final String IMAGE_FILE_KEYLOCK = "icons/wizban/secur_role_wiz.gif";
-
- public static final int TASK_REPOSITORY_CHANGED = 1000;
-
- private static final String MESSAGE = "Enter repository credentials";
-
- private static final String TITLE = "Repository Authentication";
-
- public static TaskRepositoryCredentialsDialog createDialog(Shell shell) {
- return new TaskRepositoryCredentialsDialog(shell);
- }
-
- private Image keyLockImage;
-
- private String message;
-
- private String password = "";
-
- private boolean savePassword;
-
- private TaskRepository taskRepository;
-
- private String username = "";
-
- private TaskRepositoryCredentialsDialog(Shell parentShell) {
- super(parentShell);
- }
-
- @Override
- public boolean close() {
- if (keyLockImage != null) {
- keyLockImage.dispose();
- }
- return super.close();
- }
-
- private void createLinkArea(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- composite.setLayout(new GridLayout(1, false));
- composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- Link link = new Link(composite, SWT.WRAP);
- link.setText("<a href=\"properties\">Open Repository Properties</a> to disable background synchronization by disconnecting the repository.");
- link.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- close();
- int returnCode = TasksUiUtil.openEditRepositoryWizard(taskRepository);
- if (returnCode == Window.OK) {
- setReturnCode(TASK_REPOSITORY_CHANGED);
- } else {
- setReturnCode(returnCode);
- }
- }
- });
- GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).hint(
- convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH), SWT.DEFAULT).grab(true,
- false).applyTo(link);
- }
-
- private void createCenterArea(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- composite.setLayout(new GridLayout(2, false));
- composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- if (taskRepository != null) {
- Composite labelComposite = new Composite(composite, SWT.NONE);
- GridLayout layout = new GridLayout(3, false);
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- labelComposite.setLayout(layout);
- GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).span(2, 1).applyTo(
- labelComposite);
-
- Label label = new Label(labelComposite, SWT.NONE);
- label.setImage(TasksUiPlugin.getDefault().getBrandingIcon(taskRepository.getConnectorKind()));
-
- label = new Label(labelComposite, SWT.NONE);
- label.setText("Task Repository:");
-
- label = new Label(labelComposite, SWT.NONE);
- label.setText(taskRepository.getRepositoryLabel());
- }
-
- new Label(composite, SWT.NONE).setText("&User ID:");
-
- final Text usernameField = new Text(composite, SWT.BORDER);
- usernameField.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- username = usernameField.getText();
- }
- });
- usernameField.setText(username);
- if (username.length() == 0) {
- usernameField.setFocus();
- }
- GridDataFactory.fillDefaults()
- .align(SWT.FILL, SWT.CENTER)
- .hint(convertHorizontalDLUsToPixels(IDialogConstants.ENTRY_FIELD_WIDTH), SWT.DEFAULT)
- .grab(true, false)
- .applyTo(usernameField);
-
- new Label(composite, SWT.NONE).setText("&Password:");
-
- final Text passwordField = new Text(composite, SWT.BORDER | SWT.PASSWORD);
- passwordField.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- password = passwordField.getText();
- }
- });
- passwordField.setText(password);
- if (username.length() > 0) {
- passwordField.setFocus();
- }
- GridDataFactory.fillDefaults()
- .align(SWT.FILL, SWT.CENTER)
- .hint(convertHorizontalDLUsToPixels(IDialogConstants.ENTRY_FIELD_WIDTH), SWT.DEFAULT)
- .grab(true, false)
- .applyTo(passwordField);
-
- final Button savePasswordButton = new Button(composite, SWT.CHECK);
- savePasswordButton.setText("&Save Password");
- savePasswordButton.setSelection(savePassword);
- savePasswordButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- savePassword = savePasswordButton.getSelection();
- }
- });
- GridDataFactory.fillDefaults().span(2, 1).applyTo(savePasswordButton);
-
- createWarningMessage(composite);
- }
-
- @Override
- protected Control createContents(Composite parent) {
- getShell().setText(DIALOG_TITLE);
-
- setTitle(TITLE);
- Control control = super.createContents(parent);
- if (taskRepository != null) {
- AbstractRepositoryConnector connector = TasksUi.getRepositoryManager().getRepositoryConnector(
- taskRepository.getConnectorKind());
- if (connector != null) {
- setTitle(connector.getShortLabel() + " " + TITLE);
- }
- }
-
- ImageDescriptor descriptor = AbstractUIPlugin.imageDescriptorFromPlugin(TasksUiPlugin.ID_PLUGIN,
- IMAGE_FILE_KEYLOCK);
- if (descriptor != null) {
- keyLockImage = descriptor.createImage();
- setTitleImage(keyLockImage);
- }
- if (message != null) {
- super.setMessage(message);
- } else {
- super.setMessage(MESSAGE);
- }
- return control;
- }
-
- @Override
- protected Control createDialogArea(Composite parent) {
- Composite parent2 = (Composite) super.createDialogArea(parent);
-
- Composite composite = new Composite(parent2, SWT.NONE);
- composite.setLayout(new GridLayout(1, false));
- GridDataFactory.fillDefaults().align(SWT.FILL, SWT.BEGINNING).applyTo(composite);
-
- createCenterArea(composite);
- if (taskRepository != null) {
- createLinkArea(composite);
- }
-
- composite.pack();
- return parent;
- }
-
- private void createWarningMessage(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- composite.setLayout(layout);
- GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).span(2, 1).applyTo(composite);
-
- Label label = new Label(composite, SWT.NONE);
- label.setImage(Dialog.getImage(DLG_IMG_MESSAGE_WARNING));
- label.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.HORIZONTAL_ALIGN_BEGINNING));
-
- label = new Label(composite, SWT.WRAP);
- label.setText("Saved passwords are stored on your computer in a file that is difficult, but not impossible, for an intruder to read.");
- GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).hint(
- convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH), SWT.DEFAULT).grab(true,
- false).applyTo(label);
- }
-
- public String getMessage() {
- return message;
- }
-
- public String getPassword() {
- return password;
- }
-
- public boolean getSavePassword() {
- return savePassword;
- }
-
- public TaskRepository getTaskRepository() {
- return taskRepository;
- }
-
- public String getUserName() {
- return username;
- }
-
- @Override
- public void setMessage(String message) {
- this.message = message;
- }
-
- public void setPassword(String password) {
- if (password == null) {
- throw new IllegalArgumentException();
- }
- this.password = password;
- }
-
- public void setSavePassword(boolean savePassword) {
- this.savePassword = savePassword;
- }
-
- public void setTaskRepository(TaskRepository taskRepository) {
- this.taskRepository = taskRepository;
- }
-
- public void setUsername(String username) {
- if (username == null) {
- throw new IllegalArgumentException();
- }
- this.username = username;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AbstractReplyToCommentAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AbstractReplyToCommentAction.java
deleted file mode 100644
index 198ab64da..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AbstractReplyToCommentAction.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.mylyn.internal.tasks.core.CommentQuoter;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.ITaskComment;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPage;
-
-/**
- * @author Steffen Pingel
- */
-public abstract class AbstractReplyToCommentAction extends Action {
-
- private static final String LABEL_REPLY = "Reply";
-
- private final AbstractTaskEditorPage editor;
-
- private final ITaskComment taskComment;
-
- public AbstractReplyToCommentAction(AbstractTaskEditorPage editor, ITaskComment taskComment) {
- this.editor = editor;
- this.taskComment = taskComment;
- setImageDescriptor(TasksUiImages.COMMENT_REPLY);
- setToolTipText(LABEL_REPLY);
- }
-
- protected abstract String getReplyText();
-
- @Override
- public void run() {
- reply(editor, taskComment, getReplyText());
- }
-
- public static void reply(AbstractTaskEditorPage editor, ITaskComment taskComment, String text) {
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(editor.getConnectorKind());
- String reference = connectorUi.getReplyText(editor.getTaskRepository(), editor.getTask(), taskComment, false);
- StringBuilder sb = new StringBuilder();
- sb.append(reference);
- sb.append("\n");
- if (text != null) {
- CommentQuoter quoter = new CommentQuoter();
- sb.append(quoter.quote(text));
- }
- editor.appendTextToNewComment(sb.toString());
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AttachmentSizeFormatter.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AttachmentSizeFormatter.java
deleted file mode 100644
index 2b681651a..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AttachmentSizeFormatter.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import java.text.DecimalFormat;
-import java.text.NumberFormat;
-import java.util.Locale;
-
-/**
- * Format attachment size values originally in bytes to nice messages.
- * <p>
- * This formatter tries to use the most applicable measure unit based on size magnitude, i.e.:
- * <p>
- * <ul>
- * <li>< 1 KB - byte based: 1 byte, 100 bytes, etc.
- * <li>>= 1 KB and < 1 MB - KB based: 2.00 KB, 100.76 KB
- * <li>>= 1 MB and < 1 GB - MB based: 1.00 MB, 33.33 MB
- * <li>>= 1 GB - GB based: 2.00 GB
- * </ul>
- * <p>
- * This formatter assumes 1 KB == 1024 bytes, <strong>NOT</strong> 1000 bytes.
- * <p>
- * This formatter always uses 2 decimal places.
- * <p>
- * The size is provided as a String, because it will probably come from a attachment attribute. If the value cannot be
- * decoded, for any reason, it returns {@link #UNKNOWN_SIZE}
- *
- * @author Willian Mitsuda
- * @author Frank Becker
- * @author Steffen Pingel
- */
-public class AttachmentSizeFormatter {
-
- /**
- * Default value returned by this formatter when the size is unparseable, contain errors, etc.
- */
- public static final String UNKNOWN_SIZE = "-";
-
- public final static AttachmentSizeFormatter getInstance() {
- return new AttachmentSizeFormatter();
- }
-
- private final DecimalFormat decimalFormat;
-
- public AttachmentSizeFormatter() {
- this(Locale.getDefault());
- }
-
- public AttachmentSizeFormatter(Locale locale) {
- this.decimalFormat = (DecimalFormat) NumberFormat.getInstance(locale);
- }
-
- public String format(String sizeInBytes) {
- if (sizeInBytes == null) {
- return UNKNOWN_SIZE;
- }
- try {
- return format(Long.parseLong(sizeInBytes));
- } catch (NumberFormatException e) {
- return UNKNOWN_SIZE;
- }
- }
-
- public String format(long size) {
- if (size < 0) {
- return UNKNOWN_SIZE;
- }
- if (size < 1024) {
- // format as byte
- if (size == 1) {
- return "1 byte";
- }
- DecimalFormat fmt = new DecimalFormat("0 bytes");
- return fmt.format(size);
- } else if (size >= 1024 && size <= 1048575) {
- // format as KB
- double formattedValue = size / 1024.0;
- decimalFormat.applyPattern("0.00 KB");
- return decimalFormat.format(formattedValue);
- } else if (size >= 1048576 && size <= 1073741823) {
- // format as MB
- double formattedValue = size / 1048576.0;
- decimalFormat.applyPattern("0.00 MB");
- return decimalFormat.format(formattedValue);
- }
-
- // format as GB
- double formattedValue = size / 1073741824.0;
- decimalFormat.applyPattern("0.00 GB");
- return decimalFormat.format(formattedValue);
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AttachmentTableLabelProvider.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AttachmentTableLabelProvider.java
deleted file mode 100644
index 8fcf36236..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AttachmentTableLabelProvider.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import org.eclipse.jface.viewers.ColumnLabelProvider;
-import org.eclipse.jface.viewers.ILabelDecorator;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.ViewerCell;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonThemes;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryAttachment;
-import org.eclipse.mylyn.internal.tasks.ui.AttachmentUtil;
-import org.eclipse.mylyn.internal.tasks.ui.deprecated.AbstractRepositoryTaskEditor;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.internal.WorkbenchImages;
-import org.eclipse.ui.themes.IThemeManager;
-
-/**
- * @author Mik Kersten
- */
-public class AttachmentTableLabelProvider extends ColumnLabelProvider {
-
- private final AbstractRepositoryTaskEditor AbstractTaskEditor;
-
- private final AttachmentSizeFormatter sizeFormatter = AttachmentSizeFormatter.getInstance();
-
- private final IThemeManager themeManager = PlatformUI.getWorkbench().getThemeManager();
-
- private static final String[] IMAGE_EXTENSIONS = { "jpg", "gif", "png", "tiff", "tif", "bmp" };
-
- public AttachmentTableLabelProvider(AbstractRepositoryTaskEditor AbstractTaskEditor, ILabelProvider provider,
- ILabelDecorator decorator) {
- // FIXME this class must not depend on AbstractTaskEditor
- this.AbstractTaskEditor = AbstractTaskEditor;
- }
-
- public Image getColumnImage(Object element, int columnIndex) {
- RepositoryAttachment attachment = (RepositoryAttachment) element;
- if (columnIndex == 0) {
- if (AttachmentUtil.isContext(attachment)) {
- return CommonImages.getImage(TasksUiImages.CONTEXT_TRANSFER);
- } else if (attachment.isPatch()) {
- return CommonImages.getImage(TasksUiImages.TASK_ATTACHMENT_PATCH);
- } else {
- String filename = attachment.getFilename();
- if (filename != null) {
- int dotIndex = filename.lastIndexOf('.');
- if (dotIndex != -1) {
- String fileType = filename.substring(dotIndex + 1);
- for (String element2 : IMAGE_EXTENSIONS) {
- if (element2.equalsIgnoreCase(fileType)) {
- return CommonImages.getImage(CommonImages.IMAGE_FILE);
- }
- }
- }
- }
- return WorkbenchImages.getImage(ISharedImages.IMG_OBJ_FILE);
- }
- } else {
- }
- return null;
- }
-
- public String getColumnText(Object element, int columnIndex) {
- RepositoryAttachment attachment = (RepositoryAttachment) element;
- switch (columnIndex) {
- case 0:
- if (AttachmentUtil.isContext(attachment)) {
- return " Task Context";
- } else if (attachment.isPatch()) {
- return " Patch";
- } else {
- return " " + attachment.getFilename();
- }
- case 1:
- return attachment.getDescription();
- case 2:
-// if (attachment.isPatch()) {
-// return "patch";
-// } else {
- return attachment.getContentType();
-// }
- case 3:
- return sizeFormatter.format(attachment.getSize());
- case 4:
- return attachment.getCreator();
- case 5:
- // TODO should retrieve Date object from IOfflineTaskHandler
- if (AbstractTaskEditor != null) {
- return this.AbstractTaskEditor.formatDate(attachment.getDateCreated());
- } else {
- return attachment.getDateCreated();
- }
- }
- return "unrecognized column";
- }
-
- @Override
- public void addListener(ILabelProviderListener listener) {
- // ignore
- }
-
- @Override
- public void dispose() {
- // ignore
- }
-
- @Override
- public boolean isLabelProperty(Object element, String property) {
- // ignore
- return false;
- }
-
- @Override
- public void removeListener(ILabelProviderListener listener) {
- // ignore
- }
-
- public Color getForeground(Object element, int columnIndex) {
- RepositoryAttachment att = (RepositoryAttachment) element;
- if (att.isObsolete()) {
- return themeManager.getCurrentTheme().getColorRegistry().get(CommonThemes.COLOR_COMPLETED);
- }
- return super.getForeground(element);
- }
-
- public Color getBackground(Object element, int columnIndex) {
- return super.getBackground(element);
- }
-
- public Font getFont(Object element, int columnIndex) {
- return super.getFont(element);
- }
-
- @Override
- public String getToolTipText(Object element) {
- RepositoryAttachment attachment = (RepositoryAttachment) element;
- return "File: " + attachment.getAttributeValue("filename");
- /*"\nFilename\t\t" + attachment.getAttributeValue("filename")
- +"ID\t\t\t" + attachment.getAttributeValue("attachid")
- + "\nDate\t\t\t" + attachment.getAttributeValue("date")
- + "\nDescription\t" + attachment.getAttributeValue("desc")
- + "\nCreator\t\t" + attachment.getCreator()
- + "\nType\t\t\t" + attachment.getAttributeValue("type")
- + "\nURL\t\t\t" + attachment.getAttributeValue("task.common.attachment.url");*/
- }
-
- @Override
- public Point getToolTipShift(Object object) {
- return new Point(5, 5);
- }
-
- @Override
- public int getToolTipDisplayDelayTime(Object object) {
- return 200;
- }
-
- @Override
- public int getToolTipTimeDisplayed(Object object) {
- return 5000;
- }
-
- @Override
- public void update(ViewerCell cell) {
- Object element = cell.getElement();
- cell.setText(getColumnText(element, cell.getColumnIndex()));
- Image image = getColumnImage(element, cell.getColumnIndex());
- cell.setImage(image);
- cell.setBackground(getBackground(element));
- cell.setForeground(getForeground(element));
- cell.setFont(getFont(element));
- }
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AttachmentTableLabelProvider2.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AttachmentTableLabelProvider2.java
deleted file mode 100644
index 0803f82c1..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AttachmentTableLabelProvider2.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import org.eclipse.jface.viewers.ColumnLabelProvider;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.ViewerCell;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonThemes;
-import org.eclipse.mylyn.internal.tasks.ui.AttachmentUtil;
-import org.eclipse.mylyn.tasks.core.ITaskAttachment;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.ui.editors.AttributeEditorToolkit;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.internal.WorkbenchImages;
-import org.eclipse.ui.themes.IThemeManager;
-
-/**
- * @author Mik Kersten
- * @author Steffen Pingel
- */
-public class AttachmentTableLabelProvider2 extends ColumnLabelProvider {
-
- private final AttachmentSizeFormatter sizeFormatter = AttachmentSizeFormatter.getInstance();
-
- private final IThemeManager themeManager = PlatformUI.getWorkbench().getThemeManager();
-
- private static final String[] IMAGE_EXTENSIONS = { "jpg", "gif", "png", "tiff", "tif", "bmp" };
-
- private final AttributeEditorToolkit attributeToolkit;
-
- public AttachmentTableLabelProvider2(AttributeEditorToolkit attributeToolkit) {
- this.attributeToolkit = attributeToolkit;
- }
-
- public Image getColumnImage(Object element, int columnIndex) {
- ITaskAttachment attachment = (ITaskAttachment) element;
- if (columnIndex == 0) {
- if (AttachmentUtil.isContext(attachment)) {
- return CommonImages.getImage(TasksUiImages.CONTEXT_TRANSFER);
- } else if (attachment.isPatch()) {
- return CommonImages.getImage(TasksUiImages.TASK_ATTACHMENT_PATCH);
- } else {
- String filename = attachment.getFileName();
- if (filename != null) {
- int dotIndex = filename.lastIndexOf('.');
- if (dotIndex != -1) {
- String fileType = filename.substring(dotIndex + 1);
- for (String element2 : IMAGE_EXTENSIONS) {
- if (element2.equalsIgnoreCase(fileType)) {
- return CommonImages.getImage(CommonImages.IMAGE_FILE);
- }
- }
- }
- }
- return WorkbenchImages.getImage(ISharedImages.IMG_OBJ_FILE);
- }
- } else {
- }
- return null;
- }
-
- public String getColumnText(Object element, int columnIndex) {
- ITaskAttachment attachment = (ITaskAttachment) element;
- switch (columnIndex) {
- case 0:
- if (AttachmentUtil.isContext(attachment)) {
- return " Task Context";
- } else if (attachment.isPatch()) {
- return " Patch";
- } else {
- return " " + attachment.getFileName();
- }
- case 1:
- return attachment.getDescription();
- case 2:
-// if (attachment.isPatch()) {
-// return "patch";
-// } else {
- return attachment.getContentType();
-// }
- case 3:
- return sizeFormatter.format(attachment.getLength());
- case 4:
- return (attachment.getAuthor() != null) ? attachment.getAuthor().toString() : "";
- case 5:
- return (attachment.getCreationDate() != null) ? EditorUtil.formatDateTime(attachment.getCreationDate())
- : "";
- }
- return "unrecognized column";
- }
-
- @Override
- public void addListener(ILabelProviderListener listener) {
- // ignore
- }
-
- @Override
- public void dispose() {
- // ignore
- }
-
- @Override
- public boolean isLabelProperty(Object element, String property) {
- // ignore
- return false;
- }
-
- @Override
- public void removeListener(ILabelProviderListener listener) {
- // ignore
- }
-
- public Color getForeground(Object element, int columnIndex) {
- ITaskAttachment att = (ITaskAttachment) element;
- if (att.isDeprecated()) {
- return themeManager.getCurrentTheme().getColorRegistry().get(CommonThemes.COLOR_COMPLETED);
- }
- return super.getForeground(element);
- }
-
- public Color getBackground(Object element, int columnIndex) {
- return super.getBackground(element);
- }
-
- public Font getFont(Object element, int columnIndex) {
- return super.getFont(element);
- }
-
- @Override
- public String getToolTipText(Object element) {
- ITaskAttachment attachment = (ITaskAttachment) element;
- return "File: " + attachment.getFileName();
- /*"\nFilename\t\t" + attachment.getAttributeValue("filename")
- +"ID\t\t\t" + attachment.getAttributeValue("attachid")
- + "\nDate\t\t\t" + attachment.getAttributeValue("date")
- + "\nDescription\t" + attachment.getAttributeValue("desc")
- + "\nCreator\t\t" + attachment.getCreator()
- + "\nType\t\t\t" + attachment.getAttributeValue("type")
- + "\nURL\t\t\t" + attachment.getAttributeValue("task.common.attachment.url");*/
- }
-
- @Override
- public Point getToolTipShift(Object object) {
- return new Point(5, 5);
- }
-
- @Override
- public int getToolTipDisplayDelayTime(Object object) {
- return 200;
- }
-
- @Override
- public int getToolTipTimeDisplayed(Object object) {
- return 5000;
- }
-
- @Override
- public void update(ViewerCell cell) {
- Object element = cell.getElement();
- cell.setText(getColumnText(element, cell.getColumnIndex()));
- Image image = getColumnImage(element, cell.getColumnIndex());
- cell.setImage(image);
- cell.setBackground(getBackground(element));
- cell.setForeground(getForeground(element));
- cell.setFont(getFont(element));
- }
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AttachmentsTableContentProvider.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AttachmentsTableContentProvider.java
deleted file mode 100644
index ab25c8ac1..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AttachmentsTableContentProvider.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import java.util.List;
-
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryAttachment;
-
-/**
- * @author Mik Kersten
- */
-public class AttachmentsTableContentProvider implements IStructuredContentProvider {
-
- private final List<RepositoryAttachment> attachments;
-
- public AttachmentsTableContentProvider(List<RepositoryAttachment> attachments) {
- this.attachments = attachments;
- }
-
- public Object[] getElements(Object inputElement) {
- return attachments.toArray();
- }
-
- public void dispose() {
- // ignore
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- if (!viewer.getControl().isDisposed()) {
- viewer.refresh();
- }
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AttachmentsTableContentProvider2.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AttachmentsTableContentProvider2.java
deleted file mode 100644
index 435753519..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AttachmentsTableContentProvider2.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import java.util.List;
-
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.mylyn.tasks.core.ITaskAttachment;
-
-/**
- * @author Mik Kersten
- */
-public class AttachmentsTableContentProvider2 implements IStructuredContentProvider {
-
- private final List<ITaskAttachment> attachments;
-
- public AttachmentsTableContentProvider2(List<ITaskAttachment> attachments) {
- this.attachments = attachments;
- }
-
- public Object[] getElements(Object inputElement) {
- return attachments.toArray();
- }
-
- public void dispose() {
- // ignore
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- if (!viewer.getControl().isDisposed()) {
- viewer.refresh();
- }
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/BooleanAttributeEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/BooleanAttributeEditor.java
deleted file mode 100644
index ddf2bdbcf..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/BooleanAttributeEditor.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.mylyn.tasks.core.data.TaskDataModel;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractAttributeEditor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-
-/**
- * @author Steffen Pingel
- */
-public class BooleanAttributeEditor extends AbstractAttributeEditor {
-
- public BooleanAttributeEditor(TaskDataModel manager, TaskAttribute taskAttribute) {
- super(manager, taskAttribute);
- }
-
- @Override
- public void createControl(Composite parent, FormToolkit toolkit) {
- final Button button = toolkit.createButton(parent, super.getLabel(), SWT.CHECK);
- button.setEnabled(!isReadOnly());
- button.setSelection(getValue());
- button.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- setValue(button.getSelection());
- }
- });
- setControl(button);
- }
-
- @Override
- public String getLabel() {
- return "";
- }
-
- public boolean getValue() {
- return getAttributeMapper().getBooleanValue(getTaskAttribute());
- }
-
- public void setValue(boolean value) {
- getAttributeMapper().setBooleanValue(getTaskAttribute(), value);
- attributeChanged();
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/CategoryEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/CategoryEditor.java
deleted file mode 100644
index 28950af32..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/CategoryEditor.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-import org.eclipse.ui.forms.widgets.ScrolledForm;
-import org.eclipse.ui.forms.widgets.Section;
-import org.eclipse.ui.forms.widgets.TableWrapData;
-import org.eclipse.ui.forms.widgets.TableWrapLayout;
-import org.eclipse.ui.part.EditorPart;
-
-/**
- * @author Ken Sueda
- * @author Mik Kersten
- */
-public class CategoryEditor extends EditorPart {
-
- public static final String ID_EDITOR = "org.eclipse.mylyn.tasks.ui.editors.category";
-
- private Text url;
-
- private CategoryEditorInput input = null;
-
- private boolean isDirty = false;
-
- private Text description = null;
-
- @Override
- public void doSave(IProgressMonitor monitor) {
- input.setCategoryName(description.getText());
- input.setUrl(url.getText());
- isDirty = false;
- firePropertyChange(PROP_DIRTY);
- }
-
- @Override
- public void doSaveAs() {
- }
-
- @Override
- public void init(IEditorSite site, IEditorInput input) throws PartInitException {
- setSite(site);
- setInput(input);
- this.input = (CategoryEditorInput) input;
- setPartName(input.getName());
- setTitleToolTip(input.getToolTipText());
- }
-
- @Override
- public boolean isDirty() {
- return isDirty;
- }
-
- @Override
- public boolean isSaveAsAllowed() {
- return false;
- }
-
- @Override
- public void createPartControl(Composite parent) {
- FormToolkit toolkit = new FormToolkit(parent.getDisplay());
- ScrolledForm sform = toolkit.createScrolledForm(parent);
- sform.getBody().setLayout(new TableWrapLayout());
- Composite editorComposite = sform.getBody();
-
- createSummarySection(editorComposite, toolkit);
- }
-
- @Override
- public void setFocus() {
- }
-
- private void createSummarySection(Composite parent, FormToolkit toolkit) {
- Section summarySection = toolkit.createSection(parent, ExpandableComposite.TITLE_BAR);
- summarySection.setText("Category Summary");
- summarySection.setLayout(new TableWrapLayout());
- summarySection.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
-
- Composite summaryContainer = toolkit.createComposite(summarySection);
- summarySection.setClient(summaryContainer);
- TableWrapLayout layout = new TableWrapLayout();
- layout.numColumns = 2;
- summaryContainer.setLayout(layout);
-
- ModifyListener modifyListener = new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- markDirty();
- }
- };
-
- toolkit.createLabel(summaryContainer, "Description: ", SWT.NULL);
-// lblDescription.setForeground(toolkit.getColors().getColor(FormColors.TITLE));
- description = toolkit.createText(summaryContainer, input.getCategoryName(), SWT.FLAT);
- description.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
- description.setData(FormToolkit.KEY_DRAW_BORDER);
- description.addModifyListener(modifyListener);
-
- toolkit.createLabel(summaryContainer, "URL: ", SWT.NONE);
-// lblUrl.setForeground(toolkit.getColors().getColor(FormColors.TITLE));
- url = toolkit.createText(summaryContainer, input.getUrl(), SWT.FLAT);
- url.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP));
- url.addModifyListener(modifyListener);
-
- toolkit.paintBordersFor(summaryContainer);
- }
-
- private void markDirty() {
- isDirty = true;
- firePropertyChange(PROP_DIRTY);
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/CategoryEditorInput.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/CategoryEditorInput.java
deleted file mode 100644
index eeba99ee1..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/CategoryEditorInput.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.mylyn.internal.tasks.core.TaskCategory;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IPersistableElement;
-
-/**
- * @author Ken Sueda
- */
-public class CategoryEditorInput implements IEditorInput {
-
- private final TaskCategory category;
-
- public CategoryEditorInput(TaskCategory cat) {
- this.category = cat;
- }
-
- public boolean exists() {
- return true;
- }
-
- public ImageDescriptor getImageDescriptor() {
- return null;
- }
-
- public String getName() {
- return "Category Editor";
- }
-
- public IPersistableElement getPersistable() {
- return null;
- }
-
- public String getToolTipText() {
- return "Category Editor";
- }
-
- @SuppressWarnings("unchecked")
- public Object getAdapter(Class adapter) {
- return null;
- }
-
- public String getCategoryName() {
- return category.getSummary();
- }
-
- public String getUrl() {
- return category.getUrl();
- }
-
- public void setCategoryName(String description) {
- TasksUiPlugin.getTaskList().renameContainer(category, description);
-// category.setDescription(summary);
- }
-
- public void setUrl(String url) {
- category.setUrl(url);
- TasksUiPlugin.getTaskList().notifyElementChanged(category);
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/ContentOutlineTools.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/ContentOutlineTools.java
deleted file mode 100644
index 9ceb77113..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/ContentOutlineTools.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-/**
- * @author Rob Elves
- * @author Mik Kersten
- */
-public class ContentOutlineTools {
-
- /** The default string used for locally created bugs. */
- public static final String OFFLINE_SERVER_DEFAULT = "[local]";
-
- /**
- * Returns a unique handle for the bugzilla selection. Contains the bug taskId, the bug server, and (if applicable)
- * the comment number.
- *
- * @param taskSelection
- * The bugzilla selection.
- * @return The handle for the bugzilla selection.
- */
- public static String getHandle(IRepositoryTaskSelection taskSelection) {
- String handle = taskSelection.getRepositoryUrl() + ";" + taskSelection.getId();
- if (taskSelection.hasComment()) {
- int number = taskSelection.getComment().getNumber() + 1;
- handle += ";" + number;
- } else if (taskSelection.isCommentHeader()) {
- handle += ";1";
- } else if (taskSelection.isDescription()) {
- handle += ";0";
- }
- return handle;
- }
-
- public static String getName(IRepositoryTaskSelection taskSelection) {
- String name = taskSelection.getRepositoryUrl() + ": Bug#: " + taskSelection.getId() + ": "
- + taskSelection.getBugSummary();
- if (taskSelection.hasComment()) {
- name += " : Comment#: " + taskSelection.getComment().getNumber();
- } else if (taskSelection.isCommentHeader()) {
- name += " : Comment Header";
- } else if (taskSelection.isDescription()) {
- name += ": Description";
- }
- return name;
- }
-
-// public static String getHandle(RepositoryTaskData taskData) {
-// return getHandle(taskData.getRepositoryUrl(), taskData.getId());
-// }
-//
-// public static String getHandle(String server, String taskId) {
-// return server + ";" + taskId;
-// }
-
-// public static String getName(RepositoryTaskData taskData) {
-// return taskData.getRepositoryUrl() + ": Bug#: " + taskData.getId() + ": " + taskData.getSummary();
-// }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/ControlSelectionService.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/ControlSelectionService.java
deleted file mode 100644
index 192257dff..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/ControlSelectionService.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.mylyn.tasks.core.data.TaskData;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPage;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
-import org.eclipse.ui.forms.widgets.Section;
-
-/**
- * @author Robert Elves
- * @author Steffen Pingel
- */
-public class ControlSelectionService {
-
- private final Map<Object, Control> controlBySelectableObject = new HashMap<Object, Control>();
-
- private final AbstractTaskEditorPage page;
-
- public ControlSelectionService(AbstractTaskEditorPage page) {
- this.page = page;
- }
-
- /**
- * @see #select(Object, boolean)
- */
- public void addSelectableControl(Object item, Control control) {
- controlBySelectableObject.put(item, control);
- }
-
- /**
- * Scroll to a specified piece of text
- *
- * @param selectionComposite
- * The StyledText to scroll to
- */
- private void focusOn(Control selectionComposite, boolean highlight) {
- int pos = 0;
- // if (previousText != null && !previousText.isDisposed()) {
- // previousText.setsetSelection(0);
- // }
-
- // if (selectionComposite instanceof FormText)
- // previousText = (FormText) selectionComposite;
-
- if (selectionComposite != null) {
-
- // if (highlight && selectionComposite instanceof FormText &&
- // !selectionComposite.isDisposed())
- // ((FormText) selectionComposite).set.setSelection(0, ((FormText)
- // selectionComposite).getText().length());
-
- // get the position of the text in the composite
- pos = 0;
- Control s = selectionComposite;
- if (s.isDisposed()) {
- return;
- }
- s.setEnabled(true);
- s.setFocus();
- s.forceFocus();
- while (s != null && s != page.getEditorComposite()) {
- if (!s.isDisposed()) {
- pos += s.getLocation().y;
- s = s.getParent();
- }
- }
-
- pos = pos - 60; // form.getOrigin().y;
-
- }
- if (!page.getManagedForm().getForm().getBody().isDisposed()) {
- page.getManagedForm().getForm().setOrigin(0, pos);
- }
- }
-
- /**
- * @see #addSelectableControl(Object, Control)
- */
- public void removeSelectableControl(Object item) {
- controlBySelectableObject.remove(item);
- }
-
- /**
- * Selects the given object in the editor.
- *
- * @param o
- * The object to be selected.
- * @param highlight
- * Whether or not the object should be highlighted.
- */
- public boolean select(Object o, boolean highlight) {
- Control control = controlBySelectableObject.get(o);
- if (control != null && !control.isDisposed()) {
-
- // expand all children
- if (control instanceof ExpandableComposite) {
- ExpandableComposite ex = (ExpandableComposite) control;
- if (!ex.isExpanded()) {
- EditorUtil.toggleExpandableComposite(true, ex);
- }
- }
-
- // expand all parents of control
- Composite comp = control.getParent();
- while (comp != null) {
- if (comp instanceof Section) {
- ((Section) comp).setExpanded(true);
- } else if (comp instanceof ExpandableComposite) {
- ExpandableComposite ex = (ExpandableComposite) comp;
- if (!ex.isExpanded()) {
- EditorUtil.toggleExpandableComposite(true, ex);
- }
-
- // HACK: This is necessary
- // due to a bug in SWT's ExpandableComposite.
- // 165803: Expandable bars should expand when clicking anywhere
- // https://bugs.eclipse.org/bugs/show_bug.cgi?taskId=165803
- if (ex.getData() != null && ex.getData() instanceof Composite) {
- ((Composite) ex.getData()).setVisible(true);
- }
- }
- comp = comp.getParent();
- }
- focusOn(control, highlight);
- } else if (o instanceof TaskData) {
- focusOn(null, highlight);
- } else {
- return false;
- }
- return true;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/DateAttributeEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/DateAttributeEditor.java
deleted file mode 100644
index 4c49151d6..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/DateAttributeEditor.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import java.text.SimpleDateFormat;
-import java.util.Calendar;
-import java.util.Date;
-
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.provisional.commons.ui.DatePicker;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.mylyn.tasks.core.data.TaskDataModel;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractAttributeEditor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.forms.events.HyperlinkAdapter;
-import org.eclipse.ui.forms.events.HyperlinkEvent;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-import org.eclipse.ui.forms.widgets.ImageHyperlink;
-
-/**
- * @author Steffen Pingel
- * @author Robert Elves
- */
-public class DateAttributeEditor extends AbstractAttributeEditor {
-
- private DatePicker datePicker;
-
- public DateAttributeEditor(TaskDataModel manager, TaskAttribute taskAttribute) {
- super(manager, taskAttribute);
- }
-
- @Override
- public void createControl(Composite composite, FormToolkit toolkit) {
- if (isReadOnly()) {
- Text text = new Text(composite, SWT.FLAT | SWT.READ_ONLY);
- text.setFont(TEXT_FONT);
- toolkit.adapt(text, true, false);
- text.setData(FormToolkit.KEY_DRAW_BORDER, Boolean.FALSE);
- if (getValue() != null) {
- text.setText(new SimpleDateFormat(EditorUtil.DATE_TIME_FORMAT).format(getValue()));
- }
- setControl(text);
- } else {
- Composite dateWithClearComposite = toolkit.createComposite(composite);
- GridLayout layout = new GridLayout(2, false);
- layout.marginWidth = 1;
- dateWithClearComposite.setLayout(layout);
-
- String value = "";
- Date date = getValue();
- if (date != null) {
- SimpleDateFormat f = new SimpleDateFormat(EditorUtil.DATE_FORMAT);
- value = f.format(date);
- }
-
- datePicker = new DatePicker(dateWithClearComposite, SWT.BORDER | SWT.FLAT, value, false, 0);
- datePicker.setEnabled(!isReadOnly());
- datePicker.setFont(TEXT_FONT);
- datePicker.setDatePattern(EditorUtil.DATE_FORMAT);
- datePicker.addPickerSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- Calendar cal = datePicker.getDate();
- if (cal != null) {
- // TODO goes dirty even if user presses cancel
- setValue(cal.getTime());
- } else {
- setValue(null);
- datePicker.setDate(null);
- }
- }
- });
-
- ImageHyperlink clearDeadlineDate = toolkit.createImageHyperlink(dateWithClearComposite, SWT.NONE);
- clearDeadlineDate.setImage(CommonImages.getImage(CommonImages.REMOVE));
- clearDeadlineDate.setToolTipText("Clear");
- clearDeadlineDate.addHyperlinkListener(new HyperlinkAdapter() {
- @Override
- public void linkActivated(HyperlinkEvent e) {
- setValue(null);
- datePicker.setDate(null);
- }
-
- });
-
- setControl(dateWithClearComposite);
- }
- }
-
- public Date getValue() {
- return getAttributeMapper().getDateValue(getTaskAttribute());
- }
-
- public void setValue(Date date) {
- getAttributeMapper().setDateValue(getTaskAttribute(), date);
- attributeChanged();
- }
-
- @Override
- protected void decorateIncoming(Color color) {
- if (datePicker != null) {
- datePicker.setBackground(color);
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/EditorBusyIndicator.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/EditorBusyIndicator.java
deleted file mode 100644
index 0e6d68b18..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/EditorBusyIndicator.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.swt.SWTException;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.internal.WorkbenchPlugin;
-
-/**
- * @author Shawn Minto
- * @author Steffen Pingel
- */
-public class EditorBusyIndicator {
-
- private class Animator implements Runnable {
-
- int imageDataIndex = 0;
-
- private final Image[] images;
-
- private boolean stopped;
-
- public Animator(Image[] images) {
- this.images = images;
- }
-
- public void run() {
- if (stopped) {
- return;
- }
-
- try {
- Image image = images[imageDataIndex];
- imageDataIndex = (imageDataIndex + 1) % images.length;
-
- if (updateTitleImage(image)) {
- PlatformUI.getWorkbench().getDisplay().timerExec(DELAY, this);
- }
- } catch (Exception e) {
- WorkbenchPlugin.log(e);
- }
- }
-
- public void stop() {
- stopped = true;
- }
- }
-
- public static final int DELAY = 90;
-
- private Animator animator;
-
- private final IBusyEditor editor;
-
- private Image[] images;
-
- private Image oldImage;
-
- public EditorBusyIndicator(IBusyEditor editor) {
- this.editor = editor;
- }
-
- /**
- * Start the busy indication.
- */
- public void start() {
- if (animator != null) {
- stop();
- }
-
- try {
- if (images == null) {
- images = CommonImages.getProgressImages();
- // if image fails to load do not continue
- if (images == null) {
- return;
- }
- }
-
- oldImage = editor.getTitleImage();
-
- if (images.length > 1) {
- animator = new Animator(images);
- animator.run();
- }
- } catch (SWTException e) {
- WorkbenchPlugin.log(e);
- }
- }
-
- /**
- * Stop showing the busy cursor.
- */
- public void stop() {
- if (animator != null) {
- animator.stop();
- animator = null;
-
- updateTitleImage(oldImage);
- oldImage = null;
- }
- }
-
- private boolean updateTitleImage(final Image image) {
- if (!PlatformUI.getWorkbench().isClosing()) {
- if (image != null && !image.isDisposed()) {
- editor.setTitleImage(image);
- return true;
- } else {
- if (oldImage != null && !oldImage.isDisposed()) {
- editor.setTitleImage(oldImage);
- }
- }
- }
- return false;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/EditorUtil.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/EditorUtil.java
deleted file mode 100644
index 728c857c9..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/EditorUtil.java
+++ /dev/null
@@ -1,304 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import java.lang.reflect.Method;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-import org.eclipse.jface.text.ITextOperationTarget;
-import org.eclipse.jface.text.TextViewer;
-import org.eclipse.swt.custom.StyledText;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.swt.widgets.Widget;
-import org.eclipse.ui.actions.ActionFactory;
-import org.eclipse.ui.forms.IManagedForm;
-import org.eclipse.ui.forms.editor.IFormPage;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
-import org.eclipse.ui.forms.widgets.ScrolledForm;
-import org.eclipse.ui.forms.widgets.Section;
-
-public class EditorUtil {
-
- public static final String DATE_FORMAT = "yyyy-MM-dd";
-
- public static final String DATE_TIME_FORMAT = "yyyy-MM-dd HH:mm";
-
- static final String KEY_MARKER = "marker";
-
- static final String KEY_TEXT_VIEWER = "textViewer";
-
- static boolean canDoGlobalAction(String actionId, TextViewer textViewer) {
- if (actionId.equals(ActionFactory.CUT.getId())) {
- return textViewer.canDoOperation(ITextOperationTarget.CUT);
- } else if (actionId.equals(ActionFactory.COPY.getId())) {
- return textViewer.canDoOperation(ITextOperationTarget.COPY);
- } else if (actionId.equals(ActionFactory.PASTE.getId())) {
- return textViewer.canDoOperation(ITextOperationTarget.PASTE);
- } else if (actionId.equals(ActionFactory.DELETE.getId())) {
- return textViewer.canDoOperation(ITextOperationTarget.DELETE);
- } else if (actionId.equals(ActionFactory.UNDO.getId())) {
- return textViewer.canDoOperation(ITextOperationTarget.UNDO);
- } else if (actionId.equals(ActionFactory.REDO.getId())) {
- return textViewer.canDoOperation(ITextOperationTarget.REDO);
- } else if (actionId.equals(ActionFactory.SELECT_ALL.getId())) {
- return textViewer.canDoOperation(ITextOperationTarget.SELECT_ALL);
- }
- return false;
- }
-
- public static boolean canPerformAction(String actionId, Control focusControl) {
- TextViewer viewer = getTextViewer(focusControl);
- if (viewer != null) {
- return canDoGlobalAction(actionId, viewer);
- }
- if (actionId.equals(ActionFactory.UNDO.getId()) || actionId.equals(ActionFactory.REDO.getId())) {
- return false;
- }
- return true;
- }
-
- private static boolean canPerformDirectly(String id, Control control) {
- if (control instanceof Text) {
- Text text = (Text) control;
- if (id.equals(ActionFactory.CUT.getId())) {
- text.cut();
- return true;
- }
- if (id.equals(ActionFactory.COPY.getId())) {
- text.copy();
- return true;
- }
- if (id.equals(ActionFactory.PASTE.getId())) {
- text.paste();
- return true;
- }
- if (id.equals(ActionFactory.SELECT_ALL.getId())) {
- text.selectAll();
- return true;
- }
- if (id.equals(ActionFactory.DELETE.getId())) {
- int count = text.getSelectionCount();
- if (count == 0) {
- int caretPos = text.getCaretPosition();
- text.setSelection(caretPos, caretPos + 1);
- }
- text.insert(""); //$NON-NLS-1$
- return true;
- }
- }
- return false;
- }
-
- public static void doAction(String actionId, Control focusControl) {
- if (canPerformDirectly(actionId, focusControl)) {
- return;
- }
- TextViewer viewer = getTextViewer(focusControl);
- if (viewer != null) {
- doGlobalAction(actionId, viewer);
- }
- }
-
- private static boolean doGlobalAction(String actionId, TextViewer textViewer) {
- if (actionId.equals(ActionFactory.CUT.getId())) {
- textViewer.doOperation(ITextOperationTarget.CUT);
- return true;
- } else if (actionId.equals(ActionFactory.COPY.getId())) {
- textViewer.doOperation(ITextOperationTarget.COPY);
- return true;
- } else if (actionId.equals(ActionFactory.PASTE.getId())) {
- textViewer.doOperation(ITextOperationTarget.PASTE);
- return true;
- } else if (actionId.equals(ActionFactory.DELETE.getId())) {
- textViewer.doOperation(ITextOperationTarget.DELETE);
- return true;
- } else if (actionId.equals(ActionFactory.UNDO.getId())) {
- textViewer.doOperation(ITextOperationTarget.UNDO);
- return true;
- } else if (actionId.equals(ActionFactory.REDO.getId())) {
- textViewer.doOperation(ITextOperationTarget.REDO);
- return true;
- } else if (actionId.equals(ActionFactory.SELECT_ALL.getId())) {
- textViewer.doOperation(ITextOperationTarget.SELECT_ALL);
- return true;
- }
- return false;
- }
-
- private static Control findControl(Composite composite, String key) {
- if (!composite.isDisposed()) {
- for (Control child : composite.getChildren()) {
- if (key.equals(getMarker(child))) {
- return child;
- }
- if (child instanceof Composite) {
- Control found = findControl((Composite) child, key);
- if (found != null) {
- return found;
- }
- }
- }
- }
- return null;
- }
-
- /**
- * Scroll to a specified piece of text
- *
- * @param control
- * The StyledText to scroll to
- */
- private static void focusOn(ScrolledForm form, Control control) {
- int pos = 0;
- control.setEnabled(true);
- control.setFocus();
- control.forceFocus();
- while (control != null && control != form.getBody()) {
- pos += control.getLocation().y;
- control = control.getParent();
- }
-
- pos = pos - 60; // form.getOrigin().y;
- if (!form.getBody().isDisposed()) {
- form.setOrigin(0, pos);
- }
- }
-
- static String formatDate(Date date) {
- return new SimpleDateFormat(DATE_FORMAT).format(date);
- }
-
- static String formatDateTime(Date date) {
- return new SimpleDateFormat(DATE_TIME_FORMAT).format(date);
- }
-
- public static Control getFocusControl(IFormPage page) {
- if (page == null) {
- return null;
- }
- IManagedForm form = page.getManagedForm();
- if (form == null) {
- return null;
- }
- Control control = form.getForm();
- if (control == null || control.isDisposed()) {
- return null;
- }
- Display display = control.getDisplay();
- Control focusControl = display.getFocusControl();
- if (focusControl == null || focusControl.isDisposed()) {
- return null;
- }
- return focusControl;
- }
-
- public static String getMarker(Widget widget) {
- return (String) widget.getData(KEY_MARKER);
- }
-
- public static TextViewer getTextViewer(Widget widget) {
- if (widget instanceof StyledText) {
- Object data = widget.getData(KEY_TEXT_VIEWER);
- if (data instanceof TextViewer) {
- return (TextViewer) data;
- }
- }
- return null;
- }
-
- /**
- * Selects the given object in the editor.
- *
- * @param o
- * The object to be selected.
- * @param highlight
- * Whether or not the object should be highlighted.
- */
- public static boolean reveal(ScrolledForm form, String key) {
- Control control = findControl(form.getBody(), key);
- if (control != null) {
- // expand all children
- if (control instanceof ExpandableComposite) {
- ExpandableComposite ex = (ExpandableComposite) control;
- if (!ex.isExpanded()) {
- toggleExpandableComposite(true, ex);
- }
- }
-
- // expand all parents of control
- Composite comp = control.getParent();
- while (comp != null) {
- if (comp instanceof Section) {
- if (!((Section) comp).isExpanded()) {
- ((Section) comp).setExpanded(true);
- }
- } else if (comp instanceof ExpandableComposite) {
- ExpandableComposite ex = (ExpandableComposite) comp;
- if (!ex.isExpanded()) {
- toggleExpandableComposite(true, ex);
- }
-
- // HACK: This is necessary
- // due to a bug in SWT's ExpandableComposite.
- // 165803: Expandable bars should expand when clicking anywhere
- // https://bugs.eclipse.org/bugs/show_bug.cgi?taskId=165803
- if (ex.getData() != null && ex.getData() instanceof Composite) {
- ((Composite) ex.getData()).setVisible(true);
- }
- }
- comp = comp.getParent();
- }
- focusOn(form, control);
- }
- return true;
- }
-
- public static void setEnabledState(Composite composite, boolean enabled) {
- if (!composite.isDisposed()) {
- composite.setEnabled(enabled);
- for (Control control : composite.getChildren()) {
- control.setEnabled(enabled);
- if (control instanceof Composite) {
- setEnabledState(((Composite) control), enabled);
- }
- }
- }
- }
-
- public static void setMarker(Widget widget, String text) {
- widget.setData(KEY_MARKER, text);
- }
-
- public static void setTextViewer(Widget widget, TextViewer textViewer) {
- widget.setData(KEY_TEXT_VIEWER, textViewer);
- }
-
- /**
- * Programmatically expand the provided ExpandableComposite, using reflection to fire the expansion listeners (see
- * bug#70358)
- *
- * @param comp
- */
- public static void toggleExpandableComposite(boolean expanded, ExpandableComposite comp) {
- if (comp.isExpanded() != expanded) {
- Method method = null;
- try {
- method = comp.getClass().getDeclaredMethod("programmaticToggleState");
- method.setAccessible(true);
- method.invoke(comp);
- } catch (Exception e) {
- // ignore
- }
- }
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/IBusyEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/IBusyEditor.java
deleted file mode 100644
index ca95d397e..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/IBusyEditor.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import org.eclipse.swt.graphics.Image;
-
-/**
- * @author Shawn Minto
- */
-public interface IBusyEditor {
-
- public void setTitleImage(Image image);
-
- public Image getTitleImage();
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/IRepositoryTaskAttributeListener.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/IRepositoryTaskAttributeListener.java
deleted file mode 100644
index 45612c744..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/IRepositoryTaskAttributeListener.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-/**
- * @author Ken Sueda
- */
-public interface IRepositoryTaskAttributeListener {
- public abstract void attributeChanged(String attribute, String value);
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/IRepositoryTaskSelection.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/IRepositoryTaskSelection.java
deleted file mode 100644
index 1a4f8062f..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/IRepositoryTaskSelection.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.TaskComment;
-
-public interface IRepositoryTaskSelection extends ISelection {
-
- /**
- * @return <code>true</code> if a comment was selected.
- */
- public boolean hasComment();
-
- /**
- * @return the <code>Comment</code> object for this selection, or <code>null</code> if a comment was not
- * selected.
- */
- public TaskComment getComment();
-
- /**
- * Sets the <code>Comment</code> object for this selection. If a comment was not selected, then this should be
- * <code>null</code>.
- *
- * @param taskComment
- * The selection's comment, or <code>null</code> if not applicable.
- */
- public void setComment(TaskComment taskComment);
-
- /**
- * @return The contents of the selection. This can be <code>null</code>.
- */
- public String getContents();
-
- /**
- * Sets the contents of the selection.
- *
- * @param contents
- * The selection.
- */
- public void setContents(String contents);
-
- /**
- * @return The taskId of the Bugzilla object that the selection was on.
- */
- public String getId();
-
- /**
- * Sets the taskId of the Bugzilla object that the selection was on.
- *
- * @param taskId
- * The taskId of the bug.
- */
- public void setId(String id);
-
- /**
- * @return The server of the Bugzilla object that the selection was on, or <code>null</code> if no server is
- * supplied.
- */
- public String getRepositoryUrl();
-
- /**
- * Sets the server of the Bugzilla object that the selection was on.
- *
- * @param server
- * The server of the bug.
- */
- public void setServer(String server);
-
- public boolean isCommentHeader();
-
- public boolean isDescription();
-
- public String getBugSummary();
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/LongTextAttributeEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/LongTextAttributeEditor.java
deleted file mode 100644
index 3b876b576..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/LongTextAttributeEditor.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import org.eclipse.jface.text.Document;
-import org.eclipse.jface.text.TextViewer;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.mylyn.tasks.core.data.TaskDataModel;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractAttributeEditor;
-import org.eclipse.mylyn.tasks.ui.editors.LayoutHint;
-import org.eclipse.mylyn.tasks.ui.editors.LayoutHint.ColumnSpan;
-import org.eclipse.mylyn.tasks.ui.editors.LayoutHint.RowSpan;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.StyledText;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-
-/**
- * @author Steffen Pingel
- */
-public class LongTextAttributeEditor extends AbstractAttributeEditor {
-
- public LongTextAttributeEditor(TaskDataModel manager, TaskAttribute taskAttribute) {
- super(manager, taskAttribute);
- setLayoutHint(new LayoutHint(RowSpan.MULTIPLE, ColumnSpan.MULTIPLE));
- }
-
- @Override
- public void createControl(Composite parent, FormToolkit toolkit) {
- int style = SWT.FLAT | SWT.MULTI | SWT.WRAP;
- if (!isReadOnly()) {
- style |= SWT.V_SCROLL;
- }
- TextViewer viewer = new TextViewer(parent, style);
- viewer.setDocument(new Document(getValue()));
-
- final StyledText text = viewer.getTextWidget();
- toolkit.adapt(text, true, false);
-
- if (isReadOnly()) {
- viewer.setEditable(false);
- } else {
- viewer.setEditable(true);
- text.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
- text.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- setValue(text.getText());
- }
- });
- }
-
- setControl(text);
- }
-
- public String getValue() {
- return getAttributeMapper().getValue(getTaskAttribute());
- }
-
- public void setValue(String text) {
- getAttributeMapper().setValue(getTaskAttribute(), text);
- attributeChanged();
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/MultiSelectionAttributeEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/MultiSelectionAttributeEditor.java
deleted file mode 100644
index f0a9a3c80..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/MultiSelectionAttributeEditor.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.mylyn.tasks.core.data.TaskDataModel;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractAttributeEditor;
-import org.eclipse.mylyn.tasks.ui.editors.LayoutHint;
-import org.eclipse.mylyn.tasks.ui.editors.LayoutHint.ColumnSpan;
-import org.eclipse.mylyn.tasks.ui.editors.LayoutHint.RowSpan;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.List;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-
-/**
- * @author Steffen Pingel
- */
-public class MultiSelectionAttributeEditor extends AbstractAttributeEditor {
-
- private String[] allValues;
-
- private List list;
-
- public MultiSelectionAttributeEditor(TaskDataModel manager, TaskAttribute taskAttribute) {
- super(manager, taskAttribute);
- setLayoutHint(new LayoutHint(RowSpan.MULTIPLE, ColumnSpan.SINGLE));
- }
-
- @Override
- public void createControl(Composite parent, FormToolkit toolkit) {
- list = new List(parent, SWT.FLAT | SWT.MULTI | SWT.V_SCROLL);
- toolkit.adapt(list, true, false);
- list.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
- list.setFont(TEXT_FONT);
-
- Map<String, String> labelByValue = getAttributeMapper().getOptions(getTaskAttribute());
- if (labelByValue != null) {
- allValues = labelByValue.keySet().toArray(new String[0]);
- for (String value : allValues) {
- list.add(labelByValue.get(value));
- }
- }
-
- select(getValues(), getValuesLabels());
-
- if (allValues != null) {
- list.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- Assert.isNotNull(allValues);
- int[] indices = list.getSelectionIndices();
- String[] selectedValues = new String[indices.length];
- for (int i = 0; i < indices.length; i++) {
- int index = indices[i];
- Assert.isLegal(index >= 0 && index <= allValues.length - 1);
- selectedValues[i] = allValues[index];
- }
- setValues(selectedValues);
- }
- });
- list.showSelection();
- }
-
- setControl(list);
- }
-
- public String[] getValues() {
- return getAttributeMapper().getValues(getTaskAttribute()).toArray(new String[0]);
- }
-
- public String[] getValuesLabels() {
- return getAttributeMapper().getValueLabels(getTaskAttribute()).toArray(new String[0]);
- }
-
- private void select(String[] values, String[] labels) {
- if (values != null) {
- list.deselectAll();
- Set<String> selectedValues = new HashSet<String>(Arrays.asList(values));
- for (int i = 0; i < allValues.length; i++) {
- if (selectedValues.contains(allValues[i])) {
- list.select(i);
- }
- }
- } else {
- list.setItems(labels);
- list.setSelection(labels);
- }
- }
-
- public void setValues(String[] values) {
- getAttributeMapper().setValues(getTaskAttribute(), Arrays.asList(values));
- attributeChanged();
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/PersonAttributeEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/PersonAttributeEditor.java
deleted file mode 100644
index d42c4165b..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/PersonAttributeEditor.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.mylyn.tasks.core.data.TaskDataModel;
-
-/**
- * @author Steffen Pingel
- */
-public class PersonAttributeEditor extends TextAttributeEditor {
-
- public PersonAttributeEditor(TaskDataModel manager, TaskAttribute taskAttribute) {
- super(manager, taskAttribute);
- }
-
- @Override
- public String getValue() {
- return getAttributeMapper().getRepositoryPerson(getTaskAttribute()).toString();
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/PlanningPageFactory.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/PlanningPageFactory.java
deleted file mode 100644
index 659168dc2..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/PlanningPageFactory.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPageFactory;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditorInput;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.forms.editor.FormPage;
-
-public class PlanningPageFactory extends AbstractTaskEditorPageFactory {
-
- @Override
- public boolean canCreatePageFor(TaskEditorInput input) {
- return true;
- }
-
- @Override
- public FormPage createPage(TaskEditor parentEditor) {
- return new TaskPlanningEditor(parentEditor);
- }
-
- @Override
- public Image getPageImage() {
- return CommonImages.getImage(CommonImages.CALENDAR_SMALL);
- }
-
- @Override
- public String getPageText() {
- return "Planning";
- }
-
- @Override
- public int getPriority() {
- return PRIORITY_PLANNING;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/PreviewAttributeEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/PreviewAttributeEditor.java
deleted file mode 100644
index 3ea73d158..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/PreviewAttributeEditor.java
+++ /dev/null
@@ -1,262 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-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.jobs.IJobChangeEvent;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.core.runtime.jobs.JobChangeAdapter;
-import org.eclipse.jface.text.Region;
-import org.eclipse.jface.text.TextViewer;
-import org.eclipse.jface.text.hyperlink.IHyperlink;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.core.RepositoryStatus;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.mylyn.tasks.core.data.TaskDataModel;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractAttributeEditor;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractRenderingEngine;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.browser.Browser;
-import org.eclipse.swt.browser.LocationAdapter;
-import org.eclipse.swt.browser.LocationEvent;
-import org.eclipse.swt.custom.StackLayout;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-
-public class PreviewAttributeEditor extends AbstractAttributeEditor {
-
- private final RichTextAttributeEditor editor;
-
- private boolean ignoreLocationEvents;
-
- private final AbstractRenderingEngine renderingEngine;
-
- private final TaskRepository taskRepository;
-
- public PreviewAttributeEditor(TaskDataModel manager, TaskAttribute taskAttribute, TaskRepository taskRepository,
- AbstractRenderingEngine renderingEngine, RichTextAttributeEditor editor) {
- super(manager, taskAttribute);
- Assert.isNotNull(taskRepository);
- Assert.isNotNull(editor);
- Assert.isNotNull(renderingEngine);
- this.taskRepository = taskRepository;
- this.editor = editor;
- this.renderingEngine = renderingEngine;
- }
-
- private Browser addBrowser(Composite parent, int style) {
- Browser browser = new Browser(parent, style);
- // intercept links to open tasks in rich editor and urls in separate browser
- browser.addLocationListener(new LocationAdapter() {
- @Override
- public void changing(LocationEvent event) {
- // ignore events that are caused by manually setting the contents of the browser
- if (ignoreLocationEvents) {
- return;
- }
-
- if (event.location != null && !event.location.startsWith("about")) {
- event.doit = false;
- IHyperlink link = new TaskUrlHyperlink(
- new Region(0, 0)/* a fake region just to make constructor happy */, event.location);
- link.open();
- }
- }
-
- });
-
- return browser;
- }
-
- @Override
- public void createControl(Composite parent, FormToolkit toolkit) {
- final Composite sectionComposite = toolkit.createComposite(parent);
- sectionComposite.setLayout(new GridLayout(1, false));
-
- // composite with StackLayout to hold text editor and preview widget
- Composite editorComposite = toolkit.createComposite(sectionComposite);
- editorComposite.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
- GridData gd = new GridData(GridData.FILL_BOTH);
- gd.widthHint = MAXIMUM_WIDTH;
- gd.minimumHeight = MAXIMUM_HEIGHT;
- gd.grabExcessHorizontalSpace = true;
- editorComposite.setLayoutData(gd);
- final StackLayout descriptionLayout = new StackLayout();
- editorComposite.setLayout(descriptionLayout);
-
- editor.createControl(editorComposite, toolkit);
-
- // composite for edit/preview button
- Composite buttonComposite = toolkit.createComposite(sectionComposite);
- buttonComposite.setLayout(new GridLayout());
- createPreviewButton(buttonComposite, editor.getViewer(), editorComposite, descriptionLayout, toolkit);
- }
-
- /**
- * Creates and sets up the button for switching between text editor and HTML preview. Subclasses that support HTML
- * preview of new comments must override this method.
- *
- * @param buttonComposite
- * the composite that holds the button
- * @param editor
- * the TextViewer for editing text
- * @param previewBrowser
- * the Browser for displaying the preview
- * @param editorLayout
- * the StackLayout of the <code>editorComposite</code>
- * @param editorComposite
- * the composite that holds <code>editor</code> and <code>previewBrowser</code>
- * @since 2.1
- */
- private void createPreviewButton(final Composite buttonComposite, final TextViewer editor,
- final Composite editorComposite, final StackLayout editorLayout, final FormToolkit toolkit) {
- // create an anonymous object that encapsulates the edit/preview button together with
- // its state and String constants for button text;
- // this implementation keeps all information needed to set up the button
- // in this object and the method parameters, and this method is reused by both the
- // description section and new comments section.
- new Object() {
- private static final String LABEL_BUTTON_EDIT = "Edit";
-
- private static final String LABEL_BUTTON_PREVIEW = "Preview";
-
- private int buttonState = 0;
-
- private Browser previewBrowser;
-
- private Button previewButton;
-
- {
- previewButton = toolkit.createButton(buttonComposite, LABEL_BUTTON_PREVIEW, SWT.PUSH);
- GridData previewButtonData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- previewButtonData.widthHint = 100;
- //previewButton.setImage(TasksUiImages.getImage(TasksUiImages.PREVIEW));
- previewButton.setLayoutData(previewButtonData);
- previewButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- if (previewBrowser == null) {
- previewBrowser = addBrowser(editorComposite, SWT.NONE);
- }
-
- buttonState = ++buttonState % 2;
- if (buttonState == 1) {
-
- setText(previewBrowser, "Loading preview...");
- previewWiki(previewBrowser, editor.getTextWidget().getText());
- }
- previewButton.setText(buttonState == 0 ? LABEL_BUTTON_PREVIEW : LABEL_BUTTON_EDIT);
- editorLayout.topControl = (buttonState == 0 ? editor.getControl() : previewBrowser);
- editorComposite.layout();
- }
- });
- }
-
- };
- }
-
- private void previewWiki(final Browser browser, String sourceText) {
- final class PreviewWikiJob extends Job {
- private String htmlText;
-
- private IStatus jobStatus;
-
- private final String sourceText;
-
- public PreviewWikiJob(String sourceText) {
- super("Formatting Wiki Text");
-
- if (sourceText == null) {
- throw new IllegalArgumentException("source text must not be null");
- }
-
- this.sourceText = sourceText;
- }
-
- public String getHtmlText() {
- return htmlText;
- }
-
- public IStatus getStatus() {
- return jobStatus;
- }
-
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- if (renderingEngine == null) {
- jobStatus = new RepositoryStatus(taskRepository, IStatus.INFO, TasksUiPlugin.ID_PLUGIN,
- RepositoryStatus.ERROR_INTERNAL, "The repository does not support HTML preview.");
- return Status.OK_STATUS;
- }
-
- jobStatus = Status.OK_STATUS;
- try {
- htmlText = renderingEngine.renderAsHtml(taskRepository, sourceText, monitor);
- } catch (CoreException e) {
- jobStatus = e.getStatus();
- }
- return Status.OK_STATUS;
- }
-
- }
-
- final PreviewWikiJob job = new PreviewWikiJob(sourceText);
-
- job.addJobChangeListener(new JobChangeAdapter() {
-
- @Override
- public void done(final IJobChangeEvent event) {
- if (!getControl().isDisposed()) {
- if (job.getStatus().isOK()) {
- getControl().getDisplay().asyncExec(new Runnable() {
- public void run() {
- setText(browser, job.getHtmlText());
- // TODO EDITOR error handling
- //getAttributeEditorManager().setMessage(null, IMessageProvider.NONE);
- }
- });
- } else {
- getControl().getDisplay().asyncExec(new Runnable() {
- public void run() {
- TasksUiInternal.displayStatus("Error", job.getStatus());
- // TODO EDITOR error handling
- //getAttributeEditorManager().setMessage(job.getStatus().getMessage(), IMessageProvider.ERROR);
- }
- });
- }
- }
- super.done(event);
- }
- });
-
- job.setUser(true);
- job.schedule();
- }
-
- private void setText(Browser browser, String html) {
- try {
- ignoreLocationEvents = true;
- browser.setText((html != null) ? html : "");
- } finally {
- ignoreLocationEvents = false;
- }
-
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryAttachmentEditorInput.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryAttachmentEditorInput.java
deleted file mode 100644
index f54512f97..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryAttachmentEditorInput.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import java.io.InputStream;
-
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractAttachmentHandler;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractLegacyRepositoryConnector;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryAttachment;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.ui.IPersistableElement;
-import org.eclipse.ui.IStorageEditorInput;
-
-/**
- * @author Jeff Pound
- */
-public class RepositoryAttachmentEditorInput extends PlatformObject implements IStorageEditorInput {
-
- private final RepositoryAttachment attachment;
-
- private final RepositoryAttachmentStorage storage;
-
- private final TaskRepository repository;
-
- public RepositoryAttachmentEditorInput(TaskRepository repository, RepositoryAttachment att) {
- this.attachment = att;
- this.storage = new RepositoryAttachmentStorage();
- this.repository = repository;
- }
-
- public IStorage getStorage() throws CoreException {
- return storage;
- }
-
- public boolean exists() {
- return true;
- }
-
- public ImageDescriptor getImageDescriptor() {
- // ignore
- return null;
- }
-
- public String getName() {
- return storage.getName();
- }
-
- public IPersistableElement getPersistable() {
- return null;
- }
-
- public String getToolTipText() {
- return "Repository Attachment: " + attachment.getId() + " [" + attachment.getUrl() + "]";
- }
-
- class RepositoryAttachmentStorage extends PlatformObject implements IStorage {
-
- private static final String ATTR_FILENAME = "filename";
-
- private static final String ATTACHMENT_DEFAULT_NAME = "attachment";
-
- private static final String CTYPE_ZIP = "zip";
-
- private static final String CTYPE_OCTET_STREAM = "octet-stream";
-
- private static final String CTYPE_TEXT = "text";
-
- private static final String CTYPE_HTML = "html";
-
- public InputStream getContents() throws CoreException {
- AbstractLegacyRepositoryConnector connector = (AbstractLegacyRepositoryConnector) TasksUi.getRepositoryManager()
- .getRepositoryConnector(repository.getConnectorKind());
- AbstractAttachmentHandler handler = connector.getAttachmentHandler();
- return handler.getAttachmentAsStream(repository, attachment, new NullProgressMonitor());
- }
-
- public IPath getFullPath() {
- // ignore
- return null;
- }
-
- public String getName() {
- String name = attachment.getAttributeValue(ATTR_FILENAME);
-
- // if no filename is set, make one up with the proper extension so
- // we can support opening in that filetype's default editor
- if (name == null || "".equals(name)) {
- String ctype = attachment.getContentType();
- if (ctype.endsWith(CTYPE_HTML)) {
- name = ATTACHMENT_DEFAULT_NAME + ".html";
- } else if (ctype.startsWith(CTYPE_TEXT)) {
- name = ATTACHMENT_DEFAULT_NAME + ".txt";
- } else if (ctype.endsWith(CTYPE_OCTET_STREAM)) {
- name = ATTACHMENT_DEFAULT_NAME;
- } else if (ctype.endsWith(CTYPE_ZIP)) {
- name = ATTACHMENT_DEFAULT_NAME + "." + CTYPE_ZIP;
- } else {
- name = ATTACHMENT_DEFAULT_NAME + "." + ctype.substring(ctype.indexOf("/") + 1);
- }
- }
- // treat .patch files as text files
- if (name.endsWith(".patch")) {
- name += ".txt";
- }
-
- return name;
- }
-
- public boolean isReadOnly() {
- return true;
- }
-
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryCompletionProcessor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryCompletionProcessor.java
deleted file mode 100644
index 09fb4bebc..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryCompletionProcessor.java
+++ /dev/null
@@ -1,322 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITextSelection;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.text.contentassist.IContextInformation;
-import org.eclipse.jface.text.contentassist.IContextInformationValidator;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.LocalTask;
-import org.eclipse.mylyn.internal.tasks.core.TaskActivationHistory;
-import org.eclipse.mylyn.internal.tasks.core.TaskList;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.actions.CopyTaskDetailsAction;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TaskElementLabelProvider;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditorInput;
-import org.eclipse.ui.IEditorReference;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Frank Becker
- * @author Steffen Pingel
- * @since 3.0
- */
-public class RepositoryCompletionProcessor implements IContentAssistProcessor {
-
- private class ProposalComputer {
-
- public static final String LABEL_SEPARATOR = " -------------------------------------------- ";
-
- private final Set<ITask> addedTasks = new HashSet<ITask>();
-
- private boolean addSeparator;
-
- private final int offset;
-
- private final String prefix;
-
- private final List<CompletionProposal> resultList = new ArrayList<CompletionProposal>();
-
- public ProposalComputer(ITextViewer viewer, int offset) {
- this.offset = offset;
- this.prefix = extractPrefix(viewer, offset).toLowerCase();
- }
-
- private void addProposal(ITask task, String replacement, boolean includeTaskPrefix) {
- if (addSeparator) {
- if (!addedTasks.isEmpty()) {
- resultList.add(createSeparator());
- }
- addSeparator = false;
- }
-
- replacement = getReplacement(task, replacement, includeTaskPrefix);
- String displayString = labelProvider.getText(task);
- resultList.add(new CompletionProposal(replacement, offset - prefix.length(), prefix.length(),
- replacement.length(), labelProvider.getImage(task), displayString, null, null));
-
- addedTasks.add(task);
- }
-
- public void addSeparator() {
- addSeparator = true;
- }
-
- public void addTasks(List<AbstractTask> tasks) {
- for (AbstractTask task : tasks) {
- addTask(task);
- }
- }
-
- public void addTask(ITask task) {
- if (addedTasks.contains(task)) {
- return;
- }
-
- if (getNeverIncludePrefix() && !task.getRepositoryUrl().equals(taskRepository.getRepositoryUrl())) {
- return;
- }
-
- String taskKey = task.getTaskKey();
- if (prefix.length() == 0) {
- addProposal(task, taskKey, !getNeverIncludePrefix());
- } else if (taskKey != null && taskKey.startsWith(prefix)) {
- addProposal(task, taskKey, false);
- } else if (containsPrefix(task)) {
- addProposal(task, taskKey, !getNeverIncludePrefix());
- }
- }
-
- private String getReplacement(ITask task, String text, boolean includeTaskPrefix) {
- // add an absolute reference to the task if the viewer does not have a repository
- if (taskRepository == null || text == null
- || !taskRepository.getRepositoryUrl().equals(task.getRepositoryUrl())) {
- return CopyTaskDetailsAction.getTextForTask(task);
- }
-
- if (includeTaskPrefix) {
- return getTaskPrefix(task) + text;
- } else {
- return text;
- }
- }
-
- private boolean containsPrefix(ITask task) {
- String searchTest = getTaskPrefix(task) + " " + labelProvider.getText(task);
- String[] tokens = searchTest.split("\\s");
- for (String token : tokens) {
- if (token.toLowerCase().startsWith(prefix)) {
- return true;
- }
- }
- return false;
- }
-
- private CompletionProposal createSeparator() {
- return new CompletionProposal("", offset, 0, 0, CommonImages.getImage(CommonImages.SEPARATOR_LIST),
- LABEL_SEPARATOR, null, null);
- }
-
- /**
- * Returns the prefix of the currently completed text. Assumes that any character that is not a line break or
- * white space can be part of a task id.
- */
- private String extractPrefix(ITextViewer viewer, int offset) {
- int i = offset;
- IDocument document = viewer.getDocument();
- if (i > document.getLength()) {
- return "";
- }
-
- try {
- while (i > 0) {
- char ch = document.getChar(i - 1);
- if (Character.isWhitespace(ch)) {
- break;
- }
- i--;
- }
-
- return document.get(i, offset - i);
- } catch (BadLocationException e) {
- return "";
- }
- }
-
- public void filterTasks(List<AbstractTask> tasks) {
- for (Iterator<AbstractTask> it = tasks.iterator(); it.hasNext();) {
- ITask task = it.next();
- if (!select(task)) {
- it.remove();
- }
- }
- }
-
- private boolean select(ITask task) {
- return !(task instanceof LocalTask) //
- && (taskRepository == null || task.getRepositoryUrl().equals(taskRepository.getRepositoryUrl()));
- }
-
- public ICompletionProposal[] getResult() {
- return resultList.toArray(new ICompletionProposal[resultList.size()]);
- }
-
- }
-
- private static final int MAX_OPEN_EDITORS = 10;
-
- private static final int MAX_ACTIVATED_TASKS = 10;
-
- private final TaskElementLabelProvider labelProvider = new TaskElementLabelProvider(false);
-
- private final TaskRepository taskRepository;
-
- private boolean neverIncludePrefix;
-
- public RepositoryCompletionProcessor(TaskRepository taskRepository) {
- this.taskRepository = taskRepository;
- this.neverIncludePrefix = false;
- }
-
- public boolean getNeverIncludePrefix() {
- return neverIncludePrefix;
- }
-
- public void setNeverIncludePrefix(boolean includePrefix) {
- this.neverIncludePrefix = includePrefix;
- }
-
- public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) {
- ITextSelection selection = (ITextSelection) viewer.getSelectionProvider().getSelection();
- // adjust offset to end of normalized selection
- if (selection.getOffset() == offset) {
- offset = selection.getOffset() + selection.getLength();
- }
-
- ProposalComputer proposalComputer = new ProposalComputer(viewer, offset);
-
- // add tasks from navigation history
-// IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
-// if (window != null) {
-// IWorkbenchPage page = window.getActivePage();
-// if (page != null) {
-// INavigationHistory history = page.getNavigationHistory();
-// INavigationLocation[] locations = history.getLocations();
-// if (locations != null) {
-// for (INavigationLocation location : locations) {
-// // location is always null
-// }
-// }
-// }
-// }
-
- // add open editor
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- if (window != null) {
- IWorkbenchPage page = window.getActivePage();
- if (page != null) {
- IEditorReference[] editorReferences = page.getEditorReferences();
- int count = 0;
- for (int i = editorReferences.length - 1; i >= 0 && count < MAX_OPEN_EDITORS; i--) {
- try {
- if (editorReferences[i].getEditorInput() instanceof TaskEditorInput) {
- TaskEditorInput input = (TaskEditorInput) editorReferences[i].getEditorInput();
- ITask task = input.getTask();
- if (task != null && !(task instanceof LocalTask)) {
- proposalComputer.addTask(task);
- count++;
- }
- }
- } catch (PartInitException e) {
- // ignore
- }
- }
- }
- }
-
- // add tasks from activation history
- TaskActivationHistory taskHistory = TasksUiPlugin.getTaskActivityManager().getTaskActivationHistory();
- List<AbstractTask> tasks = taskHistory.getPreviousTasks(TasksUiInternal.getContainersFromWorkingSet(TaskListView.getActiveWorkingSets()));
- int count = 0;
- for (int i = tasks.size() - 1; i >= 0 && count < MAX_ACTIVATED_TASKS; i--) {
- AbstractTask task = tasks.get(i);
- if (!(task instanceof LocalTask)) {
- proposalComputer.addTask(task);
- }
- }
-
- // add all remaining tasks for repository
- if (taskRepository != null) {
- proposalComputer.addSeparator();
-
- TaskList taskList = TasksUiPlugin.getTaskList();
- tasks = new ArrayList<AbstractTask>(taskList.getAllTasks());
- proposalComputer.filterTasks(tasks);
- Collections.sort(tasks, new Comparator<AbstractTask>() {
- public int compare(AbstractTask o1, AbstractTask o2) {
- return labelProvider.getText(o1).compareTo(labelProvider.getText(o2));
- }
- });
- proposalComputer.addTasks(tasks);
- }
-
- return proposalComputer.getResult();
- }
-
- public IContextInformation[] computeContextInformation(ITextViewer viewer, int offset) {
- return null;
- }
-
- public char[] getCompletionProposalAutoActivationCharacters() {
- return null;
- }
-
- public char[] getContextInformationAutoActivationCharacters() {
- return null;
- }
-
- public IContextInformationValidator getContextInformationValidator() {
- return null;
- }
-
- public String getErrorMessage() {
- return null;
- }
-
- private String getTaskPrefix(ITask task) {
- AbstractRepositoryConnector connector = TasksUiPlugin.getConnector(task.getConnectorKind());
- String prefix = connector.getTaskIdPrefix();
- // FIXME work around for Trac "#" prefix
- return (prefix.length() > 1) ? prefix + " " : prefix;
- }
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTaskEditorDropListener.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTaskEditorDropListener.java
deleted file mode 100644
index b0e08397a..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTaskEditorDropListener.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import java.io.File;
-
-import org.eclipse.jface.dialogs.IMessageProvider;
-import org.eclipse.jface.window.Window;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-import org.eclipse.mylyn.internal.tasks.ui.deprecated.AbstractRepositoryTaskEditor;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.NewAttachmentWizard;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.NewAttachmentWizardDialog;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.swt.dnd.DND;
-import org.eclipse.swt.dnd.DropTargetEvent;
-import org.eclipse.swt.dnd.DropTargetListener;
-import org.eclipse.swt.dnd.FileTransfer;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.dnd.TransferData;
-import org.eclipse.swt.widgets.Control;
-
-/**
- * Not API.
- *
- * @author Mik Kersten
- * @author Maarten Meijer
- */
-public class RepositoryTaskEditorDropListener implements DropTargetListener {
-
- private final AbstractRepositoryTaskEditor editor;
-
- private final FileTransfer fileTransfer;
-
- private final TextTransfer textTransfer;
-
- private final Control control;
-
- private final TaskRepository repository;
-
- private final RepositoryTaskData taskData;
-
- public RepositoryTaskEditorDropListener(AbstractRepositoryTaskEditor editor, TaskRepository repository,
- RepositoryTaskData taskData, FileTransfer fileTransfer, TextTransfer textTransfer, Control control) {
- this.editor = editor;
- this.repository = repository;
- this.taskData = taskData;
- this.fileTransfer = fileTransfer;
- this.textTransfer = textTransfer;
- this.control = control;
- }
-
- public void dragEnter(DropTargetEvent event) {
- if (event.detail == DND.DROP_DEFAULT) {
- if ((event.operations & DND.DROP_COPY) != 0) {
- event.detail = DND.DROP_COPY;
- } else {
- event.detail = DND.DROP_NONE;
- }
- }
- // will accept text but prefer to have files dropped
- for (TransferData dataType : event.dataTypes) {
- if (fileTransfer.isSupportedType(dataType)) {
- event.currentDataType = dataType;
- // files should only be copied
- if (event.detail != DND.DROP_COPY) {
- event.detail = DND.DROP_NONE;
- }
- break;
- }
- }
- }
-
- public void dragOver(DropTargetEvent event) {
- event.feedback = DND.FEEDBACK_SELECT | DND.FEEDBACK_SCROLL;
- // if (textTransfer.isSupportedType(event.currentDataType)) {
- // // NOTE: on unsupported platforms this will return null
- // Object o = textTransfer.nativeToJava(event.currentDataType);
- // String t = (String)o;
- // if (t != null) System.out.println(t);
- // }
- }
-
- public void dragOperationChanged(DropTargetEvent event) {
- if ((event.detail == DND.DROP_DEFAULT) || (event.operations & DND.DROP_COPY) != 0) {
-
- event.detail = DND.DROP_COPY;
- } else {
- event.detail = DND.DROP_NONE;
- }
-
- // allow text to be moved but files should only be copied
- if (fileTransfer.isSupportedType(event.currentDataType)) {
- if (event.detail != DND.DROP_COPY) {
- event.detail = DND.DROP_NONE;
- }
- }
- }
-
- public void dragLeave(DropTargetEvent event) {
- }
-
- public void dropAccept(DropTargetEvent event) {
- }
-
- public void drop(DropTargetEvent event) {
- if (textTransfer.isSupportedType(event.currentDataType)) {
- String text = (String) event.data;
- AbstractTask task = (AbstractTask) TasksUiInternal.getTaskList().getTask(repository.getRepositoryUrl(),
- taskData.getTaskId());
- if (!(task != null)) {
- // Should not happen
- return;
- }
-
- editor.setGlobalBusy(true);
- NewAttachmentWizard naw = new NewAttachmentWizard(repository, task, text);
- openDialog(naw, null);
- }
- if (fileTransfer.isSupportedType(event.currentDataType)) {
- String[] files = (String[]) event.data;
- if (files.length > 0) {
- AbstractTask task = (AbstractTask) TasksUiInternal.getTaskList().getTask(repository.getRepositoryUrl(),
- taskData.getTaskId());
- if (task == null) {
- // Should not happen
- return;
- }
-
- NewAttachmentWizard naw = new NewAttachmentWizard(repository, task, new File(files[0]));
- String error = null;
- if (files.length > 1) {
- error = "Note that only the first file dragged will be attached.";
- }
- openDialog(naw, error);
- }
- }
- }
-
- /**
- * @param naw
- * wizard to attach dialog to.
- * @param message
- * error to display or none if <code>null</code>
- */
- private void openDialog(NewAttachmentWizard naw, String message) {
- editor.setGlobalBusy(true);
- NewAttachmentWizardDialog dialog = new NewAttachmentWizardDialog(control.getShell(), naw, true);
- naw.setDialog(dialog);
- dialog.create();
- if (null != message) {
- dialog.setMessage(message, IMessageProvider.WARNING);
- }
- int result = dialog.open();
- if (result != Window.OK) {
- editor.setGlobalBusy(false);
- }
- }
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTaskOutlineComparer.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTaskOutlineComparer.java
deleted file mode 100644
index 7e0b7d1aa..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTaskOutlineComparer.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import org.eclipse.jface.viewers.IElementComparer;
-
-/**
- * This class is used to compare two <code>IRepositoryTaskSelection</code> objects.
- *
- * @see IElementComparer
- * @see IRepositoryTaskSelection
- */
-@Deprecated
-public class RepositoryTaskOutlineComparer implements IElementComparer {
-
- public boolean equals(Object a, Object b) {
- if ((a instanceof IRepositoryTaskSelection) && (b instanceof IRepositoryTaskSelection)) {
- IRepositoryTaskSelection s1 = (IRepositoryTaskSelection) a;
- IRepositoryTaskSelection s2 = (IRepositoryTaskSelection) b;
-
- // An IRepositoryTaskSelection is uniquely defined by its handle and
- // its contents
- return ((ContentOutlineTools.getHandle(s1).equals(ContentOutlineTools.getHandle(s2))) && ((s1.getContents() == null) ? (s2.getContents() == null)
- : s1.getContents().equals(s2.getContents())));
- }
- return a.equals(b);
- }
-
- public int hashCode(Object element) {
- if (element instanceof IRepositoryTaskSelection) {
- IRepositoryTaskSelection sel = (IRepositoryTaskSelection) element;
-
- // An IRepositoryTaskSelection is uniquely defined by its handle and
- // its contents
- return (ContentOutlineTools.getHandle(sel) + sel.getContents()).hashCode();
- }
- return element.hashCode();
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTaskOutlineNode.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTaskOutlineNode.java
deleted file mode 100644
index e7cc15e0e..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTaskOutlineNode.java
+++ /dev/null
@@ -1,336 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import java.util.ArrayList;
-import java.util.Locale;
-
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.TaskComment;
-
-/**
- * A node for the tree in the <code>RepositoryTaskOutlinePage</code>.
- *
- * @author Mik Kersten (hardening of prototype)
- */
-@Deprecated
-public class RepositoryTaskOutlineNode implements IRepositoryTaskSelection {
-
- public static final String LABEL_DESCRIPTION = "Description";
-
- public static final String LABEL_COMMENTS = "Comments";
-
- public static final String LABEL_NEW_COMMENT = "New Comment";
-
- /** The taskId of the Bugzilla object that the selection was on. */
- protected String id;
-
- /** The server of the Bugzilla object that the selection was on. */
- protected String server;
-
- /** connector kind */
- private final String kind;
-
- /** The label for this piece of data. */
- private String key;
-
- /** The children of this node. */
- private ArrayList<RepositoryTaskOutlineNode> nodeChildren;
-
- /** The parent of this node or null if it is the bug report */
- private RepositoryTaskOutlineNode parent;
-
- private Object data = null;
-
- private final String bugSummary;
-
- private final boolean fromEditor = false;
-
- private boolean isCommentHeader = false;
-
- private boolean isDescription = false;
-
- /**
- * Creates a new <code>RepositoryTaskOutlineNode</code>.
- *
- * @param taskId
- * The taskId of the bug this outline is for.
- * @param server
- * The server of the bug this outline is for.
- * @param key
- * The label for this node.
- * @param image
- * The image that will be displayed by this node in the tree.
- * @param data
- * The data, if necessary, this node represents.
- * @param parent
- * The parent of this node
- */
- public RepositoryTaskOutlineNode(String id, String server, String kind, String key, Object data, String summary) {
- this.id = id;
- this.server = server;
- this.kind = kind;
- this.key = key;
- this.nodeChildren = null;
- this.data = data;
- this.parent = null;
- this.bugSummary = summary;
- }
-
- public boolean isFromEditor() {
- return fromEditor;
- }
-
- /**
- * @return The children of this node, represented as an <code>Object</code> array.
- */
- public RepositoryTaskOutlineNode[] getChildren() {
- return (nodeChildren == null) ? new RepositoryTaskOutlineNode[0]
- : nodeChildren.toArray(new RepositoryTaskOutlineNode[nodeChildren.size()]);
- }
-
- /**
- * Adds a node to this node's list of children.
- *
- * @param bugNode
- * The new child.
- */
- public void addChild(RepositoryTaskOutlineNode bugNode) {
- if (nodeChildren == null) {
- nodeChildren = new ArrayList<RepositoryTaskOutlineNode>();
- }
- bugNode.setParent(this);
- nodeChildren.add(bugNode);
- }
-
- /**
- * @return The label of this node.
- */
- public String getKey() {
- return key;
- }
-
- /**
- * @return <code>true</code> if the given object is another node representing the same piece of data in the editor.
- */
- @Override
- public boolean equals(Object arg0) {
- if (arg0 instanceof RepositoryTaskOutlineNode) {
- RepositoryTaskOutlineNode bugNode = (RepositoryTaskOutlineNode) arg0;
- return getKey().equals(bugNode.getKey());
- }
- return super.equals(arg0);
- }
-
- @Override
- public int hashCode() {
- return getKey().hashCode();
- }
-
- /**
- * @return The name of this node.
- */
- public String getName() {
- return getKey();
- }
-
- /**
- * @return The data (where applicable) this node represents.
- */
- public Object getData() {
- return data;
- }
-
- /**
- * Sets the data that this node represents.
- *
- * @param data
- * The new piece of data.
- */
- public void setData(Object data) {
- this.data = data;
- }
-
- /**
- * Parses the given <code>IBugzillaBug</code> into a tree of <code>RepositoryTaskOutlineNode</code>'s suitable for
- * use in the <code>RepositoryTaskOutlinePage</code> view.
- *
- * @param bug
- * The bug that needs parsing.
- * @return The tree of <code>RepositoryTaskOutlineNode</code>'s.
- */
- public static RepositoryTaskOutlineNode parseBugReport(RepositoryTaskData bug, boolean hasNewComment) {
- // Choose the appropriate parsing function based on
- // the type of IBugzillaBug.
- // if (bug instanceof NewBugzillaReport) {
- // return parseNewBugReport((NewBugzillaReport) bug);
- // } else
- if (bug != null) {
- return parseExistingBugReport(bug, hasNewComment);
- } else {
- return null;
- }
- }
-
- public static RepositoryTaskOutlineNode parseBugReport(RepositoryTaskData bug) {
- return parseBugReport(bug, true);
- }
-
-// /**
-// * Parses the given <code>NewBugModel</code> into a tree of
-// * <code>RepositoryTaskOutlineNode</code>'s suitable for use in the
-// * <code>RepositoryTaskOutlinePage</code> view.
-// *
-// * @param bug
-// * The <code>NewBugModel</code> that needs parsing.
-// * @return The tree of <code>RepositoryTaskOutlineNode</code>'s.
-// */
-// protected static RepositoryTaskOutlineNode parseNewBugReport(NewBugzillaReport bug) {
-// int bugId = bug.getId();
-// String bugServer = bug.getRepositoryUrl();
-// Image bugImage = BugzillaImages.getImage(BugzillaImages.BUG);
-// Image defaultImage = BugzillaImages.getImage(BugzillaImages.BUG_COMMENT);
-// RepositoryTaskOutlineNode topNode = new RepositoryTaskOutlineNode(bugId, bugServer, bug.getLabel(), bugImage, bug, bug
-// .getSummary());
-//
-// topNode.addChild(new RepositoryTaskOutlineNode(bugId, bugServer, "New Description", defaultImage, null, bug
-// .getSummary()));
-//
-// RepositoryTaskOutlineNode titleNode = new RepositoryTaskOutlineNode(bugId, bugServer, "NewBugModel Object", defaultImage,
-// null, bug.getSummary());
-// titleNode.addChild(topNode);
-//
-// return titleNode;
-// }
-
- /**
- * Parses the given <code>BugReport</code> into a tree of <code>RepositoryTaskOutlineNode</code>'s suitable for use
- * in the <code>RepositoryTaskOutlinePage</code> view.
- *
- * @param bug
- * The <code>BugReport</code> that needs parsing.
- * @return The tree of <code>RepositoryTaskOutlineNode</code>'s.
- */
- protected static RepositoryTaskOutlineNode parseExistingBugReport(RepositoryTaskData bug, boolean hasNewComment) {
-
- String bugId = bug.getTaskId();
- String bugServer = bug.getRepositoryUrl();
- RepositoryTaskOutlineNode topNode = new RepositoryTaskOutlineNode(bugId, bugServer, bug.getConnectorKind(),
- bug.getLabel(), bug, bug.getSummary());
-
- RepositoryTaskOutlineNode desc = new RepositoryTaskOutlineNode(bugId, bugServer, bug.getConnectorKind(),
- LABEL_DESCRIPTION, bug.getDescription(), bug.getSummary());
- desc.setIsDescription(true);
-
- topNode.addChild(desc);
-
- RepositoryTaskOutlineNode comments = null;
- for (TaskComment taskComment : bug.getComments()) {
- // first comment is the bug summary
- if (taskComment.getNumber() == 0) {
- continue;
- }
- if (comments == null) {
- comments = new RepositoryTaskOutlineNode(bugId, bugServer, bug.getConnectorKind(), LABEL_COMMENTS,
- taskComment, bug.getSummary());
- comments.setIsCommentHeader(true);
- }
- comments.addChild(new RepositoryTaskOutlineNode(bugId, bugServer, bug.getConnectorKind(),
- taskComment.getCreated(), taskComment, bug.getSummary()));
- }
- if (comments != null) {
- topNode.addChild(comments);
- }
-
- if (hasNewComment) {
- topNode.addChild(new RepositoryTaskOutlineNode(bugId, bugServer, bug.getConnectorKind(), LABEL_NEW_COMMENT,
- null, bug.getSummary()));
- }
-
- RepositoryTaskOutlineNode titleNode = new RepositoryTaskOutlineNode(bugId, bugServer, bug.getConnectorKind(),
- "BugReport Object", null, bug.getSummary());
- titleNode.addChild(topNode);
-
- return titleNode;
- }
-
- public boolean hasComment() {
- // If the comment category was selected, then the comment object is
- // not the intended selection (it is just used to help find the correct
- // location in the editor).
- return (data instanceof TaskComment) && !(key.toLowerCase(Locale.ENGLISH).equals("comments"));
- }
-
- public TaskComment getComment() {
- return (hasComment()) ? (TaskComment) data : null;
- }
-
- public void setComment(TaskComment taskComment) {
- data = taskComment;
- }
-
- public String getContents() {
- return key;
- }
-
- public void setContents(String contents) {
- key = contents;
- }
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public String getRepositoryUrl() {
- return server;
- }
-
- public String getConnectorKind() {
- return kind;
- }
-
- public void setServer(String server) {
- this.server = server;
- }
-
- public boolean isEmpty() {
- return (server == null) || ((getContents() == null) && (getComment() == null));
- }
-
- public RepositoryTaskOutlineNode getParent() {
- return parent;
- }
-
- public void setParent(RepositoryTaskOutlineNode parent) {
- this.parent = parent;
- }
-
- public boolean isCommentHeader() {
- return isCommentHeader;
- }
-
- public boolean isDescription() {
- return isDescription;
- }
-
- public void setIsCommentHeader(boolean isCommentHeader) {
- this.isCommentHeader = isCommentHeader;
- }
-
- public void setIsDescription(boolean isDescription) {
- this.isDescription = isDescription;
- }
-
- public String getBugSummary() {
- return bugSummary;
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTaskOutlinePage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTaskOutlinePage.java
deleted file mode 100644
index 2d7ade88d..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTaskOutlinePage.java
+++ /dev/null
@@ -1,204 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.TaskComment;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.ISelectionListener;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.views.contentoutline.ContentOutlinePage;
-
-/**
- * An outline page for a <code>BugEditor</code>.
- */
-@Deprecated
-public class RepositoryTaskOutlinePage extends ContentOutlinePage {
-
- private final RepositoryTaskOutlineNode topTreeNode;
-
- private final TaskRepository repository;
-
- protected final ISelectionListener selectionListener = new ISelectionListener() {
- public void selectionChanged(IWorkbenchPart part, ISelection selection) {
- if (selection instanceof IStructuredSelection) {
- if (((IStructuredSelection) selection).getFirstElement() instanceof IRepositoryTaskSelection) {
- if (((IStructuredSelection) getSelection()).getFirstElement() instanceof IRepositoryTaskSelection) {
- IRepositoryTaskSelection brs1 = (IRepositoryTaskSelection) ((IStructuredSelection) getSelection()).getFirstElement();
- IRepositoryTaskSelection brs2 = ((IRepositoryTaskSelection) ((IStructuredSelection) selection).getFirstElement());
- if (ContentOutlineTools.getHandle(brs1).compareTo(ContentOutlineTools.getHandle(brs2)) == 0) {
- // don't need to make a selection for the same
- // element
- return;
- }
- }
- getTreeViewer().setSelection(selection, true);
- }
- }
- }
- };
-
- private TreeViewer viewer;
-
- /**
- * Creates a new <code>RepositoryTaskOutlinePage</code>.
- *
- * @param topTreeNode
- * The top data node of the tree for this view.
- * @param editor
- * The editor this outline page is for.
- */
- public RepositoryTaskOutlinePage(RepositoryTaskOutlineNode topTreeNode) {
- super();
- this.topTreeNode = topTreeNode;
- repository = TasksUi.getRepositoryManager().getRepository(topTreeNode.getConnectorKind(),
- topTreeNode.getRepositoryUrl());
- }
-
- @Override
- public void createControl(Composite parent) {
- super.createControl(parent);
- viewer = getTreeViewer();
- viewer.setContentProvider(new BugTaskOutlineContentProvider());
- viewer.setLabelProvider(new LabelProvider() {
- @Override
- public Image getImage(Object element) {
- if (element instanceof RepositoryTaskOutlineNode) {
- RepositoryTaskOutlineNode node = (RepositoryTaskOutlineNode) element;
-
- if (RepositoryTaskOutlineNode.LABEL_COMMENTS.equals(node.getContents())
- || RepositoryTaskOutlineNode.LABEL_NEW_COMMENT.equals(node.getContents())) {
- return CommonImages.getImage(TasksUiImages.COMMENT);
- }
- if (RepositoryTaskOutlineNode.LABEL_DESCRIPTION.equals(node.getContents())) {
- return CommonImages.getImage(TasksUiImages.TASK_NOTES);
- } else if (node.getComment() != null) {
- if (repository != null && node.getComment().getAuthor().equals(repository.getUserName())) {
- return CommonImages.getImage(CommonImages.PERSON_ME);
- } else {
- return CommonImages.getImage(CommonImages.PERSON);
- }
- } else {
- return CommonImages.getImage(TasksUiImages.TASK);
- }
- } else {
- return super.getImage(element);
- }
- }
-
- @Override
- public String getText(Object element) {
- if (element instanceof RepositoryTaskOutlineNode) {
- RepositoryTaskOutlineNode node = (RepositoryTaskOutlineNode) element;
- TaskComment comment = node.getComment();
- if (comment == null) {
- return node.getName();
- }
- int n = comment.getNumber();
-// if (n == 0) {
-// return comment.getAuthorName() + " (" + node.getName() + ")";
-// }
-
- String name = comment.getAuthorName();
- if (name != null) {
- String id = comment.getAuthor();
- if (id != null) {
- name += " <" + id + ">";
- }
- } else {
- name = comment.getAuthor();
- }
-
- return n + ": " + name + " (" + node.getName() + ")";
- }
- return super.getText(element);
- }
- });
- try {
- viewer.setInput(topTreeNode);
- viewer.setComparer(new RepositoryTaskOutlineComparer());
- viewer.expandAll();
- } catch (Exception e) {
- StatusHandler.fail(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Could not create bugzilla outline",
- e));
- }
- getSite().getPage().addSelectionListener(selectionListener);
- }
-
- @Override
- public void dispose() {
- super.dispose();
- getSite().getPage().removeSelectionListener(selectionListener);
- }
-
- public TreeViewer getOutlineTreeViewer() {
- return viewer;
- }
-
- /**
- * A content provider for the tree for this view.
- *
- * @see ITreeContentProvider
- */
- protected static class BugTaskOutlineContentProvider implements ITreeContentProvider {
-
- public Object[] getChildren(Object parentElement) {
- if (parentElement instanceof RepositoryTaskOutlineNode) {
- Object[] children = ((RepositoryTaskOutlineNode) parentElement).getChildren();
- if (children.length > 0) {
- return children;
- }
- }
- return new Object[0];
- }
-
- public Object getParent(Object element) {
- return null;
- }
-
- public boolean hasChildren(Object element) {
- if (element instanceof RepositoryTaskOutlineNode) {
- return ((RepositoryTaskOutlineNode) element).getChildren().length > 0;
- }
- return false;
- }
-
- public Object[] getElements(Object inputElement) {
- if (inputElement instanceof RepositoryTaskOutlineNode) {
- Object[] children = ((RepositoryTaskOutlineNode) inputElement).getChildren();
- if (children.length > 0) {
- return children;
- }
- }
- return new Object[0];
- }
-
- public void dispose() {
- // don't care when we are disposed
- }
-
- public void inputChanged(Viewer viewerChanged, Object oldInput, Object newInput) {
- // don't care when the input changes
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTaskSelection.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTaskSelection.java
deleted file mode 100644
index ab2dcd2c2..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTaskSelection.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import org.eclipse.mylyn.internal.tasks.core.deprecated.TaskComment;
-
-/**
- * A selection of an element in a view.
- */
-// API 3.0 deprecate
-public class RepositoryTaskSelection implements IRepositoryTaskSelection {
-
- protected String id;
-
- protected String repositoryUrl;
-
- /** The contents of the selection. */
- protected String contents;
-
- protected String taskSummary;
-
- protected String repositoryKind;
-
- /**
- * The comment, if a comment was selected. If the selection was not a comment, then this is <code>null</code>.
- */
- protected TaskComment taskComment;
-
- /**
- * Creates a new <code>RepositoryTaskSelection</code> with no supplied comment.
- *
- * @param taskId
- * The taskId of the Bugzilla object that the selection was on.
- * @param server
- * The server of the Bugzilla object that the selection was on.
- * @param contents
- * The contents of the selection.
- */
- public RepositoryTaskSelection(String id, String server, String kind, String contents, boolean isDescription,
- String summary) {
- this(id, server, kind, contents, null, summary);
- this.isDescription = isDescription;
- }
-
- /**
- * Creates a new <code>RepositoryTaskSelection</code>.
- *
- * @param taskId
- * The taskId of the Bugzilla object that the selection was on.
- * @param server
- * The server of the Bugzilla object that the selection was on.
- * @param contents
- * The contents of the selection.
- * @param taskComment
- * The <code>Comment</code> object for this selection. If a comment was not selected, then this should
- * be <code>null</code>.
- */
- public RepositoryTaskSelection(String id, String server, String kind, String contents, TaskComment taskComment,
- String summary) {
- this.id = id;
- this.repositoryUrl = server;
- this.repositoryKind = kind;
- this.contents = contents;
- this.taskComment = taskComment;
- this.taskSummary = summary;
- }
-
- // /**
- // * Creates a new <code>RepositoryTaskSelection</code> with no supplied
- // * contents.
- // *
- // * @param taskId
- // * The taskId of the Bugzilla object that the selection was on.
- // * @param server
- // * The server of the Bugzilla object that the selection was on.
- // * @param taskComment
- // * The <code>Comment</code> object for this selection. If a
- // * comment was not selected, then this should be
- // * <code>null</code>.
- // */
- // public RepositoryTaskSelection(String id, String server, TaskComment
- // taskComment, String summary) {
- // this(id, server, null, taskComment, summary);
- // }
-
- public boolean hasComment() {
- return taskComment != null;
- }
-
- public TaskComment getComment() {
- return taskComment;
- }
-
- public void setComment(TaskComment taskComment) {
- this.taskComment = taskComment;
- }
-
- public String getContents() {
- return contents;
- }
-
- public void setContents(String contents) {
- this.contents = contents;
- }
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public String getRepositoryUrl() {
- return repositoryUrl;
- }
-
- public String getRepositoryKind() {
- return repositoryKind;
- }
-
- public void setServer(String server) {
- this.repositoryUrl = server;
- }
-
- public boolean isEmpty() {
- return (repositoryUrl == null) || ((contents == null) && (taskComment == null));
- }
-
- private boolean isCommentHeader = false;
-
- private boolean isDescription = false;
-
- public boolean isCommentHeader() {
- return isCommentHeader;
- }
-
- public boolean isDescription() {
- return isDescription;
- }
-
- public void setIsCommentHeader(boolean isCommentHeader) {
- this.isCommentHeader = isCommentHeader;
- }
-
- public void setIsDescription(boolean isDescription) {
- this.isDescription = isDescription;
- }
-
- public String getBugSummary() {
- return taskSummary;
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTextViewer.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTextViewer.java
deleted file mode 100644
index 473148e1a..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTextViewer.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.source.IOverviewRuler;
-import org.eclipse.jface.text.source.IVerticalRuler;
-import org.eclipse.jface.text.source.SourceViewer;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Menu;
-
-/**
- * @author Rob Elves
- */
-public class RepositoryTextViewer extends SourceViewer {
-
- @Deprecated
- private final MenuManager menuManager;
-
- private TaskRepository repository;
-
- public RepositoryTextViewer(IVerticalRuler vertRuler, IOverviewRuler overRuler, TaskRepository repository,
- Composite composite, int style) {
- super(composite, vertRuler, overRuler, true, style);
- this.menuManager = new MenuManager();
- this.repository = repository;
-
- }
-
- public RepositoryTextViewer(TaskRepository repository, Composite composite, int style) {// FormEditor
- super(composite, null, style);
- this.menuManager = new MenuManager();
- this.repository = repository;
- }
-
- @Override
- public void setDocument(IDocument doc) {
- if (doc != null && this.getAnnotationModel() != null) {
- this.getAnnotationModel().connect(doc);
- super.setDocument(doc, this.getAnnotationModel());
- } else {
- super.setDocument(doc);
- }
- }
-
- public TaskRepository getRepository() {
- return repository;
- }
-
- public void setRepository(TaskRepository repository) {
- this.repository = repository;
- }
-
- @Override
- protected void handleDispose() {
- menuManager.dispose();
- super.handleDispose();
- }
-
- @Deprecated
- public MenuManager getMenuManager() {
- return menuManager;
- }
-
- @Deprecated
- public void setMenu(Menu menu) {
- if (getTextWidget() != null && !getTextWidget().isDisposed()) {
- getTextWidget().setMenu(menu);
- }
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTextViewerConfiguration.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTextViewerConfiguration.java
deleted file mode 100644
index 40bba0c8a..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTextViewerConfiguration.java
+++ /dev/null
@@ -1,289 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.preference.JFacePreferences;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.TextAttribute;
-import org.eclipse.jface.text.TextPresentation;
-import org.eclipse.jface.text.contentassist.ContentAssistant;
-import org.eclipse.jface.text.contentassist.IContentAssistant;
-import org.eclipse.jface.text.hyperlink.DefaultHyperlinkPresenter;
-import org.eclipse.jface.text.hyperlink.IHyperlink;
-import org.eclipse.jface.text.hyperlink.IHyperlinkDetector;
-import org.eclipse.jface.text.hyperlink.IHyperlinkPresenter;
-import org.eclipse.jface.text.presentation.IPresentationReconciler;
-import org.eclipse.jface.text.presentation.PresentationReconciler;
-import org.eclipse.jface.text.reconciler.IReconciler;
-import org.eclipse.jface.text.rules.DefaultDamagerRepairer;
-import org.eclipse.jface.text.rules.IRule;
-import org.eclipse.jface.text.rules.IToken;
-import org.eclipse.jface.text.rules.MultiLineRule;
-import org.eclipse.jface.text.rules.RuleBasedScanner;
-import org.eclipse.jface.text.rules.SingleLineRule;
-import org.eclipse.jface.text.rules.Token;
-import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonColors;
-import org.eclipse.mylyn.internal.tasks.core.TaskList;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TaskHyperlink;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.StyleRange;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.editors.text.EditorsUI;
-import org.eclipse.ui.editors.text.TextSourceViewerConfiguration;
-
-/**
- * @author Rob Elves
- * @author Frank Becker
- * @author Steffen Pingel
- * @since 3.0
- */
-public class RepositoryTextViewerConfiguration extends TextSourceViewerConfiguration {
-
- public enum Mode {
- URL, TASK_RELATION, DEFAULT
- }
-
- private static final String ID_CONTEXT_EDITOR_TASK = "org.eclipse.mylyn.tasks.ui.TaskEditor";
-
- private static final String ID_CONTEXT_EDITOR_TEXT = "org.eclipse.ui.DefaultTextEditor";
-
- private RepositoryTextScanner scanner;
-
- private final boolean spellCheck;
-
- private final TaskRepository taskRepository;
-
- private Mode mode;
-
- public RepositoryTextViewerConfiguration(TaskRepository taskRepository, boolean spellCheck) {
- super(EditorsUI.getPreferenceStore());
- this.taskRepository = taskRepository;
- this.spellCheck = spellCheck;
- this.mode = Mode.DEFAULT;
- }
-
- public Mode getMode() {
- return mode;
- }
-
- public void setMode(Mode mode) {
- Assert.isNotNull(mode);
- this.mode = mode;
- }
-
- @Override
- public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
- if (getMode() == Mode.DEFAULT) {
- PresentationReconciler reconciler = new PresentationReconciler();
- reconciler.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
- DefaultDamagerRepairer dr = new DefaultDamagerRepairer(getDefaultScanner());
- reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
- reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
- return reconciler;
- }
- return super.getPresentationReconciler(sourceViewer);
- }
-
- private RepositoryTextScanner getDefaultScanner() {
- if (scanner == null) {
- scanner = new RepositoryTextScanner(getMode());
- }
- return scanner;
- }
-
- @Override
- public IHyperlinkDetector[] getHyperlinkDetectors(ISourceViewer sourceViewer) {
- if (mode == Mode.URL) {
- return new IHyperlinkDetector[] { new TaskUrlHyperlinkDetector() };
- } else if (mode == Mode.TASK_RELATION) {
- return new IHyperlinkDetector[] { new TaskRelationHyperlinkDetector() };
- }
- return super.getHyperlinkDetectors(sourceViewer);
- }
-
- @Override
- @SuppressWarnings("unchecked")
- protected Map getHyperlinkDetectorTargets(final ISourceViewer sourceViewer) {
- IAdaptable context = new IAdaptable() {
- public Object getAdapter(Class adapter) {
- if (adapter == TaskRepository.class) {
- return getTaskRepository();
- }
- return null;
- }
- };
-
- Map targets = new HashMap();
- targets.put(ID_CONTEXT_EDITOR_TEXT, context);
- targets.put(ID_CONTEXT_EDITOR_TASK, context);
- return targets;
- }
-
- public TaskRepository getTaskRepository() {
- return taskRepository;
- }
-
- @Override
- public IHyperlinkPresenter getHyperlinkPresenter(final ISourceViewer sourceViewer) {
- return new TaskTextViewerHyperlinkPresenter(JFaceResources.getColorRegistry().get(
- JFacePreferences.ACTIVE_HYPERLINK_COLOR), sourceViewer);
- }
-
- @Override
- public int getHyperlinkStateMask(ISourceViewer sourceViewer) {
- return SWT.NONE;
- }
-
- @Override
- public IReconciler getReconciler(ISourceViewer sourceViewer) {
- if (spellCheck) {
- return super.getReconciler(sourceViewer);
- } else {
- return null;
- }
- }
-
- private final class TaskTextViewerHyperlinkPresenter extends DefaultHyperlinkPresenter {
- private final ISourceViewer sourceViewer;
-
- private IRegion activeRegion;
-
- /**
- * Stores which task a tooltip is being displayed for. It is used to avoid having the same tooltip being set
- * multiple times while you move the mouse over a task hyperlink (bug#209409)
- */
- private ITask currentTaskHyperlink;
-
- private TaskTextViewerHyperlinkPresenter(Color color, ISourceViewer sourceViewer) {
- super(color);
- this.sourceViewer = sourceViewer;
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public void applyTextPresentation(TextPresentation textPresentation) {
- super.applyTextPresentation(textPresentation);
- if (activeRegion != null && currentTaskHyperlink != null && currentTaskHyperlink.isCompleted()) {
- Iterator<StyleRange> styleRangeIterator = textPresentation.getAllStyleRangeIterator();
- while (styleRangeIterator.hasNext()) {
- StyleRange styleRange = styleRangeIterator.next();
- if (activeRegion.getOffset() == styleRange.start && activeRegion.getLength() == styleRange.length) {
- styleRange.strikeout = true;
- break;
- }
- }
- }
- }
-
- @Override
- public void showHyperlinks(IHyperlink[] hyperlinks) {
- activeRegion = null;
- if (hyperlinks != null && hyperlinks.length > 0 && hyperlinks[0] instanceof TaskHyperlink) {
- TaskHyperlink hyperlink = (TaskHyperlink) hyperlinks[0];
-
- TaskList taskList = TasksUiPlugin.getTaskList();
- String repositoryUrl = hyperlink.getRepository().getRepositoryUrl();
-
- ITask task = taskList.getTask(repositoryUrl, hyperlink.getTaskId());
- if (task == null) {
- task = taskList.getTaskByKey(repositoryUrl, hyperlink.getTaskId());
- }
-
- if (task != null && task != currentTaskHyperlink) {
- currentTaskHyperlink = task;
- activeRegion = hyperlink.getHyperlinkRegion();
- Control cursorControl = sourceViewer.getTextWidget().getDisplay().getCursorControl();
- if (cursorControl != null) {
- if (task.getTaskKey() == null) {
- cursorControl.setToolTipText(task.getSummary());
- } else {
- cursorControl.setToolTipText(task.getTaskKey() + ": " + task.getSummary());
- }
- }
- }
- }
- super.showHyperlinks(hyperlinks);
- }
-
- @Override
- public void hideHyperlinks() {
- Control cursorControl = sourceViewer.getTextWidget().getDisplay().getCursorControl();
- if (cursorControl != null) {
- cursorControl.setToolTipText(null);
- }
- currentTaskHyperlink = null;
-
- super.hideHyperlinks();
- }
-
- @Override
- public void uninstall() {
- // ignore
- super.uninstall();
- }
- }
-
- private static class RepositoryTextScanner extends RuleBasedScanner {
-
- public RepositoryTextScanner(Mode mode) {
- IToken bugToken = new Token(new TextAttribute(JFaceResources.getColorRegistry().get(
- JFacePreferences.ACTIVE_HYPERLINK_COLOR)));
- IToken quoteToken = new Token(new TextAttribute(CommonColors.TEXT_QUOTED));
- IRule[] rules = new IRule[16];
- rules[0] = (new SingleLineRule("http://", " ", bugToken));
- rules[1] = (new SingleLineRule("https://", " ", bugToken));
- rules[2] = (new SingleLineRule("bug#", " ", bugToken));
- rules[3] = (new SingleLineRule("bug#", "", bugToken));
- rules[4] = (new SingleLineRule("bug #", "", bugToken));
- rules[5] = (new SingleLineRule("http://", "\n", bugToken));
- rules[6] = (new SingleLineRule("https://", "\n", bugToken));
- rules[7] = (new SingleLineRule("task#", " ", bugToken));
- rules[8] = (new MultiLineRule("task#", "\n", bugToken));
- rules[9] = (new MultiLineRule("task# ", " ", bugToken));
- rules[10] = (new SingleLineRule("task #", "\n", bugToken));
- rules[11] = (new SingleLineRule("*** This bug has been ", "***", bugToken));
- rules[12] = (new SingleLineRule("http://", "", bugToken));
- rules[13] = (new SingleLineRule("https://", "", bugToken));
- rules[14] = (new MultiLineRule("task #", " ", bugToken));
- SingleLineRule quoteRule = new SingleLineRule(">", null, quoteToken, (char) 0, true);
- quoteRule.setColumnConstraint(0);
- rules[15] = quoteRule;
- setRules(rules);
- }
-
- }
-
- @Override
- public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
- if (mode == Mode.URL) {
- return null;
- }
- ContentAssistant assistant = new ContentAssistant();
- RepositoryCompletionProcessor processor = new RepositoryCompletionProcessor(taskRepository);
- if (mode == Mode.TASK_RELATION) {
- processor.setNeverIncludePrefix(true);
- }
- assistant.setContentAssistProcessor(processor, IDocument.DEFAULT_CONTENT_TYPE);
- return assistant;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RichTextAttributeEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RichTextAttributeEditor.java
deleted file mode 100644
index ccb370429..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RichTextAttributeEditor.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.jface.text.Document;
-import org.eclipse.jface.text.ITextListener;
-import org.eclipse.jface.text.TextEvent;
-import org.eclipse.jface.text.source.AnnotationModel;
-import org.eclipse.jface.text.source.IAnnotationAccess;
-import org.eclipse.jface.text.source.SourceViewer;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonThemes;
-import org.eclipse.mylyn.internal.tasks.ui.editors.RepositoryTextViewerConfiguration.Mode;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.mylyn.tasks.core.data.TaskDataModel;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractAttributeEditor;
-import org.eclipse.mylyn.tasks.ui.editors.LayoutHint;
-import org.eclipse.mylyn.tasks.ui.editors.LayoutHint.ColumnSpan;
-import org.eclipse.mylyn.tasks.ui.editors.LayoutHint.RowSpan;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.editors.text.EditorsUI;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-import org.eclipse.ui.texteditor.AnnotationPreference;
-import org.eclipse.ui.texteditor.DefaultMarkerAnnotationAccess;
-import org.eclipse.ui.texteditor.MarkerAnnotationPreferences;
-import org.eclipse.ui.texteditor.SourceViewerDecorationSupport;
-import org.eclipse.ui.themes.IThemeManager;
-
-/**
- * FIXME comment is out dated
- *
- * Text viewer generally used for displaying non-editable text. No annotation model or spell checking support. Supports
- * cut/copy/paste/etc..
- *
- * For viewing and editing text. Spell checking w/ annotations supported One or two max per editor, any more and the
- * spell checker will bring the editor to a grinding halt.
- *
- * @author Raphael Ackermann (bug 195514)
- * @author Steffen Pingel
- */
-public class RichTextAttributeEditor extends AbstractAttributeEditor {
-
- private RepositoryTextViewer viewer;
-
- private boolean spellCheckingEnabled;
-
- private final int style;
-
- private final TaskRepository taskRepository;
-
- private Mode mode;
-
- public RichTextAttributeEditor(TaskDataModel manager, TaskRepository taskRepository, TaskAttribute taskAttribute) {
- this(manager, taskRepository, taskAttribute, SWT.MULTI);
- }
-
- public RichTextAttributeEditor(TaskDataModel manager, TaskRepository taskRepository, TaskAttribute taskAttribute,
- int style) {
- super(manager, taskAttribute);
- this.taskRepository = taskRepository;
- this.style = style;
- if ((style & SWT.MULTI) != 0) {
- setLayoutHint(new LayoutHint(RowSpan.MULTIPLE, ColumnSpan.MULTIPLE));
- } else {
- setLayoutHint(new LayoutHint(RowSpan.SINGLE, ColumnSpan.MULTIPLE));
- }
- setMode(Mode.DEFAULT);
- }
-
- public Mode getMode() {
- return mode;
- }
-
- public void setMode(Mode mode) {
- Assert.isNotNull(mode);
- this.mode = mode;
- }
-
- private void configureAsTextEditor(Document document) {
- AnnotationModel annotationModel = new AnnotationModel();
- viewer.showAnnotations(false);
- viewer.showAnnotationsOverview(false);
- IAnnotationAccess annotationAccess = new DefaultMarkerAnnotationAccess();
- final SourceViewerDecorationSupport support = new SourceViewerDecorationSupport(viewer, null, annotationAccess,
- EditorsUI.getSharedTextColors());
- @SuppressWarnings("unchecked")
- Iterator e = new MarkerAnnotationPreferences().getAnnotationPreferences().iterator();
- while (e.hasNext()) {
- support.setAnnotationPreference((AnnotationPreference) e.next());
- }
- support.install(EditorsUI.getPreferenceStore());
- viewer.getTextWidget().addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- support.uninstall();
- }
- });
- viewer.getTextWidget().setIndent(2);
-
- // !Do Not Delete! hover manager that shows text when we hover
- // AnnotationBarHoverManager fAnnotationHoverManager = new AnnotationBarHoverManager(fCompositeRuler,
- // commentViewer, new AnnotationHover(fAnnotationModel), new AnnotationConfiguration());
- // fAnnotationHoverManager.install(annotationRuler.getControl());
-
- // !Do Not Delete! Sample debugging code
- // document.set("Here's some texst so that we have somewhere to show an error");
- //
- // // // add an annotation
- // ErrorAnnotation errorAnnotation = new ErrorAnnotation(1, "");
- // // lets underline the word "texst"
- // fAnnotationModel.addAnnotation(errorAnnotation, new Position(12, 5));
-
- // CoreSpellingProblem iProblem = new CoreSpellingProblem(12, 5, 1,
- // "problem message", "theword", false, false, document, "task editor");
- // editorInput.getName()
- //
- // fAnnotationModel.addAnnotation(new ProblemAnnotation(iProblem, null), new Position(12, 5));
-
- viewer.setDocument(document, annotationModel);
- }
-
- @Override
- public void createControl(Composite parent, FormToolkit toolkit) {
- int style = this.style;
- if (!isReadOnly()) {
- style |= SWT.V_SCROLL;
- }
- viewer = new RepositoryTextViewer(taskRepository, parent, SWT.FLAT | SWT.WRAP | style);
-
- // NOTE: configuration must be applied before the document is set in order for
- // hyper link coloring to work, the Presenter requires the document object up front
- RepositoryTextViewerConfiguration viewerConfig = new RepositoryTextViewerConfiguration(taskRepository,
- spellCheckingEnabled);
- viewerConfig.setMode(getMode());
- viewer.configure(viewerConfig);
-
- Document document = new Document(getValue());
- if (isReadOnly()) {
- viewer.setEditable(false);
- viewer.setDocument(document);
- } else {
- viewer.setEditable(true);
- configureAsTextEditor(document);
- viewer.addTextListener(new ITextListener() {
- public void textChanged(TextEvent event) {
- // filter out events caused by text presentation changes, e.g. annotation drawing
- String value = viewer.getTextWidget().getText();
- if (!getValue().equals(value)) {
- setValue(value);
- }
- }
- });
- viewer.getControl().setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
- }
-
- IThemeManager themeManager = PlatformUI.getWorkbench().getThemeManager();
- Font font = themeManager.getCurrentTheme().getFontRegistry().get(CommonThemes.FONT_EDITOR_COMMENT);
- viewer.getTextWidget().setFont(font);
- toolkit.adapt(viewer.getTextWidget(), true, false);
-
- setControl(viewer.getTextWidget());
- }
-
- public String getValue() {
- return getAttributeMapper().getValue(getTaskAttribute());
- }
-
- public SourceViewer getViewer() {
- return viewer;
- }
-
- public boolean isSpellCheckingEnabled() {
- return spellCheckingEnabled;
- }
-
- public void setSpellCheckingEnabled(boolean spellCheckingEnabled) {
- this.spellCheckingEnabled = spellCheckingEnabled;
- }
-
- public void setValue(String value) {
- getAttributeMapper().setValue(getTaskAttribute(), value);
- attributeChanged();
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/SingleSelectionAttributeEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/SingleSelectionAttributeEditor.java
deleted file mode 100644
index c9f385692..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/SingleSelectionAttributeEditor.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import java.util.Map;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.mylyn.tasks.core.data.TaskDataModel;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractAttributeEditor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CCombo;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-
-/**
- * @author Steffen Pingel
- */
-public class SingleSelectionAttributeEditor extends AbstractAttributeEditor {
-
- private String[] values;
-
- private CCombo combo;
-
- public SingleSelectionAttributeEditor(TaskDataModel manager, TaskAttribute taskAttribute) {
- super(manager, taskAttribute);
- }
-
- @Override
- public void createControl(Composite parent, FormToolkit toolkit) {
- if (isReadOnly()) {
- Text text = new Text(parent, SWT.FLAT | SWT.READ_ONLY);
- text.setFont(TEXT_FONT);
- toolkit.adapt(text, true, false);
- text.setData(FormToolkit.KEY_DRAW_BORDER, Boolean.FALSE);
- text.setText(getValueLabel());
- setControl(text);
- } else {
- combo = new CCombo(parent, SWT.FLAT | SWT.READ_ONLY);
- toolkit.adapt(combo, true, false);
- combo.setFont(TEXT_FONT);
- combo.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
-
- Map<String, String> labelByValue = getAttributeMapper().getOptions(getTaskAttribute());
- if (labelByValue != null) {
- values = labelByValue.keySet().toArray(new String[0]);
- for (String value : values) {
- combo.add(labelByValue.get(value));
- }
- }
-
- select(getValue(), getValueLabel());
-
- if (values != null) {
- combo.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent event) {
- int index = combo.getSelectionIndex();
- if (index > -1) {
- Assert.isNotNull(values);
- Assert.isLegal(index >= 0 && index <= values.length - 1);
- setValue(values[index]);
- }
- }
- });
- }
-
- setControl(combo);
- }
- }
-
- public String getValue() {
- return getAttributeMapper().getValue(getTaskAttribute());
- }
-
- public String getValueLabel() {
- return getAttributeMapper().getValueLabel(getTaskAttribute());
- }
-
- private void select(String value, String label) {
- if (values != null) {
- for (int i = 0; i < values.length; i++) {
- if (values[i].equals(value)) {
- combo.select(i);
- break;
- }
- }
- } else {
- combo.setText(label);
- }
- }
-
- public void setValue(String value) {
- getAttributeMapper().setValue(getTaskAttribute(), value);
- attributeChanged();
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/SpellingDialog.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/SpellingDialog.java
deleted file mode 100644
index e2e3022d9..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/SpellingDialog.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.List;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * TODO this is used only for spell checking which is not yet implemented, therefore this is not properly tested
- *
- * @author Shawn Minto
- */
-public class SpellingDialog extends Dialog {
-
- private final String title;
-
- private Text wordToFix;
-
- private List suggestions;
-
- private final IDocument document;
-
- private ICompletionProposal[] proposals;
-
- protected SpellingDialog(Shell parentShell, String title, IDocument document) {
- super(parentShell);
- this.title = title;
- this.document = document;
- }
-
- @Override
- protected Control createDialogArea(Composite parent) {
- Control c = super.createDialogArea(parent);
-
- Composite spellingComposite = new Composite(parent, SWT.NONE);
-
- GridLayout spellingLayout = new GridLayout();
- spellingLayout.numColumns = 1;
- spellingComposite.setLayout(spellingLayout);
-
- wordToFix = new Text(spellingComposite, SWT.BORDER | SWT.READ_ONLY);
- GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- gd.widthHint = 150;
- wordToFix.setLayoutData(gd);
-
- suggestions = new List(spellingComposite, SWT.BORDER);
- gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- gd.widthHint = 150;
- gd.heightHint = 120;
- suggestions.setLayoutData(gd);
-
- return c;
- }
-
- @Override
- protected void configureShell(Shell newShell) {
- super.configureShell(newShell);
- newShell.setText(title);
- }
-
- public void open(String word, ICompletionProposal[] proposals) {
- create();
-
- this.proposals = proposals;
-
- wordToFix.setText(word);
- suggestions.removeAll();
-
- for (int i = 0; i < proposals.length; i++) {
- suggestions.setItem(i, proposals[i].getDisplayString());
- }
-
- super.open();
- }
-
- @Override
- protected void handleShellCloseEvent() {
- if (getReturnCode() == Window.OK) {
- int i = suggestions.getSelectionIndex();
- if (i > 0 && i < proposals.length) {
- proposals[i].apply(document);
- }
- }
- super.handleShellCloseEvent();
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskAttachmentEditorInput.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskAttachmentEditorInput.java
deleted file mode 100644
index e460cde48..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskAttachmentEditorInput.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import java.io.InputStream;
-
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITaskAttachment;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.data.AbstractTaskAttachmentHandler;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.ui.IPersistableElement;
-import org.eclipse.ui.IStorageEditorInput;
-
-/**
- * @author Jeff Pound
- * @author Steffen Pingel
- */
-public class TaskAttachmentEditorInput extends PlatformObject implements IStorageEditorInput {
-
- private static final String ATTACHMENT_DEFAULT_NAME = "attachment";
-
- private static final String CTYPE_ZIP = "zip";
-
- private static final String CTYPE_OCTET_STREAM = "octet-stream";
-
- private static final String CTYPE_TEXT = "text";
-
- private static final String CTYPE_HTML = "html";
-
- private final ITaskAttachment attachment;
-
- private final String name;
-
- public TaskAttachmentEditorInput(ITaskAttachment attachment) {
- this.attachment = attachment;
- this.name = getName(attachment);
- }
-
- private String getName(ITaskAttachment attachment) {
- String name = attachment.getFileName();
- // if no filename is set, make one up with the proper extension so
- // we can support opening in that filetype's default editor
- if (name == null || "".equals(name)) {
- String ctype = attachment.getContentType();
- if (ctype.endsWith(CTYPE_HTML)) {
- name = ATTACHMENT_DEFAULT_NAME + ".html";
- } else if (ctype.startsWith(CTYPE_TEXT)) {
- name = ATTACHMENT_DEFAULT_NAME + ".txt";
- } else if (ctype.endsWith(CTYPE_OCTET_STREAM)) {
- name = ATTACHMENT_DEFAULT_NAME;
- } else if (ctype.endsWith(CTYPE_ZIP)) {
- name = ATTACHMENT_DEFAULT_NAME + "." + CTYPE_ZIP;
- } else {
- name = ATTACHMENT_DEFAULT_NAME + "." + ctype.substring(ctype.indexOf("/") + 1);
- }
- }
- // treat .patch files as text files
- if (name.endsWith(".patch")) {
- name += ".txt";
- }
- return name;
- }
-
- public IStorage getStorage() throws CoreException {
- TaskAttribute taskAttribute = attachment.getTaskAttribute();
- if (taskAttribute == null) {
- throw new CoreException(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Failed to find attachment: "
- + attachment.getUrl()));
- }
- return new TaskAttachmentStorage(attachment.getTaskRepository(), attachment.getTask(), taskAttribute, name);
- }
-
- public boolean exists() {
- return true;
- }
-
- public ImageDescriptor getImageDescriptor() {
- // ignore
- return null;
- }
-
- public String getName() {
- return attachment.getFileName();
- }
-
- public IPersistableElement getPersistable() {
- return null;
- }
-
- public String getToolTipText() {
- return attachment.getUrl();
- }
-
- private static class TaskAttachmentStorage extends PlatformObject implements IStorage {
-
- private final TaskRepository taskRepository;
-
- private final ITask task;
-
- private final TaskAttribute attachmentAttribute;
-
- private final String name;
-
- public TaskAttachmentStorage(TaskRepository taskRepository, ITask task,
- TaskAttribute attachmentAttribute, String name) {
- this.taskRepository = taskRepository;
- this.task = task;
- this.attachmentAttribute = attachmentAttribute;
- this.name = name;
- }
-
- public InputStream getContents() throws CoreException {
- AbstractRepositoryConnector connector = TasksUi.getRepositoryManager().getRepositoryConnector(
- taskRepository.getConnectorKind());
- AbstractTaskAttachmentHandler handler = connector.getTaskAttachmentHandler();
- return handler.getContent(taskRepository, task, attachmentAttribute, new NullProgressMonitor());
- }
-
- public IPath getFullPath() {
- // ignore
- return null;
- }
-
- public String getName() {
- return name;
- }
-
- public boolean isReadOnly() {
- return true;
- }
-
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorActionContributor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorActionContributor.java
deleted file mode 100644
index 1ff506f08..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorActionContributor.java
+++ /dev/null
@@ -1,418 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.GroupMarker;
-import org.eclipse.jface.action.ICoolBarManager;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IStatusLineManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTaskCategory;
-import org.eclipse.mylyn.internal.tasks.core.UnmatchedTaskContainer;
-import org.eclipse.mylyn.internal.tasks.ui.AddExistingTaskJob;
-import org.eclipse.mylyn.internal.tasks.ui.IDynamicSubMenuContributor;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.actions.AbstractTaskEditorAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.AttachAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.AttachScreenshotAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.CopyTaskDetailsAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.NewTaskFromSelectionAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.OpenWithBrowserAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.ShowInTaskListAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.SynchronizeEditorAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.TaskActivateAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.TaskDeactivateAction;
-import org.eclipse.mylyn.internal.tasks.ui.deprecated.AbstractRepositoryTaskEditor;
-import org.eclipse.mylyn.internal.tasks.ui.deprecated.NewTaskEditorInput;
-import org.eclipse.mylyn.internal.tasks.ui.deprecated.RepositoryTaskEditorInput;
-import org.eclipse.mylyn.internal.tasks.ui.deprecated.TaskFormPage;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPage;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.ActionFactory;
-import org.eclipse.ui.forms.editor.IFormPage;
-import org.eclipse.ui.internal.WorkbenchImages;
-import org.eclipse.ui.internal.WorkbenchMessages;
-import org.eclipse.ui.part.MultiPageEditorActionBarContributor;
-import org.eclipse.ui.progress.IProgressService;
-import org.eclipse.ui.texteditor.IWorkbenchActionDefinitionIds;
-
-/**
- * @author Mik Kersten
- * @author Rob Elves
- * @author Steffen Pingel
- */
-@SuppressWarnings("deprecation")
-public class TaskEditorActionContributor extends MultiPageEditorActionBarContributor implements
- ISelectionChangedListener {
-
- private TaskEditor editor;
-
- private final OpenWithBrowserAction openWithBrowserAction = new OpenWithBrowserAction();
-
- private final CopyTaskDetailsAction copyTaskDetailsAction = new CopyTaskDetailsAction();
-
- private final AbstractTaskEditorAction attachAction = new AttachAction();
-
- private final AbstractTaskEditorAction attachScreenshotAction = new AttachScreenshotAction();
-
- private final SynchronizeEditorAction synchronizeEditorAction = new SynchronizeEditorAction();
-
- private final ShowInTaskListAction showInTaskListAction = new ShowInTaskListAction();
-
- private final NewTaskFromSelectionAction newTaskFromSelectionAction = new NewTaskFromSelectionAction();
-
- private final GlobalAction cutAction;
-
- private final GlobalAction undoAction;
-
- private final GlobalAction redoAction;
-
- private final GlobalAction copyAction;
-
- private final GlobalAction pasteAction;
-
- private final GlobalAction selectAllAction;
-
- public TaskEditorActionContributor() {
- cutAction = new GlobalAction(ActionFactory.CUT.getId());
- cutAction.setText(WorkbenchMessages.Workbench_cut);
- cutAction.setToolTipText(WorkbenchMessages.Workbench_cutToolTip);
- cutAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_CUT));
- cutAction.setHoverImageDescriptor(WorkbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_CUT));
- cutAction.setDisabledImageDescriptor(WorkbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_CUT_DISABLED));
- cutAction.setActionDefinitionId(IWorkbenchActionDefinitionIds.CUT);
-
- pasteAction = new GlobalAction(ActionFactory.PASTE.getId());
- pasteAction.setText(WorkbenchMessages.Workbench_paste);
- pasteAction.setToolTipText(WorkbenchMessages.Workbench_pasteToolTip);
- pasteAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE));
- pasteAction.setHoverImageDescriptor(WorkbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE));
- pasteAction.setDisabledImageDescriptor(WorkbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE_DISABLED));
- pasteAction.setActionDefinitionId(IWorkbenchActionDefinitionIds.PASTE);
-
- copyAction = new GlobalAction(ActionFactory.COPY.getId());
- copyAction.setText(WorkbenchMessages.Workbench_copy);
- copyAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_COPY));
- copyAction.setHoverImageDescriptor(WorkbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_COPY));
- copyAction.setDisabledImageDescriptor(WorkbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_COPY_DISABLED));
- copyAction.setActionDefinitionId(IWorkbenchActionDefinitionIds.COPY);
-
- undoAction = new GlobalAction(ActionFactory.UNDO.getId());
- undoAction.setText(WorkbenchMessages.Workbench_undo);
- undoAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_UNDO));
- undoAction.setHoverImageDescriptor(WorkbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_UNDO));
- undoAction.setDisabledImageDescriptor(WorkbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_UNDO_DISABLED));
- undoAction.setActionDefinitionId(IWorkbenchActionDefinitionIds.UNDO);
-
- redoAction = new GlobalAction(ActionFactory.REDO.getId());
- redoAction.setText(WorkbenchMessages.Workbench_redo);
- redoAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_REDO));
- redoAction.setHoverImageDescriptor(WorkbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_REDO));
- redoAction.setDisabledImageDescriptor(WorkbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_REDO_DISABLED));
- redoAction.setActionDefinitionId(IWorkbenchActionDefinitionIds.REDO);
-
- selectAllAction = new GlobalAction(ActionFactory.SELECT_ALL.getId());
- selectAllAction.setText(WorkbenchMessages.Workbench_selectAll);
- selectAllAction.setActionDefinitionId(IWorkbenchActionDefinitionIds.SELECT_ALL);
- selectAllAction.setEnabled(true);
- }
-
- public void addClipboardActions(IMenuManager manager) {
- manager.add(undoAction);
- manager.add(redoAction);
- manager.add(new Separator());
- manager.add(cutAction);
- manager.add(copyAction);
- manager.add(copyTaskDetailsAction);
- manager.add(pasteAction);
- manager.add(selectAllAction);
- manager.add(newTaskFromSelectionAction);
- manager.add(new Separator());
- }
-
- public void contextMenuAboutToShow(IMenuManager mng) {
- IFormPage page = getActivePage();
- boolean addClipboard = (page instanceof TaskPlanningEditor || page instanceof AbstractRepositoryTaskEditor || page instanceof AbstractTaskEditorPage);
- contextMenuAboutToShow(mng, addClipboard);
- }
-
- public void contextMenuAboutToShow(IMenuManager manager, boolean addClipboard) {
- if (editor != null) {
- updateSelectableActions(getSelection());
- }
- if (addClipboard) {
- addClipboardActions(manager);
- }
- if (editor.getTaskEditorInput() == null) {
- final MenuManager subMenuManager = new MenuManager("Add to " + TaskListView.LABEL_VIEW);
- List<AbstractTaskCategory> categories = new ArrayList<AbstractTaskCategory>(TasksUiInternal.getTaskList()
- .getCategories());
- Collections.sort(categories);
- for (final AbstractTaskCategory category : categories) {
- if (!(category instanceof UnmatchedTaskContainer)) {//.equals(TasksUiPlugin.getTaskList().getArchiveContainer())) {
- Action action = new Action() {
- @Override
- public void run() {
- moveToCategory(category);
- }
- };
- String text = category.getSummary();
- action.setText(text);
- action.setImageDescriptor(TasksUiImages.CATEGORY);
- subMenuManager.add(action);
- }
- }
- copyTaskDetailsAction.selectionChanged(new StructuredSelection(getSelection()));
- manager.add(subMenuManager);
- } else if (editor.getEditorInput() instanceof NewTaskEditorInput) {
- // empty menu
- } else {
- final ITask task = editor.getTaskEditorInput().getTask();
- if (task != null) {
- // TODO: refactor
- IStructuredSelection selection = new StructuredSelection(task);
- openWithBrowserAction.selectionChanged(selection);
- copyTaskDetailsAction.selectionChanged(selection);
- synchronizeEditorAction.selectionChanged(new StructuredSelection(this.getEditor()));
- showInTaskListAction.selectionChanged(selection);
-
- manager.add(new Separator());
- manager.add(synchronizeEditorAction);
- manager.add(openWithBrowserAction);
-
- if (task.isActive()) {
- manager.add(new TaskDeactivateAction() {
- @Override
- public void run() {
- super.run(task);
- }
- });
- } else {
- manager.add(new TaskActivateAction() {
- @Override
- public void run() {
-// TasksUiPlugin.getTaskListManager().getTaskActivationHistory().addTask(task);
- super.run(task);
- }
- });
- }
- manager.add(showInTaskListAction);
-
- manager.add(new Separator());
- manager.add(new GroupMarker(TaskListView.ID_SEPARATOR_OPERATIONS));
- manager.add(new GroupMarker(TaskListView.ID_SEPARATOR_CONTEXT));
-
- for (String menuPath : TasksUiPlugin.getDefault().getDynamicMenuMap().keySet()) {
- for (IDynamicSubMenuContributor contributor : TasksUiPlugin.getDefault().getDynamicMenuMap().get(
- menuPath)) {
- if (TaskListView.ID_SEPARATOR_TASKS.equals(menuPath)) {
- List<IRepositoryElement> selectedElements = new ArrayList<IRepositoryElement>();
- selectedElements.add(task);
- MenuManager subMenuManager = contributor.getSubMenuManager(selectedElements);
- if (subMenuManager != null) {
- subMenuManager.setVisible(selectedElements.size() > 0
- && selectedElements.get(0) instanceof ITask);
- manager.add(subMenuManager);
- }
- }
- }
- }
- manager.add(new Separator());
- if (getActivePage() instanceof AbstractRepositoryTaskEditor) {
- attachAction.selectionChanged(selection);
- attachAction.setEditor(editor);
- attachScreenshotAction.selectionChanged(selection);
- attachScreenshotAction.setEditor(editor);
-
- manager.add(new Separator());
- manager.add(attachAction);
- manager.add(attachScreenshotAction);
- }
- manager.add(new Separator());
- }
- }
- manager.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
- }
-
- private void moveToCategory(AbstractTaskCategory category) {
- IEditorInput input = getEditor().getEditorInput();
- if (input instanceof RepositoryTaskEditorInput) {
- RepositoryTaskEditorInput repositoryTaskEditorInput = (RepositoryTaskEditorInput) input;
- final IProgressService svc = PlatformUI.getWorkbench().getProgressService();
- final AddExistingTaskJob job = new AddExistingTaskJob(repositoryTaskEditorInput.getRepository(),
- repositoryTaskEditorInput.getId(), category);
- job.schedule();
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- svc.showInDialog(getEditor().getSite().getShell(), job);
- }
- });
- }
- }
-
- public void updateSelectableActions(ISelection selection) {
- if (editor != null) {
- cutAction.selectionChanged(selection);
- copyAction.selectionChanged(selection);
- pasteAction.selectionChanged(selection);
- undoAction.selectionChanged(selection);
- redoAction.selectionChanged(selection);
- selectAllAction.selectionChanged(selection);
- newTaskFromSelectionAction.selectionChanged(selection);
- }
- }
-
- @Override
- public void contributeToMenu(IMenuManager mm) {
- }
-
- @Override
- public void contributeToStatusLine(IStatusLineManager slm) {
- }
-
- @Override
- public void contributeToToolBar(IToolBarManager tbm) {
- }
-
- @Override
- public void contributeToCoolBar(ICoolBarManager cbm) {
- }
-
- @Override
- public void init(IActionBars bars, IWorkbenchPage page) {
- super.init(bars, page);
- registerGlobalHandlers(bars);
- }
-
- public TaskEditor getEditor() {
- return editor;
- }
-
- @Override
- public void setActiveEditor(IEditorPart activeEditor) {
- if (activeEditor instanceof TaskEditor) {
- this.editor = (TaskEditor) activeEditor;
- updateSelectableActions(getSelection());
- } else {
- this.editor = null;
- }
- }
-
- @Override
- public void setActivePage(IEditorPart activePage) {
- updateSelectableActions(getSelection());
- }
-
- public void selectionChanged(SelectionChangedEvent event) {
- updateSelectableActions(event.getSelection());
- }
-
- private class GlobalAction extends Action {
-
- private final String actionId;
-
- public GlobalAction(String actionId) {
- this.actionId = actionId;
- }
-
- @Override
- public void run() {
- IFormPage page = getActivePage();
- if (page instanceof TaskFormPage) {
- TaskFormPage editor = (TaskFormPage) page;
- editor.doAction(actionId);
- } else if (page instanceof AbstractTaskEditorPage) {
- AbstractTaskEditorPage editor = (AbstractTaskEditorPage) page;
- editor.doAction(actionId);
- } else {
- EditorUtil.doAction(actionId, EditorUtil.getFocusControl(getActivePage()));
- }
- updateSelectableActions(getSelection());
- }
-
- public void selectionChanged(ISelection selection) {
- IFormPage page = getActivePage();
- if (page instanceof TaskFormPage) {
- TaskFormPage editor = (TaskFormPage) page;
- setEnabled(editor.canPerformAction(actionId));
- } else if (page instanceof AbstractTaskEditorPage) {
- AbstractTaskEditorPage editor = (AbstractTaskEditorPage) page;
- setEnabled(editor.canPerformAction(actionId));
- } else {
- setEnabled(EditorUtil.canPerformAction(actionId, EditorUtil.getFocusControl(getActivePage())));
- }
- }
- }
-
- private void registerGlobalHandlers(IActionBars bars) {
- bars.setGlobalActionHandler(ActionFactory.CUT.getId(), cutAction);
- bars.setGlobalActionHandler(ActionFactory.PASTE.getId(), pasteAction);
- bars.setGlobalActionHandler(ActionFactory.COPY.getId(), copyAction);
- bars.setGlobalActionHandler(ActionFactory.UNDO.getId(), undoAction);
- bars.setGlobalActionHandler(ActionFactory.REDO.getId(), redoAction);
- bars.setGlobalActionHandler(ActionFactory.SELECT_ALL.getId(), selectAllAction);
- bars.updateActionBars();
- }
-
- private void unregisterGlobalHandlers(IActionBars bars) {
- bars.setGlobalActionHandler(ActionFactory.CUT.getId(), null);
- bars.setGlobalActionHandler(ActionFactory.PASTE.getId(), null);
- bars.setGlobalActionHandler(ActionFactory.COPY.getId(), null);
- bars.setGlobalActionHandler(ActionFactory.UNDO.getId(), null);
- bars.setGlobalActionHandler(ActionFactory.REDO.getId(), null);
- bars.setGlobalActionHandler(ActionFactory.SELECT_ALL.getId(), null);
- bars.updateActionBars();
- }
-
- public void forceActionsEnabled() {
- cutAction.setEnabled(true);
- copyAction.setEnabled(true);
- pasteAction.setEnabled(true);
- selectAllAction.setEnabled(true);
- undoAction.setEnabled(false);
- redoAction.setEnabled(false);
- }
-
- private IFormPage getActivePage() {
- return (editor != null) ? editor.getActivePageInstance() : null;
- }
-
- private ISelection getSelection() {
- if (editor != null && editor.getSite().getSelectionProvider() != null) {
- return editor.getSite().getSelectionProvider().getSelection();
- } else {
- return StructuredSelection.EMPTY;
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorActionPart.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorActionPart.java
deleted file mode 100644
index 360d1d225..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorActionPart.java
+++ /dev/null
@@ -1,313 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTaskCategory;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.ITaskList;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.mylyn.tasks.core.data.TaskOperation;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractAttributeEditor;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPart;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CCombo;
-import org.eclipse.swt.events.FocusAdapter;
-import org.eclipse.swt.events.FocusEvent;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-import org.eclipse.ui.forms.widgets.Section;
-
-public class TaskEditorActionPart extends AbstractTaskEditorPart {
-
- private static final String KEY_OPERATION = "operation";
-
- private class RadioButtonListener extends SelectionAdapter {
-
- @Override
- public void widgetSelected(SelectionEvent event) {
- setSelectedRadionButton((Button) event.widget);
- TaskOperation taskOperation = (TaskOperation) event.widget.getData(KEY_OPERATION);
- getTaskData().getAttributeMapper().setTaskOperation(selectedOperationAttribute, taskOperation);
- getModel().attributeChanged(selectedOperationAttribute);
- }
-
- }
-
- private class FocusListener extends FocusAdapter {
-
- private final Button button;
-
- public FocusListener(Button button) {
- this.button = button;
- }
-
- @Override
- public void focusGained(FocusEvent event) {
- setSelectedRadionButton(button);
- }
-
- }
-
- private static final int DEFAULT_FIELD_WIDTH = 150;
-
- private static final String LABEL_BUTTON_SUBMIT = "Submit";
-
- private static final int RADIO_OPTION_WIDTH = 120;
-
- private List<Button> operationButtons;
-
- private Button submitButton;
-
- private Button attachContextButton;
-
-// private boolean needsAttachContext = true;
-
- private Button addToCategory;
-
- private CCombo categoryChooser;
-
- private AbstractTaskCategory category;
-
- private TaskAttribute selectedOperationAttribute;
-
- public TaskEditorActionPart() {
- setPartName("Actions");
- }
-
- protected void addAttachContextButton(Composite buttonComposite, FormToolkit toolkit) {
- attachContextButton = toolkit.createButton(buttonComposite, "Attach Context", SWT.CHECK);
- attachContextButton.setImage(CommonImages.getImage(TasksUiImages.CONTEXT_ATTACH));
- }
-
- /**
- * Adds buttons to this composite. Subclasses can override this method to provide different/additional buttons.
- *
- * @param buttonComposite
- * Composite to add the buttons to.
- * @param toolkit
- */
- private void createActionButtons(Composite buttonComposite, FormToolkit toolkit) {
- submitButton = toolkit.createButton(buttonComposite, LABEL_BUTTON_SUBMIT, SWT.NONE);
- GridData submitButtonData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- submitButtonData.widthHint = 100;
- submitButton.setImage(CommonImages.getImage(TasksUiImages.REPOSITORY_SUBMIT));
- submitButton.setLayoutData(submitButtonData);
- submitButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- getTaskEditorPage().doSubmit();
- }
- });
-
- setSubmitEnabled(true);
-
- toolkit.createLabel(buttonComposite, " ");
-
-// if (needsAttachContext) {
- addAttachContextButton(buttonComposite, toolkit);
-// }
- }
-
- /**
- * Creates the button layout. This displays options and buttons at the bottom of the editor to allow actions to be
- * performed on the bug.
- *
- * @param toolkit
- */
- private void createCategoryChooser(Composite buttonComposite, FormToolkit toolkit) {
- addToCategory = getManagedForm().getToolkit().createButton(buttonComposite, "Add to Category", SWT.CHECK);
- categoryChooser = new CCombo(buttonComposite, SWT.FLAT | SWT.READ_ONLY);
- categoryChooser.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
- categoryChooser.setLayoutData(GridDataFactory.swtDefaults().hint(150, SWT.DEFAULT).create());
- toolkit.adapt(categoryChooser, true, false);
- categoryChooser.setFont(TEXT_FONT);
- ITaskList taskList = TasksUiInternal.getTaskList();
- final List<AbstractTaskCategory> categories = new ArrayList<AbstractTaskCategory>(taskList.getCategories());
- Collections.sort(categories, new Comparator<AbstractTaskContainer>() {
-
- public int compare(AbstractTaskContainer c1, AbstractTaskContainer c2) {
- if (c1.equals(TasksUiPlugin.getTaskList().getDefaultCategory())) {
- return -1;
- } else if (c2.equals(TasksUiPlugin.getTaskList().getDefaultCategory())) {
- return 1;
- } else {
- return c1.getSummary().compareToIgnoreCase(c2.getSummary());
- }
- }
-
- });
- for (IRepositoryElement category : categories) {
- categoryChooser.add(category.getSummary());
- }
- categoryChooser.select(0);
- categoryChooser.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent event) {
- if (categoryChooser.getSelectionIndex() != -1) {
- category = categories.get(categoryChooser.getSelectionIndex());
- }
- }
- });
- categoryChooser.setEnabled(false);
-
- addToCategory.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- markDirty();
- if (!addToCategory.getSelection()) {
- category = null;
- } else if (categoryChooser.getSelectionIndex() != -1) {
- category = categories.get(categoryChooser.getSelectionIndex());
- }
- categoryChooser.setEnabled(addToCategory.getSelection());
- }
- });
-
- GridDataFactory.fillDefaults().hint(DEFAULT_FIELD_WIDTH, SWT.DEFAULT).span(3, SWT.DEFAULT).applyTo(
- categoryChooser);
- }
-
- public AbstractTaskCategory getCategory() {
- return category;
- }
-
- @Override
- public void createControl(Composite parent, FormToolkit toolkit) {
- Section section = createSection(parent, toolkit, true);
-
- Composite buttonComposite = toolkit.createComposite(section);
- GridLayout buttonLayout = new GridLayout();
- GridDataFactory.fillDefaults().align(SWT.FILL, SWT.TOP).applyTo(buttonComposite);
- buttonLayout.numColumns = 4;
- buttonComposite.setLayout(buttonLayout);
-
- if (getTaskEditorPage().needsAddToCategory()) {
- createCategoryChooser(buttonComposite, toolkit);
- }
-
- selectedOperationAttribute = getTaskData().getRoot().getMappedAttribute(TaskAttribute.OPERATION);
- if (selectedOperationAttribute != null
- && TaskAttribute.TYPE_OPERATION.equals(selectedOperationAttribute.getMetaData().getType())) {
- TaskOperation selectedOperation = getTaskData().getAttributeMapper().getTaskOperation(
- selectedOperationAttribute);
- createRadioButtons(buttonComposite, toolkit, selectedOperation);
- }
-
- createActionButtons(buttonComposite, toolkit);
-
- toolkit.paintBordersFor(buttonComposite);
- section.setClient(buttonComposite);
- setSection(toolkit, section);
- }
-
- private void addAttribute(Composite composite, FormToolkit toolkit, TaskAttribute attribute, Button button) {
- AbstractAttributeEditor editor = createAttributeEditor(attribute);
- if (editor != null) {
- editor.createControl(composite, toolkit);
- GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- gd.horizontalSpan = 3;
- if (editor.getControl() instanceof CCombo) {
- // XXX combo boxes are too tall by default and wider than other controls
- gd.heightHint = 20;
- gd.widthHint = RADIO_OPTION_WIDTH;
- } else {
- gd.widthHint = RADIO_OPTION_WIDTH - 5;
- }
- editor.getControl().setLayoutData(gd);
- editor.getControl().addFocusListener(new FocusListener(button));
- getTaskEditorPage().getAttributeEditorToolkit().adapt(editor);
- }
- }
-
- private void createRadioButtons(Composite buttonComposite, FormToolkit toolkit, TaskOperation selectedOperation) {
- List<TaskOperation> operations = getTaskData().getAttributeMapper().getTaskOperations(
- selectedOperationAttribute);
- if (operations.size() > 0) {
- operationButtons = new ArrayList<Button>();
- Button selectedButton = null;
- for (TaskOperation operation : operations) {
- Button button = toolkit.createButton(buttonComposite, operation.getLabel(), SWT.RADIO);
- button.setFont(TEXT_FONT);
- button.setData(KEY_OPERATION, operation);
- GridData radioData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- TaskAttribute associatedAttribute = getTaskData().getAttributeMapper().getAssoctiatedAttribute(
- operation);
- if (associatedAttribute != null) {
- radioData.horizontalSpan = 1;
- addAttribute(buttonComposite, toolkit, associatedAttribute, button);
- } else {
- radioData.horizontalSpan = 4;
- }
- button.setLayoutData(radioData);
- button.addSelectionListener(new RadioButtonListener());
- operationButtons.add(button);
- if (operation.equals(selectedOperation)) {
- selectedButton = button;
- }
- }
- // do this last to ensure only a single button is selected
- if (selectedButton == null && !operationButtons.isEmpty()) {
- selectedButton = operationButtons.get(0);
- }
- setSelectedRadionButton(selectedButton);
- }
- }
-
- public boolean getAttachContext() {
- if (attachContextButton == null || attachContextButton.isDisposed()) {
- return false;
- } else {
- return attachContextButton.getSelection();
- }
- }
-
-// boolean needsAttachContext() {
-// return needsAttachContext;
-// }
-//
-// void setNeedsAttachContext(boolean attachContextEnabled) {
-// this.needsAttachContext = attachContextEnabled;
-// }
-
- public void setSubmitEnabled(boolean enabled) {
- if (submitButton != null && !submitButton.isDisposed()) {
- submitButton.setEnabled(enabled);
- if (enabled) {
- submitButton.setToolTipText("Submit to " + getTaskEditorPage().getTaskRepository().getRepositoryUrl());
- }
- }
- }
-
- private void setSelectedRadionButton(Button selectedButton) {
- selectedButton.setSelection(true);
- for (Button button : operationButtons) {
- if (button != selectedButton) {
- button.setSelection(false);
- }
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorAttachmentPart.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorAttachmentPart.java
deleted file mode 100644
index dc19d00da..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorAttachmentPart.java
+++ /dev/null
@@ -1,502 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.dialogs.IMessageProvider;
-import org.eclipse.jface.viewers.ColumnViewerToolTipSupport;
-import org.eclipse.jface.viewers.IOpenListener;
-import org.eclipse.jface.viewers.OpenEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.jface.window.ToolTip;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.tasks.core.TaskAttachment;
-import org.eclipse.mylyn.internal.tasks.core.data.FileTaskAttachmentSource;
-import org.eclipse.mylyn.internal.tasks.core.data.TextTaskAttachmentSource;
-import org.eclipse.mylyn.internal.tasks.ui.actions.AttachAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.AttachScreenshotAction;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.NewAttachmentWizardDialog;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.TaskAttachmentWizard.Mode;
-import org.eclipse.mylyn.tasks.core.ITaskAttachment;
-import org.eclipse.mylyn.tasks.core.data.AbstractTaskAttachmentSource;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.mylyn.tasks.core.data.TaskAttributeMapper;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPart;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.DND;
-import org.eclipse.swt.dnd.DropTarget;
-import org.eclipse.swt.dnd.DropTargetEvent;
-import org.eclipse.swt.dnd.DropTargetListener;
-import org.eclipse.swt.dnd.FileTransfer;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.swt.dnd.TransferData;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-import org.eclipse.ui.forms.widgets.Section;
-import org.eclipse.ui.internal.WorkbenchImages;
-
-/**
- * @author Mik Kersten
- * @author Rob Elves
- * @author Jeff Pound (Attachment work)
- * @author Steffen Pingel
- */
-public class TaskEditorAttachmentPart extends AbstractTaskEditorPart {
-
-// private static final String ATTACHMENT_DEFAULT_NAME = "attachment";
-//
-// private static final String CTYPE_ZIP = "zip";
-//
-// private static final String CTYPE_OCTET_STREAM = "octet-stream";
-//
-// private static final String CTYPE_TEXT = "text";
-//
-// private static final String CTYPE_HTML = "html";
-//
-// private static final String LABEL_TEXT_EDITOR = "Text Editor";
-//
-// private static final String LABEL_COPY_URL_TO_CLIPBOARD = "Copy &URL";
-//
-// private static final String LABEL_COPY_TO_CLIPBOARD = "Copy Contents";
-//
-// private static final String LABEL_SAVE = "Save...";
-//
-// private static final String LABEL_BROWSER = "Browser";
-//
-// private static final String LABEL_DEFAULT_EDITOR = "Default Editor";
-
- private static final String ID_POPUP_MENU = "org.eclipse.mylyn.tasks.ui.editor.menu.attachments";
-
- private final String[] attachmentsColumns = { "Name", "Description", "Type", "Size", "Creator", "Created" };
-
- private final int[] attachmentsColumnWidths = { 140, 160, 100, 70, 100, 100 };
-
-// private Table attachmentsTable;
-//
-// private TableViewer attachmentsTableViewer;
-
- private List<TaskAttribute> attachments;
-
- private boolean hasIncoming;
-
- private MenuManager menuManager;
-
- private TaskAttachmentDropListener dropListener;
-
- public TaskEditorAttachmentPart() {
- setPartName("Attachments");
- }
-
- private void createAttachmentTable(FormToolkit toolkit, final Composite attachmentsComposite) {
- Table attachmentsTable = toolkit.createTable(attachmentsComposite, SWT.SINGLE | SWT.BORDER | SWT.FULL_SELECTION);
- attachmentsTable.setLinesVisible(true);
- attachmentsTable.setHeaderVisible(true);
- attachmentsTable.setLayout(new GridLayout());
- GridData tableGridData = new GridData(SWT.FILL, SWT.FILL, true, true);
- attachmentsTable.setLayoutData(tableGridData);
-
- for (int i = 0; i < attachmentsColumns.length; i++) {
- TableColumn column = new TableColumn(attachmentsTable, SWT.LEFT, i);
- column.setText(attachmentsColumns[i]);
- column.setWidth(attachmentsColumnWidths[i]);
- }
- attachmentsTable.getColumn(3).setAlignment(SWT.RIGHT);
-
- TableViewer attachmentsViewer = new TableViewer(attachmentsTable);
- attachmentsViewer.setUseHashlookup(true);
- attachmentsViewer.setColumnProperties(attachmentsColumns);
- ColumnViewerToolTipSupport.enableFor(attachmentsViewer, ToolTip.NO_RECREATE);
-
- attachmentsViewer.setSorter(new ViewerSorter() {
- @Override
- public int compare(Viewer viewer, Object e1, Object e2) {
- ITaskAttachment attachment1 = (ITaskAttachment) e1;
- ITaskAttachment attachment2 = (ITaskAttachment) e2;
- Date created1 = attachment1.getCreationDate();
- Date created2 = attachment2.getCreationDate();
- if (created1 != null && created2 != null) {
- return created1.compareTo(created2);
- } else if (created1 == null && created2 != null) {
- return -1;
- } else if (created1 != null && created2 == null) {
- return 1;
- } else {
- return 0;
- }
- }
- });
-
- List<ITaskAttachment> attachmentList = new ArrayList<ITaskAttachment>(attachments.size());
- for (TaskAttribute attribute : attachments) {
- TaskAttachment taskAttachment = new TaskAttachment(getModel().getTaskRepository(), getModel().getTask(),
- attribute);
- getTaskData().getAttributeMapper().updateTaskAttachment(taskAttachment, attribute);
- attachmentList.add(taskAttachment);
- }
- attachmentsViewer.setContentProvider(new AttachmentsTableContentProvider2(attachmentList));
- attachmentsViewer.setLabelProvider(new AttachmentTableLabelProvider2(
- getTaskEditorPage().getAttributeEditorToolkit()));
- attachmentsViewer.addOpenListener(new IOpenListener() {
- public void open(OpenEvent event) {
- if (!event.getSelection().isEmpty()) {
- StructuredSelection selection = (StructuredSelection) event.getSelection();
- ITaskAttachment attachment = (ITaskAttachment) selection.getFirstElement();
- TasksUiUtil.openUrl(attachment.getUrl());
- }
- }
- });
- attachmentsViewer.addSelectionChangedListener(getTaskEditorPage());
- attachmentsViewer.setInput(getTaskData());
-
- menuManager = new MenuManager();
- menuManager.setRemoveAllWhenShown(true);
- getTaskEditorPage().getEditorSite().registerContextMenu(ID_POPUP_MENU, menuManager, attachmentsViewer, false);
- Menu menu = menuManager.createContextMenu(attachmentsTable);
- attachmentsTable.setMenu(menu);
- }
-
-// private void createAttachmentTableMenu() {
- // FIXME EDITOR
-// final Action openWithBrowserAction = new Action(LABEL_BROWSER) {
-// @Override
-// public void run() {
-// TaskAttachment attachment = (TaskAttachment) (((StructuredSelection) attachmentsTableViewer.getSelection()).getFirstElement());
-// if (attachment != null) {
-// TasksUiUtil.openUrl(attachment.getUrl());
-// }
-// }
-// };
-//
-// final Action openWithDefaultAction = new Action(LABEL_DEFAULT_EDITOR) {
-// @Override
-// public void run() {
-// // browser shortcut
-// TaskAttachment attachment = (TaskAttachment) (((StructuredSelection) attachmentsTableViewer.getSelection()).getFirstElement());
-// if (attachment == null) {
-// return;
-// }
-//
-// if (attachment.getContentType().endsWith(CTYPE_HTML)) {
-// TasksUiUtil.openUrl(attachment.getUrl());
-// return;
-// }
-//
-// IStorageEditorInput input = new RepositoryAttachmentEditorInput(getTaskRepository(), attachment);
-// IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
-// if (page == null) {
-// return;
-// }
-// IEditorDescriptor desc = PlatformUI.getWorkbench()
-// .getEditorRegistry()
-// .getDefaultEditor(input.getName());
-// try {
-// page.openEditor(input, desc.getId());
-// } catch (PartInitException e) {
-// StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Unable to open editor for: "
-// + attachment.getDescription(), e));
-// }
-// }
-// };
-//
-// final Action openWithTextEditorAction = new Action(LABEL_TEXT_EDITOR) {
-// @Override
-// public void run() {
-// TaskAttachment attachment = (TaskAttachment) (((StructuredSelection) attachmentsTableViewer.getSelection()).getFirstElement());
-// IStorageEditorInput input = new RepositoryAttachmentEditorInput(getTaskRepository(), attachment);
-// IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
-// if (page == null) {
-// return;
-// }
-//
-// try {
-// page.openEditor(input, "org.eclipse.ui.DefaultTextEditor");
-// } catch (PartInitException e) {
-// StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Unable to open editor for: "
-// + attachment.getDescription(), e));
-// }
-// }
-// };
-//
-// final Action saveAction = new Action(LABEL_SAVE) {
-// @Override
-// public void run() {
-// TaskAttachment attachment = (TaskAttachment) (((StructuredSelection) attachmentsTableViewer.getSelection()).getFirstElement());
-// /* Launch Browser */
-// FileDialog fileChooser = new FileDialog(attachmentsTable.getShell(), SWT.SAVE);
-// String fname = attachment.getAttributeValue(RepositoryTaskAttribute.ATTACHMENT_FILENAME);
-// // Default name if none is found
-// if (fname.equals("")) {
-// String ctype = attachment.getContentType();
-// if (ctype.endsWith(CTYPE_HTML)) {
-// fname = ATTACHMENT_DEFAULT_NAME + ".html";
-// } else if (ctype.startsWith(CTYPE_TEXT)) {
-// fname = ATTACHMENT_DEFAULT_NAME + ".txt";
-// } else if (ctype.endsWith(CTYPE_OCTET_STREAM)) {
-// fname = ATTACHMENT_DEFAULT_NAME;
-// } else if (ctype.endsWith(CTYPE_ZIP)) {
-// fname = ATTACHMENT_DEFAULT_NAME + "." + CTYPE_ZIP;
-// } else {
-// fname = ATTACHMENT_DEFAULT_NAME + "." + ctype.substring(ctype.indexOf("/") + 1);
-// }
-// }
-// fileChooser.setFileName(fname);
-// String filePath = fileChooser.open();
-// // Check if the dialog was canceled or an error occurred
-// if (filePath == null) {
-// return;
-// }
-//
-// DownloadAttachmentJob job = new DownloadAttachmentJob(attachment, new File(filePath));
-// job.setUser(true);
-// job.schedule();
-// }
-// };
-//
-// final Action copyURLToClipAction = new Action(LABEL_COPY_URL_TO_CLIPBOARD) {
-// @Override
-// public void run() {
-// TaskAttachment attachment = (TaskAttachment) (((StructuredSelection) attachmentsTableViewer.getSelection()).getFirstElement());
-// Clipboard clip = new Clipboard(PlatformUI.getWorkbench().getDisplay());
-// clip.setContents(new Object[] { attachment.getUrl() }, new Transfer[] { TextTransfer.getInstance() });
-// clip.dispose();
-// }
-// };
-//
-// final Action copyToClipAction = new Action(LABEL_COPY_TO_CLIPBOARD) {
-// @Override
-// public void run() {
-// TaskAttachment attachment = (TaskAttachment) (((StructuredSelection) attachmentsTableViewer.getSelection()).getFirstElement());
-// CopyAttachmentToClipboardJob job = new CopyAttachmentToClipboardJob(attachment);
-// job.setUser(true);
-// job.schedule();
-// }
-// };
-//
-// final MenuManager popupMenu = new MenuManager();
-// final Menu menu = popupMenu.createContextMenu(attachmentsTable);
-// attachmentsTable.setMenu(menu);
-// final MenuManager openMenu = new MenuManager("Open With");
-// popupMenu.addMenuListener(new IMenuListener() {
-// public void menuAboutToShow(IMenuManager manager) {
-// popupMenu.removeAll();
-//
-// ISelection selection = attachmentsTableViewer.getSelection();
-// if (selection.isEmpty()) {
-// return;
-// }
-//
-// TaskAttachment att = (TaskAttachment) ((StructuredSelection) selection).getFirstElement();
-//
-// // reinitialize menu
-// popupMenu.add(openMenu);
-// openMenu.removeAll();
-// IStorageEditorInput input = new RepositoryAttachmentEditorInput(getTaskRepository(), att);
-// IEditorDescriptor desc = PlatformUI.getWorkbench()
-// .getEditorRegistry()
-// .getDefaultEditor(input.getName());
-// if (desc != null) {
-// openMenu.add(openWithDefaultAction);
-// }
-// openMenu.add(openWithBrowserAction);
-// openMenu.add(openWithTextEditorAction);
-//
-// popupMenu.add(new Separator());
-// popupMenu.add(saveAction);
-//
-// popupMenu.add(copyURLToClipAction);
-// if (att.getContentType().startsWith(CTYPE_TEXT) || att.getContentType().endsWith("xml")) {
-// popupMenu.add(copyToClipAction);
-// }
-// popupMenu.add(new Separator("actions"));
-//
-// // TODO: use workbench mechanism for this?
-// ObjectActionContributorManager.getManager().contributeObjectActions(getTaskEditorPage(), popupMenu,
-// attachmentsTableViewer);
-// }
-// });
-// }
-
- private void createButtons(Composite attachmentsComposite, FormToolkit toolkit) {
- final Composite attachmentControlsComposite = toolkit.createComposite(attachmentsComposite);
- attachmentControlsComposite.setLayout(new GridLayout(2, false));
- attachmentControlsComposite.setLayoutData(new GridData(GridData.BEGINNING));
-
- Button attachFileButton = toolkit.createButton(attachmentControlsComposite, AttachAction.LABEL, SWT.PUSH);
- attachFileButton.setImage(WorkbenchImages.getImage(ISharedImages.IMG_OBJ_FILE));
- attachFileButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- openNewAttachmentWizard(Mode.DEFAULT, null);
- }
- });
- registerDropListener(attachFileButton, dropListener);
-
- Button attachScreenshotButton = toolkit.createButton(attachmentControlsComposite, AttachScreenshotAction.LABEL,
- SWT.PUSH);
- attachScreenshotButton.setImage(CommonImages.getImage(CommonImages.IMAGE_CAPTURE));
- attachScreenshotButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- openNewAttachmentWizard(Mode.SCREENSHOT, null);
- }
- });
- registerDropListener(attachScreenshotButton, dropListener);
- }
-
- @Override
- public void createControl(Composite parent, FormToolkit toolkit) {
- initialize();
-
- Section section = createSection(parent, toolkit, hasIncoming);
- section.setText(getPartName() + " (" + attachments.size() + ")");
-
- final Composite attachmentsComposite = toolkit.createComposite(section);
- attachmentsComposite.setLayout(new GridLayout(1, false));
- attachmentsComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- dropListener = new TaskAttachmentDropListener();
- registerDropListener(section, dropListener);
-
- if (attachments.size() > 0) {
- createAttachmentTable(toolkit, attachmentsComposite);
- } else {
- toolkit.createLabel(attachmentsComposite, "No attachments");
- // TODO EDITOR registerDropListener(label);
- }
-
- createButtons(attachmentsComposite, toolkit);
-
- section.setClient(attachmentsComposite);
- setSection(toolkit, section);
- }
-
- private void registerDropListener(Control control, TaskAttachmentDropListener dropListener) {
- DropTarget target = new DropTarget(control, DND.DROP_COPY | DND.DROP_DEFAULT);
- final TextTransfer textTransfer = TextTransfer.getInstance();
- final FileTransfer fileTransfer = FileTransfer.getInstance();
- Transfer[] types = new Transfer[] { textTransfer, fileTransfer };
- target.setTransfer(types);
- target.addDropListener(dropListener);
- }
-
- @Override
- public void dispose() {
- if (menuManager != null) {
- menuManager.dispose();
- }
- super.dispose();
- }
-
- private void initialize() {
- attachments = getTaskData().getAttributeMapper().getAttributesByType(getTaskData(),
- TaskAttribute.TYPE_ATTACHMENT);
- }
-
- private NewAttachmentWizardDialog openNewAttachmentWizard(Mode mode, AbstractTaskAttachmentSource source) {
- TaskAttributeMapper mapper = getModel().getTaskData().getAttributeMapper();
- TaskAttribute attribute = mapper.createTaskAttachment(getModel().getTaskData());
- return TasksUiInternal.openNewAttachmentWizard(getTaskEditorPage().getSite().getShell(),
- getTaskEditorPage().getTaskRepository(), getTaskEditorPage().getTask(), attribute, mode, source);
- }
-
- /**
- * @author Mik Kersten
- * @author Maarten Meijer
- * @author Steffen Pingel
- */
- public class TaskAttachmentDropListener implements DropTargetListener {
-
- public TaskAttachmentDropListener() {
- }
-
- public void dragEnter(DropTargetEvent event) {
- if (event.detail == DND.DROP_DEFAULT) {
- if ((event.operations & DND.DROP_COPY) != 0) {
- event.detail = DND.DROP_COPY;
- } else {
- event.detail = DND.DROP_NONE;
- }
- }
- // will accept text but prefer to have files dropped
- for (TransferData dataType : event.dataTypes) {
- if (FileTransfer.getInstance().isSupportedType(dataType)) {
- event.currentDataType = dataType;
- // files should only be copied
- if (event.detail != DND.DROP_COPY) {
- event.detail = DND.DROP_NONE;
- }
- break;
- }
- }
- }
-
- public void dragOver(DropTargetEvent event) {
- event.feedback = DND.FEEDBACK_SELECT | DND.FEEDBACK_SCROLL;
- }
-
- public void dragOperationChanged(DropTargetEvent event) {
- if ((event.detail == DND.DROP_DEFAULT) || (event.operations & DND.DROP_COPY) != 0) {
- event.detail = DND.DROP_COPY;
- } else {
- event.detail = DND.DROP_NONE;
- }
- // allow text to be moved but files should only be copied
- if (FileTransfer.getInstance().isSupportedType(event.currentDataType)) {
- if (event.detail != DND.DROP_COPY) {
- event.detail = DND.DROP_NONE;
- }
- }
- }
-
- public void dragLeave(DropTargetEvent event) {
- }
-
- public void dropAccept(DropTargetEvent event) {
- }
-
- public void drop(DropTargetEvent event) {
- if (TextTransfer.getInstance().isSupportedType(event.currentDataType)) {
- String text = (String) event.data;
- openNewAttachmentWizard(null, new TextTaskAttachmentSource(text));
- }
- if (FileTransfer.getInstance().isSupportedType(event.currentDataType)) {
- String[] files = (String[]) event.data;
- if (files.length > 0) {
- File file = new File(files[0]);
- NewAttachmentWizardDialog dialog = openNewAttachmentWizard(null, new FileTaskAttachmentSource(file));
- if (files.length > 1) {
- dialog.setMessage("Note that only the first file dragged will be attached.",
- IMessageProvider.WARNING);
- }
- }
- }
- }
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorAttributePart.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorAttributePart.java
deleted file mode 100644
index 28e20f886..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorAttributePart.java
+++ /dev/null
@@ -1,249 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.runtime.jobs.IJobChangeEvent;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.core.runtime.jobs.JobChangeAdapter;
-import org.eclipse.jface.action.ToolBarManager;
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.internal.tasks.ui.views.UpdateRepositoryConfigurationAction;
-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.sync.TaskJob;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractAttributeEditor;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPart;
-import org.eclipse.mylyn.tasks.ui.editors.AttributeEditorFactory;
-import org.eclipse.mylyn.tasks.ui.editors.LayoutHint;
-import org.eclipse.mylyn.tasks.ui.editors.LayoutHint.ColumnSpan;
-import org.eclipse.mylyn.tasks.ui.editors.LayoutHint.RowSpan;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-import org.eclipse.ui.forms.widgets.Section;
-
-/**
- * @author Steffen Pingel
- */
-public class TaskEditorAttributePart extends AbstractTaskEditorPart {
-
- private static final int COLUMN_WIDTH = 140;
-
- private static final int MULTI_COLUMN_WIDTH = 380;
-
- private static final int MULTI_ROW_HEIGHT = 55;
-
- private List<AbstractAttributeEditor> attributeEditors;
-
- private boolean hasIncoming;
-
- public TaskEditorAttributePart() {
- setPartName("Attributes");
- }
-
- private void createAttributeControls(Composite attributesComposite, FormToolkit toolkit) {
- int columnCount = ((GridLayout) attributesComposite.getLayout()).numColumns;
- ((GridLayout) attributesComposite.getLayout()).verticalSpacing = 6;
-
- int currentColumn = 1;
- int currentPriority = 0;
- for (AbstractAttributeEditor attributeEditor : attributeEditors) {
- int priority = (attributeEditor.getLayoutHint() != null) ? attributeEditor.getLayoutHint().getPriority()
- : LayoutHint.DEFAULT_PRIORITY;
- if (priority != currentPriority) {
- currentPriority = priority;
- if (currentColumn > 1) {
- while (currentColumn <= columnCount) {
- getManagedForm().getToolkit().createLabel(attributesComposite, "");
- currentColumn++;
- }
- currentColumn = 1;
- }
- }
-
- if (attributeEditor.hasLabel()) {
- attributeEditor.createLabelControl(attributesComposite, toolkit);
- Label label = attributeEditor.getLabelControl();
- GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(label);
- currentColumn++;
- }
-
- attributeEditor.createControl(attributesComposite, toolkit);
- LayoutHint layoutHint = attributeEditor.getLayoutHint();
- GridData gd = new GridData(SWT.FILL, SWT.CENTER, false, false);
- if (layoutHint != null
- && !(layoutHint.rowSpan == RowSpan.SINGLE && layoutHint.columnSpan == ColumnSpan.SINGLE)) {
- if (layoutHint.rowSpan == RowSpan.MULTIPLE) {
- gd.heightHint = MULTI_ROW_HEIGHT;
- }
- if (layoutHint.columnSpan == ColumnSpan.SINGLE) {
- gd.widthHint = COLUMN_WIDTH;
- gd.horizontalSpan = 1;
- } else {
- gd.widthHint = MULTI_COLUMN_WIDTH;
- gd.horizontalSpan = columnCount - currentColumn + 1;
- }
- } else {
- gd.widthHint = COLUMN_WIDTH;
- gd.horizontalSpan = 1;
- }
- attributeEditor.getControl().setLayoutData(gd);
-
- getTaskEditorPage().getAttributeEditorToolkit().adapt(attributeEditor);
-
- currentColumn += gd.horizontalSpan;
- currentColumn %= columnCount;
- }
- }
-
- @Override
- public void createControl(Composite parent, FormToolkit toolkit) {
- initialize();
-
- Section section = createSection(parent, toolkit, getTaskEditorPage().isExpandAttributesSection() || hasIncoming);
-
- // Attributes Composite- this holds all the combo fields and text fields
- Composite attributesComposite = toolkit.createComposite(section);
- attributesComposite.addListener(SWT.MouseDown, new Listener() {
- public void handleEvent(Event event) {
- Control focus = event.display.getFocusControl();
- if (focus instanceof Text && ((Text) focus).getEditable() == false) {
- getManagedForm().getForm().setFocus();
- }
- }
- });
-
- GridLayout attributesLayout = new GridLayout();
- attributesLayout.numColumns = 4;
- attributesLayout.horizontalSpacing = 5;
- attributesLayout.verticalSpacing = 6;
- attributesComposite.setLayout(attributesLayout);
-
- GridData attributesData = new GridData(GridData.FILL_BOTH);
- attributesData.horizontalSpan = 1;
- attributesData.grabExcessVerticalSpace = false;
- attributesComposite.setLayoutData(attributesData);
-
- createAttributeControls(attributesComposite, toolkit);
- toolkit.paintBordersFor(attributesComposite);
-
- section.setClient(attributesComposite);
- setSection(toolkit, section);
- }
-
- @Override
- protected void fillToolBar(ToolBarManager toolBar) {
- UpdateRepositoryConfigurationAction repositoryConfigRefresh = new UpdateRepositoryConfigurationAction() {
- @Override
- public void run() {
- getTaskEditorPage().showEditorBusy(true);
- final TaskJob job = TasksUiInternal.getJobFactory().createUpdateRepositoryConfigurationJob(
- getTaskEditorPage().getConnector(), getTaskEditorPage().getTaskRepository());
- job.addJobChangeListener(new JobChangeAdapter() {
- @Override
- public void done(IJobChangeEvent event) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- getTaskEditorPage().showEditorBusy(false);
- if (job.getStatus() != null) {
- getTaskEditorPage().getTaskEditor().setStatus(
- "Updating of repository configuration failed", "Update Failed",
- job.getStatus());
- } else {
- getTaskEditorPage().refreshFormContent();
- }
- }
- });
- }
- });
- job.setUser(true);
- job.setPriority(Job.INTERACTIVE);
- job.schedule();
- };
-
-// @Override
-// public void performUpdate(TaskRepository repository, AbstractRepositoryConnector connector,
-// IProgressMonitor monitor) {
-// PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
-// public void run() {
-// getTaskEditorPage().showEditorBusy(true);
-// }
-// });
-// try {
-// super.performUpdate(repository, connector, monitor);
-// AbstractTask task = getTaskEditorPage().getTask();
-// Job job = TasksUi.synchronizeTask(connector, task, true, null);
-// job.join();
-// } catch (InterruptedException e) {
-// // ignore
-// } finally {
-// PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
-// public void run() {
-// getTaskEditorPage().refreshFormContent();
-// }
-// });
-// }
-// }
- };
- repositoryConfigRefresh.setImageDescriptor(TasksUiImages.REPOSITORY_SYNCHRONIZE);
- repositoryConfigRefresh.selectionChanged(new StructuredSelection(getTaskEditorPage().getTaskRepository()));
- repositoryConfigRefresh.setToolTipText("Refresh attributes");
- toolBar.add(repositoryConfigRefresh);
- }
-
- private void initialize() {
- attributeEditors = new ArrayList<AbstractAttributeEditor>();
- hasIncoming = false;
-
- AttributeEditorFactory attributeEditorFactory = getTaskEditorPage().getAttributeEditorFactory();
- TaskAttributeMapper attributeMapper = getTaskData().getAttributeMapper();
- Map<String, TaskAttribute> attributes = getTaskData().getRoot().getAttributes();
- for (TaskAttribute attribute : attributes.values()) {
- TaskAttributeMetaData properties = attribute.getMetaData();
- if (!TaskAttribute.KIND_DEFAULT.equals(properties.getKind())) {
- continue;
- }
-
- AbstractAttributeEditor attributeEditor = createAttributeEditor(attribute);
- if (attributeEditor != null) {
- attributeEditors.add(attributeEditor);
- if (getModel().hasIncomingChanges(attribute)) {
- hasIncoming = true;
- }
- }
- }
-
- Collections.sort(attributeEditors, new Comparator<AbstractAttributeEditor>() {
- public int compare(AbstractAttributeEditor o1, AbstractAttributeEditor o2) {
- int p1 = (o1.getLayoutHint() != null) ? o1.getLayoutHint().getPriority() : LayoutHint.DEFAULT_PRIORITY;
- int p2 = (o2.getLayoutHint() != null) ? o2.getLayoutHint().getPriority() : LayoutHint.DEFAULT_PRIORITY;
- return p1 - p2;
- }
- });
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart.java
deleted file mode 100644
index c3ef8af39..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart.java
+++ /dev/null
@@ -1,335 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.ToolBarManager;
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.tasks.core.TaskComment;
-import org.eclipse.mylyn.tasks.core.IRepositoryPerson;
-import org.eclipse.mylyn.tasks.core.ITaskComment;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractAttributeEditor;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPart;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.MouseAdapter;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.layout.RowLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.forms.IFormColors;
-import org.eclipse.ui.forms.events.ExpansionAdapter;
-import org.eclipse.ui.forms.events.ExpansionEvent;
-import org.eclipse.ui.forms.events.HyperlinkAdapter;
-import org.eclipse.ui.forms.events.HyperlinkEvent;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-import org.eclipse.ui.forms.widgets.ImageHyperlink;
-import org.eclipse.ui.forms.widgets.Section;
-
-/**
- * @author Robert Elves
- * @author Steffen Pingel
- */
-public class TaskEditorCommentPart extends AbstractTaskEditorPart {
-
- private static final String KEY_EDITOR = "viewer";
-
- private static final int DESCRIPTION_WIDTH = 79 * 7; // 500;
-
- private static final String LABEL_REPLY = "Reply";
-
- private Section section;
-
- private List<ExpandableComposite> commentComposites;
-
- private List<TaskAttribute> comments;
-
- private boolean hasIncoming;
-
- public TaskEditorCommentPart() {
- setPartName("Comments");
- }
-
- private void expandComment(FormToolkit toolkit, Composite composite, Composite toolBarComposite,
- final TaskComment taskComment, boolean expanded) {
- toolBarComposite.setVisible(expanded);
- if (expanded && composite.getData(KEY_EDITOR) == null) {
- // create viewer
- TaskAttribute textAttribute = getTaskData().getAttributeMapper().getAssoctiatedAttribute(
- taskComment.getTaskAttribute());
- AbstractAttributeEditor editor = createAttributeEditor(textAttribute);
- if (editor != null) {
- editor.setDecorationEnabled(false);
- editor.createControl(composite, toolkit);
- editor.getControl().addMouseListener(new MouseAdapter() {
- @Override
- public void mouseDown(MouseEvent e) {
- getTaskEditorPage().selectionChanged(taskComment);
- }
- });
- composite.setData(KEY_EDITOR, editor);
-
- GridDataFactory.fillDefaults().hint(DESCRIPTION_WIDTH, SWT.DEFAULT).applyTo(editor.getControl());
-
- getTaskEditorPage().getAttributeEditorToolkit().adapt(editor);
- getTaskEditorPage().reflow();
- }
- } else if (!expanded && composite.getData(KEY_EDITOR) != null) {
- // dispose viewer
- AbstractAttributeEditor editor = (AbstractAttributeEditor) composite.getData(KEY_EDITOR);
- editor.getControl().setMenu(null);
- editor.getControl().dispose();
- composite.setData(KEY_EDITOR, null);
- getTaskEditorPage().reflow();
- }
- getTaskEditorPage().selectionChanged(taskComment);
- }
-
- private void initialize() {
- comments = getTaskData().getAttributeMapper().getAttributesByType(getTaskData(), TaskAttribute.TYPE_COMMENT);
- if (comments.size() > 0) {
- for (TaskAttribute commentAttribute : comments) {
- if (getModel().hasIncomingChanges(commentAttribute)) {
- hasIncoming = true;
- break;
- }
- }
- }
- }
-
- @Override
- public void createControl(Composite parent, final FormToolkit toolkit) {
- initialize();
-
- section = createSection(parent, toolkit, hasIncoming);
- section.setText(section.getText() + " (" + comments.size() + ")");
-
- final Composite composite = toolkit.createComposite(section);
- section.setClient(composite);
- composite.setLayout(new GridLayout(1, false));
- GridDataFactory.fillDefaults().grab(true, false).applyTo(composite);
-
- if (comments.isEmpty()) {
- section.setEnabled(false);
- } else {
- commentComposites = new ArrayList<ExpandableComposite>();
- for (final TaskAttribute commentAttribute : comments) {
- boolean hasIncomingChanges = getModel().hasIncomingChanges(commentAttribute);
- final TaskComment taskComment = new TaskComment(getModel().getTaskRepository(), getModel().getTask(),
- commentAttribute);
- getTaskData().getAttributeMapper().updateTaskComment(taskComment, commentAttribute);
- int style = ExpandableComposite.TREE_NODE | ExpandableComposite.LEFT_TEXT_CLIENT_ALIGNMENT;
- if (hasIncomingChanges) {
- style |= ExpandableComposite.EXPANDED;
- }
- final ExpandableComposite commentComposite = toolkit.createExpandableComposite(composite, style);
- commentComposite.setLayout(new GridLayout());
- commentComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- commentComposite.setTitleBarForeground(toolkit.getColors().getColor(IFormColors.TITLE));
- commentComposites.add(commentComposite);
-
- // always visible
- Composite titleComposite = toolkit.createComposite(commentComposite);
- commentComposite.setTextClient(titleComposite);
- RowLayout rowLayout = new RowLayout();
- rowLayout.pack = true;
- rowLayout.marginLeft = 0;
- rowLayout.marginBottom = 0;
- rowLayout.marginTop = 0;
- titleComposite.setLayout(rowLayout);
- titleComposite.setBackground(null);
-
- ImageHyperlink expandCommentHyperlink = createTitleHyperLink(toolkit, titleComposite, taskComment);
- expandCommentHyperlink.setFont(commentComposite.getFont());
- expandCommentHyperlink.addHyperlinkListener(new HyperlinkAdapter() {
- @Override
- public void linkActivated(HyperlinkEvent e) {
- EditorUtil.toggleExpandableComposite(!commentComposite.isExpanded(), commentComposite);
- }
- });
-
- // only visible when section is expanded
- final Composite buttonComposite = toolkit.createComposite(titleComposite);
- RowLayout buttonCompLayout = new RowLayout();
- buttonCompLayout.marginBottom = 0;
- buttonCompLayout.marginTop = 0;
- buttonComposite.setLayout(buttonCompLayout);
- buttonComposite.setBackground(null);
- buttonComposite.setVisible(commentComposite.isExpanded());
-
- createReplyHyperlink(buttonComposite, toolkit, taskComment);
-
- final Composite commentTextComposite = toolkit.createComposite(commentComposite);
- commentComposite.setClient(commentTextComposite);
- GridLayout ecLayout = new GridLayout();
- ecLayout.marginHeight = 0;
- ecLayout.marginBottom = 3;
- ecLayout.marginLeft = 15;
- commentTextComposite.setLayout(ecLayout);
- commentTextComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- // TODO code for outline
- //getTaskEditorPage().addSelectableControl(taskComment, expandableComposite);
- commentComposite.addExpansionListener(new ExpansionAdapter() {
- @Override
- public void expansionStateChanged(ExpansionEvent event) {
- expandComment(toolkit, commentTextComposite, buttonComposite, taskComment, event.getState());
- }
- });
-
- if (hasIncomingChanges) {
- commentComposite.setBackground(getTaskEditorPage().getAttributeEditorToolkit().getColorIncoming());
- expandComment(toolkit, commentTextComposite, buttonComposite, taskComment, true);
- }
-
- // for outline
- EditorUtil.setMarker(commentComposite, commentAttribute.getId());
- }
- }
- setSection(toolkit, section);
- }
-
- private ImageHyperlink createTitleHyperLink(final FormToolkit toolkit, final Composite toolbarComp,
- final ITaskComment taskComment) {
- ImageHyperlink formHyperlink = toolkit.createImageHyperlink(toolbarComp, SWT.NONE);
- formHyperlink.setBackground(null);
- formHyperlink.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
- IRepositoryPerson author = taskComment.getAuthor();
- if (author != null
- && author.getPersonId().equalsIgnoreCase(getTaskEditorPage().getTaskRepository().getUserName())) {
- formHyperlink.setImage(CommonImages.getImage(CommonImages.PERSON_ME_NARROW));
- } else {
- formHyperlink.setImage(CommonImages.getImage(CommonImages.PERSON_NARROW));
- }
- StringBuilder sb = new StringBuilder();
- if (taskComment.getNumber() >= 0) {
- sb.append(taskComment.getNumber());
- sb.append(": ");
- }
- if (author != null) {
- if (author.getName() != null) {
- sb.append(author.getName());
- formHyperlink.setToolTipText(author.getPersonId());
- } else {
- sb.append(author.getPersonId());
- }
- }
- if (taskComment.getCreationDate() != null) {
- sb.append(", ");
- sb.append(EditorUtil.formatDateTime(taskComment.getCreationDate()));
- }
- formHyperlink.setText(sb.toString());
- formHyperlink.setEnabled(true);
- formHyperlink.setUnderlined(false);
- return formHyperlink;
- }
-
- private ImageHyperlink createReplyHyperlink(Composite composite, FormToolkit toolkit, final ITaskComment taskComment) {
- final ImageHyperlink replyLink = new ImageHyperlink(composite, SWT.NULL);
- toolkit.adapt(replyLink, true, false);
- replyLink.setImage(CommonImages.getImage(TasksUiImages.COMMENT_REPLY));
- replyLink.setToolTipText(LABEL_REPLY);
- // no need for the background - transparency will take care of it
- replyLink.setBackground(null);
- // replyLink.setBackground(section.getTitleBarGradientBackground());
- replyLink.addHyperlinkListener(new HyperlinkAdapter() {
- @Override
- public void linkActivated(HyperlinkEvent e) {
- AbstractReplyToCommentAction.reply(getTaskEditorPage(), taskComment, taskComment.getText());
- }
-
- @Override
- public void linkEntered(HyperlinkEvent e) {
- replyLink.setUnderlined(true);
- }
-
- @Override
- public void linkExited(HyperlinkEvent e) {
- replyLink.setUnderlined(false);
- }
-
- });
-
- return replyLink;
- }
-
- @Override
- protected void fillToolBar(ToolBarManager barManager) {
- if (comments.isEmpty()) {
- return;
- }
-
- Action collapseAllAction = new Action("") {
- @Override
- public void run() {
- hideAllComments();
- }
- };
- collapseAllAction.setImageDescriptor(CommonImages.COLLAPSE_ALL);
- collapseAllAction.setToolTipText("Collapse All Comments");
- barManager.add(collapseAllAction);
-
- Action expandAllAction = new Action("") {
- @Override
- public void run() {
- expandAllComments();
- }
- };
- expandAllAction.setImageDescriptor(CommonImages.EXPAND_ALL);
- expandAllAction.setToolTipText("Expand All Comments");
- barManager.add(expandAllAction);
- }
-
- private void hideAllComments() {
- try {
- getTaskEditorPage().setReflow(false);
-
- for (ExpandableComposite composite : commentComposites) {
- if (composite.isDisposed()) {
- continue;
- }
-
- if (composite.isExpanded()) {
- EditorUtil.toggleExpandableComposite(false, composite);
- }
- }
- } finally {
- getTaskEditorPage().setReflow(true);
- }
- getTaskEditorPage().reflow();
- }
-
- private void expandAllComments() {
- try {
- getTaskEditorPage().setReflow(false);
-
- if (section != null) {
- section.setExpanded(true);
- }
- for (ExpandableComposite composite : commentComposites) {
- if (composite.isDisposed()) {
- continue;
- }
- if (!composite.isExpanded()) {
- EditorUtil.toggleExpandableComposite(true, composite);
- }
- }
- } finally {
- getTaskEditorPage().setReflow(true);
- }
- getTaskEditorPage().reflow();
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorDescriptionPart.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorDescriptionPart.java
deleted file mode 100644
index d543c805c..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorDescriptionPart.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.action.ToolBarManager;
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.search.SearchHitCollector;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.core.AbstractDuplicateDetector;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPage;
-import org.eclipse.search.ui.NewSearchUI;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CCombo;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-import org.eclipse.ui.forms.widgets.Section;
-
-/**
- * @author Steffen Pingel
- */
-public class TaskEditorDescriptionPart extends TaskEditorRichTextPart {
-
- private static final String LABEL_SEARCH_DUPS = "Search";
-
- private static final String LABEL_SELECT_DETECTOR = "Duplicate Detection";
-
- public TaskEditorDescriptionPart() {
- setPartName("Description");
- }
-
- private void addDuplicateDetection(Composite composite, FormToolkit toolkit) {
- List<AbstractDuplicateDetector> allCollectors = new ArrayList<AbstractDuplicateDetector>();
- if (getDuplicateSearchCollectorsList() != null) {
- allCollectors.addAll(getDuplicateSearchCollectorsList());
- }
- if (!allCollectors.isEmpty()) {
- int style = ExpandableComposite.TWISTIE | ExpandableComposite.SHORT_TITLE_BAR;
- if (getTaskData().isNew()) {
- style |= ExpandableComposite.EXPANDED;
- }
- Section duplicatesSection = toolkit.createSection(composite, style);
- duplicatesSection.setText(LABEL_SELECT_DETECTOR);
- duplicatesSection.setLayout(new GridLayout());
- GridDataFactory.fillDefaults().indent(SWT.DEFAULT, 15).applyTo(duplicatesSection);
- Composite relatedBugsComposite = toolkit.createComposite(duplicatesSection);
- relatedBugsComposite.setLayout(new GridLayout(4, false));
- relatedBugsComposite.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
- duplicatesSection.setClient(relatedBugsComposite);
- Label duplicateDetectorLabel = new Label(relatedBugsComposite, SWT.LEFT);
- duplicateDetectorLabel.setText("Detector:");
-
- final CCombo duplicateDetectorChooser = new CCombo(relatedBugsComposite, SWT.FLAT | SWT.READ_ONLY);
- toolkit.adapt(duplicateDetectorChooser, true, false);
- duplicateDetectorChooser.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
- duplicateDetectorChooser.setFont(TEXT_FONT);
- duplicateDetectorChooser.setLayoutData(GridDataFactory.swtDefaults().hint(150, SWT.DEFAULT).create());
-
- Collections.sort(allCollectors, new Comparator<AbstractDuplicateDetector>() {
-
- public int compare(AbstractDuplicateDetector c1, AbstractDuplicateDetector c2) {
- return c1.getName().compareToIgnoreCase(c2.getName());
- }
-
- });
-
- for (AbstractDuplicateDetector detector : allCollectors) {
- duplicateDetectorChooser.add(detector.getName());
- }
-
- duplicateDetectorChooser.select(0);
- duplicateDetectorChooser.setEnabled(true);
- duplicateDetectorChooser.setData(allCollectors);
-
- if (allCollectors.size() > 0) {
- Button searchForDuplicates = toolkit.createButton(relatedBugsComposite, LABEL_SEARCH_DUPS, SWT.NONE);
- GridData searchDuplicatesButtonData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- searchForDuplicates.setLayoutData(searchDuplicatesButtonData);
- searchForDuplicates.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- String selectedDetector = duplicateDetectorChooser.getItem(duplicateDetectorChooser.getSelectionIndex());
- searchForDuplicates(selectedDetector);
- }
- });
- }
-
- toolkit.paintBordersFor(relatedBugsComposite);
- }
- }
-
- @Override
- public void createControl(Composite parent, FormToolkit toolkit) {
- if (getAttribute() == null) {
- return;
- }
-
- super.createControl(parent, toolkit);
- addDuplicateDetection(getComposite(), toolkit);
- }
-
- @Override
- protected void fillToolBar(ToolBarManager toolBar) {
- AbstractReplyToCommentAction replyAction = new AbstractReplyToCommentAction(getTaskEditorPage(), null) {
- @Override
- protected String getReplyText() {
- return getEditor().getValue();
- }
- };
- toolBar.add(replyAction);
- }
-
- protected IRepositoryQuery getDuplicateQuery(String name) throws CoreException {
- String duplicateDetectorName = name.equals("default") ? "Stack Trace" : name;
- for (AbstractDuplicateDetector detector : getDuplicateSearchCollectorsList()) {
- if (detector.getName().equals(duplicateDetectorName)) {
- return detector.getDuplicatesQuery(getTaskEditorPage().getTaskRepository(), getTaskData());
- }
- }
- return null;
- }
-
- protected Set<AbstractDuplicateDetector> getDuplicateSearchCollectorsList() {
- Set<AbstractDuplicateDetector> duplicateDetectors = new HashSet<AbstractDuplicateDetector>();
- for (AbstractDuplicateDetector detector : TasksUiPlugin.getDefault().getDuplicateSearchCollectorsList()) {
- if (isValidDuplicateDetector(detector)) {
- duplicateDetectors.add(detector);
- }
- }
- return duplicateDetectors;
- }
-
- @Override
- public void initialize(AbstractTaskEditorPage taskEditorPage) {
- super.initialize(taskEditorPage);
- setAttribute(getModel().getTaskData().getRoot().getMappedAttribute(TaskAttribute.DESCRIPTION));
- }
-
- @SuppressWarnings( { "deprecation", "restriction" })
- private boolean isValidDuplicateDetector(AbstractDuplicateDetector detector) {
- return !(detector instanceof org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractLegacyDuplicateDetector) //
- && (detector.getConnectorKind() == null || detector.getConnectorKind().equals(
- getTaskEditorPage().getConnectorKind())) //
- && detector.canQuery(getTaskData());
- }
-
- public void searchForDuplicates(String duplicateDetectorName) {
- try {
- IRepositoryQuery duplicatesQuery = getDuplicateQuery(duplicateDetectorName);
- if (duplicatesQuery != null) {
- SearchHitCollector collector = new SearchHitCollector(TasksUiInternal.getTaskList(),
- getTaskEditorPage().getTaskRepository(), duplicatesQuery);
- NewSearchUI.runQueryInBackground(collector);
- } else {
- TasksUiInternal.displayStatus("Duplicate Detection Failed", new Status(IStatus.ERROR,
- TasksUiPlugin.ID_PLUGIN, "The duplicate detector did not return a valid query."));
- }
- } catch (CoreException e) {
- TasksUiInternal.displayStatus("Duplicate Detection Failed", e.getStatus());
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorInputFactory.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorInputFactory.java
deleted file mode 100644
index 40e8601b8..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorInputFactory.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditorInput;
-import org.eclipse.ui.IElementFactory;
-import org.eclipse.ui.IMemento;
-
-/**
- * @author Rob Elves
- */
-public class TaskEditorInputFactory implements IElementFactory {
-
- public static final String TAG_TASK_HANDLE = "taskHandle";
-
- public static final String ID_FACTORY = "org.eclipse.mylyn.tasks.ui.elementFactories.task.editor";
-
- public IAdaptable createElement(IMemento memento) {
- String handle = memento.getString(TAG_TASK_HANDLE);
- AbstractTask task = TasksUiPlugin.getTaskList().getTask(handle);
- if (task != null) {
- TaskRepository taskRepository = TasksUi.getRepositoryManager().getRepository(task.getConnectorKind(),
- task.getRepositoryUrl());
- if (taskRepository != null) {
- return new TaskEditorInput(taskRepository, task);
- } else {
- StatusHandler.log(new Status(IStatus.WARNING, TasksUiPlugin.ID_PLUGIN, "Repository for connector kind "
- + task.getConnectorKind() + " with url " + task.getRepositoryUrl() + " cannont be found."));
- }
- } else {
- StatusHandler.log(new Status(IStatus.WARNING, TasksUiPlugin.ID_PLUGIN, "Task with handle \"" + handle
- + "\" could not be found in task list."));
- }
- return null;
- }
-
- public static void saveState(IMemento memento, TaskEditorInput input) {
- if (input.getTask() != null) {
- memento.putString(TAG_TASK_HANDLE, input.getTask().getHandleIdentifier());
- }
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorNewCommentPart.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorNewCommentPart.java
deleted file mode 100644
index 868b2c7bd..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorNewCommentPart.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPage;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
-
-/**
- * @author Steffen Pingel
- */
-public class TaskEditorNewCommentPart extends TaskEditorRichTextPart {
-
- public TaskEditorNewCommentPart() {
- setPartName("New Comment");
- setSectionStyle(ExpandableComposite.TITLE_BAR | ExpandableComposite.EXPANDED);
- setExpandVertically(true);
- }
-
- @Override
- public void initialize(AbstractTaskEditorPage taskEditorPage) {
- super.initialize(taskEditorPage);
- setAttribute(getModel().getTaskData().getRoot().getMappedAttribute(TaskAttribute.COMMENT_NEW));
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorOutlineNode.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorOutlineNode.java
deleted file mode 100644
index 675f6df03..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorOutlineNode.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-import org.eclipse.jface.util.Assert;
-import org.eclipse.mylyn.tasks.core.IRepositoryPerson;
-import org.eclipse.mylyn.tasks.core.ITaskComment;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.mylyn.tasks.core.data.TaskData;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-
-/**
- * A node for the tree in {@link TaskEditorOutlinePage}.
- *
- * @author Steffen Pingel
- */
-public class TaskEditorOutlineNode {
-
- public static final String LABEL_COMMENTS = "Comments";
-
- public static final String LABEL_DESCRIPTION = "Description";
-
- public static final String LABEL_NEW_COMMENT = "New Comment";
-
- private static TaskEditorOutlineNode createNode(TaskData taskData, String attributeId, String label) {
- TaskAttribute taskAttribute = taskData.getRoot().getMappedAttribute(attributeId);
- if (taskAttribute != null) {
- if (label == null) {
- label = taskAttribute.getValue();
- }
- return new TaskEditorOutlineNode(label, taskAttribute);
- }
- return null;
- }
-
- private static TaskEditorOutlineNode createNode(TaskAttribute taskAttribute) {
- String type = taskAttribute.getMetaData().getType();
- if (TaskAttribute.TYPE_COMMENT.equals(type)) {
- ITaskComment taskComment = TasksUi.getRepositoryModel().createTaskComment(taskAttribute);
- taskAttribute.getTaskData().getAttributeMapper().updateTaskComment(taskComment, taskAttribute);
- StringBuilder sb = new StringBuilder();
- sb.append(taskComment.getNumber());
- sb.append(": ");
- IRepositoryPerson author = taskComment.getAuthor();
- if (author != null) {
- sb.append(author.toString());
- }
- Date creationDate = taskComment.getCreationDate();
- if (creationDate != null) {
- sb.append(" (");
- sb.append(EditorUtil.formatDateTime(creationDate));
- sb.append(")");
- }
- TaskEditorOutlineNode node = new TaskEditorOutlineNode(sb.toString(), taskAttribute);
- node.setTaskComment(taskComment);
- return node;
- } else {
- String label = taskAttribute.getTaskData().getAttributeMapper().getValueLabel(taskAttribute);
- return new TaskEditorOutlineNode(label, taskAttribute);
- }
- }
-
- public static TaskEditorOutlineNode parse(TaskData taskData) {
- TaskEditorOutlineNode rootNode = createNode(taskData, TaskAttribute.SUMMARY, null);
- if (rootNode == null) {
- rootNode = new TaskEditorOutlineNode("Task " + taskData.getTaskId());
- }
- addNode(rootNode, taskData, TaskAttribute.DESCRIPTION, LABEL_DESCRIPTION);
- List<TaskAttribute> comments = taskData.getAttributeMapper().getAttributesByType(taskData,
- TaskAttribute.TYPE_COMMENT);
- if (comments.size() > 0) {
- TaskEditorOutlineNode commentsNode = new TaskEditorOutlineNode(LABEL_COMMENTS);
- rootNode.addChild(commentsNode);
- for (TaskAttribute commentAttribute : comments) {
- commentsNode.addChild(createNode(commentAttribute));
- }
- }
- addNode(rootNode, taskData, TaskAttribute.COMMENT_NEW, LABEL_NEW_COMMENT);
- return rootNode;
- }
-
- private static TaskEditorOutlineNode addNode(TaskEditorOutlineNode parentNode, TaskData taskData,
- String attributeId, String label) {
- TaskEditorOutlineNode node = createNode(taskData, attributeId, label);
- if (node != null) {
- parentNode.addChild(node);
- }
- return node;
- }
-
- private List<TaskEditorOutlineNode> children;
-
- private final String label;
-
- /** The parent of this node or null if it is the bug report */
- private TaskEditorOutlineNode parent;
-
- private final TaskAttribute taskAttribute;
-
- private ITaskComment taskComment;
-
- public TaskEditorOutlineNode(String label) {
- this(label, null);
- }
-
- public TaskEditorOutlineNode(String label, TaskAttribute taskAttribute) {
- this.label = label;
- this.taskAttribute = taskAttribute;
- }
-
- public void addChild(TaskEditorOutlineNode node) {
- Assert.isNotNull(node);
- if (children == null) {
- children = new ArrayList<TaskEditorOutlineNode>();
- }
- node.parent = this;
- children.add(node);
- }
-
- /**
- * @return <code>true</code> if the given object is another node representing the same piece of data in the editor.
- */
- @Override
- public boolean equals(Object o) {
- if (o instanceof TaskEditorOutlineNode) {
- TaskEditorOutlineNode node = (TaskEditorOutlineNode) o;
- return getLabel().equals(node.getLabel());
- }
- return false;
- }
-
- public TaskEditorOutlineNode[] getChildren() {
- return (children == null) ? new TaskEditorOutlineNode[0]
- : children.toArray(new TaskEditorOutlineNode[children.size()]);
- }
-
- public ITaskComment getTaskComment() {
- return taskComment;
- }
-
- public void setTaskComment(ITaskComment taskComment) {
- this.taskComment = taskComment;
- }
-
- public TaskAttribute getData() {
- return taskAttribute;
- }
-
- public String getLabel() {
- return label;
- }
-
- public TaskEditorOutlineNode getParent() {
- return parent;
- }
-
- @Override
- public int hashCode() {
- return getLabel().hashCode();
- }
-
- @Override
- public String toString() {
- return getLabel();
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorOutlinePage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorOutlinePage.java
deleted file mode 100644
index a69edc3c3..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorOutlinePage.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.tasks.core.IRepositoryPerson;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.views.contentoutline.ContentOutlinePage;
-
-/**
- * An outline page for a {@link TaskEditor}.
- *
- * @author Steffen Pingel
- */
-public class TaskEditorOutlinePage extends ContentOutlinePage {
-
- private static class TaskEditorOutlineContentProvider implements ITreeContentProvider {
-
- public void dispose() {
- // ignore
- }
-
- public Object[] getChildren(Object parentElement) {
- if (parentElement instanceof TaskEditorOutlineNode) {
- Object[] children = ((TaskEditorOutlineNode) parentElement).getChildren();
- return children;
- }
- return new Object[0];
- }
-
- public Object[] getElements(Object inputElement) {
- if (inputElement instanceof TaskEditorOutlineModel) {
- return new Object[] { ((TaskEditorOutlineModel) inputElement).getRoot() };
- }
- return new Object[0];
- }
-
- public Object getParent(Object element) {
- if (element instanceof TaskEditorOutlineNode) {
- return ((TaskEditorOutlineNode) element).getParent();
- }
- return null;
- }
-
- public boolean hasChildren(Object element) {
- if (element instanceof TaskEditorOutlineNode) {
- return ((TaskEditorOutlineNode) element).getChildren().length > 0;
- }
- return false;
- }
-
- public void inputChanged(Viewer viewerChanged, Object oldInput, Object newInput) {
- // ignore
- }
-
- }
-
- private static class TaskEditorOutlineModel {
-
- private final TaskEditorOutlineNode root;
-
- public TaskEditorOutlineModel(TaskEditorOutlineNode root) {
- this.root = root;
- }
-
- public TaskEditorOutlineNode getRoot() {
- return root;
- }
-
- }
-
- private TaskEditorOutlineModel model;
-
- private TaskRepository taskRepository;
-
- private TreeViewer viewer;
-
- public TaskEditorOutlinePage() {
- }
-
- public void setInput(TaskRepository taskRepository, TaskEditorOutlineNode rootNode) {
- this.taskRepository = taskRepository;
- if (rootNode != null) {
- this.model = new TaskEditorOutlineModel(rootNode);
- } else {
- this.model = null;
- }
- if (viewer != null) {
- viewer.setInput(this.model);
- viewer.refresh(true);
- }
- }
-
- @Override
- public void createControl(Composite parent) {
- super.createControl(parent);
- viewer = getTreeViewer();
- viewer.setContentProvider(new TaskEditorOutlineContentProvider());
- viewer.setLabelProvider(new LabelProvider() {
- @Override
- public Image getImage(Object element) {
- if (element instanceof TaskEditorOutlineNode) {
- TaskEditorOutlineNode node = (TaskEditorOutlineNode) element;
- if (TaskEditorOutlineNode.LABEL_COMMENTS.equals(node.getLabel())
- || TaskEditorOutlineNode.LABEL_NEW_COMMENT.equals(node.getLabel())) {
- return CommonImages.getImage(TasksUiImages.COMMENT);
- }
- if (TaskEditorOutlineNode.LABEL_DESCRIPTION.equals(node.getLabel())) {
- return CommonImages.getImage(TasksUiImages.TASK_NOTES);
- } else if (node.getTaskComment() != null) {
- IRepositoryPerson author = node.getTaskComment().getAuthor();
- if (taskRepository != null && author != null
- && author.getPersonId().equals(taskRepository.getUserName())) {
- return CommonImages.getImage(CommonImages.PERSON_ME);
- } else {
- return CommonImages.getImage(CommonImages.PERSON);
- }
- } else {
- return CommonImages.getImage(TasksUiImages.TASK);
- }
- } else {
- return super.getImage(element);
- }
- }
-
- @Override
- public String getText(Object element) {
- if (element instanceof TaskEditorOutlineNode) {
- TaskEditorOutlineNode node = (TaskEditorOutlineNode) element;
- return node.getLabel();
- }
- return super.getText(element);
- }
- });
- viewer.setInput(model);
- viewer.expandAll();
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorPeoplePart.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorPeoplePart.java
deleted file mode 100644
index 996946712..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorPeoplePart.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractAttributeEditor;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPart;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-import org.eclipse.ui.forms.widgets.Section;
-
-/**
- * @author Steffen Pingel
- */
-public class TaskEditorPeoplePart extends AbstractTaskEditorPart {
-
- private static final int COLUMN_MARGIN = 5;
-
- public TaskEditorPeoplePart() {
- setPartName("People");
- }
-
- private void addAttribute(Composite composite, FormToolkit toolkit, TaskAttribute attribute) {
- AbstractAttributeEditor editor = createAttributeEditor(attribute);
- if (editor != null) {
- editor.createLabelControl(composite, toolkit);
- GridDataFactory.defaultsFor(editor.getLabelControl()).indent(COLUMN_MARGIN, 0).applyTo(
- editor.getLabelControl());
- editor.createControl(composite, toolkit);
- getTaskEditorPage().getAttributeEditorToolkit().adapt(editor);
- GridDataFactory.fillDefaults().grab(true, false).align(SWT.FILL, SWT.TOP).applyTo(editor.getControl());
- }
- }
-
- @Override
- public void createControl(Composite parent, FormToolkit toolkit) {
- Section section = createSection(parent, toolkit, true);
-
- Composite peopleComposite = toolkit.createComposite(section);
- GridLayout layout = new GridLayout(2, false);
- layout.marginWidth = 5;
- peopleComposite.setLayout(layout);
-
- addAttribute(peopleComposite, toolkit, getTaskData().getRoot().getMappedAttribute(TaskAttribute.USER_ASSIGNED));
- addAttribute(peopleComposite, toolkit, getTaskData().getRoot().getMappedAttribute(TaskAttribute.USER_REPORTER));
- addAttribute(peopleComposite, toolkit, getTaskData().getRoot().getMappedAttribute(TaskAttribute.ADD_SELF_CC));
- addAttribute(peopleComposite, toolkit, getTaskData().getRoot().getMappedAttribute(TaskAttribute.USER_CC));
-
- toolkit.paintBordersFor(peopleComposite);
- section.setClient(peopleComposite);
- setSection(toolkit, section);
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorPlanningPart.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorPlanningPart.java
deleted file mode 100644
index dcd223218..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorPlanningPart.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.DateRange;
-import org.eclipse.mylyn.internal.tasks.ui.ScheduleDatePicker;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPart;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Spinner;
-import org.eclipse.ui.forms.events.HyperlinkAdapter;
-import org.eclipse.ui.forms.events.HyperlinkEvent;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-import org.eclipse.ui.forms.widgets.ImageHyperlink;
-import org.eclipse.ui.forms.widgets.Section;
-
-/**
- * @author Steffen Pingel
- */
-public class TaskEditorPlanningPart extends AbstractTaskEditorPart {
-
- private static final int DEFAULT_ESTIMATED_TIME = 1;
-
- private ScheduleDatePicker scheduledForDate;
-
- private Spinner estimatedTime;
-
- public TaskEditorPlanningPart() {
- setPartName("Personal Planning");
- }
-
- @Override
- public void commit(boolean onSave) {
- AbstractTask task = (AbstractTask) getTaskEditorPage().getTask();
- Assert.isNotNull(task);
-
- DateRange selectedDate = null;
- if (scheduledForDate != null) {
- selectedDate = scheduledForDate.getScheduledDate();
- }
- if (selectedDate != null) {
- TasksUiPlugin.getTaskActivityManager().setScheduledFor(task, selectedDate);
- }
-
- if (estimatedTime != null) {
- task.setEstimatedTimeHours(estimatedTime.getSelection());
- }
-
- super.commit(onSave);
- }
-
- @Override
- public void createControl(Composite parent, FormToolkit toolkit) {
- Section section = createSection(parent, toolkit, true);
-
- Composite sectionClient = getManagedForm().getToolkit().createComposite(section);
- GridLayout layout = new GridLayout();
- layout.numColumns = 7;
- layout.makeColumnsEqualWidth = false;
- sectionClient.setLayout(layout);
- GridData clientDataLayout = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- sectionClient.setLayoutData(clientDataLayout);
-
- // Reminder
-// getManagedForm().getToolkit().createLabel(sectionClient, "Scheduled for:");
-// // label.setForeground(toolkit.getColors().getColor(FormColors.TITLE));
-// scheduledForDate = new ScheduleDatePicker(sectionClient, SWT.FLAT, DatePicker.LABEL_CHOOSE, true,
-// TasksUiPlugin.getDefault().getPreferenceStore().getInt(TasksUiPreferenceConstants.PLANNING_ENDHOUR));
-// scheduledForDate.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
-// scheduledForDate.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
-// Calendar newTaskSchedule = Calendar.getInstance();
-// int scheduledEndHour = TasksUiPlugin.getDefault().getPreferenceStore().getInt(
-// TasksUiPreferenceConstants.PLANNING_ENDHOUR);
-// // If past scheduledEndHour set for following day
-// if (newTaskSchedule.get(Calendar.HOUR_OF_DAY) >= scheduledEndHour) {
-// TaskActivityUtil.snapForwardNumDays(newTaskSchedule, 1);
-// } else {
-// TaskActivityUtil.snapEndOfWorkDay(newTaskSchedule);
-// }
-// scheduledForDate.setDate(newTaskSchedule);
-//// Button removeReminder = getManagedForm().getToolkit().createButton(sectionClient, "Clear",
-//// SWT.PUSH | SWT.CENTER);
-//// removeReminder.addSelectionListener(new SelectionAdapter() {
-//// @Override
-//// public void widgetSelected(SelectionEvent e) {
-//// scheduledForDate.setDate(null);
-//// }
-//// });
-//
-// ImageHyperlink clearReminder = getManagedForm().getToolkit().createImageHyperlink(sectionClient, SWT.NONE);
-// clearReminder.setImage(CommonImages.getImage(CommonImages.REMOVE));
-// clearReminder.setToolTipText("Clear");
-// clearReminder.addHyperlinkListener(new HyperlinkAdapter() {
-// @Override
-// public void linkActivated(HyperlinkEvent e) {
-// scheduledForDate.setDate(null);
-// }
-// });
-
- ///NEW
-// ITask task = getTaskEditorPage().getTask();
-// scheduledForDate = new ScheduleDatePicker(sectionClient, task, SWT.FLAT);
-// scheduledForDate.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
-// toolkit.adapt(scheduledForDate, true, true);
-// toolkit.paintBordersFor(sectionClient);
-//
-// scheduledForDate.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
-// scheduledForDate.addPickerSelectionListener(new SelectionListener() {
-// public void widgetSelected(SelectionEvent arg0) {
-// getTaskEditorPage().getModel().attributeChanged(attribute);
-// }
-//
-// public void widgetDefaultSelected(SelectionEvent arg0) {
-// // ignore
-// }
-// });
-//
-// ImageHyperlink clearScheduledDate = toolkit.createImageHyperlink(sectionClient, SWT.NONE);
-// clearScheduledDate.setImage(CommonImages.getImage(CommonImages.REMOVE));
-// clearScheduledDate.setToolTipText(CLEAR);
-// clearScheduledDate.addHyperlinkListener(new HyperlinkAdapter() {
-//
-// @Override
-// public void linkActivated(HyperlinkEvent e) {
-// scheduledForDate.setScheduledDate(null);
-// ((AbstractTask) task).setReminded(false);
-// TaskPlanningEditor.this.markDirty(true);
-// }
-// });
-
- // 1 Blank column after Reminder clear button
- Label dummy = getManagedForm().getToolkit().createLabel(sectionClient, "");
- GridData dummyLabelDataLayout = new GridData(GridData.HORIZONTAL_ALIGN_CENTER);
- dummyLabelDataLayout.horizontalSpan = 1;
- dummyLabelDataLayout.widthHint = 30;
- dummy.setLayoutData(dummyLabelDataLayout);
-
- // Estimated time
- getManagedForm().getToolkit().createLabel(sectionClient, "Estimated hours:");
- // label.setForeground(toolkit.getColors().getColor(FormColors.TITLE));
- // estimatedTime = new Spinner(sectionClient, SWT.FLAT);
- estimatedTime = new Spinner(sectionClient, SWT.FLAT);
- estimatedTime.setDigits(0);
- estimatedTime.setMaximum(100);
- estimatedTime.setMinimum(0);
- estimatedTime.setIncrement(1);
- estimatedTime.setSelection(DEFAULT_ESTIMATED_TIME);
- estimatedTime.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
- GridData estimatedDataLayout = new GridData();
- estimatedDataLayout.widthHint = 30;
- estimatedTime.setLayoutData(estimatedDataLayout);
- // getManagedForm().getToolkit().createLabel(sectionClient, "hours ");
- // label.setForeground(toolkit.getColors().getColor(FormColors.TITLE));
-
- ImageHyperlink clearEstimated = getManagedForm().getToolkit().createImageHyperlink(sectionClient, SWT.NONE);
- clearEstimated.setImage(CommonImages.getImage(CommonImages.REMOVE));
- clearEstimated.setToolTipText("Clear");
- clearEstimated.addHyperlinkListener(new HyperlinkAdapter() {
- @Override
- public void linkActivated(HyperlinkEvent e) {
- estimatedTime.setSelection(0);
- }
- });
-
- getManagedForm().getToolkit().paintBordersFor(sectionClient);
- section.setClient(sectionClient);
- setSection(toolkit, section);
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorRichTextPart.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorRichTextPart.java
deleted file mode 100644
index b4448c0b7..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorRichTextPart.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractAttributeEditor;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractRenderingEngine;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPart;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-import org.eclipse.ui.forms.widgets.Section;
-import org.eclipse.ui.internal.EditorAreaHelper;
-import org.eclipse.ui.internal.WorkbenchPage;
-
-/**
- * @author Steffen Pingel
- */
-public class TaskEditorRichTextPart extends AbstractTaskEditorPart {
-
- private RichTextAttributeEditor editor;
-
- private TaskAttribute attribute;
-
- private Composite composite;
-
- private int sectionStyle;
-
- public TaskEditorRichTextPart() {
- setSectionStyle(ExpandableComposite.TITLE_BAR | ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
- }
-
- public void appendText(String text) {
- if (editor == null) {
- return;
- }
-
- StringBuilder strBuilder = new StringBuilder();
- String oldText = editor.getViewer().getDocument().get();
- if (strBuilder.length() != 0) {
- strBuilder.append("\n");
- }
- strBuilder.append(oldText);
- strBuilder.append(text);
- editor.getViewer().getDocument().set(strBuilder.toString());
- TaskAttribute attribute = getTaskData().getRoot().getMappedAttribute(TaskAttribute.COMMENT_NEW);
- if (attribute != null) {
- attribute.setValue(strBuilder.toString());
- getTaskEditorPage().getModel().attributeChanged(attribute);
- }
- editor.getViewer().getTextWidget().setCaretOffset(strBuilder.length());
- }
-
- public int getSectionStyle() {
- return sectionStyle;
- }
-
- public void setSectionStyle(int sectionStyle) {
- this.sectionStyle = sectionStyle;
- }
-
- @Override
- public void createControl(Composite parent, FormToolkit toolkit) {
- if (attribute == null) {
- return;
- }
- AbstractAttributeEditor attributEditor = createAttributeEditor(attribute);
- if (!(attributEditor instanceof RichTextAttributeEditor)) {
- return;
- }
-
- Section section = createSection(parent, toolkit, sectionStyle);
-
- composite = toolkit.createComposite(section);
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- composite.setLayout(layout);
-
- editor = (RichTextAttributeEditor) attributEditor;
-
- AbstractRenderingEngine renderingEngine = getTaskEditorPage().getAttributeEditorToolkit().getRenderingEngine(
- attribute);
- if (renderingEngine != null) {
- PreviewAttributeEditor previewEditor = new PreviewAttributeEditor(getModel(), attribute,
- getTaskEditorPage().getTaskRepository(), renderingEngine, editor);
- previewEditor.createControl(composite, toolkit);
- GridDataFactory.fillDefaults().grab(true, true).align(SWT.FILL, SWT.FILL).applyTo(
- previewEditor.getControl());
- } else {
- editor.createControl(composite, toolkit);
- if (editor.isReadOnly()) {
- GridDataFactory.fillDefaults().hint(AbstractAttributeEditor.MAXIMUM_WIDTH, SWT.DEFAULT).applyTo(
- editor.getControl());
- } else {
- final GridData gd = new GridData();
- // wrap text at this margin, see comment below
- int width = getEditorWidth();
- // the goal is to make the text viewer as big as the text so it does not require scrolling when first drawn
- // on screen
- Point size = editor.getViewer().getTextWidget().computeSize(width, SWT.DEFAULT, true);
- gd.widthHint = AbstractAttributeEditor.MAXIMUM_WIDTH;
- gd.horizontalAlignment = SWT.FILL;
- gd.grabExcessHorizontalSpace = true;
- // limit height to be avoid dynamic resizing of the text widget:
- // MAXIMUM_HEIGHT < height < MAXIMUM_HEIGHT * 4
- //gd.minimumHeight = AbstractAttributeEditor.MAXIMUM_HEIGHT;
- gd.heightHint = Math.min(Math.max(AbstractAttributeEditor.MAXIMUM_HEIGHT, size.y),
- AbstractAttributeEditor.MAXIMUM_HEIGHT * 4);
- if (getExpandVertically()) {
- gd.verticalAlignment = SWT.FILL;
- gd.grabExcessVerticalSpace = true;
- }
- editor.getControl().setLayoutData(gd);
- editor.getControl().setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
- // shrink the text control if the editor width is reduced, otherwise the text field will always keep it's original
- // width and will cause the editor to have a horizonal scroll bar
-// composite.addControlListener(new ControlAdapter() {
-// @Override
-// public void controlResized(ControlEvent e) {
-// int width = sectionComposite.getSize().x;
-// Point size = descriptionTextViewer.getTextWidget().computeSize(width, SWT.DEFAULT, true);
-// // limit width to parent widget
-// gd.widthHint = width;
-// // limit height to avoid dynamic resizing of the text widget
-// gd.heightHint = Math.min(Math.max(DESCRIPTION_HEIGHT, size.y), DESCRIPTION_HEIGHT * 4);
-// sectionComposite.layout();
-// }
-// });
- }
- }
-
- getTaskEditorPage().getAttributeEditorToolkit().adapt(editor);
-
- toolkit.paintBordersFor(composite);
- section.setClient(composite);
- setSection(toolkit, section);
- }
-
- private int getEditorWidth() {
- int widthHint = 0;
- if (getManagedForm() != null && getManagedForm().getForm() != null) {
- widthHint = getManagedForm().getForm().getClientArea().width - 90;
- }
- if (widthHint <= 0 && getTaskEditorPage().getEditor().getEditorSite() != null
- && getTaskEditorPage().getEditor().getEditorSite().getPage() != null) {
- EditorAreaHelper editorManager = ((WorkbenchPage) getTaskEditorPage().getEditor().getEditorSite().getPage()).getEditorPresentation();
- if (editorManager != null && editorManager.getLayoutPart() != null) {
- widthHint = editorManager.getLayoutPart().getControl().getBounds().width - 90;
- }
- }
- if (widthHint <= 0) {
- widthHint = AbstractAttributeEditor.MAXIMUM_WIDTH;
- }
- return widthHint;
- }
-
- public TaskAttribute getAttribute() {
- return attribute;
- }
-
- protected Composite getComposite() {
- return composite;
- }
-
- protected RichTextAttributeEditor getEditor() {
- return editor;
- }
-
- public void setAttribute(TaskAttribute attribute) {
- this.attribute = attribute;
- }
-
- @Override
- public void setFocus() {
- if (editor != null) {
- editor.getControl().setFocus();
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorSummaryPart.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorSummaryPart.java
deleted file mode 100644
index 67ffb38db..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorSummaryPart.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractAttributeEditor;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPart;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.VerifyKeyListener;
-import org.eclipse.swt.events.VerifyEvent;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-
-/**
- * @author Raphael Ackermann (bug 195514)
- * @author Steffen Pingel
- */
-public class TaskEditorSummaryPart extends AbstractTaskEditorPart {
-
- private class TabVerifyKeyListener implements VerifyKeyListener {
-
- public void verifyKey(VerifyEvent event) {
- // if there is a tab key, do not "execute" it and instead select the Status control
- if (event.keyCode == SWT.TAB) {
- event.doit = false;
- if (headerComposite != null) {
- headerComposite.setFocus();
- }
- }
- }
-
- }
-
- private static final int COLUMN_MARGIN = 6;
-
- private Composite headerComposite;
-
- private AbstractAttributeEditor summaryEditor;
-
- public TaskEditorSummaryPart() {
- setPartName("Summary");
- }
-
- private void addAttribute(Composite composite, FormToolkit toolkit, TaskAttribute attribute) {
- addAttribute(composite, toolkit, attribute, COLUMN_MARGIN);
- }
-
- private void addAttribute(Composite composite, FormToolkit toolkit, TaskAttribute attribute, int indent) {
- AbstractAttributeEditor editor = createAttributeEditor(attribute);
- if (editor != null) {
- // having editable controls in the header looks odd
- editor.setReadOnly(true);
- editor.setDecorationEnabled(false);
-
- editor.createLabelControl(composite, toolkit);
- GridDataFactory.defaultsFor(editor.getLabelControl()).indent(indent, 0).applyTo(editor.getLabelControl());
- editor.createControl(composite, toolkit);
- getTaskEditorPage().getAttributeEditorToolkit().adapt(editor);
- }
- }
-
- private void addSummaryText(Composite composite, FormToolkit toolkit) {
- summaryEditor = createAttributeEditor(getTaskData().getRoot().getMappedAttribute(TaskAttribute.SUMMARY));
- if (summaryEditor != null) {
- summaryEditor.createControl(composite, toolkit);
- GridDataFactory.fillDefaults().grab(true, false).applyTo(summaryEditor.getControl());
- getTaskEditorPage().getAttributeEditorToolkit().adapt(summaryEditor);
-
- // TODO EDITOR move to RichTextEditor?
- if (summaryEditor instanceof RichTextAttributeEditor) {
- ((RichTextAttributeEditor) summaryEditor).getViewer().prependVerifyKeyListener(
- new TabVerifyKeyListener());
- }
- }
- }
-
- @Override
- public void createControl(Composite parent, FormToolkit toolkit) {
- Composite composite = toolkit.createComposite(parent);
- GridLayout layout = new GridLayout();
- layout.verticalSpacing = 5;
- composite.setLayout(layout);
-
- addSummaryText(composite, toolkit);
-
- if (needsHeader()) {
- createHeaderLayout(composite, toolkit);
- }
-
- toolkit.paintBordersFor(composite);
-
- setControl(composite);
- }
-
- protected void createHeaderLayout(Composite composite, FormToolkit toolkit) {
- headerComposite = toolkit.createComposite(composite);
- GridLayout layout = new GridLayout(11, false);
- layout.verticalSpacing = 1;
- layout.marginHeight = 1;
- layout.marginWidth = 1;
- headerComposite.setLayout(layout);
-
- TaskAttribute statusAtribute = getTaskData().getRoot().getMappedAttribute(TaskAttribute.STATUS);
- addAttribute(headerComposite, toolkit, statusAtribute, 0);
-
- // TODO show resolution
-
- TaskAttribute priorityAttribute = getTaskData().getRoot().getMappedAttribute(TaskAttribute.PRIORITY);
- addAttribute(headerComposite, toolkit, priorityAttribute);
-
- TaskAttribute keyAttribute = getTaskData().getRoot().getMappedAttribute(TaskAttribute.TASK_KEY);
- addAttribute(headerComposite, toolkit, keyAttribute);
-
- TaskAttribute dateCreation = getTaskData().getRoot().getMappedAttribute(TaskAttribute.DATE_CREATION);
- addAttribute(headerComposite, toolkit, dateCreation);
-
- TaskAttribute dateModified = getTaskData().getRoot().getMappedAttribute(TaskAttribute.DATE_MODIFICATION);
- addAttribute(headerComposite, toolkit, dateModified);
- }
-
- public boolean needsHeader() {
- return !getTaskData().isNew();
- }
-
- @Override
- public void setFocus() {
- if (summaryEditor != null) {
- summaryEditor.getControl().setFocus();
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskHyperlinkDetector.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskHyperlinkDetector.java
deleted file mode 100644
index 254071e67..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskHyperlinkDetector.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.hyperlink.AbstractHyperlinkDetector;
-import org.eclipse.jface.text.hyperlink.IHyperlink;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Rob Elves
- * @author Steffen Pingel
- * @author Eugene Kuleshov
- * @author Terry Hon
- */
-public class TaskHyperlinkDetector extends AbstractHyperlinkDetector {
-
- public IHyperlink[] detectHyperlinks(ITextViewer textViewer, IRegion region, boolean canShowMultipleHyperlinks) {
- if (region == null || textViewer == null) {
- return null;
- }
-
- IDocument document = textViewer.getDocument();
- if (document == null) {
- return null;
- }
-
- IRegion lineInfo;
- String line;
- try {
- lineInfo = document.getLineInformationOfOffset(region.getOffset());
- line = document.get(lineInfo.getOffset(), lineInfo.getLength());
- } catch (BadLocationException ex) {
- return null;
- }
-
- if (line.length() == 0) {
- return null;
- }
-
- List<TaskRepository> repositories = new ArrayList<TaskRepository>();
-
- TaskRepository selectedRepository = getTaskRepository(textViewer);
- if (selectedRepository != null) {
- repositories.add(selectedRepository);
- } else {
- repositories.addAll(TasksUi.getRepositoryManager().getAllRepositories());
- }
-
- List<IHyperlink> hyperlinks = new ArrayList<IHyperlink>();
- detectHyperlinks(line, region.getOffset() - lineInfo.getOffset(), lineInfo.getOffset(), repositories,
- hyperlinks);
- if (hyperlinks.isEmpty()) {
- return null;
- }
- return hyperlinks.toArray(new IHyperlink[hyperlinks.size()]);
- }
-
- protected void detectHyperlinks(String line, int lineOffset, int regionOffset, List<TaskRepository> repositories,
- List<IHyperlink> hyperlinks) {
- for (TaskRepository repository : repositories) {
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(repository.getConnectorKind());
- if (connectorUi == null) {
- continue;
- }
- IHyperlink[] links = connectorUi.findHyperlinks(repository, line, lineOffset, regionOffset);
- if (links == null) {
- continue;
- }
- hyperlinks.addAll(Arrays.asList(links));
- }
- }
-
- protected TaskRepository getTaskRepository(ITextViewer textViewer) {
- TaskRepository repository = (TaskRepository) getAdapter(TaskRepository.class);
- if (repository != null) {
- return repository;
- }
-
- IResource resource = (IResource) getAdapter(IResource.class);
- if (resource == null) {
- if (textViewer instanceof RepositoryTextViewer) {
- RepositoryTextViewer viewer = (RepositoryTextViewer) textViewer;
- return viewer.getRepository();
- }
-
- // use currently active editor (if any)
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- if (window != null) {
- IWorkbenchPage activePage = window.getActivePage();
- if (activePage != null) {
- IWorkbenchPart part = activePage.getActivePart();
- if (part instanceof IEditorPart) {
- IEditorInput input = ((IEditorPart) part).getEditorInput();
- if (input != null) {
- resource = (IResource) input.getAdapter(IResource.class);
- }
- }
- }
- }
- }
- if (resource != null) {
- return TasksUiPlugin.getDefault().getRepositoryForResource(resource);
- }
- return null;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskListChangeAdapter.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskListChangeAdapter.java
deleted file mode 100644
index 4f0de829a..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskListChangeAdapter.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import java.util.Set;
-
-import org.eclipse.mylyn.internal.tasks.core.ITaskListChangeListener;
-import org.eclipse.mylyn.internal.tasks.core.TaskContainerDelta;
-
-public class TaskListChangeAdapter implements ITaskListChangeListener {
-
- public void containersChanged(Set<TaskContainerDelta> containers) {
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskPlanningEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskPlanningEditor.java
deleted file mode 100644
index 7309fe554..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskPlanningEditor.java
+++ /dev/null
@@ -1,934 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import java.text.DateFormat;
-import java.util.Calendar;
-import java.util.Date;
-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.jface.dialogs.MessageDialog;
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.jface.text.ITextListener;
-import org.eclipse.jface.text.TextEvent;
-import org.eclipse.jface.text.TextViewer;
-import org.eclipse.mylyn.commons.core.DateUtil;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.provisional.commons.ui.AbstractRetrieveTitleFromUrlJob;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.provisional.commons.ui.DatePicker;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.ITaskListChangeListener;
-import org.eclipse.mylyn.internal.tasks.core.LocalRepositoryConnector;
-import org.eclipse.mylyn.internal.tasks.core.LocalTask;
-import org.eclipse.mylyn.internal.tasks.core.TaskActivityUtil;
-import org.eclipse.mylyn.internal.tasks.core.TaskContainerDelta;
-import org.eclipse.mylyn.internal.tasks.ui.ITasksUiPreferenceConstants;
-import org.eclipse.mylyn.internal.tasks.ui.ScheduleDatePicker;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.actions.ToggleTaskActivationAction;
-import org.eclipse.mylyn.internal.tasks.ui.deprecated.TaskFormPage;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.monitor.ui.MonitorUi;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITaskActivityListener;
-import org.eclipse.mylyn.tasks.core.TaskActivityAdapter;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
-import org.eclipse.mylyn.tasks.core.data.TaskData;
-import org.eclipse.mylyn.tasks.ui.ITasksUiConstants;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditorInput;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CCombo;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.KeyListener;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Spinner;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.forms.IFormColors;
-import org.eclipse.ui.forms.IManagedForm;
-import org.eclipse.ui.forms.events.ExpansionEvent;
-import org.eclipse.ui.forms.events.HyperlinkAdapter;
-import org.eclipse.ui.forms.events.HyperlinkEvent;
-import org.eclipse.ui.forms.events.IExpansionListener;
-import org.eclipse.ui.forms.events.IHyperlinkListener;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-import org.eclipse.ui.forms.widgets.ImageHyperlink;
-import org.eclipse.ui.forms.widgets.ScrolledForm;
-import org.eclipse.ui.forms.widgets.Section;
-
-/**
- * @author Mik Kersten
- * @author Ken Sueda (initial prototype)
- * @author Rob Elves
- */
-public class TaskPlanningEditor extends TaskFormPage {
-
- private static final String RESET = "Reset";
-
- private static final int WIDTH_SUMMARY = 500;
-
- private static final int NOTES_MINSIZE = 100;
-
- private static final String CLEAR = "Clear";
-
- private static final String LABEL_DUE = "Due:";
-
- private static final String LABEL_SCHEDULE = "Scheduled for:";
-
- public static final String LABEL_INCOMPLETE = "Incomplete";
-
- public static final String LABEL_COMPLETE = "Complete";
-
- private static final String LABEL_PLAN = "Personal Planning";
-
- private static final String NO_TIME_ELAPSED = "0 seconds";
-
- // private static final String LABEL_OVERVIEW = "Task Info";
-
- private static final String LABEL_NOTES = "Notes";
-
- private DatePicker dueDatePicker;
-
- private ScheduleDatePicker scheduleDatePicker;
-
- private AbstractTask task;
-
- private Composite editorComposite;
-
- protected static final String CONTEXT_MENU_ID = "#MylynPlanningEditor";
-
- private Text pathText;
-
- private Text endDate;
-
- private ScrolledForm form;
-
- private TextViewer summaryEditor;
-
- private Text issueReportURL;
-
- private CCombo priorityCombo;
-
- private CCombo statusCombo;
-
- private TextViewer noteEditor;
-
- private Spinner estimated;
-
- private ImageHyperlink getDescLink;
-
- private ImageHyperlink openUrlLink;
-
- private final TaskEditor parentEditor;
-
- private final ITaskListChangeListener TASK_LIST_LISTENER = new TaskListChangeAdapter() {
-
- @Override
- public void containersChanged(Set<TaskContainerDelta> containers) {
- for (TaskContainerDelta taskContainerDelta : containers) {
- if (taskContainerDelta.getElement() instanceof ITask) {
- final AbstractTask updateTask = (AbstractTask) taskContainerDelta.getElement();
- if (updateTask != null && task != null
- && updateTask.getHandleIdentifier().equals(task.getHandleIdentifier())) {
- if (PlatformUI.getWorkbench() != null && !PlatformUI.getWorkbench().isClosing()) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- if (summaryEditor != null && summaryEditor.getTextWidget() != null) {
- updateTaskData(updateTask);
- }
- }
- });
- }
- }
- }
- }
- }
-
- };
-
- private FormToolkit toolkit;
-
- private ToggleTaskActivationAction activateAction;
-
- private ITaskActivityListener timingListener;
-
- public TaskPlanningEditor(TaskEditor editor) {
- super(editor, ITasksUiConstants.ID_PAGE_PLANNING, "Planning");
- this.parentEditor = editor;
- TasksUiInternal.getTaskList().addChangeListener(TASK_LIST_LISTENER);
- }
-
- /** public for testing */
- public void updateTaskData(final AbstractTask updateTask) {
- if (scheduleDatePicker != null && !scheduleDatePicker.isDisposed()) {
- if (updateTask.getScheduledForDate() != null) {
- scheduleDatePicker.setScheduledDate(updateTask.getScheduledForDate());
- } else {
- scheduleDatePicker.setScheduledDate(null);
- }
- }
-
- if (summaryEditor == null) {
- return;
- }
-
- if (!summaryEditor.getTextWidget().isDisposed()) {
- if (!summaryEditor.getTextWidget().getText().equals(updateTask.getSummary())) {
- boolean wasDirty = TaskPlanningEditor.this.isDirty;
- summaryEditor.getTextWidget().setText(updateTask.getSummary());
- TaskPlanningEditor.this.markDirty(wasDirty);
- }
- if (parentEditor != null) {
- parentEditor.updateTitle(updateTask.getSummary());
- }
- }
-
- if (!priorityCombo.isDisposed() && updateTask != null) {
- PriorityLevel level = PriorityLevel.fromString(updateTask.getPriority());
- if (level != null) {
- int prioritySelectionIndex = priorityCombo.indexOf(level.getDescription());
- priorityCombo.select(prioritySelectionIndex);
- }
- }
- if (!statusCombo.isDisposed()) {
- if (task.isCompleted()) {
- statusCombo.select(0);
- } else {
- statusCombo.select(1);
- }
- }
- if ((updateTask instanceof LocalTask) && !endDate.isDisposed()) {
- endDate.setText(getTaskDateString(updateTask));
- }
- }
-
- @Override
- public void doSave(IProgressMonitor monitor) {
- if (task instanceof LocalTask) {
- String label = summaryEditor.getTextWidget().getText();
- task.setSummary(label);
-
- // TODO: refactor mutation into TaskList?
- task.setUrl(issueReportURL.getText());
- String priorityDescription = priorityCombo.getItem(priorityCombo.getSelectionIndex());
- PriorityLevel level = PriorityLevel.fromDescription(priorityDescription);
- if (level != null) {
- task.setPriority(level.toString());
- }
- if (!task.isCompleted() && statusCombo.getSelectionIndex() == 0) {
- task.setCompletionDate(new Date());
- } else {
- task.setCompletionDate(null);
- }
- TasksUiInternal.getTaskList().notifyElementChanged(task);
- }
-
- String note = noteEditor.getTextWidget().getText();// notes.getText();
- task.setNotes(note);
- task.setEstimatedTimeHours(estimated.getSelection());
- if (scheduleDatePicker != null && scheduleDatePicker.getScheduledDate() != null) {
- if (task.getScheduledForDate() == null
- || (task.getScheduledForDate() != null && !scheduleDatePicker.getScheduledDate().equals(
- task.getScheduledForDate())) || (task).getScheduledForDate().isDay()) {
- TasksUiPlugin.getTaskActivityManager().setScheduledFor(task, scheduleDatePicker.getScheduledDate());
- (task).setReminded(false);
- }
- } else {
- TasksUiPlugin.getTaskActivityManager().setScheduledFor(task, null);
- (task).setReminded(false);
- }
- if (dueDatePicker != null && dueDatePicker.getDate() != null) {
- TasksUiPlugin.getTaskActivityManager().setDueDate(task, dueDatePicker.getDate().getTime());
- } else {
- TasksUiPlugin.getTaskActivityManager().setDueDate(task, null);
- }
-// if (parentEditor != null) {
-// parentEditor.notifyTaskChanged();
-// }
- markDirty(false);
- }
-
- @Override
- public void doSaveAs() {
- // don't support saving as
- }
-
- @Override
- public boolean isDirty() {
- return isDirty;
- }
-
- @Override
- public boolean isSaveAsAllowed() {
- return false;
- }
-
- @Override
- protected void createFormContent(IManagedForm managedForm) {
- super.createFormContent(managedForm);
- TaskEditorInput taskEditorInput = (TaskEditorInput) getEditorInput();
-
- task = (AbstractTask) taskEditorInput.getTask();
-
- form = managedForm.getForm();
- toolkit = managedForm.getToolkit();
-
- editorComposite = form.getBody();
- GridLayout editorLayout = new GridLayout();
- editorLayout.verticalSpacing = 3;
- editorComposite.setLayout(editorLayout);
- //editorComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
- if (task instanceof LocalTask) {
- createSummarySection(editorComposite);
- }
- createPlanningSection(editorComposite);
- createNotesSection(editorComposite);
-
- if (summaryEditor != null && summaryEditor.getTextWidget() != null
- && LocalRepositoryConnector.DEFAULT_SUMMARY.equals(summaryEditor.getTextWidget().getText())) {
- summaryEditor.setSelectedRange(0, summaryEditor.getTextWidget().getText().length());
- summaryEditor.getTextWidget().setFocus();
- } else if (summaryEditor != null && summaryEditor.getTextWidget() != null) {
- summaryEditor.getTextWidget().setFocus();
- }
- }
-
- @Override
- public void setFocus() {
- // form.setFocus();
- if (summaryEditor != null && summaryEditor.getTextWidget() != null
- && !summaryEditor.getTextWidget().isDisposed()) {
- summaryEditor.getTextWidget().setFocus();
- }
- }
-
- public Control getControl() {
- return form;
- }
-
- private Text addNameValueComp(Composite parent, String label, String value, int style) {
- Composite nameValueComp = toolkit.createComposite(parent);
- GridLayout layout = new GridLayout(2, false);
- layout.marginHeight = 3;
- nameValueComp.setLayout(layout);
- toolkit.createLabel(nameValueComp, label, SWT.NONE).setForeground(
- toolkit.getColors().getColor(IFormColors.TITLE));
- Text text;
- if ((SWT.READ_ONLY & style) == SWT.READ_ONLY) {
- text = new Text(nameValueComp, style);
- toolkit.adapt(text, true, false);
- text.setText(value);
- } else {
- text = toolkit.createText(nameValueComp, value, style);
- }
- return text;
- }
-
- private void createSummarySection(Composite parent) {
-
- // Summary
- Composite summaryComposite = toolkit.createComposite(parent);
- GridLayout summaryLayout = new GridLayout();
- summaryLayout.verticalSpacing = 2;
- summaryLayout.marginHeight = 2;
- summaryLayout.marginLeft = 5;
- summaryComposite.setLayout(summaryLayout);
- GridDataFactory.fillDefaults().grab(true, false).applyTo(summaryComposite);
-
- TaskRepository repository = null;
- if (task != null && !(task instanceof LocalTask)) {
- ITask repositoryTask = task;
- repository = TasksUi.getRepositoryManager().getRepository(repositoryTask.getConnectorKind(),
- repositoryTask.getRepositoryUrl());
- }
- summaryEditor = addTextEditor(repository, summaryComposite, task.getSummary(), true, SWT.FLAT | SWT.SINGLE);
-
- GridDataFactory.fillDefaults().hint(WIDTH_SUMMARY, SWT.DEFAULT).minSize(NOTES_MINSIZE, SWT.DEFAULT).grab(true,
- false).applyTo(summaryEditor.getTextWidget());
- summaryEditor.getControl().setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
-
- if (!(task instanceof LocalTask)) {
- summaryEditor.setEditable(false);
- } else {
- summaryEditor.setEditable(true);
- summaryEditor.addTextListener(new ITextListener() {
- public void textChanged(TextEvent event) {
- if (!task.getSummary().equals(summaryEditor.getTextWidget().getText())) {
- markDirty(true);
- }
- }
- });
- }
- toolkit.paintBordersFor(summaryComposite);
-
- Composite statusComposite = toolkit.createComposite(parent);
- GridLayout compLayout = new GridLayout(8, false);
- compLayout.verticalSpacing = 0;
- compLayout.horizontalSpacing = 5;
- compLayout.marginHeight = 3;
- statusComposite.setLayout(compLayout);
- statusComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- Composite nameValueComp = toolkit.createComposite(statusComposite);
- GridLayout nameValueLayout = new GridLayout(2, false);
- nameValueLayout.marginHeight = 3;
- nameValueComp.setLayout(nameValueLayout);
- toolkit.createLabel(nameValueComp, "Priority:").setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
- priorityCombo = new CCombo(nameValueComp, SWT.FLAT | SWT.READ_ONLY);
- toolkit.adapt(priorityCombo, true, false);
- priorityCombo.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
- toolkit.paintBordersFor(nameValueComp);
-
- // Populate the combo box with priority levels
- for (String priorityLevel : TaskListView.PRIORITY_LEVEL_DESCRIPTIONS) {
- priorityCombo.add(priorityLevel);
- }
-
- PriorityLevel level = PriorityLevel.fromString(task.getPriority());
- if (level != null) {
- int prioritySelectionIndex = priorityCombo.indexOf(level.getDescription());
- priorityCombo.select(prioritySelectionIndex);
- }
-
- if (!(task instanceof LocalTask)) {
- priorityCombo.setEnabled(false);
- } else {
- priorityCombo.addSelectionListener(new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- TaskPlanningEditor.this.markDirty(true);
-
- }
- });
- }
-
- nameValueComp = toolkit.createComposite(statusComposite);
- nameValueComp.setLayout(new GridLayout(2, false));
- toolkit.createLabel(nameValueComp, "Status:").setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
- statusCombo = new CCombo(nameValueComp, SWT.FLAT | SWT.READ_ONLY);
- toolkit.adapt(statusCombo, true, true);
- statusCombo.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
- toolkit.paintBordersFor(nameValueComp);
- statusCombo.add(LABEL_COMPLETE);
- statusCombo.add(LABEL_INCOMPLETE);
- if (task.isCompleted()) {
- statusCombo.select(0);
- } else {
- statusCombo.select(1);
- }
- if (!(task instanceof LocalTask)) {
- statusCombo.setEnabled(false);
- } else {
- statusCombo.addSelectionListener(new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- TaskPlanningEditor.this.markDirty(true);
- }
- });
- }
-
- String creationDateString = "";
- try {
- creationDateString = DateFormat.getDateInstance(DateFormat.LONG).format(task.getCreationDate());
- } catch (RuntimeException e) {
- // FIXME what exception is caught here?
- StatusHandler.fail(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Could not format creation date", e));
- }
- addNameValueComp(statusComposite, "Created:", creationDateString, SWT.FLAT | SWT.READ_ONLY);
-
- String completionDateString = "";
- if (task.isCompleted()) {
- completionDateString = getTaskDateString(task);
- }
- endDate = addNameValueComp(statusComposite, "Completed:", completionDateString, SWT.FLAT | SWT.READ_ONLY);
- // URL
- Composite urlComposite = toolkit.createComposite(parent);
- GridLayout urlLayout = new GridLayout(4, false);
- urlLayout.verticalSpacing = 0;
- urlLayout.marginHeight = 2;
- urlLayout.marginLeft = 5;
- urlComposite.setLayout(urlLayout);
- GridDataFactory.fillDefaults().grab(true, false).applyTo(urlComposite);
-
- Label label = toolkit.createLabel(urlComposite, "URL:");
- label.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
- issueReportURL = toolkit.createText(urlComposite, task.getUrl(), SWT.FLAT);
- issueReportURL.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- if (!(task instanceof LocalTask)) {
- issueReportURL.setEditable(false);
- } else {
- issueReportURL.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- markDirty(true);
- }
- });
- }
-
- getDescLink = toolkit.createImageHyperlink(urlComposite, SWT.NONE);
- getDescLink.setImage(CommonImages.getImage(TasksUiImages.TASK_RETRIEVE));
- getDescLink.setToolTipText("Retrieve task description from URL");
- getDescLink.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
- setButtonStatus();
-
- issueReportURL.addKeyListener(new KeyListener() {
- public void keyPressed(KeyEvent e) {
- setButtonStatus();
- }
-
- public void keyReleased(KeyEvent e) {
- setButtonStatus();
- }
- });
-
- getDescLink.addHyperlinkListener(new IHyperlinkListener() {
-
- public void linkActivated(HyperlinkEvent e) {
- retrieveTaskDescription(issueReportURL.getText());
- }
-
- public void linkEntered(HyperlinkEvent e) {
- }
-
- public void linkExited(HyperlinkEvent e) {
- }
- });
-
- openUrlLink = toolkit.createImageHyperlink(urlComposite, SWT.NONE);
- openUrlLink.setImage(CommonImages.getImage(CommonImages.BROWSER_SMALL));
- openUrlLink.setToolTipText("Open with Web Browser");
- openUrlLink.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
- openUrlLink.addHyperlinkListener(new IHyperlinkListener() {
-
- public void linkActivated(HyperlinkEvent e) {
- TasksUiUtil.openUrl(issueReportURL.getText());
- }
-
- public void linkEntered(HyperlinkEvent e) {
- }
-
- public void linkExited(HyperlinkEvent e) {
- }
- });
-
- toolkit.paintBordersFor(urlComposite);
- toolkit.paintBordersFor(statusComposite);
- }
-
- /**
- * Attempts to set the task pageTitle to the title from the specified url
- */
- protected void retrieveTaskDescription(final String url) {
- AbstractRetrieveTitleFromUrlJob job = new AbstractRetrieveTitleFromUrlJob(issueReportURL.getText()) {
- @Override
- protected void titleRetrieved(String pageTitle) {
- if (!getControl().isDisposed()) {
- summaryEditor.getTextWidget().setText(pageTitle);
- TaskPlanningEditor.this.markDirty(true);
- }
- }
-
- };
- job.schedule();
- }
-
- /**
- * Sets the Get Description button enabled or not depending on whether there is a URL specified
- */
- protected void setButtonStatus() {
- String url = issueReportURL.getText();
-
- if (url.length() > 10 && (url.startsWith("http://") || url.startsWith("https://"))) {
- // String defaultPrefix =
- // ContextCore.getPreferenceStore().getString(
- // TaskListPreferenceConstants.DEFAULT_URL_PREFIX);
- // if (url.equals(defaultPrefix)) {
- // getDescButton.setEnabled(false);
- // } else {
- getDescLink.setEnabled(true);
- // }
- } else {
- getDescLink.setEnabled(false);
- }
- }
-
- private void createPlanningSection(Composite parent) {
-
- Section section = toolkit.createSection(parent, ExpandableComposite.TITLE_BAR | ExpandableComposite.TWISTIE);
- section.setText(LABEL_PLAN);
- section.setLayout(new GridLayout());
- section.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- section.setExpanded(true);
- section.addExpansionListener(new IExpansionListener() {
- public void expansionStateChanging(ExpansionEvent e) {
- form.reflow(true);
- }
-
- public void expansionStateChanged(ExpansionEvent e) {
- form.reflow(true);
- }
- });
-
- Composite sectionClient = toolkit.createComposite(section);
- section.setClient(sectionClient);
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
- layout.horizontalSpacing = 15;
- layout.makeColumnsEqualWidth = false;
- sectionClient.setLayout(layout);
- GridData clientDataLayout = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- sectionClient.setLayoutData(clientDataLayout);
-
- Composite nameValueComp = makeComposite(sectionClient, 3);
- Label label = toolkit.createLabel(nameValueComp, LABEL_SCHEDULE);
- label.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
-
- scheduleDatePicker = new ScheduleDatePicker(nameValueComp, task, SWT.FLAT);
- scheduleDatePicker.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
- toolkit.adapt(scheduleDatePicker, true, false);
- toolkit.paintBordersFor(nameValueComp);
-
- scheduleDatePicker.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
- scheduleDatePicker.addPickerSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent arg0) {
- TaskPlanningEditor.this.markDirty(true);
- }
-
- public void widgetDefaultSelected(SelectionEvent arg0) {
- // ignore
- }
- });
-
- ImageHyperlink clearScheduledDate = toolkit.createImageHyperlink(nameValueComp, SWT.NONE);
- clearScheduledDate.setImage(CommonImages.getImage(CommonImages.REMOVE));
- clearScheduledDate.setToolTipText(CLEAR);
- clearScheduledDate.addHyperlinkListener(new HyperlinkAdapter() {
-
- @Override
- public void linkActivated(HyperlinkEvent e) {
- scheduleDatePicker.setScheduledDate(null);
- (task).setReminded(false);
- TaskPlanningEditor.this.markDirty(true);
- }
- });
-
- nameValueComp = makeComposite(sectionClient, 3);
- label = toolkit.createLabel(nameValueComp, LABEL_DUE);
- label.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
-
- dueDatePicker = new DatePicker(nameValueComp, SWT.FLAT, DatePicker.LABEL_CHOOSE, true,
- TasksUiPlugin.getDefault().getPreferenceStore().getInt(ITasksUiPreferenceConstants.PLANNING_ENDHOUR));
-
- Calendar calendar = TaskActivityUtil.getCalendar();
-
- if (task.getDueDate() != null) {
- calendar.setTime(task.getDueDate());
- dueDatePicker.setDate(calendar);
- }
-
- dueDatePicker.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
- dueDatePicker.addPickerSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent arg0) {
- TaskPlanningEditor.this.markDirty(true);
- }
- });
-
- dueDatePicker.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
- toolkit.adapt(dueDatePicker, true, false);
- toolkit.paintBordersFor(nameValueComp);
-
- ImageHyperlink clearDueDate = toolkit.createImageHyperlink(nameValueComp, SWT.NONE);
- clearDueDate.setImage(CommonImages.getImage(CommonImages.REMOVE));
- clearDueDate.setToolTipText(CLEAR);
- clearDueDate.addHyperlinkListener(new HyperlinkAdapter() {
-
- @Override
- public void linkActivated(HyperlinkEvent e) {
- dueDatePicker.setDate(null);
- TaskPlanningEditor.this.markDirty(true);
- }
- });
-
- // disable due date picker if it's a repository due date
- if (task != null) {
- try {
- TaskData taskData = TasksUi.getTaskDataManager().getTaskData(task);
- if (taskData != null) {
- AbstractRepositoryConnector connector = TasksUi.getRepositoryConnector(taskData.getConnectorKind());
- TaskRepository taskRepository = TasksUi.getRepositoryManager().getRepository(
- taskData.getConnectorKind(), taskData.getRepositoryUrl());
- if (connector != null && taskRepository != null
- && connector.hasRepositoryDueDate(taskRepository, task, taskData)) {
- dueDatePicker.setEnabled(false);
- clearDueDate.setEnabled(false);
- }
- }
- } catch (CoreException e) {
- // ignore
- }
- }
-
- // Estimated time
- nameValueComp = makeComposite(sectionClient, 3);
- label = toolkit.createLabel(nameValueComp, "Estimated hours:");
- label.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
-
- estimated = new Spinner(nameValueComp, SWT.FLAT);
- toolkit.adapt(estimated, true, false);
- estimated.setSelection(task.getEstimatedTimeHours());
- estimated.setDigits(0);
- estimated.setMaximum(100);
- estimated.setMinimum(0);
- estimated.setIncrement(1);
- estimated.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- TaskPlanningEditor.this.markDirty(true);
- }
- });
-
- estimated.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
- toolkit.paintBordersFor(nameValueComp);
- GridData estimatedDataLayout = new GridData();
- estimatedDataLayout.widthHint = 30;
- estimated.setLayoutData(estimatedDataLayout);
-
- ImageHyperlink clearEstimated = toolkit.createImageHyperlink(nameValueComp, SWT.NONE);
- clearEstimated.setImage(CommonImages.getImage(CommonImages.REMOVE));
- clearEstimated.setToolTipText(CLEAR);
- clearEstimated.addHyperlinkListener(new HyperlinkAdapter() {
- @Override
- public void linkActivated(HyperlinkEvent e) {
- estimated.setSelection(0);
- TaskPlanningEditor.this.markDirty(true);
- }
- });
-
- // Active Time
- nameValueComp = makeComposite(sectionClient, 3);
- GridDataFactory.fillDefaults().applyTo(nameValueComp);
-
- label = toolkit.createLabel(nameValueComp, "Active:");
- label.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
- label.setToolTipText("Time working on this task");
-
- String elapsedTimeString = NO_TIME_ELAPSED;
- try {
- elapsedTimeString = DateUtil.getFormattedDuration(TasksUiPlugin.getTaskActivityManager().getElapsedTime(
- task), false);
- if (elapsedTimeString.equals("")) {
- elapsedTimeString = NO_TIME_ELAPSED;
- }
- } catch (RuntimeException e) {
- // FIXME what exception is caught here?
- StatusHandler.fail(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Could not format elapsed time", e));
- }
-
- final Text elapsedTimeText = toolkit.createText(nameValueComp, elapsedTimeString);
- elapsedTimeText.setText(elapsedTimeString);
-
- GridData td = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
- td.grabExcessHorizontalSpace = true;
- elapsedTimeText.setLayoutData(td);
- elapsedTimeText.setEditable(false);
-
- timingListener = new TaskActivityAdapter() {
-
- @Override
- public void elapsedTimeUpdated(ITask task, long newElapsedTime) {
- if (task.equals(TaskPlanningEditor.this.task)) {
- String elapsedTimeString = NO_TIME_ELAPSED;
- try {
- elapsedTimeString = DateUtil.getFormattedDuration(newElapsedTime, false);
- if (elapsedTimeString.equals("")) {
- elapsedTimeString = NO_TIME_ELAPSED;
- }
-
- } catch (RuntimeException e) {
- StatusHandler.fail(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Could not format elapsed time", e));
- }
- final String elapsedString = elapsedTimeString;
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
-
- public void run() {
- if (!elapsedTimeText.isDisposed()) {
- elapsedTimeText.setText(elapsedString);
- }
- }
- });
-
- }
- }
- };
-
- TasksUiPlugin.getTaskActivityManager().addActivityListener(timingListener);
-
- ImageHyperlink resetActivityTimeButton = toolkit.createImageHyperlink(nameValueComp, SWT.NONE);
- resetActivityTimeButton.setImage(CommonImages.getImage(CommonImages.REMOVE));
- resetActivityTimeButton.setToolTipText(RESET);
- resetActivityTimeButton.addHyperlinkListener(new HyperlinkAdapter() {
-
- @Override
- public void linkActivated(HyperlinkEvent e) {
- if (MessageDialog.openConfirm(TaskPlanningEditor.this.getSite().getShell(),
- "Confirm Activity Time Deletion",
- "Do you wish to reset your activity time on this task?\n\nThis will take immediate affect and can not be undone.")) {
- MonitorUi.getActivityContextManager().removeActivityTime(task.getHandleIdentifier(), 0l,
- System.currentTimeMillis());
- }
- }
- });
-
- toolkit.paintBordersFor(sectionClient);
- }
-
- private Composite makeComposite(Composite parent, int col) {
- Composite nameValueComp = toolkit.createComposite(parent);
- GridLayout layout = new GridLayout(3, false);
- layout.marginHeight = 3;
- nameValueComp.setLayout(layout);
- return nameValueComp;
- }
-
- private void createNotesSection(Composite parent) {
- Section section = toolkit.createSection(parent, ExpandableComposite.TITLE_BAR);
- section.setText(LABEL_NOTES);
- section.setExpanded(true);
- section.setLayout(new GridLayout());
- section.setLayoutData(new GridData(GridData.FILL_BOTH));
-// section.addExpansionListener(new IExpansionListener() {
-// public void expansionStateChanging(ExpansionEvent e) {
-// form.reflow(true);
-// }
-//
-// public void expansionStateChanged(ExpansionEvent e) {
-// form.reflow(true);
-// }
-// });
- Composite container = toolkit.createComposite(section);
- section.setClient(container);
- container.setLayout(new GridLayout());
- GridData notesData = new GridData(GridData.FILL_BOTH);
- notesData.grabExcessVerticalSpace = true;
- container.setLayoutData(notesData);
-
- TaskRepository repository = null;
- if (task != null && !(task instanceof LocalTask)) {
- ITask repositoryTask = task;
- repository = TasksUi.getRepositoryManager().getRepository(repositoryTask.getConnectorKind(),
- repositoryTask.getRepositoryUrl());
- }
-
- noteEditor = addTextEditor(repository, container, task.getNotes(), true, SWT.FLAT | SWT.MULTI | SWT.WRAP
- | SWT.V_SCROLL);
-
- GridDataFactory.fillDefaults().minSize(NOTES_MINSIZE, NOTES_MINSIZE).grab(true, true).applyTo(
- noteEditor.getControl());
- noteEditor.getControl().setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
- noteEditor.setEditable(true);
-
- noteEditor.addTextListener(new ITextListener() {
- public void textChanged(TextEvent event) {
- if (!task.getNotes().equals(noteEditor.getTextWidget().getText())) {
- markDirty(true);
- }
- }
- });
-
- // commentViewer.addSelectionChangedListener(new
- // ISelectionChangedListener() {
- //
- // public void selectionChanged(SelectionChangedEvent event) {
- // getSite().getSelectionProvider().setSelection(commentViewer.getSelection());
- //
- // }});
-
- toolkit.paintBordersFor(container);
- }
-
- private String getTaskDateString(ITask task) {
-
- if (task == null) {
- return "";
- }
- if (task.getCompletionDate() == null) {
- return "";
- }
-
- String completionDateString = "";
- try {
- completionDateString = DateFormat.getDateInstance(DateFormat.LONG).format(task.getCompletionDate());
- } catch (RuntimeException e) {
- // FIXME what exception is caught here?
- StatusHandler.fail(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Could not format date", e));
- return completionDateString;
- }
- return completionDateString;
- }
-
- @Override
- public void dispose() {
- if (timingListener != null) {
- TasksUiPlugin.getTaskActivityManager().removeActivityListener(timingListener);
- }
- TasksUiInternal.getTaskList().removeChangeListener(TASK_LIST_LISTENER);
- }
-
- @Override
- public String toString() {
- return "(info editor for task: " + task + ")";
- }
-
- /** for testing - should cause dirty state */
- public void setNotes(String notes) {
- this.noteEditor.getTextWidget().setText(notes);
- }
-
- /** for testing - should cause dirty state */
- public void setDescription(String desc) {
- this.summaryEditor.getTextWidget().setText(desc);
- }
-
- /** for testing */
- public String getDescription() {
- return this.summaryEditor.getTextWidget().getText();
- }
-
- /** for testing */
- public String getFormTitle() {
- return form.getText();
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskRelationHyperlinkDetector.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskRelationHyperlinkDetector.java
deleted file mode 100644
index c250bbd2f..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskRelationHyperlinkDetector.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.Region;
-import org.eclipse.jface.text.hyperlink.IHyperlink;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TaskHyperlink;
-
-/**
- * @author Steffen Pingel
- */
-public class TaskRelationHyperlinkDetector extends TaskHyperlinkDetector {
-
- @Override
- public IHyperlink[] detectHyperlinks(ITextViewer textViewer, IRegion region, boolean canShowMultipleHyperlinks) {
- if (region == null || textViewer == null || textViewer.getDocument() == null) {
- return null;
- }
-
- TaskRepository taskRepository = getTaskRepository(textViewer);
- if (taskRepository != null) {
- String prefix = extractPrefix(textViewer, region.getOffset());
- String postfix = extractPostfix(textViewer, region.getOffset());
- String taskKey = prefix + postfix;
- if (taskKey != null) {
- Region hyperlinkRegion = new Region(region.getOffset() - prefix.length(), taskKey.length());
- return new IHyperlink[] { new TaskHyperlink(hyperlinkRegion, taskRepository, taskKey) };
- }
- }
- return null;
- }
-
- private String extractPrefix(ITextViewer viewer, int offset) {
- int i = offset;
- IDocument document = viewer.getDocument();
- if (i > document.getLength()) {
- return "";
- }
-
- try {
- if (isSeparator(document.getChar(i))) {
- return "";
- }
- while (i > 0) {
- char ch = document.getChar(i - 1);
- if (isSeparator(ch)) {
- break;
- }
- i--;
- }
- return document.get(i, offset - i);
- } catch (BadLocationException e) {
- return "";
- }
- }
-
- private String extractPostfix(ITextViewer viewer, int offset) {
- int i = offset;
- IDocument document = viewer.getDocument();
- int length = document.getLength();
- if (i > length) {
- return "";
- }
-
- try {
- if (isSeparator(document.getChar(i))) {
- return "";
- }
- while (i < length - 1) {
- char ch = document.getChar(i + 1);
- if (isSeparator(ch)) {
- break;
- }
- i++;
- }
- return document.get(offset, i - offset + 1);
- } catch (BadLocationException e) {
- }
- return "";
- }
-
- private boolean isSeparator(char ch) {
- return Character.isWhitespace(ch) || ch == ',';
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskSpellingReconcileStrategy.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskSpellingReconcileStrategy.java
deleted file mode 100644
index cbcbb142b..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskSpellingReconcileStrategy.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.content.IContentTypeManager;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.Position;
-import org.eclipse.jface.text.Region;
-import org.eclipse.jface.text.reconciler.DirtyRegion;
-import org.eclipse.jface.text.reconciler.IReconcilerExtension;
-import org.eclipse.jface.text.reconciler.IReconcilingStrategy;
-import org.eclipse.jface.text.source.Annotation;
-import org.eclipse.jface.text.source.IAnnotationModel;
-import org.eclipse.mylyn.internal.tasks.ui.deprecated.TaskFormPage.ErrorAnnotation;
-import org.eclipse.ui.editors.text.EditorsUI;
-import org.eclipse.ui.texteditor.spelling.ISpellingProblemCollector;
-import org.eclipse.ui.texteditor.spelling.SpellingContext;
-import org.eclipse.ui.texteditor.spelling.SpellingProblem;
-
-/**
- * Adapted from org.eclipse.jdt.internal.ui.text.spelling.PropertiesSpellingReconcileStrategy
- *
- * @author Jeff Pound
- * @author Rob Elves
- */
-public class TaskSpellingReconcileStrategy implements IReconcilerExtension, IReconcilingStrategy {
-
- /**
- * Spelling problem collector that forwards {@link SpellingProblem}s as {@link IProblem}s to the
- * {@link org.eclipse.jdt.core.IProblemRequestor}.
- */
- private class SpellingProblemCollector implements ISpellingProblemCollector {
-
- /** Annotation model */
- private final IAnnotationModel fAnnotationModel;
-
- /** Annotations to add */
- private Map<ErrorAnnotation, Position> fAddAnnotations;
-
- /**
- * Initializes this collector with the given annotation model.
- *
- * @param annotationModel
- * the annotation model
- */
- public SpellingProblemCollector(IAnnotationModel annotationModel) {
- fAnnotationModel = annotationModel;
- }
-
- /*
- * @see org.eclipse.ui.texteditor.spelling.ISpellingProblemCollector#accept(org.eclipse.ui.texteditor.spelling.SpellingProblem)
- */
- public void accept(SpellingProblem problem) {
- try {
- int line = fDocument.getLineOfOffset(problem.getOffset()) + 1;
-
- fAddAnnotations.put(new ErrorAnnotation(line, null), new Position(problem.getOffset(),
- problem.getLength()));
-
- } catch (BadLocationException x) {
- // drop this SpellingProblem
- }
- }
-
- /*
- * @see org.eclipse.ui.texteditor.spelling.ISpellingProblemCollector#beginCollecting()
- */
- public void beginCollecting() {
- fAddAnnotations = new HashMap<ErrorAnnotation, Position>();
- }
-
- /*
- * @see org.eclipse.ui.texteditor.spelling.ISpellingProblemCollector#endCollecting()
- */
- @SuppressWarnings("unchecked")
- public void endCollecting() {
-
- List<Annotation> removeAnnotations = new ArrayList<Annotation>();
- for (Iterator iter = fAnnotationModel.getAnnotationIterator(); iter.hasNext();) {
- Annotation annotation = (Annotation) iter.next();
- if (ErrorAnnotation.ERROR_TYPE.equals(annotation.getType())) {
- removeAnnotations.add(annotation);
- }
- }
-
- for (Object element : removeAnnotations) {
- fAnnotationModel.removeAnnotation((Annotation) element);
- }
- for (Object element : fAddAnnotations.keySet()) {
- Annotation annotation = (Annotation) element;
- fAnnotationModel.addAnnotation(annotation, fAddAnnotations.get(annotation));
- }
-
- fAddAnnotations = null;
- }
- }
-
- /** The taskId of the problem */
- public static final int SPELLING_PROBLEM_ID = 0x80000000;
-
- /** The document to operate on. */
- private IDocument fDocument;
-
- /** The progress monitor. */
- private IProgressMonitor fProgressMonitor;
-
- /**
- * The spelling context containing the Java properties content type.
- * <p>
- * Since his reconcile strategy is for the Properties File editor which normally edits Java properties files we
- * always use the Java properties file content type for performance reasons.
- * </p>
- *
- * @since 3.2
- */
- private final SpellingContext fSpellingContext;
-
- private IAnnotationModel annotationModel;
-
- public TaskSpellingReconcileStrategy() {
- this.annotationModel = null;
- fSpellingContext = new SpellingContext();
- fSpellingContext.setContentType(Platform.getContentTypeManager().getContentType(IContentTypeManager.CT_TEXT));
- }
-
- /*
- * @see org.eclipse.jface.text.reconciler.IReconcilingStrategyExtension#initialReconcile()
- */
- public void initialReconcile() {
- reconcile(new Region(0, fDocument.getLength()));
- }
-
- /*
- * @see org.eclipse.jface.text.reconciler.IReconcilingStrategy#reconcile(org.eclipse.jface.text.reconciler.DirtyRegion,org.eclipse.jface.text.IRegion)
- */
- public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) {
- reconcile(subRegion);
- }
-
- /*
- * @see org.eclipse.jface.text.reconciler.IReconcilingStrategy#reconcile(org.eclipse.jface.text.IRegion)
- */
- public void reconcile(IRegion region) {
- TaskSpellingReconcileStrategy.SpellingProblemCollector collector = new SpellingProblemCollector(annotationModel);
- EditorsUI.getSpellingService().check(fDocument, fSpellingContext, collector, fProgressMonitor);
- }
-
- /*
- * @see org.eclipse.jface.text.reconciler.IReconcilingStrategy#setDocument(org.eclipse.jface.text.IDocument)
- */
- public void setDocument(IDocument document) {
- fDocument = document;
- }
-
- /*
- * @see org.eclipse.jface.text.reconciler.IReconcilingStrategyExtension#setProgressMonitor(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void setProgressMonitor(IProgressMonitor monitor) {
- fProgressMonitor = monitor;
- }
-
- public String getDocumentPartitioning() {
- // ignore
- return null;
- }
-
- public void setAnnotationModel(IAnnotationModel model) {
- annotationModel = model;
- }
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskUrlHyperlink.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskUrlHyperlink.java
deleted file mode 100644
index c6b513454..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskUrlHyperlink.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.hyperlink.URLHyperlink;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-
-/**
- * @author Rob Elves
- */
-public class TaskUrlHyperlink extends URLHyperlink {
-
- public TaskUrlHyperlink(IRegion region, String urlString) {
- super(region, urlString);
- }
-
- @Override
- public void open() {
- TasksUiUtil.openTask(getURLString());
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskUrlHyperlinkDetector.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskUrlHyperlinkDetector.java
deleted file mode 100644
index 239a85a11..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskUrlHyperlinkDetector.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.StringTokenizer;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.Region;
-import org.eclipse.jface.text.hyperlink.AbstractHyperlinkDetector;
-import org.eclipse.jface.text.hyperlink.IHyperlink;
-
-/**
- * Source from {@link org.eclipse.jface.text.hyperlink.URLHyperlinkDetector}
- *
- * @author Rob Elves
- */
-public class TaskUrlHyperlinkDetector extends AbstractHyperlinkDetector {
-
- public IHyperlink[] detectHyperlinks(ITextViewer textViewer, IRegion region, boolean canShowMultipleHyperlinks) {
- if (region == null || textViewer == null) {
- return null;
- }
-
- IDocument document = textViewer.getDocument();
-
- int offset = region.getOffset();
-
- String urlString = null;
- if (document == null) {
- return null;
- }
-
- IRegion lineInfo;
- String line;
- try {
- lineInfo = document.getLineInformationOfOffset(offset);
- line = document.get(lineInfo.getOffset(), lineInfo.getLength());
- } catch (BadLocationException ex) {
- return null;
- }
-
- int offsetInLine = offset - lineInfo.getOffset();
-
- boolean startDoubleQuote = false;
- int urlOffsetInLine = 0;
- int urlLength = 0;
-
- int urlSeparatorOffset = line.indexOf("://"); //$NON-NLS-1$
- while (urlSeparatorOffset >= 0) {
-
- // URL protocol (left to "://")
- urlOffsetInLine = urlSeparatorOffset;
- char ch;
- do {
- urlOffsetInLine--;
- ch = ' ';
- if (urlOffsetInLine > -1) {
- ch = line.charAt(urlOffsetInLine);
- }
- startDoubleQuote = ch == '"';
- } while (Character.isUnicodeIdentifierStart(ch));
- urlOffsetInLine++;
-
- // Right to "://"
- StringTokenizer tokenizer = new StringTokenizer(line.substring(urlSeparatorOffset + 3),
- " \t\n\r\f<>", false); //$NON-NLS-1$
- if (!tokenizer.hasMoreTokens()) {
- return null;
- }
-
- urlLength = tokenizer.nextToken().length() + 3 + urlSeparatorOffset - urlOffsetInLine;
- if (offsetInLine >= urlOffsetInLine && offsetInLine <= urlOffsetInLine + urlLength) {
- break;
- }
-
- urlSeparatorOffset = line.indexOf("://", urlSeparatorOffset + 1); //$NON-NLS-1$
- }
-
- if (urlSeparatorOffset < 0) {
- return null;
- }
-
- if (startDoubleQuote) {
- int endOffset = -1;
- int nextDoubleQuote = line.indexOf('"', urlOffsetInLine);
- int nextWhitespace = line.indexOf(' ', urlOffsetInLine);
- if (nextDoubleQuote != -1 && nextWhitespace != -1) {
- endOffset = Math.min(nextDoubleQuote, nextWhitespace);
- } else if (nextDoubleQuote != -1) {
- endOffset = nextDoubleQuote;
- } else if (nextWhitespace != -1) {
- endOffset = nextWhitespace;
- }
- if (endOffset != -1) {
- urlLength = endOffset - urlOffsetInLine;
- }
- }
-
- // Set and validate URL string
- try {
- urlString = line.substring(urlOffsetInLine, urlOffsetInLine + urlLength);
- new URL(urlString);
- } catch (MalformedURLException ex) {
- urlString = null;
- return null;
- }
-
- IRegion urlRegion = new Region(lineInfo.getOffset() + urlOffsetInLine, urlLength);
- return new IHyperlink[] { new TaskUrlHyperlink(urlRegion, urlString) };
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TextAttributeEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TextAttributeEditor.java
deleted file mode 100644
index 8934a6757..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TextAttributeEditor.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.ui.editors;
-
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.mylyn.tasks.core.data.TaskDataModel;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractAttributeEditor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-
-/**
- * @author Steffen Pingel
- */
-public class TextAttributeEditor extends AbstractAttributeEditor {
-
- private Text text;
-
- public TextAttributeEditor(TaskDataModel manager, TaskAttribute taskAttribute) {
- super(manager, taskAttribute);
- }
-
- protected Text getText() {
- return text;
- }
-
- @Override
- public void createControl(Composite parent, FormToolkit toolkit) {
- if (isReadOnly()) {
- text = new Text(parent, SWT.FLAT | SWT.READ_ONLY);
- text.setFont(TEXT_FONT);
- toolkit.adapt(text, true, false);
- text.setData(FormToolkit.KEY_DRAW_BORDER, Boolean.FALSE);
- text.setText(getValue());
- } else {
- text = toolkit.createText(parent, getValue(), SWT.FLAT);
- text.setFont(TEXT_FONT);
- text.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- setValue(text.getText());
- }
- });
- }
- setControl(text);
- }
-
- public String getValue() {
- return getAttributeMapper().getValue(getTaskAttribute());
- }
-
- public void setValue(String text) {
- getAttributeMapper().setValue(getTaskAttribute(), text);
- attributeChanged();
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskAttributeDiff.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskAttributeDiff.java
deleted file mode 100644
index c83c17f50..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskAttributeDiff.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.notifications;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-
-/**
- * @author Steffen Pingel
- */
-public class TaskAttributeDiff {
-
- private String attributeId;
-
- private final TaskAttribute newAttribute;
-
- private final List<String> newValues;
-
- private final TaskAttribute oldAttribute;
-
- private final List<String> oldValues;
-
- public TaskAttributeDiff(TaskAttribute oldAttribute, TaskAttribute newAttribute) {
- Assert.isTrue(oldAttribute != null || newAttribute != null);
- this.oldAttribute = oldAttribute;
- this.newAttribute = newAttribute;
- if (oldAttribute != null) {
- this.oldValues = oldAttribute.getTaskData().getAttributeMapper().getValueLabels(oldAttribute);
- this.attributeId = oldAttribute.getId();
- } else {
- this.oldValues = Collections.emptyList();
- }
- if (newAttribute != null) {
- this.newValues = newAttribute.getTaskData().getAttributeMapper().getValueLabels(newAttribute);
- this.attributeId = newAttribute.getId();
- } else {
- this.newValues = Collections.emptyList();
- }
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj) {
- return true;
- }
- if (obj == null) {
- return false;
- }
- if (getClass() != obj.getClass()) {
- return false;
- }
- TaskAttributeDiff other = (TaskAttributeDiff) obj;
- if (attributeId == null) {
- if (other.attributeId != null) {
- return false;
- }
- } else if (!attributeId.equals(other.attributeId)) {
- return false;
- }
- return true;
- }
-
- public List<String> getAddedValues() {
- List<String> result = new ArrayList<String>(getNewValues());
- if (getOldValues() != null) {
- result.removeAll(getOldValues());
- }
- return result;
- }
-
- public TaskAttribute getNewAttribute() {
- return newAttribute;
- }
-
- public List<String> getNewValues() {
- return newValues;
- }
-
- public TaskAttribute getOldAttribute() {
- return oldAttribute;
- }
-
- public List<String> getOldValues() {
- return oldValues;
- }
-
- public List<String> getRemovedValues() {
- List<String> result = new ArrayList<String>(getOldValues());
- if (getNewValues() != null) {
- result.removeAll(getNewValues());
- }
- return result;
- }
-
- public boolean hasChanges() {
- return !oldValues.equals(newValues);
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((attributeId == null) ? 0 : attributeId.hashCode());
- return result;
- }
-
- public String getLabel() {
- if (newAttribute != null) {
- return newAttribute.getTaskData().getAttributeMapper().getLabel(newAttribute);
- } else {
- return oldAttribute.getTaskData().getAttributeMapper().getLabel(oldAttribute);
- }
- }
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskDataDiff.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskDataDiff.java
deleted file mode 100644
index 49d032d9d..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskDataDiff.java
+++ /dev/null
@@ -1,150 +0,0 @@
-package org.eclipse.mylyn.internal.tasks.ui.notifications;
-
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-import java.util.Collection;
-import java.util.LinkedHashSet;
-import java.util.Set;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.mylyn.tasks.core.IRepositoryModel;
-import org.eclipse.mylyn.tasks.core.ITaskComment;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.mylyn.tasks.core.data.TaskData;
-
-/**
- * @author Steffen Pingel
- */
-public class TaskDataDiff {
-
- private static final int MAX_CHANGED_ATTRIBUTES = 2;
-
- private final String[] ATTRIBUTES_IDS = new String[] { TaskAttribute.SUMMARY, TaskAttribute.DESCRIPTION,
- TaskAttribute.PRODUCT, TaskAttribute.PRIORITY, TaskAttribute.USER_ASSIGNED, };
-
- private final TaskData newTaskData;
-
- private final TaskData oldTaskData;
-
- private final Set<ITaskComment> newComments = new LinkedHashSet<ITaskComment>();
-
- private final Set<TaskAttributeDiff> changedAttributes = new LinkedHashSet<TaskAttributeDiff>();
-
- private final IRepositoryModel repositoryModel;
-
- public TaskDataDiff(IRepositoryModel repositoryModel, TaskData newTaskData, TaskData oldTaskData) {
- Assert.isNotNull(repositoryModel);
- Assert.isNotNull(newTaskData);
- this.repositoryModel = repositoryModel;
- this.newTaskData = newTaskData;
- this.oldTaskData = oldTaskData;
- parse();
- }
-
- public Collection<ITaskComment> getNewComments() {
- return newComments;
- }
-
- public Collection<TaskAttributeDiff> getChangedAttributes() {
- return changedAttributes;
- }
-
- private void parse() {
- for (String attributeId : ATTRIBUTES_IDS) {
- TaskAttribute newAttribute = newTaskData.getRoot().getMappedAttribute(attributeId);
- TaskAttribute oldAttribute = null;
- if (oldTaskData != null) {
- oldAttribute = oldTaskData.getRoot().getMappedAttribute(attributeId);
- }
- addChangedAttribute(oldAttribute, newAttribute);
- }
-
- // other attributes that have changed on newTaskData
- for (TaskAttribute newAttribute : newTaskData.getRoot().getAttributes().values()) {
- TaskAttribute oldAttribute = null;
- if (oldTaskData != null) {
- oldAttribute = oldTaskData.getRoot().getMappedAttribute(newAttribute.getPath());
- }
- addChangedAttribute(oldAttribute, newAttribute);
- }
- // other attributes that have been removed from newTaskData
- if (oldTaskData != null) {
- for (TaskAttribute oldAttribute : oldTaskData.getRoot().getAttributes().values()) {
- TaskAttribute newAttribute = newTaskData.getRoot().getMappedAttribute(oldAttribute.getPath());
- if (newAttribute == null) {
- addChangedAttribute(oldAttribute, newAttribute);
- }
- }
- }
- }
-
- private void addChangedAttribute(TaskAttribute oldAttribute, TaskAttribute newAttribute) {
- TaskAttribute attribute;
- if (newAttribute != null) {
- attribute = newAttribute;
- } else {
- attribute = oldAttribute;
- }
- String type = attribute.getMetaData().getType();
- if (TaskAttribute.TYPE_COMMENT.equals(type)) {
- addChangedComment(oldAttribute, newAttribute);
- } else if (TaskAttribute.TYPE_OPERATION.equals(type)) {
- // ignore
- } else if (attribute.getMetaData().getKind() != null) {
- TaskAttributeDiff diff = new TaskAttributeDiff(oldAttribute, newAttribute);
- if (diff.hasChanges()) {
- changedAttributes.add(diff);
- }
- }
- }
-
- private void addChangedComment(TaskAttribute oldAttribute, TaskAttribute newAttribute) {
- if (oldAttribute == null) {
- newComments.add(repositoryModel.createTaskComment(newAttribute));
- }
- }
-
- @Override
- public String toString() {
- return toString(60);
- }
-
- // TODO implement trim based on text width
- public String toString(int maxWidth) {
- StringBuilder sb = new StringBuilder();
- String sep = "";
- // append first comment
- int newCommentCount = newComments.size();
- if (newCommentCount > 0) {
- ITaskComment comment = newComments.iterator().next();
- sb.append(TaskDiffUtil.trim(TaskDiffUtil.commentToString(comment), 60));
- if (newCommentCount > 1) {
- sb.append(" (" + (newCommentCount - 1) + " more)");
- }
- sep = "\n";
- }
- // append changed attributes
- int n = 0;
- for (TaskAttributeDiff attributeDiff : changedAttributes) {
- String label = attributeDiff.getLabel();
- if (label != null) {
- sb.append(sep);
- sb.append(" ");
- sb.append(label);
- sb.append(" ");
- sb.append(TaskDiffUtil.trim(TaskDiffUtil.listToString(attributeDiff.getRemovedValues()), 28));
- sb.append(" -> ");
- sb.append(TaskDiffUtil.trim(TaskDiffUtil.listToString(attributeDiff.getAddedValues()), 28));
- if (++n == MAX_CHANGED_ATTRIBUTES) {
- break;
- }
- }
- }
- return sb.toString();
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskDiffUtil.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskDiffUtil.java
deleted file mode 100644
index 93fa4c4df..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskDiffUtil.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.notifications;
-
-import java.util.List;
-
-import org.eclipse.mylyn.tasks.core.IRepositoryPerson;
-import org.eclipse.mylyn.tasks.core.ITaskComment;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Drawable;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * @author Steffen Pingel
- */
-public class TaskDiffUtil {
-
- private static final String ELLIPSIS = "..."; //$NON-NLS-1$ // could use the ellipsis glyph on some platforms "\u2026"
-
- private static int DRAW_FLAGS = SWT.DRAW_MNEMONIC | SWT.DRAW_TAB | SWT.DRAW_TRANSPARENT | SWT.DRAW_DELIMITER;
-
- public static String commentToString(ITaskComment comment) {
- StringBuilder sb = new StringBuilder();
- sb.append("Comment by ");
- sb.append(personToString(comment.getAuthor()));
- sb.append(": ");
- sb.append(cleanCommentText(comment.getText()));
- return sb.toString();
- }
-
- private static String personToString(IRepositoryPerson author) {
- if (author == null) {
- return "Unknown";
- } else if (author.getName() != null) {
- return author.getName();
- }
- return author.getPersonId();
- }
-
- public static String cleanCommentText(String value) {
- String text = "";
- String[] lines = value.split("\n");
- boolean attachment = false;
- boolean needSeparator = false;
- for (String line : lines) {
- // skip comments and info lines
- if (attachment) {
- text += " attachment: " + line;
- needSeparator = true;
- attachment = false;
- } else if (line.startsWith(">") //
- || line.matches("^\\s*\\(In reply to comment.*")) {
- needSeparator = true;
- continue;
- } else if (line.startsWith("Created an attachment (id=")) {
- attachment = true;
- } else {
- if (needSeparator) {
- if (!text.matches(".*\\p{Punct}\\s*")) {
- text = text.trim();
- if (text.length() > 0) {
- text += ".";
- }
- }
- }
- text += " " + line;
- attachment = false;
- needSeparator = false;
- }
- }
- return foldSpaces(text);
-
- }
-
- public static String listToString(List<String> values) {
- if (values == null) {
- return "";
- }
-
- StringBuilder sb = new StringBuilder();
- boolean first = true;
- for (String value : values) {
- if (!first) {
- sb.append(", ");
- } else {
- first = false;
- }
- sb.append(foldSpaces(value));
- }
- return sb.toString();
- }
-
- public static String foldSpaces(String value) {
- return value.replaceAll("\\s", " ").trim();
- }
-
- public static String trim(String value, int length) {
- if (value.length() > length) {
- value = value.substring(0, length - 3) + "...";
- }
- return value;
- }
-
- /**
- * Note: Copied from CLabel.
- *
- * Shorten the given text <code>t</code> so that its length doesn't exceed the given width. The default
- * implementation replaces characters in the center of the original string with an ellipsis ("..."). Override if you
- * need a different strategy.
- *
- * @param gc
- * the gc to use for text measurement
- * @param t
- * the text to shorten
- * @param width
- * the width to shorten the text to, in pixels
- * @return the shortened text
- */
- public static final String shortenText2(Composite composite, String t, int width) {
- GC gc = new GC(composite);
-
- if (t == null) {
- return null;
- }
- int w = gc.textExtent(ELLIPSIS, DRAW_FLAGS).x;
- if (width <= w) {
- return t;
- }
- int l = t.length();
- int max = l / 2;
- int min = 0;
- int mid = (max + min) / 2 - 1;
- if (mid <= 0) {
- return t;
- }
- while (min < mid && mid < max) {
- String s1 = t.substring(0, mid);
- String s2 = t.substring(l - mid, l);
- int l1 = gc.textExtent(s1, DRAW_FLAGS).x;
- int l2 = gc.textExtent(s2, DRAW_FLAGS).x;
- if (l1 + w + l2 > width) {
- max = mid;
- mid = (max + min) / 2;
- } else if (l1 + w + l2 < width) {
- min = mid;
- mid = (max + min) / 2;
- } else {
- min = max;
- }
- }
-
- gc.dispose();
-
- if (mid == 0) {
- return t;
- }
- return t.substring(0, mid) + ELLIPSIS + t.substring(l - mid, l);
- }
-
- // From PerspectiveBarContributionItem
- public static String shortenText(Drawable composite, String text, int maxWidth) {
- String returnText = text;
- GC gc = new GC(composite);
- if (gc.textExtent(text).x > maxWidth) {
- for (int i = text.length(); i > 0; i--) {
- String subString = text.substring(0, i);
- subString = subString + "...";
- if (gc.textExtent(subString).x < maxWidth) {
- returnText = subString;
- break;
- }
- }
- }
- gc.dispose();
- return returnText;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskListNotification.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskListNotification.java
deleted file mode 100644
index fd5df5e56..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskListNotification.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.notifications;
-
-import java.util.Date;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.jface.viewers.DecoratingLabelProvider;
-import org.eclipse.mylyn.internal.provisional.commons.ui.AbstractNotification;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITask.SynchronizationState;
-import org.eclipse.mylyn.tasks.ui.TaskElementLabelProvider;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Rob Elves
- * @author Mik Kersten
- */
-public class TaskListNotification extends AbstractNotification {
-
- protected final ITask task;
-
- protected Date date;
-
- private String description;
-
- private final DecoratingLabelProvider labelProvider = new DecoratingLabelProvider(
- new TaskElementLabelProvider(true), PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator());
-
- public TaskListNotification(ITask task) {
- Assert.isNotNull(task);
- this.task = task;
- }
-
- @Override
- public String getDescription() {
- return description;
- }
-
- @Override
- public String getLabel() {
- return labelProvider.getText(task);
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- @Override
- public void open() {
- PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
- public void run() {
- TasksUiInternal.refreshAndOpenTaskListElement(task);
- }
- });
- }
-
- @Override
- public Image getNotificationImage() {
- return labelProvider.getImage(task);
- }
-
- protected ITask getTask() {
- return task;
- }
-
- @Override
- public Image getNotificationKindImage() {
- if (task.getSynchronizationState() == SynchronizationState.INCOMING_NEW) {
- return CommonImages.getImage(CommonImages.OVERLAY_SYNC_INCOMMING_NEW);
- } else {
- return CommonImages.getImage(CommonImages.OVERLAY_SYNC_INCOMMING);
- }
- }
-
- @Override
- public Date getDate() {
- return date;
- }
-
- @Override
- public void setDate(Date date) {
- this.date = date;
- }
-
- public int compareTo(AbstractNotification anotherNotification) throws ClassCastException {
- if (!(anotherNotification != null)) {
- throw new ClassCastException("A ITaskListNotification object expected.");
- }
- Date anotherDate = (anotherNotification).getDate();
- if (date != null && anotherDate != null) {
- return date.compareTo(anotherDate);
- } else if (date == null) {
- return -1;
- } else {
- return 1;
- }
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((date == null) ? 0 : date.hashCode());
- result = prime * result + ((description == null) ? 0 : description.hashCode());
- result = prime * result + ((task == null) ? 0 : task.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;
- }
- TaskListNotification other = (TaskListNotification) obj;
- if (date == null) {
- if (other.date != null) {
- return false;
- }
- } else if (!date.equals(other.date)) {
- return false;
- }
- if (description == null) {
- if (other.description != null) {
- return false;
- }
- } else if (!description.equals(other.description)) {
- return false;
- }
- if (task == null) {
- if (other.task != null) {
- return false;
- }
- } else if (!task.equals(other.task)) {
- return false;
- }
- return true;
- }
-
- @SuppressWarnings("unchecked")
- public Object getAdapter(Class adapter) {
- if (adapter == AbstractTask.class) {
- return task;
- }
- return null;
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskListNotificationPopup.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskListNotificationPopup.java
deleted file mode 100644
index 245f21717..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskListNotificationPopup.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.notifications;
-
-import java.util.List;
-
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.mylyn.internal.provisional.commons.ui.AbstractNotification;
-import org.eclipse.mylyn.internal.provisional.commons.ui.AbstractNotificationPopup;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.ui.TaskListHyperlink;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.MouseAdapter;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.forms.events.HyperlinkAdapter;
-import org.eclipse.ui.forms.events.HyperlinkEvent;
-
-/**
- * @author Rob Elves
- * @author Mik Kersten
- */
-public class TaskListNotificationPopup extends AbstractNotificationPopup {
-
- private static final String NOTIFICATIONS_HIDDEN = "more, Open Task List to view";
-
- private static final int NUM_NOTIFICATIONS_TO_DISPLAY = 4;
-
- private List<AbstractNotification> notifications;
-
- public TaskListNotificationPopup(Shell parent) {
- super(parent.getDisplay());
- }
-
- public void setContents(List<AbstractNotification> notifications) {
- this.notifications = notifications;
- }
-
- @Override
- protected void createTitleArea(Composite parent) {
- super.createTitleArea(parent);
- }
-
- @Override
- protected void createContentArea(Composite parent) {
- int count = 0;
- for (final AbstractNotification notification : notifications) {
- Composite notificationComposite = new Composite(parent, SWT.NO_FOCUS);
- notificationComposite.setLayout(new GridLayout(2, false));
- notificationComposite.setBackground(parent.getBackground());
-
- if (count < NUM_NOTIFICATIONS_TO_DISPLAY) {
- final Label notificationLabelIcon = new Label(notificationComposite, SWT.NO_FOCUS);
- notificationLabelIcon.setBackground(parent.getBackground());
- notificationLabelIcon.setImage(notification.getNotificationKindImage());
- if (!(notification instanceof TaskListNotificationReminder)) {
- final AbstractTask task = (AbstractTask) notification.getAdapter(AbstractTask.class);
- if (task != null) {
- notificationLabelIcon.addMouseListener(new MouseAdapter() {
- @Override
- public void mouseUp(MouseEvent e) {
- TasksUiPlugin.getTaskDataManager().setTaskRead(task, true);
- notificationLabelIcon.setImage(null);
- notificationLabelIcon.setToolTipText(null);
- }
- });
- notificationLabelIcon.setToolTipText("Mark Task Read");
- }
- }
-
- final TaskListHyperlink itemLink = new TaskListHyperlink(notificationComposite, SWT.BEGINNING
- | SWT.WRAP | SWT.NO_FOCUS);
- itemLink.setText(notification.getLabel());
- itemLink.setImage(notification.getNotificationImage());
- itemLink.setBackground(parent.getBackground());
- itemLink.addHyperlinkListener(new HyperlinkAdapter() {
- @Override
- public void linkActivated(HyperlinkEvent e) {
- notification.open();
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- if (window != null) {
- Shell windowShell = window.getShell();
- if (windowShell != null) {
- if (windowShell.getMinimized()) {
- windowShell.setMinimized(false);
- }
-
- windowShell.open();
- windowShell.forceActive();
- }
- }
- }
- });
-
- String descriptionText = null;
- if (notification.getDescription() != null) {
- descriptionText = notification.getDescription();
- }
- if (descriptionText != null && !descriptionText.trim().equals("")) {
- Label descriptionLabel = new Label(notificationComposite, SWT.NO_FOCUS);
- descriptionLabel.setText(descriptionText);
- descriptionLabel.setBackground(parent.getBackground());
- GridDataFactory.fillDefaults().span(2, SWT.DEFAULT).applyTo(descriptionLabel);
- }
- } else {
- int numNotificationsRemain = notifications.size() - count;
- TaskListHyperlink remainingHyperlink = new TaskListHyperlink(notificationComposite, SWT.NO_FOCUS);
- remainingHyperlink.setBackground(parent.getBackground());
-
- remainingHyperlink.setText(numNotificationsRemain + " " + NOTIFICATIONS_HIDDEN);
- GridDataFactory.fillDefaults().span(2, SWT.DEFAULT).applyTo(remainingHyperlink);
- remainingHyperlink.addHyperlinkListener(new HyperlinkAdapter() {
- @Override
- public void linkActivated(HyperlinkEvent e) {
- TasksUiUtil.openTasksViewInActivePerspective().setFocus();
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- if (window != null) {
- Shell windowShell = window.getShell();
- if (windowShell != null) {
- windowShell.setMaximized(true);
- windowShell.open();
- }
- }
- }
- });
- break;
- }
- count++;
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskListNotificationQueryIncoming.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskListNotificationQueryIncoming.java
deleted file mode 100644
index 49757c078..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskListNotificationQueryIncoming.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.notifications;
-
-import java.util.Date;
-
-import org.eclipse.mylyn.internal.provisional.commons.ui.AbstractNotification;
-import org.eclipse.mylyn.tasks.core.ITask;
-
-/**
- * @author Rob Elves
- */
-public class TaskListNotificationQueryIncoming extends TaskListNotification {
-
- public TaskListNotificationQueryIncoming(ITask task) {
- super(task);
- }
-
- @Override
- public String getDescription() {
- return task.getSummary();
- }
-
- @Override
- public int compareTo(AbstractNotification anotherNotification) throws ClassCastException {
- if (!(anotherNotification != null)) {
- throw new ClassCastException("A ITaskListNotification object expected.");
- }
- Date anotherDate = (anotherNotification).getDate();
- if (date != null && anotherDate != null) {
- return date.compareTo(anotherDate);
- } else if (date == null) {
- return -1;
- } else {
- return 1;
- }
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskListNotificationReminder.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskListNotificationReminder.java
deleted file mode 100644
index a2f351fd5..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskListNotificationReminder.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.notifications;
-
-import java.util.Date;
-
-import org.eclipse.mylyn.internal.provisional.commons.ui.AbstractNotification;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * @author Rob Elves
- * @author Mik Kersten
- */
-public class TaskListNotificationReminder extends TaskListNotification {
-
- public TaskListNotificationReminder(AbstractTask task) {
- super(task);
- }
-
- @Override
- public Image getNotificationKindImage() {
- return CommonImages.getImage(CommonImages.OVERLAY_DATE_DUE);
- }
-
- @Override
- public int compareTo(AbstractNotification anotherNotification) throws ClassCastException {
- if (!(anotherNotification != null)) {
- throw new ClassCastException("A ITaskListNotification object expected.");
- }
- Date anotherDate = (anotherNotification).getDate();
- if (date != null && anotherDate != null) {
- return date.compareTo(anotherDate);
- } else if (date == null) {
- return -1;
- } else {
- return 1;
- }
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskListNotifier.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskListNotifier.java
deleted file mode 100644
index 49ff8da90..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/notifications/TaskListNotifier.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.notifications;
-
-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.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.provisional.commons.ui.AbstractNotification;
-import org.eclipse.mylyn.internal.tasks.core.data.ITaskDataManagerListener;
-import org.eclipse.mylyn.internal.tasks.core.data.TaskDataManager;
-import org.eclipse.mylyn.internal.tasks.core.data.TaskDataManagerEvent;
-import org.eclipse.mylyn.internal.tasks.ui.ITaskListNotificationProvider;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.IRepositoryModel;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITask.SynchronizationState;
-import org.eclipse.mylyn.tasks.core.data.ITaskDataWorkingCopy;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-
-/**
- * @author Steffen Pingel
- */
-public class TaskListNotifier implements ITaskDataManagerListener, ITaskListNotificationProvider {
-
- private final TaskDataManager taskDataManager;
-
- private final List<TaskListNotification> notificationQueue = new ArrayList<TaskListNotification>();
-
- private final IRepositoryModel repositoryModel;
-
- public TaskListNotifier(IRepositoryModel repositoryModel, TaskDataManager taskDataManager) {
- this.repositoryModel = repositoryModel;
- this.taskDataManager = taskDataManager;
- this.taskDataManager.addListener(this);
- }
-
- public TaskListNotification getNotification(ITask task) {
- if (task.getSynchronizationState() == SynchronizationState.INCOMING_NEW) {
- TaskListNotification notification = new TaskListNotification(task);
- notification.setDescription("New unread task");
- return notification;
- } else if (task.getSynchronizationState() == SynchronizationState.INCOMING) {
- TaskDataDiff diff = getDiff(task);
- if (diff != null) {
- TaskListNotification notification = new TaskListNotification(task);
- notification.setDescription(diff.toString());
- return notification;
- }
- }
- return null;
- }
-
- public TaskDataDiff getDiff(ITask task) {
- ITaskDataWorkingCopy workingCopy;
- try {
- workingCopy = taskDataManager.getTaskDataState(task);
- TaskDataDiff diff = new TaskDataDiff(repositoryModel, workingCopy.getRepositoryData(),
- workingCopy.getLastReadData());
- return diff;
- } catch (CoreException e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Failed to get task data for task: \""
- + task + "\"", e));
- }
- return null;
- }
-
- public void taskDataUpdated(TaskDataManagerEvent event) {
- if (event.getToken() != null) {
- AbstractRepositoryConnectorUi connectorUi = TasksUi.getRepositoryConnectorUi(event.getTaskData()
- .getConnectorKind());
- if (!connectorUi.hasCustomNotifications()) {
- TaskListNotification notification = getNotification(event.getTask());
- if (notification != null) {
- synchronized (notificationQueue) {
- notificationQueue.add(notification);
- }
- }
- }
- }
- }
-
- public Set<AbstractNotification> getNotifications() {
- synchronized (notificationQueue) {
- if (notificationQueue.isEmpty()) {
- return Collections.emptySet();
- }
- HashSet<AbstractNotification> result = new HashSet<AbstractNotification>(notificationQueue);
- notificationQueue.clear();
- return result;
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/preferences/TaskFocusedUiPreferencePage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/preferences/TaskFocusedUiPreferencePage.java
deleted file mode 100644
index b5d3fea63..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/preferences/TaskFocusedUiPreferencePage.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.preferences;
-
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-
-/**
- * @author Mik Kersten
- */
-public class TaskFocusedUiPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
-
- @Override
- protected Control createContents(Composite parent) {
- Composite container = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout(1, false);
- container.setLayout(layout);
-
- Label label = new Label(container, SWT.NULL);
- label.setText("Please select a preference page below \"Mylyn\".");
-
- return container;
- }
-
- public void init(IWorkbench workbench) {
- // ignore
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/preferences/TasksUiPreferencePage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/preferences/TasksUiPreferencePage.java
deleted file mode 100644
index 9cdb91251..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/preferences/TasksUiPreferencePage.java
+++ /dev/null
@@ -1,756 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.ui.preferences;
-
-import java.io.File;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.monitor.ui.ActivityContextManager;
-import org.eclipse.mylyn.internal.monitor.ui.MonitorUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.ITasksUiPreferenceConstants;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.DirectoryDialog;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Spinner;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.dialogs.PreferenceLinkArea;
-import org.eclipse.ui.forms.events.ExpansionAdapter;
-import org.eclipse.ui.forms.events.ExpansionEvent;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
-
-/**
- * @author Mik Kersten
- * @author Rob Elves
- */
-public class TasksUiPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
-
- public static final String ID = "org.eclipse.mylyn.tasks.ui.preferences";
-
- private static final String FOLDER_SELECTION_MESSAGE = "Specify the folder for tasks";
-
- private static final String TITLE_FOLDER_SELECTION = "Folder Selection";
-
- private static final String LABEL_ACTIVITY_TIMEOUT = "Stop time accumulation after";
-
- private static final String LABEL_ACTIVITY_TIMEOUT2 = "minutes of inactivity.";
-
- private static final String END_HOUR_LABEL = "Work day end (24hr): ";
-
- private static final String START_HOUR_LABEL = "Work day start (24hr): ";
-
- private static final String GROUP_WORK_WEEK_LABEL = "Scheduling";
-
- private static final String GROUP_TASK_TIMING = "Task Timing";
-
- private static final String FORWARDSLASH = "/";
-
- private static final String BACKSLASH_MULTI = "\\\\";
-
- private static final int MS_MINUTES = 60 * 1000;
-
- private Button useRichEditor;
-
- private Button useWebBrowser;
-
- private Text synchScheduleTime = null;
-
- private Button enableBackgroundSynch;
-
- private Text taskDirectoryText = null;
-
- private Button browse = null;
-
- private Button notificationEnabledButton = null;
-
-// private final Button backupNow = null;
-
-// private Text backupScheduleTimeText;
-
-// private Text backupFolderText;
-
-// private Spinner hourDayStart;
-
-// private Spinner hourDayEnd;
-
- private int taskDataDirectoryAction = -1;
-
- private final FormToolkit toolkit;
-
- private Spinner timeoutMinutes;
-
- private Button timeoutEnabledButton;
-
- private ExpandableComposite advancedComposite;
-
- private Combo weekStartCombo;
-
- public TasksUiPreferencePage() {
- super();
- setPreferenceStore(TasksUiPlugin.getDefault().getPreferenceStore());
- toolkit = new FormToolkit(Display.getCurrent());
-
- }
-
- @Override
- protected Control createContents(Composite parent) {
- Composite container = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout(1, false);
- container.setLayout(layout);
-
- if (getContainer() instanceof IWorkbenchPreferenceContainer) {
- String message = "See <a>''{0}''</a> for configuring Task List colors.";
- new PreferenceLinkArea(container, SWT.NONE, "org.eclipse.ui.preferencePages.ColorsAndFonts", message,
- (IWorkbenchPreferenceContainer) getContainer(), null);
- }
-
- createTaskRefreshScheduleGroup(container);
- createSchedulingGroup(container);
- createOpenWith(container);
- Composite advanced = createAdvancedSection(container);
- createTaskActivityGroup(advanced);
- createTaskDataControl(advanced);
-
- updateRefreshGroupEnablements();
- return container;
- }
-
- private Composite createAdvancedSection(Composite container) {
- advancedComposite = toolkit.createExpandableComposite(container, ExpandableComposite.COMPACT
- | ExpandableComposite.TWISTIE | ExpandableComposite.TITLE_BAR);
- advancedComposite.setFont(container.getFont());
- advancedComposite.setBackground(container.getBackground());
- advancedComposite.setText("Advanced");
- advancedComposite.setLayout(new GridLayout(1, false));
- advancedComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- advancedComposite.addExpansionListener(new ExpansionAdapter() {
- @Override
- public void expansionStateChanged(ExpansionEvent e) {
- getControl().getShell().pack();
- }
- });
-
- Composite advanced = new Composite(advancedComposite, SWT.NONE);
- advanced.setLayout(new GridLayout(1, false));
- advancedComposite.setClient(advanced);
- return advanced;
- }
-
- public void init(IWorkbench workbench) {
- // TODO Auto-generated method stub
- }
-
- @Override
- public boolean performOk() {
- getPreferenceStore().setValue(ITasksUiPreferenceConstants.NOTIFICATIONS_ENABLED,
- notificationEnabledButton.getSelection());
- //getPreferenceStore().setValue(TasksUiPreferenceConstants.BACKUP_SCHEDULE, backupScheduleTimeText.getText());
-
- getPreferenceStore().setValue(ITasksUiPreferenceConstants.EDITOR_TASKS_RICH, useRichEditor.getSelection());
-
- getPreferenceStore().setValue(ITasksUiPreferenceConstants.REPOSITORY_SYNCH_SCHEDULE_ENABLED,
- enableBackgroundSynch.getSelection());
- long miliseconds = 60000 * Long.parseLong(synchScheduleTime.getText());
- getPreferenceStore().setValue(ITasksUiPreferenceConstants.REPOSITORY_SYNCH_SCHEDULE_MILISECONDS,
- "" + miliseconds);
-
- getPreferenceStore().setValue(ITasksUiPreferenceConstants.WEEK_START_DAY, getWeekStartValue());
- //getPreferenceStore().setValue(TasksUiPreferenceConstants.PLANNING_STARTHOUR, hourDayStart.getSelection());
-// getPreferenceStore().setValue(TasksUiPreferenceConstants.PLANNING_ENDHOUR, hourDayEnd.getSelection());
- MonitorUiPlugin.getDefault().getPreferenceStore().setValue(ActivityContextManager.ACTIVITY_TIMEOUT_ENABLED,
- timeoutEnabledButton.getSelection());
- MonitorUiPlugin.getDefault().getPreferenceStore().setValue(ActivityContextManager.ACTIVITY_TIMEOUT,
- timeoutMinutes.getSelection() * (60 * 1000));
- //backupNow.setEnabled(true);
-
- String taskDirectory = taskDirectoryText.getText();
- taskDirectory = taskDirectory.replaceAll(BACKSLASH_MULTI, FORWARDSLASH);
-
- if (!taskDirectory.equals(TasksUiPlugin.getDefault().getDataDirectory())) {
- if (taskDataDirectoryAction == IDialogConstants.OK_ID) {
- Exception exception = null;
- try {
- TasksUiPlugin.getDefault().setDataDirectory(taskDirectory, new NullProgressMonitor());
- } catch (CoreException e) {
- exception = e;
- StatusHandler.log(e.getStatus());
- MessageDialog.openError(getShell(), "Task Data Directory Error",
- "Error applying Task List data directory changes. The previous setting will be restored.");
-
- } catch (OperationCanceledException ce) {
- exception = ce;
- }
- if (exception != null && !taskDirectoryText.isDisposed()) {
- String originalDirectory = TasksUiPlugin.getDefault().getDefaultDataDirectory();
- if (!taskDirectory.equals(originalDirectory)) {
- taskDirectoryText.setText(originalDirectory);
- }
- }
-
- } else if (taskDataDirectoryAction == IDialogConstants.CANCEL_ID) {
- // shouldn't get here
- }
- }
-
- return true;
- }
-
- private int getWeekStartValue() {
- return weekStartCombo.getSelectionIndex() + 1;
- }
-
- @Override
- public boolean performCancel() {
- taskDirectoryText.setText(TasksUiPlugin.getDefault().getDefaultDataDirectory());
- notificationEnabledButton.setSelection(getPreferenceStore().getBoolean(
- ITasksUiPreferenceConstants.NOTIFICATIONS_ENABLED));
- //backupScheduleTimeText.setText(getPreferenceStore().getString(TasksUiPreferenceConstants.BACKUP_SCHEDULE));
- //backupFolderText.setText(TasksUiPlugin.getDefault().getBackupFolderPath());
-
- useRichEditor.setSelection(getPreferenceStore().getBoolean(ITasksUiPreferenceConstants.EDITOR_TASKS_RICH));
- // synchQueries.setSelection(getPreferenceStore().getBoolean(
- // TaskListPreferenceConstants.REPOSITORY_SYNCH_ON_STARTUP));
- enableBackgroundSynch.setSelection(getPreferenceStore().getBoolean(
- ITasksUiPreferenceConstants.REPOSITORY_SYNCH_SCHEDULE_ENABLED));
- synchScheduleTime.setText(getMinutesString());
-
- weekStartCombo.select(getPreferenceStore().getInt(ITasksUiPreferenceConstants.WEEK_START_DAY) - 1);
- //hourDayStart.setSelection(getPreferenceStore().getInt(TasksUiPreferenceConstants.PLANNING_STARTHOUR));
-// hourDayEnd.setSelection(getPreferenceStore().getInt(TasksUiPreferenceConstants.PLANNING_ENDHOUR));
- //backupNow.setEnabled(true);
- int minutes = MonitorUiPlugin.getDefault().getPreferenceStore().getInt(ActivityContextManager.ACTIVITY_TIMEOUT)
- / MS_MINUTES;
- timeoutMinutes.setSelection(minutes);
- timeoutEnabledButton.setSelection(MonitorUiPlugin.getDefault().getPreferenceStore().getBoolean(
- ActivityContextManager.ACTIVITY_TIMEOUT_ENABLED));
- return true;
- }
-
- @Override
- public void performDefaults() {
- super.performDefaults();
- String taskDirectory = TasksUiPlugin.getDefault().getDefaultDataDirectory();
- if (!taskDirectory.equals(TasksUiPlugin.getDefault().getDataDirectory())) {
- checkForExistingTasklist(taskDirectory);
- if (taskDataDirectoryAction != IDialogConstants.CANCEL_ID) {
- taskDirectoryText.setText(taskDirectory);
-// backupFolderText.setText(taskDirectory + FORWARDSLASH + ITasksCoreConstants.DEFAULT_BACKUP_FOLDER_NAME);
-// backupNow.setEnabled(false);
- }
- } else {
- taskDirectoryText.setText(taskDirectory);
-// backupFolderText.setText(taskDirectory + FORWARDSLASH + ITasksCoreConstants.DEFAULT_BACKUP_FOLDER_NAME);
-// backupNow.setEnabled(true);
- }
-
- notificationEnabledButton.setSelection(getPreferenceStore().getDefaultBoolean(
- ITasksUiPreferenceConstants.NOTIFICATIONS_ENABLED));
- //backupScheduleTimeText.setText(getPreferenceStore().getDefaultString(TasksUiPreferenceConstants.BACKUP_SCHEDULE));
-
- useRichEditor.setSelection(getPreferenceStore().getDefaultBoolean(ITasksUiPreferenceConstants.EDITOR_TASKS_RICH));
-
- // synchQueries.setSelection(getPreferenceStore().getDefaultBoolean(
- // TaskListPreferenceConstants.REPOSITORY_SYNCH_ON_STARTUP));
- enableBackgroundSynch.setSelection(getPreferenceStore().getDefaultBoolean(
- ITasksUiPreferenceConstants.REPOSITORY_SYNCH_SCHEDULE_ENABLED));
- // userRefreshOnly.setSelection(!enableBackgroundSynch.getSelection());
- long miliseconds = getPreferenceStore().getDefaultLong(
- ITasksUiPreferenceConstants.REPOSITORY_SYNCH_SCHEDULE_MILISECONDS);
- long minutes = miliseconds / 60000;
- synchScheduleTime.setText("" + minutes);
- weekStartCombo.select(getPreferenceStore().getDefaultInt(ITasksUiPreferenceConstants.WEEK_START_DAY) - 1);
- // hourDayStart.setSelection(getPreferenceStore().getDefaultInt(TasksUiPreferenceConstants.PLANNING_STARTHOUR));
-// hourDayEnd.setSelection(getPreferenceStore().getDefaultInt(TasksUiPreferenceConstants.PLANNING_ENDHOUR));
- int activityTimeoutMinutes = MonitorUiPlugin.getDefault().getPreferenceStore().getDefaultInt(
- ActivityContextManager.ACTIVITY_TIMEOUT)
- / MS_MINUTES;
- timeoutMinutes.setSelection(activityTimeoutMinutes);
- timeoutEnabledButton.setSelection(MonitorUiPlugin.getDefault().getPreferenceStore().getDefaultBoolean(
- ActivityContextManager.ACTIVITY_TIMEOUT_ENABLED));
- updateRefreshGroupEnablements();
- }
-
- private void createTaskRefreshScheduleGroup(Composite parent) {
- Group group = new Group(parent, SWT.SHADOW_ETCHED_IN);
- group.setText("Synchronization");
- GridLayout gridLayout = new GridLayout(1, false);
- group.setLayout(gridLayout);
-
- group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- Composite enableSynch = new Composite(group, SWT.NULL);
- gridLayout = new GridLayout(4, false);
- gridLayout.marginWidth = 0;
- gridLayout.marginHeight = 0;
- enableSynch.setLayout(gridLayout);
- enableBackgroundSynch = new Button(enableSynch, SWT.CHECK);
- enableBackgroundSynch.setText("Synchronize with repositories every");
- enableBackgroundSynch.setSelection(getPreferenceStore().getBoolean(
- ITasksUiPreferenceConstants.REPOSITORY_SYNCH_SCHEDULE_ENABLED));
- enableBackgroundSynch.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- updateRefreshGroupEnablements();
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- }
- });
- synchScheduleTime = new Text(enableSynch, SWT.BORDER | SWT.RIGHT);
- GridData gridData = new GridData();
- gridData.widthHint = 25;
- synchScheduleTime.setLayoutData(gridData);
- synchScheduleTime.setText(getMinutesString());
- synchScheduleTime.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- updateRefreshGroupEnablements();
- }
- });
- Label label = new Label(enableSynch, SWT.NONE);
- label.setText("minutes");
-
- notificationEnabledButton = new Button(group, SWT.CHECK);
- notificationEnabledButton.setText("Display notifications for overdue tasks and incoming changes");
- notificationEnabledButton.setSelection(getPreferenceStore().getBoolean(
- ITasksUiPreferenceConstants.NOTIFICATIONS_ENABLED));
-
- }
-
- private void createOpenWith(Composite parent) {
- Group container = new Group(parent, SWT.SHADOW_ETCHED_IN);
- container.setLayout(new GridLayout(3, false));
- container.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- container.setText("Task Editing");
- useRichEditor = new Button(container, SWT.RADIO);
- useRichEditor.setText("Rich Editor (Recommended)");
- useRichEditor.setSelection(getPreferenceStore().getBoolean(ITasksUiPreferenceConstants.EDITOR_TASKS_RICH));
- useWebBrowser = new Button(container, SWT.RADIO);
- useWebBrowser.setText("Web Browser");
- useWebBrowser.setSelection(!getPreferenceStore().getBoolean(ITasksUiPreferenceConstants.EDITOR_TASKS_RICH));
- }
-
- private void createTaskDataControl(Composite parent) {
-
- Group taskDataGroup = new Group(parent, SWT.SHADOW_ETCHED_IN);
- taskDataGroup.setText("Task Data");
- taskDataGroup.setLayout(new GridLayout(1, false));
- taskDataGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- Composite dataDirComposite = new Composite(taskDataGroup, SWT.NULL);
- GridLayout gridLayout = new GridLayout(3, false);
- gridLayout.marginWidth = 0;
- gridLayout.marginHeight = 0;
- dataDirComposite.setLayout(gridLayout);
- dataDirComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- Label label = new Label(dataDirComposite, SWT.NULL);
- label.setText("Data directory: ");
-
- String taskDirectory = TasksUiPlugin.getDefault().getDataDirectory();
- taskDirectory = taskDirectory.replaceAll(BACKSLASH_MULTI, FORWARDSLASH);
- taskDirectoryText = new Text(dataDirComposite, SWT.BORDER);
- taskDirectoryText.setText(taskDirectory);
- taskDirectoryText.setEditable(false);
- taskDirectoryText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- browse = new Button(dataDirComposite, SWT.TRAIL);
- browse.setText("Browse...");
- browse.addSelectionListener(new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- DirectoryDialog dialog = new DirectoryDialog(getShell());
- dialog.setText(TITLE_FOLDER_SELECTION);
- dialog.setMessage(FOLDER_SELECTION_MESSAGE);
- String dir = taskDirectoryText.getText();
- dir = dir.replaceAll(BACKSLASH_MULTI, FORWARDSLASH);
- dialog.setFilterPath(dir);
-
- dir = dialog.open();
- if (dir == null || dir.equals("")) {
- return;
- }
- dir = dir.replaceAll(BACKSLASH_MULTI, FORWARDSLASH);
- checkForExistingTasklist(dir);
-
- if (taskDataDirectoryAction != IDialogConstants.CANCEL_ID) {
- taskDirectoryText.setText(dir);
-// backupFolderText.setText(dir + FORWARDSLASH + ITasksCoreConstants.DEFAULT_BACKUP_FOLDER_NAME);
-// backupNow.setEnabled(false);
- }
- }
-
- });
-
-// Composite backupComposite = new Composite(taskDataGroup, SWT.NULL);
-// gridLayout = new GridLayout(5, false);
-// gridLayout.marginWidth = 0;
-// gridLayout.marginHeight = 0;
-// backupComposite.setLayout(gridLayout);
-// backupComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
-// label = new Label(backupComposite, SWT.NULL);
-// label.setText("Backup every");
-// backupScheduleTimeText = new Text(backupComposite, SWT.BORDER | SWT.RIGHT);
-// final GridData gridData_1 = new GridData();
-// gridData_1.widthHint = 13;
-// backupScheduleTimeText.setLayoutData(gridData_1);
-//
-// backupScheduleTimeText.setText("" + getPreferenceStore().getInt(TasksUiPreferenceConstants.BACKUP_SCHEDULE));
-// backupScheduleTimeText.addModifyListener(new ModifyListener() {
-// public void modifyText(ModifyEvent e) {
-// updateRefreshGroupEnablements();
-// }
-// });
-//
-// label = new Label(backupComposite, SWT.NONE);
-// label.setText("days to");
-
-// String backupDirectory = TasksUiPlugin.getDefault().getBackupFolderPath();// getPreferenceStore().getString(TaskListPreferenceConstants.BACKUP_FOLDER);
-// backupDirectory = backupDirectory.replaceAll(BACKSLASH_MULTI, FORWARDSLASH);
-// backupFolderText = new Text(backupComposite, SWT.BORDER);
-// backupFolderText.setText(backupDirectory);
-// backupFolderText.setEditable(false);
-// backupFolderText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-//
-// backupNow = new Button(backupComposite, SWT.NONE);
-// backupNow.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-// backupNow.setText("Backup Now");
-// backupNow.addSelectionListener(new SelectionAdapter() {
-//
-// @Override
-// public void widgetSelected(SelectionEvent e) {
-// TasksUiPlugin.getBackupManager().backupNow(true);
-// }
-// });
- }
-
- private void createSchedulingGroup(Composite container) {
- Group group = new Group(container, SWT.SHADOW_ETCHED_IN);
- group.setText(GROUP_WORK_WEEK_LABEL);
- group.setLayout(new GridLayout(5, false));
- group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- Label weekStartLabel = new Label(group, SWT.NONE);
- weekStartLabel.setText("Week Start:");
- weekStartCombo = new Combo(group, SWT.READ_ONLY);
- // Note: Calendar.SUNDAY = 1
- weekStartCombo.add("SUNDAY");
- weekStartCombo.add("MONDAY");
- weekStartCombo.select(getPreferenceStore().getInt(ITasksUiPreferenceConstants.WEEK_START_DAY) - 1);
-
-// Label workWeekBeginLabel = new Label(group, SWT.NONE);
-// workWeekBeginLabel.setText(START_DAY_LABEL);
-// workWeekBegin = new Combo(group, SWT.READ_ONLY);
-// // Calendar.SUNDAY = 1
-// workWeekBegin.add("SUNDAY");
-// workWeekBegin.add("MONDAY");
-// workWeekBegin.add("TUESDAY");
-// workWeekBegin.add("WEDNESDAY");
-// workWeekBegin.add("THURSDAY");
-// workWeekBegin.add("FRIDAY");
-// workWeekBegin.add("SATURDAY");
-// workWeekBegin.select(getPreferenceStore().getInt(TaskListPreferenceConstants.PLANNING_STARTDAY)
-// - 1);
-
-// Label workWeekEndLabel = new Label(group, SWT.NONE);
-// workWeekEndLabel.setText(END_DAY_LABEL);
-// workWeekEnd = new Combo(group, SWT.READ_ONLY);
-// workWeekEnd.add("SUNDAY");
-// workWeekEnd.add("MONDAY");
-// workWeekEnd.add("TUESDAY");
-// workWeekEnd.add("WEDNESDAY");
-// workWeekEnd.add("THURSDAY");
-// workWeekEnd.add("FRIDAY");
-// workWeekEnd.add("SATURDAY");
-// workWeekEnd.select(getPreferenceStore().getInt(TaskListPreferenceConstants.PLANNING_ENDDAY)
-// - 1);
-
-// Label hourDayStartLabel = new Label(group, SWT.NONE);
-// hourDayStartLabel.setText(START_HOUR_LABEL);
-// hourDayStart = new Spinner(group, SWT.BORDER);
-// hourDayStart.setDigits(0);
-// hourDayStart.setIncrement(1);
-// hourDayStart.setMaximum(23);
-// hourDayStart.setMinimum(0);
-// hourDayStart.setSelection(getPreferenceStore().getInt(TasksUiPreferenceConstants.PLANNING_STARTHOUR));
-// hourDayStart.addSelectionListener(new SelectionAdapter() {
-//
-// @Override
-// public void widgetSelected(SelectionEvent e) {
-// updateRefreshGroupEnablements();
-// }
-//
-// });
-//
-// Label spacer = new Label(group, SWT.NONE);
-// GridDataFactory.fillDefaults().hint(40, SWT.DEFAULT).applyTo(spacer);
-//
-// Label hourDayEndLabel = new Label(group, SWT.NONE);
-// hourDayEndLabel.setText(END_HOUR_LABEL);
-//
-// hourDayEnd = new Spinner(group, SWT.BORDER);
-// hourDayEnd.setDigits(0);
-// hourDayEnd.setIncrement(1);
-// hourDayEnd.setMaximum(23);
-// hourDayEnd.setMinimum(0);
-// hourDayEnd.setSelection(getPreferenceStore().getInt(TasksUiPreferenceConstants.PLANNING_ENDHOUR));
-// hourDayEnd.addSelectionListener(new SelectionAdapter() {
-//
-// @Override
-// public void widgetSelected(SelectionEvent e) {
-// updateRefreshGroupEnablements();
-// }
-//
-// });
-
- }
-
- private void createTaskActivityGroup(Composite container) {
- Group group = new Group(container, SWT.SHADOW_ETCHED_IN);
- group.setText(GROUP_TASK_TIMING);
- group.setLayout(new GridLayout(3, false));
- group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- boolean timeoutEnabled = MonitorUiPlugin.getDefault().getPreferenceStore().getBoolean(
- ActivityContextManager.ACTIVITY_TIMEOUT_ENABLED);
-
- timeoutEnabledButton = new Button(group, SWT.CHECK);
- timeoutEnabledButton.setText("Enable inactivity timeouts");
- timeoutEnabledButton.setSelection(timeoutEnabled);
- timeoutEnabledButton.setToolTipText("If disabled, time accumulates while a task is active with no timeout due to inactivity.");
- timeoutEnabledButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- updateRefreshGroupEnablements();
- }
- });
- GridDataFactory.swtDefaults().span(3, 1).applyTo(timeoutEnabledButton);
-
- Label timeoutLabel = new Label(group, SWT.NONE);
- timeoutLabel.setText(LABEL_ACTIVITY_TIMEOUT);
- timeoutMinutes = new Spinner(group, SWT.BORDER);
- timeoutMinutes.setDigits(0);
- timeoutMinutes.setIncrement(5);
- timeoutMinutes.setMaximum(60);
- timeoutMinutes.setMinimum(1);
- long minutes = MonitorUiPlugin.getDefault().getPreferenceStore().getLong(
- ActivityContextManager.ACTIVITY_TIMEOUT)
- / MS_MINUTES;
- timeoutMinutes.setSelection((int) minutes);
- timeoutMinutes.addSelectionListener(new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- updateRefreshGroupEnablements();
- }
-
- });
-
- timeoutLabel = new Label(group, SWT.NONE);
- timeoutLabel.setText(LABEL_ACTIVITY_TIMEOUT2);
-
-// Label spacer = new Label(group, SWT.NONE);
-// GridDataFactory.fillDefaults().hint(40, SWT.DEFAULT).applyTo(spacer);
-//
-// Label hourDayEndLabel = new Label(group, SWT.NONE);
-// hourDayEndLabel.setText(END_HOUR_LABEL);
-//
-// hourDayEnd = new Spinner(group, SWT.BORDER);
-// hourDayEnd.setDigits(0);
-// hourDayEnd.setIncrement(1);
-// hourDayEnd.setMaximum(23);
-// hourDayEnd.setMinimum(0);
-// hourDayEnd.setSelection(getPreferenceStore().getInt(TasksUiPreferenceConstants.PLANNING_ENDHOUR));
-// hourDayEnd.addSelectionListener(new SelectionAdapter() {
-//
-// @Override
-// public void widgetSelected(SelectionEvent e) {
-// updateRefreshGroupEnablements();
-// }
-//
-// });
-
- }
-
-// private void createSchedulingGroup(Composite container) {
-// Group group = new Group(container, SWT.SHADOW_ETCHED_IN);
-// group.setText(GROUP_WORK_WEEK_LABEL);
-// group.setLayout(new GridLayout(5, false));
-// group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-//
-// // Label workWeekBeginLabel = new Label(group, SWT.NONE);
-// // workWeekBeginLabel.setText(START_DAY_LABEL);
-// // workWeekBegin = new Combo(group, SWT.READ_ONLY);
-// // // Calendar.SUNDAY = 1
-// // workWeekBegin.add("SUNDAY");
-// // workWeekBegin.add("MONDAY");
-// // workWeekBegin.add("TUESDAY");
-// // workWeekBegin.add("WEDNESDAY");
-// // workWeekBegin.add("THURSDAY");
-// // workWeekBegin.add("FRIDAY");
-// // workWeekBegin.add("SATURDAY");
-// // workWeekBegin.select(getPreferenceStore().getInt(TaskListPreferenceConstants.PLANNING_STARTDAY)
-// // - 1);
-// //
-// // Label workWeekEndLabel = new Label(group, SWT.NONE);
-// // workWeekEndLabel.setText(END_DAY_LABEL);
-// // workWeekEnd = new Combo(group, SWT.READ_ONLY);
-// // workWeekEnd.add("SUNDAY");
-// // workWeekEnd.add("MONDAY");
-// // workWeekEnd.add("TUESDAY");
-// // workWeekEnd.add("WEDNESDAY");
-// // workWeekEnd.add("THURSDAY");
-// // workWeekEnd.add("FRIDAY");
-// // workWeekEnd.add("SATURDAY");
-// // workWeekEnd.select(getPreferenceStore().getInt(TaskListPreferenceConstants.PLANNING_ENDDAY)
-// // - 1);
-//
-// Label hourDayStartLabel = new Label(group, SWT.NONE);
-// hourDayStartLabel.setText(START_HOUR_LABEL);
-// hourDayStart = new Spinner(group, SWT.BORDER);
-// hourDayStart.setDigits(0);
-// hourDayStart.setIncrement(1);
-// hourDayStart.setMaximum(23);
-// hourDayStart.setMinimum(0);
-// hourDayStart.setSelection(getPreferenceStore().getInt(TasksUiPreferenceConstants.PLANNING_STARTHOUR));
-// hourDayStart.addSelectionListener(new SelectionAdapter() {
-//
-// @Override
-// public void widgetSelected(SelectionEvent e) {
-// updateRefreshGroupEnablements();
-// }
-//
-// });
-//
-// Label spacer = new Label(group, SWT.NONE);
-// GridDataFactory.fillDefaults().hint(40, SWT.DEFAULT).applyTo(spacer);
-//
-// Label hourDayEndLabel = new Label(group, SWT.NONE);
-// hourDayEndLabel.setText(END_HOUR_LABEL);
-//
-// hourDayEnd = new Spinner(group, SWT.BORDER);
-// hourDayEnd.setDigits(0);
-// hourDayEnd.setIncrement(1);
-// hourDayEnd.setMaximum(23);
-// hourDayEnd.setMinimum(0);
-// hourDayEnd.setSelection(getPreferenceStore().getInt(TasksUiPreferenceConstants.PLANNING_ENDHOUR));
-// hourDayEnd.addSelectionListener(new SelectionAdapter() {
-//
-// @Override
-// public void widgetSelected(SelectionEvent e) {
-// updateRefreshGroupEnablements();
-// }
-//
-// });
-//
-// }
-
- public void updateRefreshGroupEnablements() {
- String errorMessage = null;
-
-// try {
-// long number = Integer.parseInt(backupScheduleTimeText.getText());
-// if (number <= 0) {
-// errorMessage = "Backup schedule time must be > 0";
-// } else if (backupFolderText.getText() == "") {
-// errorMessage = "Backup destination folder must be specified";
-// }
-// } catch (NumberFormatException e) {
-// errorMessage = "Backup schedule time must be valid integer";
-// }
-
- if (enableBackgroundSynch.getSelection()) {
- try {
- long number = Long.parseLong(synchScheduleTime.getText());
- if (number <= 0) {
- errorMessage = "Synchronize schedule time must be > 0";
- }
- } catch (NumberFormatException e) {
- errorMessage = "Synchronize schedule time must be valid integer";
- }
- }
-
-// if (hourDayEnd.getSelection() <= hourDayStart.getSelection()) {
-// errorMessage = "Planning: Work day start must be before end.";
-// }
-
- setErrorMessage(errorMessage);
- setValid(errorMessage == null);
-
- synchScheduleTime.setEnabled(enableBackgroundSynch.getSelection());
-
- timeoutMinutes.setEnabled(timeoutEnabledButton.getSelection());
-
- }
-
- private String getMinutesString() {
- long miliseconds = getPreferenceStore().getLong(
- ITasksUiPreferenceConstants.REPOSITORY_SYNCH_SCHEDULE_MILISECONDS);
- long minutes = miliseconds / 60000;
- return "" + minutes;
- }
-
- private void checkForExistingTasklist(String dir) {
- File newDataFolder = new File(dir);
- if (newDataFolder.exists()) {
-
- MessageDialog dialogConfirm = new MessageDialog(
- null,
- "Confirm Task List data directory change",
- null,
- "A new empty Task List will be created in the chosen directory if one does not already exists. Your previous directory and its contents will not be deleted.\n\nProceed?",
- MessageDialog.WARNING, new String[] { IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL },
- IDialogConstants.CANCEL_ID);
- taskDataDirectoryAction = dialogConfirm.open();
-
- for (TaskEditor taskEditor : TasksUiInternal.getActiveRepositoryTaskEditors()) {
- TasksUiInternal.closeEditorInActivePage(taskEditor.getTaskEditorInput().getTask(), true);
- }
-
- } else {
- MessageDialog.openWarning(getControl().getShell(), "Change data directory",
- "Destination folder does not exist.");
- }
- }
-
- @Override
- public void dispose() {
- if (toolkit != null) {
- if (toolkit.getColors() != null) {
- toolkit.dispose();
- }
- }
- super.dispose();
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/properties/ProjectPropertiesLinkProvider.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/properties/ProjectPropertiesLinkProvider.java
deleted file mode 100644
index 5745637a8..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/properties/ProjectPropertiesLinkProvider.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.properties;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ProjectScope;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences;
-import org.eclipse.core.runtime.preferences.IScopeContext;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.IRepositoryManager;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.AbstractTaskRepositoryLinkProvider;
-import org.osgi.service.prefs.BackingStoreException;
-
-/**
- * Default Task Repository link provider
- *
- * @author Eugene Kuleshov
- */
-public class ProjectPropertiesLinkProvider extends AbstractTaskRepositoryLinkProvider {
-
- private static final String PROPERTY_PREFIX = "project.repository";
-
- private static final String PROJECT_REPOSITORY_KIND = PROPERTY_PREFIX + ".kind";
-
- private static final String PROJECT_REPOSITORY_URL = PROPERTY_PREFIX + ".url";
-
- @Override
- public TaskRepository getTaskRepository(IResource resource, IRepositoryManager repositoryManager) {
- IProject project = resource.getProject();
- if (project == null || !project.isAccessible()) {
- return null;
- }
-
- IScopeContext projectScope = new ProjectScope(project);
- IEclipsePreferences projectNode = projectScope.getNode(TasksUiPlugin.ID_PLUGIN);
- if (projectNode != null) {
- String kind = projectNode.get(PROJECT_REPOSITORY_KIND, "");
- String urlString = projectNode.get(PROJECT_REPOSITORY_URL, "");
- return repositoryManager.getRepository(kind, urlString);
- }
- return null;
- }
-
- @Override
- public boolean canSetTaskRepository(IResource resource) {
- IProject project = resource.getProject();
- return project != null && project.isAccessible();
- }
-
- @Override
- public boolean setTaskRepository(IResource resource, TaskRepository repository) {
- IProject project = resource.getProject();
- if (project == null || !project.isAccessible()) {
- return false;
- }
-
- IScopeContext projectScope = new ProjectScope(project);
- IEclipsePreferences projectNode = projectScope.getNode(TasksUiPlugin.ID_PLUGIN);
- if (projectNode != null) {
- projectNode.put(PROJECT_REPOSITORY_KIND, repository.getConnectorKind());
- projectNode.put(PROJECT_REPOSITORY_URL, repository.getRepositoryUrl());
- try {
- projectNode.flush();
- return true;
- } catch (BackingStoreException e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Failed to save task repository to project association preference", e));
- }
- }
- return false;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/properties/ProjectTaskRepositoryPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/properties/ProjectTaskRepositoryPage.java
deleted file mode 100644
index 76b39247e..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/properties/ProjectTaskRepositoryPage.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.properties;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.CheckboxTableViewer;
-import org.eclipse.jface.viewers.DecoratingLabelProvider;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.actions.AddRepositoryAction;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskRepositoriesSorter;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskRepositoryLabelProvider;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.PropertyPage;
-import org.eclipse.ui.internal.dialogs.DialogUtil;
-
-/**
- * @author Rob Elves
- * @see Adapted from org.eclipse.ui.internal.ide.dialogs.ProjectReferencePage
- */
-public class ProjectTaskRepositoryPage extends PropertyPage {
-
- private static final int REPOSITORY_LIST_MULTIPLIER = 30;
-
- private IProject project;
-
- private boolean modified = false;
-
- private CheckboxTableViewer listViewer;
-
- public ProjectTaskRepositoryPage() {
- // Do nothing on creation
- }
-
- @Override
- protected Control createContents(Composite parent) {
-
- Font font = parent.getFont();
-
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- composite.setFont(font);
-
- initialize();
-
- Label description = createDescriptionLabel(composite);
- description.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
-
- listViewer = CheckboxTableViewer.newCheckList(composite, SWT.TOP | SWT.BORDER);
- listViewer.getTable().setFont(font);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.grabExcessHorizontalSpace = true;
-
- // Only set a height hint if it will not result in a cut off dialog
- if (DialogUtil.inRegularFontMode(parent)) {
- data.heightHint = getDefaultFontHeight(listViewer.getTable(), REPOSITORY_LIST_MULTIPLIER);
- }
- listViewer.getTable().setLayoutData(data);
- listViewer.getTable().setFont(font);
-
- listViewer.setLabelProvider(new DecoratingLabelProvider(new TaskRepositoryLabelProvider(),
- PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator()));
- listViewer.setContentProvider(new IStructuredContentProvider() {
- public void inputChanged(Viewer v, Object oldInput, Object newInput) {
- }
-
- public void dispose() {
- }
-
- public Object[] getElements(Object parent) {
- return TasksUi.getRepositoryManager().getAllRepositories().toArray();
- }
-
- });
-
- listViewer.setSorter(new TaskRepositoriesSorter());
- listViewer.setInput(project.getWorkspace());
-
- listViewer.addCheckStateListener(new ICheckStateListener() {
- public void checkStateChanged(CheckStateChangedEvent event) {
- if (event.getChecked()) {
- // only allow single selection
- listViewer.setAllChecked(false);
- listViewer.setChecked(event.getElement(), event.getChecked());
- }
- modified = true;
- }
- });
- updateLinkedRepository();
-
- // TODO this code was copied from SelectRepositoryPage
- final AddRepositoryAction action = new AddRepositoryAction();
- action.setPromptToAddQuery(false);
-
- Button button = new Button(composite, SWT.NONE);
- button.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_BEGINNING));
- button.setText(AddRepositoryAction.TITLE);
- button.setEnabled(action.isEnabled());
- button.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- TaskRepository taskRepository = action.showWizard();
- if (taskRepository != null) {
- listViewer.setInput(project.getWorkspace());
- listViewer.setSelection(new StructuredSelection(taskRepository));
- updateLinkedRepository();
- }
- }
- });
-
- return composite;
- }
-
- void updateLinkedRepository() {
- TaskRepository repository = TasksUiPlugin.getDefault().getRepositoryForResource(project);
- if (repository != null) {
- listViewer.setCheckedElements(new Object[] { repository });
- }
- listViewer.getControl().setEnabled(TasksUiPlugin.getDefault().canSetRepositoryForResource(project));
- }
-
- private static int getDefaultFontHeight(Control control, int lines) {
- FontData[] viewerFontData = control.getFont().getFontData();
- int fontHeight = 10;
-
- // If we have no font data use our guess
- if (viewerFontData.length > 0) {
- fontHeight = viewerFontData[0].getHeight();
- }
- return lines * fontHeight;
-
- }
-
- /**
- * Initializes a ProjectReferencePage.
- */
- private void initialize() {
- project = (IProject) getElement().getAdapter(IResource.class);
- noDefaultAndApplyButton();
- setDescription("Select a task repository to associate with this project below:");
- }
-
- /**
- * @see PreferencePage#performOk
- */
- @Override
- public boolean performOk() {
- if (!modified) {
- return true;
- }
- if (listViewer.getCheckedElements().length > 0) {
- TaskRepository selectedRepository = (TaskRepository) listViewer.getCheckedElements()[0];
- try {
- TasksUiPlugin plugin = TasksUiPlugin.getDefault();
- if (plugin.canSetRepositoryForResource(project)) {
- plugin.setRepositoryForResource(project, selectedRepository);
- }
- } catch (CoreException e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Unable to associate project with task repository", e));
- }
- }
- return true;
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/AbstractRepositorySearchQuery.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/AbstractRepositorySearchQuery.java
deleted file mode 100644
index babffd4ff..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/AbstractRepositorySearchQuery.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.search;
-
-import org.eclipse.search.ui.ISearchQuery;
-import org.eclipse.search.ui.ISearchResult;
-
-/**
- * @author Rob Elves
- */
-public abstract class AbstractRepositorySearchQuery implements ISearchQuery {
-
- /** The collection of all the matches. */
- private RepositorySearchResult searchResult;
-
- public String getLabel() {
- return "Querying Repository...";
- }
-
- public boolean canRerun() {
- return true;
- }
-
- public boolean canRunInBackground() {
- return true;
- }
-
- public ISearchResult getSearchResult() {
- if (searchResult == null) {
- searchResult = new RepositorySearchResult(this);
- }
- return searchResult;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/CreateQueryFromSearchAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/CreateQueryFromSearchAction.java
deleted file mode 100644
index 92aaf3c88..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/CreateQueryFromSearchAction.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 - 20067 Mylyn 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.search;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.InputDialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.window.Window;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractLegacyRepositoryConnector;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.search.ui.ISearchQuery;
-import org.eclipse.search.ui.NewSearchUI;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Used for add the last search result to the Task List.
- *
- * @author Balazs Brinkus (bug 172699)
- * @author Mik Kersten
- */
-public class CreateQueryFromSearchAction extends Action {
-
- /** The view this action works on */
- private final RepositorySearchResultView resultView;
-
- /**
- * Constructor
- *
- * @param text
- * The text for this action
- * @param resultView
- * The <code>RepositorySearchResultView</code> this action works on
- */
- public CreateQueryFromSearchAction(String text, RepositorySearchResultView resultView) {
- setText(text);
- setImageDescriptor(TasksUiImages.QUERY_NEW);
- this.resultView = resultView;
- }
-
- /**
- * Add the search result to the Task List.
- */
- @Override
- public void run() {
- ISelection selection = resultView.getViewer().getSelection();
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection structuredSelection = (IStructuredSelection) selection;
- if (structuredSelection.getFirstElement() instanceof ITask) {
- ISearchQuery[] queries = NewSearchUI.getQueries();
- ITask task = (ITask) structuredSelection.getFirstElement();
- AbstractLegacyRepositoryConnector connector = (AbstractLegacyRepositoryConnector) TasksUi.getRepositoryManager()
- .getRepositoryConnector(task.getConnectorKind());
- if (queries.length != 0 && connector != null) {
- SearchHitCollector searchHitCollector = (SearchHitCollector) queries[0];
- IRepositoryQuery query = searchHitCollector.getRepositoryQuery();
- InputDialog dialog = new InputDialog(PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow()
- .getShell(), "Create Query", "Name of query to be added to the " + TaskListView.LABEL_VIEW
- + ": ", "", null);
- int dialogResult = dialog.open();
- if (dialogResult == Window.OK) {
- query.setSummary(dialog.getValue());
- TasksUiInternal.getTaskList().addQuery((RepositoryQuery) query);
- TasksUiInternal.synchronizeQuery(connector, (RepositoryQuery) query, null, true);
- }
- }
- }
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/OpenSearchResultAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/OpenSearchResultAction.java
deleted file mode 100644
index d2c284c52..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/OpenSearchResultAction.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.ui.search;
-
-import java.util.Iterator;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-
-/**
- * This class is used to open a bug report in an editor.
- */
-public class OpenSearchResultAction extends Action {
-
- /** The view this action works on */
- private final RepositorySearchResultView resultView;
-
- /**
- * Constructor
- *
- * @param text
- * The text for this action
- * @param resultView
- * The <code>RepositorySearchResultView</code> this action works on
- */
- public OpenSearchResultAction(String text, RepositorySearchResultView resultView) {
- setText(text);
- this.resultView = resultView;
- }
-
- /**
- * Open the selected bug reports in their own editors.
- */
- @SuppressWarnings("unchecked")
- @Override
- public void run() {
-
- // Get the selected items
- ISelection s = resultView.getViewer().getSelection();
- if (s instanceof IStructuredSelection) {
- IStructuredSelection selection = (IStructuredSelection) s;
-
- // go through each of the selected items and show it in an editor
- for (Iterator<AbstractTask> it = selection.iterator(); it.hasNext();) {
- AbstractTask repositoryHit = it.next();
- TasksUiUtil.openTask(repositoryHit.getRepositoryUrl(), repositoryHit.getTaskId(),
- repositoryHit.getUrl());
- }
-
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/RepositorySearchResult.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/RepositorySearchResult.java
deleted file mode 100644
index 469c6254e..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/RepositorySearchResult.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.search;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.search.internal.ui.SearchPluginImages;
-import org.eclipse.search.ui.ISearchQuery;
-import org.eclipse.search.ui.text.AbstractTextSearchResult;
-import org.eclipse.search.ui.text.IEditorMatchAdapter;
-import org.eclipse.search.ui.text.IFileMatchAdapter;
-
-/**
- * Captures the results of a task repository search.
- *
- * @author Rob Elves
- * @see org.eclipse.search.ui.text.AbstractTextSearchResult
- * @since 2.0
- */
-public class RepositorySearchResult extends AbstractTextSearchResult {
-
- /**
- * The query producing this result.
- */
- private final ISearchQuery repositoryQuery;
-
- /**
- * Constructor for <code>RepositorySearchResult</code> class.
- *
- * @param query
- * <code>AbstractRepositorySearchQuery</code> that is producing this result.
- */
- public RepositorySearchResult(ISearchQuery query) {
- super();
- repositoryQuery = query;
- }
-
- @Override
- public IEditorMatchAdapter getEditorMatchAdapter() {
- return null;
- }
-
- /**
- * This function always returns <code>null</code>, as the matches for this implementation of
- * <code>AbstractTextSearchResult</code> never contain files.
- *
- * @see org.eclipse.search.ui.text.AbstractTextSearchResult#getFileMatchAdapter()
- */
- @Override
- public IFileMatchAdapter getFileMatchAdapter() {
- return null;
- }
-
- public String getLabel() {
- return getMatchCount() == 1 ? getSingularLabel() : getPluralLabel();
- }
-
- /**
- * Get the singular label for the number of results
- *
- * @return The singular label
- */
- protected String getSingularLabel() {
- return "Task search - 1 match";
- }
-
- /**
- * Get the plural label for the number of results
- *
- * @return The plural label
- */
- protected String getPluralLabel() {
- return "Task search - " + getMatchCount() + " matches";
- }
-
- public String getTooltip() {
- return getLabel();
- }
-
- public ImageDescriptor getImageDescriptor() {
- return SearchPluginImages.DESC_OBJ_TSEARCH_DPDN;
- }
-
- public ISearchQuery getQuery() {
- return repositoryQuery;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/RepositorySearchResultView.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/RepositorySearchResultView.java
deleted file mode 100644
index 671f0ebae..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/RepositorySearchResultView.java
+++ /dev/null
@@ -1,438 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.ui.search;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.viewers.DecoratingLabelProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.mylyn.internal.provisional.commons.ui.SubstringPatternFilter;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTaskCategory;
-import org.eclipse.mylyn.internal.tasks.core.TaskGroup;
-import org.eclipse.mylyn.internal.tasks.core.UnmatchedTaskContainer;
-import org.eclipse.mylyn.internal.tasks.ui.AddExistingTaskJob;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.actions.OpenTaskSearchAction;
-import org.eclipse.mylyn.internal.tasks.ui.search.SearchResultTreeContentProvider.GroupBy;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListToolTip;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.search.internal.ui.SearchMessages;
-import org.eclipse.search.ui.IContextMenuConstants;
-import org.eclipse.search.ui.ISearchResult;
-import org.eclipse.search.ui.text.AbstractTextSearchViewPage;
-import org.eclipse.search.ui.text.Match;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Layout;
-import org.eclipse.ui.IPageLayout;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.FilteredTree;
-import org.eclipse.ui.part.IShowInTargetList;
-import org.eclipse.ui.progress.IProgressService;
-
-/**
- * Displays the results of a Repository search.
- *
- * @see org.eclipse.search.ui.text.AbstractTextSearchViewPage
- *
- * @author Rob Elves
- * @author Mik Kersten
- * @author Shawn Minto
- * @author Frank Becker
- * @author Steffen Pingel
- */
-public class RepositorySearchResultView extends AbstractTextSearchViewPage implements IAdaptable {
-
- private class GroupingAction extends Action {
-
- private final GroupBy groupBy;
-
- public GroupingAction(String text, GroupBy groupBy) {
- super(text, IAction.AS_CHECK_BOX);
- this.groupBy = groupBy;
- groupingActions.add(this);
- }
-
- public GroupBy getGroupBy() {
- return groupBy;
- }
-
- @Override
- public void run() {
- for (GroupingAction action : groupingActions) {
- action.setChecked(false);
- }
-
- SearchResultTreeContentProvider contentProvider = (SearchResultTreeContentProvider) getViewer().getContentProvider();
- if (contentProvider.getSelectedGroup() == groupBy) {
- contentProvider.setSelectedGroup(GroupBy.NONE);
- } else {
- contentProvider.setSelectedGroup(groupBy);
- setChecked(true);
- }
- getViewer().refresh();
- }
- }
-
- private class FilteringAction extends Action {
-
- private final ViewerFilter filter;
-
- public FilteringAction(String text, ViewerFilter filter) {
- super(text, IAction.AS_CHECK_BOX);
- this.filter = filter;
- filterActions.add(this);
- }
-
- @Override
- public void runWithEvent(Event event) {
- if (isChecked()) {
- getViewer().addFilter(filter);
- } else {
- getViewer().removeFilter(filter);
- }
- }
- }
-
- public static final int ORDER_PRIORITY = 1;
-
- public static final int ORDER_DESCRIPTION = 2;
-
- public static final int ORDER_SEVERITY = 3;
-
- public static final int ORDER_STATUS = 4;
-
- public static final int ORDER_ID = 5;
-
- public static final int ORDER_DEFAULT = ORDER_PRIORITY;
-
- private static final String KEY_SORTING = TasksUiPlugin.ID_PLUGIN + ".search.resultpage.sorting"; //$NON-NLS-1$
-
- private SearchResultContentProvider searchResultProvider;
-
- private int currentSortOrder;
-
- private final SearchResultSortAction sortByPriorityAction;
-
- private final SearchResultSortAction sortByDescriptionAction;
-
- private final OpenSearchResultAction openInEditorAction;
-
- private final CreateQueryFromSearchAction addTaskListAction;
-
- private final Action refineSearchAction;
-
- private static final String[] SHOW_IN_TARGETS = new String[] { IPageLayout.ID_RES_NAV };
-
- private TaskListToolTip toolTip;
-
- private final List<GroupingAction> groupingActions;
-
- private final List<FilteringAction> filterActions;
-
- private static final IShowInTargetList SHOW_IN_TARGET_LIST = new IShowInTargetList() {
- public String[] getShowInTargetIds() {
- return SHOW_IN_TARGETS;
- }
- };
-
- public RepositorySearchResultView() {
- // Only use the table layout.
- super(FLAG_LAYOUT_TREE);
-
- sortByPriorityAction = new SearchResultSortAction("Task Priority", this, ORDER_PRIORITY);
- sortByDescriptionAction = new SearchResultSortAction("Task Summary", this, ORDER_DESCRIPTION);
- currentSortOrder = ORDER_DEFAULT;
-
- openInEditorAction = new OpenSearchResultAction("Open in Editor", this);
- addTaskListAction = new CreateQueryFromSearchAction("Create Query from Search...", this);
- refineSearchAction = new OpenTaskSearchAction();
- refineSearchAction.setText("Refine Search...");
-
- groupingActions = new ArrayList<GroupingAction>();
- new GroupingAction("Group By Owner", GroupBy.OWNER);
- new GroupingAction("Group By Complete", GroupBy.COMPLETION);
-
- filterActions = new ArrayList<FilteringAction>();
- new FilteringAction("Filter Completed Tasks", new ViewerFilter() {
- @Override
- public boolean select(Viewer viewer, Object parentElement, Object element) {
- if (element instanceof ITask) {
- return !((ITask) element).isCompleted();
- } else if (element instanceof TaskGroup) {
- TaskGroup taskGroup = (TaskGroup) element;
- return taskGroup.getHandleIdentifier().equals("group-incompleteIncomplete");
- }
- return true;
- }
- });
- }
-
- @Override
- protected void elementsChanged(Object[] objects) {
- if (searchResultProvider != null) {
- searchResultProvider.elementsChanged(objects);
- getViewer().refresh();
- }
- }
-
- @Override
- protected void clear() {
- if (searchResultProvider != null) {
- searchResultProvider.clear();
- getViewer().refresh();
- }
- }
-
- // Allows the inherited method "getViewer" to be accessed publicly.
- @Override
- public StructuredViewer getViewer() {
- return super.getViewer();
- }
-
- @Override
- protected void configureTreeViewer(TreeViewer viewer) {
- viewer.setUseHashlookup(true);
- searchResultProvider = new SearchResultTreeContentProvider();
- viewer.setContentProvider(searchResultProvider);
-
- DecoratingLabelProvider labelProvider = new DecoratingLabelProvider(new SearchResultsLabelProvider(
- searchResultProvider, viewer), PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator());
- viewer.setLabelProvider(labelProvider);
-
- // Set the order when the search view is loading so that the items are
- // sorted right away
- setSortOrder(currentSortOrder);
-
- toolTip = new TaskListToolTip(viewer.getControl());
- }
-
- @Override
- protected TreeViewer createTreeViewer(Composite parent) {
- // create a filtered tree
- Composite treeComposite = parent;
- Layout parentLayout = parent.getLayout();
- if (!(parentLayout instanceof GridLayout)) {
- treeComposite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- treeComposite.setLayout(layout);
- }
-
- FilteredTree searchTree = new FilteredTree(treeComposite, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL,
- new SubstringPatternFilter());
- return searchTree.getViewer();
- }
-
- @Override
- protected void configureTableViewer(TableViewer viewer) {
-// viewer.setUseHashlookup(true);
-// String[] columnNames = new String[] { "Summary" };
-// TableColumn[] columns = new TableColumn[columnNames.length];
-// int[] columnWidths = new int[] { 500 };
-// viewer.setColumnProperties(columnNames);
-//
-// viewer.getTable().setHeaderVisible(false);
-// for (int i = 0; i < columnNames.length; i++) {
-// columns[i] = new TableColumn(viewer.getTable(), 0, i); // SWT.LEFT
-// columns[i].setText(columnNames[i]);
-// columns[i].setWidth(columnWidths[i]);
-// columns[i].setData(new Integer(i));
-// columns[i].addSelectionListener(new SelectionAdapter() {
-//
-// @Override
-// public void widgetSelected(SelectionEvent e) {
-// TableColumn col = (TableColumn) e.getSource();
-// Integer integer = (Integer) col.getData();
-// setSortOrder(integer.intValue());
-// }
-// });
-// }
-//
-// IThemeManager themeManager = getSite().getWorkbenchWindow().getWorkbench().getThemeManager();
-// Color categoryBackground = themeManager.getCurrentTheme().getColorRegistry().get(
-// TaskListColorsAndFonts.THEME_COLOR_TASKLIST_CATEGORY);
-//
-// SearchViewTableLabelProvider taskListTableLabelProvider = new SearchViewTableLabelProvider(
-// new TaskElementLabelProvider(true),
-// PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator(), categoryBackground);
-//
-// viewer.setLabelProvider(taskListTableLabelProvider);
-// viewer.setContentProvider(new SearchResultTableContentProvider(this));
-//
-// // Set the order when the search view is loading so that the items are
-// // sorted right away
-// setSortOrder(currentSortOrder);
-//
-// taskContentProvider = (SearchResultContentProvider) viewer.getContentProvider();
- }
-
- @Override
- public void dispose() {
- toolTip.dispose();
- super.dispose();
- }
-
- /**
- * Sets the new sorting category, and reorders all of the tasks.
- *
- * @param sortOrder
- * The new category to sort by
- */
- public void setSortOrder(int sortOrder) {
- StructuredViewer viewer = getViewer();
-
- switch (sortOrder) {
- case ORDER_ID:
- viewer.setSorter(new SearchResultSorterId());
- break;
- case ORDER_DESCRIPTION:
- viewer.setSorter(new SearchResultSorterDescription());
- break;
- case ORDER_PRIORITY:
- viewer.setSorter(new SearchResultSorterPriority());
- break;
- default:
- // If the setting is not one of the four valid ones,
- // use the default order setting.
- sortOrder = ORDER_DEFAULT;
- viewer.setSorter(new SearchResultSorterPriority());
- break;
- }
- currentSortOrder = sortOrder;
- getSettings().put(KEY_SORTING, currentSortOrder);
- }
-
- @SuppressWarnings("unchecked")
- public Object getAdapter(Class adapter) {
- return getAdapterDelegate(adapter);
- }
-
- private Object getAdapterDelegate(Class<?> adapter) {
- if (IShowInTargetList.class.equals(adapter)) {
- return SHOW_IN_TARGET_LIST;
- }
- return null;
- }
-
- @Override
- protected void showMatch(Match match, int currentOffset, int currentLength, boolean activate)
- throws PartInitException {
- AbstractTask repositoryHit = (AbstractTask) match.getElement();
- TasksUiInternal.refreshAndOpenTaskListElement(repositoryHit);
- }
-
- @Override
- protected void fillContextMenu(IMenuManager menuManager) {
- super.fillContextMenu(menuManager);
- MenuManager sortMenuManager = new MenuManager(SearchMessages.SortDropDownAction_label);
- sortMenuManager.add(sortByPriorityAction);
- sortMenuManager.add(sortByDescriptionAction);
-
- sortByPriorityAction.setChecked(currentSortOrder == sortByPriorityAction.getSortOrder());
- sortByDescriptionAction.setChecked(currentSortOrder == sortByDescriptionAction.getSortOrder());
-
- // Add the new context menu items
- menuManager.appendToGroup(IContextMenuConstants.GROUP_VIEWER_SETUP, sortMenuManager);
- for (Action action : groupingActions) {
- menuManager.appendToGroup(IContextMenuConstants.GROUP_VIEWER_SETUP, action);
- }
- for (Action action : filterActions) {
- menuManager.appendToGroup(IContextMenuConstants.GROUP_VIEWER_SETUP, action);
- }
-
- menuManager.appendToGroup(IContextMenuConstants.GROUP_OPEN, openInEditorAction);
- menuManager.appendToGroup(IContextMenuConstants.GROUP_OPEN, addTaskListAction);
- menuManager.appendToGroup(IContextMenuConstants.GROUP_OPEN, refineSearchAction);
-
- // HACK: this should be a contribution
- final MenuManager subMenuManager = new MenuManager("Add to " + TaskListView.LABEL_VIEW + " Category");
- List<AbstractTaskCategory> categories = new ArrayList<AbstractTaskCategory>(TasksUiInternal.getTaskList()
- .getCategories());
-
- Collections.sort(categories);
- for (final AbstractTaskCategory category : categories) {
- if (!(category instanceof UnmatchedTaskContainer)) {//.equals(TasksUiPlugin.getTaskList().getArchiveContainer())) {
- Action action = new Action() {
- @Override
- public void run() {
- moveToCategory(category);
- }
- };
- String text = category.getSummary();
- action.setText(text);
- action.setImageDescriptor(TasksUiImages.CATEGORY);
- subMenuManager.add(action);
- }
- }
- menuManager.appendToGroup(IContextMenuConstants.GROUP_OPEN, subMenuManager);
- }
-
- private void moveToCategory(AbstractTaskCategory category) {
- final IProgressService progressService = PlatformUI.getWorkbench().getProgressService();
- StructuredSelection selection = (StructuredSelection) this.getViewer().getSelection();
- for (Iterator<?> iterator = selection.iterator(); iterator.hasNext();) {
- Object selectedObject = iterator.next();
- if (selectedObject instanceof ITask) {
- ITask task = (ITask) selectedObject;
- TaskRepository repository = TasksUi.getRepositoryManager().getRepository(task.getConnectorKind(),
- task.getRepositoryUrl());
- final AddExistingTaskJob job = new AddExistingTaskJob(repository, task.getTaskId(), category);
- job.schedule();
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- progressService.showInDialog(RepositorySearchResultView.this.getSite().getShell(), job);
- }
- });
- }
- }
- }
-
- @Override
- public void createControl(Composite parent) {
- super.createControl(parent);
- IMenuManager menuManager = getSite().getActionBars().getMenuManager();
- for (Action action : groupingActions) {
- menuManager.appendToGroup(IContextMenuConstants.GROUP_VIEWER_SETUP, action);
- }
- menuManager.appendToGroup(IContextMenuConstants.GROUP_VIEWER_SETUP, new Separator());
- for (Action action : filterActions) {
- menuManager.appendToGroup(IContextMenuConstants.GROUP_VIEWER_SETUP, action);
- }
- }
-
- @Override
- public void setInput(ISearchResult newSearch, Object viewState) {
- super.setInput(newSearch, viewState);
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchHitCollector.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchHitCollector.java
deleted file mode 100644
index 8ce3334b1..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchHitCollector.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.ui.search;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.mylyn.internal.tasks.core.ITaskList;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-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.RepositoryStatus;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.data.TaskData;
-import org.eclipse.mylyn.tasks.core.data.TaskDataCollector;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.search.ui.ISearchQuery;
-import org.eclipse.search.ui.ISearchResult;
-import org.eclipse.search.ui.NewSearchUI;
-import org.eclipse.search.ui.text.Match;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Used for returning results from Eclipse Search view. Collects results of a repository search.
- *
- * @author Rob Elves
- * @since 2.0
- */
-public class SearchHitCollector extends TaskDataCollector implements ISearchQuery {
-
- private static final String LABEL_MAX_HITS_REACHED = "Max allowed number of hits returned exceeded. Some hits may not be displayed. Please narrow query scope.";
-
- private static final String QUERYING_REPOSITORY = "Querying Repository...";
-
- private final Set<ITask> taskResults = new HashSet<ITask>();
-
- private final ITaskList taskList;
-
- private final TaskRepository repository;
-
- private final IRepositoryQuery repositoryQuery;
-
- private final RepositorySearchResult searchResult;
-
- private AbstractRepositoryConnector connector;
-
- /**
- * @since 3.0
- */
- public SearchHitCollector(ITaskList tasklist, TaskRepository repository, IRepositoryQuery repositoryQuery) {
- this.taskList = tasklist;
- this.repository = repository;
- this.repositoryQuery = repositoryQuery;
- this.searchResult = new RepositorySearchResult(this);
- }
-
- public void aboutToStart() {
- taskResults.clear();
-
- searchResult.removeAll();
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- NewSearchUI.activateSearchResultView();
- }
- });
- }
-
- @Override
- public void accept(TaskData taskData) {
- ITask task = taskList.getTask(repository.getRepositoryUrl(), taskData.getTaskId());
- if (task == null) {
- task = TasksUi.getRepositoryModel().createTask(repository, taskData.getTaskId());
- if (connector != null) {
- connector.updateTaskFromTaskData(repository, task, taskData);
- }
- }
- taskResults.add(task);
- this.searchResult.addMatch(new Match(task, 0, 0));
- }
-
- public String getLabel() {
- return QUERYING_REPOSITORY;
- }
-
- public boolean canRerun() {
- return true;
- }
-
- public boolean canRunInBackground() {
- return true;
- }
-
- public ISearchResult getSearchResult() {
- if (searchResult.getMatchCount() >= TaskDataCollector.MAX_HITS) {
- TasksUiInternal.displayStatus("Maximum hits reached", RepositoryStatus.createStatus(
- repository.getRepositoryUrl(), IStatus.WARNING, TasksUiPlugin.ID_PLUGIN, LABEL_MAX_HITS_REACHED));
- }
- return searchResult;
- }
-
- public IStatus run(IProgressMonitor monitor) throws OperationCanceledException {
- if (monitor == null) {
- monitor = new NullProgressMonitor();
- }
-
- aboutToStart();
-
- if (monitor.isCanceled()) {
- throw new OperationCanceledException("Search cancelled");
- }
- connector = TasksUi.getRepositoryManager().getRepositoryConnector(repositoryQuery.getConnectorKind());
- if (connector != null) {
- final IStatus status = connector.performQuery(repository, repositoryQuery, this, null, monitor);
- if (!status.isOK()) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- TasksUiInternal.displayStatus("Search failed", status);
- }
- });
- }
- } else {
- return new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, IStatus.OK,
- "repository connector could not be found", null);
- }
-
- return Status.OK_STATUS;
- }
-
- public Set<ITask> getTasks() {
- return taskResults;
- }
-
- public IRepositoryQuery getRepositoryQuery() {
- return repositoryQuery;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultContentProvider.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultContentProvider.java
deleted file mode 100644
index 2cb155884..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultContentProvider.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.search;
-
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-
-/**
- * @author Rob Elves (moved into task.ui)
- * @see org.eclipse.jface.viewers.IContentProvider
- */
-public abstract class SearchResultContentProvider implements ITreeContentProvider {
-
- /** An empty array of objects */
- protected final Object[] EMPTY_ARR = new Object[0];
-
- /** The search result for this content provider */
- protected RepositorySearchResult searchResult;
-
- public void dispose() {
- // nothing to do
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- if (newInput instanceof RepositorySearchResult) {
- initialize((RepositorySearchResult) newInput);
- }
- }
-
- /**
- * Initializes the content provider with the given search result.
- *
- * @param result
- * The search result to use with this content provider
- */
- protected void initialize(RepositorySearchResult result) {
- searchResult = result;
- }
-
- /**
- * This method is called whenever the set of matches for the given elements changes.
- *
- * @param updatedElements
- * The array of objects that has to be refreshed
- * @see
- * @see org.eclipse.search.ui.text.AbstractTextSearchViewPage#elementsChanged(java.lang.Object[])
- */
- public abstract void elementsChanged(Object[] updatedElements);
-
- /**
- * Clears the viewer.
- */
- public abstract void clear();
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultSortAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultSortAction.java
deleted file mode 100644
index 564472b59..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultSortAction.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.search;
-
-import org.eclipse.jface.action.Action;
-
-/**
- * This class sorts search results by a supplied category.
- *
- * @author Rob Elves (moved to tasks.ui)
- */
-public class SearchResultSortAction extends Action {
-
- /** The category that this class sorts Bugzilla search results by. */
- private final int bugSortOrder;
-
- /** The view where the Bugzilla search results are displayed. */
- private final RepositorySearchResultView bugPage;
-
- /**
- * Constructor
- *
- * @param label
- * The string used as the text for the action, or null if there is no text
- * @param page
- * The view where the Bugzilla search results are displayed.
- * @param sortOrder
- * The category that this class sorts Bugzilla search results by
- */
- public SearchResultSortAction(String label, RepositorySearchResultView page, int sortOrder) {
- super(label);
- bugPage = page;
- bugSortOrder = sortOrder;
- }
-
- /**
- * Reorder the Bugzilla search results.
- */
- @Override
- public void run() {
- bugPage.setSortOrder(bugSortOrder);
- }
-
- /**
- * Returns the category that this class sorts Bugzilla search results by.
- */
- public int getSortOrder() {
- return bugSortOrder;
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultSorterDescription.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultSorterDescription.java
deleted file mode 100644
index f15ee8240..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultSorterDescription.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.search;
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskKeyComparator;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListTableSorter;
-import org.eclipse.mylyn.tasks.core.ITask;
-
-/**
- * Sorts search results by summary.
- *
- * @author Rob Elves
- */
-public class SearchResultSorterDescription extends ViewerSorter {
-
- private final TaskKeyComparator taskKeyComparator = new TaskKeyComparator();
-
- /**
- * Returns a negative, zero, or positive number depending on whether the first bug's summary goes before, is the
- * same as, or goes after the second element's summary.
- * <p>
- *
- * @see org.eclipse.jface.viewers.ViewerSorter#compare(org.eclipse.jface.viewers.Viewer, java.lang.Object,
- * java.lang.Object)
- */
- @Override
- public int compare(Viewer viewer, Object e1, Object e2) {
- try {
-
- AbstractTask entry1 = (AbstractTask) e1;
- AbstractTask entry2 = (AbstractTask) e2;
- // NOTE we just comparing ids here, once summary and taskId separated
- // they should have their own column/sorter.
- return taskKeyComparator.compare(TaskListTableSorter.getSortableFromElement(entry1),
- TaskListTableSorter.getSortableFromElement(entry2));
- // return taskKeyComparator.compare(entry1.getDescription(),
- // entry2.getDescription());
- } catch (Exception ignored) {
- // do nothing
- }
-
- // if that didn't work, use the default compare method
- return super.compare(viewer, e1, e2);
- }
-
- /**
- * Returns the category of the given element. The category is a number used to allocate elements to bins; the bins
- * are arranged in ascending numeric order. The elements within a bin are arranged via a second level sort
- * criterion.
- * <p>
- *
- * @see org.eclipse.jface.viewers.ViewerSorter#category(Object)
- */
- @Override
- public int category(Object element) {
- try {
- ITask hit = (ITask) element;
- return Integer.parseInt(hit.getTaskId());
- } catch (Exception ignored) {
- // ignore if
- }
- // if that didn't work, use the default category method
- return super.category(element);
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultSorterId.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultSorterId.java
deleted file mode 100644
index 7ec60e39a..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultSorterId.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.search;
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.mylyn.tasks.core.ITask;
-
-/**
- * Sorts search results (AbstractQueryHit) by taskId.
- */
-public class SearchResultSorterId extends ViewerSorter {
-
- /**
- * Returns a negative, zero, or positive number depending on whether the first bug's taskId is less than, equal to,
- * or greater than the second bug's taskId.
- * <p>
- *
- * @see org.eclipse.jface.viewers.ViewerSorter#compare(org.eclipse.jface.viewers.Viewer, java.lang.Object,
- * java.lang.Object)
- */
- @Override
- public int compare(Viewer viewer, Object e1, Object e2) {
- try {
- // cast the object and get its bug taskId
- ITask entry1 = (ITask) e1;
- Integer id1 = Integer.parseInt(entry1.getTaskId());
-
- // cast the other object and get its bug taskId
- ITask entry2 = (ITask) e2;
- Integer id2 = Integer.parseInt(entry2.getTaskId());
-
- // if neither is null, compare the bug taskId's
- if (id1 != null && id2 != null) {
- return id1.compareTo(id2);
- }
- } catch (Exception ignored) {
- // ignore if there is a problem
- }
-
- // if that didn't work, use the default compare method
- return super.compare(viewer, e1, e2);
- }
-
- /**
- * Returns the category of the given element. The category is a number used to allocate elements to bins; the bins
- * are arranged in ascending numeric order. The elements within a bin are arranged via a second level sort
- * criterion.
- * <p>
- *
- * @see org.eclipse.jface.viewers.ViewerSorter#category(Object)
- */
- @Override
- public int category(Object element) {
- try {
- ITask hit = (ITask) element;
- return Integer.parseInt(hit.getTaskId());
- } catch (Exception ignored) {
- // ignore
- }
- // if that didn't work, use the default category method
- return super.category(element);
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultSorterPriority.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultSorterPriority.java
deleted file mode 100644
index 7993bd390..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultSorterPriority.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.search;
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.mylyn.tasks.core.ITask;
-
-/**
- * Sorts results of Bugzilla search by bug priority.
- *
- * @author Rob Elves (modifications)
- */
-public class SearchResultSorterPriority extends ViewerSorter {
-
- /**
- * Returns a negative, zero, or positive number depending on whether the first bug's priority goes before, is the
- * same as, or goes after the second element's priority.
- * <p>
- *
- * @see org.eclipse.jface.viewers.ViewerSorter#compare(org.eclipse.jface.viewers.Viewer, java.lang.Object,
- * java.lang.Object)
- */
- @Override
- public int compare(Viewer viewer, Object e1, Object e2) {
- try {
- ITask hit1 = (ITask) e1;
- ITask hit2 = (ITask) e2;
- return hit1.getPriority().compareTo(hit2.getPriority());
- } catch (Exception ignored) {
- // do nothing
- }
- // if that didn't work, use the default compare method
- return super.compare(viewer, e1, e2);
- }
-
- /**
- * Returns the category of the given element. The category is a number used to allocate elements to bins; the bins
- * are arranged in ascending numeric order. The elements within a bin are arranged via a second level sort
- * criterion.
- * <p>
- *
- * @see org.eclipse.jface.viewers.ViewerSorter#category(Object)
- */
- @Override
- public int category(Object element) {
- try {
- ITask hit = (ITask) element;
- return Integer.parseInt(hit.getTaskId());
- } catch (Exception ignored) {
- // ignore if there is a problem
- }
- // if that didn't work, use the default category method
- return super.category(element);
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultTreeContentProvider.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultTreeContentProvider.java
deleted file mode 100644
index 6ba1a0f33..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultTreeContentProvider.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.search;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.Person;
-import org.eclipse.mylyn.internal.tasks.core.TaskGroup;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITaskContainer;
-
-/**
- * This implementation of <code>SearchResultContentProvider</code> is used for the table view of a Bugzilla search
- * result.
- *
- * @author Rob Elves (moved into task.ui)
- * @author Mik Kersten
- * @author Frank Becker
- */
-public class SearchResultTreeContentProvider extends SearchResultContentProvider {
-
- private final List<Object> elements = new ArrayList<Object>();
-
- private final Map<String, Person> owners = new HashMap<String, Person>();
-
- private final Map<String, TaskGroup> completeState = new HashMap<String, TaskGroup>();
-
- public enum GroupBy {
- NONE, OWNER, COMPLETION;
- }
-
- private GroupBy selectedGroup;
-
- public SearchResultTreeContentProvider() {
- }
-
- @Override
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- if (newInput instanceof RepositorySearchResult) {
- searchResult = (RepositorySearchResult) newInput;
- clear();
- elementsChanged(searchResult.getElements());
- }
- }
-
- /**
- * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
- */
- public Object[] getElements(Object inputElement) {
- if (inputElement == searchResult) {
- if (selectedGroup == GroupBy.OWNER) {
- return owners.values().toArray();
- } else if (selectedGroup == GroupBy.COMPLETION) {
- return completeState.values().toArray();
- } else {
- return elements.toArray();
- }
- } else {
- return EMPTY_ARR;
- }
- }
-
- public Object[] getChildren(Object parent) {
- if (parent instanceof TaskGroup || parent instanceof Person) {
- return ((ITaskContainer) parent).getChildren().toArray();
- } else {
- return EMPTY_ARR;
- }
- }
-
- public Object getParent(Object element) {
- return null;
- }
-
- public boolean hasChildren(Object element) {
- return getChildren(element).length > 0;
- }
-
- @Override
- public void elementsChanged(Object[] updatedElements) {
- for (Object object : updatedElements) {
- elements.add(object);
-
- if (object instanceof ITask) {
- AbstractTask task = ((AbstractTask) object);
- String owner = task.getOwner();
- if (owner == null) {
- owner = "<unknown>";
- }
- Person person = owners.get(owner);
- if (person == null) {
- person = new Person(owner, task.getConnectorKind(), task.getRepositoryUrl());
- owners.put(owner, person);
- }
- person.internalAddChild(task);
-
- TaskGroup completeIncomplete = null;
- if (task.isCompleted()) {
- completeIncomplete = completeState.get("Complete");
- if (completeIncomplete == null) {
- completeIncomplete = new TaskGroup("group-complete", "Complete", GroupBy.COMPLETION.name());
- completeState.put("Complete", completeIncomplete);
- }
- } else {
- completeIncomplete = completeState.get("Incomplete");
- if (completeIncomplete == null) {
- completeIncomplete = new TaskGroup("group-incomplete", "Incomplete", GroupBy.COMPLETION.name());
- completeState.put("Incomplete", completeIncomplete);
- }
- }
- completeIncomplete.internalAddChild(task);
- }
- }
- }
-
- @Override
- public void clear() {
- elements.clear();
- owners.clear();
- completeState.clear();
- }
-
- public GroupBy getSelectedGroup() {
- return selectedGroup;
- }
-
- public void setSelectedGroup(GroupBy selectedGroup) {
- this.selectedGroup = selectedGroup;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultsLabelProvider.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultsLabelProvider.java
deleted file mode 100644
index 47775125a..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultsLabelProvider.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.search;
-
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.mylyn.internal.tasks.core.Person;
-import org.eclipse.mylyn.internal.tasks.core.TaskGroup;
-import org.eclipse.mylyn.tasks.ui.TaskElementLabelProvider;
-
-/**
- * @author Mik Kersten
- * @author Steffen Pingel
- */
-public class SearchResultsLabelProvider extends TaskElementLabelProvider {
-
- private final SearchResultContentProvider contentProvider;
-
- private final TreeViewer viewer;
-
- public SearchResultsLabelProvider(SearchResultContentProvider contentProvider, TreeViewer viewer) {
- super(true);
- this.contentProvider = contentProvider;
- this.viewer = viewer;
- }
-
- @Override
- public String getText(Object object) {
- if (object instanceof TaskGroup || object instanceof Person) {
- Object[] children = contentProvider.getChildren(object);
- ViewerFilter[] filters = viewer.getFilters();
- int filtered = 0;
- if (filters.length > 0) {
- for (Object child : children) {
- for (ViewerFilter filter : filters) {
- if (!filter.select(viewer, object, child)) {
- filtered++;
- }
- }
- }
- }
- if (filtered > 0) {
- return super.getText(object) + " (" + (children.length - filtered) + " of " + children.length + ")";
- } else {
- return super.getText(object) + " (" + children.length + ")";
- }
- } else {
- return super.getText(object);
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchScoreComputerAdapterFactory.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchScoreComputerAdapterFactory.java
deleted file mode 100644
index 60548f8b7..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchScoreComputerAdapterFactory.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.search;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.internal.tasks.ui.TaskSearchPage;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-import org.eclipse.search.ui.ISearchPageScoreComputer;
-
-/**
- * Implements a {@link IAdapterFactory} for {@link ISearchPageScoreComputer}s which ranks {@link AbstractTaskContainer}s
- * high for the task search page
- *
- * @author Willian Mitsuda
- */
-public class SearchScoreComputerAdapterFactory implements IAdapterFactory {
-
- private final ISearchPageScoreComputer computer = new ISearchPageScoreComputer() {
-
- public int computeScore(String pageId, Object input) {
- if (!TaskSearchPage.ID.equals(pageId)) {
- return ISearchPageScoreComputer.UNKNOWN;
- }
- if (input instanceof IRepositoryElement) {
- return 100;
- }
- return ISearchPageScoreComputer.LOWEST;
- }
-
- };
-
- @SuppressWarnings("unchecked")
- public Object getAdapter(Object adaptableObject, Class adapterType) {
- if (ISearchPageScoreComputer.class.equals(adapterType)) {
- return computer;
- }
- return null;
- }
-
- @SuppressWarnings("unchecked")
- public Class[] getAdapterList() {
- return new Class[] { ISearchPageScoreComputer.class };
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/StackTraceDuplicateDetector.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/StackTraceDuplicateDetector.java
deleted file mode 100644
index 8523d2b1f..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/StackTraceDuplicateDetector.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.search;
-
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.mylyn.internal.tasks.core.AbstractSearchHandler;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.AbstractDuplicateDetector;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-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.eclipse.mylyn.tasks.ui.TasksUi;
-
-/**
- * @author Gail Murphy
- * @author Steffen Pingel
- */
-public class StackTraceDuplicateDetector extends AbstractDuplicateDetector {
-
- @Override
- public boolean canQuery(TaskData taskData) {
- return TasksUiPlugin.getDefault().getSearchHandler(taskData.getConnectorKind()) != null;
- }
-
- private String getDescription(TaskData taskData) {
- TaskAttribute attribute = taskData.getRoot().getMappedAttribute(TaskAttribute.DESCRIPTION);
- if (attribute == null) {
- attribute = taskData.getRoot().getMappedAttribute(TaskAttribute.COMMENT_NEW);
- }
- return (attribute != null) ? attribute.getTaskData().getAttributeMapper().getValueLabel(attribute) : "";
- }
-
- @Override
- public IRepositoryQuery getDuplicatesQuery(TaskRepository taskRepository, TaskData taskData) throws CoreException {
- String description = getDescription(taskData);
- String searchString = getStackTraceFromDescription(description);
- if (searchString == null) {
- throw new CoreException(new Status(IStatus.INFO, TasksUiPlugin.ID_PLUGIN,
- "Unable to locate a stack trace in the description text."));
- }
-
- IRepositoryQuery query = TasksUi.getRepositoryModel().createQuery(taskRepository);
- AbstractSearchHandler searchHandler = TasksUiPlugin.getDefault().getSearchHandler(
- taskRepository.getConnectorKind());
- if (searchHandler.queryForText(taskRepository, query, taskData, searchString)) {
- return query;
- }
- return null;
- }
-
- public static String getStackTraceFromDescription(String description) {
- String stackTrace = null;
-
- if (description == null) {
- return null;
- }
-
- String punct = "!\"#$%&'\\(\\)*+,-./:;\\<=\\>?@\\[\\]^_`\\{|\\}~\n";
- String lineRegex = " *at\\s+[\\w" + punct + "]+ ?\\(.*\\) *\n?";
- Pattern tracePattern = Pattern.compile(lineRegex);
- Matcher match = tracePattern.matcher(description);
-
- if (match.find()) {
- // record the index of the first stack trace line
- int start = match.start();
- int lastEnd = match.end();
-
- // find the last stack trace line
- while (match.find()) {
- lastEnd = match.end();
- }
-
- // make sure there's still room to find the exception
- if (start <= 0) {
- return null;
- }
-
- // count back to the line before the stack trace to find the
- // exception
- int stackStart = 0;
- int index = start - 1;
- while (index > 1 && description.charAt(index) == ' ') {
- index--;
- }
-
- // locate the exception line index
- stackStart = description.substring(0, index - 1).lastIndexOf("\n");
- stackStart = (stackStart == -1) ? 0 : stackStart + 1;
-
- stackTrace = description.substring(stackStart, lastEnd);
- }
-
- return stackTrace;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/BackgroundSaveTimer.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/BackgroundSaveTimer.java
deleted file mode 100644
index 1caff5e28..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/BackgroundSaveTimer.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.ui.util;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.monitor.core.ActivityTimerThread;
-import org.eclipse.mylyn.monitor.core.IActivityTimerListener;
-
-/**
- * Timer that periodically runs saveRequested() on its client as a job
- *
- * @author Wesley Coelho
- */
-public class BackgroundSaveTimer implements IActivityTimerListener {
-
- private final static int DEFAULT_SAVE_INTERVAL = 60 * 1000;
-
- private int saveInterval = DEFAULT_SAVE_INTERVAL;
-
- private IBackgroundSaveListener listener = null;
-
- private ActivityTimerThread timer = null;
-
-// private boolean forceSyncExec = false;
-
- public BackgroundSaveTimer(IBackgroundSaveListener listener) {
- this.listener = listener;
- timer = new ActivityTimerThread(saveInterval);
- timer.addListener(this);
- }
-
- public void start() {
- timer.start();
- }
-
- public void stop() {
- timer.kill();
- }
-
- public void setSaveIntervalMillis(int saveIntervalMillis) {
- this.saveInterval = saveIntervalMillis;
- timer.setTimeoutMillis(saveIntervalMillis);
- }
-
- public int getSaveIntervalMillis() {
- return saveInterval;
- }
-
-// /**
-// * For testing
-// */
-// public void setForceSyncExec(boolean forceSyncExec) {
-// this.forceSyncExec = forceSyncExec;
-// }
-
- /**
- * Called by the ActivityTimerThread Calls save in a new job
- */
- public void fireInactive() {
- try {
-// if (!forceSyncExec) {
-// final SaveJob job = new SaveJob("Saving Task Data", listener);
-// job.schedule();
-// } else {
- listener.saveRequested();
-// }
- } catch (RuntimeException e) {
- StatusHandler.log(new Status(IStatus.WARNING, TasksUiPlugin.ID_PLUGIN, "Could not schedule save job", e));
- }
- }
-
-// /** Job that makes the save call */
-// private class SaveJob extends Job {
-// private IBackgroundSaveListener listener = null;
-//
-// public SaveJob(String name, IBackgroundSaveListener listener) {
-// super(name);
-// this.listener = listener;
-// }
-//
-// @Override
-// protected IStatus run(IProgressMonitor monitor) {
-// listener.saveRequested();
-// return Status.OK_STATUS;
-// }
-// }
-
- public void fireActive(long start, long end) {
- // ignore
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/IBackgroundSaveListener.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/IBackgroundSaveListener.java
deleted file mode 100644
index 8d9b03752..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/IBackgroundSaveListener.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.ui.util;
-
-/**
- * Interface implemented by clients who are to be notified of periodic requests to save data to disk.
- *
- * @author Wesley Coelho
- */
-public interface IBackgroundSaveListener {
-
- /**
- * Called to notify the client of a PeriodicSaveTimer that a save should be performed
- */
- public void saveRequested();
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/SelectionProviderAdapter.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/SelectionProviderAdapter.java
deleted file mode 100644
index b7b48e718..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/SelectionProviderAdapter.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.ui.util;
-
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.ISelectionProvider;
-
-/**
- * @author Steffen Pingel
- */
-public class SelectionProviderAdapter implements ISelectionProvider {
-
- public void addSelectionChangedListener(ISelectionChangedListener listener) {
- // ignore
- }
-
- public ISelection getSelection() {
- // ignore
- return null;
- }
-
- public void removeSelectionChangedListener(ISelectionChangedListener listener) {
- // ignore
- }
-
- public void setSelection(ISelection selection) {
- // ignore
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskDataExportOperation.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskDataExportOperation.java
deleted file mode 100644
index fc5ba376e..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskDataExportOperation.java
+++ /dev/null
@@ -1,272 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.util;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.context.core.ContextCore;
-import org.eclipse.mylyn.internal.commons.core.ZipFileUtil;
-import org.eclipse.mylyn.internal.context.core.ContextCorePlugin;
-import org.eclipse.mylyn.internal.context.core.InteractionContextManager;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
-import org.eclipse.mylyn.internal.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.ITask;
-
-/**
- * Job that performs exporting (copying or zipping) of the Task List data Assumes that check with user for overwrite
- * already done. Overwrites destination if exists!
- *
- * @author Wesley Coelho
- * @author Mik Kersten
- * @author Rob Elves
- *
- * TODO: Move into internal.tasks.core
- */
-public class TaskDataExportOperation implements IRunnableWithProgress {
-
- private static final String JOB_LABEL = "Exporting Mylyn Task Data";
-
- private final boolean zip;
-
- private final boolean exportTaskList;
-
- private final boolean exportActivationHistory;
-
- private final boolean exportTaskContexts;
-
- private final String destinationDirectory;
-
- private final String zipFileName;
-
- private File destZipFile = null;
-
- private final Collection<AbstractTask> tasks;
-
- /** export all data */
- public TaskDataExportOperation(String destinationDirectory, boolean zipIt, String zipFileName) {
- this(destinationDirectory, true, true, true, zipIt, zipFileName, TasksUiPlugin.getTaskList().getAllTasks());
- }
-
- /** export specified data */
- public TaskDataExportOperation(String destinationDirectory, boolean exportTaskList,
- boolean exportActivationHistory, boolean exportTaskContexts, boolean zipIt, String zipFileName,
- Collection<AbstractTask> taskContextsToExport) {
- this.zipFileName = zipFileName;
- this.zip = zipIt;
- this.exportTaskList = exportTaskList;
- this.exportActivationHistory = exportActivationHistory;
- this.exportTaskContexts = exportTaskContexts;
- this.destinationDirectory = destinationDirectory;
- this.tasks = taskContextsToExport;
- }
-
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- int jobSize = 1; // 1 for repositories.xml
- if (exportTaskList) {
- jobSize++;
- }
- if (exportActivationHistory) {
- jobSize++;
- }
- if (exportTaskContexts) {
- jobSize += tasks.size();
- }
-
- // List of files to add to the zip archive
- List<File> filesToZip = new ArrayList<File>();
-
- // Map of file paths used to avoid duplicates
- Map<String, String> filesToZipMap = new HashMap<String, String>();
-
- try {
- monitor.beginTask(JOB_LABEL, jobSize);
- Job.getJobManager().beginRule(ITasksCoreConstants.ROOT_SCHEDULING_RULE, monitor);
- // Create folders in zip file before contained files
- String sourceContextsPath = TasksUiPlugin.getDefault().getDataDirectory() + File.separator
- + ITasksCoreConstants.CONTEXTS_DIRECTORY;
- File contextsDirectory = new File(sourceContextsPath);
- // if(contextsDirectory.exists()) {
- // filesToZip.add(contextsDirectory);
- // }
- if (true) {
- // Repositories always exported
-// TasksUiPlugin.getRepositoryManager().saveRepositories(
-// TasksUiPlugin.getDefault().getRepositoriesFilePath());
-
- String sourceRepositoriesPath = TasksUiPlugin.getDefault().getDataDirectory() + File.separator
- + TaskRepositoryManager.DEFAULT_REPOSITORIES_FILE;
- File sourceRepositoriesFile = new File(sourceRepositoriesPath);
- if (sourceRepositoriesFile.exists()) {
- File destRepositoriesFile = new File(destinationDirectory + File.separator
- + TaskRepositoryManager.DEFAULT_REPOSITORIES_FILE);
-
- if (zip) {
- filesToZip.add(sourceRepositoriesFile);
- } else if (!destRepositoriesFile.equals(sourceRepositoriesFile)) {
- if (destRepositoriesFile.exists()) {
- destRepositoriesFile.delete();
- }
- if (!copy(sourceRepositoriesFile, destRepositoriesFile)) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Could not export repositories file", new Exception()));
- }
- monitor.worked(1);
- }
- }
-
- }
-
- if (exportTaskList) {
- String sourceTaskListPath = TasksUiPlugin.getDefault().getDataDirectory() + File.separator
- + ITasksCoreConstants.DEFAULT_TASK_LIST_FILE;
- File sourceTaskListFile = new File(sourceTaskListPath);
- if (sourceTaskListFile.exists()) {
- File destTaskListFile = new File(destinationDirectory + File.separator
- + ITasksCoreConstants.DEFAULT_TASK_LIST_FILE);
-
- if (zip) {
- filesToZip.add(sourceTaskListFile);
- } else if (!destTaskListFile.equals(sourceTaskListFile)) {
- if (destTaskListFile.exists()) {
- destTaskListFile.delete();
- }
- if (!copy(sourceTaskListFile, destTaskListFile)) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Could not export task list file", new Exception()));
- }
- monitor.worked(1);
- }
- }
-
- }
-
- if (exportActivationHistory) {
- try {
- File sourceActivationHistoryFile = new File(contextsDirectory,
- InteractionContextManager.CONTEXT_HISTORY_FILE_NAME
- + InteractionContextManager.CONTEXT_FILE_EXTENSION);
-
- if (sourceActivationHistoryFile.exists()) {
-
- File destActivationHistoryFile = new File(destinationDirectory + File.separator
- + InteractionContextManager.CONTEXT_HISTORY_FILE_NAME
- + InteractionContextManager.CONTEXT_FILE_EXTENSION);
-
- if (zip) {
- filesToZip.add(sourceActivationHistoryFile);
- } else if (!destActivationHistoryFile.equals(sourceActivationHistoryFile)) {
- if (destActivationHistoryFile.exists()) {
- destActivationHistoryFile.delete();
- }
- copy(sourceActivationHistoryFile, destActivationHistoryFile);
- monitor.worked(1);
- }
- }
- } catch (RuntimeException e) {
- // FIXME what is caught here?
- StatusHandler.fail(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Could not export activity history context file", e));
- }
- }
-
- if (exportTaskContexts) {
- // Prevent many repeated error messages
- boolean errorDisplayed = false;
- for (ITask task : tasks) {
-
- if (!ContextCore.getContextManager().hasContext(task.getHandleIdentifier())) {
- continue; // Tasks without a context have no file to
- // copy
- }
-
- File sourceTaskContextFile = ContextCorePlugin.getContextStore().getFileForContext(
- task.getHandleIdentifier());
-
- File destTaskFile = new File(destinationDirectory + File.separator
- + sourceTaskContextFile.getName());
-
- if (zip) {
- if (!filesToZipMap.containsKey(task.getHandleIdentifier())) {
- filesToZip.add(sourceTaskContextFile);
- filesToZipMap.put(task.getHandleIdentifier(), null);
- }
- } else if (!sourceTaskContextFile.equals(destTaskFile)) {
- if (destTaskFile.exists()) {
- destTaskFile.delete();
- }
- if (!copy(sourceTaskContextFile, destTaskFile) && !errorDisplayed) {
- Exception e = new Exception("Export Exception: " + sourceTaskContextFile.getPath() + " -> "
- + destTaskFile.getPath());
- StatusHandler.fail(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Could not export one or more task context files", e));
- errorDisplayed = true;
- }
- monitor.worked(1);
- }
- }
- }
-
- if (zip && filesToZip.size() > 0) {
- try {
- destZipFile = new File(destinationDirectory + File.separator + zipFileName);
- if (destZipFile.exists()) {
- destZipFile.delete();
- }
- ZipFileUtil.createZipFile(destZipFile, filesToZip, TasksUiPlugin.getDefault().getDataDirectory(),
- monitor);
- } catch (Exception e) {
- StatusHandler.fail(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Could not create zip file",
- e));
- }
- }
- } finally {
- Job.getJobManager().endRule(ITasksCoreConstants.ROOT_SCHEDULING_RULE);
- monitor.done();
- }
- }
-
- private boolean copy(File src, File dst) {
- try {
- InputStream in = new FileInputStream(src);
- OutputStream out = new FileOutputStream(dst);
-
- // Transfer bytes from in to out
- byte[] buf = new byte[1024];
- int len;
- while ((len = in.read(buf)) > 0) {
- out.write(buf, 0, len);
- }
- in.close();
- out.close();
- return true;
- } catch (IOException ioe) {
- return false;
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskDragSourceListener.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskDragSourceListener.java
deleted file mode 100644
index 49791f8bb..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskDragSourceListener.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.ui.util;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URLEncoder;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-import org.eclipse.mylyn.internal.tasks.ui.TaskTransfer;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.actions.CopyTaskDetailsAction;
-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.ui.TasksUi;
-import org.eclipse.swt.dnd.DragSourceAdapter;
-import org.eclipse.swt.dnd.DragSourceEvent;
-import org.eclipse.swt.dnd.FileTransfer;
-import org.eclipse.swt.dnd.TextTransfer;
-
-/**
- * @author Mik Kersten
- * @author Jevgeni Holodkov
- * @author Leo Dos Santos
- * @author Steffen Pingel
- */
-public class TaskDragSourceListener extends DragSourceAdapter {
-
- static final String DELIM = ", ";
-
- private IStructuredSelection selection;
-
- private final ISelectionProvider selectionProvider;
-
- public TaskDragSourceListener(ISelectionProvider selectionProvider) {
- this.selectionProvider = selectionProvider;
- }
-
- @Override
- public void dragStart(DragSourceEvent event) {
- ISelection selection = selectionProvider.getSelection();
- if (selection instanceof IStructuredSelection && !selection.isEmpty()) {
- this.selection = (IStructuredSelection) selection;
- } else {
- this.selection = null;
- event.doit = false;
- }
- }
-
- private List<File> createTaskFiles(IStructuredSelection selection) {
- // prepare temporary directory
- File tempDir = new File(TasksUiPlugin.getDefault().getDataDirectory() + File.separator + "temp");
- if (!tempDir.exists()) {
- tempDir.mkdirs();
- }
-
- // extract queries and tasks from selection
- List<RepositoryQuery> queries = new ArrayList<RepositoryQuery>();
- List<AbstractTask> tasks = new ArrayList<AbstractTask>();
- for (Iterator<?> it = selection.iterator(); it.hasNext();) {
- Object element = it.next();
- if (element instanceof IRepositoryQuery) {
- queries.add((RepositoryQuery) element);
- } else if (element instanceof ITask) {
- tasks.add((AbstractTask) element);
- }
- }
-
- List<File> taskFiles = new ArrayList<File>(queries.size() + tasks.size());
- try {
- for (RepositoryQuery query : queries) {
- String encodedName = URLEncoder.encode(query.getHandleIdentifier(),
- ITasksCoreConstants.FILENAME_ENCODING);
- File file = File.createTempFile(encodedName, ITasksCoreConstants.FILE_EXTENSION, tempDir);
- file.deleteOnExit();
-
- TasksUiPlugin.getTaskListManager().getTaskListWriter().writeQueries(Collections.singletonList(query),
- file);
- taskFiles.add(file);
- }
-
- for (AbstractTask task : tasks) {
- String encodedName = URLEncoder.encode(task.getHandleIdentifier(),
- ITasksCoreConstants.FILENAME_ENCODING);
- File file = File.createTempFile(encodedName, ITasksCoreConstants.FILE_EXTENSION, tempDir);
- file.deleteOnExit();
-
- TasksUiPlugin.getTaskListManager().getTaskListWriter().writeTask(task, file);
- taskFiles.add(file);
- }
-
- return taskFiles;
- } catch (IOException e) {
- StatusHandler.fail(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Cannot create a temp query file for Drag&Drop", e));
- return null;
- }
- }
-
- @Override
- public void dragSetData(DragSourceEvent event) {
- if (selection == null || selection.isEmpty()) {
- return;
- }
-
- if (TaskTransfer.getInstance().isSupportedType(event.dataType)) {
- List<AbstractTask> tasks = new ArrayList<AbstractTask>();
- for (Iterator<?> it = selection.iterator(); it.hasNext();) {
- Object element = it.next();
- if (element instanceof AbstractTask) {
- tasks.add((AbstractTask) element);
- }
- }
- event.data = tasks.toArray(new AbstractTask[0]);
- } else if (FileTransfer.getInstance().isSupportedType(event.dataType)) {
- List<File> files = createTaskFiles(selection);
- if (files != null && !files.isEmpty()) {
- String[] paths = new String[files.size()];
- int i = 0;
- for (File file : files) {
- paths[i++] = file.getAbsolutePath();
- }
- event.data = paths;
- }
- } else if (TextTransfer.getInstance().isSupportedType(event.dataType)) {
- if (selection.getFirstElement() instanceof RepositoryTaskData) {
- RepositoryTaskData taskData = (RepositoryTaskData) selection.getFirstElement();
- AbstractRepositoryConnector connector = TasksUi.getRepositoryManager().getRepositoryConnector(
- taskData.getConnectorKind());
- if (connector != null) {
- event.data = connector.getTaskUrl(taskData.getRepositoryUrl(), taskData.getTaskId());
- } else {
- event.data = taskData.getSummary();
- }
- } else {
- event.data = CopyTaskDetailsAction.getTextForTask(selection.getFirstElement());
- }
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskListElementImporter.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskListElementImporter.java
deleted file mode 100644
index 1e9382924..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskListElementImporter.java
+++ /dev/null
@@ -1,742 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.ui.util;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipInputStream;
-import java.util.zip.ZipOutputStream;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.Result;
-import javax.xml.transform.Source;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.TransformerFactoryConfigurationError;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.context.core.ContextCorePlugin;
-import org.eclipse.mylyn.internal.context.core.InteractionContextExternalizer;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTaskCategory;
-import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
-import org.eclipse.mylyn.internal.tasks.core.TaskExternalizationException;
-import org.eclipse.mylyn.internal.tasks.core.TaskList;
-import org.eclipse.mylyn.internal.tasks.core.TaskRepositoriesExternalizer;
-import org.eclipse.mylyn.internal.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.internal.tasks.core.TasksModel;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractTaskListFactory;
-import org.eclipse.mylyn.internal.tasks.core.externalization.DelegatingTaskExternalizer;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.AbstractTaskListMigrator;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.SAXException;
-
-/**
- * @author Mik Kersten
- * @author Ken Sueda
- * @author Rob Elves
- * @author Jevgeni Holodkov
- */
-// API-3.0: rewrite this class
-// - move to core
-// - separate error handling and backup mechanism from externalization
-// - make the externalization stream based instead of file base
-// - separate repository externalization and task list externalization
-// - provide roll-back when import fails
-/**
- * @deprecated
- */
-@Deprecated
-public class TaskListElementImporter {
-
- private static final String TRANSFORM_PROPERTY_VERSION = "version";
-
- // May 2007: There was a bug when reading in 1.1
- // Result was an infinite loop within the parser
- private static final String XML_VERSION = "1.0";
-
- public static final String ATTRIBUTE_VERSION = "Version";
-
- public static final String ELEMENT_TASK_LIST = "TaskList";
-
- private static final String VALUE_VERSION = "1.0.1";
-
- private static final String VALUE_VERSION_1_0_0 = "1.0.0";
-
- private static final String FILE_SUFFIX_SAVE = "save.xml";
-
- private List<AbstractTaskListFactory> externalizers;
-
- private DelegatingTaskExternalizer delagatingExternalizer;
-
- private final TaskRepositoriesExternalizer repositoriesExternalizer;
-
- private final InteractionContextExternalizer contextExternalizer;
-
- private final List<Node> orphanedTaskNodes = new ArrayList<Node>();
-
- private final List<Node> orphanedQueryNodes = new ArrayList<Node>();
-
- private String readVersion = "";
-
- private boolean hasCaughtException = false;
-
- private final TaskRepositoryManager repositoryManager;
-
- private static final String MESSAGE_RESTORE = "Could not read task list. Consider restoring via File -> Import -> Mylyn Task Data";
-
- public TaskListElementImporter(TaskRepositoryManager repositoryManager, TasksModel tasksModel) {
- this.repositoryManager = repositoryManager;
- this.delagatingExternalizer = new DelegatingTaskExternalizer(tasksModel);
- this.repositoriesExternalizer = new TaskRepositoriesExternalizer();
- this.contextExternalizer = new InteractionContextExternalizer();
- }
-
- public void setDelegateExternalizers(List<AbstractTaskListFactory> externalizers,
- List<AbstractTaskListMigrator> migrators) {
- this.externalizers = externalizers;
- this.delagatingExternalizer.initialize(externalizers, migrators);
- }
-
- public void setDelegateExternalizers(List<AbstractTaskListFactory> externalizers) {
- this.externalizers = externalizers;
- this.delagatingExternalizer.initialize(externalizers, new ArrayList<AbstractTaskListMigrator>(0));
- }
-
- public void writeTaskList(TaskList taskList, File outFile) {
- try {
- FileOutputStream outStream = new FileOutputStream(outFile);
- try {
- writeTaskList(taskList, outStream);
- } finally {
- outStream.close();
- }
- } catch (Exception e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Task data was not written", e));
- }
- }
-
- public void writeTaskList(TaskList taskList, OutputStream outputStream) throws IOException {
- Document doc = createTaskListDocument();
- if (doc == null) {
- return;
- }
-
- Element root = createTaskListRoot(doc);
-
- // create task nodes...
- for (AbstractTask task : taskList.getAllTasks()) {
- delagatingExternalizer.createTaskElement(task, doc, root);
- }
-
- // create the categorie nodes...
- for (AbstractTaskCategory category : taskList.getCategories()) {
- delagatingExternalizer.createCategoryElement(category, doc, root);
- }
-
- // create query nodes...
- for (RepositoryQuery query : taskList.getQueries()) {
- try {
- delagatingExternalizer.createQueryElement(query, doc, root);
- } catch (Throwable t) {
- // FIXME use log?
- StatusHandler.fail(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Did not externalize: "
- + query.getSummary(), t));
- }
- }
-
- // Persist orphaned tasks...
- for (Node orphanedTaskNode : orphanedTaskNodes) {
- Node tempNode = doc.importNode(orphanedTaskNode, true);
- if (tempNode != null) {
- root.appendChild(tempNode);
- }
- }
-
- // Persist orphaned queries....
- for (Node orphanedQueryNode : orphanedQueryNodes) {
- Node tempNode = doc.importNode(orphanedQueryNode, true);
- if (tempNode != null) {
- root.appendChild(tempNode);
- }
- }
-
- ZipOutputStream zipOutStream = new ZipOutputStream(outputStream);
- writeTaskList(doc, zipOutStream);
- zipOutStream.finish();
- }
-
- /**
- * @param doc
- * @param outputStream
- * @throws IOException
- */
- private void writeTaskList(Document doc, ZipOutputStream outputStream) throws IOException {
- ZipEntry zipEntry = new ZipEntry(ITasksCoreConstants.OLD_TASK_LIST_FILE);
- outputStream.putNextEntry(zipEntry);
- outputStream.setMethod(ZipOutputStream.DEFLATED);
- // OutputStream outputStream = new FileOutputStream(file);
- writeDOMtoStream(doc, outputStream);
- outputStream.flush();
- outputStream.closeEntry();
- }
-
- /**
- * Writes the provided XML document out to the specified output stream.
- *
- * doc - the document to be written outputStream - the stream to which the document is to be written
- */
- private void writeDOMtoStream(Document doc, OutputStream outputStream) {
- // Prepare the DOM document for writing
- // DOMSource - Acts as a holder for a transformation Source tree in the
- // form of a Document Object Model (DOM) tree
- Source source = new DOMSource(doc);
-
- // StreamResult - Acts as an holder for a XML transformation result
- // Prepare the output stream
- Result result = new StreamResult(outputStream);
-
- // An instance of this class can be obtained with the
- // TransformerFactory.newTransformer method. This instance may
- // then be used to process XML from a variety of sources and write
- // the transformation output to a variety of sinks
-
- Transformer xformer = null;
- try {
- xformer = TransformerFactory.newInstance().newTransformer();
- xformer.setOutputProperty(TRANSFORM_PROPERTY_VERSION, XML_VERSION);
- xformer.transform(source, result);
- } catch (TransformerConfigurationException e) {
- e.printStackTrace();
- } catch (TransformerFactoryConfigurationError e) {
- e.printStackTrace();
- } catch (TransformerException e1) {
- e1.printStackTrace();
- }
- }
-
- /**
- * @deprecated
- */
- @Deprecated
- public void readTaskList(TaskList taskList, File inFile) {
- hasCaughtException = false;
- delagatingExternalizer.getLegacyParentCategoryMap().clear();
- Map<AbstractTask, NodeList> tasksWithSubtasks = new HashMap<AbstractTask, NodeList>();
- orphanedTaskNodes.clear();
- orphanedQueryNodes.clear();
- try {
- if (!inFile.exists()) {
- return;
- }
- Document doc = openAsDOM(inFile, false);
- if (doc == null) {
- handleException(inFile, null, new TaskExternalizationException("TaskList was not well formed XML"));
- return;
- }
- Element root = doc.getDocumentElement();
- readVersion = root.getAttribute(ATTRIBUTE_VERSION);
-
- if (readVersion.equals(VALUE_VERSION_1_0_0)) {
- // make an error? propagate exception?
- StatusHandler.log(new Status(IStatus.INFO, TasksUiPlugin.ID_PLUGIN, "Task list version \""
- + readVersion + "\" not supported"));
- } else {
- NodeList list = root.getChildNodes();
-
- // Read Tasks
- for (int i = 0; i < list.getLength(); i++) {
- Node child = list.item(i);
- try {
- if (!child.getNodeName().endsWith(DelegatingTaskExternalizer.KEY_CATEGORY)
- && !child.getNodeName().endsWith(AbstractTaskListFactory.KEY_QUERY)) {
-
- AbstractTask task = delagatingExternalizer.readTask(child, null, null);
- if (task == null) {
- orphanedTaskNodes.add(child);
- } else {
- taskList.addTask(task);
- if (child.getChildNodes() != null && child.getChildNodes().getLength() > 0) {
- tasksWithSubtasks.put(task, child.getChildNodes());
- }
- }
- }
- } catch (Exception e) {
- // TODO: Save orphans here too?
- // If data is source of exception then error will just repeat
- // now that orphans are re-saved upon task list save. So for now we
- // log the error warning the user and make a copy of the bad tasklist.
- handleException(inFile, child, e);
- }
- }
-
- for (AbstractTask task : tasksWithSubtasks.keySet()) {
- NodeList nodes = tasksWithSubtasks.get(task);
- delagatingExternalizer.readTaskReferences(task, nodes, taskList);
- }
-
- // Read Queries
- for (int i = 0; i < list.getLength(); i++) {
- Node child = list.item(i);
- try {
- if (child.getNodeName().endsWith(AbstractTaskListFactory.KEY_QUERY)) {
- readQuery(taskList, child);
- }
- } catch (Exception e) {
- handleException(inFile, child, e);
- }
- }
-
- // Read Categories
- for (int i = 0; i < list.getLength(); i++) {
- Node child = list.item(i);
- try {
- if (child.getNodeName().endsWith(DelegatingTaskExternalizer.KEY_CATEGORY)) {
- delagatingExternalizer.readCategory(child, taskList);
- }
- } catch (Exception e) {
- handleException(inFile, child, e);
- }
- }
-
- // Legacy migration for task nodes that have the old Category handle on the element
- if (delagatingExternalizer.getLegacyParentCategoryMap().size() > 0) {
- for (AbstractTask task : delagatingExternalizer.getLegacyParentCategoryMap().keySet()) {
- AbstractTaskCategory category = taskList.getContainerForHandle(delagatingExternalizer.getLegacyParentCategoryMap()
- .get(task));
- if (category != null) {
- taskList.addTask(task, category);
- }
- }
- }
- }
- } catch (Exception e) {
- handleException(inFile, null, e);
- }
- if (hasCaughtException) {
- // if exception was caught, write out the new task file, so that it
- // doesn't happen again.
- // this is OK, since the original (corrupt) tasklist is saved.
- writeTaskList(taskList, inFile);
- }
- }
-
- private Document createTaskListDocument() {
- DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
- DocumentBuilder db;
- Document doc = null;
-
- try {
- db = dbf.newDocumentBuilder();
- doc = db.newDocument();
- } catch (ParserConfigurationException e) {
- // FIXME propagate exception?
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Could not create document", e));
- return doc;
- }
-
- return doc;
- }
-
- private Element createTaskListRoot(Document doc) {
- Element root = doc.createElement(ELEMENT_TASK_LIST);
- root.setAttribute(ATTRIBUTE_VERSION, VALUE_VERSION);
- doc.appendChild(root);
- return root;
- }
-
- /**
- * Reads the Query from the specified Node. If taskList is not null, then also adds this query to the TaskList
- *
- * @throws TaskExternalizationException
- */
- private RepositoryQuery readQuery(TaskList taskList, Node child) throws TaskExternalizationException {
- RepositoryQuery query = null;
- for (AbstractTaskListFactory externalizer : externalizers) {
- Set<String> queryTagNames = externalizer.getQueryElementNames();
- if (queryTagNames != null && queryTagNames.contains(child.getNodeName())) {
- Element childElement = (Element) child;
- // TODO: move this stuff into externalizer
- String repositoryUrl = childElement.getAttribute(DelegatingTaskExternalizer.KEY_REPOSITORY_URL);
- String queryString = childElement.getAttribute(AbstractTaskListFactory.KEY_QUERY_STRING);
- if (queryString.length() == 0) { // fallback for legacy
- queryString = childElement.getAttribute(AbstractTaskListFactory.KEY_QUERY);
- }
- String label = childElement.getAttribute(DelegatingTaskExternalizer.KEY_NAME);
- if (label.length() == 0) { // fallback for legacy
- label = childElement.getAttribute(DelegatingTaskExternalizer.KEY_LABEL);
- }
-
- query = externalizer.createQuery(repositoryUrl, queryString, label, childElement);
- if (query != null) {
- if (childElement.getAttribute(DelegatingTaskExternalizer.KEY_LAST_REFRESH) != null
- && !childElement.getAttribute(DelegatingTaskExternalizer.KEY_LAST_REFRESH).equals("")) {
- query.setLastSynchronizedStamp(childElement.getAttribute(DelegatingTaskExternalizer.KEY_LAST_REFRESH));
- }
- }
-
- // add created Query to the TaskList and read QueryHits (Tasks related to the Query)
- if (taskList != null) {
- if (query != null) {
- taskList.addQuery(query);
- }
-
- NodeList queryChildren = child.getChildNodes();
-// try {
- delagatingExternalizer.readTaskReferences(query, queryChildren, taskList);
-// } catch (TaskExternalizationException e) {
-// hasCaughtException = true;
-// }
- }
-
- break;
- }
- }
- if (query == null) {
- orphanedQueryNodes.add(child);
- }
-
- return query;
- }
-
- /**
- * Opens the specified XML file and parses it into a DOM Document.
- *
- * Filename - the name of the file to open Return - the Document built from the XML file Throws - XMLException if
- * the file cannot be parsed as XML - IOException if the file cannot be opened
- */
- private Document openAsDOM(File inputFile, boolean propagateException) throws IOException {
-
- // A factory API that enables applications to obtain a parser
- // that produces DOM object trees from XML documents
- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
-
- // Using DocumentBuilder, obtain a Document from XML file.
- DocumentBuilder builder = null;
- Document document = null;
- try {
- // create new instance of DocumentBuilder
- builder = factory.newDocumentBuilder();
- } catch (ParserConfigurationException pce) {
- inputFile.renameTo(new File(inputFile.getName() + FILE_SUFFIX_SAVE));
- IOException ioe = new IOException("Failed to load XML file");
- ioe.initCause(pce);
- throw ioe;
- }
- try {
- // Parse the content of the given file as an XML document
- // and return a new DOM Document object. Also throws IOException
- InputStream inputStream = null;
- if (inputFile.getName().endsWith(ITasksCoreConstants.FILE_EXTENSION)) {
- // is zipped context
- inputStream = new ZipInputStream(new FileInputStream(inputFile));
- // search for TaskList entry
- ZipEntry entry = ((ZipInputStream) inputStream).getNextEntry();
- while (entry != null) {
- if (ITasksCoreConstants.OLD_TASK_LIST_FILE.equals(entry.getName())) {
- break;
- }
- entry = ((ZipInputStream) inputStream).getNextEntry();
- }
- if (entry == null) {
- return null;
- }
- } else {
- inputStream = new FileInputStream(inputFile);
- }
- document = builder.parse(inputStream);
- // document = builder.parse(inputFile);
- } catch (SAXException se) {
- // TODO: Use TaskListBackupManager to attempt restore from backup
- if (propagateException) {
- throw new IOException("The task list format is invalid");
- } else {
- MessageDialog.openWarning(null, "Mylyn task list corrupt",
- "Unable to read the Mylyn task list. Please restore from previous backup via File > Import > Mylyn Task Data");
- }
- }
- return document;
- }
-
- private void handleException(File inFile, Node child, Exception e) {
- hasCaughtException = true;
- String name = inFile.getAbsolutePath();
- Date date = new Date();
- SimpleDateFormat sdf = new SimpleDateFormat();
- sdf.applyPattern("yy-MM-dd-ss");
- name = name.substring(0, name.lastIndexOf('.')) + "-failed-" + sdf.format(date) + ".zip";
- File save = new File(name);
- if (save.exists()) {
- if (!save.delete()) {
- StatusHandler.log(new Status(IStatus.WARNING, TasksUiPlugin.ID_PLUGIN,
- "Unable to delete old backup tasklist file"));
- return;
- }
- }
- if (!copy(inFile, save)) {
- inFile.renameTo(new File(name));
- }
- if (child == null) {
- StatusHandler.log(new Status(IStatus.WARNING, TasksUiPlugin.ID_PLUGIN, MESSAGE_RESTORE, e));
- } else {
- StatusHandler.log(new Status(IStatus.WARNING, TasksUiPlugin.ID_PLUGIN, "Tasks may have been lost from "
- + child.getNodeName(), e));
- }
- }
-
- private boolean copy(File src, File dst) {
- try {
- InputStream in = new FileInputStream(src);
- OutputStream out = new FileOutputStream(dst);
-
- // Transfer bytes from in to out
- byte[] buf = new byte[1024];
- int len;
- while ((len = in.read(buf)) > 0) {
- out.write(buf, 0, len);
- }
- in.close();
- out.close();
- return true;
- } catch (IOException ioe) {
- return false;
- }
- }
-
- public void setDelegatingExternalizer(DelegatingTaskExternalizer delagatingExternalizer) {
- this.delagatingExternalizer = delagatingExternalizer;
- }
-
- public List<AbstractTaskListFactory> getExternalizers() {
- return externalizers;
- }
-
- public void writeQueries(List<RepositoryQuery> queries, File outFile) {
- Set<TaskRepository> repositories = new HashSet<TaskRepository>();
- for (IRepositoryQuery query : queries) {
- TaskRepository repository = TasksUi.getRepositoryManager().getRepository(query.getConnectorKind(),
- query.getRepositoryUrl());
- if (repository != null) {
- repositories.add(repository);
- }
- }
-
- Document doc = createQueryDocument(queries);
- if (doc != null) {
- try {
- ZipOutputStream outputStream = new ZipOutputStream(new FileOutputStream(outFile));
- writeTaskList(doc, outputStream);
- repositoriesExternalizer.writeRepositories(repositories, outputStream);
- outputStream.close();
- } catch (Exception e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Task list could not be found", e));
- }
- }
- return;
- }
-
- /**
- * @return null if it was not possible to create the Query document.
- */
- public Document createQueryDocument(List<RepositoryQuery> queries) {
- Document doc = createTaskListDocument();
- if (doc == null) {
- return null;
- }
-
- Element root = createTaskListRoot(doc);
-
- for (RepositoryQuery query : queries) {
- try {
- delagatingExternalizer.createQueryElement(query, doc, root);
- } catch (Throwable t) {
- StatusHandler.fail(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Did not externalize: "
- + query.getSummary(), t));
- return null;
- }
- }
-
-// doc.appendChild(root);
- return doc;
- }
-
- public List<RepositoryQuery> readQueries(File inFile) throws IOException {
- if (!inFile.exists()) {
- throw new FileNotFoundException("File does not exist: " + inFile);
- }
-
- Document doc = openAsDOM(inFile, true);
- if (doc == null) {
- throw new IOException("TaskList was not well formed XML");
- }
- return readQueryDocument(doc);
- }
-
- /**
- * @param Query
- * document to read.
- */
- public List<RepositoryQuery> readQueryDocument(Document doc) {
- List<RepositoryQuery> queries = new ArrayList<RepositoryQuery>();
- Element root = doc.getDocumentElement();
- readVersion = root.getAttribute(ATTRIBUTE_VERSION);
-
- if (!readVersion.equals(VALUE_VERSION_1_0_0)) {
- NodeList list = root.getChildNodes();
-
- // read queries
- for (int i = 0; i < list.getLength(); i++) {
- Node child = list.item(i);
- try {
- if (child.getNodeName().endsWith(AbstractTaskListFactory.KEY_QUERY)) {
- RepositoryQuery query = readQuery(null, child);
- if (query != null) {
- queries.add(query);
- }
- }
- } catch (Exception e) {
- StatusHandler.log(new Status(IStatus.WARNING, TasksUiPlugin.ID_PLUGIN,
- "Tasks may have been lost from " + child.getNodeName(), e));
- }
- }
- } else {
- // FIXME propagate error?
- StatusHandler.log(new Status(IStatus.WARNING, TasksUiPlugin.ID_PLUGIN, "Version \"" + readVersion
- + "\" not supported"));
- }
-
- return queries;
- }
-
- public Set<TaskRepository> readRepositories(File file) {
- Set<TaskRepository> repository = repositoriesExternalizer.readRepositoriesFromXML(file);
- if (repository == null) {
- repository = new HashSet<TaskRepository>();
- }
- return repository;
- }
-
- public void writeTask(AbstractTask task, File outFile) {
- try {
- writeTask(task, new FileOutputStream(outFile));
- } catch (Exception e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Task data was not written", e));
- }
- }
-
- public void writeTask(AbstractTask task, OutputStream stream) {
- Set<TaskRepository> repositories = new HashSet<TaskRepository>();
- if (!task.isLocal()) {
- repositories.add(repositoryManager.getRepository(task.getConnectorKind(), task.getRepositoryUrl()));
- }
-
- Document doc = createTaskListDocument();
- if (doc == null) {
- return;
- }
-
- Element root = createTaskListRoot(doc);
-
- delagatingExternalizer.createTaskElement(task, doc, root);
- try {
- ZipOutputStream outputStream = new ZipOutputStream(stream);
- // write task data
- writeTaskList(doc, outputStream);
-
- // write context data
- ContextCorePlugin.getContextStore().export(task.getHandleIdentifier(), outputStream);
-
- if (repositories.size() > 0) {
- repositoriesExternalizer.writeRepositories(repositories, outputStream);
- }
-
- outputStream.close();
- } catch (Exception e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Task data was not written", e));
- }
- }
-
- public List<AbstractTask> readTasks(File inFile) {
- List<AbstractTask> tasks = new ArrayList<AbstractTask>();
- try {
- if (!inFile.exists()) {
- return tasks;
- }
- Document doc = openAsDOM(inFile, false);
- if (doc == null) {
- handleException(inFile, null, new TaskExternalizationException("TaskList was not well formed XML"));
- return tasks;
- }
-
- // read task document
- Element root = doc.getDocumentElement();
- readVersion = root.getAttribute(ATTRIBUTE_VERSION);
-
- if (!readVersion.equals(VALUE_VERSION_1_0_0)) {
- NodeList list = root.getChildNodes();
-
- // read tasks
- for (int i = 0; i < list.getLength(); i++) {
- Node child = list.item(i);
- try {
- if (!child.getNodeName().endsWith(DelegatingTaskExternalizer.KEY_CATEGORY)
- && !child.getNodeName().endsWith(AbstractTaskListFactory.KEY_QUERY)) {
- AbstractTask task = delagatingExternalizer.readTask(child, null, null);
- if (task != null) {
- tasks.add(task);
- }
- }
- } catch (Exception e) {
- StatusHandler.log(new Status(IStatus.WARNING, TasksUiPlugin.ID_PLUGIN,
- "Tasks may have been lost from " + child.getNodeName(), e));
- }
- }
- } else {
- // FIXME propagate error?
- StatusHandler.log(new Status(IStatus.WARNING, TasksUiPlugin.ID_PLUGIN, "Version \"" + readVersion
- + "\" not supported"));
- }
- } catch (Exception e) {
- handleException(inFile, null, e);
- }
-
- return tasks;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskPropertyTester.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskPropertyTester.java
deleted file mode 100644
index 0d57cb6cb..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskPropertyTester.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.util;
-
-import org.eclipse.core.expressions.PropertyTester;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.ui.AttachmentUtil;
-import org.eclipse.mylyn.tasks.core.ITask;
-
-/**
- * @author Steffen Pingel
- */
-public class TaskPropertyTester extends PropertyTester {
-
- private static final String PROPERTY_CAN_GET_ATTACHEMNT = "canGetAttachment";
-
- private static final String PROPERTY_CAN_POST_ATTACHMENT = "canPostAttachment";
-
- private static final String PROPERTY_CONNECTOR_KIND = "connectorKind";
-
- private static final String PROPERTY_HAS_LOCAL_CONTEXT = "hasLocalContext";
-
- private static final String PROPERTY_HAS_REPOSITORY_CONTEXT = "hasRepositoryContext";
-
- private static final String PROPERTY_IS_COMPLETED = "isCompleted";
-
- private static final String PROPERTY_IS_LOCAL = "isLocal";
-
- private static final String PROPERTY_LOCAL_COMPLETION_STATE = "hasLocalCompletionState";
-
- private boolean equals(boolean value, Object expectedValue) {
- return new Boolean(value).equals(expectedValue);
- }
-
- @SuppressWarnings("deprecation")
- public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
- if (receiver instanceof ITask) {
- ITask task = (ITask) receiver;
- if (PROPERTY_CONNECTOR_KIND.equals(property)) {
- return task.getConnectorKind().equals(expectedValue);
- } else if (PROPERTY_CAN_POST_ATTACHMENT.equals(property)) {
- return equals(AttachmentUtil.canDownloadAttachment(task), expectedValue);
- } else if (PROPERTY_CAN_GET_ATTACHEMNT.equals(property)) {
- return equals(AttachmentUtil.canUploadAttachment(task), expectedValue);
- } else if (PROPERTY_HAS_LOCAL_CONTEXT.equals(property)) {
- return equals(AttachmentUtil.hasLocalContext(task), expectedValue);
- } else if (PROPERTY_HAS_REPOSITORY_CONTEXT.equals(property)) {
- return equals(AttachmentUtil.hasContextAttachment(task), expectedValue);
- } else if (PROPERTY_IS_COMPLETED.equals(property)) {
- return equals(task.isCompleted(), expectedValue);
- } else if (PROPERTY_IS_LOCAL.equals(property)) {
- return (task instanceof AbstractTask) && equals(((AbstractTask) task).isLocal(), expectedValue);
- } else if (PROPERTY_LOCAL_COMPLETION_STATE.equals(property)) {
- return equals(TasksUiInternal.hasLocalCompletionState(task), expectedValue);
- }
- }
- return false;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TasksUiExtensionReader.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TasksUiExtensionReader.java
deleted file mode 100644
index 15f0d6cb2..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TasksUiExtensionReader.java
+++ /dev/null
@@ -1,499 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.ui.util;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractLegacyRepositoryConnector;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractTaskListFactory;
-import org.eclipse.mylyn.internal.tasks.core.externalization.TaskListExternalizer;
-import org.eclipse.mylyn.internal.tasks.ui.IDynamicSubMenuContributor;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.deprecated.AbstractTaskEditorFactory;
-import org.eclipse.mylyn.internal.tasks.ui.views.AbstractTaskListPresentation;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.tasks.core.AbstractDuplicateDetector;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.AbstractTaskListMigrator;
-import org.eclipse.mylyn.tasks.core.RepositoryTemplate;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.AbstractTaskRepositoryLinkProvider;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPageFactory;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-
-/**
- * @author Mik Kersten
- * @author Shawn Minto
- * @author Rob Elves
- */
-public class TasksUiExtensionReader {
-
- public static final String EXTENSION_REPOSITORIES = "org.eclipse.mylyn.tasks.ui.repositories";
-
- public static final String EXTENSION_REPOSITORY_LINKS_PROVIDERS = "org.eclipse.mylyn.tasks.ui.projectLinkProviders";
-
- public static final String EXTENSION_TEMPLATES = "org.eclipse.mylyn.tasks.core.templates";
-
- public static final String EXTENSION_TMPL_REPOSITORY = "repository";
-
- public static final String ELMNT_TMPL_LABEL = "label";
-
- public static final String ELMNT_TMPL_URLREPOSITORY = "urlRepository";
-
- public static final String ELMNT_TMPL_REPOSITORYKIND = "repositoryKind";
-
- public static final String ELMNT_TMPL_CHARACTERENCODING = "characterEncoding";
-
- public static final String ELMNT_TMPL_ANONYMOUS = "anonymous";
-
- public static final String ELMNT_TMPL_VERSION = "version";
-
- public static final String ELMNT_TMPL_URLNEWTASK = "urlNewTask";
-
- public static final String ELMNT_TMPL_URLTASK = "urlTask";
-
- public static final String ELMNT_TMPL_URLTASKQUERY = "urlTaskQuery";
-
- public static final String ELMNT_TMPL_NEWACCOUNTURL = "urlNewAccount";
-
- public static final String ELMNT_TMPL_ADDAUTO = "addAutomatically";
-
- public static final String ELMNT_REPOSITORY_CONNECTOR = "connectorCore";
-
- public static final String ATTR_USER_MANAGED = "userManaged";
-
- public static final String ATTR_CUSTOM_NOTIFICATIONS = "customNotifications";
-
- public static final String ELMNT_REPOSITORY_LINK_PROVIDER = "linkProvider";
-
- public static final String ELMNT_REPOSITORY_UI = "connectorUi";
-
- public static final String ELMNT_EXTERNALIZER = "taskListFactory";
-
- public static final String ELMNT_MIGRATOR = "taskListMigrator";
-
- public static final String ATTR_BRANDING_ICON = "brandingIcon";
-
- public static final String ATTR_OVERLAY_ICON = "overlayIcon";
-
- public static final String ELMNT_TYPE = "type";
-
- public static final String ELMNT_QUERY_PAGE = "queryPage";
-
- public static final String ELMNT_SETTINGS_PAGE = "settingsPage";
-
- public static final String EXTENSION_TASK_CONTRIBUTOR = "org.eclipse.mylyn.tasks.ui.actions";
-
- public static final String ATTR_ACTION_CONTRIBUTOR_CLASS = "taskHandlerClass";
-
- public static final String DYNAMIC_POPUP_ELEMENT = "dynamicPopupMenu";
-
- public static final String ATTR_CLASS = "class";
-
- public static final String ATTR_MENU_PATH = "menuPath";
-
- public static final String EXTENSION_EDITORS = "org.eclipse.mylyn.tasks.ui.editors";
-
- public static final String ELMNT_EDITOR_FACTORY = "editorFactory";
-
- public static final String ELMNT_TASK_EDITOR_PAGE_FACTORY = "pageFactory";
-
- public static final String ELMNT_HYPERLINK_DETECTOR = "hyperlinkDetector";
-
- public static final String EXTENSION_DUPLICATE_DETECTORS = "org.eclipse.mylyn.tasks.ui.duplicateDetectors";
-
- public static final String ELMNT_DUPLICATE_DETECTOR = "detector";
-
- public static final String ATTR_NAME = "name";
-
- public static final String ATTR_KIND = "kind";
-
- private static final String EXTENSION_PRESENTATIONS = "org.eclipse.mylyn.tasks.ui.presentations";
-
- public static final String ELMNT_PRESENTATION = "presentation";
-
- public static final String ATTR_ICON = "icon";
-
- public static final String ATTR_PRIMARY = "primary";
-
- public static final String ATTR_ID = "id";
-
- private static boolean coreExtensionsRead = false;
-
- @SuppressWarnings("deprecation")
- public static void initStartupExtensions(TaskListExternalizer taskListExternalizer,
- TaskListElementImporter taskListImporter) {
- if (!coreExtensionsRead) {
- IExtensionRegistry registry = Platform.getExtensionRegistry();
-
- // NOTE: has to be read first, consider improving
- List<AbstractTaskListFactory> externalizers = new ArrayList<AbstractTaskListFactory>();
- List<AbstractTaskListMigrator> migrators = new ArrayList<AbstractTaskListMigrator>();
- IExtensionPoint repositoriesExtensionPoint = registry.getExtensionPoint(EXTENSION_REPOSITORIES);
- IExtension[] repositoryExtensions = repositoriesExtensionPoint.getExtensions();
- for (IExtension repositoryExtension : repositoryExtensions) {
- IConfigurationElement[] elements = repositoryExtension.getConfigurationElements();
- for (IConfigurationElement element : elements) {
- if (element.getName().equals(ELMNT_REPOSITORY_CONNECTOR)) {
- readRepositoryConnectorCore(element);
- } else if (element.getName().equals(ELMNT_EXTERNALIZER)) {
- readExternalizer(element, externalizers);
- } else if (element.getName().equals(ELMNT_MIGRATOR)) {
- readMigrator(element, migrators);
- }
- }
- }
- taskListExternalizer.initialize(externalizers, migrators);
- taskListImporter.setDelegateExternalizers(externalizers, migrators);
-
- IExtensionPoint templatesExtensionPoint = registry.getExtensionPoint(EXTENSION_TEMPLATES);
- IExtension[] templateExtensions = templatesExtensionPoint.getExtensions();
- for (IExtension templateExtension : templateExtensions) {
- IConfigurationElement[] elements = templateExtension.getConfigurationElements();
- for (IConfigurationElement element : elements) {
- if (element.getName().equals(EXTENSION_TMPL_REPOSITORY)) {
- readRepositoryTemplate(element);
- }
- }
- }
-
- IExtensionPoint presentationsExtensionPoint = registry.getExtensionPoint(EXTENSION_PRESENTATIONS);
- IExtension[] presentations = presentationsExtensionPoint.getExtensions();
- for (IExtension presentation : presentations) {
- IConfigurationElement[] elements = presentation.getConfigurationElements();
- for (IConfigurationElement element : elements) {
- readPresentation(element);
- }
- }
-
- // NOTE: causes ..mylyn.context.ui to load
- IExtensionPoint editorsExtensionPoint = registry.getExtensionPoint(EXTENSION_EDITORS);
- IExtension[] editors = editorsExtensionPoint.getExtensions();
- for (IExtension editor : editors) {
- IConfigurationElement[] elements = editor.getConfigurationElements();
- for (IConfigurationElement element : elements) {
- if (element.getName().equals(ELMNT_EDITOR_FACTORY)) {
- readEditorFactory(element);
- } else if (element.getName().equals(ELMNT_TASK_EDITOR_PAGE_FACTORY)) {
- readTaskEditorPageFactory(element);
- }
- }
- }
-
- coreExtensionsRead = true;
- }
- }
-
- public static void initWorkbenchUiExtensions() {
- IExtensionRegistry registry = Platform.getExtensionRegistry();
-
- IExtensionPoint repositoriesExtensionPoint = registry.getExtensionPoint(EXTENSION_REPOSITORIES);
- IExtension[] repositoryExtensions = repositoriesExtensionPoint.getExtensions();
- for (IExtension repositoryExtension : repositoryExtensions) {
- IConfigurationElement[] elements = repositoryExtension.getConfigurationElements();
- for (IConfigurationElement element : elements) {
- if (element.getName().equals(ELMNT_REPOSITORY_UI)) {
- readRepositoryConnectorUi(element);
- }
- }
- }
-
- IExtensionPoint linkProvidersExtensionPoint = registry.getExtensionPoint(EXTENSION_REPOSITORY_LINKS_PROVIDERS);
- IExtension[] linkProvidersExtensions = linkProvidersExtensionPoint.getExtensions();
- for (IExtension linkProvidersExtension : linkProvidersExtensions) {
- IConfigurationElement[] elements = linkProvidersExtension.getConfigurationElements();
- for (IConfigurationElement element : elements) {
- if (element.getName().equals(ELMNT_REPOSITORY_LINK_PROVIDER)) {
- readLinkProvider(element);
- }
- }
- }
-
- IExtensionPoint duplicateDetectorsExtensionPoint = registry.getExtensionPoint(EXTENSION_DUPLICATE_DETECTORS);
- IExtension[] dulicateDetectorsExtensions = duplicateDetectorsExtensionPoint.getExtensions();
- for (IExtension dulicateDetectorsExtension : dulicateDetectorsExtensions) {
- IConfigurationElement[] elements = dulicateDetectorsExtension.getConfigurationElements();
- for (IConfigurationElement element : elements) {
- if (element.getName().equals(ELMNT_DUPLICATE_DETECTOR)) {
- readDuplicateDetector(element);
- }
- }
- }
-
- IExtensionPoint extensionPoint = registry.getExtensionPoint(EXTENSION_TASK_CONTRIBUTOR);
- IExtension[] extensions = extensionPoint.getExtensions();
- for (IExtension extension : extensions) {
- IConfigurationElement[] elements = extension.getConfigurationElements();
- for (IConfigurationElement element : elements) {
- if (element.getName().equals(DYNAMIC_POPUP_ELEMENT)) {
- readDynamicPopupContributor(element);
- }
- }
- }
- }
-
- private static void readPresentation(IConfigurationElement element) {
- try {
- String name = element.getAttribute(ATTR_NAME);
-
- String iconPath = element.getAttribute(ATTR_ICON);
- ImageDescriptor imageDescriptor = AbstractUIPlugin.imageDescriptorFromPlugin( //
- element.getContributor().getName(), iconPath);
- AbstractTaskListPresentation presentation = (AbstractTaskListPresentation) element.createExecutableExtension(ATTR_CLASS);
- presentation.setImageDescriptor(imageDescriptor);
- presentation.setName(name);
-
- String primary = element.getAttribute(ATTR_PRIMARY);
- if (primary != null && primary.equals("true")) {
- presentation.setPrimary(true);
- }
-
- TaskListView.addPresentation(presentation);
- } catch (CoreException e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Could not load presentation extension", e));
- }
- }
-
- private static void readDuplicateDetector(IConfigurationElement element) {
- try {
- Object obj = element.createExecutableExtension(ATTR_CLASS);
- if (obj instanceof AbstractDuplicateDetector) {
- AbstractDuplicateDetector duplicateDetector = (AbstractDuplicateDetector) obj;
- duplicateDetector.setName(element.getAttribute(ATTR_NAME));
- duplicateDetector.setConnectorKind(element.getAttribute(ATTR_KIND));
- TasksUiPlugin.getDefault().addDuplicateDetector(duplicateDetector);
- } else {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Could not load duplicate detector " + obj.getClass().getCanonicalName()));
- }
- } catch (CoreException e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Could not load duplicate detector", e));
- }
- }
-
- private static void readLinkProvider(IConfigurationElement element) {
- try {
- Object repositoryLinkProvider = element.createExecutableExtension(ATTR_CLASS);
- if (repositoryLinkProvider instanceof AbstractTaskRepositoryLinkProvider) {
- TasksUiPlugin.getDefault().addRepositoryLinkProvider(
- (AbstractTaskRepositoryLinkProvider) repositoryLinkProvider);
- } else {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Could not load repository link provider "
- + repositoryLinkProvider.getClass().getCanonicalName()));
- }
- } catch (CoreException e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Could not load repository link provider", e));
- }
- }
-
- private static void readEditorFactory(IConfigurationElement element) {
- try {
- Object editor = element.createExecutableExtension(ATTR_CLASS);
- if (editor instanceof AbstractTaskEditorFactory) {
- TasksUiPlugin.getDefault().addContextEditor((AbstractTaskEditorFactory) editor);
- } else {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Could not load editor "
- + editor.getClass().getCanonicalName() + " must implement "
- + AbstractTaskEditorFactory.class.getCanonicalName()));
- }
- } catch (CoreException e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Could not load editor", e));
- }
- }
-
- private static void readTaskEditorPageFactory(IConfigurationElement element) {
- String id = element.getAttribute(ATTR_ID);
- if (id == null) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Editor page factory must specify id"));
- return;
- }
-
- try {
- Object item = element.createExecutableExtension(ATTR_CLASS);
- if (item instanceof AbstractTaskEditorPageFactory) {
- AbstractTaskEditorPageFactory editorPageFactory = (AbstractTaskEditorPageFactory) item;
- editorPageFactory.setId(id);
- TasksUiPlugin.getDefault().addTaskEditorPageFactory(editorPageFactory);
- } else {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Could not load editor page factory " + item.getClass().getCanonicalName() + " must implement "
- + AbstractTaskEditorPageFactory.class.getCanonicalName()));
- }
- } catch (CoreException e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Could not load page editor factory",
- e));
- }
- }
-
- private static void readRepositoryConnectorCore(IConfigurationElement element) {
- try {
- Object connectorCore = element.createExecutableExtension(ATTR_CLASS);
- if (connectorCore instanceof AbstractRepositoryConnector) {
- AbstractRepositoryConnector repositoryConnector = (AbstractRepositoryConnector) connectorCore;
- TasksUiPlugin.getRepositoryManager().addRepositoryConnector(repositoryConnector);
- if (repositoryConnector instanceof AbstractLegacyRepositoryConnector) {
- ((AbstractLegacyRepositoryConnector) repositoryConnector).init(TasksUiInternal.getTaskList());
- String userManagedString = element.getAttribute(ATTR_USER_MANAGED);
- if (userManagedString != null) {
- boolean userManaged = Boolean.parseBoolean(userManagedString);
- ((AbstractLegacyRepositoryConnector) repositoryConnector).setUserManaged(userManaged);
- }
- }
- } else {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Could not load connector core "
- + connectorCore.getClass().getCanonicalName()));
- }
- } catch (CoreException e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Could not load connector core", e));
- }
- }
-
- private static void readRepositoryConnectorUi(IConfigurationElement element) {
- try {
- Object connectorUiObject = element.createExecutableExtension(ATTR_CLASS);
- if (connectorUiObject instanceof AbstractRepositoryConnectorUi) {
- AbstractRepositoryConnectorUi connectorUi = (AbstractRepositoryConnectorUi) connectorUiObject;
- TasksUiPlugin.getDefault().addRepositoryConnectorUi(connectorUi);
-
- String customNotificationsString = element.getAttribute(ATTR_CUSTOM_NOTIFICATIONS);
- if (customNotificationsString != null) {
- boolean customNotifications = Boolean.parseBoolean(customNotificationsString);
- connectorUi.setCustomNotificationHandling(customNotifications);
- }
-
- String iconPath = element.getAttribute(ATTR_BRANDING_ICON);
- if (iconPath != null) {
- ImageDescriptor descriptor = AbstractUIPlugin.imageDescriptorFromPlugin(element.getContributor()
- .getName(), iconPath);
- if (descriptor != null) {
- TasksUiPlugin.getDefault().addBrandingIcon(connectorUi.getConnectorKind(),
- CommonImages.getImage(descriptor));
- }
- }
- String overlayIconPath = element.getAttribute(ATTR_OVERLAY_ICON);
- if (overlayIconPath != null) {
- ImageDescriptor descriptor = AbstractUIPlugin.imageDescriptorFromPlugin(element.getContributor()
- .getName(), overlayIconPath);
- if (descriptor != null) {
- TasksUiPlugin.getDefault().addOverlayIcon(connectorUi.getConnectorKind(), descriptor);
- }
- }
- } else {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Could not load connector ui "
- + connectorUiObject.getClass().getCanonicalName()));
- }
- } catch (CoreException e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Could not load connector ui", e));
- }
- }
-
- private static void readRepositoryTemplate(IConfigurationElement element) {
- boolean anonymous = false;
- boolean addAuto = false;
-
- String label = element.getAttribute(ELMNT_TMPL_LABEL);
- String serverUrl = element.getAttribute(ELMNT_TMPL_URLREPOSITORY);
- String repKind = element.getAttribute(ELMNT_TMPL_REPOSITORYKIND);
- String version = element.getAttribute(ELMNT_TMPL_VERSION);
- String newTaskUrl = element.getAttribute(ELMNT_TMPL_URLNEWTASK);
- String taskPrefix = element.getAttribute(ELMNT_TMPL_URLTASK);
- String taskQueryUrl = element.getAttribute(ELMNT_TMPL_URLTASKQUERY);
- String newAccountUrl = element.getAttribute(ELMNT_TMPL_NEWACCOUNTURL);
- String encoding = element.getAttribute(ELMNT_TMPL_CHARACTERENCODING);
- addAuto = Boolean.parseBoolean(element.getAttribute(ELMNT_TMPL_ADDAUTO));
- anonymous = Boolean.parseBoolean(element.getAttribute(ELMNT_TMPL_ANONYMOUS));
-
- if (serverUrl != null && label != null && repKind != null
- && TasksUi.getRepositoryManager().getRepositoryConnector(repKind) != null) {
- RepositoryTemplate template = new RepositoryTemplate(label, serverUrl, encoding, version, newTaskUrl,
- taskPrefix, taskQueryUrl, newAccountUrl, anonymous, addAuto);
- TasksUiPlugin.getRepositoryTemplateManager().addTemplate(repKind, template);
-
- for (IConfigurationElement configElement : element.getChildren()) {
- String name = configElement.getAttribute("name");
- String value = configElement.getAttribute("value");
- if (name != null && !name.equals("") && value != null) {
- template.addAttribute(name, value);
- }
- }
- } else {
- // TODO change error message to include hints about the cause of the error
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Could not load repository template extension " + element.getName()));
- }
- }
-
- private static void readDynamicPopupContributor(IConfigurationElement element) {
- try {
- Object dynamicPopupContributor = element.createExecutableExtension(ATTR_CLASS);
- String menuPath = element.getAttribute(ATTR_MENU_PATH);
- if (dynamicPopupContributor instanceof IDynamicSubMenuContributor) {
- TasksUiPlugin.getDefault().addDynamicPopupContributor(menuPath,
- (IDynamicSubMenuContributor) dynamicPopupContributor);
- } else {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Could not load dynamic popup menu: " + dynamicPopupContributor.getClass().getCanonicalName()
- + " must implement " + IDynamicSubMenuContributor.class.getCanonicalName()));
- }
- } catch (CoreException e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Could not load dynamic popup menu extension", e));
- }
- }
-
- private static void readExternalizer(IConfigurationElement element, List<AbstractTaskListFactory> externalizers) {
- try {
- Object externalizerObject = element.createExecutableExtension(ATTR_CLASS);
- if (externalizerObject instanceof AbstractTaskListFactory) {
- AbstractTaskListFactory externalizer = (AbstractTaskListFactory) externalizerObject;
- externalizers.add(externalizer);
- } else {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Could not load externalizer: "
- + externalizerObject.getClass().getCanonicalName() + " must implement "
- + AbstractTaskListFactory.class.getCanonicalName()));
- }
- } catch (CoreException e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Could not load task handler extension", e));
- }
- }
-
- private static void readMigrator(IConfigurationElement element, List<AbstractTaskListMigrator> migrators) {
- try {
- Object migratorObject = element.createExecutableExtension(ATTR_CLASS);
- if (migratorObject instanceof AbstractTaskListMigrator) {
- AbstractTaskListMigrator migrator = (AbstractTaskListMigrator) migratorObject;
- migrators.add(migrator);
- } else {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Could not load task list migrator migrator: " + migratorObject.getClass().getCanonicalName()
- + " must implement " + AbstractTaskListMigrator.class.getCanonicalName()));
- }
- } catch (CoreException e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Could not load task list migrator extension", e));
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TasksUiInternal.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TasksUiInternal.java
deleted file mode 100644
index 529c0f900..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TasksUiInternal.java
+++ /dev/null
@@ -1,816 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.util;
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.ProgressMonitorWrapper;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.core.runtime.jobs.IJobChangeEvent;
-import org.eclipse.core.runtime.jobs.IJobChangeListener;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.core.runtime.jobs.JobChangeAdapter;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.window.Window;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.mylyn.commons.core.CoreUtil;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.commons.net.Policy;
-import org.eclipse.mylyn.context.core.ContextCore;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.ITaskJobFactory;
-import org.eclipse.mylyn.internal.tasks.core.ITaskList;
-import org.eclipse.mylyn.internal.tasks.core.LocalRepositoryConnector;
-import org.eclipse.mylyn.internal.tasks.core.LocalTask;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
-import org.eclipse.mylyn.internal.tasks.core.TaskCategory;
-import org.eclipse.mylyn.internal.tasks.core.TaskDataStorageManager;
-import org.eclipse.mylyn.internal.tasks.core.TaskList;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractLegacyRepositoryConnector;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-import org.eclipse.mylyn.internal.tasks.ui.OpenRepositoryTaskJob;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.editors.CategoryEditor;
-import org.eclipse.mylyn.internal.tasks.ui.editors.CategoryEditorInput;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.MultiRepositoryAwareWizard;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.NewAttachmentWizardDialog;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.NewTaskWizard;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.TaskAttachmentWizard;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-import org.eclipse.mylyn.tasks.core.IRepositoryManager;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITaskMapping;
-import org.eclipse.mylyn.tasks.core.RepositoryStatus;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
-import org.eclipse.mylyn.tasks.core.ITask.SynchronizationState;
-import org.eclipse.mylyn.tasks.core.data.AbstractTaskAttachmentSource;
-import org.eclipse.mylyn.tasks.core.data.AbstractTaskDataHandler;
-import org.eclipse.mylyn.tasks.core.data.ITaskDataWorkingCopy;
-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.sync.SynchronizationJob;
-import org.eclipse.mylyn.tasks.core.sync.TaskJob;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditorInput;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IEditorReference;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchPreferenceConstants;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkingSet;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Steffen Pingel
- */
-public class TasksUiInternal {
-
- public static MultiRepositoryAwareWizard createNewTaskWizard(ITaskMapping taskSelection) {
- return new NewTaskWizard(taskSelection);
- }
-
- public static List<TaskEditor> getActiveRepositoryTaskEditors() {
- List<TaskEditor> repositoryTaskEditors = new ArrayList<TaskEditor>();
- IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows();
- for (IWorkbenchWindow window : windows) {
- IEditorReference[] editorReferences = window.getActivePage().getEditorReferences();
- for (IEditorReference editorReference : editorReferences) {
- try {
- if (editorReference.getEditorInput() instanceof TaskEditorInput) {
- TaskEditorInput input = (TaskEditorInput) editorReference.getEditorInput();
- if (input.getTask() != null) {
- IEditorPart editorPart = editorReference.getEditor(false);
- if (editorPart instanceof TaskEditor) {
- repositoryTaskEditors.add((TaskEditor) editorPart);
- }
- }
- }
- } catch (PartInitException e) {
- // ignore
- }
- }
- }
- return repositoryTaskEditors;
- }
-
- public static IProgressMonitor getUiMonitor(IProgressMonitor monitor) {
- return new ProgressMonitorWrapper(monitor) {
- @Override
- public void beginTask(final String name, final int totalWork) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- getWrappedProgressMonitor().beginTask(name, totalWork);
- }
- });
- }
-
- @Override
- public void done() {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- getWrappedProgressMonitor().done();
- }
- });
- }
-
- @Override
- public void subTask(final String name) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- getWrappedProgressMonitor().subTask(name);
- }
- });
- }
-
- @Override
- public void worked(final int work) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- getWrappedProgressMonitor().worked(work);
- }
- });
- }
- };
- }
-
- public static void openEditor(TaskCategory category) {
- final IEditorInput input = new CategoryEditorInput(category);
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- if (window != null) {
- IWorkbenchPage page = window.getActivePage();
- TasksUiUtil.openEditor(input, CategoryEditor.ID_EDITOR, page);
- }
- }
- });
- }
-
- public static void refreshAndOpenTaskListElement(IRepositoryElement element) {
- if (element instanceof ITask) {
- final AbstractTask task = (AbstractTask) element;
-
- if (task instanceof LocalTask) {
- TasksUiUtil.openTask(task);
- } else {
- String repositoryKind = task.getConnectorKind();
- final AbstractRepositoryConnector connector = TasksUi.getRepositoryManager().getRepositoryConnector(
- repositoryKind);
-
- TaskRepository repository = TasksUi.getRepositoryManager().getRepository(repositoryKind,
- task.getRepositoryUrl());
- if (repository == null) {
- StatusHandler.fail(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "No repository found for task. Please create repository in "
- + TasksUiPlugin.LABEL_VIEW_REPOSITORIES + "."));
- return;
- }
-
- if (connector != null) {
- boolean opened = false;
- if (connector instanceof AbstractLegacyRepositoryConnector) {
- RepositoryTaskData taskData = TasksUiPlugin.getTaskDataStorageManager().getNewTaskData(
- task.getRepositoryUrl(), task.getTaskId());
- if (taskData != null || connector.getTaskDataHandler() == null) {
- TasksUiUtil.openTask(task);
- opened = true;
- }
- } else if (TasksUiPlugin.getTaskDataManager().hasTaskData(task)) {
- opened = TasksUiUtil.openTask(task);
- }
-
- if (!opened) {
- // TODO consider moving this into the editor, i.e. have the editor refresh the task if task data is missing
- TasksUiInternal.synchronizeTask(connector, task, true, new JobChangeAdapter() {
- @Override
- public void done(IJobChangeEvent event) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- TasksUiUtil.openTask(task);
- }
- });
- }
- });
- }
- }
- }
- } else if (element instanceof TaskCategory) {
- TasksUiInternal.openEditor((TaskCategory) element);
- } else if (element instanceof IRepositoryQuery) {
- RepositoryQuery query = (RepositoryQuery) element;
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(query.getConnectorKind());
- TasksUiInternal.openEditQueryDialog(connectorUi, query);
- }
- }
-
- public static TaskJob updateRepositoryConfiguration(final TaskRepository taskRepository) {
- synchronized (taskRepository) {
- taskRepository.setUpdating(true);
- }
-
- AbstractRepositoryConnector connector = TasksUi.getRepositoryManager().getRepositoryConnector(
- taskRepository.getConnectorKind());
- final TaskJob job = TasksUiInternal.getJobFactory().createUpdateRepositoryConfigurationJob(connector,
- taskRepository);
- job.addJobChangeListener(new JobChangeAdapter() {
- @Override
- public void done(IJobChangeEvent event) {
- synchronized (taskRepository) {
- taskRepository.setUpdating(false);
- }
- if (job.getStatus() != null) {
- Display display = PlatformUI.getWorkbench().getDisplay();
- if (!display.isDisposed()) {
- TasksUiInternal.displayStatus("Configuration Refresh Failed", job.getStatus());
- }
- }
- }
- });
- job.schedule();
- return job;
- }
-
- private static void joinIfInTestMode(SynchronizationJob job) {
- // FIXME the client code should join the job
- if (CoreUtil.TEST_MODE) {
- try {
- job.join();
- } catch (InterruptedException e) {
- throw new RuntimeException(e);
- }
- }
- }
-
- public static final Job synchronizeQueries(AbstractRepositoryConnector connector, TaskRepository repository,
- Set<RepositoryQuery> queries, IJobChangeListener listener, boolean force) {
- Assert.isTrue(queries.size() > 0);
-
- TaskList taskList = TasksUiPlugin.getTaskList();
- for (RepositoryQuery query : queries) {
- query.setSynchronizing(true);
- }
- taskList.notifySynchronizationStateChanged(queries);
-
- SynchronizationJob job = TasksUiPlugin.getTasksJobFactory().createSynchronizeQueriesJob(connector, repository,
- queries);
- job.setUser(force);
- if (listener != null) {
- job.addJobChangeListener(listener);
- }
- if (force) {
- final RepositoryQuery query = queries.iterator().next();
- job.addJobChangeListener(new JobChangeAdapter() {
- @Override
- public void done(IJobChangeEvent event) {
- if (query.getStatus() != null) {
- TasksUiInternal.asyncDisplayStatus("Query Synchronization Failed", query.getStatus());
- }
- }
- });
- }
- job.schedule();
- joinIfInTestMode(job);
- return job;
- }
-
- /**
- * For synchronizing a single query. Use synchronize(Set, IJobChangeListener) if synchronizing multiple queries at a
- * time.
- */
- public static final Job synchronizeQuery(AbstractRepositoryConnector connector, RepositoryQuery repositoryQuery,
- IJobChangeListener listener, boolean force) {
- TaskRepository repository = TasksUi.getRepositoryManager().getRepository(repositoryQuery.getConnectorKind(),
- repositoryQuery.getRepositoryUrl());
- return synchronizeQueries(connector, repository, Collections.singleton(repositoryQuery), listener, force);
- }
-
- public static SynchronizationJob synchronizeAllRepositories(boolean force) {
- Set<TaskRepository> repositories = new HashSet<TaskRepository>(TasksUi.getRepositoryManager()
- .getAllRepositories());
- SynchronizationJob job = TasksUiPlugin.getTasksJobFactory().createSynchronizeRepositoriesJob(repositories);
- job.setUser(force);
- job.schedule();
- joinIfInTestMode(job);
- return job;
- }
-
- public static SynchronizationJob synchronizeRepository(TaskRepository repository, boolean force) {
- return TasksUiPlugin.getSynchronizationScheduler().synchronize(repository);
- }
-
- /**
- * Synchronize a single task. Note that if you have a collection of tasks to synchronize with this connector then
- * you should call synchronize(Set<Set<AbstractTask> repositoryTasks, ...)
- *
- * @param listener
- * can be null
- */
- public static Job synchronizeTask(AbstractRepositoryConnector connector, ITask task, boolean force,
- IJobChangeListener listener) {
- return synchronizeTasks(connector, Collections.singleton(task), force, listener);
- }
-
- /**
- * @param listener
- * can be null
- */
- public static Job synchronizeTasks(AbstractRepositoryConnector connector, Set<ITask> tasks, boolean force,
- IJobChangeListener listener) {
- ITaskList taskList = TasksUiInternal.getTaskList();
- for (ITask task : tasks) {
- ((AbstractTask) task).setSynchronizing(true);
- }
- ((TaskList) taskList).notifySynchronizationStateChanged(tasks);
- // TODO notify task list?
-
- SynchronizationJob job = TasksUiPlugin.getTasksJobFactory().createSynchronizeTasksJob(connector, tasks);
- job.setUser(force);
- job.setPriority(Job.DECORATE);
- if (listener != null) {
- job.addJobChangeListener(listener);
- }
- if (force && tasks.size() == 1) {
- final ITask task = tasks.iterator().next();
- job.addJobChangeListener(new JobChangeAdapter() {
- @Override
- public void done(IJobChangeEvent event) {
- if (task instanceof AbstractTask && ((AbstractTask) task).getStatus() != null) {
- TasksUiInternal.asyncDisplayStatus("Task Synchronization Failed",
- ((AbstractTask) task).getStatus());
- }
- }
- });
- }
- job.schedule();
- joinIfInTestMode(job);
- return job;
- }
-
- public static ITaskJobFactory getJobFactory() {
- return TasksUiPlugin.getTasksJobFactory();
- }
-
- public static NewAttachmentWizardDialog openNewAttachmentWizard(Shell shell, TaskRepository taskRepository,
- ITask task, TaskAttribute taskAttribute, TaskAttachmentWizard.Mode mode, AbstractTaskAttachmentSource source) {
- TaskAttachmentWizard attachmentWizard = new TaskAttachmentWizard(taskRepository, task, taskAttribute);
- attachmentWizard.setSource(source);
- attachmentWizard.setMode(mode);
- NewAttachmentWizardDialog dialog = new NewAttachmentWizardDialog(shell, attachmentWizard, false);
- dialog.setBlockOnOpen(false);
- dialog.create();
- dialog.open();
- return dialog;
- }
-
- private static MessageDialog createDialog(Shell shell, String title, String message, int type) {
- return new MessageDialog(shell, title, null, message, type, new String[] { IDialogConstants.OK_LABEL }, 0);
- }
-
- public static void displayStatus(Shell shell, final String title, final IStatus status) {
- if (status.getCode() == RepositoryStatus.ERROR_INTERNAL) {
- StatusHandler.fail(status);
- } else {
- if (status instanceof RepositoryStatus && ((RepositoryStatus) status).isHtmlMessage()) {
- WebBrowserDialog.openAcceptAgreement(shell, title, status.getMessage(),
- ((RepositoryStatus) status).getHtmlMessage());
- } else {
- switch (status.getSeverity()) {
- case IStatus.CANCEL:
- case IStatus.INFO:
- createDialog(shell, title, status.getMessage(), MessageDialog.INFORMATION).open();
- break;
- case IStatus.WARNING:
- createDialog(shell, title, status.getMessage(), MessageDialog.WARNING).open();
- break;
- case IStatus.ERROR:
- default:
- createDialog(shell, title, status.getMessage(), MessageDialog.ERROR).open();
- break;
- }
- }
- }
- }
-
- public static void asyncDisplayStatus(final String title, final IStatus status) {
- Display display = PlatformUI.getWorkbench().getDisplay();
- if (!display.isDisposed()) {
- display.asyncExec(new Runnable() {
- public void run() {
- displayStatus(title, status);
- }
- });
- } else {
- StatusHandler.log(status);
- }
- }
-
- public static void displayStatus(final String title, final IStatus status) {
- IWorkbench workbench = PlatformUI.getWorkbench();
- if (workbench != null && !workbench.getDisplay().isDisposed()
- && workbench.getDisplay().getActiveShell() != null) {
- Shell shell = workbench.getDisplay().getActiveShell();
- displayStatus(shell, title, status);
- } else {
- StatusHandler.log(status);
- }
- }
-
- /**
- * Creates a new local task and schedules for today
- *
- * @param summary
- * if null DEFAULT_SUMMARY (New Task) used.
- */
- public static LocalTask createNewLocalTask(String summary) {
- if (summary == null) {
- summary = LocalRepositoryConnector.DEFAULT_SUMMARY;
- }
- TaskList taskList = TasksUiPlugin.getTaskList();
- LocalTask newTask = new LocalTask("" + taskList.getNextLocalTaskId(), summary);
- newTask.setPriority(PriorityLevel.P3.toString());
- TasksUiInternal.getTaskList().addTask(newTask);
- TasksUiPlugin.getTaskActivityManager().scheduleNewTask(newTask);
-
- Object selectedObject = null;
- TaskListView view = TaskListView.getFromActivePerspective();
- if (view != null) {
- selectedObject = ((IStructuredSelection) view.getViewer().getSelection()).getFirstElement();
- }
- if (selectedObject instanceof TaskCategory) {
- taskList.addTask(newTask, (TaskCategory) selectedObject);
- } else if (selectedObject instanceof ITask) {
- ITask task = (ITask) selectedObject;
-
- AbstractTaskContainer container = TaskCategory.getParentTaskCategory(task);
-
- if (container instanceof TaskCategory) {
- taskList.addTask(newTask, container);
- } else if (view != null && view.getDrilledIntoCategory() instanceof TaskCategory) {
- taskList.addTask(newTask, view.getDrilledIntoCategory());
- } else {
- taskList.addTask(newTask, TasksUiPlugin.getTaskList().getDefaultCategory());
- }
- } else if (view != null && view.getDrilledIntoCategory() instanceof TaskCategory) {
- taskList.addTask(newTask, view.getDrilledIntoCategory());
- } else {
- if (view != null && view.getDrilledIntoCategory() != null) {
- MessageDialog.openInformation(Display.getCurrent().getActiveShell(), "Create Task",
- "The new task has been added to the root of the list, since tasks can not be added to a query.");
- }
- taskList.addTask(newTask, TasksUiPlugin.getTaskList().getDefaultCategory());
- }
- return newTask;
- }
-
- public static Set<AbstractTaskContainer> getContainersFromWorkingSet(Set<IWorkingSet> containers) {
-
- Set<AbstractTaskContainer> allTaskContainersInWorkingSets = new HashSet<AbstractTaskContainer>();
- for (IWorkingSet workingSet : containers) {
- IAdaptable[] elements = workingSet.getElements();
- for (IAdaptable adaptable : elements) {
- if (adaptable instanceof AbstractTaskContainer) {
- allTaskContainersInWorkingSets.add(((AbstractTaskContainer) adaptable));
- }
- }
- }
- return allTaskContainersInWorkingSets;
- }
-
- /**
- * @since 3.0
- */
- public static void openEditQueryDialog(AbstractRepositoryConnectorUi connectorUi, IRepositoryQuery query) {
- try {
- TaskRepository repository = TasksUi.getRepositoryManager().getRepository(query.getConnectorKind(),
- query.getRepositoryUrl());
- if (repository == null) {
- return;
- }
-
- IWizard wizard = connectorUi.getQueryWizard(repository, query);
-
- Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- if (wizard != null && shell != null && !shell.isDisposed()) {
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.create();
- dialog.setTitle("Edit Repository Query");
- dialog.setBlockOnOpen(true);
- if (dialog.open() == Window.CANCEL) {
- dialog.close();
- return;
- }
- }
- } catch (Exception e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Failed to open query dialog", e));
- }
- }
-
- public static ITaskList getTaskList() {
- return TasksUiPlugin.getTaskList();
- }
-
- public static boolean isAnimationsEnabled() {
- IPreferenceStore store = PlatformUI.getPreferenceStore();
- return store.getBoolean(IWorkbenchPreferenceConstants.ENABLE_ANIMATIONS);
- }
-
- public static boolean hasValidUrl(ITask task) {
- return isValidUrl(task.getUrl());
- }
-
- public static boolean isValidUrl(String url) {
- if (url != null && !url.equals("") && !url.equals("http://") && !url.equals("https://")) {
- try {
- new URL(url);
- return true;
- } catch (MalformedURLException e) {
- return false;
- }
- }
- return false;
- }
-
- /**
- * @since 3.0
- */
- public static void closeEditorInActivePage(ITask task, boolean save) {
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- if (window == null) {
- return;
- }
- IWorkbenchPage page = window.getActivePage();
- if (page == null) {
- return;
- }
- TaskRepository taskRepository = TasksUi.getRepositoryManager().getRepository(task.getConnectorKind(),
- task.getRepositoryUrl());
- IEditorInput input = new TaskEditorInput(taskRepository, task);
- IEditorPart editor = page.findEditor(input);
- if (editor != null) {
- page.closeEditor(editor, save);
- }
- }
-
- /**
- * @since 3.0
- */
- // API 3.0 consider moving this somewhere else and renaming to addToTaskList
- public static ITask createTask(TaskRepository repository, String id, IProgressMonitor monitor) throws CoreException {
- monitor = Policy.monitorFor(monitor);
- ITaskList taskList = getTaskList();
- AbstractTask task = (AbstractTask) taskList.getTask(repository.getRepositoryUrl(), id);
- if (task == null) {
- AbstractRepositoryConnector connector = TasksUiPlugin.getConnector(repository.getConnectorKind());
- if (connector instanceof AbstractLegacyRepositoryConnector) {
- RepositoryTaskData taskData = ((AbstractLegacyRepositoryConnector) connector).getLegacyTaskData(
- repository, id, new SubProgressMonitor(monitor, 1));
- if (taskData != null) {
- task = createTaskFromTaskData((AbstractLegacyRepositoryConnector) connector, taskList, repository,
- taskData, true, new SubProgressMonitor(monitor, 1));
- if (task != null) {
- task.setSynchronizationState(SynchronizationState.INCOMING);
- taskList.addTask(task);
- }
- }
- }
- // FIXME 3.0 support new task data
- }
- return task;
- }
-
- /**
- * Create new repository task, adding result to tasklist
- */
- public static AbstractTask createTaskFromExistingId(AbstractLegacyRepositoryConnector connector,
- ITaskList taskList, TaskRepository repository, String id, boolean retrieveSubTasks, IProgressMonitor monitor)
- throws CoreException {
- AbstractTask task = (AbstractTask) taskList.getTask(repository.getRepositoryUrl(), id);
- if (task == null) {
- RepositoryTaskData taskData = connector.getLegacyTaskData(repository, id,
- new SubProgressMonitor(monitor, 1));
- if (taskData != null) {
- task = createTaskFromTaskData(connector, taskList, repository, taskData, retrieveSubTasks,
- new SubProgressMonitor(monitor, 1));
- if (task != null) {
- task.setSynchronizationState(SynchronizationState.INCOMING);
- taskList.addTask(task);
- }
- }
- }
- return task;
- }
-
- /**
- * Creates a new task from the given task data. Does NOT add resulting task to the task list.
- */
- private static AbstractTask createTaskFromTaskData(AbstractLegacyRepositoryConnector connector, ITaskList taskList,
- TaskRepository repository, RepositoryTaskData taskData, boolean retrieveSubTasks, IProgressMonitor monitor)
- throws CoreException {
- AbstractTask task = null;
- if (monitor == null) {
- monitor = new NullProgressMonitor();
- }
- try {
- TaskDataStorageManager taskDataManager = TasksUiPlugin.getTaskDataStorageManager();
- if (taskData != null) {
- // Use connector task factory
- task = connector.createTask(repository.getRepositoryUrl(), taskData.getTaskId(), taskData.getTaskId()
- + ": " + taskData.getDescription());
- connector.updateTaskFromTaskData(repository, task, taskData);
- taskDataManager.setNewTaskData(taskData);
-
- if (retrieveSubTasks) {
- monitor.beginTask("Creating task", connector.getLegacyTaskDataHandler()
- .getSubTaskIds(taskData)
- .size());
- for (String subId : connector.getLegacyTaskDataHandler().getSubTaskIds(taskData)) {
- if (subId == null || subId.trim().equals("")) {
- continue;
- }
- AbstractTask subTask = createTaskFromExistingId(connector, taskList, repository, subId, false,
- new SubProgressMonitor(monitor, 1));
- if (subTask != null) {
- taskList.addTask(subTask, task);
- }
- }
- }
- }
- } finally {
- monitor.done();
- }
- return task;
- }
-
- public static void importTasks(Collection<AbstractTask> tasks, Set<TaskRepository> repositories, File zipFile,
- Shell shell) {
- TasksUiPlugin.getRepositoryManager().insertRepositories(repositories,
- TasksUiPlugin.getDefault().getRepositoriesFilePath());
-
- for (AbstractTask loadedTask : tasks) {
- // need to deactivate since activation is managed centrally
- loadedTask.setActive(false);
-
- TaskList taskList = TasksUiPlugin.getTaskList();
- if (taskList.getTask(loadedTask.getHandleIdentifier()) != null) {
- boolean confirmed = MessageDialog.openConfirm(shell, "Import Task", "Task '" + loadedTask.getSummary()
- + "' already exists. Do you want to override it's context with the source?");
- if (confirmed) {
- // ContextCore.getContextStore().importContext(taskContexts.get(loadedTask));
- ContextCore.getContextStore().importContext(loadedTask.getHandleIdentifier(), zipFile);
- }
- } else {
- // ContextCore.getContextStore().importContext(taskContexts.get(loadedTask));
- ContextCore.getContextStore().importContext(loadedTask.getHandleIdentifier(), zipFile);
- getTaskList().addTask(loadedTask);
- }
- }
-
- }
-
- public static boolean hasLocalCompletionState(ITask task) {
- TaskRepository taskRepository = TasksUi.getRepositoryManager().getRepository(task.getConnectorKind(),
- task.getRepositoryUrl());
- AbstractRepositoryConnector connector = TasksUi.getRepositoryManager().getRepositoryConnector(
- task.getConnectorKind());
- return connector.hasLocalCompletionState(taskRepository, task);
- }
-
- public static Shell getShell() {
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- if (window != null) {
- return window.getShell();
- }
- return Display.getDefault().getActiveShell();
- }
-
- public static TaskData createTaskData(TaskRepository taskRepository, ITaskMapping initializationData,
- ITaskMapping selectionData, IProgressMonitor monitor) throws CoreException {
- AbstractRepositoryConnector connector = TasksUi.getRepositoryManager().getRepositoryConnector(
- taskRepository.getConnectorKind());
- AbstractTaskDataHandler taskDataHandler = connector.getTaskDataHandler();
- TaskAttributeMapper mapper = taskDataHandler.getAttributeMapper(taskRepository);
- TaskData taskData = new TaskData(mapper, taskRepository.getConnectorKind(), taskRepository.getRepositoryUrl(),
- "");
- taskDataHandler.initializeTaskData(taskRepository, taskData, initializationData, monitor);
- if (selectionData != null) {
- connector.getTaskMapping(taskData).copyFrom(selectionData);
- }
- return taskData;
- }
-
- public static void createAndOpenNewTask(TaskData taskData) throws CoreException {
- ITask task = TasksUiUtil.createOutgoingNewTask(taskData.getConnectorKind());
- ITaskDataWorkingCopy workingCopy = TasksUi.getTaskDataManager().createWorkingCopy(task, taskData);
- workingCopy.save(null, null);
-
- TaskRepository localTaskRepository = TasksUi.getRepositoryManager().getRepository(task.getConnectorKind(),
- task.getRepositoryUrl());
- TaskEditorInput editorInput = new TaskEditorInput(localTaskRepository, task);
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- TasksUiUtil.openEditor(editorInput, TaskEditor.ID_EDITOR, page);
- }
-
- /**
- * Only override if task should be opened by a custom editor, default behavior is to open with a rich editor,
- * falling back to the web browser if not available.
- *
- * @return true if the task was successfully opened
- */
- // API 3.0 review, move to tasks ui
- public static boolean openRepositoryTask(String connectorKind, String repositoryUrl, String id) {
- IRepositoryManager repositoryManager = TasksUi.getRepositoryManager();
- AbstractRepositoryConnector connector = repositoryManager.getRepositoryConnector(connectorKind);
- String taskUrl = connector.getTaskUrl(repositoryUrl, id);
- if (taskUrl == null) {
- return false;
- }
-
-// IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
-// if (window == null) {
-// IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows();
-// if (windows != null && windows.length > 0) {
-// window = windows[0];
-// }
-// }
-// if (window == null) {
-// return Status.OK_STATUS;
-// }
-// IWorkbenchPage page = window.getActivePage();
-
- OpenRepositoryTaskJob job = new OpenRepositoryTaskJob(connectorKind, repositoryUrl, id, taskUrl);
- job.schedule();
-
- return true;
- }
-
- /**
- * @since 3.0
- */
- public static boolean openTaskInBackground(ITask task, boolean bringToTop) {
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- if (window != null) {
- IEditorPart activeEditor = null;
- IWorkbenchPart activePart = null;
- IWorkbenchPage activePage = window.getActivePage();
- if (activePage != null) {
- activeEditor = activePage.getActiveEditor();
- activePart = activePage.getActivePart();
- }
- boolean opened = TasksUiUtil.openTask(task);
- if (opened && activePage != null) {
- if (!bringToTop && activeEditor != null) {
- activePage.bringToTop(activeEditor);
- }
- if (activePart != null) {
- activePage.activate(activePart);
- }
- }
- return opened;
- } else {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Unable to open editor for \""
- + task.getSummary() + "\": no active workbench window"));
- }
- return false;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/WebBrowserDialog.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/WebBrowserDialog.java
deleted file mode 100644
index f4b484740..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/WebBrowserDialog.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.util;
-
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.browser.Browser;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Dialog to show the contents of an html page to the user
- *
- * @author Shawn Minto
- */
-public class WebBrowserDialog extends MessageDialog {
-
- private String data = null;
-
- public WebBrowserDialog(Shell parentShell, String dialogTitle, Image dialogTitleImage, String dialogMessage,
- int dialogImageType, String[] dialogButtonLabels, int defaultIndex, String data) {
- super(parentShell, dialogTitle, dialogTitleImage, dialogMessage, dialogImageType, dialogButtonLabels,
- defaultIndex);
- this.data = data;
- this.setShellStyle(SWT.SHELL_TRIM | SWT.RESIZE);
- }
-
- public static int openAcceptAgreement(Shell parent, String title, String message, String data) {
- WebBrowserDialog dialog = new WebBrowserDialog(parent, title, null, // accept
- message, NONE, new String[] { IDialogConstants.OK_LABEL }, 0, data);
- // ok is the default
- return dialog.open();
- }
-
- @Override
- public Control createCustomArea(Composite parent) {
- GridLayout layout = new GridLayout();
- parent.setLayout(layout);
- layout.numColumns = 1;
-
- Browser b = new Browser(parent, SWT.NONE);
- GridData gd = new GridData(GridData.FILL_BOTH);
- gd.horizontalSpan = 1;
- gd.verticalSpan = 50;
- b.setLayoutData(gd);
- b.setText(data);
-
- return parent;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/AbstractTaskListContentProvider.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/AbstractTaskListContentProvider.java
deleted file mode 100644
index f0624c9d6..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/AbstractTaskListContentProvider.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.views;
-
-import org.eclipse.jface.viewers.ITreeContentProvider;
-
-/**
- * @author Eugene Kuleshov
- * @author Mik Kersten
- */
-public abstract class AbstractTaskListContentProvider implements ITreeContentProvider {
-
- protected TaskListView taskListView;
-
- public AbstractTaskListContentProvider(TaskListView view) {
- this.taskListView = view;
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/AbstractTaskListPresentation.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/AbstractTaskListPresentation.java
deleted file mode 100644
index ac3f3ee90..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/AbstractTaskListPresentation.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.views;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-
-/**
- * @author Mik Kersten
- * @author Rob Elves
- */
-public abstract class AbstractTaskListPresentation {
-
- private final String id;
-
- private String name;
-
- private ImageDescriptor imageDescriptor;
-
- private boolean primary = false;
-
- private final Map<TaskListView, AbstractTaskListContentProvider> contentProviders = new HashMap<TaskListView, AbstractTaskListContentProvider>();
-
- public AbstractTaskListPresentation(String id) {
- this.id = id;
- }
-
- public AbstractTaskListContentProvider getContentProvider(TaskListView taskListView) {
- AbstractTaskListContentProvider contentProvider = contentProviders.get(taskListView);
- if (contentProvider == null) {
- contentProvider = createContentProvider(taskListView);
- contentProviders.put(taskListView, contentProvider);
- }
- return contentProvider;
- }
-
- /**
- * Creates a new instance of a content provider for a particular instance of the Task List
- *
- * TODO: change view parameter to be the viewer
- */
- protected abstract AbstractTaskListContentProvider createContentProvider(TaskListView taskListView);
-
- public ImageDescriptor getImageDescriptor() {
- return imageDescriptor;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public void setImageDescriptor(ImageDescriptor imageDescriptor) {
- this.imageDescriptor = imageDescriptor;
- }
-
- public boolean isPrimary() {
- return primary;
- }
-
- public void setPrimary(boolean primary) {
- this.primary = primary;
- }
-
- public String getId() {
- return id;
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/CopyOfTaskListView.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/CopyOfTaskListView.java
deleted file mode 100644
index 4f5aa7dda..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/CopyOfTaskListView.java
+++ /dev/null
@@ -1,1719 +0,0 @@
-///*******************************************************************************
-// * Copyright (c) 2004, 2007 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
-// *******************************************************************************/
-//
-//package org.eclipse.mylyn.internal.tasks.ui.views;
-//
-//import java.util.ArrayList;
-//import java.util.Arrays;
-//import java.util.Collections;
-//import java.util.HashSet;
-//import java.util.Iterator;
-//import java.util.LinkedHashMap;
-//import java.util.List;
-//import java.util.Map;
-//import java.util.Set;
-//
-//import org.eclipse.core.runtime.IProgressMonitor;
-//import org.eclipse.core.runtime.IStatus;
-//import org.eclipse.core.runtime.Status;
-//import org.eclipse.jface.action.Action;
-//import org.eclipse.jface.action.IMenuListener;
-//import org.eclipse.jface.action.IMenuManager;
-//import org.eclipse.jface.action.IStatusLineManager;
-//import org.eclipse.jface.action.IToolBarManager;
-//import org.eclipse.jface.action.MenuManager;
-//import org.eclipse.jface.action.Separator;
-//import org.eclipse.jface.dialogs.InputDialog;
-//import org.eclipse.jface.layout.TreeColumnLayout;
-//import org.eclipse.jface.util.IPropertyChangeListener;
-//import org.eclipse.jface.util.PropertyChangeEvent;
-//import org.eclipse.jface.viewers.CellEditor;
-//import org.eclipse.jface.viewers.ColumnPixelData;
-//import org.eclipse.jface.viewers.ColumnWeightData;
-//import org.eclipse.jface.viewers.DoubleClickEvent;
-//import org.eclipse.jface.viewers.IDoubleClickListener;
-//import org.eclipse.jface.viewers.IOpenListener;
-//import org.eclipse.jface.viewers.ISelection;
-//import org.eclipse.jface.viewers.ISelectionChangedListener;
-//import org.eclipse.jface.viewers.IStructuredSelection;
-//import org.eclipse.jface.viewers.ITreeViewerListener;
-//import org.eclipse.jface.viewers.OpenEvent;
-//import org.eclipse.jface.viewers.SelectionChangedEvent;
-//import org.eclipse.jface.viewers.StructuredSelection;
-//import org.eclipse.jface.viewers.TextCellEditor;
-//import org.eclipse.jface.viewers.TreeExpansionEvent;
-//import org.eclipse.jface.viewers.TreeViewer;
-//import org.eclipse.jface.window.Window;
-//import org.eclipse.mylyn.internal.tasks.core.ScheduledTaskContainer;
-//import org.eclipse.mylyn.internal.tasks.core.TaskArchive;
-//import org.eclipse.mylyn.internal.tasks.core.TaskCategory;
-//import org.eclipse.mylyn.internal.tasks.core.UnfiledCategory;
-//import org.eclipse.mylyn.internal.tasks.ui.AbstractTaskListFilter;
-//import org.eclipse.mylyn.internal.tasks.ui.CategorizedPresentation;
-//import org.eclipse.mylyn.internal.tasks.ui.IDynamicSubMenuContributor;
-//import org.eclipse.mylyn.internal.tasks.ui.ScheduledPresentation;
-//import org.eclipse.mylyn.internal.tasks.ui.TaskArchiveFilter;
-//import org.eclipse.mylyn.internal.tasks.ui.TaskCompletionFilter;
-//import org.eclipse.mylyn.internal.tasks.ui.TaskListColorsAndFonts;
-//import org.eclipse.mylyn.internal.tasks.ui.TaskListPatternFilter;
-//import org.eclipse.mylyn.internal.tasks.ui.TaskPriorityFilter;
-//import org.eclipse.mylyn.internal.tasks.ui.TaskTransfer;
-//import org.eclipse.mylyn.internal.tasks.ui.TaskWorkingSetFilter;
-//import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-//import org.eclipse.mylyn.internal.tasks.ui.TasksUiPreferenceConstants;
-//import org.eclipse.mylyn.internal.tasks.ui.actions.CollapseAllAction;
-//import org.eclipse.mylyn.internal.tasks.ui.actions.CopyTaskDetailsAction;
-//import org.eclipse.mylyn.internal.tasks.ui.actions.DeleteAction;
-//import org.eclipse.mylyn.internal.tasks.ui.actions.ExpandAllAction;
-//import org.eclipse.mylyn.internal.tasks.ui.actions.FilterArchiveContainerAction;
-//import org.eclipse.mylyn.internal.tasks.ui.actions.FilterCompletedTasksAction;
-//import org.eclipse.mylyn.internal.tasks.ui.actions.GoIntoAction;
-//import org.eclipse.mylyn.internal.tasks.ui.actions.GoUpAction;
-//import org.eclipse.mylyn.internal.tasks.ui.actions.GroupSubTasksAction;
-//import org.eclipse.mylyn.internal.tasks.ui.actions.LinkWithEditorAction;
-//import org.eclipse.mylyn.internal.tasks.ui.actions.MarkTaskCompleteAction;
-//import org.eclipse.mylyn.internal.tasks.ui.actions.MarkTaskIncompleteAction;
-//import org.eclipse.mylyn.internal.tasks.ui.actions.OpenTaskListElementAction;
-//import org.eclipse.mylyn.internal.tasks.ui.actions.OpenTasksUiPreferencesAction;
-//import org.eclipse.mylyn.internal.tasks.ui.actions.OpenWithBrowserAction;
-//import org.eclipse.mylyn.internal.tasks.ui.actions.PresentationDropDownSelectionAction;
-//import org.eclipse.mylyn.internal.tasks.ui.actions.RemoveFromCategoryAction;
-//import org.eclipse.mylyn.internal.tasks.ui.actions.RenameAction;
-//import org.eclipse.mylyn.internal.tasks.ui.actions.SynchronizeAutomaticallyAction;
-//import org.eclipse.mylyn.internal.tasks.ui.actions.TaskActivateAction;
-//import org.eclipse.mylyn.internal.tasks.ui.actions.TaskDeactivateAction;
-//import org.eclipse.mylyn.internal.tasks.ui.actions.TaskListElementPropertiesAction;
-//import org.eclipse.mylyn.internal.tasks.ui.views.TaskListTableSorter.SortByIndex;
-//import org.eclipse.mylyn.internal.tasks.ui.wizards.NewLocalTaskWizard;
-//import org.eclipse.mylyn.internal.tasks.ui.workingsets.TaskWorkingSetUpdater;
-//import org.eclipse.mylyn.monitor.core.StatusHandler;
-//import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
-//import org.eclipse.mylyn.tasks.core.AbstractTask;
-//import org.eclipse.mylyn.tasks.core.AbstractTaskCategory;
-//import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-//import org.eclipse.mylyn.tasks.core.ITaskActivityListener;
-//import org.eclipse.mylyn.tasks.core.ITaskListChangeListener;
-//import org.eclipse.mylyn.tasks.core.TaskContainerDelta;
-//import org.eclipse.mylyn.tasks.core.AbstractTask.PriorityLevel;
-//import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-//import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-//import org.eclipse.mylyn.tasks.ui.editors.TaskEditorInput;
-//import org.eclipse.swt.SWT;
-//import org.eclipse.swt.SWTException;
-//import org.eclipse.swt.dnd.DND;
-//import org.eclipse.swt.dnd.FileTransfer;
-//import org.eclipse.swt.dnd.RTFTransfer;
-//import org.eclipse.swt.dnd.TextTransfer;
-//import org.eclipse.swt.dnd.Transfer;
-//import org.eclipse.swt.events.ControlEvent;
-//import org.eclipse.swt.events.ControlListener;
-//import org.eclipse.swt.events.KeyEvent;
-//import org.eclipse.swt.events.KeyListener;
-//import org.eclipse.swt.events.MouseEvent;
-//import org.eclipse.swt.events.MouseListener;
-//import org.eclipse.swt.events.SelectionAdapter;
-//import org.eclipse.swt.events.SelectionEvent;
-//import org.eclipse.swt.graphics.Color;
-//import org.eclipse.swt.graphics.GC;
-//import org.eclipse.swt.graphics.Image;
-//import org.eclipse.swt.graphics.Point;
-//import org.eclipse.swt.graphics.Rectangle;
-//import org.eclipse.swt.graphics.Region;
-//import org.eclipse.swt.widgets.Composite;
-//import org.eclipse.swt.widgets.Display;
-//import org.eclipse.swt.widgets.Event;
-//import org.eclipse.swt.widgets.Listener;
-//import org.eclipse.swt.widgets.Menu;
-//import org.eclipse.swt.widgets.Scrollable;
-//import org.eclipse.swt.widgets.Table;
-//import org.eclipse.swt.widgets.Text;
-//import org.eclipse.swt.widgets.Tree;
-//import org.eclipse.swt.widgets.TreeColumn;
-//import org.eclipse.swt.widgets.TreeItem;
-//import org.eclipse.ui.IActionBars;
-//import org.eclipse.ui.IEditorInput;
-//import org.eclipse.ui.IEditorPart;
-//import org.eclipse.ui.IMemento;
-//import org.eclipse.ui.IPageListener;
-//import org.eclipse.ui.IPartListener;
-//import org.eclipse.ui.IViewPart;
-//import org.eclipse.ui.IViewReference;
-//import org.eclipse.ui.IViewSite;
-//import org.eclipse.ui.IWorkbench;
-//import org.eclipse.ui.IWorkbenchActionConstants;
-//import org.eclipse.ui.IWorkbenchPage;
-//import org.eclipse.ui.IWorkbenchPart;
-//import org.eclipse.ui.IWorkingSet;
-//import org.eclipse.ui.IWorkingSetManager;
-//import org.eclipse.ui.PartInitException;
-//import org.eclipse.ui.PlatformUI;
-//import org.eclipse.ui.part.DrillDownAdapter;
-//import org.eclipse.ui.part.ViewPart;
-//import org.eclipse.ui.progress.WorkbenchJob;
-//import org.eclipse.ui.themes.IThemeManager;
-//
-///**
-// * @author Mik Kersten
-// * @author Ken Sueda
-// * @author Eugene Kuleshov
-// */
-//public class CopyOfTaskListView extends ViewPart implements IPropertyChangeListener {
-//
-// private final class TaskListRefreshJob extends WorkbenchJob {
-// private AbstractTaskContainer container;
-//
-// private TaskListRefreshJob(String name) {
-// super(name);
-// }
-//
-// public void schedule(AbstractTaskContainer container, long delay) {
-// this.container = container;
-// schedule(delay);
-// }
-//
-// public IStatus runInUIThread(IProgressMonitor monitor) {
-// if (getViewer().getControl() == null || getViewer().getControl().isDisposed()) {
-// return Status.CANCEL_STATUS;
-// }
-// if (container == null) {
-// getViewer().refresh(true);
-// } else {
-// try {
-// if (container instanceof AbstractTask) {
-// AbstractTask task = (AbstractTask) container;
-// getViewer().refresh(task, true);
-// } else {
-// getViewer().refresh(container, true);
-// }
-// // TODO: consider moving expansion logic into viewer manager
-// if (isFocusedMode()) {
-// getViewer().expandToLevel(container, 3);
-// }
-// } catch (SWTException e) {
-// StatusHandler.log(e, "Failed to refresh Task List");
-// }
-// }
-// return Status.OK_STATUS;
-//
-// }
-// }
-//
-// public static final String ID = "org.eclipse.mylyn.tasks.ui.views.tasks";
-//
-// public static final String LABEL_VIEW = "Task List";
-//
-// private static final String MEMENTO_KEY_SORT_DIRECTION = "sortDirection";
-//
-// private static final String MEMENTO_KEY_SORTER = "sorter";
-//
-// private static final String MEMENTO_KEY_SORT_INDEX = "sortIndex";
-//
-// private static final String MEMENTO_SORT_INDEX = "org.eclipse.mylyn.tasklist.ui.views.tasklist.sortIndex";
-//
-// private static final String MEMENTO_LINK_WITH_EDITOR = "linkWithEditor";
-//
-// private static final String MEMENTO_PRESENTATION = "presentation";
-//
-// private static final String ID_SEPARATOR_NEW = "new";
-//
-// private static final String ID_SEPARATOR_OPERATIONS = "operations";
-//
-// private static final String ID_SEPARATOR_CONTEXT = "context";
-//
-// public static final String ID_SEPARATOR_TASKS = "tasks";
-//
-// private static final String ID_SEPARATOR_FILTERS = "filters";
-//
-// private static final String ID_SEPARATOR_REPOSITORY = "repository";
-//
-// private static final String LABEL_NO_TASKS = "no task active";
-//
-// private final static int SIZE_MAX_SELECTION_HISTORY = 10;
-//
-// private static final String PART_NAME = "Task List";
-//
-// private static final int DEFAULT_SORT_DIRECTION = 1;
-//
-// static final String[] PRIORITY_LEVELS = { PriorityLevel.P1.toString(), PriorityLevel.P2.toString(),
-// PriorityLevel.P3.toString(), PriorityLevel.P4.toString(), PriorityLevel.P5.toString() };
-//
-// public static final String[] PRIORITY_LEVEL_DESCRIPTIONS = { PriorityLevel.P1.getDescription(),
-// PriorityLevel.P2.getDescription(), PriorityLevel.P3.getDescription(), PriorityLevel.P4.getDescription(),
-// PriorityLevel.P5.getDescription() };
-//
-// private static List<AbstractTaskListPresentation> presentationsPrimary = new ArrayList<AbstractTaskListPresentation>();
-//
-// private static List<AbstractTaskListPresentation> presentationsSecondary = new ArrayList<AbstractTaskListPresentation>();
-//
-// private boolean focusedMode = false;
-//
-// private boolean linkWithEditor;
-//
-// private TaskListCellModifier taskListCellModifier = new TaskListCellModifier(this);
-//
-// private IThemeManager themeManager;
-//
-// private TaskListFilteredTree filteredTree;
-//
-// private DrillDownAdapter drillDownAdapter;
-//
-// private AbstractTaskContainer drilledIntoCategory = null;
-//
-// private GoIntoAction goIntoAction;
-//
-// private GoUpAction goUpAction;
-//
-// private CopyTaskDetailsAction copyDetailsAction;
-//
-// private OpenTaskListElementAction openAction;
-//
-// private TaskListElementPropertiesAction propertiesAction;
-//
-// private OpenWithBrowserAction openWithBrowser;
-//
-// private RenameAction renameAction;
-//
-// private CollapseAllAction collapseAll;
-//
-// private ExpandAllAction expandAll;
-//
-// private DeleteAction deleteAction;
-//
-// private RemoveFromCategoryAction removeFromCategoryAction;
-//
-// private TaskActivateAction activateAction = new TaskActivateAction();
-//
-// private TaskDeactivateAction deactivateAction = new TaskDeactivateAction();
-//
-// private FilterCompletedTasksAction filterCompleteTask;
-//
-// private GroupSubTasksAction filterSubTasksAction;
-//
-// private SynchronizeAutomaticallyAction synchronizeAutomatically;
-//
-// private OpenTasksUiPreferencesAction openPreferencesAction;
-//
-// private FilterArchiveContainerAction filterArchiveCategory;
-//
-// private PriorityDropDownAction filterOnPriorityAction;
-//
-// private SortyByDropDownAction sortByAction;
-//
-// private PresentationDropDownSelectionAction presentationDropDownSelectionAction;
-//
-// private LinkWithEditorAction linkWithEditorAction;
-//
-// private TaskPriorityFilter filterPriority = new TaskPriorityFilter();
-//
-// private TaskCompletionFilter filterComplete = new TaskCompletionFilter();
-//
-// private TaskArchiveFilter filterArchive = new TaskArchiveFilter();
-//
-// private TaskWorkingSetFilter filterWorkingSet;
-//
-// private Set<AbstractTaskListFilter> filters = new HashSet<AbstractTaskListFilter>();
-//
-// protected String[] columnNames = new String[] { "Summary" };
-//
-// protected int[] columnWidths = new int[] { 200 };
-//
-// private TreeColumn[] columns;
-//
-// private IMemento taskListMemento;
-//
-// private SortByIndex sortByIndex = SortByIndex.PRIORITY;
-//
-// private AbstractTaskListPresentation currentPresentation;
-//
-// private TaskTableLabelProvider taskListTableLabelProvider;
-//
-// private TaskListTableSorter tableSorter;
-//
-// int sortDirection = DEFAULT_SORT_DIRECTION;
-//
-// private Color categoryGradientStart;
-//
-// private Color categoryGradientEnd;
-//
-// private TaskListRefreshJob refreshJob;
-//
-// private final IPageListener PAGE_LISTENER = new IPageListener() {
-// public void pageActivated(IWorkbenchPage page) {
-// filteredTree.indicateActiveTaskWorkingSet();
-// }
-//
-// public void pageClosed(IWorkbenchPage page) {
-// // ignore
-//
-// }
-//
-// public void pageOpened(IWorkbenchPage page) {
-// // ignore
-// }
-// };
-//
-// private LinkedHashMap<String, IStructuredSelection> lastSelectionByTaskHandle = new LinkedHashMap<String, IStructuredSelection>(
-// SIZE_MAX_SELECTION_HISTORY);
-//
-// /**
-// * True if the view should indicate that interaction monitoring is paused
-// */
-// protected boolean isPaused = false;
-//
-// boolean synchronizationOverlaid = false;
-//
-// private final Listener CATEGORY_GRADIENT_DRAWER = new Listener() {
-// public void handleEvent(Event event) {
-// if (event.item.getData() instanceof AbstractTaskContainer
-// && !(event.item.getData() instanceof AbstractTask)) {
-// Scrollable scrollable = (Scrollable) event.widget;
-// GC gc = event.gc;
-//
-// Rectangle area = scrollable.getClientArea();
-// Rectangle rect = event.getBounds();
-//
-// /* Paint the selection beyond the end of last column */
-// expandRegion(event, scrollable, gc, area);
-//
-// /* Draw Gradient Rectangle */
-// Color oldForeground = gc.getForeground();
-// Color oldBackground = gc.getBackground();
-//
-// gc.setForeground(categoryGradientEnd);
-// gc.drawLine(0, rect.y, area.width, rect.y);
-//
-// gc.setForeground(categoryGradientStart);
-// gc.setBackground(categoryGradientEnd);
-//
-// // gc.setForeground(categoryGradientStart);
-// // gc.setBackground(categoryGradientEnd);
-// // gc.setForeground(new Clr(Display.getCurrent(), 255, 0, 0));
-//
-// gc.fillGradientRectangle(0, rect.y + 1, area.width, rect.height, true);
-//
-// /* Bottom Line */
-// // gc.setForeground();
-// gc.setForeground(categoryGradientEnd);
-// gc.drawLine(0, rect.y + rect.height - 1, area.width, rect.y + rect.height - 1);
-//
-// gc.setForeground(oldForeground);
-// gc.setBackground(oldBackground);
-// /* Mark as Background being handled */
-// event.detail &= ~SWT.BACKGROUND;
-// }
-// }
-//
-// private void expandRegion(Event event, Scrollable scrollable, GC gc, Rectangle area) {
-// int columnCount;
-// if (scrollable instanceof Table)
-// columnCount = ((Table) scrollable).getColumnCount();
-// else
-// columnCount = ((Tree) scrollable).getColumnCount();
-//
-// if (event.index == columnCount - 1 || columnCount == 0) {
-// int width = area.x + area.width - event.x;
-// if (width > 0) {
-// Region region = new Region();
-// gc.getClipping(region);
-// region.add(event.x, event.y, width, event.height);
-// gc.setClipping(region);
-// region.dispose();
-// }
-// }
-// }
-// };
-//
-// private boolean gradientListenerAdded = false;
-//
-// private final ITaskActivityListener TASK_ACTIVITY_LISTENER = new TaskActivityAdapter() {
-//
-// public void taskActivated(final AbstractTask task) {
-// if (task != null) {
-// PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
-// public void run() {
-// updateDescription(task);
-// selectedAndFocusTask(task);
-// filteredTree.indicateActiveTask(task);
-// refreshAndFocus(false);
-// }
-// });
-// }
-// }
-//
-// public void taskDeactivated(final AbstractTask task) {
-// PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
-// public void run() {
-// refreshTask(new TaskContainerDelta(task, TaskContainerDelta.Kind.CHANGED));
-// updateDescription(null);
-// filteredTree.indicateNoActiveTask();
-// }
-// });
-// }
-//
-// public void activityChanged(final ScheduledTaskContainer week) {
-// PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
-// public void run() {
-// if (ScheduledPresentation.ID.equals(getCurrentPresentation().getId())) {
-// refresh(week);
-// }
-// }
-// });
-// }
-//
-// public void taskListRead() {
-// PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
-// public void run() {
-// refresh(null);
-// }
-// });
-// }
-// };
-//
-// private final ITaskListChangeListener TASK_REFERESH_LISTENER = new ITaskListChangeListener() {
-//
-// public void containersChanged(final Set<TaskContainerDelta> deltas) {
-// PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
-// public void run() {
-// for (TaskContainerDelta taskContainerDelta : deltas) {
-// if (ScheduledPresentation.ID.equals(getCurrentPresentation().getId())) {
-// // TODO: implement refresh policy for scheduled presentation
-// refresh(null);
-// } else {
-// if (taskContainerDelta.getContainer() instanceof AbstractTask) {
-// refreshTask(taskContainerDelta);
-// } else { // category or query
-// switch (taskContainerDelta.getKind()) {
-// case ROOT:
-// refresh(null);
-// break;
-// case ADDED:
-// refresh(null);
-// break;
-// case REMOVED:
-// refresh(null);
-// break;
-// default:
-// if (taskContainerDelta.getContainer().equals(
-// TasksUiPlugin.getTaskList().getDefaultCategory())) {
-// refresh(null);
-// } else {
-// refresh(taskContainerDelta.getContainer());
-// }
-// }
-// }
-// }
-// }
-// }
-// });
-// }
-// };
-//
-// private final IPropertyChangeListener THEME_CHANGE_LISTENER = new IPropertyChangeListener() {
-// public void propertyChange(PropertyChangeEvent event) {
-// if (event.getProperty().equals(IThemeManager.CHANGE_CURRENT_THEME)
-// || TaskListColorsAndFonts.isTaskListTheme(event.getProperty())) {
-// configureGradientColors();
-// taskListTableLabelProvider.setCategoryBackgroundColor(themeManager.getCurrentTheme()
-// .getColorRegistry()
-// .get(TaskListColorsAndFonts.THEME_COLOR_TASKLIST_CATEGORY));
-// getViewer().refresh();
-// }
-// }
-// };
-//
-// private void configureGradientColors() {
-// categoryGradientStart = themeManager.getCurrentTheme().getColorRegistry().get(
-// TaskListColorsAndFonts.THEME_COLOR_CATEGORY_GRADIENT_START);
-// categoryGradientEnd = themeManager.getCurrentTheme().getColorRegistry().get(
-// TaskListColorsAndFonts.THEME_COLOR_CATEGORY_GRADIENT_END);
-//
-// boolean customized = true;
-// if (categoryGradientStart != null && categoryGradientStart.getRed() == 240
-// && categoryGradientStart.getGreen() == 240 && categoryGradientStart.getBlue() == 240
-// && categoryGradientEnd != null && categoryGradientEnd.getRed() == 220
-// && categoryGradientEnd.getGreen() == 220 && categoryGradientEnd.getBlue() == 220) {
-// customized = false;
-// }
-//
-// if (gradientListenerAdded == false && categoryGradientStart != null
-// && !categoryGradientStart.equals(categoryGradientEnd)) {
-// getViewer().getTree().addListener(SWT.EraseItem, CATEGORY_GRADIENT_DRAWER);
-// gradientListenerAdded = true;
-// if (!customized) {
-// // Set parent-based colors
-// Color parentBackground = getViewer().getTree().getParent().getBackground();
-// double GRADIENT_TOP = 1.05;// 1.02;
-// double GRADIENT_BOTTOM = .995;// 1.035;
-//
-// int red = Math.min(255, (int) (parentBackground.getRed() * GRADIENT_TOP));
-// int green = Math.min(255, (int) (parentBackground.getGreen() * GRADIENT_TOP));
-// int blue = Math.min(255, (int) (parentBackground.getBlue() * GRADIENT_TOP));
-//
-// try {
-// categoryGradientStart = new Color(Display.getDefault(), red, green, blue);
-// } catch (Exception e) {
-// categoryGradientStart = getViewer().getTree().getParent().getBackground();
-// StatusHandler.fail(e, "Could not set color: " + red + ", " + green + ", " + blue, false);
-// }
-// red = Math.max(0, (int) (parentBackground.getRed() / GRADIENT_BOTTOM));
-// green = Math.max(0, (int) (parentBackground.getGreen() / GRADIENT_BOTTOM));
-// blue = Math.max(0, (int) (parentBackground.getBlue() / GRADIENT_BOTTOM));
-// if (red > 255) {
-// red = 255;
-// }
-// try {
-// categoryGradientEnd = new Color(Display.getDefault(), red, green, blue);
-// } catch (Exception e) {
-// categoryGradientStart = getViewer().getTree().getParent().getBackground();
-// StatusHandler.fail(e, "Could not set color: " + red + ", " + green + ", " + blue, false);
-// }
-// }
-// } else if (categoryGradientStart != null && categoryGradientStart.equals(categoryGradientEnd)) {
-// getViewer().getTree().removeListener(SWT.EraseItem, CATEGORY_GRADIENT_DRAWER);
-// gradientListenerAdded = false;
-// }
-// }
-//
-// public static CopyOfTaskListView getFromActivePerspective() {
-// if (PlatformUI.isWorkbenchRunning()) {
-// IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
-// if (activePage != null) {
-// IViewPart view = activePage.findView(ID);
-// if (view instanceof CopyOfTaskListView) {
-// return (CopyOfTaskListView) view;
-// }
-// }
-// }
-// return null;
-// }
-//
-// public static CopyOfTaskListView openInActivePerspective() {
-// try {
-// return (CopyOfTaskListView) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(ID);
-// } catch (Exception e) {
-// StatusHandler.fail(e, "Could not show Task List view", false);
-// e.printStackTrace();
-// return null;
-// }
-// }
-//
-// public CopyOfTaskListView() {
-// PlatformUI.getWorkbench().getWorkingSetManager().addPropertyChangeListener(this);
-// createRefreshJob();
-// TasksUiPlugin.getTaskListManager().addActivityListener(TASK_ACTIVITY_LISTENER);
-// TasksUiPlugin.getTaskList().addChangeListener(TASK_REFERESH_LISTENER);
-// }
-//
-// @Override
-// public void dispose() {
-// super.dispose();
-// TasksUiPlugin.getTaskList().removeChangeListener(TASK_REFERESH_LISTENER);
-// TasksUiPlugin.getTaskListManager().removeActivityListener(TASK_ACTIVITY_LISTENER);
-//
-// PlatformUI.getWorkbench().getWorkingSetManager().removePropertyChangeListener(this);
-// if (PlatformUI.getWorkbench().getActiveWorkbenchWindow() != null) {
-// PlatformUI.getWorkbench().getActiveWorkbenchWindow().removePageListener(PAGE_LISTENER);
-// }
-//
-// final IThemeManager themeManager = getSite().getWorkbenchWindow().getWorkbench().getThemeManager();
-// if (themeManager != null) {
-// themeManager.removePropertyChangeListener(THEME_CHANGE_LISTENER);
-// }
-//
-// categoryGradientStart.dispose();
-// categoryGradientEnd.dispose();
-// }
-//
-// private void createRefreshJob() {
-// refreshJob = new TaskListRefreshJob("Task List Refresh");
-// refreshJob.setSystem(true);
-// }
-//
-// private void updateDescription() {
-// List<AbstractTask> activeTasks = TasksUiPlugin.getTaskList().getActiveTasks();
-// if (activeTasks.size() > 0) {
-// updateDescription(activeTasks.get(0));
-// } else {
-// updateDescription(null);
-// }
-// }
-//
-// private void updateDescription(AbstractTask task) {
-// if (getSite() == null || getSite().getPage() == null)
-// return;
-//
-// IViewReference reference = getSite().getPage().findViewReference(ID);
-// boolean shouldSetDescription = false;
-// if (reference != null && reference.isFastView() && !getSite().getPage().isPartVisible(this)) {
-// shouldSetDescription = true;
-// }
-//
-// if (task != null) {
-// setTitleToolTip(PART_NAME + " (" + task.getSummary() + ")");
-// if (shouldSetDescription) {
-// setContentDescription(task.getSummary());
-// } else {
-// setContentDescription("");
-// }
-// } else {
-// setTitleToolTip(PART_NAME);
-// if (shouldSetDescription) {
-// setContentDescription(LABEL_NO_TASKS);
-// } else {
-// setContentDescription("");
-// }
-// }
-// }
-//
-// @Override
-// public void init(IViewSite site, IMemento memento) throws PartInitException {
-// init(site);
-// this.taskListMemento = memento;
-// }
-//
-// @Override
-// public void saveState(IMemento memento) {
-// IMemento sorter = memento.createChild(MEMENTO_SORT_INDEX);
-// IMemento m = sorter.createChild(MEMENTO_KEY_SORTER);
-// switch (sortByIndex) {
-// case SUMMARY:
-// m.putInteger(MEMENTO_KEY_SORT_INDEX, 1);
-// break;
-// case DATE_CREATED:
-// m.putInteger(MEMENTO_KEY_SORT_INDEX, 2);
-// break;
-// default:
-// m.putInteger(MEMENTO_KEY_SORT_INDEX, 0);
-// }
-//
-// m.putInteger(MEMENTO_KEY_SORT_DIRECTION, sortDirection);
-// memento.putString(MEMENTO_LINK_WITH_EDITOR, Boolean.toString(linkWithEditor));
-// memento.putString(MEMENTO_PRESENTATION, currentPresentation.getId());
-// }
-//
-// private void restoreState() {
-// if (taskListMemento != null) {
-// IMemento sorterMemento = taskListMemento.getChild(MEMENTO_SORT_INDEX);
-// int restoredSortIndex = 0;
-// if (sorterMemento != null) {
-// IMemento m = sorterMemento.getChild(MEMENTO_KEY_SORTER);
-// if (m != null) {
-// Integer sortIndexInt = m.getInteger(MEMENTO_KEY_SORT_INDEX);
-// if (sortIndexInt != null) {
-// restoredSortIndex = sortIndexInt.intValue();
-// }
-// Integer sortDirInt = m.getInteger(MEMENTO_KEY_SORT_DIRECTION);
-// if (sortDirInt != null) {
-// sortDirection = sortDirInt.intValue();
-// }
-// } else {
-// sortDirection = DEFAULT_SORT_DIRECTION;
-// }
-// } else {
-// sortDirection = DEFAULT_SORT_DIRECTION;
-// }
-// switch (restoredSortIndex) {
-// case 1:
-// this.sortByIndex = SortByIndex.SUMMARY;
-// break;
-// case 2:
-// this.sortByIndex = SortByIndex.DATE_CREATED;
-// break;
-// default:
-// this.sortByIndex = SortByIndex.PRIORITY;
-// }
-//
-// applyPresentation(taskListMemento.getString(MEMENTO_PRESENTATION));
-// }
-//
-// filterWorkingSet = new TaskWorkingSetFilter(TasksUiPlugin.getTaskList());
-// filterWorkingSet.setCurrentWorkingSet(getSite().getPage().getAggregateWorkingSet());
-// addFilter(filterWorkingSet);
-// addFilter(filterPriority);
-// if (TasksUiPlugin.getDefault().getPreferenceStore().contains(TasksUiPreferenceConstants.FILTER_COMPLETE_MODE)) {
-// addFilter(filterComplete);
-// }
-//
-// if (TasksUiPlugin.getDefault().getPreferenceStore().contains(TasksUiPreferenceConstants.FILTER_ARCHIVE_MODE)) {
-// addFilter(filterArchive);
-// }
-//
-// // Restore "link with editor" value; by default true
-// boolean linkValue = true;
-// if (taskListMemento != null && taskListMemento.getString(MEMENTO_LINK_WITH_EDITOR) != null) {
-// linkValue = Boolean.parseBoolean(taskListMemento.getString(MEMENTO_LINK_WITH_EDITOR));
-// }
-// setLinkWithEditor(linkValue);
-//
-// getViewer().setSorter(new TaskListTableSorter(this, sortByIndex));
-// getViewer().refresh();
-// }
-//
-// @Override
-// public void createPartControl(Composite parent) {
-// themeManager = getSite().getWorkbenchWindow().getWorkbench().getThemeManager();
-// themeManager.addPropertyChangeListener(THEME_CHANGE_LISTENER);
-//
-// filteredTree = new TaskListFilteredTree(parent, SWT.MULTI | SWT.VERTICAL | /* SWT.H_SCROLL | */SWT.V_SCROLL
-// | SWT.FULL_SELECTION | SWT.HIDE_SELECTION, new TaskListPatternFilter());
-//
-// getViewer().getTree().setHeaderVisible(false);
-// getViewer().setUseHashlookup(true);
-//
-// configureColumns(columnNames, columnWidths);
-//
-// final IThemeManager themeManager = getSite().getWorkbenchWindow().getWorkbench().getThemeManager();
-// Color categoryBackground = themeManager.getCurrentTheme().getColorRegistry().get(
-// TaskListColorsAndFonts.THEME_COLOR_TASKLIST_CATEGORY);
-// taskListTableLabelProvider = new TaskTableLabelProvider(new TaskElementLabelProvider(true),
-// PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator(), categoryBackground);
-// getViewer().setLabelProvider(taskListTableLabelProvider);
-//
-// CellEditor[] editors = new CellEditor[columnNames.length];
-// TextCellEditor textEditor = new TextCellEditor(getViewer().getTree());
-// ((Text) textEditor.getControl()).setOrientation(SWT.LEFT_TO_RIGHT);
-// editors[0] = textEditor;
-// // editors[1] = new ComboBoxCellEditor(getViewer().getTree(),
-// // editors[2] = new CheckboxCellEditor();
-//
-// getViewer().setCellEditors(editors);
-// getViewer().setCellModifier(taskListCellModifier);
-//
-// tableSorter = new TaskListTableSorter(this, TaskListTableSorter.SortByIndex.PRIORITY);
-// getViewer().setSorter(tableSorter);
-//
-// applyPresentation(CategorizedPresentation.ID);
-//
-// drillDownAdapter = new DrillDownAdapter(getViewer());
-// getViewer().setInput(getViewSite());
-//
-// final int activationImageOffset = 20;
-// CustomTaskListDecorationDrawer customDrawer = new CustomTaskListDecorationDrawer(this, activationImageOffset);
-// getViewer().getTree().addListener(SWT.MeasureItem, customDrawer);
-// getViewer().getTree().addListener(SWT.EraseItem, customDrawer);
-// getViewer().getTree().addListener(SWT.PaintItem, customDrawer);
-//
-// getViewer().getTree().addMouseListener(new MouseListener() {
-//
-// public void mouseDown(MouseEvent e) {
-// // NOTE: need e.x offset for Linux/GTK, which does not see
-// // left-aligned items in tree
-// Object selectedNode = ((Tree) e.widget).getItem(new Point(e.x + 70, e.y));
-// if (selectedNode instanceof TreeItem) {
-// Object selectedObject = ((TreeItem) selectedNode).getData();
-// if (selectedObject instanceof AbstractTask) {
-// if (e.x > activationImageOffset && e.x < activationImageOffset + 13) {
-// taskListCellModifier.toggleTaskActivation((AbstractTaskContainer) selectedObject);
-// }
-// }
-// }
-// }
-//
-// public void mouseDoubleClick(MouseEvent e) {
-// // ignore
-// }
-//
-// public void mouseUp(MouseEvent e) {
-// // ignore
-// }
-//
-// });
-//
-// getViewer().getTree().addKeyListener(new KeyListener() {
-//
-// public void keyPressed(KeyEvent e) {
-// if (e.keyCode == SWT.INSERT) {
-// new NewLocalTaskWizard().performFinish();
-// } else if (e.keyCode == SWT.F2 && e.stateMask == 0) {
-// if (renameAction.isEnabled()) {
-// renameAction.run();
-// }
-// } else if ((e.keyCode & SWT.KEYCODE_BIT) != 0) {
-// // Do nothing here since it is key code
-// } else if (e.keyCode == 'c' && e.stateMask == SWT.MOD1) {
-// copyDetailsAction.run();
-//// } else if (e.keyCode == 'd' && e.stateMask == SWT.MOD1) {
-//// cloneThisBugAction.run();
-// } else if (e.keyCode == SWT.DEL) {
-// deleteAction.run();
-// } else if (e.keyCode == 'f' && e.stateMask == SWT.MOD1) {
-// filteredTree.getFilterControl().setFocus();
-// } else if (e.stateMask == 0) {
-// if (Character.isLetter((char) e.keyCode) || Character.isDigit((char) e.keyCode)) {
-// String string = new Character((char) e.keyCode).toString();
-// filteredTree.getFilterControl().setText(string);
-// filteredTree.getFilterControl().setSelection(1, 1);
-// filteredTree.getFilterControl().setFocus();
-// }
-// }
-// }
-//
-// public void keyReleased(KeyEvent e) {
-// }
-//
-// });
-//
-// getViewer().addTreeListener(new ITreeViewerListener() {
-//
-// public void treeCollapsed(final TreeExpansionEvent event) {
-// PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
-// public void run() {
-// getViewer().refresh(event.getElement());
-// }
-// });
-// }
-//
-// public void treeExpanded(final TreeExpansionEvent event) {
-// PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
-// public void run() {
-// getViewer().refresh(event.getElement());
-// }
-// });
-// }
-// });
-//
-// // HACK: shouldn't need to update explicitly
-// getViewer().addSelectionChangedListener(new ISelectionChangedListener() {
-// public void selectionChanged(SelectionChangedEvent event) {
-// Object selectedObject = ((IStructuredSelection) getViewer().getSelection()).getFirstElement();
-// if (selectedObject instanceof AbstractTaskContainer) {
-// updateActionEnablement(renameAction, (AbstractTaskContainer) selectedObject);
-// }
-// }
-// });
-//
-// makeActions();
-// hookContextMenu();
-// hookOpenAction();
-// contributeToActionBars();
-//
-// new TaskListToolTip(getViewer().getControl());
-//
-// // Set to empty string to disable native tooltips (windows only?)
-// // bug#160897
-// // http://dev.eclipse.org/newslists/news.eclipse.platform.swt/msg29614.html
-// getViewer().getTree().setToolTipText("");
-//
-// configureGradientColors();
-//
-// initDragAndDrop(parent);
-// expandToActiveTasks();
-// restoreState();
-//
-// updateDescription();
-//
-// getSite().setSelectionProvider(getViewer());
-// getSite().getPage().addPartListener(editorListener);
-//
-// // Need to do this because the page, which holds the active working set is not around on creation, see bug 203179
-// PlatformUI.getWorkbench().getActiveWorkbenchWindow().addPageListener(PAGE_LISTENER);
-// }
-//
-// private void applyPresentation(String id) {
-// if (id != null) {
-// for (AbstractTaskListPresentation presentation : presentationsPrimary) {
-// if (id.equals(presentation.getId())) {
-// applyPresentation(presentation);
-// return;
-// }
-// }
-// for (AbstractTaskListPresentation presentation : presentationsSecondary) {
-// if (id.equals(presentation.getId())) {
-// applyPresentation(presentation);
-// return;
-// }
-// }
-// }
-// }
-//
-// public void applyPresentation(AbstractTaskListPresentation presentation) {
-// try {
-// getViewer().getControl().setRedraw(false);
-// if (!filteredTree.getFilterControl().getText().equals("")) {
-// filteredTree.getFilterControl().setText("");
-// }
-// AbstractTaskListContentProvider contentProvider = presentation.getContentProvider(this);
-// getViewer().setContentProvider(contentProvider);
-// refreshAndFocus(isFocusedMode());
-//
-// currentPresentation = presentation;
-// } finally {
-// getViewer().getControl().setRedraw(true);
-// }
-// }
-//
-// public AbstractTaskListPresentation getCurrentPresentation() {
-// return currentPresentation;
-// }
-//
-// private void configureColumns(final String[] columnNames, final int[] columnWidths) {
-// TreeColumnLayout layout = (TreeColumnLayout) getViewer().getTree().getParent().getLayout();
-// getViewer().setColumnProperties(columnNames);
-// columns = new TreeColumn[columnNames.length];
-// for (int i = 0; i < columnNames.length; i++) {
-// columns[i] = new TreeColumn(getViewer().getTree(), 0);
-// columns[i].setText(columnNames[i]);
-//
-// if (i == 0) {
-// layout.setColumnData(columns[i], new ColumnWeightData(100));
-// } else {
-// layout.setColumnData(columns[i], new ColumnPixelData(columnWidths[i]));
-// }
-//
-// columns[i].addSelectionListener(new SelectionAdapter() {
-//
-// @Override
-// public void widgetSelected(SelectionEvent e) {
-// sortDirection *= DEFAULT_SORT_DIRECTION;
-// getViewer().refresh(false);
-// }
-// });
-// columns[i].addControlListener(new ControlListener() {
-// public void controlResized(ControlEvent e) {
-// for (int j = 0; j < columnWidths.length; j++) {
-// if (columns[j].equals(e.getSource())) {
-// columnWidths[j] = columns[j].getWidth();
-// }
-// }
-// }
-//
-// public void controlMoved(ControlEvent e) {
-// // don't care if the control is moved
-// }
-// });
-// }
-// }
-//
-// /**
-// * Tracks editor activation and jump to corresponding task, if applicable
-// */
-// private IPartListener editorListener = new IPartListener() {
-//
-// private void jumpToEditor(IWorkbenchPart part) {
-// if (!linkWithEditor || !(part instanceof IEditorPart)) {
-// return;
-// }
-// jumpToEditorTask((IEditorPart) part);
-// }
-//
-// public void partActivated(IWorkbenchPart part) {
-// if (part == CopyOfTaskListView.this) {
-// updateDescription();
-// } else {
-// jumpToEditor(part);
-// }
-// }
-//
-// public void partBroughtToTop(IWorkbenchPart part) {
-// }
-//
-// public void partClosed(IWorkbenchPart part) {
-// }
-//
-// public void partDeactivated(IWorkbenchPart part) {
-// if (part == CopyOfTaskListView.this) {
-// IViewReference reference = getSite().getPage().findViewReference(ID);
-// if (reference != null && reference.isFastView()) {
-// updateDescription();
-// }
-// }
-// }
-//
-// public void partOpened(IWorkbenchPart part) {
-// }
-// };
-//
-// private void initDragAndDrop(Composite parent) {
-// Transfer[] dragTypes = new Transfer[] { TaskTransfer.getInstance(), TextTransfer.getInstance(),
-// FileTransfer.getInstance() };
-//
-// Transfer[] dropTypes = new Transfer[] { TaskTransfer.getInstance(), TextTransfer.getInstance(),
-// FileTransfer.getInstance(), // PluginTransfer.getInstance(),
-// RTFTransfer.getInstance() };
-//
-// getViewer().addDragSupport(DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK, dragTypes,
-// new TaskListDragSourceListener(this));
-// getViewer().addDropSupport(DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK | DND.DROP_DEFAULT, dropTypes,
-// new TaskListDropAdapter(getViewer()));
-// }
-//
-// void expandToActiveTasks() {
-// final IWorkbench workbench = PlatformUI.getWorkbench();
-// workbench.getDisplay().asyncExec(new Runnable() {
-// public void run() {
-// List<AbstractTask> activeTasks = TasksUiPlugin.getTaskList().getActiveTasks();
-// for (AbstractTask t : activeTasks) {
-// getViewer().expandToLevel(t, 0);
-// }
-// }
-// });
-// }
-//
-// private void hookContextMenu() {
-// MenuManager menuManager = new MenuManager("#PopupMenu");
-// menuManager.setRemoveAllWhenShown(true);
-// menuManager.addMenuListener(new IMenuListener() {
-// public void menuAboutToShow(IMenuManager manager) {
-// CopyOfTaskListView.this.fillContextMenu(manager);
-// }
-// });
-// Menu menu = menuManager.createContextMenu(getViewer().getControl());
-// getViewer().getControl().setMenu(menu);
-// getSite().registerContextMenu(menuManager, getViewer());
-// }
-//
-// private void contributeToActionBars() {
-// IActionBars bars = getViewSite().getActionBars();
-// fillLocalPullDown(bars.getMenuManager());
-// fillLocalToolBar(bars.getToolBarManager());
-// }
-//
-// private void fillLocalPullDown(IMenuManager manager) {
-// updateDrillDownActions();
-// manager.add(goUpAction);
-// manager.add(collapseAll);
-// manager.add(expandAll);
-// manager.add(new Separator(ID_SEPARATOR_FILTERS));
-// manager.add(sortByAction);
-// manager.add(filterOnPriorityAction);
-// manager.add(filterCompleteTask);
-// manager.add(filterArchiveCategory);
-// manager.add(filterSubTasksAction);
-//
-// manager.add(new Separator(ID_SEPARATOR_TASKS));
-// manager.add(synchronizeAutomatically);
-//
-// manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
-//
-// manager.addMenuListener(new IMenuListener() {
-// public void menuAboutToShow(IMenuManager manager) {
-// filterOnPriorityAction.updateCheckedState();
-// }
-// });
-//
-//// manager.add(new Separator());
-// manager.add(linkWithEditorAction);
-// manager.add(new Separator());
-// manager.add(openPreferencesAction);
-// }
-//
-// private void fillLocalToolBar(IToolBarManager manager) {
-// manager.add(new Separator(ID_SEPARATOR_NEW));
-//// manager.add(new Separator(ID_SEPARATOR_NAVIGATION));
-// manager.add(presentationDropDownSelectionAction);
-//// manager.add(previousTaskAction);
-// manager.add(new Separator(ID_SEPARATOR_CONTEXT));
-// manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
-// }
-//
-// /*
-// * TODO: clean up, consider relying on extension points for groups
-// */
-// private void fillContextMenu(IMenuManager manager) {
-// updateDrillDownActions();
-// AbstractTaskContainer element = null;
-//
-// final Object firstSelectedObject = ((IStructuredSelection) getViewer().getSelection()).getFirstElement();
-// if (firstSelectedObject instanceof AbstractTaskContainer) {
-// element = (AbstractTaskContainer) firstSelectedObject;
-// }
-// List<AbstractTaskContainer> selectedElements = new ArrayList<AbstractTaskContainer>();
-// for (Iterator<?> i = ((IStructuredSelection) getViewer().getSelection()).iterator(); i.hasNext();) {
-// Object object = i.next();
-// if (object instanceof AbstractTaskContainer) {
-// selectedElements.add((AbstractTaskContainer) object);
-// }
-// }
-// AbstractTask task = null;
-// if ((element instanceof AbstractTask)) {
-// task = (AbstractTask) element;
-// }
-//
-// manager.add(new Separator(ID_SEPARATOR_NEW));
-// manager.add(new Separator());
-//
-// if (element instanceof AbstractTask) {
-// addAction(openAction, manager, element);
-// }
-// addAction(openWithBrowser, manager, element);
-// if (task != null) {
-// if (task.isActive()) {
-// manager.add(deactivateAction);
-// } else {
-// manager.add(activateAction);
-// }
-// }
-//
-// manager.add(new Separator());
-//
-// Map<String, List<IDynamicSubMenuContributor>> dynamicMenuMap = TasksUiPlugin.getDefault().getDynamicMenuMap();
-// for (String menuPath : dynamicMenuMap.keySet()) {
-// if (!ID_SEPARATOR_CONTEXT.equals(menuPath)) {
-// for (IDynamicSubMenuContributor contributor : dynamicMenuMap.get(menuPath)) {
-// MenuManager subMenuManager = contributor.getSubMenuManager(selectedElements);
-// if (subMenuManager != null) {
-// addMenuManager(subMenuManager, manager, element);
-// }
-// }
-// }
-// }
-//// manager.add(new Separator(ID_SEPARATOR_OPERATIONS));
-// manager.add(new Separator());
-//
-// addAction(copyDetailsAction, manager, element);
-// if (task != null && !task.isLocal()) {
-//// addAction(cloneThisBugAction, manager, element);
-// addAction(removeFromCategoryAction, manager, element);
-// }
-// // This should also test for null, or else nothing to delete!
-// addAction(deleteAction, manager, element);
-// if (!(element instanceof AbstractTask)) {
-// addAction(renameAction, manager, element);
-// }
-//
-// if (element != null && !(element instanceof AbstractTask)) {
-// manager.add(goIntoAction);
-// }
-// if (drilledIntoCategory != null) {
-// manager.add(goUpAction);
-// }
-// manager.add(new Separator(ID_SEPARATOR_CONTEXT));
-// manager.add(new Separator(ID_SEPARATOR_OPERATIONS));
-//
-// if (element instanceof AbstractTask) {
-// for (String menuPath : dynamicMenuMap.keySet()) {
-// if (ID_SEPARATOR_CONTEXT.equals(menuPath)) {
-// for (IDynamicSubMenuContributor contributor : dynamicMenuMap.get(menuPath)) {
-// MenuManager subMenuManager = contributor.getSubMenuManager(selectedElements);
-// if (subMenuManager != null) {
-// addMenuManager(subMenuManager, manager, element);
-// }
-// }
-// }
-// }
-// }
-// manager.add(new Separator(ID_SEPARATOR_REPOSITORY));
-//
-// if (element instanceof AbstractRepositoryQuery || element instanceof TaskCategory) {
-// manager.add(new Separator());
-// addAction(propertiesAction, manager, element);
-// }
-//
-// manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
-// }
-//
-// private void addMenuManager(IMenuManager menuToAdd, IMenuManager manager, AbstractTaskContainer element) {
-// if ((element instanceof AbstractTask) || element instanceof AbstractRepositoryQuery) {
-// manager.add(menuToAdd);
-// }
-// }
-//
-// private void addAction(Action action, IMenuManager manager, AbstractTaskContainer element) {
-// manager.add(action);
-// if (element != null) {
-// updateActionEnablement(action, element);
-// }
-// }
-//
-// /**
-// * Refactor out element
-// */
-// private void updateActionEnablement(Action action, AbstractTaskContainer element) {
-// if (element instanceof AbstractTask) {
-// if (action instanceof OpenWithBrowserAction) {
-// if (((AbstractTask) element).hasValidUrl()) {
-// action.setEnabled(true);
-// } else {
-// action.setEnabled(false);
-// }
-// } else if (action instanceof DeleteAction) {
-// action.setEnabled(true);
-// } else if (action instanceof OpenTaskListElementAction) {
-// action.setEnabled(true);
-// } else if (action instanceof CopyTaskDetailsAction) {
-// action.setEnabled(true);
-// } else if (action instanceof RenameAction) {
-// action.setEnabled(true);
-// }
-// } else if (element != null) {
-// if (action instanceof MarkTaskCompleteAction) {
-// action.setEnabled(false);
-// } else if (action instanceof MarkTaskIncompleteAction) {
-// action.setEnabled(false);
-// } else if (action instanceof DeleteAction) {
-// if (element instanceof TaskArchive || element instanceof UnfiledCategory)
-// action.setEnabled(false);
-// else
-// action.setEnabled(true);
-// } else if (action instanceof GoIntoAction) {
-// TaskCategory cat = (TaskCategory) element;
-// if (cat.getChildren().size() > 0) {
-// action.setEnabled(true);
-// } else {
-// action.setEnabled(false);
-// }
-// } else if (action instanceof OpenTaskListElementAction) {
-// action.setEnabled(true);
-// } else if (action instanceof CopyTaskDetailsAction) {
-// action.setEnabled(true);
-// } else if (action instanceof RenameAction) {
-// if (element instanceof AbstractTaskCategory) {
-// AbstractTaskCategory container = (AbstractTaskCategory) element;
-// action.setEnabled(container.isUserDefined());
-// } else if (element instanceof AbstractRepositoryQuery) {
-// action.setEnabled(true);
-// }
-// }
-// } else {
-// action.setEnabled(true);
-// }
-// }
-//
-// private void makeActions() {
-// copyDetailsAction = new CopyTaskDetailsAction(true);
-//
-// goIntoAction = new GoIntoAction();
-// goUpAction = new GoUpAction(drillDownAdapter);
-//
-// //newLocalTaskAction = new NewLocalTaskAction(this);
-// removeFromCategoryAction = new RemoveFromCategoryAction(this);
-// renameAction = new RenameAction(this);
-// filteredTree.getViewer().addSelectionChangedListener(renameAction);
-//
-// deleteAction = new DeleteAction();
-// collapseAll = new CollapseAllAction(this);
-// expandAll = new ExpandAllAction(this);
-// openAction = new OpenTaskListElementAction(this.getViewer());
-// propertiesAction = new TaskListElementPropertiesAction(this.getViewer());
-// openWithBrowser = new OpenWithBrowserAction();
-// filterCompleteTask = new FilterCompletedTasksAction(this);
-// filterSubTasksAction = new GroupSubTasksAction(this);
-// synchronizeAutomatically = new SynchronizeAutomaticallyAction();
-// openPreferencesAction = new OpenTasksUiPreferencesAction();
-// filterArchiveCategory = new FilterArchiveContainerAction(this);
-// sortByAction = new SortyByDropDownAction(this);
-// filterOnPriorityAction = new PriorityDropDownAction(this);
-// linkWithEditorAction = new LinkWithEditorAction(this);
-// presentationDropDownSelectionAction = new PresentationDropDownSelectionAction(this);
-//
-// filteredTree.getViewer().addSelectionChangedListener(openWithBrowser);
-// filteredTree.getViewer().addSelectionChangedListener(copyDetailsAction);
-// }
-//
-// /**
-// * Recursive function that checks for the occurrence of a certain task taskId. All children of the supplied node
-// * will be checked.
-// *
-// * @param task
-// * The <code>ITask</code> object that is to be searched.
-// * @param taskId
-// * The taskId that is being searched for.
-// * @return <code>true</code> if the taskId was found in the node or any of its children
-// */
-// protected boolean lookForId(String taskId) {
-// return (TasksUiPlugin.getTaskList().getTask(taskId) == null);
-// }
-//
-// private void hookOpenAction() {
-//
-// getViewer().addOpenListener(new IOpenListener() {
-// public void open(OpenEvent event) {
-// openAction.run();
-// }
-// });
-//
-// getViewer().addDoubleClickListener(new IDoubleClickListener() {
-// public void doubleClick(DoubleClickEvent event) {
-// StructuredSelection selection = (StructuredSelection) getViewer().getSelection();
-// Object object = selection.getFirstElement();
-// if (TasksUiPlugin.getDefault().getPreferenceStore().getBoolean(
-// TasksUiPreferenceConstants.ACTIVATE_WHEN_OPENED)) {
-// AbstractTask selectedTask = CopyOfTaskListView.getFromActivePerspective().getSelectedTask();
-// if (selectedTask != null) {
-// activateAction.run(selectedTask);
-// }
-// }
-// if (object instanceof TaskCategory || object instanceof AbstractRepositoryQuery) {
-// TasksUiUtil.refreshAndOpenTaskListElement((AbstractTaskContainer) object);
-// }
-// }
-// });
-// }
-//
-// /**
-// * Passing the focus request to the viewer's control.
-// */
-// @Override
-// public void setFocus() {
-// filteredTree.getViewer().getControl().setFocus();
-// }
-//
-// public String getBugIdFromUser() {
-// InputDialog dialog = new InputDialog(getSite().getWorkbenchWindow().getShell(), "Enter Bugzilla ID",
-// "Enter the Bugzilla ID: ", "", null);
-// int dialogResult = dialog.open();
-// if (dialogResult == Window.OK) {
-// return dialog.getValue();
-// } else {
-// return null;
-// }
-// }
-//
-// public void refreshAndFocus(boolean expand) {
-// if (expand) {
-// getViewer().expandAll();
-// }
-// refresh(null);
-// selectedAndFocusTask(TasksUiPlugin.getTaskList().getActiveTask());
-// }
-//
-// public TreeViewer getViewer() {
-// return filteredTree.getViewer();
-// }
-//
-// public TaskCompletionFilter getCompleteFilter() {
-// return filterComplete;
-// }
-//
-// public TaskPriorityFilter getPriorityFilter() {
-// return filterPriority;
-// }
-//
-// public void addFilter(AbstractTaskListFilter filter) {
-// if (!filters.contains(filter)) {
-// filters.add(filter);
-// }
-// }
-//
-// public void clearFilters(boolean preserveArchiveFilter) {
-// filters.clear();
-// if (preserveArchiveFilter) {
-// filters.add(filterArchive);
-// }
-// filters.add(filterWorkingSet);
-// }
-//
-// public void removeFilter(AbstractTaskListFilter filter) {
-// filters.remove(filter);
-// }
-//
-// public void updateDrillDownActions() {
-// if (drillDownAdapter.canGoBack()) {
-// goUpAction.setEnabled(true);
-// } else {
-// goUpAction.setEnabled(false);
-// }
-// }
-//
-// boolean isInRenameAction = false;
-//
-// public void setInRenameAction(boolean b) {
-// isInRenameAction = b;
-// }
-//
-// public void goIntoCategory() {
-// ISelection selection = getViewer().getSelection();
-// if (selection instanceof StructuredSelection) {
-// StructuredSelection structuredSelection = (StructuredSelection) selection;
-// Object element = structuredSelection.getFirstElement();
-// if (element instanceof AbstractTaskContainer) {
-// drilledIntoCategory = (AbstractTaskContainer) element;
-// drillDownAdapter.goInto();
-// IActionBars bars = getViewSite().getActionBars();
-// bars.getToolBarManager().remove(goUpAction.getId());
-// bars.getToolBarManager().add(goUpAction);
-// bars.updateActionBars();
-// updateDrillDownActions();
-// }
-// }
-// }
-//
-// public void goUpToRoot() {
-// drilledIntoCategory = null;
-// drillDownAdapter.goBack();
-// IActionBars bars = getViewSite().getActionBars();
-// bars.getToolBarManager().remove(GoUpAction.ID);
-// bars.updateActionBars();
-// updateDrillDownActions();
-// }
-//
-// public AbstractTask getSelectedTask() {
-// ISelection selection = getViewer().getSelection();
-// if (selection.isEmpty())
-// return null;
-// if (selection instanceof StructuredSelection) {
-// StructuredSelection structuredSelection = (StructuredSelection) selection;
-// Object element = structuredSelection.getFirstElement();
-// if (element instanceof AbstractTask) {
-// return (AbstractTask) structuredSelection.getFirstElement();
-// }
-// }
-// return null;
-// }
-//
-// public static AbstractTask getSelectedTask(ISelection selection) {
-// if (selection instanceof StructuredSelection) {
-// StructuredSelection structuredSelection = (StructuredSelection) selection;
-// if (structuredSelection.size() != 1) {
-// return null;
-// }
-// Object element = structuredSelection.getFirstElement();
-// if (element instanceof AbstractTask) {
-// return (AbstractTask) structuredSelection.getFirstElement();
-// }
-// }
-// return null;
-// }
-//
-// public void indicatePaused(boolean paused) {
-// isPaused = paused;
-// IStatusLineManager statusLineManager = getViewSite().getActionBars().getStatusLineManager();
-// if (isPaused) {
-// statusLineManager.setMessage(TasksUiImages.getImage(TasksUiImages.TASKLIST), "Mylyn context capture paused");
-// setPartName("(paused) " + PART_NAME);
-// } else {
-// statusLineManager.setMessage("");
-// setPartName(PART_NAME);
-// }
-// }
-//
-// public AbstractTaskContainer getDrilledIntoCategory() {
-// return drilledIntoCategory;
-// }
-//
-// public TaskListFilteredTree getFilteredTree() {
-// return filteredTree;
-// }
-//
-// public void selectedAndFocusTask(AbstractTask task) {
-// if (task == null || getViewer().getControl().isDisposed()) {
-// return;
-// }
-//
-// saveSelection();
-//
-// IStructuredSelection selection = restoreSelection(task);
-// getViewer().setSelection(selection, true);
-// }
-//
-// private void saveSelection() {
-// IStructuredSelection selection = (IStructuredSelection) getViewer().getSelection();
-// if (!selection.isEmpty()) {
-// if (selection.getFirstElement() instanceof AbstractTaskContainer) {
-// // make sure the new selection is inserted at the end of the
-// // list
-// String handle = ((AbstractTaskContainer) selection.getFirstElement()).getHandleIdentifier();
-// lastSelectionByTaskHandle.remove(handle);
-// lastSelectionByTaskHandle.put(handle, selection);
-//
-// if (lastSelectionByTaskHandle.size() > SIZE_MAX_SELECTION_HISTORY) {
-// Iterator<String> it = lastSelectionByTaskHandle.keySet().iterator();
-// it.next();
-// it.remove();
-// }
-// }
-// }
-// }
-//
-// private IStructuredSelection restoreSelection(AbstractTaskContainer task) {
-// IStructuredSelection selection = lastSelectionByTaskHandle.get(task.getHandleIdentifier());
-// if (selection != null) {
-// return selection;
-// } else {
-// return new StructuredSelection(task);
-// }
-// }
-//
-// /**
-// * Encapsulates refresh policy.
-// */
-// private void refresh(final AbstractTaskContainer container) {
-// refreshJob.cancel();
-// refreshJob.schedule(container, 0);
-// }
-//
-// public Image[] getPirorityImages() {
-// Image[] images = new Image[PriorityLevel.values().length];
-// for (int i = 0; i < PriorityLevel.values().length; i++) {
-// images[i] = TasksUiImages.getImageForPriority(PriorityLevel.values()[i]);
-// }
-// return images;
-// }
-//
-// public Set<AbstractTaskListFilter> getFilters() {
-// return filters;
-// }
-//
-// public static String getCurrentPriorityLevel() {
-// if (TasksUiPlugin.getDefault().getPreferenceStore().contains(TasksUiPreferenceConstants.FILTER_PRIORITY)) {
-// return TasksUiPlugin.getDefault()
-// .getPreferenceStore()
-// .getString(TasksUiPreferenceConstants.FILTER_PRIORITY);
-// } else {
-// return PriorityLevel.P5.toString();
-// }
-// }
-//
-// public TaskArchiveFilter getArchiveFilter() {
-// return filterArchive;
-// }
-//
-// public void setManualFiltersEnabled(boolean enabled) {
-// sortByAction.setEnabled(enabled);
-// filterOnPriorityAction.setEnabled(enabled);
-// filterCompleteTask.setEnabled(enabled);
-// filterArchiveCategory.setEnabled(enabled);
-// }
-//
-// public boolean isFocusedMode() {
-// return focusedMode;
-// }
-//
-// public void setFocusedMode(boolean focusedMode) {
-// this.linkWithEditor = focusedMode;
-// this.focusedMode = focusedMode;
-// }
-//
-// public void setSortBy(SortByIndex sortByIndex) {
-// this.sortByIndex = sortByIndex;
-// getViewer().setSorter(new TaskListTableSorter(this, sortByIndex));
-// }
-//
-// public void setSortDirection(int sortDirection) {
-// this.sortDirection = sortDirection;
-// getViewer().setSorter(new TaskListTableSorter(this, sortByIndex));
-// }
-//
-// public SortByIndex getSortByIndex() {
-// return sortByIndex;
-// }
-//
-// public void setSynchronizationOverlaid(boolean synchronizationOverlaid) {
-// this.synchronizationOverlaid = synchronizationOverlaid;
-// getViewer().refresh();
-// }
-//
-// public void displayPrioritiesAbove(String priority) {
-// filterPriority.displayPrioritiesAbove(priority);
-// getViewer().refresh();
-// }
-//
-// public void propertyChange(PropertyChangeEvent event) {
-// String property = event.getProperty();
-// if (IWorkingSetManager.CHANGE_WORKING_SET_CONTENT_CHANGE.equals(property)
-// || IWorkingSetManager.CHANGE_WORKING_SET_REMOVE.equals(property)) {
-// if (getSite() != null && getSite().getPage() != null) {
-// filterWorkingSet.setCurrentWorkingSet(getSite().getPage().getAggregateWorkingSet());
-// }
-//
-// PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
-// public void run() {
-// filteredTree.indicateActiveTaskWorkingSet();
-// }
-// });
-// }
-//
-// try {
-// getViewer().getControl().setRedraw(false);
-// getViewer().collapseAll();
-// getViewer().refresh();
-// if (isFocusedMode()) {
-// getViewer().expandAll();
-// }
-// } finally {
-// getViewer().getControl().setRedraw(true);
-// }
-// }
-//
-// public void setLinkWithEditor(boolean linkWithEditor) {
-// this.linkWithEditor = linkWithEditor;
-// linkWithEditorAction.setChecked(linkWithEditor);
-// if (linkWithEditor) {
-// IEditorPart activeEditor = getSite().getPage().getActiveEditor();
-// if (activeEditor != null) {
-// jumpToEditorTask(activeEditor);
-// }
-// }
-// }
-//
-// private void jumpToEditorTask(IEditorPart editor) {
-// IEditorInput input = editor.getEditorInput();
-// if (input instanceof TaskEditorInput) {
-// AbstractTask task = ((TaskEditorInput) input).getTask();
-// AbstractTask selected = getSelectedTask();
-// if (selected == null || !selected.equals(task)) {
-// selectedAndFocusTask(task);
-// }
-// }
-// }
-//
-// private void refreshTask(TaskContainerDelta taskContainerDelta) {
-// AbstractTask task = (AbstractTask) taskContainerDelta.getContainer();
-// switch (taskContainerDelta.getKind()) {
-// case ROOT:
-// refresh(null);
-// break;
-// case ADDED:
-// refresh(null);
-// break;
-// case REMOVED:
-// refresh(null);
-// break;
-// default:
-// // TODO: move logic into deltas
-// refresh(task);
-// Set<AbstractTaskContainer> containers = new HashSet<AbstractTaskContainer>(
-// TasksUiPlugin.getTaskList().getQueriesForHandle(task.getHandleIdentifier()));
-// containers.addAll(task.getParentContainers());
-// containers.add(TasksUiPlugin.getTaskList().getArchiveContainer());
-// containers.add(TasksUiPlugin.getTaskList().getDefaultCategory());
-// for (AbstractTaskContainer container : containers) {
-// refresh(container);
-// }
-// break;
-// }
-// }
-//
-// public static Set<IWorkingSet> getActiveWorkingSets() {
-// if (PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage() != null) {
-// Set<IWorkingSet> allSets = new HashSet<IWorkingSet>(Arrays.asList(PlatformUI.getWorkbench()
-// .getActiveWorkbenchWindow()
-// .getActivePage()
-// .getWorkingSets()));
-// Set<IWorkingSet> tasksSets = new HashSet<IWorkingSet>(allSets);
-// for (IWorkingSet workingSet : allSets) {
-// if (workingSet.getId() == null
-// || !workingSet.getId().equalsIgnoreCase(TaskWorkingSetUpdater.ID_TASK_WORKING_SET)) {
-// tasksSets.remove(workingSet);
-// }
-// }
-// return tasksSets;
-// } else {
-// return Collections.emptySet();
-// }
-// }
-//
-// /**
-// * This can be used for experimentally adding additional presentations, but note that this convention is extremely
-// * likely to change in the Mylyn 3.0 cycle.
-// */
-// public static List<AbstractTaskListPresentation> getPresentations() {
-// List<AbstractTaskListPresentation> presentations = new ArrayList<AbstractTaskListPresentation>();
-// presentations.addAll(presentationsPrimary);
-// presentations.addAll(presentationsSecondary);
-// return presentations;
-// }
-//
-// public static void addPresentation(AbstractTaskListPresentation presentation) {
-// if (presentation.isPrimary()) {
-// presentationsPrimary.add(presentation);
-// } else {
-// presentationsSecondary.add(presentation);
-// }
-// }
-//}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/CustomTaskListDecorationDrawer.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/CustomTaskListDecorationDrawer.java
deleted file mode 100644
index 9df3ac03e..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/CustomTaskListDecorationDrawer.java
+++ /dev/null
@@ -1,268 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.views;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.mylyn.context.core.ContextCore;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
-import org.eclipse.mylyn.internal.tasks.core.TaskCategory;
-import org.eclipse.mylyn.internal.tasks.core.UnmatchedTaskContainer;
-import org.eclipse.mylyn.internal.tasks.ui.AbstractTaskListFilter;
-import org.eclipse.mylyn.internal.tasks.ui.ITasksUiPreferenceConstants;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITaskContainer;
-import org.eclipse.mylyn.tasks.core.ITask.SynchronizationState;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.TreeItem;
-
-/**
- * @author Mik Kersten
- */
-class CustomTaskListDecorationDrawer implements Listener {
-
- private final TaskListView taskListView;
-
- private final int activationImageOffset;
-
- private final Image taskActive = CommonImages.getImage(TasksUiImages.CONTEXT_ACTIVE);
-
- private final Image taskInactive = CommonImages.getImage(TasksUiImages.CONTEXT_INACTIVE_EMPTY);
-
- private final Image taskInactiveContext = CommonImages.getImage(TasksUiImages.CONTEXT_INACTIVE);
-
- // see bug 185004
- private final int platformSpecificSquish;
-
- private final Rectangle lastClippingArea = new Rectangle(0, 0, 0, 0);
-
- private final boolean tweakClipping;
-
- CustomTaskListDecorationDrawer(TaskListView taskListView, int activationImageOffset) {
- this.taskListView = taskListView;
- this.activationImageOffset = activationImageOffset;
- this.taskListView.synchronizationOverlaid = TasksUiPlugin.getDefault().getPluginPreferences().getBoolean(
- ITasksUiPreferenceConstants.OVERLAYS_INCOMING_TIGHT);
-
- if (SWT.getPlatform().equals("gtk")) {
- this.platformSpecificSquish = 8;
- this.tweakClipping = true;
- } else if (SWT.getPlatform().equals("carbon")) {
- this.platformSpecificSquish = 3;
- this.tweakClipping = false;
- } else {
- this.platformSpecificSquish = 0;
- this.tweakClipping = false;
- }
- }
-
- /*
- * NOTE: MeasureItem, PaintItem and EraseItem are called repeatedly.
- * Therefore, it is critical for performance that these methods be as
- * efficient as possible.
- */
- public void handleEvent(Event event) {
- Object data = event.item.getData();
- Image activationImage = null;
- if (data instanceof ITask) {
- AbstractTask task = (AbstractTask) data;
- if (task.isActive()) {
- activationImage = taskActive;
- } else if (ContextCore.getContextManager().hasContext(task.getHandleIdentifier())) {
- activationImage = taskInactiveContext;
- } else {
- activationImage = taskInactive;
- }
- }
- if (data instanceof ITaskContainer) {
- switch (event.type) {
- case SWT.EraseItem: {
- if (activationImage != null) {
- drawActivationImage(activationImageOffset, event, activationImage);
- }
- if (!this.taskListView.synchronizationOverlaid) {
- if (data instanceof ITaskContainer) {
- drawSyncronizationImage((ITaskContainer) data, event);
- }
- }
-
- // TODO: would be nice not to do this on each item's painting
-// String text = tree.getFilterControl().getText();
-// if (text != null && !text.equals("") && tree.getViewer().getExpandedElements().length <= 12) {
-// int offsetY = tree.getViewer().getExpandedElements().length * tree.getViewer().getTree().getItemHeight();
-// event.gc.drawText("Open search dialog...", 20, offsetY - 10);
-// }
- if (tweakClipping) {
- lastClippingArea.x = event.x;
- lastClippingArea.y = event.y;
- lastClippingArea.width = event.width;
- lastClippingArea.height = event.height;
- }
- break;
- }
- case SWT.PaintItem: {
- Rectangle clipping = null;
- if (tweakClipping) {
- clipping = event.gc.getClipping();
- event.gc.setClipping(lastClippingArea);
- }
- if (activationImage != null) {
- drawActivationImage(activationImageOffset, event, activationImage);
- }
- if (data instanceof ITaskContainer) {
- drawSyncronizationImage((ITaskContainer) data, event);
- }
- if (tweakClipping) {
- event.gc.setClipping(clipping);
- }
- break;
- }
- }
- }
- }
-
- private void drawSyncronizationImage(ITaskContainer element, Event event) {
- Image image = null;
- int offsetX = 6;
- int offsetY = (event.height / 2) - 5;
- if (taskListView.synchronizationOverlaid) {
- offsetX = event.x + 18 - platformSpecificSquish;
- offsetY += 2;
- }
- if (element != null) {
- if (element instanceof ITask) {
- image = CommonImages.getImage(getSynchronizationImageDescriptor(element,
- taskListView.synchronizationOverlaid));
- } else {
- int imageOffset = 0;
- if (!hideDecorationOnContainer(element, (TreeItem) event.item)
- && AbstractTaskListFilter.hasDescendantIncoming(element)) {
- if (taskListView.synchronizationOverlaid) {
- image = CommonImages.getImage(CommonImages.OVERLAY_SYNC_OLD_INCOMMING);
- } else {
- image = CommonImages.getImage(CommonImages.OVERLAY_SYNC_INCOMMING);
- }
- } else if (element instanceof IRepositoryQuery) {
- RepositoryQuery query = (RepositoryQuery) element;
- if (query.getStatus() != null) {
- image = CommonImages.getImage(CommonImages.OVERLAY_SYNC_WARNING);
- if (taskListView.synchronizationOverlaid) {
- imageOffset = 11;
- } else {
- imageOffset = 3;
- }
- }
- }
-
- int additionalSquish = 0;
- if (platformSpecificSquish > 0 && taskListView.synchronizationOverlaid) {
- additionalSquish = platformSpecificSquish + 3;
- } else if (platformSpecificSquish > 0) {
- additionalSquish = platformSpecificSquish / 2;
- }
- if (taskListView.synchronizationOverlaid) {
- offsetX = 42 - imageOffset - additionalSquish;
- } else {
- offsetX = 24 - imageOffset - additionalSquish;
- }
- }
- }
-
- if (image != null) {
- event.gc.drawImage(image, offsetX, event.y + offsetY);
- }
- }
-
- private boolean hideDecorationOnContainer(ITaskContainer element, TreeItem treeItem) {
- if (element instanceof UnmatchedTaskContainer) {
- if (!taskListView.isFocusedMode()) {
- return false;
- } else if (AbstractTaskListFilter.hasDescendantIncoming(element)) {
- return true;
- }
- } else if (element instanceof IRepositoryQuery) {
- RepositoryQuery query = (RepositoryQuery) element;
- if (query.getStatus() != null) {
- return true;
- }
- }
-
- if (!taskListView.isFocusedMode()) {
- return false;
- } else if (element instanceof IRepositoryQuery || element instanceof TaskCategory) {
- return treeItem.getExpanded();
- } else {
- return false;
- }
- }
-
- private void drawActivationImage(final int activationImageOffset, Event event, Image image) {
- Rectangle rect = image.getBounds();
- int offset = Math.max(0, (event.height - rect.height) / 2);
- event.gc.drawImage(image, activationImageOffset, event.y + offset);
- }
-
- private ImageDescriptor getSynchronizationImageDescriptor(Object element, boolean synchViewStyle) {
- if (element instanceof ITask) {
- ITask repositoryTask = (ITask) element;
- if (repositoryTask.getSynchronizationState() == SynchronizationState.INCOMING_NEW) {
- if (synchViewStyle) {
- return CommonImages.OVERLAY_SYNC_OLD_INCOMMING_NEW;
- } else {
- return CommonImages.OVERLAY_SYNC_INCOMMING_NEW;
- }
- } else if (repositoryTask.getSynchronizationState() == SynchronizationState.INCOMING
- && ((AbstractTask) repositoryTask).getLastReadTimeStamp() == null) {
- if (synchViewStyle) {
- return CommonImages.OVERLAY_SYNC_OLD_INCOMMING_NEW;
- } else {
- return CommonImages.OVERLAY_SYNC_INCOMMING_NEW;
- }
- }
- ImageDescriptor imageDescriptor = null;
- if (repositoryTask.getSynchronizationState() == SynchronizationState.OUTGOING
- || repositoryTask.getSynchronizationState() == SynchronizationState.OUTGOING_NEW) {
- if (synchViewStyle) {
- imageDescriptor = CommonImages.OVERLAY_SYNC_OLD_OUTGOING;
- } else {
- imageDescriptor = CommonImages.OVERLAY_SYNC_OUTGOING;
- }
- } else if (repositoryTask.getSynchronizationState() == SynchronizationState.INCOMING) {
- if (synchViewStyle) {
- imageDescriptor = CommonImages.OVERLAY_SYNC_OLD_INCOMMING;
- } else {
- imageDescriptor = CommonImages.OVERLAY_SYNC_INCOMMING;
- }
- } else if (repositoryTask.getSynchronizationState() == SynchronizationState.CONFLICT) {
- imageDescriptor = CommonImages.OVERLAY_SYNC_CONFLICT;
- }
- if (imageDescriptor == null && repositoryTask instanceof AbstractTask
- && ((AbstractTask) repositoryTask).getStatus() != null) {
- return CommonImages.OVERLAY_SYNC_WARNING;
- } else if (imageDescriptor != null) {
- return imageDescriptor;
- }
- } else if (element instanceof IRepositoryQuery) {
- RepositoryQuery query = (RepositoryQuery) element;
- if (query.getStatus() != null) {
- return CommonImages.OVERLAY_SYNC_WARNING;
- }
- }
- // HACK: need a proper blank image
- return CommonImages.OVERLAY_CLEAR;
- }
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/DisconnectRepositoryAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/DisconnectRepositoryAction.java
deleted file mode 100644
index 0e8791efd..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/DisconnectRepositoryAction.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.views;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-
-/**
- * @author Steffen Pingel
- */
-public class DisconnectRepositoryAction extends Action implements ISelectionChangedListener {
-
- public static final String LABEL = "Disconnected";
-
- private static final String ID = "org.eclipse.mylyn.tasklist.repositories.offline";
-
- private TaskRepository repository;
-
- public DisconnectRepositoryAction() {
- super(LABEL, IAction.AS_CHECK_BOX);
- setId(ID);
- setEnabled(false);
- }
-
- @Override
- public void run() {
- repository.setOffline(isChecked());
- TasksUiPlugin.getRepositoryManager().notifyRepositorySettingsChanged(repository);
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- }
-
- public void selectionChanged(SelectionChangedEvent event) {
- ISelection selection = event.getSelection();
- if (selection instanceof IStructuredSelection) {
- Object selectedObject = ((IStructuredSelection) selection).getFirstElement();
- if (selectedObject instanceof TaskRepository) {
- AbstractRepositoryConnector connector = TasksUi.getRepositoryManager().getRepositoryConnector(
- ((TaskRepository) selectedObject).getConnectorKind());
- if (connector.isUserManaged()) {
- this.repository = (TaskRepository) selectedObject;
- setChecked(this.repository.isOffline());
- setEnabled(true);
- return;
- }
- }
- }
- this.repository = null;
- setChecked(false);
- setEnabled(false);
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/PriorityDropDownAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/PriorityDropDownAction.java
deleted file mode 100644
index 34b80450b..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/PriorityDropDownAction.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.views;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.ActionContributionItem;
-import org.eclipse.jface.action.IMenuCreator;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.ITasksUiPreferenceConstants;
-import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Menu;
-
-/**
- * @author Mik Kersten
- */
-class PriorityDropDownAction extends Action implements IMenuCreator {
-
- /**
- *
- */
- private final TaskListView taskListView;
-
- private static final String FILTER_PRIORITY_LABEL = "Filter Priority Lower Than";
-
- private Action priority1;
-
- private Action priority2;
-
- private Action priority3;
-
- private Action priority4;
-
- private Action priority5;
-
- private Menu dropDownMenu = null;
-
- public PriorityDropDownAction(TaskListView taskListView) {
- super();
- this.taskListView = taskListView;
- setText(FILTER_PRIORITY_LABEL);
- setToolTipText(FILTER_PRIORITY_LABEL);
- setImageDescriptor(CommonImages.FILTER_PRIORITY);
- setMenuCreator(this);
- }
-
- public void dispose() {
- if (dropDownMenu != null) {
- dropDownMenu.dispose();
- dropDownMenu = null;
- }
- }
-
- public Menu getMenu(Control parent) {
- if (dropDownMenu != null) {
- dropDownMenu.dispose();
- }
- dropDownMenu = new Menu(parent);
- addActionsToMenu();
- return dropDownMenu;
- }
-
- public Menu getMenu(Menu parent) {
- if (dropDownMenu != null) {
- dropDownMenu.dispose();
- }
- dropDownMenu = new Menu(parent);
- addActionsToMenu();
- return dropDownMenu;
- }
-
- public void addActionsToMenu() {
- priority1 = new Action("", AS_CHECK_BOX) {
- @Override
- public void run() {
- TasksUiPlugin.getDefault().getPreferenceStore().setValue(ITasksUiPreferenceConstants.FILTER_PRIORITY,
- PriorityLevel.P1.toString());
- PriorityDropDownAction.this.taskListView.displayPrioritiesAbove(TaskListView.PRIORITY_LEVELS[0]);
- }
- };
- priority1.setEnabled(true);
- priority1.setText(PriorityLevel.P1.getDescription());
- priority1.setImageDescriptor(CommonImages.PRIORITY_1);
- ActionContributionItem item = new ActionContributionItem(priority1);
- item.fill(dropDownMenu, -1);
-
- priority2 = new Action("", AS_CHECK_BOX) {
- @Override
- public void run() {
- TasksUiPlugin.getDefault().getPreferenceStore().setValue(ITasksUiPreferenceConstants.FILTER_PRIORITY,
- PriorityLevel.P2.toString());
- PriorityDropDownAction.this.taskListView.displayPrioritiesAbove(TaskListView.PRIORITY_LEVELS[1]);
- }
- };
- priority2.setEnabled(true);
- priority2.setText(PriorityLevel.P2.getDescription());
- priority2.setImageDescriptor(CommonImages.PRIORITY_2);
- item = new ActionContributionItem(priority2);
- item.fill(dropDownMenu, -1);
-
- priority3 = new Action("", AS_CHECK_BOX) {
- @Override
- public void run() {
- TasksUiPlugin.getDefault().getPreferenceStore().setValue(ITasksUiPreferenceConstants.FILTER_PRIORITY,
- PriorityLevel.P3.toString());
- PriorityDropDownAction.this.taskListView.displayPrioritiesAbove(TaskListView.PRIORITY_LEVELS[2]);
- }
- };
- priority3.setEnabled(true);
- priority3.setText(PriorityLevel.P3.getDescription());
- priority3.setImageDescriptor(CommonImages.PRIORITY_3);
- item = new ActionContributionItem(priority3);
- item.fill(dropDownMenu, -1);
-
- priority4 = new Action("", AS_CHECK_BOX) {
- @Override
- public void run() {
- TasksUiPlugin.getDefault().getPreferenceStore().setValue(ITasksUiPreferenceConstants.FILTER_PRIORITY,
- PriorityLevel.P4.toString());
- PriorityDropDownAction.this.taskListView.displayPrioritiesAbove(TaskListView.PRIORITY_LEVELS[3]);
- }
- };
- priority4.setEnabled(true);
- priority4.setText(PriorityLevel.P4.getDescription());
- priority4.setImageDescriptor(CommonImages.PRIORITY_4);
- item = new ActionContributionItem(priority4);
- item.fill(dropDownMenu, -1);
-
- priority5 = new Action("", AS_CHECK_BOX) {
- @Override
- public void run() {
- TasksUiPlugin.getDefault().getPreferenceStore().setValue(ITasksUiPreferenceConstants.FILTER_PRIORITY,
- PriorityLevel.P5.toString());
- PriorityDropDownAction.this.taskListView.displayPrioritiesAbove(TaskListView.PRIORITY_LEVELS[4]);
- }
- };
- priority5.setEnabled(true);
- priority5.setImageDescriptor(CommonImages.PRIORITY_5);
- priority5.setText(PriorityLevel.P5.getDescription());
- item = new ActionContributionItem(priority5);
- item.fill(dropDownMenu, -1);
-
- updateCheckedState();
-// updateCheckedState(priority1, priority2, priority3, priority4, priority5);
- }
-
- void updateCheckedState() {
- if (priority1 == null) {
- return;
- }
- String priority = TaskListView.getCurrentPriorityLevel();
-
- priority1.setChecked(false);
- priority2.setChecked(false);
- priority3.setChecked(false);
- priority4.setChecked(false);
- priority5.setChecked(false);
-
- if (priority.equals(TaskListView.PRIORITY_LEVELS[0])) {
- priority1.setChecked(true);
- } else if (priority.equals(TaskListView.PRIORITY_LEVELS[1])) {
- priority1.setChecked(true);
- priority2.setChecked(true);
- } else if (priority.equals(TaskListView.PRIORITY_LEVELS[2])) {
- priority1.setChecked(true);
- priority2.setChecked(true);
- priority3.setChecked(true);
- } else if (priority.equals(TaskListView.PRIORITY_LEVELS[3])) {
- priority1.setChecked(true);
- priority2.setChecked(true);
- priority3.setChecked(true);
- priority4.setChecked(true);
- } else if (priority.equals(TaskListView.PRIORITY_LEVELS[4])) {
- priority1.setChecked(true);
- priority2.setChecked(true);
- priority3.setChecked(true);
- priority4.setChecked(true);
- priority5.setChecked(true);
- }
- }
-
- @Override
- public void run() {
- this.setChecked(isChecked());
- }
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/SortyByDropDownAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/SortyByDropDownAction.java
deleted file mode 100644
index b76335a99..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/SortyByDropDownAction.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.views;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.ActionContributionItem;
-import org.eclipse.jface.action.IMenuCreator;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListTableSorter.SortByIndex;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Menu;
-
-/**
- * @author Mik Kersten
- */
-class SortyByDropDownAction extends Action implements IMenuCreator {
-
- private final TaskListView taskListView;
-
- private static final String LABEL = "Sort by";
-
- private Action byPriority;
-
- private Action bySummary;
-
- private Action byDateCreated;
-
- private Menu dropDownMenu = null;
-
- public SortyByDropDownAction(TaskListView taskListView) {
- super();
- this.taskListView = taskListView;
- setText(LABEL);
- setToolTipText(LABEL);
- setMenuCreator(this);
- }
-
- public void dispose() {
- if (dropDownMenu != null) {
- dropDownMenu.dispose();
- dropDownMenu = null;
- }
- }
-
- public Menu getMenu(Control parent) {
- if (dropDownMenu != null) {
- dropDownMenu.dispose();
- }
- dropDownMenu = new Menu(parent);
- addActionsToMenu();
- return dropDownMenu;
- }
-
- public Menu getMenu(Menu parent) {
- if (dropDownMenu != null) {
- dropDownMenu.dispose();
- }
- dropDownMenu = new Menu(parent);
- addActionsToMenu();
- return dropDownMenu;
- }
-
- public void addActionsToMenu() {
- byPriority = new Action("", AS_CHECK_BOX) {
- @Override
- public void run() {
- taskListView.getSorter().setSortByIndex(SortByIndex.PRIORITY);
- byPriority.setChecked(true);
- bySummary.setChecked(false);
- byDateCreated.setChecked(false);
- }
- };
- byPriority.setEnabled(true);
- byPriority.setText("Priority");
- byPriority.setImageDescriptor(CommonImages.PRIORITY_1);
- new ActionContributionItem(byPriority).fill(dropDownMenu, -1);
-
- bySummary = new Action("", AS_CHECK_BOX) {
- @Override
- public void run() {
- taskListView.getSorter().setSortByIndex(SortByIndex.SUMMARY);
- byPriority.setChecked(false);
- bySummary.setChecked(true);
- byDateCreated.setChecked(false);
- }
- };
- bySummary.setEnabled(true);
- bySummary.setText("Summary");
- new ActionContributionItem(bySummary).fill(dropDownMenu, -1);
-
- byDateCreated = new Action("", AS_CHECK_BOX) {
- @Override
- public void run() {
- taskListView.getSorter().setSortByIndex(SortByIndex.DATE_CREATED);
- byPriority.setChecked(false);
- bySummary.setChecked(false);
- byDateCreated.setChecked(true);
- }
- };
- byDateCreated.setEnabled(true);
- byDateCreated.setText("Date Created");
- byDateCreated.setImageDescriptor(CommonImages.CALENDAR_SMALL);
- new ActionContributionItem(byDateCreated).fill(dropDownMenu, -1);
-
- new Separator().fill(dropDownMenu, -1);
-
- Action reverse = new Action("", AS_CHECK_BOX) {
- @Override
- public void run() {
- taskListView.getSorter().setSortDirection(taskListView.getSorter().getSortDirection() * -1);
- setChecked(taskListView.getSorter().getSortDirection() < 0);
- }
- };
- reverse.setEnabled(true);
- reverse.setText("Descending");
- reverse.setChecked(taskListView.getSorter().getSortDirection() < 0);
- new ActionContributionItem(reverse).fill(dropDownMenu, -1);
-
- switch (taskListView.getSorter().getSortByIndex()) {
- case PRIORITY:
- byPriority.setChecked(true);
- break;
- case SUMMARY:
- bySummary.setChecked(true);
- break;
- case DATE_CREATED:
- byDateCreated.setChecked(true);
- break;
- }
- }
-
- @Override
- public void run() {
- this.setChecked(isChecked());
- }
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TableDecoratingLabelProvider.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TableDecoratingLabelProvider.java
deleted file mode 100644
index 2f5b941a7..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TableDecoratingLabelProvider.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.views;
-
-import org.eclipse.jface.viewers.DecoratingLabelProvider;
-import org.eclipse.jface.viewers.ILabelDecorator;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.mylyn.context.core.ContextCore;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITaskContainer;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * @author Mik Kersten
- */
-public class TableDecoratingLabelProvider extends DecoratingLabelProvider implements ITableLabelProvider {
-
- public TableDecoratingLabelProvider(ILabelProvider provider, ILabelDecorator decorator) {
- super(provider, decorator);
- }
-
- public Image getColumnImage(Object element, int columnIndex) {
- if (!(element instanceof ITaskContainer)) {
- return null;
- }
- if (columnIndex == 0) {
- if (element instanceof ITaskContainer && !(element instanceof ITask)) {
- return super.getImage(element);
- } else {
- if (element instanceof AbstractTask) {
- AbstractTask task = (AbstractTask) element;
- if (task.isActive()) {
- return CommonImages.getImage(TasksUiImages.CONTEXT_ACTIVE);
- } else {
- if (ContextCore.getContextManager().hasContext(task.getHandleIdentifier())) {
- return CommonImages.getImage(TasksUiImages.CONTEXT_INACTIVE);
- } else {
- return CommonImages.getImage(TasksUiImages.CONTEXT_INACTIVE_EMPTY);
- }
- }
- } else {
- return CommonImages.getImage(TasksUiImages.CONTEXT_INACTIVE_EMPTY);
- }
- }
- } else if (columnIndex == 1) {
- if (element instanceof ITaskContainer || element instanceof IRepositoryQuery) {
- return null;
- }
- return super.getImage(element);
- }
- return null;
- }
-
- public String getColumnText(Object element, int columnIndex) {
- return null;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskDetailLabelProvider.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskDetailLabelProvider.java
deleted file mode 100644
index e78d0ab9c..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskDetailLabelProvider.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.views;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * Displays task repository info from a {@link AbstractTask}
- *
- * @author Willian Mitsuda
- */
-public class TaskDetailLabelProvider extends LabelProvider implements ILabelProvider {
-
- @Override
- public Image getImage(Object element) {
- if (!(element instanceof ITask)) {
- return super.getImage(element);
- }
-
- AbstractRepositoryConnector connector = TasksUi.getRepositoryManager().getRepositoryConnector(
- ((ITask) element).getConnectorKind());
- ImageDescriptor overlay = TasksUiPlugin.getDefault().getOverlayIcon(connector.getConnectorKind());
- if (overlay != null) {
- return CommonImages.getImageWithOverlay(TasksUiImages.REPOSITORY, overlay, false, false);
- } else {
- return CommonImages.getImage(TasksUiImages.REPOSITORY);
- }
- }
-
- @Override
- public String getText(Object element) {
- if (!(element instanceof ITask)) {
- return super.getText(element);
- }
-
- ITask task = (ITask) element;
- TaskRepository repository = TasksUi.getRepositoryManager().getRepository(task.getConnectorKind(),
- task.getRepositoryUrl());
- return repository.getRepositoryLabel();
- }
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskInputDialog.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskInputDialog.java
deleted file mode 100644
index 64bab1a22..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskInputDialog.java
+++ /dev/null
@@ -1,290 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.views;
-
-import java.util.Date;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.provisional.commons.ui.AbstractRetrieveTitleFromUrlJob;
-import org.eclipse.mylyn.internal.provisional.commons.ui.DatePicker;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.ITasksUiPreferenceConstants;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.KeyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * @author Ken Sueda
- * @author Wesley Coelho (Extended to allow URL input)
- * @author Mik Kersten
- */
-public class TaskInputDialog extends Dialog {
-
- public static final String LABEL_SHELL = "New Task";
-
- private static final String LABEL_DESCRIPTION = "Description:";
-
- private String taskName = "";
-
- private String priority = "P3";
-
- private String taskURL = "http://";
-
- private Date reminderDate = null;
-
- Text taskNameTextWidget = null;
-
- private Text issueURLTextWidget = null;
-
- private Button getDescButton = null;
-
- public TaskInputDialog(Shell parentShell) {
- super(parentShell);
- }
-
- @Override
- protected Control createDialogArea(Composite parent) {
- Composite composite = (Composite) super.createDialogArea(parent);
- GridLayout gl = new GridLayout(5, false);
- composite.setLayout(gl);
- GridData data = new GridData(GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL | GridData.HORIZONTAL_ALIGN_FILL
- | GridData.VERTICAL_ALIGN_CENTER);
- data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH + 180);
- composite.setLayoutData(data);
-
- Label taskNameLabel = new Label(composite, SWT.WRAP);
- taskNameLabel.setText(LABEL_DESCRIPTION);
- taskNameLabel.setFont(parent.getFont());
-
- taskNameTextWidget = new Text(composite, SWT.SINGLE | SWT.BORDER);
- GridData taskNameGD = new GridData(GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL);
- taskNameGD.widthHint = 200;
- taskNameGD.horizontalSpan = 1;
- taskNameTextWidget.setLayoutData(taskNameGD);
-
- final Combo c = new Combo(composite, SWT.NO_BACKGROUND | SWT.MULTI | SWT.V_SCROLL | SWT.READ_ONLY
- | SWT.DROP_DOWN);
- c.setItems(TaskListView.PRIORITY_LEVELS);
- c.setText(priority);
- c.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- priority = c.getText();
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- widgetSelected(e);
- }
- });
-
-// Label spacer = new Label(composite, SWT.NONE);
-// GridData spacerGD = new GridData();
-// spacerGD.horizontalSpan = 1;
-//// spacerGD.widthHint = 5;
-// spacer.setLayoutData(spacerGD);
-//
-// Composite reminderComp = new Composite(composite, SWT.NONE);
-// GridLayout reminderCompGL = new GridLayout(3, false);
-// reminderCompGL.marginHeight = 0;
-// reminderCompGL.marginWidth = 0;
-// reminderComp.setLayout(reminderCompGL);
-// GridData reminderCompGD = new GridData();
-// reminderCompGD.horizontalSpan = 1;
-// reminderCompGD.horizontalAlignment = SWT.RIGHT;
-// reminderComp.setLayoutData(reminderCompGD);
-// Label reminderLabel = new Label(reminderComp, SWT.NONE);
- final DatePicker datePicker = new DatePicker(composite, SWT.BORDER, DatePicker.LABEL_CHOOSE, true,
- TasksUiPlugin.getDefault().getPreferenceStore().getInt(ITasksUiPreferenceConstants.PLANNING_ENDHOUR));
- datePicker.addPickerSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent arg0) {
- if (datePicker.getDate() != null) {
- reminderDate = datePicker.getDate().getTime();
- }
- }
-
- public void widgetDefaultSelected(SelectionEvent arg0) {
- // ignore
- }
- });
-
- Button removeReminder = new Button(composite, SWT.PUSH | SWT.CENTER);
- removeReminder.setText("Clear");
- removeReminder.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- datePicker.setDate(null);
- reminderDate = null;
- }
- });
-
-//
-// scheduledForDate.setLayout(new GridLayout());
-// GridData datePickerGD = new GridData();
-// datePickerGD.widthHint = 300;
-// scheduledForDate.setLayoutData(datePickerGD);
-
- Label urlLabel = new Label(composite, SWT.WRAP);
- urlLabel.setText("Web Link:");
- urlLabel.setFont(parent.getFont());
-
- issueURLTextWidget = new Text(composite, SWT.SINGLE | SWT.BORDER);
- issueURLTextWidget.setText(getDefaultIssueUrl());
- GridData urlData = new GridData(GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL);
- urlData.horizontalSpan = 3;
- urlData.grabExcessHorizontalSpace = true;
- issueURLTextWidget.setLayoutData(urlData);
-
- getDescButton = new Button(composite, SWT.PUSH);
- getDescButton.setText("Get Description");
- getDescButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
- setButtonStatus();
-
- issueURLTextWidget.addKeyListener(new KeyListener() {
- public void keyPressed(KeyEvent e) {
- setButtonStatus();
- }
-
- public void keyReleased(KeyEvent e) {
- setButtonStatus();
- }
- });
-
- getDescButton.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- retrieveTaskDescription(issueURLTextWidget.getText());
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- }
- });
-
- return composite;
- }
-
- /**
- * Sets the Get Description button enabled or not depending on whether there is a URL specified
- */
- protected void setButtonStatus() {
- String url = issueURLTextWidget.getText();
-
- if (url.length() > 10 && (url.startsWith("http://") || url.startsWith("https://"))) {
-// String defaultPrefix = ContextCore.getPreferenceStore().getString(
-// TaskListPreferenceConstants.DEFAULT_URL_PREFIX);
-// if (url.equals(defaultPrefix)) {
-// getDescButton.setEnabled(false);
-// } else {
- getDescButton.setEnabled(true);
-// }
- } else {
- getDescButton.setEnabled(false);
- }
- }
-
- /**
- * Returns the default URL text for the task by first checking the contents of the clipboard and then using the
- * default prefix preference if that fails
- */
- protected String getDefaultIssueUrl() {
-
- String clipboardText = getClipboardText();
- if ((clipboardText.startsWith("http://") || clipboardText.startsWith("https://") && clipboardText.length() > 10)) {
- return clipboardText;
- } else {
- return taskURL;
- }
-// String defaultPrefix = ContextCore.getPreferenceStore().getString(
-// TaskListPreferenceConstants.DEFAULT_URL_PREFIX);
-// if (!defaultPrefix.equals("")) {
-// return defaultPrefix;
-// }
- }
-
- /**
- * Attempts to set the task pageTitle to the title from the specified url
- */
- protected void retrieveTaskDescription(final String url) {
- try {
- AbstractRetrieveTitleFromUrlJob job = new AbstractRetrieveTitleFromUrlJob(issueURLTextWidget.getText()) {
- @Override
- protected void titleRetrieved(final String pageTitle) {
- taskNameTextWidget.setText(pageTitle);
- }
- };
- job.schedule();
- } catch (RuntimeException e) {
- // FIXME which exception is caught here?
- StatusHandler.fail(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Could not open task web page", e));
- }
- }
-
- /**
- * Returns the contents of the clipboard or "" if no text content was available
- */
- protected String getClipboardText() {
- Clipboard clipboard = new Clipboard(Display.getDefault());
- TextTransfer transfer = TextTransfer.getInstance();
- String contents = (String) clipboard.getContents(transfer);
- if (contents != null) {
- return contents;
- } else {
- return "";
- }
- }
-
- public String getSelectedPriority() {
- return priority;
- }
-
- public String getTaskname() {
- return taskName;
- }
-
- public Date getReminderDate() {
- return reminderDate;
- }
-
- public String getIssueURL() {
- return taskURL;
- }
-
- @Override
- protected void buttonPressed(int buttonId) {
- if (buttonId == IDialogConstants.OK_ID) {
- taskName = taskNameTextWidget.getText();
- taskURL = issueURLTextWidget.getText();
- } else {
- taskName = null;
- }
- super.buttonPressed(buttonId);
- }
-
- @Override
- protected void configureShell(Shell shell) {
- super.configureShell(shell);
- shell.setText(LABEL_SHELL);
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskKeyComparator.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskKeyComparator.java
deleted file mode 100644
index 51c400dc0..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskKeyComparator.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.ui.views;
-
-import java.util.Comparator;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- * @author Eugene Kuleshov (https://bugs.eclipse.org/bugs/show_bug.cgi?taskId=129511)
- */
-public class TaskKeyComparator implements Comparator<String[]> {
-
- private static final String MODULE_TASK_PATTERN = "(?:([A-Za-z]*[:_\\-]?)(\\d+))?";
-
- private static final Pattern ID_PATTERN = Pattern.compile(MODULE_TASK_PATTERN);
-
- public static final Pattern PATTERN = Pattern.compile(MODULE_TASK_PATTERN + "(.*)");
-
- public int compare2(String o1, String o2) {
- String[] a1 = split(o1);
- String[] a2 = split(o2);
- return compare(a1, a2);
- }
-
- public int compare(String a1[], String a2[]) {
- if (a1[0] == null && a1[1] == null) {
- a1 = split(a1[2]);
- } else if ((a1[0] == null || a1[0].length() == 0) && a1[1] != null && a1[1].length() > 0) {
- String b1[] = splitTask(a1[1]);
- a1[0] = b1[0];
- a1[1] = b1[1];
- }
-
- if (a2[0] == null && a2[1] == null) {
- a2 = split(a2[2]);
- } else if ((a2[0] == null || a2[0].length() == 0) && a2[1] != null && a2[1].length() > 0) {
- String b2[] = splitTask(a2[1]);
- a2[0] = b2[0];
- a2[1] = b2[1];
-
- }
- return compare(a1[0], a1[1], a1[2], a2[0], a2[1], a2[2]);
- }
-
- private static int compare(final String component1, final String key1, final String value1,
- final String component2, final String key2, final String value2) {
- if (component1 == null && component2 != null) {
- return -1;
- }
- if (component1 != null && component2 == null) {
- return 1;
- }
-
- if (component1 != null && component2 != null) {
- int n = component1.compareToIgnoreCase(component2);
- if (n != 0) {
- return n;
- }
-
- if (key1 == null && key2 != null) {
- return -1;
- }
- if (key1 != null && key2 == null) {
- return 1;
- }
-
- if (key1 != null && key2 != null) {
- if (key1.length() == key2.length() || key1.length() == 0 || key2.length() == 0) {
- n = key1.compareTo(key2);
- } else {
- n = Integer.valueOf(key1).compareTo(Integer.valueOf(key2));
- }
- if (n != 0) {
- return n;
- }
- }
- }
-
- return value1.compareToIgnoreCase(value2);
- }
-
- public String[] split(String s) {
- Matcher matcher = PATTERN.matcher(s);
-
- if (!matcher.find()) {
- return new String[] { null, null, s };
- }
-
- int n = matcher.groupCount();
- String[] res = new String[n];
- for (int i = 1; i < n + 1; i++) {
- res[i - 1] = matcher.group(i);
- }
- return res;
- }
-
- private static String[] splitTask(final String s) {
- Matcher matcher = ID_PATTERN.matcher(s);
-
- if (!matcher.find()) {
- return new String[] { null, s };
- }
-
- int n = matcher.groupCount();
- String[] res = new String[n];
- for (int i = 1; i < n + 1; i++) {
- res[i - 1] = matcher.group(i);
- }
- return res;
- }
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListCellModifier.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListCellModifier.java
deleted file mode 100644
index 1e6fac742..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListCellModifier.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.views;
-
-import java.util.Arrays;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.viewers.ICellModifier;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTaskCategory;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.actions.TaskActivateAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.TaskDeactivateAction;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.TreeItem;
-
-/**
- * @author Mik Kersten
- */
-class TaskListCellModifier implements ICellModifier {
-
- private final TaskListView taskListView;
-
- private boolean disableActivateForParentTasks = false;
-
- TaskListCellModifier(TaskListView taskListView) {
- this.taskListView = taskListView;
-
- if (SWT.getPlatform().equals("gtk")) {
- disableActivateForParentTasks = true;
- }
- }
-
- public boolean canModify(Object element, String property) {
- return taskListView.isInRenameAction;
- }
-
- public Object getValue(Object element, String property) {
- try {
- int columnIndex = Arrays.asList(this.taskListView.columnNames).indexOf(property);
- if (element instanceof IRepositoryElement) {
- final IRepositoryElement taskListElement = (IRepositoryElement) element;
- switch (columnIndex) {
- case 0:
- return taskListElement.getSummary();
- case 1:
- return "";
- case 2:
- return "";
- }
- }
- } catch (Exception e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, e.getMessage(), e));
- }
- return "";
- }
-
- public void modify(Object element, String property, Object value) {
- int columnIndex = -1;
- try {
- if (element instanceof TreeItem && ((TreeItem) element).isDisposed()) {
- return;
- }
- columnIndex = Arrays.asList(this.taskListView.columnNames).indexOf(property);
- Object data = ((TreeItem) element).getData();
- if (data instanceof AbstractTask) {
- AbstractTask task = (AbstractTask) data;
- switch (columnIndex) {
- case 0:
- if (task != null) {
- task.setSummary(((String) value).trim());
- TasksUiPlugin.getTaskList().notifyElementChanged(task);
- }
- break;
- case 1:
- break;
- case 2:
- toggleTaskActivation((TreeItem) element);
- break;
- }
- } else if (data instanceof AbstractTaskCategory || data instanceof IRepositoryQuery) {
- AbstractTaskContainer container = (AbstractTaskContainer) data;
- switch (columnIndex) {
- case 0:
- TasksUiPlugin.getTaskListManager()
- .getTaskList()
- .renameContainer(container, ((String) value).trim());
- case 1:
- break;
- case 2:
- break;
- }
- }
- } catch (Exception e) {
- StatusHandler.fail(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, e.getMessage(), e));
- }
- this.taskListView.refresh();//.getViewer().refresh();
- }
-
- public void toggleTaskActivation(TreeItem element) {
- AbstractTask task = null;
- if (element.getData() instanceof AbstractTask) {
- task = (AbstractTask) element.getData();
-
- if (disableActivateForParentTasks) {
- // check if activation column overlaps with tree expander control: element is on second hierarchy level and has children
- TreeItem parent = element.getParentItem();
- if (parent != null
- && (parent.getData() instanceof IRepositoryQuery || parent.getData() instanceof AbstractTaskCategory)
- && element.getItemCount() > 0) {
- return;
- }
- }
-
- if (task.isActive()) {
- new TaskDeactivateAction().run(task);
- } else {
- new TaskActivateAction().run(task);
- }
- }
- }
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListContentProvider.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListContentProvider.java
deleted file mode 100644
index 82d1aafbc..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListContentProvider.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.views;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTaskCategory;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.TaskCategory;
-import org.eclipse.mylyn.internal.tasks.ui.AbstractTaskListFilter;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITaskContainer;
-
-/**
- * Provides custom content for the task list, e.g. guaranteed visibility of some elements, ability to suppress
- * containers showing if nothing should show under them.
- *
- * TODO: move to viewer filter architecture?
- *
- * @author Mik Kersten
- * @author Rob Elves
- */
-public class TaskListContentProvider extends AbstractTaskListContentProvider {
-
- public TaskListContentProvider(TaskListView taskListView) {
- super(taskListView);
- }
-
- public void inputChanged(Viewer v, Object oldInput, Object newInput) {
- this.taskListView.expandToActiveTasks();
- }
-
- public void dispose() {
- }
-
- public Object[] getElements(Object parent) {
- if (parent.equals(this.taskListView.getViewSite())) {
- return applyFilter(TasksUiPlugin.getTaskList().getRootElements()).toArray();
- }
- return getChildren(parent);
- }
-
- /**
- * @return first parent found
- */
- public Object getParent(Object child) {
- // return first parent found, first search within categories then queries
- if (child instanceof ITask) {
- ITask task = (ITask) child;
- AbstractTaskCategory parent = TaskCategory.getParentTaskCategory(task);
- if (parent != null) {
- return parent;
- }
-
- Set<AbstractTaskContainer> parents = ((AbstractTask) task).getParentContainers();
- Iterator<AbstractTaskContainer> it = parents.iterator();
- if (it.hasNext()) {
- return parents.iterator().next();
- }
- }
- // no parent found
- return null;
- }
-
- public Object[] getChildren(Object parent) {
- return getFilteredChildrenFor(parent).toArray();
- }
-
- /**
- * NOTE: If parent is an ITask, this method checks if parent has unfiltered children (see bug 145194).
- */
- public boolean hasChildren(Object parent) {
- Object[] children = getChildren(parent);
- return children != null && children.length > 0;
-
-// if (parent instanceof AbstractRepositoryQuery) {
-// AbstractRepositoryQuery query = (AbstractRepositoryQuery) parent;
-// return !getFilteredChildrenFor(query).isEmpty();
-// //return !query.isEmpty();
-// } else if (parent instanceof AbstractTask) {
-// return taskHasUnfilteredChildren((AbstractTask) parent);
-// } else if (parent instanceof AbstractTaskContainer) {
-// AbstractTaskContainer container = (AbstractTaskContainer) parent;
-// return !getFilteredChildrenFor(container).isEmpty();
-// //return !container.getChildren().isEmpty();
-// }
-// return false;
- }
-
- protected List<AbstractTaskContainer> applyFilter(Set<AbstractTaskContainer> roots) {
- List<AbstractTaskContainer> filteredRoots = new ArrayList<AbstractTaskContainer>();
- for (AbstractTaskContainer element : roots) {
- // NOTE: tasks can no longer appear as root elements
- if (selectContainer(element)) {
- filteredRoots.add(element);
- }
- }
- return filteredRoots;
- }
-
- /**
- * See bug 109693
- */
- private boolean containsNoFilterText(String filterText) {
- return filterText == null || filterText.length() == 0;
- }
-
- private boolean selectContainer(ITaskContainer container) {
-// if (container instanceof ScheduledTaskContainer) {
-// ScheduledTaskContainer scheduleContainer = (ScheduledTaskContainer) container;
-// if (TasksUiPlugin.getTaskActivityManager().isWeekDay(scheduleContainer)
-// && (scheduleContainer.isPresent() || scheduleContainer.isFuture())) {
-// return true;
-// } else if (taskListView.isFocusedMode()) {
-// return false;
-// }
-// }
-
- if (filter(null, container)) {
- return false;
- }
- return true;
- }
-
- private List<IRepositoryElement> getFilteredChildrenFor(Object parent) {
- if (containsNoFilterText((this.taskListView.getFilteredTree().getFilterControl()).getText())) {
- List<IRepositoryElement> children = new ArrayList<IRepositoryElement>();
- if (parent instanceof ITask) {
- Collection<ITask> subTasks = ((AbstractTask) parent).getChildren();
- for (ITask task : subTasks) {
- if (!filter(parent, task)) {
- children.add(task);
- }
- }
- return children;
- } else if (parent instanceof ITaskContainer) {
- return getFilteredRootChildren((ITaskContainer) parent);
- }
- } else {
- List<IRepositoryElement> children = new ArrayList<IRepositoryElement>();
- if (parent instanceof ITaskContainer) {
- children.addAll(((ITaskContainer) parent).getChildren());
- return children;
- }
- }
- return Collections.emptyList();
- }
-
- /**
- * @return all children who aren't already revealed as a sub task
- */
- private List<IRepositoryElement> getFilteredRootChildren(ITaskContainer parent) {
- List<IRepositoryElement> result = new ArrayList<IRepositoryElement>();
- if (TasksUiPlugin.getDefault().groupSubtasks(parent)) {
- Collection<ITask> parentTasks = parent.getChildren();
- Set<IRepositoryElement> parents = new HashSet<IRepositoryElement>();
- Set<ITask> children = new HashSet<ITask>();
- // get all children
- for (ITask element : parentTasks) {
- if (element instanceof ITaskContainer) {
- for (ITask abstractTask : ((ITaskContainer) element).getChildren()) {
- children.add(abstractTask);
- }
- }
- }
- for (ITask task : parentTasks) {
- if (!filter(parent, task) && !children.contains(task)) {
- parents.add(task);
- }
- }
- result.addAll(parents);
- } else {
- for (IRepositoryElement element : parent.getChildren()) {
- if (!filter(parent, element)) {
- result.add(element);
- }
- }
- }
- return result;
- }
-
- protected boolean filter(Object parent, Object object) {
- for (AbstractTaskListFilter filter : this.taskListView.getFilters()) {
- if (!filter.select(parent, object)) {
- return true;
- }
- }
- return false;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListDropAdapter.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListDropAdapter.java
deleted file mode 100644
index 7c6bd794e..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListDropAdapter.java
+++ /dev/null
@@ -1,399 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.views;
-
-import java.io.File;
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-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.NullProgressMonitor;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerDropAdapter;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.provisional.commons.ui.AbstractRetrieveTitleFromUrlJob;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTaskCategory;
-import org.eclipse.mylyn.internal.tasks.core.LocalTask;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
-import org.eclipse.mylyn.internal.tasks.core.ScheduledTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.TaskCategory;
-import org.eclipse.mylyn.internal.tasks.core.UncategorizedTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.UnmatchedTaskContainer;
-import org.eclipse.mylyn.internal.tasks.ui.ITasksUiPreferenceConstants;
-import org.eclipse.mylyn.internal.tasks.ui.TaskListModifyOperation;
-import org.eclipse.mylyn.internal.tasks.ui.TaskTransfer;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.actions.QueryImportAction;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITaskContainer;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.swt.dnd.DND;
-import org.eclipse.swt.dnd.DropTargetEvent;
-import org.eclipse.swt.dnd.FileTransfer;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.dnd.TransferData;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.progress.IProgressService;
-
-/**
- * @author Mik Kersten
- * @author Rob Elves (added URL based task creation support)
- * @author Jevgeni Holodkov
- */
-// API 3.0 rename to TaskListDropTargetListener
-public class TaskListDropAdapter extends ViewerDropAdapter {
-
- private AbstractTask newTask = null;
-
- private TransferData currentTransfer;
-
- public TaskListDropAdapter(Viewer viewer) {
- super(viewer);
- setFeedbackEnabled(true);
- }
-
- @Override
- public void dragOver(DropTargetEvent event) {
- // support dragging from sources only supporting DROP_LINK
- if (event.detail == DND.DROP_NONE && (event.operations & DND.DROP_LINK) == DND.DROP_LINK) {
- event.detail = DND.DROP_LINK;
- }
- super.dragOver(event);
- }
-
- @Override
- public boolean performDrop(final Object data) {
- if (data == null) {
- return false;
- }
-
- TaskListModifyOperation modOperation = new TaskListModifyOperation() {
-
- @Override
- protected void operations(IProgressMonitor monitor) throws CoreException, InvocationTargetException,
- InterruptedException {
- Object currentTarget = getCurrentTarget();
- List<ITask> tasksToMove = new ArrayList<ITask>();
- if (isUrl(data) && createTaskFromUrl(data)) {
- tasksToMove.add(newTask);
- } else if (TaskTransfer.getInstance().isSupportedType(currentTransfer) && data instanceof ITask[]) {
- ITask[] tasks = (ITask[]) data;
- for (ITask task : tasks) {
- if (task != null) {
- tasksToMove.add(task);
- }
- }
- } else if (data instanceof String && createTaskFromString((String) data)) {
- tasksToMove.add(newTask);
- } else if (FileTransfer.getInstance().isSupportedType(currentTransfer)) {
- // transfer the context if the target is a Task
-// if (getCurrentTarget() instanceof ITask) {
-// final AbstractTask targetTask = (AbstractTask) getCurrentTarget();
-// final String[] names = (String[]) data;
-// PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
-//
-// public void run() {
-// boolean confirmed = MessageDialog.openConfirm(getViewer().getControl().getShell(),
-// "Task Import", "Overwrite the context of the target task with the source's?");
-// if (confirmed) {
-// String path = names[0];
-// File file = new File(path);
-// boolean succeeded = ContextCore.getContextStore().copyContext(file,
-// targetTask.getHandleIdentifier());
-// if (succeeded) {
-// new TaskActivateAction().run(targetTask);
-// }
-// }
-// }
-// });
-// } else {
- // otherwise it is queries or tasks
- final String[] names = (String[]) data;
- for (String path : names) {
- final File file = new File(path);
- final List<RepositoryQuery> queries = new ArrayList<RepositoryQuery>();
- final Set<TaskRepository> repositories = new HashSet<TaskRepository>();
- final List<AbstractTask> readTasks = TasksUiPlugin.getTaskListManager()
- .getTaskListWriter()
- .readTasks(file);
- if (file.isFile()) {
- List<RepositoryQuery> readQueries;
- try {
- readQueries = TasksUiPlugin.getTaskListManager().getTaskListWriter().readQueries(file);
- if (readQueries.size() > 0) {
- queries.addAll(readQueries);
- repositories.addAll(TasksUiPlugin.getTaskListManager()
- .getTaskListWriter()
- .readRepositories(file));
- } else {
- repositories.addAll(TasksUiPlugin.getTaskListManager()
- .getTaskListWriter()
- .readRepositories(file));
- }
- } catch (IOException e) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- MessageDialog.openError(null, "Query Import Error",
- "The specified file is not an exported query. Please, check that you have provided the correct file.");
- }
- });
- }
- }
-
- // FIXME: remove async exec
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- // TODO: we should consider batching this up
- if (queries.size() > 0) {
- new QueryImportAction().importQueries(queries, repositories,
- getViewer().getControl().getShell());
- } else {
- TasksUiInternal.importTasks(readTasks, repositories, file, getViewer().getControl()
- .getShell());
- }
- }
- });
- }
- }
-
- if (currentTarget instanceof LocalTask
- && areAllLocalTasks(tasksToMove)
- && getCurrentLocation() == LOCATION_ON
- && TasksUiPlugin.getDefault().getPreferenceStore().getBoolean(
- ITasksUiPreferenceConstants.LOCAL_SUB_TASKS_ENABLED)) {
- for (ITask task : tasksToMove) {
- if (!((AbstractTask) task).contains(((LocalTask) currentTarget).getHandleIdentifier())) {
- TasksUiInternal.getTaskList().addTask(task, (LocalTask) currentTarget);
- }
- }
- } else {
- for (ITask task : tasksToMove) {
- if (currentTarget instanceof UncategorizedTaskContainer) {
- TasksUiInternal.getTaskList().addTask(task, (UncategorizedTaskContainer) currentTarget);
- } else if (currentTarget instanceof TaskCategory) {
- TasksUiInternal.getTaskList().addTask(task, (TaskCategory) currentTarget);
- } else if (currentTarget instanceof UnmatchedTaskContainer) {
- if (((UnmatchedTaskContainer) currentTarget).getRepositoryUrl().equals(
- task.getRepositoryUrl())) {
- TasksUiInternal.getTaskList().addTask(task, (AbstractTaskCategory) currentTarget);
- }
- } else if (currentTarget instanceof ITask) {
- ITask targetTask = (ITask) currentTarget;
- AbstractTaskCategory targetCategory = null;
- // TODO: TaskCategory only used what about AbstractTaskCategory descendants?
- ITaskContainer container = TaskCategory.getParentTaskCategory(targetTask);
- if (container instanceof TaskCategory || container instanceof UncategorizedTaskContainer) {
- targetCategory = (AbstractTaskCategory) container;
- } else if (container instanceof UnmatchedTaskContainer) {
- if (((UnmatchedTaskContainer) container).getRepositoryUrl().equals(
- task.getRepositoryUrl())) {
- targetCategory = (AbstractTaskCategory) container;
- }
- }
- if (targetCategory != null) {
- TasksUiInternal.getTaskList().addTask(task, targetCategory);
- }
- } else if (currentTarget instanceof ScheduledTaskContainer) {
- ScheduledTaskContainer container = (ScheduledTaskContainer) currentTarget;
- TasksUiPlugin.getTaskActivityManager().setScheduledFor((AbstractTask) task,
- container.getDateRange());
- } else if (currentTarget == null) {
- TasksUiInternal.getTaskList().addTask(newTask,
- TasksUiPlugin.getTaskList().getDefaultCategory());
- }
- }
- }
-
- // Make new task the current selection in the view
- if (newTask != null) {
- StructuredSelection ss = new StructuredSelection(newTask);
- getViewer().setSelection(ss);
- //getViewer().refresh();
- }
-
- }
- };
-
- IProgressService service = PlatformUI.getWorkbench().getProgressService();
- try {
- service.run(true, true, modOperation);
- } catch (InterruptedException e) {
- // ignore
- } catch (InvocationTargetException e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Drop failed", e.getCause()));
- }
-
- return true;
-
- }
-
- private boolean areAllLocalTasks(List<ITask> tasksToMove) {
- for (ITask task : tasksToMove) {
- if (!(task instanceof LocalTask)) {
- return false;
- }
- }
- return true;
- }
-
- /**
- * @return true if string is a http(s) url
- */
- public boolean isUrl(Object data) {
- String uri = "";
- if (data instanceof String) {
- uri = (String) data;
- if ((uri.startsWith("http://") || uri.startsWith("https://"))) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * @param data
- * string containing url and title separated by <quote>\n</quote>
- * @return true if task succesfully created, false otherwise
- */
- public boolean createTaskFromUrl(Object data) {
- if (!(data instanceof String)) {
- return false;
- }
-
- String[] urlTransfer = ((String) data).split("\n");
-
- String url = "";
- String urlTitle = "<retrieving from URL>";
-
- if (urlTransfer.length > 0) {
- url = urlTransfer[0];
- } else {
- return false;
- }
-
- AbstractRepositoryConnector connector = TasksUiPlugin.getRepositoryManager().getConnectorForRepositoryTaskUrl(
- url);
- if (connector != null) {
- String repositoryUrl = connector.getRepositoryUrlFromTaskUrl(url);
- String id = connector.getTaskIdFromTaskUrl(url);
- if (repositoryUrl == null || id == null) {
- return false;
- }
- for (TaskRepository repository : TasksUi.getRepositoryManager().getRepositories(
- connector.getConnectorKind())) {
- if (repository.getRepositoryUrl().equals(repositoryUrl)) {
- try {
- newTask = (AbstractTask) TasksUiInternal.createTask(repository, id, new NullProgressMonitor());
- TasksUiInternal.refreshAndOpenTaskListElement(newTask);
- return true;
- } catch (CoreException e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Could not create task", e));
- return false;
- }
- }
- }
- return false;
- } else {
- // Removed in order to default to retrieving title from url rather
- // than
- // accepting what was sent by the brower's DnD code. (see bug
- // 114401)
- // If a Title is provided, use it.
- // if (urlTransfer.length > 1) {
- // urlTitle = urlTransfer[1];
- // }
- // if (urlTransfer.length < 2) { // no title provided
- // retrieveTaskDescription(url);
- // }
- retrieveTaskDescription(url);
-
- newTask = TasksUiInternal.createNewLocalTask(urlTitle);
- if (newTask == null) {
- return false;
- }
- newTask.setUrl(url);
- TasksUiUtil.openTask(newTask);
- return true;
- }
- }
-
- public boolean createTaskFromString(String title) {
- //newTask = new Task(TasksUiPlugin.getTaskListManager().genUniqueTaskHandle(), title);
- newTask = TasksUiInternal.createNewLocalTask(title);
-
- if (newTask == null) {
- return false;
- } else {
- //newTask.setPriority(Task.PriorityLevel.P3.toString());
- TasksUiUtil.openTask(newTask);
- return true;
- }
- }
-
- @Override
- public boolean validateDrop(Object targetObject, int operation, TransferData transferType) {
- currentTransfer = transferType;
-
- if (FileTransfer.getInstance().isSupportedType(currentTransfer)) {
- // handle all files
- return true;
- } else if (TaskTransfer.getInstance().isSupportedType(currentTransfer)) {
- if (getCurrentTarget() instanceof UncategorizedTaskContainer || getCurrentTarget() instanceof TaskCategory
- || getCurrentTarget() instanceof UnmatchedTaskContainer
- || getCurrentTarget() instanceof ScheduledTaskContainer) {
- return true;
- } else if (getCurrentTarget() instanceof ITaskContainer
- && (getCurrentLocation() == ViewerDropAdapter.LOCATION_AFTER || getCurrentLocation() == ViewerDropAdapter.LOCATION_BEFORE)) {
- return true;
- } else if (getCurrentTarget() instanceof LocalTask
- && getCurrentLocation() == ViewerDropAdapter.LOCATION_ON
- && TasksUiPlugin.getDefault().getPreferenceStore().getBoolean(
- ITasksUiPreferenceConstants.LOCAL_SUB_TASKS_ENABLED)) {
- return true;
- } else {
- return false;
- }
- }
-
- return TextTransfer.getInstance().isSupportedType(transferType);
- }
-
- /**
- * Attempts to set the task pageTitle to the title from the specified url
- */
- protected void retrieveTaskDescription(final String url) {
- try {
- AbstractRetrieveTitleFromUrlJob job = new AbstractRetrieveTitleFromUrlJob(url) {
- @Override
- protected void titleRetrieved(final String pageTitle) {
- newTask.setSummary(pageTitle);
- TasksUiInternal.getTaskList().notifyElementChanged(newTask);
- }
- };
- job.schedule();
- } catch (RuntimeException e) {
- // FIXME what exception is caught here?
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Could not open task web page", e));
- }
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListFilteredTree.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListFilteredTree.java
deleted file mode 100644
index 94c91da85..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListFilteredTree.java
+++ /dev/null
@@ -1,571 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.ui.views;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.layout.TreeColumnLayout;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.mylyn.internal.provisional.commons.ui.AbstractFilteredTree;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonColors;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.ITaskListChangeListener;
-import org.eclipse.mylyn.internal.tasks.core.TaskContainerDelta;
-import org.eclipse.mylyn.internal.tasks.ui.IDynamicSubMenuContributor;
-import org.eclipse.mylyn.internal.tasks.ui.TaskHistoryDropDown;
-import org.eclipse.mylyn.internal.tasks.ui.TaskListHyperlink;
-import org.eclipse.mylyn.internal.tasks.ui.TaskSearchPage;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.actions.ActivateTaskDialogAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.CopyTaskDetailsAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.OpenTaskListElementAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.TaskActivateAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.TaskDeactivateAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.TaskWorkingSetAction;
-import org.eclipse.mylyn.internal.tasks.ui.editors.TaskListChangeAdapter;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-import org.eclipse.mylyn.tasks.core.TaskActivityAdapter;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.search.internal.ui.SearchDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.MenuDetectEvent;
-import org.eclipse.swt.events.MenuDetectListener;
-import org.eclipse.swt.events.MouseAdapter;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.MouseTrackListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.ui.IWorkingSet;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.PatternFilter;
-import org.eclipse.ui.forms.events.HyperlinkEvent;
-import org.eclipse.ui.forms.events.IHyperlinkListener;
-import org.eclipse.ui.forms.widgets.ImageHyperlink;
-import org.eclipse.ui.internal.ObjectActionContributorManager;
-
-/**
- * @author Mik Kersten
- * @author Leo Dos Santos - Task Working Set UI
- */
-public class TaskListFilteredTree extends AbstractFilteredTree {
-
- private static final String LABEL_ACTIVE_NONE = "Activate... ";
-
- private static final String LABEL_SETS_EDIT = "Edit Task Working Sets...";
-
- private static final String LABEL_SETS_MULTIPLE = "<multiple>";
-
- public static final String LABEL_SEARCH = "Search repository for key or summary...";
-
- private TaskListHyperlink workingSetLink;
-
- private TaskListHyperlink activeTaskLink;
-
- private WorkweekProgressBar taskProgressBar;
-
- private int totalTasks;
-
- private int completeTime;
-
- private int completeTasks;
-
- private int incompleteTime;
-
- private IWorkingSet currentWorkingSet;
-
- private MenuManager activeTaskMenuManager = null;
-
- private Menu activeTaskMenu = null;
-
- private final CopyTaskDetailsAction copyTaskDetailsAction = new CopyTaskDetailsAction();
-
- private TaskListToolTip taskListToolTip;
-
- private ITaskListChangeListener changeListener;
-
- public TaskListFilteredTree(Composite parent, int treeStyle, PatternFilter filter) {
- super(parent, treeStyle, filter);
- hookContextMenu();
- }
-
- @Override
- public void dispose() {
- if (changeListener != null) {
- TasksUiInternal.getTaskList().removeChangeListener(changeListener);
- }
- super.dispose();
- taskListToolTip.dispose();
- }
-
- private void hookContextMenu() {
- activeTaskMenuManager = new MenuManager("#PopupMenu");
- activeTaskMenuManager.setRemoveAllWhenShown(true);
- activeTaskMenuManager.addMenuListener(new IMenuListener() {
- public void menuAboutToShow(IMenuManager manager) {
- fillContextMenu(manager, TasksUi.getTaskActivityManager().getActiveTask());
- }
- });
- }
-
- @Override
- protected TreeViewer doCreateTreeViewer(Composite parent, int style) {
- // Use a single Composite for the Tree to being able to use the
- // TreeColumnLayout. See Bug 177891 for more details.
- Composite container = new Composite(parent, SWT.None);
- GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
- gridData.verticalIndent = 0;
- gridData.horizontalIndent = 0;
- container.setLayoutData(gridData);
- container.setLayout(new TreeColumnLayout());
- return super.doCreateTreeViewer(container, style);
- }
-
- @Override
- protected Composite createProgressComposite(Composite container) {
- Composite progressComposite = new Composite(container, SWT.NONE);
- GridLayout progressLayout = new GridLayout(1, false);
- progressLayout.marginWidth = 4;
- progressLayout.marginHeight = 0;
- progressLayout.marginBottom = 0;
- progressLayout.horizontalSpacing = 0;
- progressLayout.verticalSpacing = 0;
- progressComposite.setLayout(progressLayout);
- progressComposite.setLayoutData(new GridData(SWT.FILL, SWT.DEFAULT, true, false, 4, 1));
-
- taskProgressBar = new WorkweekProgressBar(progressComposite);
- taskProgressBar.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- updateTaskProgressBar();
-
- TasksUiInternal.getTaskList().addChangeListener(new TaskListChangeAdapter() {
-
- @Override
- public void containersChanged(Set<TaskContainerDelta> containers) {
- for (TaskContainerDelta taskContainerDelta : containers) {
- if (taskContainerDelta.getElement() instanceof ITask) {
- updateTaskProgressBar();
- break;
- }
- }
- }
- });
-
- TasksUiPlugin.getTaskActivityManager().addActivityListener(new TaskActivityAdapter() {
-
- @Override
- public void activityReset() {
- updateTaskProgressBar();
- }
-
- });
-
- return progressComposite;
- }
-
- @Override
- protected Composite createSearchComposite(Composite container) {
- Composite searchComposite = new Composite(container, SWT.NONE);
- GridLayout searchLayout = new GridLayout(1, false);
- searchLayout.marginWidth = 8;
- searchLayout.marginHeight = 0;
- searchLayout.marginBottom = 0;
- searchLayout.horizontalSpacing = 0;
- searchLayout.verticalSpacing = 0;
- searchComposite.setLayout(searchLayout);
- searchComposite.setLayoutData(new GridData(SWT.FILL, SWT.DEFAULT, true, false, 4, 1));
-
- final TaskListHyperlink searchLink = new TaskListHyperlink(searchComposite, SWT.LEFT);
- searchLink.setText(LABEL_SEARCH);
- searchLink.setForeground(CommonColors.HYPERLINK_WIDGET);
-
- searchLink.addHyperlinkListener(new IHyperlinkListener() {
-
- public void linkActivated(org.eclipse.ui.forms.events.HyperlinkEvent e) {
- new SearchDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow(), TaskSearchPage.ID).open();
- }
-
- public void linkEntered(org.eclipse.ui.forms.events.HyperlinkEvent e) {
- searchLink.setUnderlined(true);
- }
-
- public void linkExited(org.eclipse.ui.forms.events.HyperlinkEvent e) {
- searchLink.setUnderlined(false);
- }
- });
-
- return searchComposite;
- }
-
- private void updateTaskProgressBar() {
- if (taskProgressBar.isDisposed()) {
- return;
- }
-
- Set<ITask> tasksThisWeek = TasksUiPlugin.getTaskActivityManager().getScheduledForThisWeek();
-
- totalTasks = tasksThisWeek.size();
- completeTime = 0;
- completeTasks = 0;
- incompleteTime = 0;
- for (ITask task : tasksThisWeek) {
- if (task instanceof AbstractTask) {
- AbstractTask abstractTask = (AbstractTask) task;
- if (task.isCompleted()) {
- completeTasks++;
- if (abstractTask.getEstimatedTimeHours() > 0) {
- completeTime += abstractTask.getEstimatedTimeHours();
- } else {
- completeTime++;
- }
- } else {
- if (abstractTask.getEstimatedTimeHours() > 0) {
- incompleteTime += abstractTask.getEstimatedTimeHours();
- } else {
- incompleteTime++;
- }
- }
- }
- }
-
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- if (PlatformUI.isWorkbenchRunning() && !taskProgressBar.isDisposed()) {
- taskProgressBar.reset(completeTime, (completeTime + incompleteTime));
-
- taskProgressBar.setToolTipText("Workweek Progress" + "\n Estimated hours: " + completeTime
- + " of " + (completeTime + incompleteTime) + " estimated" + "\n Scheduled tasks: "
- + completeTasks + " of " + totalTasks + " scheduled");
- }
- }
- });
- }
-
- @Override
- protected Composite createActiveWorkingSetComposite(Composite container) {
- final ImageHyperlink workingSetButton = new ImageHyperlink(container, SWT.FLAT);
- workingSetButton.setImage(CommonImages.getImage(CommonImages.TOOLBAR_ARROW_RIGHT));
- workingSetButton.setToolTipText("Select Working Set");
-
- workingSetLink = new TaskListHyperlink(container, SWT.LEFT);
- workingSetLink.setText(TaskWorkingSetAction.LABEL_SETS_NONE);
- workingSetLink.setUnderlined(false);
- workingSetLink.setForeground(CommonColors.HYPERLINK_WIDGET);
-
- final TaskWorkingSetAction workingSetAction = new TaskWorkingSetAction();
- workingSetButton.addHyperlinkListener(new IHyperlinkListener() {
-
- public void linkActivated(org.eclipse.ui.forms.events.HyperlinkEvent e) {
- workingSetAction.getMenu(workingSetButton).setVisible(true);
- }
-
- public void linkEntered(org.eclipse.ui.forms.events.HyperlinkEvent e) {
- workingSetButton.setImage(CommonImages.getImage(CommonImages.TOOLBAR_ARROW_DOWN));
- }
-
- public void linkExited(org.eclipse.ui.forms.events.HyperlinkEvent e) {
- workingSetButton.setImage(CommonImages.getImage(CommonImages.TOOLBAR_ARROW_RIGHT));
- }
- });
-
- workingSetLink.addMouseTrackListener(new MouseTrackListener() {
-
- public void mouseEnter(MouseEvent e) {
- workingSetLink.setUnderlined(true);
- }
-
- public void mouseExit(MouseEvent e) {
- workingSetLink.setUnderlined(false);
- }
-
- public void mouseHover(MouseEvent e) {
- }
- });
-
- indicateActiveTaskWorkingSet();
-
- workingSetLink.addMouseListener(new MouseAdapter() {
- @Override
- public void mouseDown(MouseEvent e) {
- if (currentWorkingSet != null) {
- workingSetAction.run(currentWorkingSet);
- } else {
- workingSetAction.run();
- }
- }
- });
-
- return workingSetLink;
- }
-
- @Override
- protected Composite createActiveTaskComposite(final Composite container) {
- final ImageHyperlink activeTaskButton = new ImageHyperlink(container, SWT.LEFT);// SWT.ARROW | SWT.RIGHT);
- activeTaskButton.setImage(CommonImages.getImage(CommonImages.TOOLBAR_ARROW_RIGHT));
- activeTaskButton.setToolTipText("Select Active Task");
-
- activeTaskLink = new TaskListHyperlink(container, SWT.LEFT);
-
- changeListener = new TaskListChangeAdapter() {
- @Override
- public void containersChanged(Set<TaskContainerDelta> containers) {
- for (TaskContainerDelta taskContainerDelta : containers) {
- if (taskContainerDelta.getElement() instanceof ITask) {
- final AbstractTask changedTask = (AbstractTask) (taskContainerDelta.getElement());
- if (Platform.isRunning() && PlatformUI.getWorkbench() != null && Display.getCurrent() == null) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
-
- public void run() {
- if (changedTask.isActive()) {
- indicateActiveTask(changedTask);
- }
- }
- });
- } else if (Display.getCurrent() != null) {
- if (changedTask.isActive()) {
- indicateActiveTask(changedTask);
- }
- }
- }
- }
- }
- };
- TasksUiInternal.getTaskList().addChangeListener(changeListener);
-
- activeTaskLink.setText(LABEL_ACTIVE_NONE);
- activeTaskLink.setForeground(CommonColors.HYPERLINK_WIDGET);
- // avoid having the Hyperlink class show a native tooltip when it shortens the text which would overlap with the task list tooltip
- activeTaskLink.setToolTipText("");
-
- taskListToolTip = new TaskListToolTip(activeTaskLink);
-
- ITask activeTask = TasksUi.getTaskActivityManager().getActiveTask();
- if (activeTask != null) {
- indicateActiveTask(activeTask);
- }
-
- activeTaskButton.addHyperlinkListener(new IHyperlinkListener() {
-
- private Menu dropDownMenu;
-
- public void linkActivated(HyperlinkEvent event) {
- if (dropDownMenu != null) {
- dropDownMenu.dispose();
- }
- TaskHistoryDropDown taskHistory = new TaskHistoryDropDown();
- taskHistory.setScopedToWorkingSet(true);
- dropDownMenu = new Menu(activeTaskButton);
- taskHistory.fill(dropDownMenu, 0);
- dropDownMenu.setVisible(true);
- }
-
- public void linkEntered(HyperlinkEvent event) {
- activeTaskButton.setImage(CommonImages.getImage(CommonImages.TOOLBAR_ARROW_DOWN));
- }
-
- public void linkExited(HyperlinkEvent event) {
- activeTaskButton.setImage(CommonImages.getImage(CommonImages.TOOLBAR_ARROW_RIGHT));
- }
- });
-
- activeTaskLink.addMenuDetectListener(new MenuDetectListener() {
- public void menuDetected(MenuDetectEvent e) {
- if (activeTaskMenu != null) {
- activeTaskMenu.dispose();
- }
- activeTaskMenu = activeTaskMenuManager.createContextMenu(container);
- activeTaskMenu.setVisible(true);
- }
- });
-
- activeTaskLink.addMouseListener(new MouseAdapter() {
-
- @Override
- public void mouseDown(MouseEvent e) {
- if (e.button == 1) {
- ITask activeTask = (TasksUi.getTaskActivityManager().getActiveTask());
- if (activeTask == null) {
- ActivateTaskDialogAction activateAction = new ActivateTaskDialogAction();
- activateAction.init(PlatformUI.getWorkbench().getActiveWorkbenchWindow());
- activateAction.run(null);
- } else {
-// if (TaskListFilteredTree.super.filterText.getText().length() > 0) {
-// TaskListFilteredTree.super.filterText.setText("");
-// TaskListFilteredTree.this.textChanged();
-// }
-// if (TaskListView.getFromActivePerspective().getDrilledIntoCategory() != null) {
-// TaskListView.getFromActivePerspective().goUpToRoot();
-// }
- TasksUiInternal.refreshAndOpenTaskListElement(activeTask);
- }
- }
- }
- });
-
- return activeTaskLink;
- }
-
- @Override
- protected void textChanged() {
- super.textChanged();
- if (getFilterString() != null && !getFilterString().trim().equals("")) {
- setShowSearch(true);
- } else {
- setShowSearch(false);
- }
- }
-
- public void indicateActiveTaskWorkingSet() {
- Set<IWorkingSet> activeSets = TaskListView.getActiveWorkingSets();
-
- if (filterComposite.isDisposed() || activeSets == null) {
- return;
- }
-
- if (activeSets.size() == 0) {
- workingSetLink.setText(TaskWorkingSetAction.LABEL_SETS_NONE);
- workingSetLink.setToolTipText(LABEL_SETS_EDIT);
- currentWorkingSet = null;
- } else if (activeSets.size() > 1) {
- workingSetLink.setText(LABEL_SETS_MULTIPLE);
- workingSetLink.setToolTipText(LABEL_SETS_EDIT);
- currentWorkingSet = null;
- } else {
- Object[] array = activeSets.toArray();
- IWorkingSet workingSet = (IWorkingSet) array[0];
- workingSetLink.setText(workingSet.getLabel());
- workingSetLink.setToolTipText(LABEL_SETS_EDIT);
- currentWorkingSet = workingSet;
- }
- filterComposite.layout();
- }
-
- public void indicateActiveTask(ITask task) {
- if (Display.getCurrent() != null) {
-
- if (filterComposite.isDisposed()) {
- return;
- }
-
- activeTaskLink.setTask(task);
-
- filterComposite.layout();
- }
- }
-
- public String getActiveTaskLabelText() {
- return activeTaskLink.getText();
- }
-
- public void indicateNoActiveTask() {
- if (filterComposite.isDisposed()) {
- return;
- }
-
- activeTaskLink.setTask(null);
- activeTaskLink.setText(LABEL_ACTIVE_NONE);
- activeTaskLink.setToolTipText("");
-
- filterComposite.layout();
- }
-
- @Override
- public void setFilterText(String string) {
- if (filterText != null) {
- filterText.setText(string);
- selectAll();
- }
- }
-
- private void fillContextMenu(IMenuManager manager, final ITask activeTask) {
- if (activeTask != null) {
- IStructuredSelection selection = new StructuredSelection(activeTask);
- copyTaskDetailsAction.selectionChanged(selection);
-
- manager.add(new OpenTaskListElementAction(null) {
- @Override
- public void run() {
- TasksUiInternal.refreshAndOpenTaskListElement(activeTask);
- }
- });
-
- if (activeTask.isActive()) {
- manager.add(new TaskDeactivateAction() {
- @Override
- public void run() {
- super.run(activeTask);
- }
- });
- } else {
- manager.add(new TaskActivateAction() {
- @Override
- public void run() {
-// TasksUiPlugin.getTaskListManager().getTaskActivationHistory().addTask(activeTask);
- super.run(activeTask);
- }
- });
- }
-
- manager.add(new Separator());
-
- for (String menuPath : TasksUiPlugin.getDefault().getDynamicMenuMap().keySet()) {
- for (IDynamicSubMenuContributor contributor : TasksUiPlugin.getDefault().getDynamicMenuMap().get(
- menuPath)) {
- if (TaskListView.ID_SEPARATOR_TASKS.equals(menuPath)) {
- List<IRepositoryElement> selectedElements = new ArrayList<IRepositoryElement>();
- selectedElements.add(activeTask);
- MenuManager subMenuManager = contributor.getSubMenuManager(selectedElements);
- if (subMenuManager != null) {
- manager.add(subMenuManager);
- }
- }
- }
- }
-
- manager.add(new Separator());
- manager.add(copyTaskDetailsAction);
- manager.add(new Separator());
-
- ObjectActionContributorManager.getManager().contributeObjectActions(null, manager,
- new ISelectionProvider() {
-
- public void addSelectionChangedListener(ISelectionChangedListener listener) {
- // ignore
- }
-
- public ISelection getSelection() {
- return new StructuredSelection(activeTask);
- }
-
- public void removeSelectionChangedListener(ISelectionChangedListener listener) {
- // ignore
- }
-
- public void setSelection(ISelection selection) {
- // ignore
- }
- });
- }
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListInterestFilter.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListInterestFilter.java
deleted file mode 100644
index 597fc6cee..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListInterestFilter.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.views;
-
-import java.util.Collection;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
-import org.eclipse.mylyn.internal.tasks.core.LocalRepositoryConnector;
-import org.eclipse.mylyn.internal.tasks.core.ScheduledTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.TaskActivityUtil;
-import org.eclipse.mylyn.internal.tasks.ui.AbstractTaskListFilter;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITaskContainer;
-
-/**
- * Goal is to have this reuse as much of the super as possible.
- *
- * @author Mik Kersten
- * @author Rob Elves
- */
-public class TaskListInterestFilter extends AbstractTaskListFilter {
-
- @Override
- public boolean select(Object parent, Object child) {
- try {
- if (child instanceof ScheduledTaskContainer) {
- ScheduledTaskContainer dateRangeTaskContainer = (ScheduledTaskContainer) child;
- return isDateRangeInteresting(dateRangeTaskContainer);
- }
- if (child instanceof ITask) {
- AbstractTask task = null;
- if (child instanceof ITask) {
- task = (AbstractTask) child;
- }
- if (task != null) {
- if (isInteresting(parent, task)) {
- return true;
- } else {
- return false;
- }
- }
- } else if (child instanceof ITaskContainer) {
- Collection<ITask> children = ((ITaskContainer) child).getChildren();
- // Always display empty containers
- if (children.size() == 0) {
- return false;
- }
-
- for (ITask task : children) {
- if (shouldAlwaysShow(child, (AbstractTask) task, ITasksCoreConstants.MAX_SUBTASK_DEPTH)) {
- return true;
- }
- }
-
- }
- } catch (Throwable t) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Interest filter failed", t));
- }
- return false;
- }
-
- private boolean isDateRangeInteresting(ScheduledTaskContainer scheduleContainer) {
- if (scheduleContainer instanceof TaskScheduleContentProvider.Unscheduled) {
- return true;
- }
- if (TaskActivityUtil.getCurrentWeek().isCurrentWeekDay(scheduleContainer.getDateRange())) {
- if (scheduleContainer.isPresent() || scheduleContainer.isFuture()) {
- return true;
- }
- } else if (scheduleContainer.isPresent() /*&& scheduleContainer.isCaptureFloating()*/) {
- return true;
- }
- return false;
- }
-
- // TODO: make meta-context more explicit
- protected boolean isInteresting(Object parent, AbstractTask task) {
- return shouldAlwaysShow(parent, task, ITasksCoreConstants.MAX_SUBTASK_DEPTH);
- }
-
- public boolean shouldAlwaysShow(Object parent, AbstractTask task, int depth) {
-
- return task.isActive()
- || TasksUiPlugin.getTaskActivityManager().isCompletedToday(task)
- || hasChanges(parent, task)
- || !task.isCompleted()
- && (LocalRepositoryConnector.DEFAULT_SUMMARY.equals(task.getSummary())
- || shouldShowInFocusedWorkweekDateContainer(parent, task)
- || TasksUiPlugin.getTaskActivityManager().isOverdue(task)
- || isInterestingForThisWeek(parent, task) || hasInterestingSubTasks(parent, task, depth));
- }
-
- private boolean hasInterestingSubTasks(Object parent, AbstractTask task, int depth) {
- if (depth > 0) {
- if (!TasksUiPlugin.getDefault().groupSubtasks(task)) {
- return false;
- }
- if (task.getChildren() != null && task.getChildren().size() > 0) {
- for (ITask subTask : task.getChildren()) {
- if (shouldAlwaysShow(parent, (AbstractTask) subTask, depth - 1)) {
- return true;
- }
- }
- }
- }
- return false;
- }
-
- private static boolean shouldShowInFocusedWorkweekDateContainer(Object parent, ITask task) {
- if (parent instanceof ScheduledTaskContainer) {
- ScheduledTaskContainer container = (ScheduledTaskContainer) parent;
- if (container.isWeekDay() || container.isPresent()) {
- return true;
- }
-// if (!TasksUiPlugin.getTaskActivityManager().isWeekDay((ScheduledTaskContainer) parent)) {
-// return false;
-// }
- if (TasksUiPlugin.getTaskActivityManager().isOverdue(task) || ((AbstractTask) task).isPastReminder()) {
- return true;
- }
-
- }
-
- return false;
- }
-
- public static boolean isInterestingForThisWeek(Object parent, AbstractTask task) {
- if (parent instanceof ScheduledTaskContainer) {
- return shouldShowInFocusedWorkweekDateContainer(parent, task);
- } else {
- return task.isPastReminder() || TasksUiPlugin.getTaskActivityManager().isScheduledForThisWeek(task)
- || TasksUiPlugin.getTaskActivityManager().isDueThisWeek(task)
- || TasksUiPlugin.getTaskActivityManager().isScheduledForToday(task);
- }
- }
-
- public static boolean hasChanges(Object parent, ITask task) {
- if (parent instanceof ScheduledTaskContainer && !(parent instanceof TaskScheduleContentProvider.Unscheduled)) {
- if (!shouldShowInFocusedWorkweekDateContainer(parent, task)) {
- return false;
- }
- }
- return hasChangesHelper(parent, task);
- }
-
- private static boolean hasChangesHelper(Object parent, ITask task) {
- if (task.getSynchronizationState().isOutgoing()) {
- return true;
- } else if (task.getSynchronizationState().isIncoming()) {
- return true;
- }
- if (task instanceof ITaskContainer) {
- for (ITask child : ((ITaskContainer) task).getChildren()) {
- if (hasChangesHelper(parent, child)) {
- return true;
- }
- }
- }
- return false;
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListInterestSorter.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListInterestSorter.java
deleted file mode 100644
index 1e7ef091c..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListInterestSorter.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.views;
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.ScheduledTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.UncategorizedTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.UnmatchedTaskContainer;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITaskContainer;
-
-/**
- * @author Mik Kersten
- */
-public class TaskListInterestSorter extends ViewerSorter {
-
- private final TaskKeyComparator taskKeyComparator = new TaskKeyComparator();
-
- @Override
- public int compare(Viewer compareViewer, Object o1, Object o2) {
-
- if (o1 instanceof ITaskContainer && o2 instanceof UnmatchedTaskContainer) {
- return -1;
- } else if (o2 instanceof ITaskContainer && o1 instanceof UnmatchedTaskContainer) {
- return 1;
- }
-//
-// if (o1 instanceof ScheduledTaskContainer && o2 instanceof ScheduledTaskContainer) {
-// ScheduledTaskContainer dateRangeTaskContainer1 = (ScheduledTaskContainer) o1;
-// ScheduledTaskContainer dateRangeTaskContainer2 = (ScheduledTaskContainer) o2;
-// if (dateRangeTaskContainer1.getDateRange().compareTo(dateRangeTaskContainer2.getDateRange())getisCaptureFloating() && !dateRangeTaskContainer2.isCaptureFloating()) {
-// return 1;
-// } else if (!dateRangeTaskContainer1.isCaptureFloating() && dateRangeTaskContainer2.isCaptureFloating()) {
-// return -1;
-// }
-// return -1 * dateRangeTaskContainer2.getStart().compareTo(dateRangeTaskContainer1.getStart());
- if (o1 instanceof ScheduledTaskContainer && o2 instanceof ScheduledTaskContainer) {
- ScheduledTaskContainer dateRangeTaskContainer1 = (ScheduledTaskContainer) o1;
- ScheduledTaskContainer dateRangeTaskContainer2 = (ScheduledTaskContainer) o2;
- return dateRangeTaskContainer1.getDateRange().compareTo(dateRangeTaskContainer2.getDateRange());
-// if (dateRangeTaskContainer1.isCaptureFloating() && !dateRangeTaskContainer2.isCaptureFloating()) {
-// return 1;
-// } else if (!dateRangeTaskContainer1.isCaptureFloating() && dateRangeTaskContainer2.isCaptureFloating()) {
-// return -1;
-// }
- } else if (o1 instanceof ITaskContainer && o2 instanceof ScheduledTaskContainer) {
- return -1;
- } else if (o1 instanceof ScheduledTaskContainer && o2 instanceof ITaskContainer) {
- return 1;
- }
-
- if (o1 instanceof UncategorizedTaskContainer && o2 instanceof ITaskContainer) {
- return -1;
- } else if (o1 instanceof ITaskContainer && o2 instanceof UncategorizedTaskContainer) {
- return 1;
- }
-
- if (!(o1 instanceof ITask) && o2 instanceof ITask) {
- return 1;
- }
-
- if (!(o1 instanceof ITask)) {//o1 instanceof AbstractTaskContainer || o1 instanceof AbstractRepositoryQuery) {
- if (!(o2 instanceof ITask)) {//o2 instanceof AbstractTaskContainer || o2 instanceof AbstractRepositoryQuery) {
- return ((IRepositoryElement) o1).getSummary().compareToIgnoreCase(
- ((IRepositoryElement) o2).getSummary());
- } else {
- return -1;
- }
- } else if (o1 instanceof ITaskContainer) {
- if (!(o2 instanceof ITask)) {//o2 instanceof AbstractTaskContainer || o2 instanceof AbstractRepositoryQuery) {
- return -1;
- } else if (o2 instanceof ITaskContainer) {
- IRepositoryElement element1 = (IRepositoryElement) o1;
- IRepositoryElement element2 = (IRepositoryElement) o2;
-
- AbstractTask task1 = null;
- AbstractTask task2 = null;
- if (element1 instanceof ITask) {
- task1 = (AbstractTask) element1;
- }
- if (element2 instanceof ITask) {
- task2 = (AbstractTask) element2;
- }
-
- if (task1 == null && task2 == null) {
- return comparePrioritiesAndKeys(element1, element2);
- } else if (task1 == null) {
- return 1;
- } else if (task2 == null) {
- return -1;
- }
-
- int complete = compareCompleted(task1, task2);
- if (complete != 0) {
- return complete;
- } else {
- int due = compareDueDates(task1, task2);
- if (due != 0) {
- return due;
- } else {
- int today = compareScheduledDate(task1, task2);
- if (today == 0) {
- return comparePrioritiesAndKeys(element1, element2);
- } else {
- return today;
- }
- }
- }
- }
- }
- return 0;
- }
-
- private int compareDueDates(ITask task1, ITask task2) {
- if (TasksUiPlugin.getTaskActivityManager().isOverdue(task1)
- && !TasksUiPlugin.getTaskActivityManager().isOverdue(task2)) {
- return -1;
- } else if (!TasksUiPlugin.getTaskActivityManager().isOverdue(task1)
- && TasksUiPlugin.getTaskActivityManager().isOverdue(task2)) {
- return 1;
- }
- return 0;
- }
-
- private int compareScheduledDate(AbstractTask task1, AbstractTask task2) {
-// if (task1.internalIsFloatingScheduledDate() && !task2.internalIsFloatingScheduledDate()) {
-// return 1;
-// } else if (!task1.internalIsFloatingScheduledDate() && task2.internalIsFloatingScheduledDate()) {
-// return -1;
-// } else if (task1.internalIsFloatingScheduledDate() && task2.internalIsFloatingScheduledDate()) {
-// if (task1.getScheduledForDate() != null && task2.getScheduledForDate() != null) {
-// return 0;
-// }
-// }
-
- if (isToday(task1) && !isToday(task2)) {
- return -1;
- } else if (!isToday(task1) && isToday(task2)) {
- return 1;
- } else {
- return 0;
- }
- }
-
- private boolean isToday(AbstractTask task) {
- return task.isPastReminder() || TasksUiPlugin.getTaskActivityManager().isScheduledForToday(task);
- }
-
-// private int compareThisWeek(AbstractTask task1, AbstractTask task2) {
-// if (TasksUiPlugin.getTaskActivityManager().isScheduledForThisWeek(task1)
-// && !TasksUiPlugin.getTaskActivityManager().isScheduledForThisWeek(task2)) {
-// return 1;
-// } else if (!TasksUiPlugin.getTaskActivityManager().isScheduledForThisWeek(task1)
-// && TasksUiPlugin.getTaskActivityManager().isScheduledForThisWeek(task2)) {
-// return -1;
-// } else {
-// return 0;
-// }
-// }
-
- private int compareCompleted(ITask task1, ITask task2) {
- if (task1.isCompleted() && !task2.isCompleted()) {
- return 1;
- } else if (!task1.isCompleted() && task2.isCompleted()) {
- return -1;
- } else {
- return 0;
- }
- }
-
-// private int compareOverScheduled(AbstractTask task1, AbstractTask task2) {
-// if (task1.isPastReminder() && !task2.isPastReminder()) {
-// return -1;
-// } else if (!task1.isPastReminder() && task2.isPastReminder()) {
-// return 1;
-// } else {
-// return 0;
-// }
-// }
-//
-// private int compareScheduledToday(AbstractTask task1, AbstractTask task2) {
-// if (TasksUiPlugin.getTaskActivityManager().isScheduledForToday(task1)
-// && !TasksUiPlugin.getTaskActivityManager().isScheduledForToday(task2)) {
-// return -1;
-// } else if (!TasksUiPlugin.getTaskActivityManager().isScheduledForToday(task1)
-// && TasksUiPlugin.getTaskActivityManager().isScheduledForToday(task2)) {
-// return 1;
-// } else {
-// return 0;
-// }
-// }
-
- // private int compareChanges(ITask task1, ITask task2) {
- // if (TaskListInterestFilter.hasChanges(task1) &&
- // !TaskListInterestFilter.hasChanges(task2)) {
- // return 1;
- // } else if (!TaskListInterestFilter.hasChanges(task1) &&
- // TaskListInterestFilter.hasChanges(task2)) {
- // return -1;
- // } else {
- // return 0;
- // }
- // }
-
- private int comparePrioritiesAndKeys(IRepositoryElement element1, IRepositoryElement element2) {
- int priority = comparePriorities(element1, element2);
- if (priority != 0) {
- return priority;
- }
-
- int description = compareKeys(element1, element2);
- if (description != 0) {
- return description;
- }
- return 0;
- }
-
- private int compareKeys(IRepositoryElement element1, IRepositoryElement element2) {
- return taskKeyComparator.compare(TaskListTableSorter.getSortableFromElement(element1),
- TaskListTableSorter.getSortableFromElement(element2));
- }
-
- private int comparePriorities(IRepositoryElement element1, IRepositoryElement element2) {
- if (element1 instanceof AbstractTaskContainer && element2 instanceof AbstractTaskContainer) {
- return ((AbstractTaskContainer) element1).getPriority().compareTo(
- ((AbstractTaskContainer) element2).getPriority());
- } else {
- // TODO: consider implementing
- return -1;
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListTableSorter.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListTableSorter.java
deleted file mode 100644
index bbd91329f..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListTableSorter.java
+++ /dev/null
@@ -1,319 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.views;
-
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.ScheduledTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.UncategorizedTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.UnmatchedTaskContainer;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITaskContainer;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Mik Kersten
- */
-public class TaskListTableSorter extends ViewerSorter {
-
- public enum SortByIndex {
- PRIORITY, SUMMARY, DATE_CREATED;
- }
-
- private static final int DEFAULT_SORT_DIRECTION = 1;
-
- private int sortDirection = DEFAULT_SORT_DIRECTION;
-
- private SortByIndex sortByIndex = SortByIndex.PRIORITY;
-
- private int sortDirection2 = DEFAULT_SORT_DIRECTION;
-
- private SortByIndex sortByIndex2 = SortByIndex.DATE_CREATED;
-
- private final TaskListView view;
-
- private final TaskKeyComparator taskKeyComparator = new TaskKeyComparator();
-
- public TaskListTableSorter(TaskListView view) {
- super();
- this.view = view;
- }
-
- public TaskListTableSorter(TaskListView view, SortByIndex index) {
- super();
- this.view = view;
- this.sortByIndex = index;
- }
-
- public void setColumn(String column) {
- if (view.isFocusedMode()) {
- MessageDialog.openInformation(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
- "Task Sorting",
- "Manual sorting is disabled in focused mode, sort order will not take effect until focused mode is disabled.");
- }
- }
-
- /**
- * compare - invoked when column is selected calls the actual comparison method for particular criteria
- */
- @Override
- public int compare(Viewer compareViewer, Object o1, Object o2) {
-
- if (o1 instanceof ScheduledTaskContainer && o2 instanceof ScheduledTaskContainer) {
- ScheduledTaskContainer dateRangeTaskContainer1 = (ScheduledTaskContainer) o1;
- ScheduledTaskContainer dateRangeTaskContainer2 = (ScheduledTaskContainer) o2;
- return dateRangeTaskContainer1.getDateRange().compareTo(dateRangeTaskContainer2.getDateRange());
-// if (dateRangeTaskContainer1.isCaptureFloating() && !dateRangeTaskContainer2.isCaptureFloating()) {
-// return 1;
-// } else if (!dateRangeTaskContainer1.isCaptureFloating() && dateRangeTaskContainer2.isCaptureFloating()) {
-// return -1;
-// }
-// return -1 * dateRangeTaskContainer2.getStart().compareTo(dateRangeTaskContainer1.getStart());
- } else if (o1 instanceof ITaskContainer && o2 instanceof ScheduledTaskContainer) {
- return -1;
- } else if (o1 instanceof ScheduledTaskContainer && o2 instanceof ITaskContainer) {
- return 1;
- }
-
- if (o1 instanceof ITaskContainer && o2 instanceof UncategorizedTaskContainer) {
- return 1;
- } else if (o2 instanceof ITaskContainer && o1 instanceof UncategorizedTaskContainer) {
- return -1;
- }
-
- if (o1 instanceof ITaskContainer && o2 instanceof UnmatchedTaskContainer) {
- return -1;
- } else if (o2 instanceof ITaskContainer && o1 instanceof UnmatchedTaskContainer) {
- return 1;
- }
-
- if (!(o1 instanceof ITask) && o2 instanceof ITask) {
- return 1;
- }
-
- if (o1 instanceof ITask && !(o2 instanceof ITaskContainer)) {
- return -1;
- }
-
- // if (o1 instanceof AbstractTaskContainer || o1 instanceof
- // AbstractRepositoryQuery) {
- if (!(o1 instanceof ITask)) {
- if (o2 instanceof ITaskContainer || o2 instanceof IRepositoryQuery) {
-
- return this.sortDirection
- * ((IRepositoryElement) o1).getSummary().compareToIgnoreCase(
- ((IRepositoryElement) o2).getSummary());
- } else {
- return -1;
- }
- } else if (o1 instanceof ITaskContainer) {
- if (!(o2 instanceof ITask)) {
- return -1;
- } else if (o2 instanceof ITaskContainer) {
- IRepositoryElement element1 = (IRepositoryElement) o1;
- IRepositoryElement element2 = (IRepositoryElement) o2;
-
- return compareElements(element1, element2);
- }
- } else {
- return 0;
- }
- return 0;
- }
-
- private int compareElements(IRepositoryElement element1, IRepositoryElement element2) {
- if (SortByIndex.PRIORITY.equals(sortByIndex)) {
- int result = sortByPriority(element1, element2, sortDirection);
- if (result != 0) {
- return result;
- }
-
- if (SortByIndex.DATE_CREATED.equals(sortByIndex2)) {
- return sortByDate(element1, element2, sortDirection2);
- } else {
- if (SortByIndex.SUMMARY.equals(sortByIndex2)) {
- return sortBySummary(element1, element2, sortDirection2);
- } else {
- return result;
- }
- }
- } else if (SortByIndex.DATE_CREATED.equals(sortByIndex)) {
- int result = sortByDate(element1, element2, sortDirection);
- if (result != 0) {
- return result;
- }
- if (SortByIndex.PRIORITY.equals(sortByIndex2)) {
- return sortByPriority(element1, element2, sortDirection2);
- } else {
- if (SortByIndex.SUMMARY.equals(sortByIndex2)) {
- return sortBySummary(element1, element2, sortDirection2);
- } else {
- return result;
- }
- }
- } else {
- int result = sortBySummary(element1, element2, sortDirection);
- if (result != 0) {
- return result;
- }
- if (SortByIndex.DATE_CREATED.equals(sortByIndex2)) {
- return sortByDate(element1, element2, sortDirection2);
- } else {
- if (SortByIndex.PRIORITY.equals(sortByIndex2)) {
- return sortByPriority(element1, element2, sortDirection2);
- } else {
- return result;
- }
- }
- }
- }
-
- /**
- * Determine the sort order of two tasks by id/summary
- *
- * @param element1
- * @param element2
- * @return sort order
- */
- private int sortBySummary(IRepositoryElement element1, IRepositoryElement element2, int sortDirection) {
- return sortDirection
- * taskKeyComparator.compare(getSortableFromElement(element1), getSortableFromElement(element2));
- }
-
- /**
- * Determine the sort order of two tasks by priority
- *
- * @param element1
- * @param element2
- * @return sort order
- */
- private int sortByPriority(IRepositoryElement element1, IRepositoryElement element2, int sortDirection) {
- return sortDirection
- * ((AbstractTaskContainer) element1).getPriority().compareTo(
- ((AbstractTaskContainer) element2).getPriority());
- }
-
- /**
- * Determine the sort order of two tasks by creation date
- *
- * @param element1
- * @param element2
- * @return sort order
- */
- private int sortByDate(IRepositoryElement element1, IRepositoryElement element2, int sortDirection) {
- AbstractTask t1 = null;
- AbstractTask t2 = null;
- if (element1 instanceof AbstractTask) {
- t1 = (AbstractTask) element1;
- }
- if (element2 instanceof AbstractTask) {
- t2 = (AbstractTask) element2;
- }
- if (t1 != null && t2 != null) {
- if (t1.getCreationDate() != null) {
- return sortDirection * t1.getCreationDate().compareTo(t2.getCreationDate());
- }
- }
- return 0;
- }
-
- /**
- * * Return a sortable string in the format "key: summary"
- *
- * @param element
- * @return sortable string
- * @deprecated Use getSortableFromElement()
- */
- @Deprecated
- public static String getSortableSummaryFromElement(IRepositoryElement element) {
- String summary = element.getSummary();
-
- if (element instanceof ITask) {
- ITask task1 = (ITask) element;
- if (task1.getTaskKey() != null) {
- summary = task1.getTaskKey() + ": " + summary;
- }
- }
- return summary;
- }
-
- /**
- * Return a array of values to pass to taskKeyComparator.compare() for sorting
- *
- * @param element
- * @return String array[component, taskId, summary]
- */
- public static String[] getSortableFromElement(IRepositoryElement element) {
- final String a[] = new String[] { "", null, element.getSummary() };
-
- if (element instanceof ITask) {
- ITask task1 = (ITask) element;
- if (task1.getTaskKey() != null) {
- a[1] = task1.getTaskKey();
- }
- }
- return a;
- }
-
- public SortByIndex getSortByIndex() {
- return sortByIndex;
- }
-
- public void setSortByIndex(SortByIndex sortByIndex) {
- SortByIndex oldValue = this.sortByIndex;
- this.sortByIndex = sortByIndex;
- if (!oldValue.equals(sortByIndex)) {
- view.getViewer().refresh();
- }
-
- }
-
- public int getSortDirection() {
- return sortDirection;
- }
-
- public void setSortDirection(int sortDirection) {
- int oldValue = this.sortDirection;
- this.sortDirection = sortDirection;
- if (oldValue != this.sortDirection) {
- view.getViewer().refresh();
- }
- }
-
- public SortByIndex getSortByIndex2() {
- return sortByIndex2;
- }
-
- public void setSortByIndex2(SortByIndex sortByIndex) {
- SortByIndex oldValue = this.sortByIndex2;
- this.sortByIndex2 = sortByIndex;
- if (!oldValue.equals(sortByIndex)) {
- view.getViewer().refresh();
- }
-
- }
-
- public int getSortDirection2() {
- return sortDirection2;
- }
-
- public void setSortDirection2(int sortDirection) {
- int oldValue = this.sortDirection2;
- this.sortDirection2 = sortDirection;
- if (oldValue != this.sortDirection2) {
- view.getViewer().refresh();
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListToolTip.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListToolTip.java
deleted file mode 100644
index ac8b5e136..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListToolTip.java
+++ /dev/null
@@ -1,643 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-/**
- * Copied from newsgroup, forwarded from Make Technologies
- */
-
-package org.eclipse.mylyn.internal.tasks.ui.views;
-
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.window.ToolTip;
-import org.eclipse.mylyn.commons.core.DateUtil;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.DateRange;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
-import org.eclipse.mylyn.internal.tasks.core.ScheduledTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.TaskCategory;
-import org.eclipse.mylyn.internal.tasks.core.UncategorizedTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.UnmatchedTaskContainer;
-import org.eclipse.mylyn.internal.tasks.ui.AbstractTaskListFilter;
-import org.eclipse.mylyn.internal.tasks.ui.ITasksUiPreferenceConstants;
-import org.eclipse.mylyn.internal.tasks.ui.TaskListHyperlink;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.notifications.TaskDataDiff;
-import org.eclipse.mylyn.internal.tasks.ui.notifications.TaskListNotification;
-import org.eclipse.mylyn.internal.tasks.ui.notifications.TaskListNotifier;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITaskContainer;
-import org.eclipse.mylyn.tasks.core.RepositoryStatus;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.ITask.SynchronizationState;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.TaskElementLabelProvider;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableItem;
-import org.eclipse.swt.widgets.ToolBar;
-import org.eclipse.swt.widgets.ToolItem;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.swt.widgets.Widget;
-
-/**
- * @author Mik Kersten
- * @author Eric Booth
- * @author Leo Dos Santos - multi-monitor support
- * @author Steffen Pingel
- */
-public class TaskListToolTip extends ToolTip {
-
- private final static int MAX_TEXT_WIDTH = 300;
-
- private final static int X_SHIFT;
-
- static {
- if ("gtk".equals(SWT.getPlatform()) || "carbon".equals(SWT.getPlatform())) {
- X_SHIFT = -26;
- } else {
- X_SHIFT = -23;
- }
- }
-
- private final static int Y_SHIFT = 1;
-
- private IRepositoryElement currentTipElement;
-
- private final List<TaskListToolTipListener> listeners = new ArrayList<TaskListToolTipListener>();
-
- private boolean visible;
-
- private boolean triggeredByMouse;
-
- private final Control control;
-
- public TaskListToolTip(Control control) {
- super(control);
-
- this.control = control;
- setShift(new Point(1, 1));
- }
-
- public void dispose() {
- hide();
- }
-
- @Override
- protected void afterHideToolTip(Event event) {
- triggeredByMouse = true;
- visible = false;
- for (TaskListToolTipListener listener : listeners.toArray(new TaskListToolTipListener[0])) {
- listener.toolTipHidden(event);
- }
- }
-
- public void addTaskListToolTipListener(TaskListToolTipListener listener) {
- listeners.add(listener);
- }
-
- public void removeTaskListToolTipListener(TaskListToolTipListener listener) {
- listeners.remove(listener);
- }
-
- private IRepositoryElement getTaskListElement(Object hoverObject) {
- if (hoverObject instanceof TaskListHyperlink) {
- TaskListHyperlink hyperlink = (TaskListHyperlink) hoverObject;
- return hyperlink.getTask();
- } else if (hoverObject instanceof Widget) {
- Object data = ((Widget) hoverObject).getData();
- if (data != null) {
- if (data instanceof ITaskContainer) {
- return (IRepositoryElement) data;
- } else if (data instanceof IAdaptable) {
- return (IRepositoryElement) ((IAdaptable) data).getAdapter(AbstractTaskContainer.class);
- }
- }
- }
- return null;
- }
-
- private String getTitleText(IRepositoryElement element) {
- if (element instanceof ScheduledTaskContainer) {
- StringBuilder sb = new StringBuilder();
- sb.append(element.getSummary());
- Calendar start = ((ScheduledTaskContainer) element).getDateRange().getStartDate();
- sb.append(" [");
- sb.append(DateFormat.getDateInstance(DateFormat.LONG).format(start.getTime()));
- sb.append("]");
- return sb.toString();
- } else if (element instanceof IRepositoryQuery) {
- IRepositoryQuery query = (IRepositoryQuery) element;
- StringBuilder sb = new StringBuilder();
- sb.append(element.getSummary());
- sb.append(" [");
- sb.append(getRepositoryLabel(query.getConnectorKind(), query.getRepositoryUrl()));
- sb.append("]");
- return sb.toString();
- } else {
- return new TaskElementLabelProvider(false).getText(element);
- }
- }
-
- private String getDetailsText(IRepositoryElement element) {
- if (element instanceof ScheduledTaskContainer) {
- ScheduledTaskContainer container = (ScheduledTaskContainer) element;
- int estimateTotal = 0;
- long elapsedTotal = 0;
- for (ITask child : container.getChildren()) {
- if (child instanceof AbstractTask) {
- estimateTotal += ((AbstractTask) child).getEstimatedTimeHours();
- elapsedTotal += TasksUiPlugin.getTaskActivityManager().getElapsedTime(child,
- container.getDateRange());
- }
- }
- StringBuilder sb = new StringBuilder();
- sb.append("Estimate: ");
- sb.append(estimateTotal);
- sb.append(" hours");
- sb.append("\n");
- sb.append("Elapsed: ");
- sb.append(DateUtil.getFormattedDurationShort(elapsedTotal));
- sb.append("\n");
- return sb.toString();
- } else if (element instanceof ITask) {
- ITask task = (ITask) element;
- StringBuilder sb = new StringBuilder();
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(task.getConnectorKind());
- sb.append(connectorUi.getTaskKindLabel(task));
- String key = task.getTaskKey();
- if (key != null) {
- sb.append(" ");
- sb.append(key);
- }
- sb.append(", ");
- sb.append(task.getPriority());
- sb.append(" [");
- sb.append(getRepositoryLabel(task.getConnectorKind(), task.getRepositoryUrl()));
- sb.append("]");
- sb.append("\n");
- return sb.toString();
- } else {
- return null;
- }
- }
-
- private String getRepositoryLabel(String repositoryKind, String repositoryUrl) {
- TaskRepository repository = TasksUi.getRepositoryManager().getRepository(repositoryKind, repositoryUrl);
- if (repository != null) {
- String label = repository.getRepositoryLabel();
- if (label.indexOf("//") != -1) {
- return label.substring((repository.getRepositoryUrl().indexOf("//") + 2));
- }
- return label + "";
- }
- return "";
- }
-
- private String getActivityText(IRepositoryElement element) {
-// if (element instanceof ScheduledTaskDelegate) {
-// ScheduledTaskDelegate task = (ScheduledTaskDelegate) element;
-//
-// StringBuilder sb = new StringBuilder();
-// Date date = task.getScheduledForDate();
-// if (date != null) {
-// sb.append("Scheduled for: ");
-// sb.append(new SimpleDateFormat("E").format(date)).append(", ");
-// sb.append(DateFormat.getDateInstance(DateFormat.LONG).format(date));
-// sb.append(" (").append(DateFormat.getTimeInstance(DateFormat.SHORT).format(date)).append(")\n");
-// }
-//
-// long elapsed = TasksUiPlugin.getTaskActivityManager().getElapsedTime(task.getCorrespondingTask(),
-// task.getDateRangeContainer().getStart(), task.getDateRangeContainer().getEnd());
-// String elapsedTimeString = DateUtil.getFormattedDurationShort(elapsed);
-// sb.append("Elapsed: ");
-// sb.append(elapsedTimeString);
-// sb.append("\n");
-//
-// return sb.toString();
-// } else
-//
- if (element instanceof ITask) {
- AbstractTask task = (AbstractTask) element;
-
- StringBuilder sb = new StringBuilder();
-
- Date dueDate = task.getDueDate();
- if (dueDate != null) {
- sb.append("Due: ");
- sb.append(new SimpleDateFormat("E").format(dueDate)).append(", ");
- sb.append(DateFormat.getDateInstance(DateFormat.LONG).format(dueDate));
- sb.append(" (").append(DateFormat.getTimeInstance(DateFormat.SHORT).format(dueDate)).append(')');
- sb.append('\n');
- }
-
- DateRange scheduledDate = task.getScheduledForDate();
- if (scheduledDate != null) {
- sb.append("Scheduled: ");
- sb.append(scheduledDate.toString());
-// sb.append(new SimpleDateFormat("E").format(scheduledDate)).append(", ");
-// sb.append(DateFormat.getDateInstance(DateFormat.LONG).format(scheduledDate));
- sb.append('\n');
- }
-
- long elapsed = TasksUiPlugin.getTaskActivityManager().getElapsedTime(task);
- String elapsedTimeString = DateUtil.getFormattedDurationShort(elapsed);
- sb.append("Elapsed: ");
- sb.append(elapsedTimeString);
- sb.append("\n");
-
- return sb.toString();
- }
- return null;
- }
-
- @SuppressWarnings( { "deprecation", "restriction" })
- private String getIncommingText(IRepositoryElement element) {
- if (element instanceof ITask) {
- ITask task = (ITask) element;
- if (task.getSynchronizationState().isIncoming()) {
- String text = null;
- AbstractRepositoryConnector connector = TasksUi.getRepositoryManager().getRepositoryConnector(
- task.getConnectorKind());
- if (connector instanceof org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractLegacyRepositoryConnector) {
- TaskListNotification notification = org.eclipse.mylyn.internal.tasks.ui.LegacyChangeManager.getIncommingNotification(
- connector, task);
- if (notification != null) {
- text = notification.getDescription();
- }
- } else {
- TaskListNotifier notifier = new TaskListNotifier(TasksUiPlugin.getRepositoryModel(),
- TasksUiPlugin.getTaskDataManager());
- TaskDataDiff diff = notifier.getDiff(task);
- text = diff.toString(MAX_TEXT_WIDTH);
- }
- if (text != null && text.length() > 0) {
- return text;
- }
- }
- }
- return null;
- }
-
- private String getStatusText(IRepositoryElement element) {
- IStatus status = null;
- if (element instanceof AbstractTask) {
- AbstractTask task = (AbstractTask) element;
- status = task.getStatus();
- } else if (element instanceof IRepositoryQuery) {
- RepositoryQuery query = (RepositoryQuery) element;
- status = query.getStatus();
- }
-
- if (status != null) {
- StringBuilder sb = new StringBuilder();
- sb.append(status.getMessage());
- if (status instanceof RepositoryStatus && ((RepositoryStatus) status).isHtmlMessage()) {
- sb.append(" Please synchronize manually for full error message.");
- }
- return sb.toString();
- }
-
- return null;
- }
-
- @Override
- public Point getLocation(Point tipSize, Event event) {
- Widget widget = getTipWidget(event);
- if (widget != null) {
- Rectangle bounds = getBounds(widget);
- if (bounds != null) {
- return control.toDisplay(bounds.x + X_SHIFT, bounds.y + bounds.height + Y_SHIFT);
- }
- }
- return super.getLocation(tipSize, event);//control.toDisplay(event.x + xShift, event.y + yShift);
- }
-
- private ProgressData getProgressData(IRepositoryElement element) {
- if (element instanceof ITask) {
- return null;
- } else if (element instanceof ITaskContainer) {
- Object[] children = new Object[0];
-
- children = ((ITaskContainer) element).getChildren().toArray();
-
- int total = children.length;
- int completed = 0;
- for (ITask task : ((ITaskContainer) element).getChildren()) {
- if (task.isCompleted()) {
- completed++;
- }
- }
-
- String text = "Total: " + total + " (Complete: " + completed + ", Incomplete: " + (total - completed) + ")";
- return new ProgressData(completed, total, text);
- } else {
- return null;
- }
- }
-
- private Image getImage(IRepositoryElement element) {
- if (element instanceof IRepositoryQuery) {
- IRepositoryQuery query = (IRepositoryQuery) element;
- AbstractRepositoryConnector connector = TasksUi.getRepositoryManager().getRepositoryConnector(
- query.getConnectorKind());
- if (connector != null) {
- return TasksUiPlugin.getDefault().getBrandingIcon(connector.getConnectorKind());
- }
- } else if (element instanceof ITask) {
- ITask repositoryTask = (ITask) element;
- AbstractRepositoryConnector connector = TasksUi.getRepositoryManager().getRepositoryConnector(
- repositoryTask.getConnectorKind());
- if (connector != null) {
- return TasksUiPlugin.getDefault().getBrandingIcon(connector.getConnectorKind());
- }
- } else if (element instanceof ScheduledTaskContainer) {
- return CommonImages.getImage(CommonImages.CALENDAR);
- }
- return null;
- }
-
- protected Widget getTipWidget(Event event) {
- Point widgetPosition = new Point(event.x, event.y);
- Widget widget = event.widget;
- if (widget instanceof ToolBar) {
- ToolBar w = (ToolBar) widget;
- return w.getItem(widgetPosition);
- }
- if (widget instanceof Table) {
- Table w = (Table) widget;
- return w.getItem(widgetPosition);
- }
- if (widget instanceof Tree) {
- Tree w = (Tree) widget;
- return w.getItem(widgetPosition);
- }
-
- return widget;
- }
-
- private Rectangle getBounds(Widget widget) {
- if (widget instanceof ToolItem) {
- ToolItem w = (ToolItem) widget;
- return w.getBounds();
- }
- if (widget instanceof TableItem) {
- TableItem w = (TableItem) widget;
- return w.getBounds();
- }
- if (widget instanceof TreeItem) {
- TreeItem w = (TreeItem) widget;
- return w.getBounds();
- }
- return null;
- }
-
- @Override
- protected boolean shouldCreateToolTip(Event event) {
- currentTipElement = null;
-
- if (super.shouldCreateToolTip(event)) {
- Widget tipWidget = getTipWidget(event);
- if (tipWidget != null) {
- Rectangle bounds = getBounds(tipWidget);
- if (tipWidget instanceof TaskListHyperlink) {
- currentTipElement = getTaskListElement(tipWidget);
- } else if (bounds != null && control.getBounds().contains(bounds.x, bounds.y)) {
- currentTipElement = getTaskListElement(tipWidget);
- }
- }
- }
-
- if (currentTipElement == null) {
- hide();
- return false;
- } else {
- return true;
- }
- }
-
- @Override
- protected Composite createToolTipContentArea(Event event, Composite parent) {
- assert currentTipElement != null;
-
- Composite composite = createToolTipContentAreaComposite(parent);
-
- addIconAndLabel(composite, getImage(currentTipElement), getTitleText(currentTipElement));
-
- String detailsText = getDetailsText(currentTipElement);
- if (detailsText != null) {
- addIconAndLabel(composite, null, detailsText);
- }
-
- String synchText = getSynchText(currentTipElement);
- if (synchText != null) {
- addIconAndLabel(composite, CommonImages.getImage(TasksUiImages.REPOSITORY_SYNCHRONIZE), synchText);
- }
-
- String activityText = getActivityText(currentTipElement);
- if (activityText != null) {
- addIconAndLabel(composite, CommonImages.getImage(CommonImages.CALENDAR), activityText);
- }
-
- String incommingText = getIncommingText(currentTipElement);
- if (incommingText != null) {
- Image image = CommonImages.getImage(CommonImages.OVERLAY_SYNC_INCOMMING);
- if (currentTipElement instanceof ITask) {
- ITask task = (ITask) currentTipElement;
- if (task.getSynchronizationState() == SynchronizationState.INCOMING_NEW) {
- image = CommonImages.getImage(CommonImages.OVERLAY_SYNC_INCOMMING_NEW);
- }
- }
- addIconAndLabel(composite, image, incommingText);
- }
-
- ProgressData progress = getProgressData(currentTipElement);
- if (progress != null) {
- addIconAndLabel(composite, null, progress.text);
-
- // label height need to be set to 0 to remove gap below the progress bar
- Label label = new Label(composite, SWT.NONE);
- GridData labelGridData = new GridData(SWT.FILL, SWT.TOP, true, false);
- labelGridData.heightHint = 0;
- label.setLayoutData(labelGridData);
-
- Composite progressComposite = new Composite(composite, SWT.NONE);
- GridLayout progressLayout = new GridLayout(1, false);
- progressLayout.marginWidth = 0;
- progressLayout.marginHeight = 0;
- progressComposite.setLayout(progressLayout);
- progressComposite.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
-
- WorkweekProgressBar taskProgressBar = new WorkweekProgressBar(progressComposite);
- taskProgressBar.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
- taskProgressBar.reset(progress.completed, progress.total);
-
- // do we really need custom canvas? code below renders the same
-// IThemeManager themeManager = PlatformUI.getWorkbench().getThemeManager();
-// Color color = themeManager.getCurrentTheme().getColorRegistry().get(
-// TaskListColorsAndFonts.THEME_COLOR_TASK_TODAY_COMPLETED);
-// ProgressBar bar = new ProgressBar(tipShell, SWT.SMOOTH);
-// bar.setForeground(color);
-// bar.setSelection((int) (100d * progress.completed / progress.total));
-// GridData gridData = new GridData(SWT.FILL, SWT.TOP, true, false);
-// gridData.heightHint = 5;
-// bar.setLayoutData(gridData);
- }
-
- String statusText = getStatusText(currentTipElement);
- if (statusText != null) {
- addIconAndLabel(composite, CommonImages.getImage(CommonImages.WARNING), statusText);
- }
-
- String helpText = getHelpText(currentTipElement);
- if (helpText != null) {
- addIconAndLabel(composite, CommonImages.getImage(CommonImages.QUESTION), helpText);
- }
-
- visible = true;
-
- return composite;
- }
-
- private String getHelpText(IRepositoryElement element) {
- if (element instanceof TaskCategory || element instanceof IRepositoryQuery) {
- if (AbstractTaskListFilter.hasDescendantIncoming((ITaskContainer) element)) {
- TaskListView taskListView = TaskListView.getFromActivePerspective();
- if (taskListView != null) {
-
- if (!taskListView.isFocusedMode()
- && TasksUiPlugin.getDefault().getPreferenceStore().getBoolean(
- ITasksUiPreferenceConstants.FILTER_COMPLETE_MODE)) {
- Object[] children = ((TaskListContentProvider) taskListView.getViewer().getContentProvider()).getChildren(element);
- boolean hasIncoming = false;
- for (Object child : children) {
- if (child instanceof ITask) {
- if (((ITask) child).getSynchronizationState().isIncoming()) {
- hasIncoming = true;
- break;
- }
- }
- }
- if (!hasIncoming) {
- return "Some incoming elements may be filtered,\nfocus the view to see all incomings";
- }
- }
- }
- }
- // if has incoming but no top level children have incoming, suggest incoming tasks may be filtered
- }
- if (element instanceof UncategorizedTaskContainer) {
- return "Automatic container for all local tasks\nwith no category set";
- } else if (element instanceof UnmatchedTaskContainer) {
- return "Automatic container for repository tasks\nnot matched by any query";
- }
- return null;
- }
-
- protected Composite createToolTipContentAreaComposite(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout gridLayout = new GridLayout();
- gridLayout.numColumns = 2;
- gridLayout.marginWidth = 5;
- gridLayout.marginHeight = 2;
- composite.setLayout(gridLayout);
- composite.setBackground(composite.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND));
- return composite;
- }
-
- private String getSynchText(IRepositoryElement element) {
- if (element instanceof IRepositoryQuery) {
- String syncStamp = ((RepositoryQuery) element).getLastSynchronizedTimeStamp();
- if (syncStamp != null) {
- return "Synchronized: " + syncStamp;
- }
- }
- return null;
- }
-
- private String removeTrailingNewline(String text) {
- if (text.endsWith("\n")) {
- return text.substring(0, text.length() - 1);
- }
- return text;
- }
-
- protected void addIconAndLabel(Composite parent, Image image, String text) {
- Label imageLabel = new Label(parent, SWT.NONE);
- imageLabel.setForeground(parent.getDisplay().getSystemColor(SWT.COLOR_INFO_FOREGROUND));
- imageLabel.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND));
- imageLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_BEGINNING));
- imageLabel.setImage(image);
-
- Label textLabel = new Label(parent, SWT.NONE);
- textLabel.setForeground(parent.getDisplay().getSystemColor(SWT.COLOR_INFO_FOREGROUND));
- textLabel.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND));
- textLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_CENTER));
- textLabel.setText(removeTrailingNewline(text));
- }
-
- private static class ProgressData {
-
- int completed;
-
- int total;
-
- String text;
-
- public ProgressData(int completed, int total, String text) {
- this.completed = completed;
- this.total = total;
- this.text = text;
- }
-
- }
-
- public static interface TaskListToolTipListener {
-
- void toolTipHidden(Event event);
-
- }
-
- public boolean isVisible() {
- return visible;
- }
-
- public boolean isTriggeredByMouse() {
- return triggeredByMouse;
- }
-
- @Override
- public void show(Point location) {
- super.show(location);
- triggeredByMouse = false;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java
deleted file mode 100644
index 80e1dfe6e..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java
+++ /dev/null
@@ -1,1814 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.views;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.runtime.ISafeRunnable;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IStatusLineManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.dialogs.InputDialog;
-import org.eclipse.jface.layout.TreeColumnLayout;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.util.SafeRunnable;
-import org.eclipse.jface.viewers.CellEditor;
-import org.eclipse.jface.viewers.ColumnPixelData;
-import org.eclipse.jface.viewers.ColumnWeightData;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.IOpenListener;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITreeViewerListener;
-import org.eclipse.jface.viewers.OpenEvent;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TextCellEditor;
-import org.eclipse.jface.viewers.TreeExpansionEvent;
-import org.eclipse.jface.viewers.TreePath;
-import org.eclipse.jface.viewers.TreeSelection;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.window.Window;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.commons.ui.TreeWalker;
-import org.eclipse.mylyn.internal.commons.ui.TreeWalker.TreeVisitor;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonThemes;
-import org.eclipse.mylyn.internal.provisional.commons.ui.DelayedRefreshJob;
-import org.eclipse.mylyn.internal.provisional.commons.ui.SubstringPatternFilter;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTaskCategory;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.ITaskListChangeListener;
-import org.eclipse.mylyn.internal.tasks.core.TaskCategory;
-import org.eclipse.mylyn.internal.tasks.core.TaskContainerDelta;
-import org.eclipse.mylyn.internal.tasks.core.UncategorizedTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.UnmatchedTaskContainer;
-import org.eclipse.mylyn.internal.tasks.ui.AbstractTaskListFilter;
-import org.eclipse.mylyn.internal.tasks.ui.CategorizedPresentation;
-import org.eclipse.mylyn.internal.tasks.ui.IDynamicSubMenuContributor;
-import org.eclipse.mylyn.internal.tasks.ui.ITasksUiPreferenceConstants;
-import org.eclipse.mylyn.internal.tasks.ui.ScheduledPresentation;
-import org.eclipse.mylyn.internal.tasks.ui.TaskArchiveFilter;
-import org.eclipse.mylyn.internal.tasks.ui.TaskCompletionFilter;
-import org.eclipse.mylyn.internal.tasks.ui.TaskPriorityFilter;
-import org.eclipse.mylyn.internal.tasks.ui.TaskTransfer;
-import org.eclipse.mylyn.internal.tasks.ui.TaskWorkingSetFilter;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.actions.CollapseAllAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.CopyTaskDetailsAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.DeleteAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.EditRepositoryPropertiesAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.ExpandAllAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.FilterCompletedTasksAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.GoIntoAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.GoUpAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.GroupSubTasksAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.LinkWithEditorAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.MarkTaskCompleteAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.MarkTaskIncompleteAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.OpenTaskListElementAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.OpenTasksUiPreferencesAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.OpenWithBrowserAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.PresentationDropDownSelectionAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.RemoveFromCategoryAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.RenameAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.SynchronizeAutomaticallyAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.TaskActivateAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.TaskDeactivateAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.TaskListSortAction;
-import org.eclipse.mylyn.internal.tasks.ui.editors.TaskListChangeAdapter;
-import org.eclipse.mylyn.internal.tasks.ui.util.TaskDragSourceListener;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListTableSorter.SortByIndex;
-import org.eclipse.mylyn.internal.tasks.ui.workingsets.TaskWorkingSetUpdater;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITaskActivationListener;
-import org.eclipse.mylyn.tasks.core.ITaskActivityListener;
-import org.eclipse.mylyn.tasks.core.ITaskContainer;
-import org.eclipse.mylyn.tasks.core.TaskActivationAdapter;
-import org.eclipse.mylyn.tasks.core.TaskActivityAdapter;
-import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
-import org.eclipse.mylyn.tasks.ui.TaskElementLabelProvider;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditorInput;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.SWTException;
-import org.eclipse.swt.dnd.DND;
-import org.eclipse.swt.dnd.FileTransfer;
-import org.eclipse.swt.dnd.RTFTransfer;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.swt.events.ControlEvent;
-import org.eclipse.swt.events.ControlListener;
-import org.eclipse.swt.events.FocusAdapter;
-import org.eclipse.swt.events.FocusEvent;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.KeyListener;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.MouseListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.graphics.Region;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.Scrollable;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeColumn;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.IPageListener;
-import org.eclipse.ui.IPartListener;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IViewReference;
-import org.eclipse.ui.IViewSite;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkingSet;
-import org.eclipse.ui.IWorkingSetManager;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.ActionFactory;
-import org.eclipse.ui.contexts.IContextService;
-import org.eclipse.ui.part.DrillDownAdapter;
-import org.eclipse.ui.part.ViewPart;
-import org.eclipse.ui.texteditor.IWorkbenchActionDefinitionIds;
-import org.eclipse.ui.themes.IThemeManager;
-
-/**
- * @author Mik Kersten
- * @author Ken Sueda
- * @author Eugene Kuleshov
- */
-public class TaskListView extends ViewPart implements IPropertyChangeListener {
-
- private final class TaskListRefreshJob extends DelayedRefreshJob {
-
- private TaskListRefreshJob(TreeViewer treeViewer, String name) {
- super(treeViewer, name);
- }
-
- @Override
- protected void doRefresh(Object[] items) {
- TreePath selection = preserveSelection();
-
- if (items == null) {
- viewer.refresh(true);
- } else if (items.length > 0) {
- try {
- for (Object item : items) {
- if (item instanceof ITask) {
- ITask task = (ITask) item;
- if (TaskListView.this.isFocusedMode()) {
- viewer.refresh(task, true);
- if (item instanceof AbstractTask) {
- Set<AbstractTaskContainer> parents = ((AbstractTask) item).getParentContainers();
- for (AbstractTaskContainer parent : parents) {
- viewer.refresh(parent, false);
- }
- }
- } else {
- viewer.refresh(task, true);
- }
- } else {
- viewer.refresh(item, true);
- }
- updateExpansionState(item);
- }
- } catch (SWTException e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Failed to refresh viewer: "
- + viewer, e));
- }
- }
-
- updateToolTip(false);
- restoreSelection(selection);
- }
-
- private TreePath preserveSelection() {
- if (viewer instanceof TreeViewer) {
- TreeViewer treeViewer = (TreeViewer) viewer;
- // in case the refresh removes the currently selected item,
- // remember the next item in the tree to restore the selection
- // TODO: consider making this optional
- TreeItem[] selection = treeViewer.getTree().getSelection();
- if (selection.length > 0) {
- TreeWalker treeWalker = new TreeWalker(treeViewer);
- return treeWalker.walk(new TreeVisitor() {
- @Override
- public boolean visit(Object object) {
- return true;
- }
- }, selection[selection.length - 1]);
- }
- }
- return null;
- }
-
- private void restoreSelection(TreePath treePath) {
- if (treePath != null) {
- ISelection newSelection = viewer.getSelection();
- if (newSelection == null || newSelection.isEmpty()) {
- viewer.setSelection(new TreeSelection(treePath), true);
- }
- }
- }
-
- protected void updateExpansionState(Object item) {
- if (TaskListView.this.isFocusedMode()) {
- TaskListView.this.getViewer().expandToLevel(item, 3);
- }
- }
- }
-
- // TODO e3.4 replace with SWT.NO_SCROLL constant
- public static final int SWT_NO_SCROLL = 1 << 4;
-
- public static final String ID = "org.eclipse.mylyn.tasks.ui.views.tasks";
-
- public static final String LABEL_VIEW = "Tasks";
-
- private static final String MEMENTO_KEY_SORT_DIRECTION = "sortDirection";
-
- private static final String MEMENTO_KEY_SORTER = "sorter";
-
- private static final String MEMENTO_KEY_SORTER2 = "sorter2";
-
- private static final String MEMENTO_KEY_SORT_INDEX = "sortIndex";
-
- private static final String MEMENTO_SORT_INDEX = "org.eclipse.mylyn.tasklist.ui.views.tasklist.sortIndex";
-
- private static final String MEMENTO_LINK_WITH_EDITOR = "linkWithEditor";
-
- private static final String MEMENTO_PRESENTATION = "presentation";
-
- private static final String ID_SEPARATOR_NEW = "new";
-
- public static final String ID_SEPARATOR_OPERATIONS = "operations";
-
- public static final String ID_SEPARATOR_CONTEXT = "context";
-
- public static final String ID_SEPARATOR_TASKS = "tasks";
-
- private static final String ID_SEPARATOR_FILTERS = "filters";
-
- private static final String ID_SEPARATOR_REPOSITORY = "repository";
-
- private static final String ID_SEPARATOR_PROPERTIES = "properties";
-
- private static final String ID_SEPARATOR_NAVIGATE = "navigate";
-
- private static final String LABEL_NO_TASKS = "no task active";
-
- private final static int SIZE_MAX_SELECTION_HISTORY = 10;
-
- private static final String PART_NAME = "Task List";
-
- static final String[] PRIORITY_LEVELS = { PriorityLevel.P1.toString(), PriorityLevel.P2.toString(),
- PriorityLevel.P3.toString(), PriorityLevel.P4.toString(), PriorityLevel.P5.toString() };
-
- public static final String[] PRIORITY_LEVEL_DESCRIPTIONS = { PriorityLevel.P1.getDescription(),
- PriorityLevel.P2.getDescription(), PriorityLevel.P3.getDescription(), PriorityLevel.P4.getDescription(),
- PriorityLevel.P5.getDescription() };
-
- private static List<AbstractTaskListPresentation> presentationsPrimary = new ArrayList<AbstractTaskListPresentation>();
-
- private static List<AbstractTaskListPresentation> presentationsSecondary = new ArrayList<AbstractTaskListPresentation>();
-
- private boolean focusedMode = false;
-
- private boolean linkWithEditor;
-
- private final TaskListCellModifier taskListCellModifier = new TaskListCellModifier(this);
-
- private IThemeManager themeManager;
-
- private TaskListFilteredTree filteredTree;
-
- private DrillDownAdapter drillDownAdapter;
-
- private AbstractTaskContainer drilledIntoCategory = null;
-
- private GoIntoAction goIntoAction;
-
- private GoUpAction goUpAction;
-
- private CopyTaskDetailsAction copyDetailsAction;
-
- private OpenTaskListElementAction openAction;
-
- private OpenWithBrowserAction openWithBrowser;
-
- private RenameAction renameAction;
-
- private CollapseAllAction collapseAll;
-
- private ExpandAllAction expandAll;
-
- private DeleteAction deleteAction;
-
- private RemoveFromCategoryAction removeFromCategoryAction;
-
- private final TaskActivateAction activateAction = new TaskActivateAction();
-
- private final TaskDeactivateAction deactivateAction = new TaskDeactivateAction();
-
- private FilterCompletedTasksAction filterCompleteTask;
-
- private GroupSubTasksAction filterSubTasksAction;
-
- private SynchronizeAutomaticallyAction synchronizeAutomatically;
-
- private OpenTasksUiPreferencesAction openPreferencesAction;
-
- //private FilterArchiveContainerAction filterArchiveCategory;
-
- private PriorityDropDownAction filterOnPriorityAction;
-
- private TaskListSortAction sortDialogAction;
-
- private PresentationDropDownSelectionAction presentationDropDownSelectionAction;
-
- private LinkWithEditorAction linkWithEditorAction;
-
- private final TaskPriorityFilter filterPriority = new TaskPriorityFilter();
-
- private final TaskCompletionFilter filterComplete = new TaskCompletionFilter();
-
- private final TaskArchiveFilter filterArchive = new TaskArchiveFilter();
-
- private TaskWorkingSetFilter filterWorkingSet;
-
- private final Set<AbstractTaskListFilter> filters = new HashSet<AbstractTaskListFilter>();
-
- protected String[] columnNames = new String[] { "Summary" };
-
- protected int[] columnWidths = new int[] { 200 };
-
- private TreeColumn[] columns;
-
- private IMemento taskListMemento;
-
- private AbstractTaskListPresentation currentPresentation;
-
- private TaskTableLabelProvider taskListTableLabelProvider;
-
- private TaskListTableSorter tableSorter;
-
- private Color categoryGradientStart;
-
- private Color categoryGradientEnd;
-
- private final IPageListener PAGE_LISTENER = new IPageListener() {
- public void pageActivated(IWorkbenchPage page) {
- filteredTree.indicateActiveTaskWorkingSet();
- }
-
- public void pageClosed(IWorkbenchPage page) {
- // ignore
-
- }
-
- public void pageOpened(IWorkbenchPage page) {
- // ignore
- }
- };
-
- private final LinkedHashMap<String, IStructuredSelection> lastSelectionByTaskHandle = new LinkedHashMap<String, IStructuredSelection>(
- SIZE_MAX_SELECTION_HISTORY);
-
- /**
- * True if the view should indicate that interaction monitoring is paused
- */
- protected boolean isPaused = false;
-
- boolean synchronizationOverlaid = false;
-
- private final Listener CATEGORY_GRADIENT_DRAWER = new Listener() {
- public void handleEvent(Event event) {
- if (event.item.getData() instanceof ITaskContainer && !(event.item.getData() instanceof ITask)) {
- Scrollable scrollable = (Scrollable) event.widget;
- GC gc = event.gc;
-
- Rectangle area = scrollable.getClientArea();
- Rectangle rect = event.getBounds();
-
- /* Paint the selection beyond the end of last column */
- expandRegion(event, scrollable, gc, area);
-
- /* Draw Gradient Rectangle */
- Color oldForeground = gc.getForeground();
- Color oldBackground = gc.getBackground();
-
- gc.setForeground(categoryGradientEnd);
- gc.drawLine(0, rect.y, area.width, rect.y);
-
- gc.setForeground(categoryGradientStart);
- gc.setBackground(categoryGradientEnd);
-
- // gc.setForeground(categoryGradientStart);
- // gc.setBackground(categoryGradientEnd);
- // gc.setForeground(new Clr(Display.getCurrent(), 255, 0, 0));
-
- gc.fillGradientRectangle(0, rect.y + 1, area.width, rect.height, true);
-
- /* Bottom Line */
- // gc.setForeground();
- gc.setForeground(categoryGradientEnd);
- gc.drawLine(0, rect.y + rect.height - 1, area.width, rect.y + rect.height - 1);
-
- gc.setForeground(oldForeground);
- gc.setBackground(oldBackground);
- /* Mark as Background being handled */
- event.detail &= ~SWT.BACKGROUND;
- }
- }
-
- private void expandRegion(Event event, Scrollable scrollable, GC gc, Rectangle area) {
- int columnCount;
- if (scrollable instanceof Table) {
- columnCount = ((Table) scrollable).getColumnCount();
- } else {
- columnCount = ((Tree) scrollable).getColumnCount();
- }
-
- if (event.index == columnCount - 1 || columnCount == 0) {
- int width = area.x + area.width - event.x;
- if (width > 0) {
- Region region = new Region();
- gc.getClipping(region);
- region.add(event.x, event.y, width, event.height);
- gc.setClipping(region);
- region.dispose();
- }
- }
- }
- };
-
- private boolean gradientListenerAdded = false;
-
- private final ITaskActivityListener TASK_ACTIVITY_LISTENER = new TaskActivityAdapter() {
- @Override
- public void activityReset() {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- refreshJob.refresh();
- }
- });
- }
- };
-
- private final ITaskActivationListener TASK_ACTIVATION_LISTENER = new TaskActivationAdapter() {
-
- @Override
- public void taskActivated(final ITask task) {
- if (task != null) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- updateDescription();
- selectedAndFocusTask(task);
- filteredTree.indicateActiveTask(task);
- refresh();
- }
- });
- }
- }
-
- @Override
- public void taskDeactivated(final ITask task) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- refreshJob.refreshElement(task);
- updateDescription();
- filteredTree.indicateNoActiveTask();
- }
- });
- }
-
- };
-
- private final ITaskListChangeListener TASKLIST_CHANGE_LISTENER = new TaskListChangeAdapter() {
-
- @Override
- public void containersChanged(final Set<TaskContainerDelta> deltas) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- for (TaskContainerDelta taskContainerDelta : deltas) {
- if (ScheduledPresentation.ID.equals(getCurrentPresentation().getId())) {
- // TODO: implement refresh policy for scheduled presentation
- refreshJob.refresh();
- } else {
- switch (taskContainerDelta.getKind()) {
- case ROOT:
- refreshJob.refresh();
- break;
- case ADDED:
- case REMOVED:
- if (taskContainerDelta.getElement() != null) {
- refreshJob.refreshElement(taskContainerDelta.getElement());
- }
- if (taskContainerDelta.getParent() != null) {
- refreshJob.refreshElement(taskContainerDelta.getParent());
- } else {
- // element was added/removed from the root
- refreshJob.refresh();
- }
- break;
- case CONTENT:
- refreshJob.refreshElement(taskContainerDelta.getElement());
- }
-
- }
- }
- }
- });
- }
- };
-
- private final IPropertyChangeListener THEME_CHANGE_LISTENER = new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- if (event.getProperty().equals(IThemeManager.CHANGE_CURRENT_THEME)
- || CommonThemes.isCommonTheme(event.getProperty())) {
- configureGradientColors();
- taskListTableLabelProvider.setCategoryBackgroundColor(themeManager.getCurrentTheme()
- .getColorRegistry()
- .get(CommonThemes.COLOR_CATEGORY));
- getViewer().refresh();
- }
- }
- };
-
- private TaskListToolTip taskListToolTip;
-
- private void configureGradientColors() {
- categoryGradientStart = themeManager.getCurrentTheme().getColorRegistry().get(
- CommonThemes.COLOR_CATEGORY_GRADIENT_START);
- categoryGradientEnd = themeManager.getCurrentTheme().getColorRegistry().get(
- CommonThemes.COLOR_CATEGORY_GRADIENT_END);
-
- boolean customized = true;
- if (categoryGradientStart != null && categoryGradientStart.getRed() == 240
- && categoryGradientStart.getGreen() == 240 && categoryGradientStart.getBlue() == 240
- && categoryGradientEnd != null && categoryGradientEnd.getRed() == 220
- && categoryGradientEnd.getGreen() == 220 && categoryGradientEnd.getBlue() == 220) {
- customized = false;
- }
-
- if (gradientListenerAdded == false && categoryGradientStart != null
- && !categoryGradientStart.equals(categoryGradientEnd)) {
- getViewer().getTree().addListener(SWT.EraseItem, CATEGORY_GRADIENT_DRAWER);
- gradientListenerAdded = true;
- if (!customized) {
- // Set parent-based colors
- Color parentBackground = getViewer().getTree().getParent().getBackground();
- double GRADIENT_TOP = 1.05;// 1.02;
- double GRADIENT_BOTTOM = .995;// 1.035;
-
- int red = Math.min(255, (int) (parentBackground.getRed() * GRADIENT_TOP));
- int green = Math.min(255, (int) (parentBackground.getGreen() * GRADIENT_TOP));
- int blue = Math.min(255, (int) (parentBackground.getBlue() * GRADIENT_TOP));
-
- try {
- categoryGradientStart = new Color(Display.getDefault(), red, green, blue);
- } catch (Exception e) {
- categoryGradientStart = getViewer().getTree().getParent().getBackground();
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Could not set color: " + red
- + ", " + green + ", " + blue, e));
- }
- red = Math.max(0, (int) (parentBackground.getRed() / GRADIENT_BOTTOM));
- green = Math.max(0, (int) (parentBackground.getGreen() / GRADIENT_BOTTOM));
- blue = Math.max(0, (int) (parentBackground.getBlue() / GRADIENT_BOTTOM));
- if (red > 255) {
- red = 255;
- }
- try {
- categoryGradientEnd = new Color(Display.getDefault(), red, green, blue);
- } catch (Exception e) {
- categoryGradientStart = getViewer().getTree().getParent().getBackground();
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Could not set color: " + red
- + ", " + green + ", " + blue, e));
- }
- }
- } else if (categoryGradientStart != null && categoryGradientStart.equals(categoryGradientEnd)) {
- getViewer().getTree().removeListener(SWT.EraseItem, CATEGORY_GRADIENT_DRAWER);
- gradientListenerAdded = false;
- }
- }
-
- public static TaskListView getFromActivePerspective() {
- if (PlatformUI.isWorkbenchRunning()) {
- IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- if (activePage != null) {
- IViewPart view = activePage.findView(ID);
- if (view instanceof TaskListView) {
- return (TaskListView) view;
- }
- }
- }
- return null;
- }
-
- public TaskListView() {
- PlatformUI.getWorkbench().getWorkingSetManager().addPropertyChangeListener(this);
- TasksUiPlugin.getTaskActivityManager().addActivityListener(TASK_ACTIVITY_LISTENER);
- TasksUiPlugin.getTaskActivityManager().addActivationListener(TASK_ACTIVATION_LISTENER);
- TasksUiInternal.getTaskList().addChangeListener(TASKLIST_CHANGE_LISTENER);
- }
-
- @Override
- public void dispose() {
- super.dispose();
- TasksUiInternal.getTaskList().removeChangeListener(TASKLIST_CHANGE_LISTENER);
- TasksUiPlugin.getTaskActivityManager().removeActivityListener(TASK_ACTIVITY_LISTENER);
- TasksUiPlugin.getTaskActivityManager().removeActivationListener(TASK_ACTIVATION_LISTENER);
-
- PlatformUI.getWorkbench().getWorkingSetManager().removePropertyChangeListener(this);
- if (PlatformUI.getWorkbench().getActiveWorkbenchWindow() != null) {
- PlatformUI.getWorkbench().getActiveWorkbenchWindow().removePageListener(PAGE_LISTENER);
- }
-
- final IThemeManager themeManager = getSite().getWorkbenchWindow().getWorkbench().getThemeManager();
- if (themeManager != null) {
- themeManager.removePropertyChangeListener(THEME_CHANGE_LISTENER);
- }
-
- categoryGradientStart.dispose();
- categoryGradientEnd.dispose();
- }
-
- private void updateDescription() {
- ITask task = TasksUi.getTaskActivityManager().getActiveTask();
- if (getSite() == null || getSite().getPage() == null) {
- return;
- }
-
- IViewReference reference = getSite().getPage().findViewReference(ID);
- boolean shouldSetDescription = false;
- if (reference != null && reference.isFastView() && !getSite().getPage().isPartVisible(this)) {
- shouldSetDescription = true;
- }
-
- if (task != null) {
- setTitleToolTip(PART_NAME + " (" + task.getSummary() + ")");
- if (shouldSetDescription) {
- setContentDescription(task.getSummary());
- } else {
- setContentDescription("");
- }
- } else {
- setTitleToolTip(PART_NAME);
- if (shouldSetDescription) {
- setContentDescription(LABEL_NO_TASKS);
- } else {
- setContentDescription("");
- }
- }
- }
-
- @Override
- public void init(IViewSite site, IMemento memento) throws PartInitException {
- init(site);
- this.taskListMemento = memento;
- }
-
- @Override
- public void saveState(IMemento memento) {
- IMemento sorter = memento.createChild(MEMENTO_SORT_INDEX);
- IMemento m = sorter.createChild(MEMENTO_KEY_SORTER);
- switch (tableSorter.getSortByIndex()) {
- case SUMMARY:
- m.putInteger(MEMENTO_KEY_SORT_INDEX, 1);
- break;
- case DATE_CREATED:
- m.putInteger(MEMENTO_KEY_SORT_INDEX, 2);
- break;
- default:
- m.putInteger(MEMENTO_KEY_SORT_INDEX, 0);
- }
-
- m.putInteger(MEMENTO_KEY_SORT_DIRECTION, tableSorter.getSortDirection());
- IMemento m2 = sorter.createChild(MEMENTO_KEY_SORTER2);
- switch (tableSorter.getSortByIndex2()) {
- case SUMMARY:
- m2.putInteger(MEMENTO_KEY_SORT_INDEX, 1);
- break;
- case DATE_CREATED:
- m2.putInteger(MEMENTO_KEY_SORT_INDEX, 2);
- break;
- default:
- m2.putInteger(MEMENTO_KEY_SORT_INDEX, 0);
- }
-
- m2.putInteger(MEMENTO_KEY_SORT_DIRECTION, tableSorter.getSortDirection2());
- memento.putString(MEMENTO_LINK_WITH_EDITOR, Boolean.toString(linkWithEditor));
- memento.putString(MEMENTO_PRESENTATION, currentPresentation.getId());
- }
-
- private void restoreState() {
- tableSorter = null;
- if (taskListMemento != null) {
- IMemento sorterMemento = taskListMemento.getChild(MEMENTO_SORT_INDEX);
- int restoredSortIndex = 0;
- if (sorterMemento != null) {
- int sortDirection = -1;
- tableSorter = new TaskListTableSorter(this);
- IMemento m = sorterMemento.getChild(MEMENTO_KEY_SORTER);
- if (m != null) {
- Integer sortIndexInt = m.getInteger(MEMENTO_KEY_SORT_INDEX);
- if (sortIndexInt != null) {
- restoredSortIndex = sortIndexInt.intValue();
- }
- Integer sortDirInt = m.getInteger(MEMENTO_KEY_SORT_DIRECTION);
- if (sortDirInt != null) {
- sortDirection = sortDirInt.intValue();
- tableSorter.setSortDirection(sortDirection);
- switch (restoredSortIndex) {
- case 1:
- tableSorter.setSortByIndex(SortByIndex.SUMMARY);
- break;
- case 2:
- tableSorter.setSortByIndex(SortByIndex.DATE_CREATED);
- break;
- default:
- tableSorter.setSortByIndex(SortByIndex.PRIORITY);
- }
- }
- }
-
- IMemento m2 = sorterMemento.getChild(MEMENTO_KEY_SORTER2);
- if (m2 != null) {
- Integer sortIndexInt = m2.getInteger(MEMENTO_KEY_SORT_INDEX);
- if (sortIndexInt != null) {
- restoredSortIndex = sortIndexInt.intValue();
- }
- Integer sortDirInt = m2.getInteger(MEMENTO_KEY_SORT_DIRECTION);
- if (sortDirInt != null) {
- sortDirection = sortDirInt.intValue();
- tableSorter.setSortDirection2(sortDirection);
- switch (restoredSortIndex) {
- case 1:
- tableSorter.setSortByIndex2(SortByIndex.SUMMARY);
- break;
- case 2:
- tableSorter.setSortByIndex2(SortByIndex.DATE_CREATED);
- break;
- default:
- tableSorter.setSortByIndex2(SortByIndex.PRIORITY);
- }
- }
- }
- }
- applyPresentation(taskListMemento.getString(MEMENTO_PRESENTATION));
- }
-
- if (tableSorter == null) {
- tableSorter = new TaskListTableSorter(this);
- }
-
- filterWorkingSet = new TaskWorkingSetFilter();
- filterWorkingSet.updateWorkingSet(getSite().getPage().getAggregateWorkingSet());
- addFilter(filterWorkingSet);
- addFilter(filterPriority);
- if (TasksUiPlugin.getDefault().getPreferenceStore().contains(ITasksUiPreferenceConstants.FILTER_COMPLETE_MODE)) {
- addFilter(filterComplete);
- }
-
- //if (TasksUiPlugin.getDefault().getPreferenceStore().contains(TasksUiPreferenceConstants.FILTER_ARCHIVE_MODE)) {
- addFilter(filterArchive);
- //}
-
- // Restore "link with editor" value; by default true
- boolean linkValue = true;
- if (taskListMemento != null && taskListMemento.getString(MEMENTO_LINK_WITH_EDITOR) != null) {
- linkValue = Boolean.parseBoolean(taskListMemento.getString(MEMENTO_LINK_WITH_EDITOR));
- }
- setLinkWithEditor(linkValue);
-
- getViewer().setSorter(tableSorter);
- getViewer().refresh();
- }
-
- @Override
- public void createPartControl(Composite parent) {
- themeManager = getSite().getWorkbenchWindow().getWorkbench().getThemeManager();
- themeManager.addPropertyChangeListener(THEME_CHANGE_LISTENER);
-
- filteredTree = new TaskListFilteredTree(parent, SWT.MULTI | SWT.VERTICAL | /* SWT.H_SCROLL | */SWT.V_SCROLL
- | SWT_NO_SCROLL | SWT.FULL_SELECTION | SWT.HIDE_SELECTION, new SubstringPatternFilter());
- // Set to empty string to disable native tooltips (windows only?)
- // bug#160897
- // http://dev.eclipse.org/newslists/news.eclipse.platform.swt/msg29614.html
- getViewer().getTree().setToolTipText("");
-
- getViewer().getTree().setHeaderVisible(false);
- getViewer().setUseHashlookup(true);
- refreshJob = new TaskListRefreshJob(getViewer(), "Task List Refresh");
-
- configureColumns(columnNames, columnWidths);
-
- final IThemeManager themeManager = getSite().getWorkbenchWindow().getWorkbench().getThemeManager();
- Color categoryBackground = themeManager.getCurrentTheme().getColorRegistry().get(CommonThemes.COLOR_CATEGORY);
- taskListTableLabelProvider = new TaskTableLabelProvider(new TaskElementLabelProvider(true),
- PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator(), categoryBackground);
- getViewer().setLabelProvider(taskListTableLabelProvider);
-
- CellEditor[] editors = new CellEditor[columnNames.length];
- TextCellEditor textEditor = new TextCellEditor(getViewer().getTree());
- ((Text) textEditor.getControl()).setOrientation(SWT.LEFT_TO_RIGHT);
- editors[0] = textEditor;
- // editors[1] = new ComboBoxCellEditor(getViewer().getTree(),
- // editors[2] = new CheckboxCellEditor();
-
- getViewer().setCellEditors(editors);
- getViewer().setCellModifier(taskListCellModifier);
-
- tableSorter = new TaskListTableSorter(this);
- getViewer().setSorter(tableSorter);
-
- applyPresentation(CategorizedPresentation.ID);
-
- drillDownAdapter = new DrillDownAdapter(getViewer());
- getViewer().setInput(getViewSite());
-
- final int activationImageOffset = 20;
- CustomTaskListDecorationDrawer customDrawer = new CustomTaskListDecorationDrawer(this, activationImageOffset);
- getViewer().getTree().addListener(SWT.EraseItem, customDrawer);
- getViewer().getTree().addListener(SWT.PaintItem, customDrawer);
-
- getViewer().getTree().addMouseListener(new MouseListener() {
-
- public void mouseDown(MouseEvent e) {
- // NOTE: need e.x offset for Linux/GTK, which does not see
- // left-aligned items in tree
- Object selectedNode = ((Tree) e.widget).getItem(new Point(e.x + 70, e.y));
- if (selectedNode instanceof TreeItem) {
- Object selectedObject = ((TreeItem) selectedNode).getData();
- if (selectedObject instanceof ITask) {
- if (e.x > activationImageOffset && e.x < activationImageOffset + 13) {
- taskListCellModifier.toggleTaskActivation((TreeItem) selectedNode);
- }
- }
- }
- }
-
- public void mouseDoubleClick(MouseEvent e) {
- // ignore
- }
-
- public void mouseUp(MouseEvent e) {
- // ignore
- }
-
- });
-
- // TODO make these proper commands and move code into TaskListViewCommands
- getViewer().getTree().addKeyListener(new KeyListener() {
-
- public void keyPressed(KeyEvent e) {
- if (e.keyCode == SWT.F2 && e.stateMask == 0) {
- if (renameAction.isEnabled()) {
- renameAction.run();
- }
- } else if ((e.keyCode & SWT.KEYCODE_BIT) != 0) {
- // Do nothing here since it is key code
- } else if (e.keyCode == SWT.ESC) {
- taskListToolTip.hide();
- } else if (e.keyCode == 'f' && e.stateMask == SWT.MOD1) {
- filteredTree.getFilterControl().setFocus();
- } else if (e.stateMask == 0) {
- if (Character.isLetter((char) e.keyCode) || Character.isDigit((char) e.keyCode)) {
- String string = new Character((char) e.keyCode).toString();
- filteredTree.getFilterControl().setText(string);
- filteredTree.getFilterControl().setSelection(1, 1);
- filteredTree.getFilterControl().setFocus();
- }
- }
- }
-
- public void keyReleased(KeyEvent e) {
- }
-
- });
-
- getViewer().addTreeListener(new ITreeViewerListener() {
-
- public void treeCollapsed(final TreeExpansionEvent event) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- getViewer().refresh(event.getElement());
- }
- });
- }
-
- public void treeExpanded(final TreeExpansionEvent event) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- getViewer().refresh(event.getElement());
- }
- });
- }
- });
-
- // HACK: shouldn't need to update explicitly
- getViewer().addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- Object selectedObject = ((IStructuredSelection) getViewer().getSelection()).getFirstElement();
- if (selectedObject instanceof ITaskContainer) {
- updateActionEnablement(renameAction, (ITaskContainer) selectedObject);
- updateActionEnablement(deleteAction, (ITaskContainer) selectedObject);
- }
- }
- });
-
- taskListToolTip = new TaskListToolTip(getViewer().getControl());
-
- // update tooltip contents
- getViewer().addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- updateToolTip(true);
- }
- });
-
- getViewer().getTree().addFocusListener(new FocusAdapter() {
- @Override
- public void focusLost(FocusEvent e) {
- taskListToolTip.hide();
- }
- });
-
- makeActions();
- hookGlobalActions();
- hookContextMenu();
- hookOpenAction();
- contributeToActionBars();
-
- configureGradientColors();
-
- initDragAndDrop(parent);
- expandToActiveTasks();
- restoreState();
-
- updateDescription();
-
- IContextService contextSupport = (IContextService) getSite().getService(IContextService.class);
- if (contextSupport != null) {
- contextSupport.activateContext(TaskListView.ID);
- }
-
- getSite().setSelectionProvider(getViewer());
- getSite().getPage().addPartListener(editorListener);
-
- // Need to do this because the page, which holds the active working set is not around on creation, see bug 203179
- PlatformUI.getWorkbench().getActiveWorkbenchWindow().addPageListener(PAGE_LISTENER);
- }
-
- private void hookGlobalActions() {
- IActionBars bars = getViewSite().getActionBars();
- bars.setGlobalActionHandler(ActionFactory.DELETE.getId(), deleteAction);
- bars.setGlobalActionHandler(ActionFactory.COPY.getId(), copyDetailsAction);
- }
-
- private void applyPresentation(String id) {
- if (id != null) {
- for (AbstractTaskListPresentation presentation : presentationsPrimary) {
- if (id.equals(presentation.getId())) {
- applyPresentation(presentation);
- return;
- }
- }
- for (AbstractTaskListPresentation presentation : presentationsSecondary) {
- if (id.equals(presentation.getId())) {
- applyPresentation(presentation);
- return;
- }
- }
- }
- }
-
- public void applyPresentation(AbstractTaskListPresentation presentation) {
- try {
- getViewer().getControl().setRedraw(false);
- if (!filteredTree.getFilterControl().getText().equals("")) {
- filteredTree.getFilterControl().setText("");
- }
- AbstractTaskListContentProvider contentProvider = presentation.getContentProvider(this);
- getViewer().setContentProvider(contentProvider);
- refresh(true);
-
- currentPresentation = presentation;
- } finally {
- getViewer().getControl().setRedraw(true);
- }
- }
-
- public AbstractTaskListPresentation getCurrentPresentation() {
- return currentPresentation;
- }
-
- private void configureColumns(final String[] columnNames, final int[] columnWidths) {
- TreeColumnLayout layout = (TreeColumnLayout) getViewer().getTree().getParent().getLayout();
- getViewer().setColumnProperties(columnNames);
- columns = new TreeColumn[columnNames.length];
- for (int i = 0; i < columnNames.length; i++) {
- columns[i] = new TreeColumn(getViewer().getTree(), 0);
- columns[i].setText(columnNames[i]);
-
- if (i == 0) {
- layout.setColumnData(columns[i], new ColumnWeightData(100));
- } else {
- layout.setColumnData(columns[i], new ColumnPixelData(columnWidths[i]));
- }
-
- columns[i].addSelectionListener(new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- tableSorter.setSortDirection(tableSorter.getSortDirection() * -1);
- getViewer().refresh(false);
- }
- });
- columns[i].addControlListener(new ControlListener() {
- public void controlResized(ControlEvent e) {
- for (int j = 0; j < columnWidths.length; j++) {
- if (columns[j].equals(e.getSource())) {
- columnWidths[j] = columns[j].getWidth();
- }
- }
- }
-
- public void controlMoved(ControlEvent e) {
- // don't care if the control is moved
- }
- });
- }
- }
-
- /**
- * Tracks editor activation and jump to corresponding task, if applicable
- */
- private final IPartListener editorListener = new IPartListener() {
-
- private void jumpToEditor(IWorkbenchPart part) {
- if (!linkWithEditor || !(part instanceof IEditorPart)) {
- return;
- }
- jumpToEditorTask((IEditorPart) part);
- }
-
- public void partActivated(IWorkbenchPart part) {
- if (part == TaskListView.this) {
- updateDescription();
- } else {
- jumpToEditor(part);
- }
- }
-
- public void partBroughtToTop(IWorkbenchPart part) {
- }
-
- public void partClosed(IWorkbenchPart part) {
- }
-
- public void partDeactivated(IWorkbenchPart part) {
- if (part == TaskListView.this) {
- IViewReference reference = getSite().getPage().findViewReference(ID);
- if (reference != null && reference.isFastView()) {
- updateDescription();
- }
- taskListToolTip.hide();
- }
- }
-
- public void partOpened(IWorkbenchPart part) {
- }
- };
-
- private void initDragAndDrop(Composite parent) {
- Transfer[] dragTypes = new Transfer[] { TaskTransfer.getInstance(), FileTransfer.getInstance() };
-
- Transfer[] dropTypes = new Transfer[] { TaskTransfer.getInstance(), FileTransfer.getInstance(),
- TextTransfer.getInstance(), RTFTransfer.getInstance() };
-
- getViewer().addDragSupport(DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK, dragTypes,
- new TaskDragSourceListener(getViewer()));
- getViewer().addDropSupport(DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK | DND.DROP_DEFAULT, dropTypes,
- new TaskListDropAdapter(getViewer()));
- }
-
- void expandToActiveTasks() {
- final IWorkbench workbench = PlatformUI.getWorkbench();
- workbench.getDisplay().asyncExec(new Runnable() {
- public void run() {
- ITask task = TasksUi.getTaskActivityManager().getActiveTask();
- if (task != null) {
- getViewer().expandToLevel(task, 0);
- }
- }
- });
- }
-
- private void hookContextMenu() {
- MenuManager menuManager = new MenuManager("#PopupMenu");
- menuManager.setRemoveAllWhenShown(true);
- menuManager.addMenuListener(new IMenuListener() {
- public void menuAboutToShow(IMenuManager manager) {
- TaskListView.this.fillContextMenu(manager);
- }
- });
- Menu menu = menuManager.createContextMenu(getViewer().getControl());
- getViewer().getControl().setMenu(menu);
- getSite().registerContextMenu(menuManager, getViewer());
- }
-
- private void contributeToActionBars() {
- IActionBars bars = getViewSite().getActionBars();
- fillLocalPullDown(bars.getMenuManager());
- fillLocalToolBar(bars.getToolBarManager());
- }
-
- private void fillLocalPullDown(IMenuManager manager) {
- updateDrillDownActions();
- manager.add(goUpAction);
- manager.add(collapseAll);
- manager.add(expandAll);
- manager.add(new Separator(ID_SEPARATOR_FILTERS));
- manager.add(sortDialogAction);
- manager.add(filterOnPriorityAction);
- manager.add(filterCompleteTask);
- //manager.add(filterArchiveCategory);
- manager.add(filterSubTasksAction);
-
- manager.add(new Separator(ID_SEPARATOR_TASKS));
- manager.add(synchronizeAutomatically);
-
- manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
-
- manager.addMenuListener(new IMenuListener() {
- public void menuAboutToShow(IMenuManager manager) {
- filterOnPriorityAction.updateCheckedState();
- }
- });
-
-// manager.add(new Separator());
- manager.add(linkWithEditorAction);
- manager.add(new Separator());
- manager.add(openPreferencesAction);
- }
-
- private void fillLocalToolBar(IToolBarManager manager) {
- manager.add(new Separator(ID_SEPARATOR_NEW));
-// manager.add(new Separator(ID_SEPARATOR_NAVIGATION));
- manager.add(presentationDropDownSelectionAction);
-// manager.add(previousTaskAction);
- manager.add(new Separator(ID_SEPARATOR_CONTEXT));
- manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
- }
-
- /*
- * TODO: clean up, consider relying on extension points for groups
- */
- private void fillContextMenu(final IMenuManager manager) {
- updateDrillDownActions();
- final ITaskContainer element;
-
- final Object firstSelectedObject = ((IStructuredSelection) getViewer().getSelection()).getFirstElement();
- if (firstSelectedObject instanceof ITaskContainer) {
- element = (ITaskContainer) firstSelectedObject;
- } else {
- element = null;
- }
- final List<IRepositoryElement> selectedElements = getSelectedTaskContainers();
- AbstractTask task = null;
- if (element instanceof ITask) {
- task = (AbstractTask) element;
- }
-
- manager.add(new Separator(ID_SEPARATOR_NEW));
- manager.add(new Separator());
-
- if (element instanceof ITask) {
- addAction(openAction, manager, element);
- }
- addAction(openWithBrowser, manager, element);
- if (task != null) {
- if (task.isActive()) {
- manager.add(deactivateAction);
- } else {
- manager.add(activateAction);
- }
- }
-
- manager.add(new Separator());
-
- Map<String, List<IDynamicSubMenuContributor>> dynamicMenuMap = TasksUiPlugin.getDefault().getDynamicMenuMap();
- for (String menuPath : dynamicMenuMap.keySet()) {
- if (!ID_SEPARATOR_CONTEXT.equals(menuPath)) {
- for (final IDynamicSubMenuContributor contributor : dynamicMenuMap.get(menuPath)) {
- SafeRunnable.run(new ISafeRunnable() {
- public void handleException(Throwable e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Menu contributor failed"));
- }
-
- public void run() throws Exception {
- MenuManager subMenuManager = contributor.getSubMenuManager(selectedElements);
- if (subMenuManager != null) {
- addMenuManager(subMenuManager, manager, element);
- }
- }
-
- });
- }
- }
- }
- manager.add(new Separator(ID_SEPARATOR_NAVIGATE));
-// manager.add(new Separator(ID_SEPARATOR_OPERATIONS));
- manager.add(new Separator());
-
- addAction(copyDetailsAction, manager, element);
- if (task != null) {
- // TODO: if selection parent is an Orphan container don't add this action
- addAction(removeFromCategoryAction, manager, element);
- }
- // This should also test for null, or else nothing to delete!
- addAction(deleteAction, manager, element);
- if (!(element instanceof ITask)) {
- addAction(renameAction, manager, element);
- }
-
- if (element != null && !(element instanceof ITask)) {
- manager.add(goIntoAction);
- }
- if (drilledIntoCategory != null) {
- manager.add(goUpAction);
- }
- manager.add(new Separator(ID_SEPARATOR_CONTEXT));
- manager.add(new Separator(ID_SEPARATOR_OPERATIONS));
-
- if (element instanceof ITask) {
- for (String menuPath : dynamicMenuMap.keySet()) {
- if (ID_SEPARATOR_CONTEXT.equals(menuPath)) {
- for (IDynamicSubMenuContributor contributor : dynamicMenuMap.get(menuPath)) {
- MenuManager subMenuManager = contributor.getSubMenuManager(selectedElements);
- if (subMenuManager != null) {
- addMenuManager(subMenuManager, manager, element);
- }
- }
- }
- }
- }
- if (element instanceof IRepositoryQuery) {
- EditRepositoryPropertiesAction repositoryPropertiesAction = new EditRepositoryPropertiesAction();
- repositoryPropertiesAction.selectionChanged(new StructuredSelection(element));
- if (repositoryPropertiesAction.isEnabled()) {
- MenuManager subMenu = new MenuManager("Repository");
- manager.add(subMenu);
-
- UpdateRepositoryConfigurationAction resetRepositoryConfigurationAction = new UpdateRepositoryConfigurationAction();
- resetRepositoryConfigurationAction.selectionChanged(new StructuredSelection(element));
- subMenu.add(resetRepositoryConfigurationAction);
- subMenu.add(new Separator());
- subMenu.add(repositoryPropertiesAction);
- }
- }
- manager.add(new Separator(ID_SEPARATOR_REPOSITORY));
- manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
-
- manager.add(new Separator());
- manager.add(new Separator(ID_SEPARATOR_PROPERTIES));
- }
-
- public List<IRepositoryElement> getSelectedTaskContainers() {
- List<IRepositoryElement> selectedElements = new ArrayList<IRepositoryElement>();
- for (Iterator<?> i = ((IStructuredSelection) getViewer().getSelection()).iterator(); i.hasNext();) {
- Object object = i.next();
- if (object instanceof ITaskContainer) {
- selectedElements.add((IRepositoryElement) object);
- }
- }
- return selectedElements;
- }
-
- private void addMenuManager(IMenuManager menuToAdd, IMenuManager manager, ITaskContainer element) {
- if ((element instanceof ITask) || element instanceof IRepositoryQuery) {
- manager.add(menuToAdd);
- }
- }
-
- private void addAction(Action action, IMenuManager manager, ITaskContainer element) {
- manager.add(action);
- if (element != null) {
- updateActionEnablement(action, element);
- }
- }
-
- // FIXME move the enablement to the action classes
- private void updateActionEnablement(Action action, ITaskContainer element) {
- if (element instanceof ITask) {
- if (action instanceof OpenWithBrowserAction) {
- if (TasksUiInternal.isValidUrl(((ITask) element).getUrl())) {
- action.setEnabled(true);
- } else {
- action.setEnabled(false);
- }
- } else if (action instanceof DeleteAction) {
- action.setEnabled(true);
- } else if (action instanceof OpenTaskListElementAction) {
- action.setEnabled(true);
- } else if (action instanceof CopyTaskDetailsAction) {
- action.setEnabled(true);
- } else if (action instanceof RenameAction) {
- action.setEnabled(true);
- }
- } else if (element != null) {
- if (action instanceof MarkTaskCompleteAction) {
- action.setEnabled(false);
- } else if (action instanceof MarkTaskIncompleteAction) {
- action.setEnabled(false);
- } else if (action instanceof DeleteAction) {
- if (element instanceof UncategorizedTaskContainer || element instanceof UnmatchedTaskContainer) {
- action.setEnabled(false);
- } else {
- action.setEnabled(true);
- }
- } else if (action instanceof GoIntoAction) {
- TaskCategory cat = (TaskCategory) element;
- if (cat.getChildren().size() > 0) {
- action.setEnabled(true);
- } else {
- action.setEnabled(false);
- }
- } else if (action instanceof OpenTaskListElementAction) {
- action.setEnabled(true);
- } else if (action instanceof CopyTaskDetailsAction) {
- action.setEnabled(true);
- } else if (action instanceof RenameAction) {
- if (element instanceof AbstractTaskCategory) {
- AbstractTaskCategory container = (AbstractTaskCategory) element;
- action.setEnabled(container.isUserManaged());
- } else if (element instanceof IRepositoryQuery) {
- action.setEnabled(true);
- }
- }
- } else {
- action.setEnabled(true);
- }
- }
-
- private void makeActions() {
- copyDetailsAction = new CopyTaskDetailsAction();
- copyDetailsAction.setActionDefinitionId(IWorkbenchActionDefinitionIds.COPY);
-
- goIntoAction = new GoIntoAction();
- goUpAction = new GoUpAction(drillDownAdapter);
-
- //newLocalTaskAction = new NewLocalTaskAction(this);
- removeFromCategoryAction = new RemoveFromCategoryAction(this);
- renameAction = new RenameAction(this);
- filteredTree.getViewer().addSelectionChangedListener(renameAction);
-
- deleteAction = new DeleteAction();
- collapseAll = new CollapseAllAction(this);
- expandAll = new ExpandAllAction(this);
- openAction = new OpenTaskListElementAction(this.getViewer());
- openWithBrowser = new OpenWithBrowserAction();
- filterCompleteTask = new FilterCompletedTasksAction(this);
- filterSubTasksAction = new GroupSubTasksAction(this);
- synchronizeAutomatically = new SynchronizeAutomaticallyAction();
- openPreferencesAction = new OpenTasksUiPreferencesAction();
- //filterArchiveCategory = new FilterArchiveContainerAction(this);
- sortDialogAction = new TaskListSortAction(getSite(), this);
- filterOnPriorityAction = new PriorityDropDownAction(this);
- linkWithEditorAction = new LinkWithEditorAction(this);
- presentationDropDownSelectionAction = new PresentationDropDownSelectionAction(this);
-
- filteredTree.getViewer().addSelectionChangedListener(openWithBrowser);
- filteredTree.getViewer().addSelectionChangedListener(copyDetailsAction);
- }
-
- private void hookOpenAction() {
- getViewer().addOpenListener(new IOpenListener() {
- public void open(OpenEvent event) {
- openAction.run();
- }
- });
-
- getViewer().addDoubleClickListener(new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent event) {
- if (TasksUiPlugin.getDefault().getPreferenceStore().getBoolean(
- ITasksUiPreferenceConstants.ACTIVATE_WHEN_OPENED)) {
- AbstractTask selectedTask = TaskListView.getFromActivePerspective().getSelectedTask();
- if (selectedTask != null) {
- activateAction.run(selectedTask);
- }
- }
- }
- });
- }
-
- /**
- * Passing the focus request to the viewer's control.
- */
- @Override
- public void setFocus() {
- filteredTree.getViewer().getControl().setFocus();
- }
-
- public String getBugIdFromUser() {
- InputDialog dialog = new InputDialog(getSite().getWorkbenchWindow().getShell(), "Enter Bugzilla ID",
- "Enter the Bugzilla ID: ", "", null);
- int dialogResult = dialog.open();
- if (dialogResult == Window.OK) {
- return dialog.getValue();
- } else {
- return null;
- }
- }
-
- public void refresh(boolean expandIfFocused) {
- if (expandIfFocused && isFocusedMode()) {
- try {
- getViewer().getControl().setRedraw(false);
- refreshJob.refreshNow();
- getViewer().expandAll();
- } finally {
- getViewer().getControl().setRedraw(true);
- }
- } else {
- refreshJob.refreshNow();
- }
- }
-
- public void refresh() {
- refreshJob.refreshNow();
-// if (expand) {
-// getViewer().expandAll();
-// }
-// getViewer().refresh();
-// refresh(null);
-// selectedAndFocusTask(TasksUiPlugin.getTaskList().getActiveTask());
- }
-
- public TaskListToolTip getToolTip() {
- return taskListToolTip;
- }
-
- public TreeViewer getViewer() {
- return filteredTree.getViewer();
- }
-
- public TaskCompletionFilter getCompleteFilter() {
- return filterComplete;
- }
-
- public TaskPriorityFilter getPriorityFilter() {
- return filterPriority;
- }
-
- public void addFilter(AbstractTaskListFilter filter) {
- if (!filters.contains(filter)) {
- filters.add(filter);
- }
- }
-
- /**
- * @API-3.0 eliminate parameter from this method
- */
- public void clearFilters(boolean preserveArchiveFilter) {
- filters.clear();
- filters.add(filterArchive);
- filters.add(filterWorkingSet);
- }
-
- public void removeFilter(AbstractTaskListFilter filter) {
- filters.remove(filter);
- }
-
- public void updateDrillDownActions() {
- if (drillDownAdapter.canGoBack()) {
- goUpAction.setEnabled(true);
- } else {
- goUpAction.setEnabled(false);
- }
- }
-
- boolean isInRenameAction = false;
-
- private DelayedRefreshJob refreshJob;
-
- public void setInRenameAction(boolean b) {
- isInRenameAction = b;
- }
-
- public void goIntoCategory() {
- ISelection selection = getViewer().getSelection();
- if (selection instanceof StructuredSelection) {
- StructuredSelection structuredSelection = (StructuredSelection) selection;
- Object element = structuredSelection.getFirstElement();
- if (element instanceof ITaskContainer) {
- drilledIntoCategory = (AbstractTaskContainer) element;
- drillDownAdapter.goInto();
- IActionBars bars = getViewSite().getActionBars();
- bars.getToolBarManager().remove(goUpAction.getId());
- bars.getToolBarManager().add(goUpAction);
- bars.updateActionBars();
- updateDrillDownActions();
- }
- }
- }
-
- public void goUpToRoot() {
- drilledIntoCategory = null;
- drillDownAdapter.goBack();
- IActionBars bars = getViewSite().getActionBars();
- bars.getToolBarManager().remove(GoUpAction.ID);
- bars.updateActionBars();
- updateDrillDownActions();
- }
-
- public AbstractTask getSelectedTask() {
- ISelection selection = getViewer().getSelection();
- if (selection.isEmpty()) {
- return null;
- }
- if (selection instanceof StructuredSelection) {
- StructuredSelection structuredSelection = (StructuredSelection) selection;
- Object element = structuredSelection.getFirstElement();
- if (element instanceof ITask) {
- return (AbstractTask) structuredSelection.getFirstElement();
- }
- }
- return null;
- }
-
- public static AbstractTask getSelectedTask(ISelection selection) {
- if (selection instanceof StructuredSelection) {
- StructuredSelection structuredSelection = (StructuredSelection) selection;
- if (structuredSelection.size() != 1) {
- return null;
- }
- Object element = structuredSelection.getFirstElement();
- if (element instanceof ITask) {
- return (AbstractTask) structuredSelection.getFirstElement();
- }
- }
- return null;
- }
-
- public void indicatePaused(boolean paused) {
- isPaused = paused;
- IStatusLineManager statusLineManager = getViewSite().getActionBars().getStatusLineManager();
- if (isPaused) {
- statusLineManager.setMessage(CommonImages.getImage(TasksUiImages.TASKS_VIEW),
- "Mylyn context capture paused");
- setPartName("(paused) " + PART_NAME);
- } else {
- statusLineManager.setMessage("");
- setPartName(PART_NAME);
- }
- }
-
- public AbstractTaskContainer getDrilledIntoCategory() {
- return drilledIntoCategory;
- }
-
- public TaskListFilteredTree getFilteredTree() {
- return filteredTree;
- }
-
- public void selectedAndFocusTask(ITask task) {
- if (task == null || getViewer().getControl().isDisposed()) {
- return;
- }
- saveSelection();
-
- IStructuredSelection selection = restoreSelection(task);
- getViewer().setSelection(selection, true);
- }
-
- private void saveSelection() {
- IStructuredSelection selection = (IStructuredSelection) getViewer().getSelection();
- if (!selection.isEmpty()) {
- if (selection.getFirstElement() instanceof ITaskContainer) {
- // make sure the new selection is inserted at the end of the
- // list
- String handle = ((IRepositoryElement) selection.getFirstElement()).getHandleIdentifier();
- lastSelectionByTaskHandle.remove(handle);
- lastSelectionByTaskHandle.put(handle, selection);
-
- if (lastSelectionByTaskHandle.size() > SIZE_MAX_SELECTION_HISTORY) {
- Iterator<String> it = lastSelectionByTaskHandle.keySet().iterator();
- it.next();
- it.remove();
- }
- }
- }
- }
-
- private IStructuredSelection restoreSelection(IRepositoryElement task) {
- IStructuredSelection selection = lastSelectionByTaskHandle.get(task.getHandleIdentifier());
- if (selection != null) {
- return selection;
- } else {
- return new StructuredSelection(task);
- }
- }
-
- public Image[] getPirorityImages() {
- Image[] images = new Image[PriorityLevel.values().length];
- for (int i = 0; i < PriorityLevel.values().length; i++) {
- images[i] = TasksUiImages.getImageForPriority(PriorityLevel.values()[i]);
- }
- return images;
- }
-
- public Set<AbstractTaskListFilter> getFilters() {
- return filters;
- }
-
- public static String getCurrentPriorityLevel() {
- if (TasksUiPlugin.getDefault().getPreferenceStore().contains(ITasksUiPreferenceConstants.FILTER_PRIORITY)) {
- return TasksUiPlugin.getDefault().getPreferenceStore().getString(
- ITasksUiPreferenceConstants.FILTER_PRIORITY);
- } else {
- return PriorityLevel.P5.toString();
- }
- }
-
- public TaskArchiveFilter getArchiveFilter() {
- return filterArchive;
- }
-
- public void setManualFiltersEnabled(boolean enabled) {
- sortDialogAction.setEnabled(enabled);
- filterOnPriorityAction.setEnabled(enabled);
- filterCompleteTask.setEnabled(enabled);
- //filterArchiveCategory.setEnabled(enabled);
- }
-
- public boolean isFocusedMode() {
- return focusedMode;
- }
-
- public void setFocusedMode(boolean focusedMode) {
- this.focusedMode = focusedMode;
- }
-
- public void setSynchronizationOverlaid(boolean synchronizationOverlaid) {
- this.synchronizationOverlaid = synchronizationOverlaid;
- getViewer().refresh();
- }
-
- public void displayPrioritiesAbove(String priority) {
- filterPriority.displayPrioritiesAbove(priority);
- getViewer().refresh();
- }
-
- public void propertyChange(PropertyChangeEvent event) {
- String property = event.getProperty();
- if (IWorkingSetManager.CHANGE_WORKING_SET_CONTENT_CHANGE.equals(property)
- || IWorkingSetManager.CHANGE_WORKING_SET_REMOVE.equals(property)) {
- if (getSite() != null && getSite().getPage() != null) {
- if (filterWorkingSet.updateWorkingSet(getSite().getPage().getAggregateWorkingSet())) {
- try {
- getViewer().getControl().setRedraw(false);
- // XXX why is this needed?
- //getViewer().collapseAll();
- getViewer().refresh();
- if (isFocusedMode()) {
- getViewer().expandAll();
- }
- } finally {
- getViewer().getControl().setRedraw(true);
- }
- }
- }
-
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- filteredTree.indicateActiveTaskWorkingSet();
- }
- });
- }
- }
-
- public void setLinkWithEditor(boolean linkWithEditor) {
- this.linkWithEditor = linkWithEditor;
- linkWithEditorAction.setChecked(linkWithEditor);
- if (linkWithEditor) {
- IEditorPart activeEditor = getSite().getPage().getActiveEditor();
- if (activeEditor != null) {
- jumpToEditorTask(activeEditor);
- }
- }
- }
-
- private void jumpToEditorTask(IEditorPart editor) {
- IEditorInput input = editor.getEditorInput();
- if (input instanceof TaskEditorInput) {
- ITask task = ((TaskEditorInput) input).getTask();
- ITask selected = getSelectedTask();
- if (selected == null || !selected.equals(task)) {
- selectedAndFocusTask(task);
- }
- }
- }
-
- private void updateToolTip(boolean force) {
- if (taskListToolTip != null && taskListToolTip.isVisible()) {
- if (!force && taskListToolTip.isTriggeredByMouse()) {
- return;
- }
-
- TreeItem[] selection = getViewer().getTree().getSelection();
- if (selection != null && selection.length > 0) {
- Rectangle bounds = selection[0].getBounds();
- taskListToolTip.show(new Point(bounds.x, bounds.y));
- }
- }
- }
-
- public static Set<IWorkingSet> getActiveWorkingSets() {
- if (PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage() != null) {
- Set<IWorkingSet> allSets = new HashSet<IWorkingSet>(Arrays.asList(PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow()
- .getActivePage()
- .getWorkingSets()));
- Set<IWorkingSet> tasksSets = new HashSet<IWorkingSet>(allSets);
- for (IWorkingSet workingSet : allSets) {
- if (workingSet.getId() == null
- || !workingSet.getId().equalsIgnoreCase(TaskWorkingSetUpdater.ID_TASK_WORKING_SET)) {
- tasksSets.remove(workingSet);
- }
- }
- return tasksSets;
- } else {
- return Collections.emptySet();
- }
- }
-
- /**
- * This can be used for experimentally adding additional presentations, but note that this convention is extremely
- * likely to change in the Mylyn 3.0 cycle.
- */
- public static List<AbstractTaskListPresentation> getPresentations() {
- List<AbstractTaskListPresentation> presentations = new ArrayList<AbstractTaskListPresentation>();
- presentations.addAll(presentationsPrimary);
- presentations.addAll(presentationsSecondary);
- return presentations;
- }
-
- public static void addPresentation(AbstractTaskListPresentation presentation) {
- if (presentation.isPrimary()) {
- presentationsPrimary.add(presentation);
- } else {
- presentationsSecondary.add(presentation);
- }
- }
-
- public TaskListTableSorter getSorter() {
- return tableSorter;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoriesSorter.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoriesSorter.java
deleted file mode 100644
index 9255d0a81..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoriesSorter.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.views;
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.mylyn.internal.tasks.core.IRepositoryConstants;
-import org.eclipse.mylyn.internal.tasks.core.LocalRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-/**
- * @author Mik Kersten
- */
-public class TaskRepositoriesSorter extends ViewerSorter {
-
- @Override
- public int compare(Viewer viewer, Object e1, Object e2) {
- if (e1 instanceof TaskRepository && e2 instanceof TaskRepository) {
- TaskRepository t1 = (TaskRepository) e1;
- TaskRepository t2 = (TaskRepository) e2;
-
- String label1 = t1.getProperty(IRepositoryConstants.PROPERTY_LABEL);
- String label2 = t2.getProperty(IRepositoryConstants.PROPERTY_LABEL);
-
- if (LocalRepositoryConnector.REPOSITORY_LABEL.equals(label1)) {
- return -1;
- } else if (LocalRepositoryConnector.REPOSITORY_LABEL.equals(label2)) {
- return 1;
- }
-
- if (!t1.getConnectorKind().equals(t2.getConnectorKind())) {
- return (t1.getConnectorKind()).compareTo(t2.getConnectorKind());
- } else {
- if ((label1 == null || label1.equals("")) && label2 != null) {
- return 1;
- } else if (label1 != null && (label2 == null || label2.equals(""))) {
- return -1;
- } else if (label1 != null && label2 != null) {
- return label1.compareTo(label2);
- } else {
- return (t1.getRepositoryUrl()).compareTo(t2.getRepositoryUrl());
- }
- }
- } else {
- return super.compare(viewer, e1, e2);
- }
- }
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoriesView.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoriesView.java
deleted file mode 100644
index e472ecd6d..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoriesView.java
+++ /dev/null
@@ -1,297 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.ui.views;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.viewers.DecoratingLabelProvider;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.mylyn.internal.tasks.core.IRepositoryModelListener;
-import org.eclipse.mylyn.internal.tasks.core.TaskRepositoryAdapter;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.actions.AddRepositoryAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.DeleteTaskRepositoryAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.EditRepositoryPropertiesAction;
-import org.eclipse.mylyn.tasks.core.IRepositoryListener;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.ActionFactory;
-import org.eclipse.ui.actions.BaseSelectionListenerAction;
-import org.eclipse.ui.part.ViewPart;
-
-/**
- * @author Mik Kersten
- */
-public class TaskRepositoriesView extends ViewPart {
-
- public static final String ID = "org.eclipse.mylyn.tasks.ui.views.repositories";
-
- private TableViewer viewer;
-
- private final Action addRepositoryAction = new AddRepositoryAction();
-
- private BaseSelectionListenerAction deleteRepositoryAction;
-
- private BaseSelectionListenerAction repositoryPropertiesAction;
-
- private BaseSelectionListenerAction resetConfigurationAction;
-
- private DisconnectRepositoryAction offlineAction;
-
- private void asyncExec(Runnable runnable) {
- if (Display.getCurrent() != null) {
- runnable.run();
- } else {
- Display.getDefault().asyncExec(runnable);
- }
- }
-
- private final IRepositoryModelListener MODEL_LISTENER = new IRepositoryModelListener() {
-
- public void loaded() {
- asyncExec(new Runnable() {
- public void run() {
- refresh();
- }
- });
- }
- };
-
- private final IRepositoryListener REPOSITORY_LISTENER = new TaskRepositoryAdapter() {
-
- @Override
- public void repositoryAdded(TaskRepository repository) {
- asyncExec(new Runnable() {
- public void run() {
- refresh();
- }
- });
- }
-
- @Override
- public void repositoryRemoved(TaskRepository repository) {
- asyncExec(new Runnable() {
- public void run() {
- refresh();
- }
- });
- }
-
- @Override
- public void repositorySettingsChanged(TaskRepository repository) {
- asyncExec(new Runnable() {
- public void run() {
- refresh();
- }
- });
- }
- };
-
- static class ViewContentProvider implements IStructuredContentProvider {
- public void inputChanged(Viewer v, Object oldInput, Object newInput) {
- }
-
- public void dispose() {
- }
-
- public Object[] getElements(Object parent) {
- return TasksUi.getRepositoryManager().getAllRepositories().toArray();
- }
- }
-
- public TaskRepositoriesView() {
- TasksUi.getRepositoryManager().addListener(REPOSITORY_LISTENER);
- TasksUiPlugin.getDefault().addModelListener(MODEL_LISTENER);
- }
-
- @Override
- public void dispose() {
- super.dispose();
- TasksUiPlugin.getRepositoryManager().removeListener(REPOSITORY_LISTENER);
- TasksUiPlugin.getDefault().removeModelListener(MODEL_LISTENER);
- }
-
- public static TaskRepositoriesView getFromActivePerspective() {
- if (PlatformUI.getWorkbench().getActiveWorkbenchWindow() != null) {
- IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- if (activePage == null) {
- return null;
- }
- IViewPart view = activePage.findView(ID);
- if (view instanceof TaskRepositoriesView) {
- return (TaskRepositoriesView) view;
- }
- }
- return null;
- }
-
- public static TaskRepositoriesView openInActivePerspective() {
- try {
- return (TaskRepositoriesView) PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow()
- .getActivePage()
- .showView(ID);
- } catch (Exception e) {
- return null;
- }
- }
-
- @Override
- public void createPartControl(Composite parent) {
- viewer = new TableViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION);
- viewer.setContentProvider(new ViewContentProvider());
-
- viewer.setLabelProvider(new DecoratingLabelProvider(new TaskRepositoryLabelProvider(),
- PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator()));
-
- viewer.setSorter(new TaskRepositoriesSorter());
-
-// new ViewerSorter() {
-//
-// @Override
-// public int compare(Viewer viewer, Object e1, Object e2) {
-// if (e1 instanceof TaskRepository && e2 instanceof TaskRepository) {
-// TaskRepository t1 = (TaskRepository) e1;
-// TaskRepository t2 = (TaskRepository) e2;
-// return (t1.getKind() + t1.getUrl()).compareTo(t2.getKind() + t2.getUrl());
-// } else {
-// return super.compare(viewer, e1, e2);
-// }
-// }
-// });
- viewer.setInput(getViewSite());
- viewer.addDoubleClickListener(new IDoubleClickListener() {
-
- public void doubleClick(DoubleClickEvent event) {
- if (repositoryPropertiesAction.isEnabled()) {
- repositoryPropertiesAction.run();
- }
- }
- });
-
- TasksUi.getRepositoryManager().addListener(new TaskRepositoryListener());
-
- makeActions();
- hookContextMenu();
- hookGlobalActions();
- contributeToActionBars();
- getSite().setSelectionProvider(getViewer());
- }
-
- private void hookGlobalActions() {
- IActionBars bars = getViewSite().getActionBars();
- bars.setGlobalActionHandler(ActionFactory.DELETE.getId(), deleteRepositoryAction);
- bars.setGlobalActionHandler(ActionFactory.REFRESH.getId(), resetConfigurationAction);
- }
-
- private void makeActions() {
- deleteRepositoryAction = new DeleteTaskRepositoryAction();
- viewer.addSelectionChangedListener(deleteRepositoryAction);
-
- repositoryPropertiesAction = new EditRepositoryPropertiesAction();
- viewer.addSelectionChangedListener(repositoryPropertiesAction);
-
- resetConfigurationAction = new UpdateRepositoryConfigurationAction();
- resetConfigurationAction.setActionDefinitionId("org.eclipse.ui.file.refresh");
- viewer.addSelectionChangedListener(resetConfigurationAction);
-
- offlineAction = new DisconnectRepositoryAction();
- viewer.addSelectionChangedListener(offlineAction);
- }
-
- private void hookContextMenu() {
- MenuManager menuMgr = new MenuManager("#PopupMenu");
- menuMgr.setRemoveAllWhenShown(true);
- menuMgr.addMenuListener(new IMenuListener() {
- public void menuAboutToShow(IMenuManager manager) {
- TaskRepositoriesView.this.fillContextMenu(manager);
- }
- });
- Menu menu = menuMgr.createContextMenu(viewer.getControl());
- viewer.getControl().setMenu(menu);
- getSite().registerContextMenu(menuMgr, viewer);
- }
-
- private void contributeToActionBars() {
- IActionBars bars = getViewSite().getActionBars();
- fillLocalPullDown(bars.getMenuManager());
- fillLocalToolBar(bars.getToolBarManager());
- }
-
- private void fillLocalPullDown(IMenuManager manager) {
- manager.add(addRepositoryAction);
- }
-
- private void fillContextMenu(IMenuManager manager) {
- manager.add(addRepositoryAction);
- manager.add(new Separator());
- manager.add(deleteRepositoryAction);
- manager.add(resetConfigurationAction);
- manager.add(new Separator());
- manager.add(offlineAction);
- manager.add(new Separator("repository"));
- manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
- manager.add(new Separator());
- manager.add(repositoryPropertiesAction);
- }
-
- private void fillLocalToolBar(IToolBarManager manager) {
- manager.add(addRepositoryAction);
- }
-
- /**
- * Passing the focus request to the viewer's control.
- */
- @Override
- public void setFocus() {
- viewer.getControl().setFocus();
- }
-
- public void refresh() {
- if (viewer != null && !viewer.getControl().isDisposed()) {
- viewer.refresh();
- }
- }
-
- public TableViewer getViewer() {
- return viewer;
- }
-
- public class TaskRepositoryListener extends TaskRepositoryAdapter {
-
- @Override
- public void repositorySettingsChanged(TaskRepository repository) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- if (!getViewer().getControl().isDisposed()) {
- getViewer().refresh(true);
- }
- }
- });
- }
-
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoryLabelProvider.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoryLabelProvider.java
deleted file mode 100644
index 612b60859..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoryLabelProvider.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.views;
-
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * @author Mik Kersten
- */
-public class TaskRepositoryLabelProvider implements ILabelProvider {
-
-//extends LabelProvider implements ITableLabelProvider {
-
- public Image getColumnImage(Object obj, int index) {
- if (index == 0) {
- return getImage(obj);
- } else {
- return null;
- }
- }
-
- public Image getImage(Object object) {
- if (object instanceof AbstractRepositoryConnector) {
- AbstractRepositoryConnector repositoryConnector = (AbstractRepositoryConnector) object;
- Image image = TasksUiPlugin.getDefault().getBrandingIcon(repositoryConnector.getConnectorKind());
- if (image != null) {
- return image;
- } else {
- return CommonImages.getImage(TasksUiImages.REPOSITORY);
- }
- } else if (object instanceof TaskRepository) {
- if (((TaskRepository) object).isOffline()) {
- return CommonImages.getImage(TasksUiImages.REPOSITORY_OFFLINE);
- } else {
- return CommonImages.getImage(TasksUiImages.REPOSITORY);
- }
- }
- return null;
- }
-
- public String getText(Object object) {
-
- if (object instanceof TaskRepository) {
- TaskRepository repository = (TaskRepository) object;
- StringBuilder label = new StringBuilder();
- label.append(repository.getRepositoryLabel());
- if (repository.isOffline()) {
- label.append(" [" + DisconnectRepositoryAction.LABEL + "]");
- }
- return label.toString();
- } else if (object instanceof AbstractRepositoryConnector) {
- return ((AbstractRepositoryConnector) object).getLabel();
- } else {
- return null;
- }
- }
-
- public void addListener(ILabelProviderListener listener) {
- // ignore
-
- }
-
- public void dispose() {
- // ignore
-
- }
-
- public boolean isLabelProperty(Object element, String property) {
- // ignore
- return false;
- }
-
- public void removeListener(ILabelProviderListener listener) {
- // ignore
-
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskScheduleContentProvider.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskScheduleContentProvider.java
deleted file mode 100644
index 40d29f2e9..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskScheduleContentProvider.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.views;
-
-import java.util.Calendar;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.Timer;
-import java.util.TimerTask;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.DateRange;
-import org.eclipse.mylyn.internal.tasks.core.ScheduledTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.TaskActivityManager;
-import org.eclipse.mylyn.internal.tasks.core.TaskActivityUtil;
-import org.eclipse.mylyn.internal.tasks.core.WeekDateRange;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITaskActivityListener;
-import org.eclipse.mylyn.tasks.core.ITaskContainer;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Used by Scheduled task list presentation
- *
- * @author Rob Elves
- */
-public class TaskScheduleContentProvider extends TaskListContentProvider implements ITaskActivityListener {
-
- private final TaskActivityManager taskActivityManager;
-
- private Timer timer;
-
- private final Unscheduled unscheduled;
-
- public TaskScheduleContentProvider(TaskListView taskListView) {
- super(taskListView);
- this.taskActivityManager = TasksUiPlugin.getTaskActivityManager();
- taskActivityManager.addActivityListener(this);
- Calendar cal = Calendar.getInstance();
- cal.add(Calendar.YEAR, 5000);
- cal.getTime();
- unscheduled = new Unscheduled(taskActivityManager, new DateRange(cal));
- timer = new Timer();
- }
-
- @Override
- public Object[] getElements(Object parent) {
- Set<AbstractTaskContainer> containers = new HashSet<AbstractTaskContainer>();
-
- WeekDateRange week = TaskActivityUtil.getCurrentWeek();
-
- timer.cancel();
- timer = new Timer();
- timer.schedule(new RolloverCheck(), week.getToday().getEndDate().getTime());
-
- for (DateRange day : week.getRemainingDays()) {
- containers.add(new ScheduledTaskContainer(TasksUiPlugin.getTaskActivityManager(), day));
- }
- containers.add(new ScheduledTaskContainer(TasksUiPlugin.getTaskActivityManager(), week));
-
- ScheduledTaskContainer nextWeekContainer = new ScheduledTaskContainer(taskActivityManager, week.next());
- containers.add(nextWeekContainer);
-
- containers.add(unscheduled);
-
- if (parent != null && parent.equals(this.taskListView.getViewSite())) {
- return applyFilter(containers).toArray();
- } else {
- return containers.toArray();
- }
- }
-
- @Override
- public Object getParent(Object child) {
-// for (Object o : getElements(null)) {
-// ScheduledTaskContainer container = ((ScheduledTaskContainer) o);
-// if (container.getChildren().contains(((ITask) child).getHandleIdentifier())) {
-// return container;
-// }
-// }
- return null;
- }
-
- @Override
- public boolean hasChildren(Object parent) {
- return getChildren(parent).length > 0;
- }
-
- @Override
- public Object[] getChildren(Object parent) {
- Set<ITask> result = new HashSet<ITask>();
- if (parent instanceof ITask) {
- // flat presentation (no subtasks revealed in Scheduled mode)
- } else if (parent instanceof ScheduledTaskContainer) {
- for (ITask child : ((ScheduledTaskContainer) parent).getChildren()) {
- if (!filter(parent, child)) {
- result.add(child);
- }
- }
-
- } else if (parent instanceof ITaskContainer) {
- for (ITask child : ((ITaskContainer) parent).getChildren()) {
- result.add(child);
- }
- }
- return result.toArray();
- }
-
- private void refresh() {
- if (Platform.isRunning() && PlatformUI.getWorkbench() != null && !PlatformUI.getWorkbench().isClosing()) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- taskListView.refresh();
- }
- });
- }
- }
-
- @Override
- public void dispose() {
- taskActivityManager.removeActivityListener(this);
- super.dispose();
- }
-
- private class RolloverCheck extends TimerTask {
-
- @Override
- public void run() {
- refresh();
- }
- }
-
- public void activityReset() {
- refresh();
- }
-
- public void elapsedTimeUpdated(ITask task, long newElapsedTime) {
- // ignore
- }
-
- public void preTaskActivated(ITask task) {
- // ignore
- }
-
- public void preTaskDeactivated(ITask task) {
- // ignore
- }
-
- public void taskActivated(ITask task) {
- // ignore
- }
-
- public void taskDeactivated(ITask task) {
- // ignore
- }
-
- public class Unscheduled extends ScheduledTaskContainer {
-
- private final TaskActivityManager activityManager;
-
- public Unscheduled(TaskActivityManager activityManager, DateRange range) {
- super(activityManager, range, "Unscheduled");
- this.activityManager = activityManager;
- }
-
- @Override
- public Collection<ITask> getChildren() {
- Set<ITask> all = new HashSet<ITask>();
- for (ITask task : activityManager.getUnscheduled()) {
- if (!task.isCompleted() || (task.isCompleted() && !task.getSynchronizationState().isSynchronized())) {
- all.add(task);
- }
- }
- return all;
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskTableLabelProvider.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskTableLabelProvider.java
deleted file mode 100644
index 684fe38b5..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskTableLabelProvider.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-/*
- * Created on Feb 18, 2005
- */
-package org.eclipse.mylyn.internal.tasks.ui.views;
-
-import org.eclipse.jface.viewers.DecoratingLabelProvider;
-import org.eclipse.jface.viewers.ILabelDecorator;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ITableColorProvider;
-import org.eclipse.jface.viewers.ITableFontProvider;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITaskContainer;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * @author Mik Kersten
- */
-public class TaskTableLabelProvider extends DecoratingLabelProvider implements ITableLabelProvider,
- ITableColorProvider, ITableFontProvider {
-
- private Color categoryBackgroundColor;
-
- /**
- * @param view
- * can be null
- */
- public TaskTableLabelProvider(ILabelProvider provider, ILabelDecorator decorator, Color parentBackground) {
- super(provider, decorator);
- this.categoryBackgroundColor = parentBackground;
- }
-
- public String getColumnText(Object obj, int columnIndex) {
- if (obj instanceof ITaskContainer) {
- switch (columnIndex) {
- case 0:
-// if (obj instanceof ScheduledTaskContainer) {
-// if (((ScheduledTaskContainer) obj).isToday()) {
-// return super.getText(obj) + " - Today";
-// }
-// }
- return super.getText(obj);
- case 1:
- return null;
- }
- }
- return null;
- }
-
- public Image getColumnImage(Object element, int columnIndex) {
- if (!(element instanceof ITaskContainer)) {
- return null;
- }
- if (columnIndex == 0) {
- return super.getImage(element);
- }
- return null;
- }
-
- public Font getFont(Object element, int columnIndex) {
- return super.getFont(element);
- }
-
- public Color getForeground(Object element, int columnIndex) {
- return super.getForeground(element);
- }
-
- public Color getBackground(Object element, int columnIndex) {
- if (element instanceof ITaskContainer && !(element instanceof ITask)) {
- return categoryBackgroundColor;
- } else if (element instanceof IRepositoryQuery) {
- return categoryBackgroundColor;
- }
-
- return super.getBackground(element);
- }
-
- public void setCategoryBackgroundColor(Color parentBackgroundColor) {
- this.categoryBackgroundColor = parentBackgroundColor;
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/UpdateRepositoryConfigurationAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/UpdateRepositoryConfigurationAction.java
deleted file mode 100644
index eaaf10619..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/UpdateRepositoryConfigurationAction.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.views;
-
-import java.util.Iterator;
-
-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.jobs.Job;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.actions.AbstractTaskRepositoryAction;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Mik Kersten
- */
-public class UpdateRepositoryConfigurationAction extends AbstractTaskRepositoryAction {
-
- private static final String ID = "org.eclipse.mylyn.tasklist.repositories.reset";
-
- public UpdateRepositoryConfigurationAction() {
- super("Update Repository Configuration");
- setId(ID);
- setEnabled(false);
- }
-
- @Override
- public void run() {
- try {
- IStructuredSelection selection = getStructuredSelection();
- for (Iterator<?> iter = selection.iterator(); iter.hasNext();) {
- final TaskRepository repository = getTaskRepository(iter.next());
- if (repository != null) {
- final AbstractRepositoryConnector connector = TasksUi.getRepositoryManager()
- .getRepositoryConnector(repository.getConnectorKind());
- if (connector != null) {
- final String jobName = "Updating repository configuration for " + repository.getRepositoryUrl();
- Job updateJob = new Job(jobName) {
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- monitor.beginTask(jobName, IProgressMonitor.UNKNOWN);
- try {
- performUpdate(repository, connector, monitor);
- } finally {
- monitor.done();
- }
- return Status.OK_STATUS;
- }
- };
- updateJob.schedule();
- }
- }
- }
- } catch (Exception e) {
- StatusHandler.fail(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, e.getMessage(), e));
- }
- }
-
- public void performUpdate(final TaskRepository repository, final AbstractRepositoryConnector connector,
- IProgressMonitor monitor) {
- try {
- connector.updateRepositoryConfiguration(repository, monitor);
- } catch (final CoreException e) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- TasksUiInternal.displayStatus("Error updating repository configuration", e.getStatus());
- }
- });
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/WorkweekProgressBar.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/WorkweekProgressBar.java
deleted file mode 100644
index 01370c0fe..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/WorkweekProgressBar.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.views;
-
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonThemes;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ControlAdapter;
-import org.eclipse.swt.events.ControlEvent;
-import org.eclipse.swt.events.PaintEvent;
-import org.eclipse.swt.events.PaintListener;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.widgets.Canvas;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.themes.IThemeManager;
-
-/**
- * Derived from JUnitProgressBar
- *
- * @author Mik Kersten
- */
-public class WorkweekProgressBar extends Canvas {
-
- private static final int DEFAULT_HEIGHT = 5;
-
- private int currentTickCount = 0;
-
- private int maxTickCount = 0;
-
- private int colorBarWidth = 0;
-
- private final Color completedColor;
-
- private final Composite parent;
-
- public WorkweekProgressBar(Composite parent) {
- super(parent, SWT.NONE);
- this.parent = parent;
-
- parent.addControlListener(new ControlAdapter() {
- @Override
- public void controlResized(ControlEvent e) {
- colorBarWidth = scale(currentTickCount);
- redraw();
- }
- });
- addPaintListener(new PaintListener() {
- public void paintControl(PaintEvent e) {
- paint(e);
- }
- });
- IThemeManager themeManager = PlatformUI.getWorkbench().getThemeManager();
- completedColor = themeManager.getCurrentTheme().getColorRegistry().get(
- CommonThemes.COLOR_COMPLETED_TODAY);
- }
-
- public void setMaximum(int max) {
- maxTickCount = max;
- }
-
- public void reset() {
- currentTickCount = 0;
- maxTickCount = 0;
- colorBarWidth = 0;
- redraw();
- }
-
- public void reset(int ticksDone, int maximum) {
- currentTickCount = ticksDone;
- maxTickCount = maximum;
- colorBarWidth = scale(ticksDone);
- computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
- redraw();
- }
-
- private void paintStep(int startX, int endX) {
- GC gc = new GC(this);
- setStatusColor(gc);
- Rectangle rect = getClientArea();
- startX = Math.max(1, startX);
- gc.fillRectangle(startX, 1, endX - startX, rect.height - 2);
- gc.dispose();
- }
-
- private void setStatusColor(GC gc) {
- gc.setBackground(completedColor);
- }
-
- private int scale(int value) {
- if (maxTickCount > 0) {
- // TODO: should probably get own client area, not parent's
- Rectangle r = parent.getClientArea();
- if (r.width != 0) {
- return Math.max(0, value * (r.width - 2) / maxTickCount);
- }
- }
- return value;
- }
-
- private void drawBevelRect(GC gc, int x, int y, int w, int h, Color topleft, Color bottomright) {
- gc.setForeground(topleft);
- gc.drawLine(x, y, x + w - 1, y);
- gc.drawLine(x, y, x, y + h - 1);
-
- gc.setForeground(bottomright);
- gc.drawLine(x + w, y, x + w, y + h);
- gc.drawLine(x, y + h, x + w, y + h);
- }
-
- private void paint(PaintEvent event) {
- GC gc = event.gc;
- Display disp = getDisplay();
-
- Rectangle rect = getClientArea();
- gc.fillRectangle(rect);
- drawBevelRect(gc, rect.x, rect.y, rect.width - 1, rect.height - 1,
- disp.getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW),
- disp.getSystemColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));
-
- setStatusColor(gc);
- colorBarWidth = Math.min(rect.width - 2, colorBarWidth);
- gc.fillRectangle(1, 1, colorBarWidth, rect.height - 2);
- }
-
- @Override
- public Point computeSize(int wHint, int hHint, boolean changed) {
- checkWidget();
- Point size = new Point(parent.getSize().x, DEFAULT_HEIGHT);//parent.getSize().y);
- if (wHint != SWT.DEFAULT) {
- size.x = wHint;
- }
- if (hHint != SWT.DEFAULT) {
- size.y = hHint;
- }
- return size;
- }
-
- public void setCount(int count) {
- currentTickCount++;
- int x = colorBarWidth;
-
- colorBarWidth = scale(currentTickCount);
-
- if (currentTickCount == maxTickCount) {
- colorBarWidth = getClientArea().width - 1;
- }
- paintStep(x, colorBarWidth);
- }
-
- public void step(int failures) {
- currentTickCount++;
- int x = colorBarWidth;
-
- colorBarWidth = scale(currentTickCount);
- if (currentTickCount == maxTickCount) {
- colorBarWidth = getClientArea().width - 1;
- }
- paintStep(x, colorBarWidth);
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/AddExistingTaskWizard.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/AddExistingTaskWizard.java
deleted file mode 100644
index 6a366bf69..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/AddExistingTaskWizard.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.wizards;
-
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.mylyn.internal.tasks.core.ITaskRepositoryFilter;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-
-/**
- * @author Mik Kersten
- * @author Brock Janiczak
- * @author Eugene Kuleshov
- * @author Steffen Pingel
- */
-public class AddExistingTaskWizard extends MultiRepositoryAwareWizard {
-
- public static final String TITLE = "Add Existing Repository Task";
-
- public AddExistingTaskWizard() {
- super(new SelectRepositoryPageForAddExistingTask(ITaskRepositoryFilter.CAN_CREATE_TASK_FROM_KEY), TITLE);
- }
-
- private static final class SelectRepositoryPageForAddExistingTask extends SelectRepositoryPage {
-
- public SelectRepositoryPageForAddExistingTask(ITaskRepositoryFilter filter) {
- super(filter);
- }
-
- @Override
- protected IWizard createWizard(TaskRepository taskRepository) {
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(taskRepository.getConnectorKind());
- return connectorUi.getAddExistingTaskWizard(taskRepository);
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/CommonAddExistingTaskWizard.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/CommonAddExistingTaskWizard.java
deleted file mode 100644
index 0dba8bc8b..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/CommonAddExistingTaskWizard.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.wizards;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.mylyn.internal.tasks.ui.AddExistingTaskJob;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.progress.IProgressService;
-
-/**
- * @author Brock Janiczak
- * @author Mik Kersten
- */
-public class CommonAddExistingTaskWizard extends Wizard {
-
- private final TaskRepository repository;
-
- private ExistingTaskWizardPage page;
-
- public CommonAddExistingTaskWizard(TaskRepository repository) {
- this.repository = repository;
- setNeedsProgressMonitor(true);
- setWindowTitle(AddExistingTaskWizard.TITLE);
- init();
- }
-
- @Override
- public final boolean performFinish() {
- final IProgressService svc = PlatformUI.getWorkbench().getProgressService();
- final AddExistingTaskJob job = new AddExistingTaskJob(repository, getTaskId());
- job.schedule();
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
-
- public void run() {
- svc.showInDialog(getShell(), job);
- }
-
- });
- return true;
- }
-
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- }
-
- private void init() {
- super.setForcePreviousAndNextButtons(true);
- }
-
- @Override
- public void addPages() {
- super.addPages();
- this.page = new ExistingTaskWizardPage();
- addPage(page);
- }
-
- protected String getTaskId() {
- return page.getTaskId();
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/EditRepositoryWizard.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/EditRepositoryWizard.java
deleted file mode 100644
index c83ef744a..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/EditRepositoryWizard.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.wizards;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.tasks.ui.RefactorRepositoryUrlOperation;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.ui.wizards.AbstractRepositorySettingsPage;
-import org.eclipse.mylyn.tasks.ui.wizards.ITaskRepositoryPage;
-import org.eclipse.ui.INewWizard;
-import org.eclipse.ui.IWorkbench;
-
-/**
- * @author Mik Kersten
- */
-public class EditRepositoryWizard extends Wizard implements INewWizard {
-
- private static final String TITLE = "Properties for Task Repository";
-
- private ITaskRepositoryPage settingsPage;
-
- private final TaskRepository repository;
-
- public EditRepositoryWizard(TaskRepository repository) {
- this.repository = repository;
- setNeedsProgressMonitor(true);
- setDefaultPageImageDescriptor(TasksUiImages.BANNER_REPOSITORY_SETTINGS);
- setWindowTitle(TITLE);
- }
-
- /**
- * Custom properties should be set on the repository object to ensure they are saved.
- */
- @Override
- public boolean performFinish() {
- if (canFinish()) {
- String oldUrl = repository.getRepositoryUrl();
- String newUrl = settingsPage.getRepositoryUrl();
- if (oldUrl != null && newUrl != null && !oldUrl.equals(newUrl)) {
- TasksUiPlugin.getTaskListManager().deactivateAllTasks();
-
- RefactorRepositoryUrlOperation operation = new RefactorRepositoryUrlOperation(oldUrl, newUrl);
- try {
- getContainer().run(true, false, operation);
- } catch (InvocationTargetException e) {
- StatusHandler.fail(new Status(IStatus.WARNING, TasksUiPlugin.ID_PLUGIN,
- "Failed to refactor repository urls"));
- return false;
- } catch (InterruptedException e) {
- // should not get here
- }
- }
-
- repository.flushAuthenticationCredentials();
-
- repository.setRepositoryUrl(newUrl);
- settingsPage.applyTo(repository);
- if (oldUrl != null && newUrl != null && !oldUrl.equals(newUrl)) {
- TasksUiPlugin.getRepositoryManager().notifyRepositoryUrlChanged(repository, oldUrl);
- }
- TasksUiPlugin.getRepositoryManager().notifyRepositorySettingsChanged(repository);
- TasksUiPlugin.getExternalizationManager().requestSave();
- return true;
- }
- return false;
- }
-
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- }
-
- @Override
- public void addPages() {
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(repository.getConnectorKind());
- settingsPage = connectorUi.getSettingsPage(null);
- if (settingsPage instanceof AbstractRepositorySettingsPage) {
- ((AbstractRepositorySettingsPage) settingsPage).setRepository(repository);
- ((AbstractRepositorySettingsPage) settingsPage).setVersion(repository.getVersion());
- }
- settingsPage.setWizard(this);
- addPage(settingsPage);
- }
-
- @Override
- public boolean canFinish() {
- return settingsPage.isPageComplete();
- }
-
- /** public for testing */
- public ITaskRepositoryPage getSettingsPage() {
- return settingsPage;
- }
-
- public TaskRepository getRepository() {
- return repository;
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ExistingTaskWizardPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ExistingTaskWizardPage.java
deleted file mode 100644
index e7a30924f..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ExistingTaskWizardPage.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.wizards;
-
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * @author Mik Kersten
- */
-public class ExistingTaskWizardPage extends WizardPage {
-
- private static final String TITLE = "Enter Task ID";
-
- private static final String DESCRIPTION = "Provide the identifier for the task, issue, or bug report.\n"
- + "The format is specific to the repository.";
-
- private Text taskIdText;
-
- public ExistingTaskWizardPage() {
- super(TITLE);
- setTitle(TITLE);
- setDescription(DESCRIPTION);
- setImageDescriptor(TasksUiImages.BANNER_REPOSITORY);
- }
-
- public void createControl(Composite parent) {
- Composite container = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- container.setLayout(layout);
- layout.numColumns = 2;
-
- GridData gd = new GridData();
- gd.widthHint = 200;
-
- Label label = new Label(container, SWT.NULL);
- label.setText("Enter Key/ID: ");
- taskIdText = new Text(container, SWT.BORDER);
- taskIdText.setLayoutData(gd);
- taskIdText.setFocus();
- taskIdText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- getWizard().getContainer().updateButtons();
- // try {
- // numDaysToReport = Integer.parseInt(taskId.getText());
- // setErrorMessage(null);
- // } catch (Exception ex) {
- // setErrorMessage("Must be integer");
- // numDaysToReport = 0;
- // }
- }
- });
-
- setControl(container);
- }
-
- @Override
- public boolean isPageComplete() {
- return getTaskId() != null && !getTaskId().trim().equals("");
- }
-
- public String getTaskId() {
- return taskIdText.getText();
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ImageAttachment.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ImageAttachment.java
deleted file mode 100644
index 4a2f4a832..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ImageAttachment.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.wizards;
-
-import java.io.File;
-
-import org.eclipse.mylyn.internal.provisional.commons.ui.IImageCreator;
-import org.eclipse.mylyn.internal.tasks.core.LocalAttachment;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.ImageData;
-import org.eclipse.swt.graphics.ImageLoader;
-
-/**
- * Represents a attachment created from a {@link Image}; handles lazy persistence into a {@link File} and image data
- * change
- *
- * @author Willian Mitsuda
- */
-public class ImageAttachment extends LocalAttachment {
-
- private static final long serialVersionUID = 28264291629999181L;
-
- /**
- * Provides the {@link Image} object that will be converted to desired file format, and then attached
- */
- private final IImageCreator imageCreator;
-
- public ImageAttachment(IImageCreator imageCreator) {
- this.imageCreator = imageCreator;
- }
-
- @Override
- public void setContentType(String contentType) {
- // Does not apply; actually always save as JPEG
- // Will be implemented on bug#210179
- }
-
- @Override
- public String getContentType() {
- return "image/jpeg";
- }
-
- @Override
- public String getFilename() {
- return "screenshot.jpg";
- }
-
- private boolean dirty = true;
-
- public void markDirty() {
- dirty = true;
- }
-
- public void ensureImageFileWasCreated() {
- if (!dirty) {
- return;
- }
-
- dirty = false;
- createContents();
- }
-
- private void createContents() {
- Image image = imageCreator.createImage();
- try {
- String path = TasksUiPlugin.getDefault().getDefaultDataDirectory();
- ImageLoader loader = new ImageLoader();
- loader.data = new ImageData[] { image.getImageData() };
- String fileName = path + "/" + getFilename();
- loader.save(fileName, SWT.IMAGE_JPEG);
- setFile(new File(fileName));
- setFilePath(fileName);
- } finally {
- image.dispose();
- }
- }
-
- public void clearImageFile() {
- String path = TasksUiPlugin.getDefault().getDefaultDataDirectory();
- new File(path + "/" + getFilename()).delete();
- }
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/InputAttachmentSourcePage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/InputAttachmentSourcePage.java
deleted file mode 100644
index 62568728c..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/InputAttachmentSourcePage.java
+++ /dev/null
@@ -1,712 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.ui.wizards;
-
-import java.io.File;
-import java.util.ArrayList;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.resources.mapping.ResourceMappingContext;
-import org.eclipse.core.resources.mapping.ResourceTraversal;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.TreeSelection;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.mylyn.internal.tasks.core.data.FileTaskAttachmentSource;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.ITaskAttachment;
-import org.eclipse.mylyn.tasks.core.data.AbstractTaskAttachmentSource;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-import org.eclipse.ui.views.navigator.ResourceComparator;
-
-/**
- * A wizard to input the source of the attachment.
- * <p>
- * Based on org.eclipse.compare.internal.InputPatchPage.
- *
- * @author IBM Corporation - initial API and implementation
- * @author Sebastian Davids <sdavids@gmx.de> - layout tweaks
- * @author Jeff Pound - modified for attachment input
- * @author Chris Aniszczyk <caniszczyk@gmail.com> - bug 209572
- */
-public class InputAttachmentSourcePage extends WizardPage {
-
- // constants
- protected static final int SIZING_TEXT_FIELD_WIDTH = 250;
-
- protected static final int COMBO_HISTORY_LENGTH = 5;
-
- public static final String CLIPBOARD_LABEL = "<Clipboard>";
-
- public static final String SCREENSHOT_LABEL = "<Screenshot>";
-
- // input constants
- protected final static int CLIPBOARD = 1;
-
- protected final static int FILE = 2;
-
- protected final static int WORKSPACE = 3;
-
- protected final static int SCREENSHOT = 4;
-
- static final char SEPARATOR = System.getProperty("file.separator").charAt(0); //$NON-NLS-1$
-
- private boolean showError = false;
-
- // SWT widgets
- private Button useClipboardButton;
-
-// private Button useScreenshotButton;
-
- private Combo fileNameField;
-
- private Button fileBrowseButton;
-
- private Button useFileButton;
-
- private Button useWorkspaceButton;
-
- private Label workspaceSelectLabel;
-
- private TreeViewer treeViewer;
-
- private String clipboardContents;
-
- private boolean initUseClipboard = false;
-
- private final String DIALOG_SETTINGS = "InputAttachmentSourcePage"; //$NON-NLS-1$
-
- private final String S_LAST_SELECTION = "lastSelection"; //$NON-NLS-1$
-
- private ITaskAttachment taskAttachment;
-
- public InputAttachmentSourcePage(NewAttachmentWizard wizard) {
- super("InputAttachmentPage");
- setTitle("Select attachment source");
- setDescription("Clipboard contents are for text attachments only.");
- // setMessage("Please select the source for the attachment");
- }
-
- private void initialize(IDialogSettings settings) {
- String selection = settings.get(S_LAST_SELECTION);
- if (selection != null) {
- setInputMethod(Integer.valueOf(selection).intValue());
- } else {
- updateWidgetEnablements();
- }
- }
-
- /*
- * Get a path from the supplied text widget. @return
- * org.eclipse.core.runtime.IPath
- */
- protected IPath getPathFromText(Text textField) {
- return (new Path(textField.getText())).makeAbsolute();
- }
-
- public String getAttachmentName() {
- if (getInputMethod() == CLIPBOARD) {
- return CLIPBOARD_LABEL;
- } else if (getInputMethod() == WORKSPACE) {
- return getResources(treeViewer.getSelection())[0].getFullPath().toOSString();
- }
- return getAttachmentFilePath();
- }
-
- public void createControl(Composite parent) {
-
- Composite composite = new Composite(parent, SWT.NULL);
- composite.setLayout(new GridLayout());
- GridData gd = new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL);
- gd.heightHint = 800;
- composite.setLayoutData(gd);
- setControl(composite);
-
- initializeDialogUnits(parent);
-
- buildAttachmentFileGroup(composite);
-
- // No error for dialog opening
- showError = false;
- clearErrorMessage();
- initialize(getDialogSettings());
-
- Dialog.applyDialogFont(composite);
-
- }
-
- @Override
- public IWizardPage getNextPage() {
- if (getInputMethod() == SCREENSHOT) {
- return getWizard().getPage("ScreenShotAttachment");
- } else {
- saveDialogSettings();
- return getWizard().getNextPage(this);
- }
- }
-
- private void saveDialogSettings() {
- IDialogSettings settings = getDialogSettings();
- settings.put(S_LAST_SELECTION, getInputMethod());
- }
-
- @Override
- public boolean canFlipToNextPage() {
- return isPageComplete();
- }
-
- private void setEnableAttachmentFile(boolean enable) {
- fileNameField.setEnabled(enable);
- fileBrowseButton.setEnabled(enable);
- }
-
- private void setEnableWorkspaceAttachment(boolean enable) {
- workspaceSelectLabel.setEnabled(enable);
- treeViewer.getTree().setEnabled(enable);
- }
-
- /*
- * Create the group for selecting the attachment file
- */
- private void buildAttachmentFileGroup(Composite parent) {
-
- final Composite composite = new Composite(parent, SWT.NULL);
- GridLayout gridLayout = new GridLayout();
- gridLayout.numColumns = 3;
- composite.setLayout(gridLayout);
- composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
-// // 2nd row
-// gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
-// gd.horizontalSpan = 3;
-// useScreenshotButton = new Button(composite, SWT.RADIO);
-// useScreenshotButton.setText("Screenshot");
-// useScreenshotButton.setLayoutData(gd);
-
- // new row
- GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- useFileButton = new Button(composite, SWT.RADIO);
- useFileButton.setText("File");
-
- fileNameField = new Combo(composite, SWT.BORDER);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.widthHint = SIZING_TEXT_FIELD_WIDTH;
- fileNameField.setLayoutData(gd);
- if (getWizard() instanceof NewAttachmentWizard) {
- fileNameField.setText(((NewAttachmentWizard) getWizard()).getAttachment().getFilePath());
- }
-
- fileBrowseButton = new Button(composite, SWT.PUSH);
- fileBrowseButton.setText("Browse...");
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
- Point minSize = fileBrowseButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
- data.widthHint = Math.max(widthHint, minSize.x);
- fileBrowseButton.setLayoutData(data);
-
- // new row
- gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- gd.horizontalSpan = 3;
- useClipboardButton = new Button(composite, SWT.RADIO);
- useClipboardButton.setText("Clipboard");
- useClipboardButton.setLayoutData(gd);
- useClipboardButton.setSelection(initUseClipboard);
-
- // new row
- useWorkspaceButton = new Button(composite, SWT.RADIO);
- useWorkspaceButton.setText("Workspace");
- gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- useWorkspaceButton.setLayoutData(gd);
-
- addWorkspaceControls(parent);
-
- // Add listeners
- useClipboardButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (!useClipboardButton.getSelection()) {
- return;
- }
-
- clearErrorMessage();
- showError = true;
- storeClipboardContents();
- updateWidgetEnablements();
- }
- });
-
-// useScreenshotButton.addSelectionListener(new SelectionAdapter() {
-// @Override
-// public void widgetSelected(SelectionEvent e) {
-// if (!useScreenshotButton.getSelection())
-// return;
-//
-// clearErrorMessage();
-// showError = true;
-// int state = getInputMethod();
-// setEnableAttachmentFile(state == FILE);
-// setEnableWorkspaceAttachment(state == WORKSPACE);
-// updateWidgetEnablements();
-// }
-// });
-
- useFileButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (!useFileButton.getSelection()) {
- return;
- }
- // If there is anything typed in at all
- clearErrorMessage();
- showError = (fileNameField.getText() != ""); //$NON-NLS-1$
- updateWidgetEnablements();
- }
- });
- fileNameField.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- setSourceName(fileNameField.getText());
- updateWidgetEnablements();
- }
- });
- fileNameField.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- clearErrorMessage();
- showError = true;
- updateWidgetEnablements();
- }
- });
- fileBrowseButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- clearErrorMessage();
- showError = true;
- /* Launch Browser */
- FileDialog fileChooser = new FileDialog(composite.getShell(), SWT.OPEN);
- String file = fileChooser.open();
-
- // Check if the dialog was canceled or an error occured
- if (file == null) {
- return;
- }
- // update UI
- fileNameField.setText(file);
- updateWidgetEnablements();
- }
- });
- useWorkspaceButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (!useWorkspaceButton.getSelection()) {
- return;
- }
- clearErrorMessage();
- // If there is anything typed in at all
- showError = (!treeViewer.getSelection().isEmpty());
- updateWidgetEnablements();
- }
- });
-
- treeViewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- clearErrorMessage();
- updateWidgetEnablements();
- }
- });
-
- treeViewer.addDoubleClickListener(new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent event) {
- ISelection selection = event.getSelection();
- if (selection instanceof TreeSelection) {
- TreeSelection treeSel = (TreeSelection) selection;
- Object res = treeSel.getFirstElement();
- if (res != null) {
- if (res instanceof IProject || res instanceof IFolder) {
- if (treeViewer.getExpandedState(res)) {
- treeViewer.collapseToLevel(res, 1);
- } else {
- treeViewer.expandToLevel(res, 1);
- }
- } else if (res instanceof IFile) {
- getContainer().showPage(getNextPage());
- }
- }
- }
- }
- });
-
- useFileButton.setSelection(!initUseClipboard);
- setEnableWorkspaceAttachment(false);
- }
-
- private void addWorkspaceControls(Composite composite) {
-
- Composite newComp = new Composite(composite, SWT.NONE);
- GridLayout layout = new GridLayout(1, false);
- layout.marginLeft = 16; // align w/ lable of check button
- newComp.setLayout(layout);
- newComp.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- workspaceSelectLabel = new Label(newComp, SWT.LEFT);
- workspaceSelectLabel.setText("Select the location of the attachment");
-
- treeViewer = new TreeViewer(newComp, SWT.BORDER);
- treeViewer.getTree().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
-
- treeViewer.setLabelProvider(new WorkbenchLabelProvider());
- treeViewer.setContentProvider(new WorkbenchContentProvider());
- treeViewer.setComparator(new ResourceComparator(ResourceComparator.NAME));
- treeViewer.setInput(ResourcesPlugin.getWorkspace().getRoot());
- }
-
- /**
- * Updates the enable state of this page's controls.
- */
- private void updateWidgetEnablements() {
-
- String error = null;
-
- boolean attachmentFound = false;
- int inputMethod = getInputMethod();
- if (inputMethod == CLIPBOARD) {
- Control c = getControl();
- if (c != null) {
- Clipboard clipboard = new Clipboard(c.getDisplay());
- Object o = clipboard.getContents(TextTransfer.getInstance());
- clipboard.dispose();
- if (o instanceof String) {
- String s = ((String) o).trim();
- if (s.length() > 0) {
- attachmentFound = true;
- } else {
- error = "Clipboard is empty";
- }
- } else {
- error = "Clipboard does not contain text";
- }
- } else {
- error = "Cannot retrieve clipboard contents";
- }
- } else if (inputMethod == SCREENSHOT) {
- attachmentFound = true;
- } else if (inputMethod == FILE) {
- String path = fileNameField.getText();
- if (path != null && path.length() > 0) {
- File file = new File(path);
- attachmentFound = file.exists() && file.isFile() && file.length() > 0;
- if (!attachmentFound) {
- error = "Cannot locate attachment file";
- }
- } else {
- error = "No file name";
- }
- } else if (inputMethod == WORKSPACE) {
- // Get the selected attachment file (tree will only allow for one
- // selection)
- IResource[] resources = getResources(treeViewer.getSelection());
- if (resources == null || resources.length <= 0) {
- error = "No file name";
- } else {
- IResource attachmentFile = resources[0];
- if (attachmentFile != null && attachmentFile.getType() == IResource.FILE) {
- File actualFile = attachmentFile.getRawLocation().toFile();
- attachmentFound = actualFile.exists() && actualFile.isFile() && actualFile.length() > 0;
- if (!attachmentFound) {
- error = "Cannot locate attachment file";
- }
- }
- }
- }
-
- setPageComplete(attachmentFound);
- if (getWizard() instanceof NewAttachmentWizard) {
- ((NewAttachmentWizard) getWizard()).getAttachment().setFilePath(getAbsoluteAttachmentPath());
- }
- // API 3.0 set attachment source
-
- if (showError) {
- setErrorMessage(error);
- }
-
- setEnableAttachmentFile(inputMethod == FILE);
- setEnableWorkspaceAttachment(inputMethod == WORKSPACE);
- }
-
- /**
- * Sets the source name of the import to be the supplied path. Adds the name of the path to the list of items in the
- * source combo and selects it.
- *
- * @param path
- * the path to be added
- */
- protected void setSourceName(String path) {
-
- if (path.length() > 0) {
-
- String[] currentItems = fileNameField.getItems();
- int selectionIndex = -1;
- for (int i = 0; i < currentItems.length; i++) {
- if (currentItems[i].equals(path)) {
- selectionIndex = i;
- }
- }
-
- if (selectionIndex < 0) { // not found in history
- int oldLength = currentItems.length;
- String[] newItems = new String[oldLength + 1];
- System.arraycopy(currentItems, 0, newItems, 0, oldLength);
- newItems[oldLength] = path;
- fileNameField.setItems(newItems);
- selectionIndex = oldLength;
- }
- fileNameField.select(selectionIndex);
-
- // resetSelection();
- }
- }
-
- // private String getWorkspacePath() {
- // if (fTreeViewer ! = null){
- // IResource[] resources = getResources(fTreeViewer.getSelection());
- // if (resources.length > 0) {
- // IResource patchFile = resources[0];
- // return patchFile.getFullPath().toString();
- // }
- //
- // }
- // return ""; //$NON-NLS-1$
- // }
-
- /*
- * Clears the dialog message box
- */
- private void clearErrorMessage() {
- setErrorMessage(null);
- }
-
- protected int getInputMethod() {
- if (useClipboardButton == null) {
- if (initUseClipboard) {
- return CLIPBOARD;
- }
- return FILE;
- }
-// if (useScreenshotButton.getSelection()) {
-// return SCREENSHOT;
-// }
- if (useClipboardButton.getSelection()) {
- return CLIPBOARD;
- }
- if (useFileButton.getSelection()) {
- return FILE;
- }
- return WORKSPACE;
- }
-
- protected void setInputMethod(int input) {
- switch (input) {
- case WORKSPACE:
- useWorkspaceButton.setSelection(true);
- useClipboardButton.setSelection(false);
- useFileButton.setSelection(false);
- break;
- case CLIPBOARD:
- storeClipboardContents();
-
- useClipboardButton.setSelection(true);
- useFileButton.setSelection(false);
- useWorkspaceButton.setSelection(false);
- break;
- default:
- useFileButton.setSelection(true);
- useWorkspaceButton.setSelection(false);
- useClipboardButton.setSelection(false);
- break;
- }
- updateWidgetEnablements();
- }
-
- private String getAttachmentFilePath() {
- if (fileNameField != null) {
- return fileNameField.getText();
- }
- if (getWizard() instanceof NewAttachmentWizard) {
- return ((NewAttachmentWizard) getWizard()).getAttachment().getFilePath();
- }
- return null;
- }
-
- public String getAbsoluteAttachmentPath() {
- switch (getInputMethod()) {
- case CLIPBOARD:
- return CLIPBOARD_LABEL;
- case SCREENSHOT:
- return SCREENSHOT_LABEL;
- case WORKSPACE:
- IResource[] resources = getResources(treeViewer.getSelection());
- if (resources.length > 0 && resources[0].getRawLocation() != null) {
- return resources[0].getRawLocation().toOSString();
- } else {
- return null;
- }
- case FILE:
- default:
- return getAttachmentFilePath();
- }
- }
-
- /*
- * Based on .eclipse.compare.internal.Utilities
- *
- * Convenience method: extract all accessible <code>IResources</code> from
- * given selection. Never returns null.
- */
- public static IResource[] getResources(ISelection selection) {
- ArrayList<IResource> tmp = new ArrayList<IResource>();
- Class<?> type = IResource.class;
- if (selection instanceof IStructuredSelection) {
- Object[] s = ((IStructuredSelection) selection).toArray();
-
- for (Object o : s) {
- IResource resource = null;
- if (type.isInstance(o)) {
- resource = (IResource) o;
-
- } else if (o instanceof ResourceMapping) {
- try {
- ResourceTraversal[] travs = ((ResourceMapping) o).getTraversals(
- ResourceMappingContext.LOCAL_CONTEXT, null);
- if (travs != null) {
- for (ResourceTraversal trav : travs) {
- IResource[] resources = trav.getResources();
- for (IResource resource2 : resources) {
- if (type.isInstance(resource2) && resource2.isAccessible()) {
- tmp.add(resource2);
- }
- }
- }
- }
- } catch (CoreException ex) {
- // TODO handle error
- }
- } else if (o instanceof IAdaptable) {
- IAdaptable a = (IAdaptable) o;
- Object adapter = a.getAdapter(IResource.class);
- if (type.isInstance(adapter)) {
- resource = (IResource) adapter;
- }
- }
-
- if (resource != null && resource.isAccessible()) {
- tmp.add(resource);
- }
- }
- }
-
- return tmp.toArray(new IResource[tmp.size()]);
- }
-
- private void storeClipboardContents() {
- Control c = getControl();
- if (c != null) {
- Clipboard clipboard = new Clipboard(c.getDisplay());
- Object o = clipboard.getContents(TextTransfer.getInstance());
- clipboard.dispose();
- if (o instanceof String) {
- clipboardContents = ((String) o).trim();
- }
- }
- }
-
- public String getClipboardContents() {
- return clipboardContents;
- }
-
- public void setClipboardContents(String attachContents) {
- clipboardContents = attachContents;
- }
-
- public void setUseClipboard(boolean b) {
- if (useClipboardButton != null) {
- useClipboardButton.setSelection(b);
- }
- initUseClipboard = b;
- }
-
- @Override
- protected IDialogSettings getDialogSettings() {
- TasksUiPlugin plugin = TasksUiPlugin.getDefault();
- IDialogSettings settings = plugin.getDialogSettings();
- IDialogSettings section = settings.getSection(DIALOG_SETTINGS);
- if (section == null) {
- section = settings.addNewSection(DIALOG_SETTINGS);
- }
- return section;
- }
-
- public AbstractTaskAttachmentSource getSource() {
- switch (getInputMethod()) {
- case CLIPBOARD:
- return new TaskAttachmentWizard.ClipboardTaskAttachmentSource();
- case WORKSPACE:
- IResource[] resources = getResources(treeViewer.getSelection());
- if (resources.length > 0) {
- return new FileTaskAttachmentSource(resources[0].getLocation().toFile());
- } else {
- return null;
- }
- default: // FILE
- return new FileTaskAttachmentSource(new File(getAttachmentFilePath()));
- }
- }
-
- public ITaskAttachment getTaskAttachment() {
- return taskAttachment;
- }
-
- public void setTaskAttachment(ITaskAttachment taskAttachment) {
- this.taskAttachment = taskAttachment;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/InputAttachmentSourcePage2.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/InputAttachmentSourcePage2.java
deleted file mode 100644
index 319d1f4b3..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/InputAttachmentSourcePage2.java
+++ /dev/null
@@ -1,648 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.ui.wizards;
-
-import java.io.File;
-import java.util.ArrayList;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.resources.mapping.ResourceMappingContext;
-import org.eclipse.core.resources.mapping.ResourceTraversal;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.TreeSelection;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.mylyn.internal.tasks.core.data.FileTaskAttachmentSource;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.TaskAttachmentWizard.ClipboardTaskAttachmentSource;
-import org.eclipse.mylyn.tasks.core.data.AbstractTaskAttachmentSource;
-import org.eclipse.mylyn.tasks.core.data.TaskAttachmentModel;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-import org.eclipse.ui.views.navigator.ResourceComparator;
-
-/**
- * A wizard to input the source of the attachment.
- * <p>
- * Based on org.eclipse.compare.internal.InputPatchPage.
- *
- * @author IBM Corporation - initial API and implementation
- * @author Sebastian Davids <sdavids@gmx.de> - layout tweaks
- * @author Jeff Pound - modified for attachment input
- * @author Chris Aniszczyk <caniszczyk@gmail.com> - bug 209572
- */
-public class InputAttachmentSourcePage2 extends WizardPage {
-
- // constants
- protected static final int SIZING_TEXT_FIELD_WIDTH = 250;
-
- protected static final int COMBO_HISTORY_LENGTH = 5;
-
- public static final String CLIPBOARD_LABEL = "<Clipboard>";
-
- public static final String SCREENSHOT_LABEL = "<Screenshot>";
-
- // input constants
- protected final static int CLIPBOARD = 1;
-
- protected final static int FILE = 2;
-
- protected final static int WORKSPACE = 3;
-
- protected final static int SCREENSHOT = 4;
-
- static final char SEPARATOR = System.getProperty("file.separator").charAt(0); //$NON-NLS-1$
-
- private boolean showError = false;
-
- // SWT widgets
- private Button useClipboardButton;
-
-// private Button useScreenshotButton;
-
- private Combo fileNameField;
-
- private Button fileBrowseButton;
-
- private Button useFileButton;
-
- private Button useWorkspaceButton;
-
- private Label workspaceSelectLabel;
-
- private TreeViewer treeViewer;
-
- private String clipboardContents;
-
- private boolean initUseClipboard = false;
-
- private final String DIALOG_SETTINGS = "InputAttachmentSourcePage"; //$NON-NLS-1$
-
- private final String S_LAST_SELECTION = "lastSelection"; //$NON-NLS-1$
-
- private final TaskAttachmentModel model;
-
- public InputAttachmentSourcePage2(TaskAttachmentModel model) {
- super("InputAttachmentPage");
- this.model = model;
- setTitle("Select attachment source");
- setDescription("Clipboard supports text and image attachments only.");
- // setMessage("Please select the source for the attachment");
- }
-
- private void initialize(IDialogSettings settings) {
- String selection = settings.get(S_LAST_SELECTION);
- if (selection != null) {
- setInputMethod(Integer.valueOf(selection).intValue());
- } else {
- updateWidgetEnablements();
- }
- }
-
- /*
- * Get a path from the supplied text widget. @return
- * org.eclipse.core.runtime.IPath
- */
- protected IPath getPathFromText(Text textField) {
- return (new Path(textField.getText())).makeAbsolute();
- }
-
- public String getAttachmentName() {
- if (getInputMethod() == CLIPBOARD) {
- return CLIPBOARD_LABEL;
- } else if (getInputMethod() == WORKSPACE) {
- return getResources(treeViewer.getSelection())[0].getFullPath().toOSString();
- }
- return getAttachmentFilePath();
- }
-
- public void createControl(Composite parent) {
- Composite composite = new Composite(parent, SWT.NULL);
- composite.setLayout(new GridLayout());
- GridData gd = new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL);
- gd.heightHint = 800;
- composite.setLayoutData(gd);
- setControl(composite);
-
- initializeDialogUnits(parent);
-
- createAttachmentFileGroup(composite);
-
- // No error for dialog opening
- showError = false;
- clearErrorMessage();
- initialize(getDialogSettings());
-
- Dialog.applyDialogFont(composite);
- }
-
- @Override
- public IWizardPage getNextPage() {
- model.setSource(getSource());
- saveDialogSettings();
- return super.getNextPage();
- }
-
- private void saveDialogSettings() {
- IDialogSettings settings = getDialogSettings();
- settings.put(S_LAST_SELECTION, getInputMethod());
- }
-
- @Override
- public boolean canFlipToNextPage() {
- return isPageComplete();
- }
-
- private void setEnableAttachmentFile(boolean enable) {
- fileNameField.setEnabled(enable);
- fileBrowseButton.setEnabled(enable);
- }
-
- private void setEnableWorkspaceAttachment(boolean enable) {
- workspaceSelectLabel.setEnabled(enable);
- treeViewer.getTree().setEnabled(enable);
- }
-
- /*
- * Create the group for selecting the attachment file
- */
- private void createAttachmentFileGroup(Composite parent) {
- final Composite composite = new Composite(parent, SWT.NULL);
- GridLayout gridLayout = new GridLayout();
- gridLayout.numColumns = 3;
- composite.setLayout(gridLayout);
- composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- // new row
- GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- useFileButton = new Button(composite, SWT.RADIO);
- useFileButton.setText("File");
-
- fileNameField = new Combo(composite, SWT.BORDER);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.widthHint = SIZING_TEXT_FIELD_WIDTH;
- fileNameField.setLayoutData(gd);
- fileNameField.setText("");
-
- fileBrowseButton = new Button(composite, SWT.PUSH);
- fileBrowseButton.setText("Browse...");
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
- Point minSize = fileBrowseButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
- data.widthHint = Math.max(widthHint, minSize.x);
- fileBrowseButton.setLayoutData(data);
-
- // new row
- gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- gd.horizontalSpan = 3;
- useClipboardButton = new Button(composite, SWT.RADIO);
- useClipboardButton.setText("Clipboard");
- useClipboardButton.setLayoutData(gd);
- useClipboardButton.setSelection(initUseClipboard);
-
- // new row
- useWorkspaceButton = new Button(composite, SWT.RADIO);
- useWorkspaceButton.setText("Workspace");
- gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- useWorkspaceButton.setLayoutData(gd);
-
- addWorkspaceControls(parent);
-
- // Add listeners
- useClipboardButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (!useClipboardButton.getSelection()) {
- return;
- }
-
- clearErrorMessage();
- showError = true;
- storeClipboardContents();
- updateWidgetEnablements();
- }
- });
-
- useFileButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (!useFileButton.getSelection()) {
- return;
- }
- // If there is anything typed in at all
- clearErrorMessage();
- showError = (fileNameField.getText() != ""); //$NON-NLS-1$
- updateWidgetEnablements();
- }
- });
- fileNameField.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- setSourceName(fileNameField.getText());
- updateWidgetEnablements();
- }
- });
- fileNameField.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- clearErrorMessage();
- showError = true;
- updateWidgetEnablements();
- }
- });
- fileBrowseButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- clearErrorMessage();
- showError = true;
- /* Launch Browser */
- FileDialog fileChooser = new FileDialog(composite.getShell(), SWT.OPEN);
- String file = fileChooser.open();
-
- // Check if the dialog was canceled or an error occured
- if (file == null) {
- return;
- }
- // update UI
- fileNameField.setText(file);
- updateWidgetEnablements();
- }
- });
- useWorkspaceButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (!useWorkspaceButton.getSelection()) {
- return;
- }
- clearErrorMessage();
- // If there is anything typed in at all
- showError = (!treeViewer.getSelection().isEmpty());
- updateWidgetEnablements();
- }
- });
-
- treeViewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- clearErrorMessage();
- updateWidgetEnablements();
- }
- });
-
- treeViewer.addDoubleClickListener(new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent event) {
- ISelection selection = event.getSelection();
- if (selection instanceof TreeSelection) {
- TreeSelection treeSel = (TreeSelection) selection;
- Object res = treeSel.getFirstElement();
- if (res != null) {
- if (res instanceof IProject || res instanceof IFolder) {
- if (treeViewer.getExpandedState(res)) {
- treeViewer.collapseToLevel(res, 1);
- } else {
- treeViewer.expandToLevel(res, 1);
- }
- } else if (res instanceof IFile) {
- getContainer().showPage(getNextPage());
- }
- }
- }
- }
- });
-
- useFileButton.setSelection(!initUseClipboard);
- setEnableWorkspaceAttachment(false);
- }
-
- private void addWorkspaceControls(Composite composite) {
-
- Composite newComp = new Composite(composite, SWT.NONE);
- GridLayout layout = new GridLayout(1, false);
- layout.marginLeft = 16; // align w/ lable of check button
- newComp.setLayout(layout);
- newComp.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- workspaceSelectLabel = new Label(newComp, SWT.LEFT);
- workspaceSelectLabel.setText("Select the location of the attachment");
-
- treeViewer = new TreeViewer(newComp, SWT.BORDER);
- treeViewer.getTree().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
-
- treeViewer.setLabelProvider(new WorkbenchLabelProvider());
- treeViewer.setContentProvider(new WorkbenchContentProvider());
- treeViewer.setComparator(new ResourceComparator(ResourceComparator.NAME));
- treeViewer.setInput(ResourcesPlugin.getWorkspace().getRoot());
- }
-
- /**
- * Updates the enable state of this page's controls.
- */
- private void updateWidgetEnablements() {
-
- String error = null;
-
- boolean attachmentFound = false;
- int inputMethod = getInputMethod();
- if (inputMethod == CLIPBOARD) {
- if (ClipboardTaskAttachmentSource.isSupportedType(getControl().getDisplay())) {
- attachmentFound = true;
- } else {
- error = "Clipboard contains an unsupported data";
- }
- } else if (inputMethod == SCREENSHOT) {
- attachmentFound = true;
- } else if (inputMethod == FILE) {
- String path = fileNameField.getText();
- if (path != null && path.length() > 0) {
- File file = new File(path);
- attachmentFound = file.exists() && file.isFile() && file.length() > 0;
- if (!attachmentFound) {
- error = "Cannot locate attachment file";
- }
- } else {
- error = "No file name";
- }
- } else if (inputMethod == WORKSPACE) {
- // Get the selected attachment file (tree will only allow for one
- // selection)
- IResource[] resources = getResources(treeViewer.getSelection());
- if (resources == null || resources.length <= 0) {
- error = "No file name";
- } else {
- IResource attachmentFile = resources[0];
- if (attachmentFile != null && attachmentFile.getType() == IResource.FILE) {
- File actualFile = attachmentFile.getRawLocation().toFile();
- attachmentFound = actualFile.exists() && actualFile.isFile() && actualFile.length() > 0;
- if (!attachmentFound) {
- error = "Cannot locate attachment file";
- }
- }
- }
- }
-
- setPageComplete(attachmentFound);
- if (getWizard() instanceof NewAttachmentWizard) {
- ((NewAttachmentWizard) getWizard()).getAttachment().setFilePath(getAbsoluteAttachmentPath());
- }
- // API 3.0 set attachment source
-
- if (showError) {
- setErrorMessage(error);
- }
-
- setEnableAttachmentFile(inputMethod == FILE);
- setEnableWorkspaceAttachment(inputMethod == WORKSPACE);
- }
-
- /**
- * Sets the source name of the import to be the supplied path. Adds the name of the path to the list of items in the
- * source combo and selects it.
- *
- * @param path
- * the path to be added
- */
- protected void setSourceName(String path) {
-
- if (path.length() > 0) {
-
- String[] currentItems = fileNameField.getItems();
- int selectionIndex = -1;
- for (int i = 0; i < currentItems.length; i++) {
- if (currentItems[i].equals(path)) {
- selectionIndex = i;
- }
- }
-
- if (selectionIndex < 0) { // not found in history
- int oldLength = currentItems.length;
- String[] newItems = new String[oldLength + 1];
- System.arraycopy(currentItems, 0, newItems, 0, oldLength);
- newItems[oldLength] = path;
- fileNameField.setItems(newItems);
- selectionIndex = oldLength;
- }
- fileNameField.select(selectionIndex);
-
- // resetSelection();
- }
- }
-
- /*
- * Clears the dialog message box
- */
- private void clearErrorMessage() {
- setErrorMessage(null);
- }
-
- protected int getInputMethod() {
- if (useClipboardButton == null) {
- if (initUseClipboard) {
- return CLIPBOARD;
- }
- return FILE;
- }
- if (useClipboardButton.getSelection()) {
- return CLIPBOARD;
- }
- if (useFileButton.getSelection()) {
- return FILE;
- }
- return WORKSPACE;
- }
-
- protected void setInputMethod(int input) {
- switch (input) {
- case WORKSPACE:
- useWorkspaceButton.setSelection(true);
- useClipboardButton.setSelection(false);
- useFileButton.setSelection(false);
- break;
- case CLIPBOARD:
- storeClipboardContents();
-
- useClipboardButton.setSelection(true);
- useFileButton.setSelection(false);
- useWorkspaceButton.setSelection(false);
- break;
- default:
- useFileButton.setSelection(true);
- useWorkspaceButton.setSelection(false);
- useClipboardButton.setSelection(false);
- break;
- }
- updateWidgetEnablements();
- }
-
- private String getAttachmentFilePath() {
- if (fileNameField != null) {
- return fileNameField.getText();
- }
- if (getWizard() instanceof NewAttachmentWizard) {
- return ((NewAttachmentWizard) getWizard()).getAttachment().getFilePath();
- }
- return null;
- }
-
- public String getAbsoluteAttachmentPath() {
- switch (getInputMethod()) {
- case CLIPBOARD:
- return CLIPBOARD_LABEL;
- case SCREENSHOT:
- return SCREENSHOT_LABEL;
- case WORKSPACE:
- IResource[] resources = getResources(treeViewer.getSelection());
- if (resources.length > 0 && resources[0].getRawLocation() != null) {
- return resources[0].getRawLocation().toOSString();
- } else {
- return null;
- }
- case FILE:
- default:
- return getAttachmentFilePath();
- }
- }
-
- /*
- * Based on .eclipse.compare.internal.Utilities
- *
- * Convenience method: extract all accessible <code>IResources</code> from
- * given selection. Never returns null.
- */
- public static IResource[] getResources(ISelection selection) {
- ArrayList<IResource> tmp = new ArrayList<IResource>();
- Class<?> type = IResource.class;
- if (selection instanceof IStructuredSelection) {
- Object[] s = ((IStructuredSelection) selection).toArray();
-
- for (Object o : s) {
- IResource resource = null;
- if (type.isInstance(o)) {
- resource = (IResource) o;
-
- } else if (o instanceof ResourceMapping) {
- try {
- ResourceTraversal[] travs = ((ResourceMapping) o).getTraversals(
- ResourceMappingContext.LOCAL_CONTEXT, null);
- if (travs != null) {
- for (ResourceTraversal trav : travs) {
- IResource[] resources = trav.getResources();
- for (IResource resource2 : resources) {
- if (type.isInstance(resource2) && resource2.isAccessible()) {
- tmp.add(resource2);
- }
- }
- }
- }
- } catch (CoreException ex) {
- // TODO handle error
- }
- } else if (o instanceof IAdaptable) {
- IAdaptable a = (IAdaptable) o;
- Object adapter = a.getAdapter(IResource.class);
- if (type.isInstance(adapter)) {
- resource = (IResource) adapter;
- }
- }
-
- if (resource != null && resource.isAccessible()) {
- tmp.add(resource);
- }
- }
- }
-
- return tmp.toArray(new IResource[tmp.size()]);
- }
-
- private void storeClipboardContents() {
- Control c = getControl();
- if (c != null) {
- Clipboard clipboard = new Clipboard(c.getDisplay());
- Object o = clipboard.getContents(TextTransfer.getInstance());
- clipboard.dispose();
- if (o instanceof String) {
- clipboardContents = ((String) o).trim();
- }
- }
- }
-
- public String getClipboardContents() {
- return clipboardContents;
- }
-
- public void setClipboardContents(String attachContents) {
- clipboardContents = attachContents;
- }
-
- public void setUseClipboard(boolean b) {
- if (useClipboardButton != null) {
- useClipboardButton.setSelection(b);
- }
- initUseClipboard = b;
- }
-
- @Override
- protected IDialogSettings getDialogSettings() {
- TasksUiPlugin plugin = TasksUiPlugin.getDefault();
- IDialogSettings settings = plugin.getDialogSettings();
- IDialogSettings section = settings.getSection(DIALOG_SETTINGS);
- if (section == null) {
- section = settings.addNewSection(DIALOG_SETTINGS);
- }
- return section;
- }
-
- public AbstractTaskAttachmentSource getSource() {
- switch (getInputMethod()) {
- case CLIPBOARD:
- return new TaskAttachmentWizard.ClipboardTaskAttachmentSource();
- case WORKSPACE:
- IResource[] resources = getResources(treeViewer.getSelection());
- if (resources.length > 0) {
- return new FileTaskAttachmentSource(resources[0].getLocation().toFile());
- } else {
- return null;
- }
- default: // FILE
- return new FileTaskAttachmentSource(new File(getAttachmentFilePath()));
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/MultiRepositoryAwareWizard.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/MultiRepositoryAwareWizard.java
deleted file mode 100644
index e754e3d1e..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/MultiRepositoryAwareWizard.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.wizards;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.ui.INewWizard;
-import org.eclipse.ui.IWorkbench;
-
-/**
- * @author Mik Kersten
- * @author Brock Janiczak
- */
-public class MultiRepositoryAwareWizard extends Wizard implements INewWizard {
-
- private final SelectRepositoryPage selectRepositoryPage;
-
- public MultiRepositoryAwareWizard(SelectRepositoryPage page, String title) {
- selectRepositoryPage = page;
- setForcePreviousAndNextButtons(true);
- setNeedsProgressMonitor(true);
- setWindowTitle(title);
- setDefaultPageImageDescriptor(TasksUiImages.BANNER_REPOSITORY);
- }
-
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- // ignore
- }
-
- @Override
- public void addPages() {
- addPage(selectRepositoryPage);
- }
-
- @Override
- public boolean canFinish() {
- return selectRepositoryPage.canFinish();
- }
-
- @Override
- public boolean performFinish() {
- return selectRepositoryPage.performFinish();
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewAttachmentPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewAttachmentPage.java
deleted file mode 100644
index 623edbf38..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewAttachmentPage.java
+++ /dev/null
@@ -1,301 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.wizards;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.tasks.core.LocalAttachment;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * A wizard page to enter details of a new attachment.
- *
- * @author Jeff Pound
- * @author Mik Kersten
- */
-public class NewAttachmentPage extends WizardPage {
-
- private final LocalAttachment attachment;
-
- private Text filePath;
-
- private Text attachmentDesc;
-
- private Text attachmentComment;
-
- private Button isPatchButton;
-
- private Button attachContextButton;
-
- private Combo contentTypeList;
-
- private boolean supportsDescription = true;
-
- private static List<String> contentTypes;
-
- private static Map<String, String> extensions2Types;
-
- static {
- /* For UI */
- contentTypes = new LinkedList<String>();
- contentTypes.add("text/plain");
- contentTypes.add("text/html");
- contentTypes.add("application/xml");
- contentTypes.add("image/gif");
- contentTypes.add("image/jpeg");
- contentTypes.add("image/png");
- contentTypes.add("application/octet-stream");
-
- /* For auto-detect */
- extensions2Types = new HashMap<String, String>();
- extensions2Types.put("txt", "text/plain");
- extensions2Types.put("html", "text/html");
- extensions2Types.put("htm", "text/html");
- extensions2Types.put("jpg", "image/jpeg");
- extensions2Types.put("jpeg", "image/jpeg");
- extensions2Types.put("gif", "image/gif");
- extensions2Types.put("png", "image/png");
- extensions2Types.put("xml", "application/xml");
- extensions2Types.put("zip", "application/octet-stream");
- extensions2Types.put("tar", "application/octet-stream");
- extensions2Types.put("gz", "application/octet-stream");
- }
-
- protected NewAttachmentPage(LocalAttachment att) {
- super("AttachmentDetails");
- setTitle("Attachment Details");
- setMessage("Enter a description and verify the content type of the attachment");
- attachment = att;
- }
-
- public void createControl(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout gridLayout = new GridLayout();
- gridLayout.numColumns = 3;
- composite.setLayout(gridLayout);
- setControl(composite);
-
- composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- composite.setLayout(new GridLayout(3, false));
-
- final NewAttachmentPage thisPage = this;
-
- new Label(composite, SWT.NONE).setText("File");
- filePath = new Text(composite, SWT.BORDER);
- filePath.setEditable(false);
- filePath.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, 2, 1));
-
- if (supportsDescription) {
- new Label(composite, SWT.NONE).setText("Description");
- attachmentDesc = new Text(composite, SWT.BORDER);
- attachmentDesc.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, 2, 1));
-
- attachmentDesc.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- if ("".equals(attachmentDesc.getText().trim())) {
- thisPage.setErrorMessage("Description required");
- } else {
- if (!"".equals(filePath.getText())) {
- thisPage.setPageComplete(true);
- thisPage.setErrorMessage(null);
- }
- }
- }
-
- });
- }
-
- Label label = new Label(composite, SWT.NONE);
- label.setLayoutData(new GridData(SWT.LEFT, SWT.FILL, false, false));
- label.setText("Comment");
- attachmentComment = new Text(composite, SWT.V_SCROLL | SWT.BORDER | SWT.WRAP);
- attachmentComment.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));
-
- new Label(composite, SWT.NONE).setText("Content Type");// .setBackground(parent.getBackground());
-
- contentTypeList = new Combo(composite, SWT.BORDER | SWT.DROP_DOWN | SWT.READ_ONLY);
- contentTypeList.setLayoutData(new GridData(SWT.DEFAULT, SWT.DEFAULT, false, false, 2, 1));
- final HashMap<String, Integer> contentTypeIndices = new HashMap<String, Integer>();
- Iterator<String> iter = contentTypes.iterator();
- int i = 0;
- while (iter.hasNext()) {
- String next = iter.next();
- contentTypeList.add(next);
- contentTypeIndices.put(next, new Integer(i));
- i++;
- }
-
- /* Update attachment on select content type */
- contentTypeList.addSelectionListener(new SelectionListener() {
- public void widgetDefaultSelected(SelectionEvent e) {
- // ignore
- }
-
- public void widgetSelected(SelectionEvent e) {
- attachment.setContentType(contentTypeList.getItem(contentTypeList.getSelectionIndex()));
- }
- });
- contentTypeList.select(0);
- attachment.setContentType(contentTypeList.getItem(0));
-
- // TODO: is there a better way to pad?
- new Label(composite, SWT.NONE);
-
- isPatchButton = new Button(composite, SWT.CHECK);
- isPatchButton.setLayoutData(new GridData(SWT.DEFAULT, SWT.DEFAULT, false, false, 2, 1));
- isPatchButton.setText("Patch");
-
- // TODO: is there a better way to pad?
- new Label(composite, SWT.NONE);
-
- attachContextButton = new Button(composite, SWT.CHECK);
- attachContextButton.setLayoutData(new GridData(SWT.DEFAULT, SWT.DEFAULT, false, false, 2, 1));
- attachContextButton.setText("Attach Context");
- attachContextButton.setImage(CommonImages.getImage(TasksUiImages.CONTEXT_ATTACH));
- attachContextButton.setEnabled((((NewAttachmentWizard) getWizard()).hasContext()));
-
- /*
- * Attachment file name listener, update the local attachment
- * accordingly
- */
- filePath.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- // Determine type by extension
- int index = filePath.getText().lastIndexOf(".");
- if (index > 0 && index < filePath.getText().length()) {
- String ext = filePath.getText().substring(index + 1);
- String type = extensions2Types.get(ext.toLowerCase(Locale.ENGLISH));
- if (type != null) {
- contentTypeList.select(contentTypeIndices.get(type));
- attachment.setContentType(type);
- }
- }
-
- // check page completenes
- if (attachmentDesc != null && "".equals(attachmentDesc.getText())) {
- thisPage.setErrorMessage("Description required");
- } else {
- if (!"".equals(filePath.getText())) {
- thisPage.setPageComplete(true);
- thisPage.setErrorMessage(null);
- }
- }
- }
- });
-
- filePath.setText(attachment.getFilePath() == null ? "" : attachment.getFilePath()); //$NON-NLS-1$
-
- /* Listener for isPatch */
- isPatchButton.addSelectionListener(new SelectionListener() {
- private int lastSelected;
-
- public void widgetDefaultSelected(SelectionEvent e) {
- // ignore
- }
-
- public void widgetSelected(SelectionEvent e) {
- attachment.setPatch(isPatchButton.getSelection());
- if (isPatchButton.getSelection()) {
- lastSelected = contentTypeList.getSelectionIndex();
- contentTypeList.select(0);
- contentTypeList.setEnabled(false);
- if (attachContextButton.isEnabled()) {
- attachContextButton.setSelection(true);
- }
- } else {
- contentTypeList.setEnabled(true);
- contentTypeList.select(lastSelected);
- }
- }
- });
-
- thisPage.setErrorMessage(null);
- }
-
- @Override
- public boolean isPageComplete() {
- return !"".equals(filePath.getText().trim())
- && (attachmentDesc == null || !"".equals(attachmentDesc.getText().trim()));
- }
-
- public void populateAttachment() {
- if (attachmentDesc != null) {
- attachment.setDescription(attachmentDesc.getText());
- }
- attachment.setComment(attachmentComment.getText());
- }
-
- public LocalAttachment getAttachment() {
- return attachment;
- }
-
- public void setFilePath(String path) {
- filePath.setText(path);
- if (path.endsWith(".patch")) {
- isPatchButton.setSelection(true);
- if (attachContextButton.isEnabled()) {
- attachContextButton.setSelection(true);
- }
- }
- }
-
- @Override
- public IWizardPage getNextPage() {
- populateAttachment();
- PreviewAttachmentPage page = new PreviewAttachmentPage(getAttachment());
- page.setWizard(getWizard());
- return page;
- }
-
- public boolean getAttachContext() {
- return attachContextButton.getSelection();
- }
-
- public void setContentType() {
- String type = attachment.getContentType();
- String[] typeList = contentTypeList.getItems();
- for (int i = 0; i < typeList.length; i++) {
- if (typeList[i].equals(type)) {
- contentTypeList.select(i);
- contentTypeList.setEnabled(false);
- isPatchButton.setEnabled(false);
- return;
- }
- }
- }
-
- public boolean supportsDescription() {
- return supportsDescription;
- }
-
- public void setSupportsDescription(boolean supportsDescription) {
- this.supportsDescription = supportsDescription;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewAttachmentWizard.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewAttachmentWizard.java
deleted file mode 100644
index 7fab59c86..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewAttachmentWizard.java
+++ /dev/null
@@ -1,354 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.wizards;
-
-import java.io.File;
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.core.runtime.jobs.IJobChangeEvent;
-import org.eclipse.core.runtime.jobs.JobChangeAdapter;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.window.Window;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.context.core.ContextCore;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.provisional.commons.ui.ScreenshotCreationPage;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.LocalAttachment;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryTaskHandleUtil;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractAttachmentHandler;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractLegacyRepositoryConnector;
-import org.eclipse.mylyn.internal.tasks.ui.AttachmentUtil;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.deprecated.AbstractRepositoryTaskEditorInput;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.RepositoryStatus;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.ITask.SynchronizationState;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditorInput;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * A wizard to add a new attachment to a task report.
- *
- * @author Jeff Pound
- */
-public class NewAttachmentWizard extends Wizard {
-
- private static final String DIALOG_SETTINGS_KEY = "AttachmentWizard";
-
- protected static final String CLIPBOARD_FILENAME = "clipboard.txt";
-
- protected static final String SCREENSHOT_FILENAME = "screenshot.jpg";
-
- private LocalAttachment attachment;
-
- private final InputAttachmentSourcePage inputPage;
-
- private NewAttachmentPage attachPage;
-
- private NewAttachmentWizardDialog dialog;
-
- private ScreenshotCreationPage shotPage;
-
- private boolean hasNewDialogSettings;
-
- private final TaskRepository repository;
-
- private final AbstractTask task;
-
- private final boolean screenshotMode;
-
- public NewAttachmentWizard(TaskRepository repository, AbstractTask task, boolean screenshotMode) {
- this.task = task;
- this.repository = repository;
- this.screenshotMode = screenshotMode;
-
- if (screenshotMode) {
- setWindowTitle("Attach Screenshot");
- setDefaultPageImageDescriptor(CommonImages.BANNER_SCREENSHOT);
- } else {
- setWindowTitle("Add Attachment");
- setDefaultPageImageDescriptor(TasksUiImages.BANNER_REPOSITORY);
- }
-
- inputPage = new InputAttachmentSourcePage(this);
- if (screenshotMode) {
- shotPage = new ScreenshotAttachmentPage();
- attachment = new ImageAttachment(shotPage);
- } else {
- attachment = new LocalAttachment();
- }
- attachment.setFilePath("");
- setNeedsProgressMonitor(true);
- IDialogSettings workbenchSettings = TasksUiPlugin.getDefault().getDialogSettings();
- IDialogSettings section = workbenchSettings.getSection(DIALOG_SETTINGS_KEY);
- if (section == null) {
- hasNewDialogSettings = true;
- } else {
- hasNewDialogSettings = false;
- setDialogSettings(section);
- }
- }
-
- public NewAttachmentWizard(TaskRepository repository, AbstractTask task) {
- this(repository, task, false);
- }
-
- public NewAttachmentWizard(TaskRepository repository, AbstractTask task, File attachFile) {
- this(repository, task, false);
- attachment.setFilePath(attachFile.getAbsolutePath());
- }
-
- public NewAttachmentWizard(TaskRepository repository, AbstractTask task, String attachContents) {
- this(repository, task, false);
- inputPage.setUseClipboard(true);
- inputPage.setClipboardContents(attachContents);
- attachment.setFilePath(InputAttachmentSourcePage.CLIPBOARD_LABEL);
- }
-
- @Override
- public void dispose() {
- // Ensures the temporary screenshot image is deleted
- if (attachment != null && attachment instanceof ImageAttachment) {
- ((ImageAttachment) attachment).clearImageFile();
- }
- super.dispose();
- }
-
- @Override
- public boolean performFinish() {
- /* TODO jpound - support non-text in clipboard */
- attachPage.populateAttachment();
- final String path = inputPage.getAbsoluteAttachmentPath();
-
- // Save the dialog settings
- if (hasNewDialogSettings) {
- IDialogSettings workbenchSettings = TasksUiPlugin.getDefault().getDialogSettings();
- IDialogSettings section = workbenchSettings.getSection(DIALOG_SETTINGS_KEY);
- section = workbenchSettings.addNewSection(DIALOG_SETTINGS_KEY);
- setDialogSettings(section);
- }
-
- // upload the attachment
- final AbstractLegacyRepositoryConnector connector = (AbstractLegacyRepositoryConnector) TasksUi.getRepositoryManager()
- .getRepositoryConnector(repository.getConnectorKind());
- final AbstractAttachmentHandler attachmentHandler = connector.getAttachmentHandler();
- if (attachmentHandler == null) {
- return false;
- }
-
- final boolean attachContext = attachPage.getAttachContext();
-
- IRunnableWithProgress op = new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException {
- try {
- if (monitor == null) {
- monitor = new NullProgressMonitor();
- }
- monitor.beginTask("Attaching file...", 2);
- task.setSubmitting(true);
- task.setSynchronizationState(SynchronizationState.OUTGOING);
-
- if (screenshotMode || InputAttachmentSourcePage.SCREENSHOT_LABEL.equals(path)) {
- ((ImageAttachment) attachment).ensureImageFileWasCreated();
- } else if (InputAttachmentSourcePage.CLIPBOARD_LABEL.equals(path)) {
- String contents = inputPage.getClipboardContents();
- if (contents == null) {
- throw new InvocationTargetException(new CoreException(new RepositoryStatus(IStatus.ERROR,
- TasksUiPlugin.ID_PLUGIN, RepositoryStatus.ERROR_INTERNAL, "Clipboard is empty",
- null)));
- }
- attachment.setContent(contents.getBytes());
- attachment.setFilename(CLIPBOARD_FILENAME);
- } else {
- File file = new File(path);
- attachment.setFile(file);
- attachment.setFilename(file.getName());
- }
-
- attachmentHandler.uploadAttachment(repository, task, attachment, attachment.getComment(),
- new SubProgressMonitor(monitor, 1));
-
- if (monitor.isCanceled()) {
- throw new OperationCanceledException();
- }
-
- if (attachContext && connector.getAttachmentHandler() != null) {
- AttachmentUtil.attachContext(connector.getAttachmentHandler(), repository, task, "",
- new SubProgressMonitor(monitor, 1));
- }
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
-
- }
-
- };
-
- try {
- getContainer().run(true, true, op);
-
- TasksUiInternal.synchronizeTask(connector, task, false, new JobChangeAdapter() {
- @Override
- public void done(final IJobChangeEvent event) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- if (event.getResult().getException() != null) {
-
- MessageDialog.openError(Display.getDefault().getActiveShell(), "Task Attachment",
- event.getResult().getMessage());
-
- }
- forceRefreshInplace(task);
- }
- });
- }
- });
-
- } catch (InvocationTargetException e1) {
- task.setSubmitting(false);
- task.setSynchronizationState(SynchronizationState.SYNCHRONIZED);
- if (e1.getCause() != null && e1.getCause() instanceof CoreException) {
- handleSubmitError((CoreException) e1.getCause());
- } else {
- StatusHandler.fail(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Attachment failure", e1));
- }
- return false;
- } catch (InterruptedException e1) {
- task.setSubmitting(false);
- task.setSynchronizationState(SynchronizationState.SYNCHRONIZED);
- }
-
- return true;
- }
-
- /**
- * If task is open, force inplace refresh Must be called from UI thread.
- */
- public static boolean forceRefreshInplace(ITask task) {
- if (task != null) {
- String handleTarget = task.getHandleIdentifier();
- for (TaskEditor editor : TasksUiInternal.getActiveRepositoryTaskEditors()) {
- if (editor.getEditorInput() instanceof AbstractRepositoryTaskEditorInput) {
- AbstractRepositoryTaskEditorInput input = (AbstractRepositoryTaskEditorInput) editor.getEditorInput();
- if (input.getTaskData() != null) {
- String handle = RepositoryTaskHandleUtil.getHandle(input.getTaskData().getRepositoryUrl(),
- input.getTaskData().getTaskId());
- if (handle.equals(handleTarget)) {
- editor.refreshEditorContents();
- editor.getEditorSite().getPage().activate(editor);
- return true;
- }
- }
- } else if (editor.getEditorInput() instanceof TaskEditorInput) {
- TaskEditorInput input = (TaskEditorInput) editor.getEditorInput();
- if (input.getTask().getHandleIdentifier().equals(handleTarget)) {
- editor.refreshEditorContents();
- editor.getEditorSite().getPage().activate(editor);
- return true;
- }
- }
- }
- }
- return false;
- }
-
- private void handleSubmitError(final CoreException exception) {
- if (exception.getStatus().getCode() == RepositoryStatus.ERROR_REPOSITORY_LOGIN) {
- if (TasksUiUtil.openEditRepositoryWizard(repository) == Window.OK) {
- // performFinish();
- }
- } else {
- TasksUiInternal.displayStatus("Attachment failed", exception.getStatus());
- }
- }
-
- protected boolean hasContext() {
- return ContextCore.getContextManager().hasContext(task.getHandleIdentifier());
- }
-
- @Override
- public boolean canFinish() {
- if (screenshotMode) {
- return shotPage.isPageComplete() && attachPage.isPageComplete();
- } else {
- return attachPage.isPageComplete();
- }
- }
-
- @Override
- public void addPages() {
- super.addPages();
- if (screenshotMode) {
- addPage(shotPage);
- addPage((attachPage = new NewAttachmentPage(attachment)));
- } else {
- if ("".equals(attachment.getFilePath())) {
- addPage(inputPage);
- }
- addPage((attachPage = new NewAttachmentPage(attachment)));
-// addPage((shotPage = new ScreenshotAttachmentPage(attachment)));
- }
- // XXX wizard needs refactoring: bug 193156
- attachPage.setSupportsDescription(!"jira".equals(task.getConnectorKind()));
- }
-
- public LocalAttachment getAttachment() {
- return attachment;
- }
-
- protected String getFilePath() {
- return inputPage.getAttachmentName();
- }
-
- @Override
- public IWizardPage getNextPage(IWizardPage page) {
- if (page == inputPage) {
- attachPage.setFilePath(inputPage.getAttachmentName());
- }
- return super.getNextPage(page);
- }
-
- public void showPage(IWizardPage page) {
- dialog.showPage(page);
- }
-
- public void setDialog(NewAttachmentWizardDialog dialog) {
- this.dialog = dialog;
- }
-
- public String getClipboardContents() {
- return inputPage.getClipboardContents();
- }
-
- @Override
- public boolean needsPreviousAndNextButtons() {
- return true;
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewAttachmentWizardDialog.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewAttachmentWizardDialog.java
deleted file mode 100644
index 7ede8ef39..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewAttachmentWizardDialog.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.wizards;
-
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * @author Jeff Pound
- */
-public class NewAttachmentWizardDialog extends WizardDialog {
-
- private static final String ATTACHMENT_WIZARD_SETTINGS_SECTION = "PatchWizard";
-
- public NewAttachmentWizardDialog(Shell parent, IWizard wizard, boolean modal) {
- super(parent, wizard);
-
- if (modal) {
- setShellStyle(getShellStyle() | SWT.RESIZE);
- } else {
- setShellStyle(SWT.MODELESS | SWT.CLOSE | SWT.TITLE | SWT.BORDER | SWT.RESIZE);
- }
- setMinimumPageSize(600, 300);
- setPageSize(600, 300);
- setBlockOnOpen(modal);
- }
-
- @Override
- protected IDialogSettings getDialogBoundsSettings() {
- IDialogSettings settings = TasksUiPlugin.getDefault().getDialogSettings();
- IDialogSettings section = settings.getSection(ATTACHMENT_WIZARD_SETTINGS_SECTION);
- if (section == null) {
- section = settings.addNewSection(ATTACHMENT_WIZARD_SETTINGS_SECTION);
- }
- return section;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewLocalCategoryWizard.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewLocalCategoryWizard.java
deleted file mode 100644
index b304eb8fe..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewLocalCategoryWizard.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.wizards;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.mylyn.internal.tasks.ui.actions.NewCategoryAction;
-import org.eclipse.ui.INewWizard;
-import org.eclipse.ui.IWorkbench;
-
-/**
- * @author Mik Kersten
- */
-public class NewLocalCategoryWizard extends Wizard implements INewWizard {
-
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- setForcePreviousAndNextButtons(false);
- }
-
- @Override
- public boolean canFinish() {
- return true;
- }
-
- @Override
- public boolean performFinish() {
- new NewCategoryAction().run();
- return true;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewLocalTaskWizard.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewLocalTaskWizard.java
deleted file mode 100644
index 2b81f5523..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewLocalTaskWizard.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.wizards;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.mylyn.internal.tasks.core.LocalTask;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.TaskSelection;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.core.ITaskMapping;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.ui.INewWizard;
-import org.eclipse.ui.IWorkbench;
-
-/**
- * @author Rob Elves
- * @author Steffen Pingel
- */
-public class NewLocalTaskWizard extends Wizard implements INewWizard {
-
- private final ITaskMapping taskSelection;
-
- public NewLocalTaskWizard(ITaskMapping taskSelection) {
- this.taskSelection = taskSelection;
- setDefaultPageImageDescriptor(TasksUiImages.BANNER_REPOSITORY);
- setNeedsProgressMonitor(true);
- }
-
- public NewLocalTaskWizard() {
- this(null);
- }
-
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- setForcePreviousAndNextButtons(false);
- }
-
- @Override
- public void addPages() {
- // ignore
- }
-
- @Override
- public boolean canFinish() {
- return true;
- }
-
- @Override
- public boolean performFinish() {
- LocalTask task = TasksUiInternal.createNewLocalTask(null);
- if (taskSelection instanceof TaskSelection) {
- task.setSummary(((TaskSelection) taskSelection).getLegacyTaskData().getSummary());
- task.setNotes(((TaskSelection) taskSelection).getLegacyTaskData().getDescription());
- }
- // FIXME 3.0 TaskData support
- if (task != null) {
- TasksUiUtil.openTask(task);
- return true;
- } else {
- return false;
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewQueryWizard.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewQueryWizard.java
deleted file mode 100644
index 011cd09c9..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewQueryWizard.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.wizards;
-
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.mylyn.internal.tasks.core.ITaskRepositoryFilter;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-
-/**
- * @author Mik Kersten
- * @author Eugene Kuleshov
- */
-public class NewQueryWizard extends MultiRepositoryAwareWizard {
-
- private static final String TITLE = "New Repository Query";
-
- public NewQueryWizard() {
- super(new SelectRepositoryPageForNewQuery(), TITLE);
- }
-
- private static final class SelectRepositoryPageForNewQuery extends SelectRepositoryPage {
- public SelectRepositoryPageForNewQuery() {
- super(ITaskRepositoryFilter.CAN_QUERY);
- }
-
- @Override
- protected IWizard createWizard(TaskRepository taskRepository) {
- AbstractRepositoryConnectorUi repositoryUi = TasksUiPlugin.getConnectorUi(taskRepository.getConnectorKind());
- return repositoryUi.getQueryWizard(taskRepository, null);
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewRepositoryWizard.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewRepositoryWizard.java
deleted file mode 100644
index 2c683d75e..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewRepositoryWizard.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.wizards;
-
-import java.util.Collection;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.actions.AddRepositoryAction;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.ui.wizards.ITaskRepositoryPage;
-import org.eclipse.ui.INewWizard;
-import org.eclipse.ui.IWorkbench;
-
-/**
- * @author Mik Kersten
- * @author Steffen Pingel
- */
-public class NewRepositoryWizard extends Wizard implements INewWizard {
-
- private AbstractRepositoryConnector connector;
-
- /**
- * If not null, indicates that the wizard will initially jump to a specific connector page
- */
- private final String connectorKind;
-
- private TaskRepository taskRepository;
-
- private SelectRepositoryConnectorPage selectConnectorPage;
-
- private ITaskRepositoryPage settingsPage;
-
- public NewRepositoryWizard() {
- this(null);
- }
-
- public NewRepositoryWizard(String connectorKind) {
- this.connectorKind = connectorKind;
- setDefaultPageImageDescriptor(TasksUiImages.BANNER_REPOSITORY);
- setForcePreviousAndNextButtons(true);
- setNeedsProgressMonitor(true);
- setWindowTitle(AddRepositoryAction.TITLE);
- }
-
- @Override
- public void addPages() {
- Collection<AbstractRepositoryConnector> connectors = TasksUi.getRepositoryManager().getRepositoryConnectors();
- if (connectorKind != null || connectors.size() == 1) {
- if (connectorKind != null) {
- connector = TasksUi.getRepositoryManager().getRepositoryConnector(connectorKind);
- } else {
- connector = connectors.toArray(new AbstractRepositoryConnector[1])[0];
- }
- updateSettingsPage();
- addPage(settingsPage);
- } else {
- selectConnectorPage = new SelectRepositoryConnectorPage();
- addPage(selectConnectorPage);
- }
- }
-
- @Override
- public boolean canFinish() {
- return selectConnectorPage.isPageComplete();
- }
-
- @Override
- public IWizardPage getNextPage(IWizardPage page) {
- if (page == selectConnectorPage) {
- connector = selectConnectorPage.getConnector();
- updateSettingsPage();
- return settingsPage;
- }
- return super.getNextPage(page);
- }
-
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- }
-
- @Override
- public boolean performFinish() {
- if (canFinish()) {
- taskRepository = settingsPage.createTaskRepository();
- settingsPage.applyTo(taskRepository);
- TasksUi.getRepositoryManager().addRepository(taskRepository);
- return true;
- }
- return false;
- }
-
- public TaskRepository getTaskRepository() {
- return taskRepository;
- }
-
- private void updateSettingsPage() {
- assert connector != null;
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(connector.getConnectorKind());
- settingsPage = connectorUi.getSettingsPage(null);
- settingsPage.setWizard(this);
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewTaskPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewTaskPage.java
deleted file mode 100644
index b3ff1d794..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewTaskPage.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.wizards;
-
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.mylyn.internal.tasks.core.ITaskRepositoryFilter;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.ITaskMapping;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-
-/**
- * @author Mik Kersten
- * @author Eugene Kuleshov
- */
-public class NewTaskPage extends SelectRepositoryPage {
-
- private final ITaskMapping taskSelection;
-
- public NewTaskPage(ITaskRepositoryFilter taskRepositoryFilter, ITaskMapping taskSelection) {
- super(taskRepositoryFilter);
- this.taskSelection = taskSelection;
- }
-
- @Override
- protected IWizard createWizard(TaskRepository taskRepository) {
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(taskRepository.getConnectorKind());
- return connectorUi.getNewTaskWizard(taskRepository, taskSelection);
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewTaskWizard.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewTaskWizard.java
deleted file mode 100644
index 0e7835c80..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewTaskWizard.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.wizards;
-
-import org.eclipse.mylyn.internal.tasks.core.ITaskRepositoryFilter;
-import org.eclipse.mylyn.tasks.core.ITaskMapping;
-import org.eclipse.ui.INewWizard;
-
-/**
- * @author Mik Kersten
- * @author Eugene Kuleshov
- * @author Steffen Pingel
- */
-// API-3.0: rename this class, the name conflicts with org.eclipse.mylyn.tasks.ui.wizards.NewTaskWizard
-public class NewTaskWizard extends MultiRepositoryAwareWizard implements INewWizard {
-
- private static final String TITLE = "New Task";
-
- public NewTaskWizard(ITaskMapping taskSelection) {
- super(new NewTaskPage(ITaskRepositoryFilter.CAN_CREATE_NEW_TASK, taskSelection), TITLE);
- setNeedsProgressMonitor(true);
- }
-
- /**
- * Constructs a new task wizard with an empty selection. This constructor is used by the
- * <code>org.eclipse.ui.newWizards</code> extension.
- */
- public NewTaskWizard() {
- this(null);
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewWebTaskPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewWebTaskPage.java
deleted file mode 100644
index be54b3ff5..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewWebTaskPage.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.wizards;
-
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.mylyn.tasks.core.ITaskMapping;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * Wizard page for creating new tickets through a web browser.
- *
- * @author Eugene Kuleshov
- * @author Mik Kersten
- * @author Steffen Pingel
- */
-public class NewWebTaskPage extends WizardPage {
-
- public NewWebTaskPage(ITaskMapping taskSelection) {
- super("New Task");
-
- setTitle("Create via Web Browser");
- setDescription("This will open a web browser that can be used to create a new task.\n"
- + "NOTE: you may need to log in via the web UI.");
-
- // TODO display selection
- }
-
- public void createControl(Composite parent) {
- Text text = new Text(parent, SWT.WRAP);
- text.setEditable(false);
- text.setText("Once submitted synchronize queries or add the task to a category.\n");
- setControl(text);
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/PreviewAttachmentPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/PreviewAttachmentPage.java
deleted file mode 100644
index ed89a5a2a..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/PreviewAttachmentPage.java
+++ /dev/null
@@ -1,237 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.wizards;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import java.util.HashMap;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.jface.layout.GridLayoutFactory;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.mylyn.internal.tasks.core.LocalAttachment;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.ScrolledComposite;
-import org.eclipse.swt.events.ControlAdapter;
-import org.eclipse.swt.events.ControlEvent;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.events.PaintEvent;
-import org.eclipse.swt.events.PaintListener;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Canvas;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.ScrollBar;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * Shows a preview of a LocalAttachment.
- *
- * @author Jeff Pound
- */
-public class PreviewAttachmentPage extends WizardPage {
-
- private static final String PAGE_NAME = "PreviewAttachmentPage";
-
- private static final String TITLE = "Attachment Preview";
-
- private static final String DESCRIPTION = "Review the attachment before submitting";
-
- private final LocalAttachment attachment;
-
- private static HashMap<String, String> textTypes;
-
- private static HashMap<String, String> imageTypes;
-
- private ScrolledComposite scrolledComposite;
-
- static {
- textTypes = new HashMap<String, String>();
- imageTypes = new HashMap<String, String>();
-
- textTypes.put("text/plain", "");
- textTypes.put("text/html", "");
- textTypes.put("text/html", "");
- textTypes.put("application/xml", "");
-
- imageTypes.put("image/jpeg", "");
- imageTypes.put("image/gif", "");
- imageTypes.put("image/png", "");
- }
-
- private static boolean isTextAttachment(String contentType) {
- return textTypes.get(contentType) != null;
- }
-
- private static boolean isImageAttachment(String contentType) {
- return imageTypes.get(contentType) != null;
- }
-
- protected PreviewAttachmentPage(LocalAttachment attachment) {
- super(PAGE_NAME);
- setTitle(TITLE);
- setDescription(DESCRIPTION);
- this.attachment = attachment;
- }
-
- public void createControl(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- composite.setLayout(new GridLayout());
- setControl(composite);
-
- if (attachment instanceof ImageAttachment) {
- try {
- getContainer().run(true, false, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- monitor.beginTask("Preparing image for preview...", 1);
- ((ImageAttachment) attachment).ensureImageFileWasCreated();
- monitor.worked(1);
- monitor.done();
- }
- });
- } catch (InvocationTargetException e) {
- createErrorPreview(composite, "Could not create image for preview");
- return;
- } catch (InterruptedException e) {
- createErrorPreview(composite, "Could not create image for preview");
- return;
- }
- }
-
- if (InputAttachmentSourcePage.CLIPBOARD_LABEL.equals(attachment.getFilePath())) {
- createTextPreview(composite, ((NewAttachmentWizard) getWizard()).getClipboardContents());
- } else if (PreviewAttachmentPage.isTextAttachment(attachment.getContentType())) {
- createTextPreview(composite, attachment);
- } else if (PreviewAttachmentPage.isImageAttachment(attachment.getContentType())) {
- createImagePreview(composite, attachment);
- } else {
- createGenericPreview(composite, attachment);
- }
- }
-
- private void createTextPreview(Composite composite, String contents) {
- Text text = new Text(composite, SWT.MULTI | SWT.READ_ONLY | SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
- GridData gd = new GridData(GridData.FILL_BOTH);
- gd.heightHint = composite.getBounds().y;
- gd.widthHint = composite.getBounds().x;
- text.setLayoutData(gd);
- text.setText(contents);
- }
-
- private void createTextPreview(Composite composite, LocalAttachment attachment) {
- try {
- StringBuffer content = new StringBuffer();
- BufferedReader in = new BufferedReader(new FileReader(new File(attachment.getFilePath())));
- String line;
- while ((line = in.readLine()) != null) {
- content.append(line);
- content.append("\n");
- }
- in.close();
- createTextPreview(composite, content.toString());
-
- } catch (FileNotFoundException e) {
- createErrorPreview(composite, "Could not locate file '" + attachment.getFilePath() + "'");
- } catch (IOException e) {
- createErrorPreview(composite, "Error reading file '" + attachment.getFilePath() + "'");
- }
- }
-
- private void createImagePreview(Composite composite, LocalAttachment attachment) {
- // Uses double buffering to paint the image; there was a weird behavior
- // with transparent images and flicker with large images
- Image originalImage = new Image(composite.getDisplay(), attachment.getFilePath());
- final Image bufferedImage = new Image(composite.getDisplay(), originalImage.getBounds());
- GC gc = new GC(bufferedImage);
- gc.setBackground(composite.getBackground());
- gc.fillRectangle(originalImage.getBounds());
- gc.drawImage(originalImage, 0, 0);
- gc.dispose();
- originalImage.dispose();
-
- scrolledComposite = new ScrolledComposite(composite, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
- scrolledComposite.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create());
- scrolledComposite.setExpandHorizontal(true);
- scrolledComposite.setExpandVertical(true);
-
- Composite canvasComposite = new Composite(scrolledComposite, SWT.NONE);
- canvasComposite.setLayout(GridLayoutFactory.fillDefaults().create());
- Canvas canvas = new Canvas(canvasComposite, SWT.NO_BACKGROUND);
- final Rectangle imgSize = bufferedImage.getBounds();
- canvas.setLayoutData(GridDataFactory.fillDefaults().align(SWT.CENTER, SWT.CENTER).grab(true, true).hint(
- imgSize.width, imgSize.height).create());
- canvas.addPaintListener(new PaintListener() {
-
- public void paintControl(PaintEvent e) {
- e.gc.drawImage(bufferedImage, 0, 0);
- }
-
- });
- canvas.addDisposeListener(new DisposeListener() {
-
- public void widgetDisposed(DisposeEvent e) {
- bufferedImage.dispose();
- }
-
- });
- canvas.setSize(imgSize.width, imgSize.height);
- scrolledComposite.setMinSize(imgSize.width, imgSize.height);
- scrolledComposite.setContent(canvasComposite);
- scrolledComposite.addControlListener(new ControlAdapter() {
-
- @Override
- public void controlResized(ControlEvent e) {
- adjustScrollbars(imgSize);
- }
-
- });
- adjustScrollbars(imgSize);
- }
-
- private void adjustScrollbars(Rectangle imgSize) {
- Rectangle clientArea = scrolledComposite.getClientArea();
-
- ScrollBar hBar = scrolledComposite.getHorizontalBar();
- hBar.setMinimum(0);
- hBar.setMaximum(imgSize.width - 1);
- hBar.setPageIncrement(clientArea.width);
- hBar.setIncrement(10);
-
- ScrollBar vBar = scrolledComposite.getVerticalBar();
- vBar.setMinimum(0);
- vBar.setMaximum(imgSize.height - 1);
- vBar.setPageIncrement(clientArea.height);
- vBar.setIncrement(10);
- }
-
- private void createGenericPreview(Composite composite, LocalAttachment attachment) {
- Label label = new Label(composite, SWT.NONE);
- label.setLayoutData(new GridData(GridData.FILL_BOTH));
- label.setText("Attaching File '" + attachment.getFilePath() + "'\nA preview the type '"
- + attachment.getContentType() + "' is currently not available");
- }
-
- private void createErrorPreview(Composite composite, String message) {
- Label label = new Label(composite, SWT.NONE);
- label.setLayoutData(new GridData(GridData.FILL_BOTH));
- label.setText(message);
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/PreviewAttachmentPage2.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/PreviewAttachmentPage2.java
deleted file mode 100644
index bd0f257cb..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/PreviewAttachmentPage2.java
+++ /dev/null
@@ -1,282 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.wizards;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.lang.reflect.InvocationTargetException;
-import java.util.HashSet;
-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.jface.layout.GridDataFactory;
-import org.eclipse.jface.layout.GridLayoutFactory;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.data.TaskAttachmentModel;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.ScrolledComposite;
-import org.eclipse.swt.events.ControlAdapter;
-import org.eclipse.swt.events.ControlEvent;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.events.PaintEvent;
-import org.eclipse.swt.events.PaintListener;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Canvas;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.ScrollBar;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * Shows a preview of an attachment.
- *
- * @author Jeff Pound
- * @author Steffen Pingel
- */
-public class PreviewAttachmentPage2 extends WizardPage {
-
- private static final String DESCRIPTION = "Review the attachment before submitting";
-
- protected static final int MAX_TEXT_SIZE = 50000;
-
- private static final String PAGE_NAME = "PreviewAttachmentPage";
-
- private static final String TITLE = "Attachment Preview";
-
- private final Set<String> imageTypes;
-
- private final TaskAttachmentModel model;
-
- private Button runInBackgroundButton;
-
- private ScrolledComposite scrolledComposite;
-
- private final Set<String> textTypes;
-
- private Composite contentComposite;
-
- public PreviewAttachmentPage2(TaskAttachmentModel model) {
- super(PAGE_NAME);
- this.model = model;
- setTitle(TITLE);
- setDescription(DESCRIPTION);
-
- textTypes = new HashSet<String>();
- textTypes.add("text/plain");
- textTypes.add("text/html");
- textTypes.add("text/html");
- textTypes.add("application/xml");
-
- imageTypes = new HashSet<String>();
- imageTypes.add("image/jpeg");
- imageTypes.add("image/gif");
- imageTypes.add("image/png");
- }
-
- private void adjustScrollbars(Rectangle imgSize) {
- Rectangle clientArea = scrolledComposite.getClientArea();
-
- ScrollBar hBar = scrolledComposite.getHorizontalBar();
- hBar.setMinimum(0);
- hBar.setMaximum(imgSize.width - 1);
- hBar.setPageIncrement(clientArea.width);
- hBar.setIncrement(10);
-
- ScrollBar vBar = scrolledComposite.getVerticalBar();
- vBar.setMinimum(0);
- vBar.setMaximum(imgSize.height - 1);
- vBar.setPageIncrement(clientArea.height);
- vBar.setIncrement(10);
- }
-
- public void createControl(Composite parent) {
- final Composite composite = new Composite(parent, SWT.NONE);
- composite.setLayout(new GridLayout());
- setControl(composite);
-
- contentComposite = new Composite(composite, SWT.NONE);
- contentComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
- contentComposite.setLayout(new GridLayout());
-
- runInBackgroundButton = new Button(composite, SWT.CHECK);
- runInBackgroundButton.setText("Run in background");
- }
-
- @Override
- public void setVisible(boolean visible) {
- if (visible) {
- Control[] children = contentComposite.getChildren();
- for (Control control : children) {
- control.dispose();
- }
- if (isTextAttachment() || isImageAttachment()) {
- Object content = getContent(contentComposite);
- if (content instanceof String) {
- createTextPreview(contentComposite, (String) content);
- } else if (content instanceof Image) {
- createImagePreview(contentComposite, (Image) content);
- }
- } else {
- createGenericPreview(contentComposite);
- }
- contentComposite.layout(true, true);
- }
- super.setVisible(visible);
- }
-
- private void createErrorPreview(Composite composite, String message) {
- Label label = new Label(composite, SWT.NONE);
- label.setLayoutData(new GridData(GridData.FILL_BOTH));
- label.setText(message);
- }
-
- private void createGenericPreview(Composite composite) {
- Label label = new Label(composite, SWT.NONE);
- label.setLayoutData(new GridData(GridData.FILL_BOTH));
- label.setText("Attaching File '" + model.getSource().getName() + "'\nA preview the type '"
- + model.getContentType() + "' is currently not available");
- }
-
- private void createImagePreview(Composite composite, final Image bufferedImage) {
- scrolledComposite = new ScrolledComposite(composite, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
- scrolledComposite.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create());
- scrolledComposite.setExpandHorizontal(true);
- scrolledComposite.setExpandVertical(true);
-
- Composite canvasComposite = new Composite(scrolledComposite, SWT.NONE);
- canvasComposite.setLayout(GridLayoutFactory.fillDefaults().create());
- Canvas canvas = new Canvas(canvasComposite, SWT.NO_BACKGROUND);
- final Rectangle imgSize = bufferedImage.getBounds();
- canvas.setLayoutData(GridDataFactory.fillDefaults().align(SWT.CENTER, SWT.CENTER).grab(true, true).hint(
- imgSize.width, imgSize.height).create());
- canvas.addPaintListener(new PaintListener() {
- public void paintControl(PaintEvent event) {
- event.gc.drawImage(bufferedImage, 0, 0);
- }
- });
- canvas.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent event) {
- bufferedImage.dispose();
- }
- });
- canvas.setSize(imgSize.width, imgSize.height);
- scrolledComposite.setMinSize(imgSize.width, imgSize.height);
- scrolledComposite.setContent(canvasComposite);
- scrolledComposite.addControlListener(new ControlAdapter() {
- @Override
- public void controlResized(ControlEvent event) {
- adjustScrollbars(imgSize);
- }
-
- });
- adjustScrollbars(imgSize);
- }
-
- private void createTextPreview(Composite composite, String contents) {
- Text text = new Text(composite, SWT.MULTI | SWT.READ_ONLY | SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
- GridData gd = new GridData(GridData.FILL_BOTH);
- gd.heightHint = composite.getBounds().y;
- gd.widthHint = composite.getBounds().x;
- text.setLayoutData(gd);
- text.setText(contents);
- }
-
- private Object getContent(final Composite composite) {
- final Object result[] = new Object[1];
- try {
- getContainer().run(true, false, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- monitor.beginTask("Preparing preview", IProgressMonitor.UNKNOWN);
- final InputStream in = model.getSource().createInputStream(monitor);
- try {
- if (isTextAttachment()) {
- StringBuilder content = new StringBuilder();
- BufferedReader reader = new BufferedReader(new InputStreamReader(in));
- String line;
- while ((line = reader.readLine()) != null && content.length() < MAX_TEXT_SIZE
- && !monitor.isCanceled()) {
- content.append(line);
- content.append("\n");
- }
- result[0] = content.toString();
- } else if (isImageAttachment()) {
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- // Uses double buffering to paint the image; there was a weird behavior
- // with transparent images and flicker with large images
- Image originalImage = new Image(getShell().getDisplay(), in);
- final Image bufferedImage = new Image(getShell().getDisplay(),
- originalImage.getBounds());
- GC gc = new GC(bufferedImage);
- gc.setBackground(composite.getBackground());
- gc.fillRectangle(originalImage.getBounds());
- gc.drawImage(originalImage, 0, 0);
- gc.dispose();
- originalImage.dispose();
- result[0] = bufferedImage;
- }
- });
- }
- } catch (IOException e) {
- throw new InvocationTargetException(e);
- } finally {
- try {
- in.close();
- } catch (IOException e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Failed to close file", e));
- }
- }
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
- });
- } catch (InvocationTargetException e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Error generating preview", e));
- createErrorPreview(composite, "Could not create preview");
- return null;
- } catch (InterruptedException e) {
- return null;
- }
- return result[0];
- }
-
- private boolean isImageAttachment() {
- return imageTypes.contains(model.getContentType());
- }
-
- private boolean isTextAttachment() {
- return textTypes.contains(model.getContentType());
- }
-
- public boolean runInBackground() {
- return runInBackgroundButton.getSelection();
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ScreenshotAttachmentPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ScreenshotAttachmentPage.java
deleted file mode 100644
index 88f52d0b6..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ScreenshotAttachmentPage.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.wizards;
-
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.mylyn.internal.provisional.commons.ui.ScreenshotCreationPage;
-
-/**
- * @author Mik Kersten
- */
-@Deprecated
-public class ScreenshotAttachmentPage extends ScreenshotCreationPage {
-
- @Override
- public void setImageDirty(boolean pageDirty) {
- super.setImageDirty(pageDirty);
- if (pageDirty) {
- NewAttachmentWizard wizard = (NewAttachmentWizard) getWizard();
- ((ImageAttachment) wizard.getAttachment()).markDirty();
- }
- }
-
- @Override
- public IWizardPage getNextPage() {
- NewAttachmentPage page = (NewAttachmentPage) getWizard().getPage("AttachmentDetails");
- page.setFilePath(InputAttachmentSourcePage.SCREENSHOT_LABEL);
- page.setContentType();
- return page;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/SelectRepositoryConnectorPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/SelectRepositoryConnectorPage.java
deleted file mode 100644
index e00b38702..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/SelectRepositoryConnectorPage.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.wizards;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jface.viewers.IOpenListener;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.OpenEvent;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskRepositoriesSorter;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskRepositoryLabelProvider;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * @author Mik Kersten
- */
-public class SelectRepositoryConnectorPage extends WizardPage {
-
- private static final String DESCRIPTION = "You can connect to an existing account using one of the installed connectors.";
-
- private static final String TITLE = "Select a task repository type";
-
- private TableViewer viewer;
-
- private AbstractRepositoryConnector connector;
-
- static class RepositoryContentProvider implements IStructuredContentProvider {
-
- public void inputChanged(Viewer v, Object oldInput, Object newInput) {
- }
-
- public void dispose() {
- }
-
- public Object[] getElements(Object parent) {
- List<AbstractRepositoryConnector> userManagedRepositories = new ArrayList<AbstractRepositoryConnector>();
- for (AbstractRepositoryConnector connector : TasksUi.getRepositoryManager().getRepositoryConnectors()) {
- if (connector.isUserManaged()) {
- userManagedRepositories.add(connector);
- }
- }
-
- return userManagedRepositories.toArray();
- }
- }
-
- public SelectRepositoryConnectorPage() {
- super(TITLE);
- setTitle(TITLE);
- setDescription(DESCRIPTION);
- }
-
- @Override
- public boolean canFlipToNextPage() {
- return connector != null;
- }
-
- public void createControl(Composite parent) {
- Composite container = new Composite(parent, SWT.NULL);
- FillLayout layout = new FillLayout();
- container.setLayout(layout);
-
- viewer = new TableViewer(container, SWT.SINGLE | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
- viewer.setContentProvider(new RepositoryContentProvider());
- viewer.setSorter(new TaskRepositoriesSorter());
- viewer.setLabelProvider(new TaskRepositoryLabelProvider());
- viewer.setInput(TasksUi.getRepositoryManager().getRepositoryConnectors());
- viewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- IStructuredSelection selection = (IStructuredSelection) event.getSelection();
- if (selection.getFirstElement() instanceof AbstractRepositoryConnector) {
- connector = (AbstractRepositoryConnector) selection.getFirstElement();
- setPageComplete(true);
- }
- }
-
- });
-
- viewer.addOpenListener(new IOpenListener() {
- public void open(OpenEvent event) {
- getContainer().showPage(getNextPage());
- }
- });
-
- setControl(container);
- }
-
- public AbstractRepositoryConnector getConnector() {
- return connector;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/SelectRepositoryPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/SelectRepositoryPage.java
deleted file mode 100644
index 67fc1f5c1..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/SelectRepositoryPage.java
+++ /dev/null
@@ -1,279 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.wizards;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.jface.viewers.DecoratingLabelProvider;
-import org.eclipse.jface.viewers.IOpenListener;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.OpenEvent;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.IWizardNode;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.jface.wizard.WizardSelectionPage;
-import org.eclipse.mylyn.internal.tasks.core.ITaskRepositoryFilter;
-import org.eclipse.mylyn.internal.tasks.core.LocalRepositoryConnector;
-import org.eclipse.mylyn.internal.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.actions.AddRepositoryAction;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskRepositoriesSorter;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskRepositoryLabelProvider;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Mik Kersten
- * @author Brock Janiczak
- * @author Steffen Pingel
- * @author Eugene Kuleshov
- */
-public abstract class SelectRepositoryPage extends WizardSelectionPage {
-
- private static final String DESCRIPTION = "Add new repositories using the " + TasksUiPlugin.LABEL_VIEW_REPOSITORIES
- + " view.\n" + "If a repository is missing it does not support the requested operation.";
-
- private static final String TITLE = "Select a repository";
-
- private TableViewer viewer;
-
- protected MultiRepositoryAwareWizard wizard;
-
- private List<TaskRepository> repositories = new ArrayList<TaskRepository>();
-
- private final ITaskRepositoryFilter taskRepositoryFilter;
-
- class RepositoryContentProvider implements IStructuredContentProvider {
-
- public void inputChanged(Viewer v, Object oldInput, Object newInput) {
- }
-
- public void dispose() {
- }
-
- public Object[] getElements(Object parent) {
- return repositories.toArray();
- }
- }
-
- public SelectRepositoryPage(ITaskRepositoryFilter taskRepositoryFilter) {
- super(TITLE);
-
- setTitle(TITLE);
- setDescription(DESCRIPTION);
-
- this.taskRepositoryFilter = taskRepositoryFilter;
- this.repositories = getTaskRepositories();
- }
-
- public List<TaskRepository> getTaskRepositories() {
- List<TaskRepository> repositories = new ArrayList<TaskRepository>();
- TaskRepositoryManager repositoryManager = TasksUiPlugin.getRepositoryManager();
- for (AbstractRepositoryConnector connector : repositoryManager.getRepositoryConnectors()) {
- Set<TaskRepository> connectorRepositories = repositoryManager.getRepositories(connector.getConnectorKind());
- for (TaskRepository repository : connectorRepositories) {
- if (taskRepositoryFilter.accept(repository, connector)) {
- repositories.add(repository);
- }
- }
- }
- return repositories;
- }
-
- public void createControl(Composite parent) {
- Composite container = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout(1, true);
- container.setLayout(layout);
-
- Table table = createTableViewer(container);
- viewer.setSorter(new TaskRepositoriesSorter());
-
- GridData gridData = new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL);
- table.setLayoutData(gridData);
-
- final AddRepositoryAction action = new AddRepositoryAction();
- action.setPromptToAddQuery(false);
-
- Button button = new Button(container, SWT.NONE);
- button.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_BEGINNING));
- button.setText(AddRepositoryAction.TITLE);
- button.setEnabled(action.isEnabled());
- button.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- TaskRepository taskRepository = action.showWizard();
- if (taskRepository != null) {
- SelectRepositoryPage.this.repositories = getTaskRepositories();
- viewer.setInput(TasksUi.getRepositoryManager().getRepositoryConnectors());
- viewer.setSelection(new StructuredSelection(taskRepository));
- }
- }
- });
-
- setControl(container);
- }
-
- protected Table createTableViewer(Composite container) {
- viewer = new TableViewer(container, SWT.SINGLE | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
- viewer.setContentProvider(new RepositoryContentProvider());
- // viewer.setLabelProvider(new TaskRepositoryLabelProvider());
- viewer.setLabelProvider(new DecoratingLabelProvider(new TaskRepositoryLabelProvider(),
- PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator()));
- viewer.setInput(TasksUi.getRepositoryManager().getRepositoryConnectors());
-
- viewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- IStructuredSelection selection = (IStructuredSelection) event.getSelection();
- if (selection.getFirstElement() instanceof TaskRepository) {
- setSelectedNode(new CustomWizardNode((TaskRepository) selection.getFirstElement()));
- setPageComplete(true);
- } else {
- setPageComplete(false);
- }
- }
- });
-
- TaskRepository selectedRepository = TasksUiUtil.getSelectedRepository(null);
- if (selectedRepository != null) {
- viewer.setSelection(new StructuredSelection(selectedRepository));
- } else {
- TaskRepository localRepository = TasksUi.getRepositoryManager().getRepository(
- LocalRepositoryConnector.CONNECTOR_KIND, LocalRepositoryConnector.REPOSITORY_URL);
- viewer.setSelection(new StructuredSelection(localRepository));
- }
-
- viewer.addOpenListener(new IOpenListener() {
-
- public void open(OpenEvent event) {
- if (canFlipToNextPage()) {
- getContainer().showPage(getNextPage());
- } else if (canFinish()) {
- if (getWizard().performFinish()) {
- ((WizardDialog) getContainer()).close();
- }
- }
- }
- });
-
- viewer.getTable().showSelection();
- viewer.getTable().setFocus();
- return viewer.getTable();
- }
-
- protected abstract IWizard createWizard(TaskRepository taskRepository);
-
- @Override
- public boolean canFlipToNextPage() {
- return getSelectedNode() != null && getNextPage() != null;
- }
-
- public boolean canFinish() {
- return getSelectedNode() != null && getNextPage() == null;
- }
-
- public boolean performFinish() {
- if (getSelectedNode() == null || getNextPage() != null) {
- // finish event will get forwarded to nested wizard
- // by container
- return false;
- }
-
- return getSelectedNode().getWizard().performFinish();
- }
-
- private class CustomWizardNode implements IWizardNode {
-
- private final TaskRepository repository;
-
- private IWizard wizard;
-
- public CustomWizardNode(TaskRepository repository) {
- this.repository = repository;
- }
-
- public void dispose() {
- if (wizard != null) {
- wizard.dispose();
- }
- }
-
- public Point getExtent() {
- return new Point(-1, -1);
- }
-
- public IWizard getWizard() {
- if (wizard == null) {
- wizard = SelectRepositoryPage.this.createWizard(repository);
- if (wizard != null) {
- wizard.setContainer(getContainer());
- }
- }
- return wizard;
- }
-
- public boolean isContentCreated() {
- return wizard != null;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (!(obj instanceof CustomWizardNode)) {
- return false;
- }
- CustomWizardNode that = (CustomWizardNode) obj;
- if (this == that) {
- return true;
- }
-
- return this.repository.getConnectorKind().equals(that.repository.getConnectorKind())
- && this.repository.getRepositoryUrl().equals(that.repository.getRepositoryUrl());
- }
-
- @Override
- public int hashCode() {
- return 31 * this.repository.getRepositoryUrl().hashCode() + this.repository.getConnectorKind().hashCode();
- }
-
- }
-
- /**
- * Public for testing.
- */
- public TableViewer getViewer() {
- return viewer;
- }
-
- /**
- * Public for testing.
- */
- public List<TaskRepository> getRepositories() {
- return repositories;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskAttachmentWizard.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskAttachmentWizard.java
deleted file mode 100644
index 3dcbe288e..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskAttachmentWizard.java
+++ /dev/null
@@ -1,399 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.wizards;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.List;
-
-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.jobs.IJobChangeEvent;
-import org.eclipse.core.runtime.jobs.JobChangeAdapter;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.provisional.commons.ui.ScreenshotCreationPage;
-import org.eclipse.mylyn.internal.tasks.core.sync.SubmitTaskAttachmentJob;
-import org.eclipse.mylyn.internal.tasks.ui.AttachmentUtil;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.data.AbstractTaskAttachmentSource;
-import org.eclipse.mylyn.tasks.core.data.TaskAttachmentModel;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.mylyn.tasks.core.sync.SubmitJob;
-import org.eclipse.mylyn.tasks.core.sync.SubmitJobEvent;
-import org.eclipse.mylyn.tasks.core.sync.SubmitJobListener;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.swt.dnd.TransferData;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.ImageData;
-import org.eclipse.swt.graphics.ImageLoader;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * A wizard to add a new attachment to a task report.
- *
- * @since 3.0
- * @author Steffen Pingel
- */
-public class TaskAttachmentWizard extends Wizard {
-
- static class ClipboardTaskAttachmentSource extends AbstractTaskAttachmentSource {
-
- public static boolean isSupportedType(Display display) {
- Clipboard clipboard = new Clipboard(display);
- TransferData[] types = clipboard.getAvailableTypes();
- for (TransferData transferData : types) {
- List<Transfer> transfers = getTransfers();
- for (Transfer transfer : transfers) {
- if (transfer.isSupportedType(transferData)) {
- return true;
- }
- }
- }
- return false;
- }
-
- private static List<Transfer> transfers;
-
- private static List<Transfer> getTransfers() {
- if (transfers != null) {
- return transfers;
- }
-
- transfers = new ArrayList<Transfer>();
- try {
- Class<?> clazz = Class.forName("org.eclipse.swt.dnd.ImageTransfer");
- Method method = clazz.getMethod("getInstance");
- if (method != null) {
- transfers.add((Transfer) method.invoke(null));
- }
- } catch (Exception e) {
- // ignore
- } catch (LinkageError e) {
- // ignore
- }
- transfers.add(TextTransfer.getInstance());
- return transfers;
- }
-
- private Object contents;
-
- public ClipboardTaskAttachmentSource() {
- BusyIndicator.showWhile(PlatformUI.getWorkbench().getDisplay(), new Runnable() {
- public void run() {
- Clipboard clipboard = new Clipboard(PlatformUI.getWorkbench().getDisplay());
- List<Transfer> transfers = getTransfers();
- for (Transfer transfer : transfers) {
- contents = clipboard.getContents(transfer);
- if (contents != null) {
- break;
- }
- }
- clipboard.dispose();
- }
- });
- }
-
- @Override
- public InputStream createInputStream(IProgressMonitor monitor) throws CoreException {
- if (contents instanceof String) {
- return new ByteArrayInputStream(((String) contents).getBytes());
- } else if (contents instanceof ImageData) {
- ImageLoader loader = new ImageLoader();
- loader.data = new ImageData[] { (ImageData) contents };
- // TODO create image in memory?
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- loader.save(out, SWT.IMAGE_PNG);
- return new ByteArrayInputStream(out.toByteArray());
- }
- throw new CoreException(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Invalid content type."));
- }
-
- @Override
- public String getContentType() {
- if (contents instanceof String) {
- return "text/plain";
- } else if (contents instanceof ImageData) {
- return "image/png";
- }
- return "application/octet-stream";
- }
-
- @Override
- public String getDescription() {
- return null;
- }
-
- @Override
- public long getLength() {
- if (contents instanceof String) {
- return ((String) contents).length();
- }
- return -1;
- }
-
- @Override
- public String getName() {
- if (contents instanceof String) {
- return "clipboard.txt";
- } else if (contents instanceof ImageData) {
- return "clipboard.png";
- }
- return "";
- }
-
- @Override
- public boolean isLocal() {
- return true;
- }
-
- };
-
- static class ImageSource extends AbstractTaskAttachmentSource {
-
- private File file;
-
- private final ScreenshotCreationPage page;
-
- public ImageSource(ScreenshotCreationPage page) {
- this.page = page;
- }
-
- @Override
- public InputStream createInputStream(IProgressMonitor monitor) throws CoreException {
- try {
- if (file == null || page.isImageDirty()) {
- Image image = page.createImage();
- page.setImageDirty(false);
- try {
- file = File.createTempFile("screenshot", ".png");
- file.deleteOnExit();
- ImageLoader loader = new ImageLoader();
- loader.data = new ImageData[] { image.getImageData() };
- // TODO create image in memory?
- FileOutputStream out = new FileOutputStream(file);
- try {
- loader.save(out, SWT.IMAGE_PNG);
- } finally {
- out.close();
- }
- } finally {
- image.dispose();
- }
- }
- return new FileInputStream(file);
- } catch (IOException e) {
- throw new CoreException(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, e.getMessage(), e));
- }
- }
-
- @Override
- public String getContentType() {
- return "image/png";
- }
-
- @Override
- public String getDescription() {
- return "Screenshot";
- }
-
- @Override
- public long getLength() {
- return (file != null) ? file.length() : -1;
- }
-
- @Override
- public String getName() {
- return "screenshot.png";
- }
-
- @Override
- public boolean isLocal() {
- return true;
- }
-
- }
-
- public enum Mode {
- DEFAULT, SCREENSHOT
- }
-
- private static final String DIALOG_SETTINGS_KEY = "AttachmentWizard";
-
- private final AbstractRepositoryConnector connector;
-
- private IWizardPage editPage;
-
- private Mode mode = Mode.DEFAULT;
-
- private final TaskAttachmentModel model;
-
- private PreviewAttachmentPage2 previewPage;
-
- public TaskAttachmentWizard(TaskRepository taskRepository, ITask task, TaskAttribute taskAttachment) {
- Assert.isNotNull(taskRepository);
- Assert.isNotNull(taskAttachment);
- this.model = new TaskAttachmentModel(taskRepository, task, taskAttachment);
- this.connector = TasksUiPlugin.getRepositoryManager().getRepositoryConnector(taskRepository.getConnectorKind());
- setMode(Mode.DEFAULT);
- setNeedsProgressMonitor(true);
- setDialogSettings(TasksUiPlugin.getDefault().getDialogSettings().getSection(DIALOG_SETTINGS_KEY));
- }
-
- @Override
- public void addPages() {
- if (model.getSource() == null) {
- if (mode == Mode.SCREENSHOT) {
- ScreenshotCreationPage page = new ScreenshotCreationPage();
- model.setSource(new ImageSource(page));
- addPage(page);
- } else {
- addPage(new InputAttachmentSourcePage2(model));
- }
- }
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(model.getTaskRepository()
- .getConnectorKind());
- editPage = connectorUi.getTaskAttachmentPage(model);
- addPage(editPage);
-
- previewPage = new PreviewAttachmentPage2(model);
- addPage(previewPage);
- }
-
- public Mode getMode() {
- return mode;
- }
-
- public TaskAttachmentModel getModel() {
- return model;
- }
-
- public AbstractTaskAttachmentSource getSource() {
- return model.getSource();
- }
-
- private void handleDone(SubmitJob job) {
- if (job.getStatus() != null) {
- TasksUiInternal.displayStatus(getShell(), "Attachment Failed", job.getStatus());
- }
- }
-
- @Override
- public boolean performFinish() {
- SubmitJob job = TasksUiInternal.getJobFactory()
- .createSubmitTaskAttachmentJob(connector, model.getTaskRepository(), model.getTask(),
- model.getSource(), model.getComment(), model.getAttribute());
- final boolean attachContext = model.getAttachContext();
- job.addSubmitJobListener(new SubmitJobListener() {
- @Override
- public void done(SubmitJobEvent event) {
- // ignore
- }
-
- @Override
- public void taskSubmitted(SubmitJobEvent event, IProgressMonitor monitor) throws CoreException {
- if (attachContext) {
- monitor.subTask("Attaching context");
- AttachmentUtil.postContext(connector, model.getTaskRepository(), model.getTask(), null,
- model.getAttribute(), monitor);
- }
- }
-
- @Override
- public void taskSynchronized(SubmitJobEvent event, IProgressMonitor monitor) throws CoreException {
- // ignore
- }
- });
- if (previewPage.runInBackground()) {
- runInBackground(job);
- return false;
- } else {
- return runInWizard(job);
- }
- }
-
- private void runInBackground(final SubmitJob job) {
- getContainer().getShell().setVisible(false);
- job.addJobChangeListener(new JobChangeAdapter() {
- @Override
- public void done(IJobChangeEvent event) {
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- if (job.getStatus() != null) {
- getContainer().getShell().setVisible(true);
- }
- handleDone(job);
- }
- });
- }
- });
- job.schedule();
- }
-
- private boolean runInWizard(final SubmitJob job) {
- try {
- getContainer().run(true, true, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- if (((SubmitTaskAttachmentJob) job).run(monitor) == Status.CANCEL_STATUS) {
- throw new InterruptedException();
- }
- }
- });
- handleDone(job);
- return job.getStatus() == null;
- } catch (InvocationTargetException e) {
- StatusHandler.fail(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Unexpected error", e));
- return false;
- } catch (InterruptedException e) {
- // canceled
- return false;
- }
- }
-
- public void setMode(Mode mode) {
- this.mode = mode;
- if (mode == Mode.SCREENSHOT) {
- setWindowTitle("Attach Screenshot");
- setDefaultPageImageDescriptor(CommonImages.BANNER_SCREENSHOT);
- } else {
- setWindowTitle("Add Attachment");
- setDefaultPageImageDescriptor(TasksUiImages.BANNER_REPOSITORY);
- }
- }
-
- public void setSource(AbstractTaskAttachmentSource source) {
- this.model.setSource(source);
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataExportWizard.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataExportWizard.java
deleted file mode 100644
index eef63b3a4..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataExportWizard.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.ui.wizards;
-
-import java.io.File;
-import java.lang.reflect.InvocationTargetException;
-import java.text.SimpleDateFormat;
-import java.util.Collection;
-import java.util.Date;
-import java.util.Locale;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.context.core.ContextCorePlugin;
-import org.eclipse.mylyn.internal.context.core.InteractionContextManager;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.util.TaskDataExportOperation;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.ui.IExportWizard;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.progress.IProgressService;
-
-/**
- * Wizard for exporting tasklist data files to the file system. This wizard uses a single page: TaskDataExportWizardPage
- *
- * @author Wesley Coelho
- * @author Mik Kersten
- */
-public class TaskDataExportWizard extends Wizard implements IExportWizard {
-
- /**
- * The name of the dialog store's section associated with the task data export wizard
- */
- private final static String SETTINGS_SECTION = "org.eclipse.mylyn.tasklist.ui.exportWizard";
-
- public final static String ZIP_FILE_PREFIX = "mylyndata";
-
- private final static String ZIP_FILE_EXTENSION = ".zip";
-
- private final static String WINDOW_TITLE = "Export";
-
- private TaskDataExportWizardPage exportPage = null;
-
- public static String getZipFileName() {
- String fomratString = "yyyy-MM-dd";
- SimpleDateFormat format = new SimpleDateFormat(fomratString, Locale.ENGLISH);
- String date = format.format(new Date());
- return ZIP_FILE_PREFIX + "-" + date + ZIP_FILE_EXTENSION;
- }
-
- public TaskDataExportWizard() {
- IDialogSettings masterSettings = TasksUiPlugin.getDefault().getDialogSettings();
- setDialogSettings(getSettingsSection(masterSettings));
- setNeedsProgressMonitor(true);
- setWindowTitle(WINDOW_TITLE);
- }
-
- /**
- * Finds or creates a dialog settings section that is used to make the dialog control settings persistent
- */
- public IDialogSettings getSettingsSection(IDialogSettings master) {
- IDialogSettings settings = master.getSection(SETTINGS_SECTION);
- if (settings == null) {
- settings = master.addNewSection(SETTINGS_SECTION);
- }
- return settings;
- }
-
- @Override
- public void addPages() {
- exportPage = new TaskDataExportWizardPage();
- exportPage.setWizard(this);
- addPage(exportPage);
- }
-
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- // no initialization needed
- }
-
- @Override
- public boolean canFinish() {
- return exportPage.isPageComplete();
- }
-
- /**
- * Called when the user clicks finish. Saves the task data. Waits until all overwrite decisions have been made
- * before starting to save files. If any overwrite is canceled, no files are saved and the user must adjust the
- * dialog.
- */
- @Override
- public boolean performFinish() {
- boolean overwrite = exportPage.overwrite();
- boolean zip = exportPage.zip();
-
- Collection<AbstractTask> taskContextsToExport = TasksUiPlugin.getTaskList().getAllTasks();
-
- // Get file paths to check for existence
- String destDir = exportPage.getDestinationDirectory();
- final File destDirFile = new File(destDir);
- if (!destDirFile.exists() || !destDirFile.isDirectory()) {
- // This should never happen
- StatusHandler.fail(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Could not export data because specified location does not exist or is not a folder",
- new Exception()));
- return false;
- }
-
- final File destTaskListFile = new File(destDir + File.separator + ITasksCoreConstants.DEFAULT_TASK_LIST_FILE);
- final File destActivationHistoryFile = new File(destDir + File.separator
- + InteractionContextManager.CONTEXT_HISTORY_FILE_NAME
- + InteractionContextManager.CONTEXT_FILE_EXTENSION);
- final File destZipFile = new File(destDir + File.separator + getZipFileName());
-
- // Prompt the user to confirm if ANY of the save repositoryOperations will cause
- // an overwrite
- if (!overwrite) {
-
- if (zip) {
- if (destZipFile.exists()) {
- if (!MessageDialog.openConfirm(getShell(), "Confirm File Replace", "The zip file "
- + destZipFile.getPath() + " already exists. Do you want to overwrite it?")) {
- return false;
- }
- }
- } else {
- if (exportPage.exportTaskList() && destTaskListFile.exists()) {
- if (!MessageDialog.openConfirm(getShell(), "Confirm File Replace", "The task list file "
- + destTaskListFile.getPath() + " already exists. Do you want to overwrite it?")) {
- return false;
- }
- }
-
- if (exportPage.exportActivationHistory() && destActivationHistoryFile.exists()) {
- if (!MessageDialog.openConfirm(getShell(), "Confirm File Replace",
- "The task activation history file " + destActivationHistoryFile.getPath()
- + " already exists. Do you want to overwrite it?")) {
- return false;
- }
- }
-
- if (exportPage.exportTaskContexts()) {
- for (ITask task : taskContextsToExport) {
- File contextFile = ContextCorePlugin.getContextStore().getFileForContext(
- task.getHandleIdentifier());
- File destTaskFile = new File(destDir + File.separator + contextFile.getName());
- if (destTaskFile.exists()) {
- if (!MessageDialog.openConfirm(getShell(), "Confirm File Replace",
- "Task context files already exist in " + destDir
- + ". Do you want to overwrite them?")) {
- return false;
- } else {
- break;
- }
- }
- }
- }
- }
- }
-
- // FileCopyJob job = new FileCopyJob(destZipFile, destTaskListFile,
- // destActivationHistoryFile);
- TaskDataExportOperation job = new TaskDataExportOperation(exportPage.getDestinationDirectory(),
- exportPage.exportTaskList(), exportPage.exportActivationHistory(), exportPage.exportTaskContexts(),
- exportPage.zip(), destZipFile.getName(), taskContextsToExport);
- IProgressService service = PlatformUI.getWorkbench().getProgressService();
-
- try {
- // TODO use the wizard's progress service or IProgressService.busyCursorWhile(): bug 210710
- service.run(true, false, job);
- } catch (InvocationTargetException e) {
- StatusHandler.fail(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Could not export files", e));
- } catch (InterruptedException e) {
- StatusHandler.fail(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Could not export files", e));
- }
-
- exportPage.saveSettings();
- return true;
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataExportWizardPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataExportWizardPage.java
deleted file mode 100644
index 59dae3e63..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataExportWizardPage.java
+++ /dev/null
@@ -1,298 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.ui.wizards;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.DirectoryDialog;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-
-/**
- * Wizard Page for the Task Data Export Wizard
- *
- * @author Wesley Coelho
- * @author Mik Kersten
- */
-public class TaskDataExportWizardPage extends WizardPage {
-
- private static final String LABEL_TASK_LIST = "Task List";
-
- private static final String LABEL_TASK_CONTEXTS = "Task Contexts";
-
- private static final String LABEL_ACTIVITY_HISTORY = "Task Activity History";
-
- protected final static String PAGE_TITLE = "Export Mylyn Task Data";
-
- public final static String PAGE_NAME = PAGE_TITLE;
-
- private Button taskListCheckBox = null;
-
- private Button taskActivationHistoryCheckBox = null;
-
- private Button taskContextsCheckBox = null;
-
- // private Button zipCheckBox = null;
-
- private Button browseButton = null;
-
- private Text destDirText = null;
-
- private Button overwriteCheckBox = null;
-
- // Key values for the dialog settings object
- private final static String SETTINGS_SAVED = "Settings saved";
-
- private final static String TASKLIST_SETTING = "TaskList setting";
-
- private final static String ACTIVATION_HISTORY_SETTING = "Activation history setting";
-
- private final static String CONTEXTS_SETTING = "Contexts setting";
-
- private final static String DEST_DIR_SETTING = "Destination directory setting";
-
- private final static String OVERWRITE_SETTING = "Overwrite setting";
-
- // private final static String ZIP_SETTING = "Zip Setting";
-
- public TaskDataExportWizardPage() {
- super("org.eclipse.mylyn.tasklist.exportPage", PAGE_TITLE, AbstractUIPlugin.imageDescriptorFromPlugin(
- TasksUiPlugin.ID_PLUGIN, "icons/wizban/banner-export.gif"));
- setPageComplete(false);
- }
-
- @Override
- public String getName() {
- return PAGE_NAME;
- }
-
- /**
- * Create the widgets on the page
- */
- public void createControl(Composite parent) {
- try {
- Composite container = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout(1, false);
- container.setLayout(layout);
- createFileSelectionControl(container);
- createExportDirectoryControl(container);
-
- // zipCheckBox = createCheckBox(container, "Export to zip file: " +
- // TaskDataExportWizard.getZipFileName());
- overwriteCheckBox = createCheckBox(container, "Overwrite existing files without warning");
-
- initSettings();
-
- setControl(container);
-
- setPageComplete(validate());
- } catch (RuntimeException e) {
- StatusHandler.fail(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Could not create export wizard page", e));
- }
- }
-
- /**
- * Create widgets for selecting the data files to export
- */
- private void createFileSelectionControl(Composite parent) {
- Group group = new Group(parent, SWT.SHADOW_ETCHED_IN);
- GridLayout gl = new GridLayout(1, false);
- group.setLayout(gl);
- GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
- group.setLayoutData(gridData);
- group.setText("Select data to export:");
-
- taskListCheckBox = createCheckBox(group, LABEL_TASK_LIST);
- taskActivationHistoryCheckBox = createCheckBox(group, LABEL_ACTIVITY_HISTORY);
- taskContextsCheckBox = createCheckBox(group, LABEL_TASK_CONTEXTS);
- }
-
- /**
- * Create widgets for specifying the destination directory
- */
- private void createExportDirectoryControl(Composite parent) {
- Group destDirGroup = new Group(parent, SWT.SHADOW_ETCHED_IN);
- destDirGroup.setText("Export destination folder");
- destDirGroup.setLayout(new GridLayout(2, false));
- destDirGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- new Label(destDirGroup, SWT.NONE).setText("Export file: " + TaskDataExportWizard.getZipFileName());
- new Label(destDirGroup, SWT.NONE);
-
- destDirText = new Text(destDirGroup, SWT.BORDER);
- destDirText.setEditable(false);
- destDirText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- destDirText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- controlChanged();
- }
- });
-
- browseButton = new Button(destDirGroup, SWT.PUSH);
- browseButton.setText("Browse...");
- browseButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- DirectoryDialog dialog = new DirectoryDialog(getShell());
- dialog.setText("Folder Selection");
- dialog.setMessage("Specify the destination folder for task data");
- String dir = destDirText.getText();
- dialog.setFilterPath(dir);
- dir = dialog.open();
- if (dir == null || dir.equals("")) {
- return;
- }
- destDirText.setText(dir);
- }
- });
- }
-
- /**
- * Initializes controls with values from the Dialog Settings object
- */
- protected void initSettings() {
- IDialogSettings settings = getDialogSettings();
-
- if (settings.get(SETTINGS_SAVED) == null) {
- // Set default values
- taskListCheckBox.setSelection(true);
- taskActivationHistoryCheckBox.setSelection(true);
- taskContextsCheckBox.setSelection(true);
- destDirText.setText("");
- overwriteCheckBox.setSelection(true);
- // zipCheckBox.setSelection(false);
- } else {
- // Retrieve previous values from the dialog settings
- taskListCheckBox.setSelection(true); // force it
- // taskListCheckBox.setSelection(settings.getBoolean(TASKLIST_SETTING));
- taskActivationHistoryCheckBox.setSelection(settings.getBoolean(ACTIVATION_HISTORY_SETTING));
- taskContextsCheckBox.setSelection(settings.getBoolean(CONTEXTS_SETTING));
- String directory = settings.get(DEST_DIR_SETTING);
- if (directory != null) {
- destDirText.setText(settings.get(DEST_DIR_SETTING));
- }
- overwriteCheckBox.setSelection(settings.getBoolean(OVERWRITE_SETTING));
- // zipCheckBox.setSelection(settings.getBoolean(ZIP_SETTING));
- }
- }
-
- /**
- * Saves the control values in the dialog settings to be used as defaults the next time the page is opened
- */
- public void saveSettings() {
- IDialogSettings settings = getDialogSettings();
-
- settings.put(TASKLIST_SETTING, taskListCheckBox.getSelection());
- settings.put(ACTIVATION_HISTORY_SETTING, taskActivationHistoryCheckBox.getSelection());
- settings.put(CONTEXTS_SETTING, taskContextsCheckBox.getSelection());
- settings.put(DEST_DIR_SETTING, destDirText.getText());
- settings.put(OVERWRITE_SETTING, overwriteCheckBox.getSelection());
- // settings.put(ZIP_SETTING, zipCheckBox.getSelection());
-
- settings.put(SETTINGS_SAVED, SETTINGS_SAVED);
- }
-
- /** Convenience method for creating a new checkbox */
- protected Button createCheckBox(Composite parent, String text) {
- Button newButton = new Button(parent, SWT.CHECK);
- newButton.setText(text);
-
- newButton.addSelectionListener(new SelectionListener() {
-
- public void widgetSelected(SelectionEvent e) {
- controlChanged();
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- // No action required
- }
- });
-
- return newButton;
- }
-
- /** Called to indicate that a control's value has changed */
- public void controlChanged() {
- setPageComplete(validate());
- }
-
- /** Returns true if the information entered by the user is valid */
- protected boolean validate() {
-
- // Check that at least one type of data has been selected
- if (!taskListCheckBox.getSelection() && !taskActivationHistoryCheckBox.getSelection()
- && !taskContextsCheckBox.getSelection()) {
- return false;
- }
-
- // Check that a destination dir has been specified
- if (destDirText.getText().equals("")) {
- return false;
- }
-
- return true;
- }
-
- /** Returns the directory where data files are to be saved */
- public String getDestinationDirectory() {
- return destDirText.getText();
- }
-
- /** True if the user wants to export the task list */
- public boolean exportTaskList() {
- return taskListCheckBox.getSelection();
- }
-
- /** True if the user wants to export task activation history */
- public boolean exportActivationHistory() {
- return taskActivationHistoryCheckBox.getSelection();
- }
-
- /** True if the user wants to export task context files */
- public boolean exportTaskContexts() {
- return taskContextsCheckBox.getSelection();
- }
-
- /** True if the user wants to overwrite files by default */
- public boolean overwrite() {
- return overwriteCheckBox.getSelection();
- }
-
- /** True if the user wants to write to a zip file */
- public boolean zip() {
- // return zipCheckBox.getSelection();
- return true;
- }
-
- /** For testing only. Sets controls to the specified values */
- public void setParameters(boolean overwrite, boolean exportTaskList, boolean exportActivationHistory,
- boolean exportTaskContexts, boolean zip, String destinationDir) {
- overwriteCheckBox.setSelection(overwrite);
- taskListCheckBox.setSelection(exportTaskList);
- taskActivationHistoryCheckBox.setSelection(exportActivationHistory);
- taskContextsCheckBox.setSelection(exportTaskContexts);
- destDirText.setText(destinationDir);
- // zipCheckBox.setSelection(zip);
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataImportWizard.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataImportWizard.java
deleted file mode 100644
index 757cb5874..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataImportWizard.java
+++ /dev/null
@@ -1,246 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.wizards;
-
-import java.io.File;
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.List;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipFile;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.commons.core.ZipFileUtil;
-import org.eclipse.mylyn.internal.context.core.InteractionContextManager;
-import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.ui.IImportWizard;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.progress.IProgressService;
-
-/**
- * @author Rob Elves
- */
-public class TaskDataImportWizard extends Wizard implements IImportWizard {
-
- private final static String SETTINGS_SECTION = "org.eclipse.mylyn.tasklist.ui.importWizard";
-
- private final static String WINDOW_TITLE = "Import";
-
- private TaskDataImportWizardPage importPage = null;
-
- public TaskDataImportWizard() {
- super();
- IDialogSettings masterSettings = TasksUiPlugin.getDefault().getDialogSettings();
- setDialogSettings(getSettingsSection(masterSettings));
- setNeedsProgressMonitor(true);
- setWindowTitle(WINDOW_TITLE);
- }
-
- /**
- * Finds or creates a dialog settings section that is used to make the dialog control settings persistent
- */
- public IDialogSettings getSettingsSection(IDialogSettings master) {
- IDialogSettings settings = master.getSection(SETTINGS_SECTION);
- if (settings == null) {
- settings = master.addNewSection(SETTINGS_SECTION);
- }
- return settings;
- }
-
- @Override
- public void addPages() {
- importPage = new TaskDataImportWizardPage();
- importPage.setWizard(this);
- addPage(importPage);
- }
-
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- // no initialization needed
- }
-
- @Override
- public boolean canFinish() {
- return importPage.isPageComplete();
- }
-
- /**
- * Called when the user clicks finish. Saves the task data. Waits until all overwrite decisions have been made
- * before starting to save files. If any overwrite is canceled, no files are saved and the user must adjust the
- * dialog.
- */
- @Override
- public boolean performFinish() {
-
- TasksUi.getTaskActivityManager().deactivateTask(TasksUi.getTaskActivityManager().getActiveTask());
-
- File sourceDirFile = null;
- File sourceZipFile = null;
- File sourceTaskListFile = null;
- File sourceRepositoriesFile = null;
- File sourceActivationHistoryFile = null;
- List<File> contextFiles = new ArrayList<File>();
- List<ZipEntry> zipFilesToExtract = new ArrayList<ZipEntry>();
- boolean overwrite = importPage.overwrite();
- // zip = true post 1.0.1, see history for folder import
- // boolean zip = importPage.zip();
-
- String sourceZip = importPage.getSourceZipFile();
- sourceZipFile = new File(sourceZip);
-
- if (!sourceZipFile.exists()) {
- MessageDialog.openError(getShell(), "File not found", sourceZipFile.toString() + " could not be found.");
- return false;
- }
-
- Enumeration<? extends ZipEntry> entries;
- ZipFile zipFile;
-
- try {
- zipFile = new ZipFile(sourceZipFile, ZipFile.OPEN_READ);
- entries = zipFile.entries();
- while (entries.hasMoreElements()) {
- ZipEntry entry = entries.nextElement();
-
- if (entry.isDirectory()) {
- // ignore directories (shouldn't be any)
- continue;
- }
- if (!importPage.importTaskList() && entry.getName().endsWith(ITasksCoreConstants.OLD_TASK_LIST_FILE)) {
- continue;
- }
-
- if (!importPage.importActivationHistory()
- && entry.getName().endsWith(
- InteractionContextManager.CONTEXT_HISTORY_FILE_NAME
- + InteractionContextManager.CONTEXT_FILE_EXTENSION_OLD)) {
- continue;
- }
- if (!importPage.importTaskContexts()
- && entry.getName().matches(
- ".*-\\d*" + InteractionContextManager.CONTEXT_FILE_EXTENSION_OLD + "$")) {
- continue;
- }
-
- File destContextFile = new File(TasksUiPlugin.getDefault().getDataDirectory() + File.separator
- + entry.getName());
-
- if (!overwrite && destContextFile.exists()) {
- if (MessageDialog.openConfirm(getShell(), "File exists!", "Overwrite existing file?\n"
- + destContextFile.getName())) {
- zipFilesToExtract.add(entry);
- } else {
- // no overwrite
- }
- } else {
- zipFilesToExtract.add(entry);
- }
-
- }
-
- } catch (IOException e) {
- StatusHandler.fail(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Could not import files", e));
- }
-
- FileCopyJob job = new FileCopyJob(sourceDirFile, sourceZipFile, sourceTaskListFile, sourceRepositoriesFile,
- sourceActivationHistoryFile, contextFiles, zipFilesToExtract);
-
- try {
- if (getContainer() != null) {
- getContainer().run(true, true, job);
- } else {
-// IProgressService service = PlatformUI.getWorkbench().getProgressService();
-// service.busyCursorWhile(updateRunnable);
- IProgressService service = PlatformUI.getWorkbench().getProgressService();
- service.run(true, true, job);
- }
- } catch (InvocationTargetException e) {
- StatusHandler.fail(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Could not import files", e));
- } catch (InterruptedException e) {
- // User cancelled
- }
-
- importPage.saveSettings();
- return true;
- }
-
- /** Job that performs the file copying and zipping */
- class FileCopyJob implements IRunnableWithProgress {
-
- private static final String JOB_LABEL = "Importing Data";
-
- private File sourceZipFile = null;
-
- private final List<ZipEntry> zipEntriesToExtract;
-
- public FileCopyJob(File sourceFolder, File sourceZipFile, File sourceTaskListFile, File sourceRepositoriesFile,
- File sourceActivationHistoryFile, List<File> contextFiles, List<ZipEntry> zipEntries) {
- this.sourceZipFile = sourceZipFile;
- this.zipEntriesToExtract = zipEntries;
- }
-
- public void run(final IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
-
- // always a zip source since post 1.0.1
- try {
- monitor.beginTask(JOB_LABEL, zipEntriesToExtract.size() + 2);
- Job.getJobManager().beginRule(ITasksCoreConstants.ROOT_SCHEDULING_RULE, monitor);
-
- if (!sourceZipFile.exists()) {
- throw new InvocationTargetException(new IOException("Source file does not exist."));
- }
-
- if (monitor.isCanceled()) {
- throw new OperationCanceledException();
- }
-
- ZipFileUtil.extactEntries(sourceZipFile, zipEntriesToExtract, TasksUiPlugin.getDefault()
- .getDataDirectory());
- readTaskListData();
- } catch (IOException e) {
- throw new InvocationTargetException(e);
- } finally {
- Job.getJobManager().endRule(ITasksCoreConstants.ROOT_SCHEDULING_RULE);
- monitor.done();
- }
- return;
-
- }
- }
-
- private void readTaskListData() {
- PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
- public void run() {
- try {
- TasksUiPlugin.getDefault().reloadDataDirectory();
- } catch (CoreException e) {
- TasksUiInternal.displayStatus("Import Error: Please retry importing or use alternate source",
- e.getStatus());
- }
- }
- });
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataImportWizardPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataImportWizardPage.java
deleted file mode 100644
index de3ecd2d9..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataImportWizardPage.java
+++ /dev/null
@@ -1,395 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.tasks.ui.wizards;
-
-import java.io.File;
-import java.text.DateFormat;
-import java.util.SortedMap;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.TableItem;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-
-/**
- * Wizard Page for the Task Data Import Wizard
- *
- * @author Wesley Coelho
- * @author Mik Kersten
- * @author Rob Elves (Adaption to Import wizard)
- */
-public class TaskDataImportWizardPage extends WizardPage {
-
- private static final String LABEL_IMPORT_ZIP = "From zip file";
-
- private static final String LABEL_IMPORT_BACKUP = "From auto backup";
-
- private final static String PAGE_TITLE = "Import Mylyn Task Data";
-
- private static final String DESCRIPTION = "WARNING: importing overwrites current task list and repositories, use with caution.";
-
- public final static String PAGE_NAME = PAGE_TITLE;
-
- private Button taskListCheckBox = null;
-
- private Button taskActivationHistoryCheckBox = null;
-
- private Button taskContextsCheckBox = null;
-
- private Button browseButtonZip = null;
-
- private Text sourceZipText = null;
-
- private Button overwriteCheckBox = null;
-
- private Button importViaBackupButton;
-
- private Button importViaZipButton;
-
- private Table backupFilesTable;
-
- // Key values for the dialog settings object
- private final static String SETTINGS_SAVED = "Import Settings saved";
-
- private final static String TASKLIST_SETTING = "Import TaskList setting";
-
- private final static String ACTIVATION_HISTORY_SETTING = "Import Activation history setting";
-
- private final static String CONTEXTS_SETTING = "Import Contexts setting";
-
- private final static String SOURCE_ZIP_SETTING = "Import Source zip file setting";
-
- private final static String OVERWRITE_SETTING = "Import Overwrite setting";
-
- private final static String IMPORT_ZIPMETHOD_SETTING = "Import method zip";
-
- private final static String IMPORT_BACKUPMETHOD_SETTING = "Import method backup";
-
- public TaskDataImportWizardPage() {
- super("org.eclipse.mylyn.tasklist.importPage", PAGE_TITLE, AbstractUIPlugin.imageDescriptorFromPlugin(
- TasksUiPlugin.ID_PLUGIN, "icons/wizban/banner-import.gif"));
- setPageComplete(false);
- setDescription(DESCRIPTION);
- setImageDescriptor(CommonImages.BANNER_IMPORT);
- }
-
- @Override
- public String getName() {
- return PAGE_NAME;
- }
-
- public void createControl(Composite parent) {
- try {
- Composite container = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout(3, false);
- layout.verticalSpacing = 15;
- container.setLayout(layout);
- createContentSelectionControl(container);
- createImportFromZipControl(container);
- createImportFromBackupControl(container);
- addRadioListeners();
- initSettings();
- setControl(container);
- setPageComplete(validate());
- } catch (RuntimeException e) {
- StatusHandler.fail(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Could not create import wizard page", e));
- }
- }
-
- private void addRadioListeners() {
- SelectionListener radioListener = new SelectionListener() {
-
- public void widgetSelected(SelectionEvent e) {
- browseButtonZip.setEnabled(importViaZipButton.getSelection());
- backupFilesTable.setEnabled(importViaBackupButton.getSelection());
- sourceZipText.setEnabled(importViaZipButton.getSelection());
- controlChanged();
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- // ignore
-
- }
- };
-
- // importViaFolderButton.addSelectionListener(radioListener);
- importViaZipButton.addSelectionListener(radioListener);
- importViaBackupButton.addSelectionListener(radioListener);
- }
-
- /**
- * Create widgets for selecting the content to import
- */
- private void createContentSelectionControl(Composite parent) {
- Group group = new Group(parent, SWT.SHADOW_ETCHED_IN);
- GridLayout gl = new GridLayout(2, true);
- group.setLayout(gl);
- GridDataFactory.fillDefaults().grab(true, false).span(3, SWT.DEFAULT).applyTo(group);
- group.setText("Select data to import:");
-
- taskListCheckBox = createCheckBox(group, "Task List");
- taskActivationHistoryCheckBox = createCheckBox(group, "Task Activation History");
- taskContextsCheckBox = createCheckBox(group, "Task Contexts");
- overwriteCheckBox = createCheckBox(group, "OVERWRITE existing files without warning");
- }
-
- /**
- * Create widgets for specifying the source zip
- */
- private void createImportFromZipControl(Composite parent) {
-
- importViaZipButton = new Button(parent, SWT.RADIO);
- importViaZipButton.setText(LABEL_IMPORT_ZIP);
-
- sourceZipText = new Text(parent, SWT.BORDER);
- sourceZipText.setEditable(true);
- GridDataFactory.fillDefaults().grab(true, false).hint(250, SWT.DEFAULT).applyTo(sourceZipText);
- sourceZipText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- controlChanged();
- }
- });
-
- browseButtonZip = new Button(parent, SWT.PUSH);
- browseButtonZip.setText("Browse...");
- browseButtonZip.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- FileDialog dialog = new FileDialog(getShell());
- dialog.setText("Zip File Selection");
- // dialog.setText("Specify the source zip file for task data");
- String dir = sourceZipText.getText();
- dialog.setFilterPath(dir);
- dir = dialog.open();
- if (dir == null || dir.equals("")) {
- return;
- }
- sourceZipText.setText(dir);
- }
- });
-
- }
-
- private void createImportFromBackupControl(Composite container) {
-
- importViaBackupButton = new Button(container, SWT.RADIO);
- importViaBackupButton.setText(LABEL_IMPORT_BACKUP);
- addBackupFileView(container);
- }
-
- private void addBackupFileView(Composite composite) {
- backupFilesTable = new Table(composite, SWT.BORDER);
- GridDataFactory.fillDefaults().span(2, SWT.DEFAULT).grab(true, true).applyTo(backupFilesTable);
-
- TableColumn filenameColumn = new TableColumn(backupFilesTable, SWT.LEFT);
- filenameColumn.setWidth(200);
-
- SortedMap<Long, File> backupFilesMap = TasksUiPlugin.getBackupManager().getBackupFiles();
-
-// String destination = TasksUiPlugin.getDefault().getBackupFolderPath();
-//
-// File backupFolder = new File(destination);
-// ArrayList<File> backupFiles = new ArrayList<File>();
-// if (backupFolder.exists()) {
-// File[] files = backupFolder.listFiles();
-// if (files != null) {
-// for (File file : files) {
-// if (file.getName().startsWith(TaskListBackupManager.BACKUP_FILE_PREFIX)) {
-// backupFiles.add(file);
-// }
-// }
-// }
-// }
-//
-// File[] backupFileArray = backupFiles.toArray(new File[backupFiles.size()]);
-//
-// if (backupFileArray != null && backupFileArray.length > 0) {
-// Arrays.sort(backupFileArray, new Comparator<File>() {
-// public int compare(File file1, File file2) {
-// return (new Long((file1).lastModified()).compareTo(new Long((file2).lastModified()))) * -1;
-// }
-//
-// });
- for (Long time : backupFilesMap.keySet()) {
- File file = backupFilesMap.get(time);
- TableItem item = new TableItem(backupFilesTable, SWT.NONE);
- item.setData(file.getAbsolutePath());
- item.setText(DateFormat.getDateTimeInstance().format(time));
- }
-// }
-
- backupFilesTable.addSelectionListener(new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- controlChanged();
- }
- });
- }
-
- /**
- * Initializes controls with values from the Dialog Settings object
- */
- protected void initSettings() {
- IDialogSettings settings = getDialogSettings();
-
- if (settings.get(SETTINGS_SAVED) == null) {
- // Set default values
- taskListCheckBox.setSelection(true);
- taskActivationHistoryCheckBox.setSelection(true);
- taskContextsCheckBox.setSelection(true);
- overwriteCheckBox.setSelection(true);
- importViaZipButton.setSelection(true);
- sourceZipText.setEnabled(true);
- backupFilesTable.setEnabled(false);
-
- } else {
- // Retrieve previous values from the dialog settings
- taskListCheckBox.setSelection(settings.getBoolean(TASKLIST_SETTING));
- taskActivationHistoryCheckBox.setSelection(settings.getBoolean(ACTIVATION_HISTORY_SETTING));
- taskContextsCheckBox.setSelection(settings.getBoolean(CONTEXTS_SETTING));
- importViaZipButton.setSelection(settings.getBoolean(IMPORT_ZIPMETHOD_SETTING));
- importViaBackupButton.setSelection(settings.getBoolean(IMPORT_BACKUPMETHOD_SETTING));
- browseButtonZip.setEnabled(importViaZipButton.getSelection());
- sourceZipText.setEnabled(importViaZipButton.getSelection());
-
- backupFilesTable.setEnabled(importViaBackupButton.getSelection());
- String zipFile = settings.get(SOURCE_ZIP_SETTING);
- if (zipFile != null) {
- sourceZipText.setText(settings.get(SOURCE_ZIP_SETTING));
- }
- overwriteCheckBox.setSelection(settings.getBoolean(OVERWRITE_SETTING));
- }
- }
-
- /**
- * Saves the control values in the dialog settings to be used as defaults the next time the page is opened
- */
- public void saveSettings() {
- IDialogSettings settings = getDialogSettings();
-
- settings.put(TASKLIST_SETTING, taskListCheckBox.getSelection());
- settings.put(ACTIVATION_HISTORY_SETTING, taskActivationHistoryCheckBox.getSelection());
- settings.put(CONTEXTS_SETTING, taskContextsCheckBox.getSelection());
- settings.put(SOURCE_ZIP_SETTING, sourceZipText.getText());
- settings.put(OVERWRITE_SETTING, overwriteCheckBox.getSelection());
- settings.put(IMPORT_ZIPMETHOD_SETTING, importViaZipButton.getSelection());
- settings.put(IMPORT_BACKUPMETHOD_SETTING, importViaBackupButton.getSelection());
- settings.put(SETTINGS_SAVED, SETTINGS_SAVED);
- }
-
- /** Convenience method for creating a new checkbox */
- protected Button createCheckBox(Composite parent, String text) {
- Button newButton = new Button(parent, SWT.CHECK);
- newButton.setText(text);
-
- newButton.addSelectionListener(new SelectionListener() {
-
- public void widgetSelected(SelectionEvent e) {
- controlChanged();
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- // No action required
- }
- });
-
- return newButton;
- }
-
- /** Called to indicate that a control's value has changed */
- public void controlChanged() {
- setPageComplete(validate());
- }
-
- /** Returns true if the information entered by the user is valid */
- protected boolean validate() {
-
- // Check that at least one type of data has been selected
- if (!taskListCheckBox.getSelection() && !taskActivationHistoryCheckBox.getSelection()
- && !taskContextsCheckBox.getSelection()) {
- return false;
- }
- if (importViaZipButton.getSelection() && sourceZipText.getText().equals("")) {
- return false;
- }
- if (importViaBackupButton.getSelection() && backupFilesTable.getSelection().length == 0) {
- return false;
- }
- return true;
- }
-
- public String getSourceZipFile() {
- if (importViaZipButton.getSelection()) {
- return sourceZipText.getText();
- } else {
- if (backupFilesTable.getSelectionIndex() != -1) {
- return (String) (backupFilesTable.getSelection()[0].getData());
- }
- }
- return "<unspecified>";
- }
-
- /** True if the user wants to import the task list */
- public boolean importTaskList() {
- return taskListCheckBox.getSelection();
- }
-
- /** True if the user wants to import task activation history */
- public boolean importActivationHistory() {
- return taskActivationHistoryCheckBox.getSelection();
- }
-
- /** True if the user wants to import task context files */
- public boolean importTaskContexts() {
- return taskContextsCheckBox.getSelection();
- }
-
- /** True if the user wants to overwrite files by default */
- public boolean overwrite() {
- return overwriteCheckBox.getSelection();
- }
-
- /** True if the user wants to import from a zip file */
- public boolean zip() {
- //importViaZipButton.getSelection() || importViaBackupButton.getSelection();
- return true;
- }
-
- /** For testing only. Sets controls to the specified values */
- public void setParameters(boolean overwrite, boolean importTaskList, boolean importActivationHistory,
- boolean importTaskContexts, boolean zip, String sourceDir, String sourceZip) {
- overwriteCheckBox.setSelection(overwrite);
- taskListCheckBox.setSelection(importTaskList);
- taskActivationHistoryCheckBox.setSelection(importActivationHistory);
- taskContextsCheckBox.setSelection(importTaskContexts);
- sourceZipText.setText(sourceZip);
- importViaZipButton.setSelection(zip);
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/workingsets/TaskWorkingSetAdapterFactory.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/workingsets/TaskWorkingSetAdapterFactory.java
deleted file mode 100644
index 66aa6079b..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/workingsets/TaskWorkingSetAdapterFactory.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.workingsets;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.IPersistableElement;
-
-/**
- * Adapter factory used to adapt AbstractTaskContainer to IPersistableElement
- *
- * @author Eugene Kuleshov
- */
-public class TaskWorkingSetAdapterFactory implements IAdapterFactory {
-
- private static final String TASK_ELEMENT_FACTORY_ID = "org.eclipse.mylyn.tasks.ui.workingSets.elementFactory";
-
- @SuppressWarnings("unchecked")
- private static final Class[] ADAPTER_TYPES = new Class[] { IPersistableElement.class };
-
- @SuppressWarnings("unchecked")
- public Class[] getAdapterList() {
- return ADAPTER_TYPES;
- }
-
- public Object getAdapter(final Object adaptableObject, @SuppressWarnings("unchecked") Class adapterType) {
- if (adapterType == IPersistableElement.class && adaptableObject instanceof AbstractTaskContainer) {
- return new IPersistableElement() {
- public void saveState(IMemento memento) {
- IRepositoryElement container = (IRepositoryElement) adaptableObject;
- memento.putString(TaskWorkingSetElementFactory.HANDLE_TASK, container.getHandleIdentifier());
- }
-
- public String getFactoryId() {
- return TASK_ELEMENT_FACTORY_ID;
- }
- };
- } else if (adapterType == IPersistableElement.class && adaptableObject instanceof IProject) {
- return new IPersistableElement() {
- public void saveState(IMemento memento) {
- IProject project = (IProject) adaptableObject;
- memento.putString(TaskWorkingSetElementFactory.HANDLE_PROJECT, project.getName());
- }
-
- public String getFactoryId() {
- return TASK_ELEMENT_FACTORY_ID;
- }
- };
- }
- return null;
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/workingsets/TaskWorkingSetElementAdapter.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/workingsets/TaskWorkingSetElementAdapter.java
deleted file mode 100644
index 9fe517525..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/workingsets/TaskWorkingSetElementAdapter.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.workingsets;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTaskContainer;
-import org.eclipse.ui.IWorkingSet;
-import org.eclipse.ui.IWorkingSetElementAdapter;
-
-/**
- * @author Eugene Kuleshov
- * @author Mik Kersten
- */
-public class TaskWorkingSetElementAdapter implements IWorkingSetElementAdapter {
-
- public IAdaptable[] adaptElements(IWorkingSet workingSet, IAdaptable[] elements) {
- for (IAdaptable adaptable : elements) {
- if (!(adaptable instanceof AbstractTaskContainer)) {
- return selectContainers(elements);
- }
- }
- return elements;
- }
-
- private IAdaptable[] selectContainers(IAdaptable[] elements) {
- List<IAdaptable> containers = new ArrayList<IAdaptable>(elements.length);
- for (IAdaptable adaptable : elements) {
- if (adaptable instanceof AbstractTaskContainer) {
- containers.add(adaptable);
- } else if (adaptable instanceof IProject) {
- containers.add(adaptable);
- }
- }
- return containers.toArray(new IAdaptable[containers.size()]);
- }
-
- public void dispose() {
- // ignore
- }
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/workingsets/TaskWorkingSetElementFactory.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/workingsets/TaskWorkingSetElementFactory.java
deleted file mode 100644
index 44633a9a7..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/workingsets/TaskWorkingSetElementFactory.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.workingsets;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.TaskList;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.ui.IElementFactory;
-import org.eclipse.ui.IMemento;
-
-/**
- * Element factory used to restore task containers and projects for Task+Resource working sets.
- *
- * @author Eugene Kuleshov
- * @author Mik Kersten
- */
-public class TaskWorkingSetElementFactory implements IElementFactory {
-
- static final String HANDLE_TASK = "handle.task";
-
- // XXX this looks like a c&p error but changing it would break restoring of working sets
- static final String HANDLE_PROJECT = "handle.task";
-
- public IAdaptable createElement(IMemento memento) {
- String taskHandle = memento.getString(HANDLE_TASK);
- if (taskHandle != null) {
- // TOOD: this does not support projects and categories/queries have the same name
- TaskList taskList = TasksUiPlugin.getTaskList();
- for (AbstractTaskContainer element : taskList.getRootElements()) {
- if (element.getHandleIdentifier().equals(taskHandle)) {
- return element;
- }
- }
- }
- String projectHandle = memento.getString(HANDLE_PROJECT);
- if (projectHandle != null) {
- try {
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectHandle);
- if (project != null) {
- return project;
- }
- } catch (Throwable t) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Could not not determine project for handle: " + projectHandle, t));
- }
- }
- return null;
- }
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/workingsets/TaskWorkingSetPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/workingsets/TaskWorkingSetPage.java
deleted file mode 100644
index 261c5913b..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/workingsets/TaskWorkingSetPage.java
+++ /dev/null
@@ -1,550 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.workingsets;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.CheckboxTreeViewer;
-import org.eclipse.jface.viewers.DecoratingLabelProvider;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskRepositoryLabelProvider;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TaskElementLabelProvider;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IWorkingSet;
-import org.eclipse.ui.IWorkingSetManager;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.IWorkingSetPage;
-import org.eclipse.ui.internal.IWorkbenchGraphicConstants;
-import org.eclipse.ui.internal.WorkbenchImages;
-import org.eclipse.ui.internal.ide.IDEWorkbenchMessages;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-
-/**
- * Adapted from org.eclipse.ui.internal.ide.dialogs.ResourceWorkingSetPage
- *
- * @author Eugene Kuleshov
- * @author Mik Kersten
- */
-public class TaskWorkingSetPage extends WizardPage implements IWorkingSetPage {
-
- private static final String LABEL_TASKS = "Tasks";
-
- private final static int SIZING_SELECTION_WIDGET_WIDTH = 50;
-
- private final static int SIZING_SELECTION_WIDGET_HEIGHT = 200;
-
- private Text text;
-
- private CheckboxTreeViewer treeViewer;
-
- private IWorkingSet workingSet;
-
- private final WorkingSetPageContentProvider workingSetPageContentProvider = new WorkingSetPageContentProvider();
-
- private boolean firstCheck = false;
-
- private final class WorkingSetPageContentProvider implements ITreeContentProvider {
-
- public Object[] getChildren(Object parentElement) {
- if (parentElement instanceof List) {
- List<IAdaptable> taskRepositoriesContainers = new ArrayList<IAdaptable>();
- List<IAdaptable> resourcesRepositoriesContainers = new ArrayList<IAdaptable>();
-
- for (AbstractTaskContainer category : TasksUiInternal.getTaskList().getCategories()) {
- taskRepositoriesContainers.add(category);
- }
-
- IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
- Set<IProject> unmappedProjects = new HashSet<IProject>();
- for (Object container : (List<?>) parentElement) {
- if (container instanceof TaskRepository) {
- // NOTE: looking down, high complexity
- if (hasChildren(container)) {
- taskRepositoriesContainers.add((TaskRepository) container);
- }
-
- // NOTE: O(n^2) complexity, could fix
- Set<IProject> mappedProjects = new HashSet<IProject>();
-
- for (IProject project : projects) {
- TaskRepository taskRepository = TasksUiPlugin.getDefault()
- .getRepositoryForResource(project);
- if (container.equals(taskRepository)) {
- mappedProjects.add(project);
- } else if (taskRepository == null) {
- unmappedProjects.add(project);
- }
- }
- if (!mappedProjects.isEmpty()) {
- resourcesRepositoriesContainers.add(new TaskRepositoryProjectMapping(
- (TaskRepository) container, mappedProjects));
- }
- }
- }
- resourcesRepositoriesContainers.addAll(unmappedProjects);
- return new Object[] { new ElementCategory(LABEL_TASKS, taskRepositoriesContainers),
- new ElementCategory("Resources", resourcesRepositoriesContainers) };
- } else if (parentElement instanceof TaskRepository) {
- List<IAdaptable> taskContainers = new ArrayList<IAdaptable>();
- for (AbstractTaskContainer element : TasksUiPlugin.getTaskListManager()
- .getTaskList()
- .getRepositoryQueries(((TaskRepository) parentElement).getRepositoryUrl())) {
- if (element instanceof IRepositoryQuery) {
- taskContainers.add(element);
- }
- }
-
- return taskContainers.toArray();
- } else if (parentElement instanceof TaskRepositoryProjectMapping) {
- return ((TaskRepositoryProjectMapping) parentElement).getProjects().toArray();
- } else if (parentElement instanceof ElementCategory) {
- return ((ElementCategory) parentElement).getChildren(parentElement);
- } else {
- return new Object[0];
- }
- }
-
- public boolean hasChildren(Object element) {
- return getChildren(element).length > 0;
- }
-
- public Object[] getElements(Object element) {
- return getChildren(element);
- }
-
- public Object getParent(Object element) {
- return null;
- }
-
- public void dispose() {
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
- }
-
- private class TaskRepositoryProjectMapping extends PlatformObject {
-
- private final TaskRepository taskRepository;
-
- private final Set<IProject> projects;
-
- public TaskRepositoryProjectMapping(TaskRepository taskRepository, Set<IProject> mappedProjects) {
- this.taskRepository = taskRepository;
- this.projects = mappedProjects;
- }
-
- public Set<IProject> getProjects() {
- return projects;
- }
-
- public TaskRepository getTaskRepository() {
- return taskRepository;
- }
- }
-
- class ElementCategory extends PlatformObject implements IWorkbenchAdapter {
-
- private final String label;
-
- private final List<IAdaptable> children;
-
- public ElementCategory(String label, List<IAdaptable> children) {
- this.label = label;
- this.children = children;
- }
-
- public Object[] getChildren(Object o) {
- return children.toArray();
- }
-
- public ImageDescriptor getImageDescriptor(Object object) {
- return WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_OBJ_WORKING_SETS);
- }
-
- public String getLabel(Object o) {
- return label;
- }
-
- public Object getParent(Object o) {
- return null;
- }
-
- }
-
- class AggregateLabelProvider implements ILabelProvider {
-
- private final TaskElementLabelProvider taskLabelProvider = new TaskElementLabelProvider(false);
-
- private final TaskRepositoryLabelProvider taskRepositoryLabelProvider = new TaskRepositoryLabelProvider();
-
- private final WorkbenchLabelProvider workbenchLabelProvider = new WorkbenchLabelProvider();
-
- public Image getImage(Object element) {
- if (element instanceof AbstractTaskContainer) {
- return taskLabelProvider.getImage(element);
- } else if (element instanceof TaskRepository) {
- return taskRepositoryLabelProvider.getImage(element);
- } else if (element instanceof TaskRepositoryProjectMapping) {
- return getImage(((TaskRepositoryProjectMapping) element).getTaskRepository());
- } else {
- return workbenchLabelProvider.getImage(element);
- }
- }
-
- public String getText(Object element) {
- if (element instanceof AbstractTaskContainer) {
- return taskLabelProvider.getText(element);
- } else if (element instanceof TaskRepository) {
- return taskRepositoryLabelProvider.getText(element);
- } else if (element instanceof TaskRepositoryProjectMapping) {
- return getText(((TaskRepositoryProjectMapping) element).getTaskRepository());
- } else {
- return workbenchLabelProvider.getText(element);
- }
- }
-
- public void addListener(ILabelProviderListener listener) {
- }
-
- public void dispose() {
- }
-
- public boolean isLabelProperty(Object element, String property) {
- return false;
- }
-
- public void removeListener(ILabelProviderListener listener) {
- }
- }
-
- class CustomSorter extends ViewerSorter {
-
- @Override
- public int compare(Viewer viewer, Object e1, Object e2) {
- if (e1 instanceof TaskRepository || e1 instanceof TaskRepositoryProjectMapping) {
- return -1;
- } else if (e2 instanceof TaskRepository || e2 instanceof TaskRepositoryProjectMapping) {
- return 1;
- } else if (e1 instanceof ElementCategory && ((ElementCategory) e1).getLabel(e1).equals(LABEL_TASKS)) {
- return -1;
- } else if (e2 instanceof ElementCategory && ((ElementCategory) e1).getLabel(e1).equals(LABEL_TASKS)) {
- return 1;
- } else {
- return super.compare(viewer, e1, e2);
- }
- }
- }
-
- public TaskWorkingSetPage() {
- super("taskWorkingSetPage", "Select Working Set Elements", null);
- setDescription("" + "When this Working Set is selected views will be filtered just to show only\n"
- + "these elements if the Window Working Set is enabled in the view (default).");
- setImageDescriptor(TasksUiImages.BANNER_WORKING_SET);
- }
-
- public void finish() {
- Object[] elements = treeViewer.getCheckedElements();
- Set<IAdaptable> validElements = new HashSet<IAdaptable>();
- for (Object element : elements) {
- if (element instanceof AbstractTaskContainer || element instanceof IProject) {
- validElements.add((IAdaptable) element);
- }
- }
-
- addUnmatchedCategories(validElements);
-
- if (workingSet == null) {
- IWorkingSetManager workingSetManager = PlatformUI.getWorkbench().getWorkingSetManager();
- workingSet = workingSetManager.createWorkingSet(getWorkingSetName(),
- validElements.toArray(new IAdaptable[validElements.size()]));
- } else {
- workingSet.setName(getWorkingSetName());
- workingSet.setElements(validElements.toArray(new IAdaptable[validElements.size()]));
- }
- }
-
- private void addUnmatchedCategories(Set<IAdaptable> validElements) {
- HashSet<AbstractTaskContainer> orphanContainers = new HashSet<AbstractTaskContainer>();
- for (IAdaptable element : validElements) {
- if (element instanceof IRepositoryQuery) {
- IRepositoryQuery query = (IRepositoryQuery) element;
- if (query.getRepositoryUrl() != null) {
- AbstractTaskContainer orphansContainer = TasksUiPlugin.getTaskListManager()
- .getTaskList()
- .getUnmatchedContainer(query.getRepositoryUrl());
- if (orphansContainer != null) {
- orphanContainers.add(orphansContainer);
- }
- }
- }
- }
- validElements.addAll(orphanContainers);
- }
-
- public IWorkingSet getSelection() {
- return workingSet;
- }
-
- public void setSelection(IWorkingSet workingSet) {
- this.workingSet = workingSet;
- if (getShell() != null && text != null) {
- firstCheck = true;
- initializeCheckedState();
- text.setText(workingSet.getName());
- }
- }
-
- private String getWorkingSetName() {
- return text.getText();
- }
-
- public void createControl(Composite parent) {
- initializeDialogUnits(parent);
-
- Composite composite = new Composite(parent, SWT.NULL);
-
- GridLayout layout = new GridLayout();
- layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
- layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
- layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
- setControl(composite);
-
- // PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IIDEHelpContextIds.WORKING_SET_RESOURCE_PAGE);
- Label label = new Label(composite, SWT.WRAP);
- label.setText(IDEWorkbenchMessages.ResourceWorkingSetPage_message);
- label.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL
- | GridData.VERTICAL_ALIGN_CENTER));
-
- text = new Text(composite, SWT.SINGLE | SWT.BORDER);
- text.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL));
- text.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- validateInput();
- }
- });
- text.setFocus();
- // text.setBackground(FieldAssistColors.getRequiredFieldBackgroundColor(text));
-
- label = new Label(composite, SWT.WRAP);
- label.setText(IDEWorkbenchMessages.ResourceWorkingSetPage_label_tree);
- label.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL
- | GridData.VERTICAL_ALIGN_CENTER));
-
- treeViewer = new CheckboxTreeViewer(composite);
- treeViewer.setUseHashlookup(true);
- treeViewer.setContentProvider(workingSetPageContentProvider);
-
- treeViewer.setLabelProvider(new DecoratingLabelProvider(new AggregateLabelProvider(), PlatformUI.getWorkbench()
- .getDecoratorManager()
- .getLabelDecorator()));
-
-// tree.setLabelProvider(new TaskElementLabelProvider());
- treeViewer.setSorter(new CustomSorter());
-
- ArrayList<Object> containers = new ArrayList<Object>();
- for (TaskRepository repository : TasksUi.getRepositoryManager().getAllRepositories()) {
- containers.add(repository);
- }
-
-// for (AbstractTaskContainer element : TasksUiPlugin.getTaskList().getRootElements()) {
-// if (!(element instanceof TaskArchive)) {
-// containers.add(element);
-// }
-// }
- containers.addAll(Arrays.asList(ResourcesPlugin.getWorkspace().getRoot().getProjects()));
-
- treeViewer.setInput(containers);
- treeViewer.expandAll();
-
- // tree.setComparator(new ResourceComparator(ResourceComparator.NAME));
-
- GridData data = new GridData(GridData.FILL_BOTH | GridData.GRAB_VERTICAL);
- data.heightHint = SIZING_SELECTION_WIDGET_HEIGHT;
- data.widthHint = SIZING_SELECTION_WIDGET_WIDTH;
- treeViewer.getControl().setLayoutData(data);
-
- treeViewer.addCheckStateListener(new ICheckStateListener() {
- public void checkStateChanged(CheckStateChangedEvent event) {
- handleCheckStateChange(event);
- }
- });
-
-// tree.addTreeListener(new ITreeViewerListener() {
-// public void treeCollapsed(TreeExpansionEvent event) {
-// }
-//
-// public void treeExpanded(TreeExpansionEvent event) {
-// final Object element = event.getElement();
-// if (tree.getGrayed(element) == false) {
-// BusyIndicator.showWhile(getShell().getDisplay(),
-// new Runnable() {
-// public void run() {
-// setSubtreeChecked((IContainer) element,
-// tree.getChecked(element), false);
-// }
-// });
-// }
-// }
-// });
-
- // Add select / deselect all buttons for bug 46669
- Composite buttonComposite = new Composite(composite, SWT.NONE);
- layout = new GridLayout(2, false);
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
- buttonComposite.setLayout(layout);
- buttonComposite.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
-
- Button selectAllButton = new Button(buttonComposite, SWT.PUSH);
- selectAllButton.setText(IDEWorkbenchMessages.ResourceWorkingSetPage_selectAll_label);
- selectAllButton.setToolTipText(IDEWorkbenchMessages.ResourceWorkingSetPage_selectAll_toolTip);
- selectAllButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent selectionEvent) {
- treeViewer.setCheckedElements(workingSetPageContentProvider.getElements(treeViewer.getInput()));
- validateInput();
- }
- });
- setButtonLayoutData(selectAllButton);
-
- Button deselectAllButton = new Button(buttonComposite, SWT.PUSH);
- deselectAllButton.setText(IDEWorkbenchMessages.ResourceWorkingSetPage_deselectAll_label);
- deselectAllButton.setToolTipText(IDEWorkbenchMessages.ResourceWorkingSetPage_deselectAll_toolTip);
- deselectAllButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent selectionEvent) {
- treeViewer.setCheckedElements(new Object[0]);
- validateInput();
- }
- });
- setButtonLayoutData(deselectAllButton);
-
- initializeCheckedState();
- if (workingSet != null) {
- text.setText(workingSet.getName());
- }
- setPageComplete(false);
-
- Dialog.applyDialogFont(composite);
- }
-
- private void initializeCheckedState() {
- BusyIndicator.showWhile(getShell().getDisplay(), new Runnable() {
- public void run() {
- Object[] items = null;
- if (workingSet != null) {
- items = workingSet.getElements();
- if (items != null) {
- // see bug 191342
- treeViewer.setCheckedElements(new Object[] {});
- for (Object item : items) {
- if (item != null) {
- treeViewer.setChecked(item, true);
- }
- }
- }
- }
- }
- });
- }
-
- protected void handleCheckStateChange(final CheckStateChangedEvent event) {
- BusyIndicator.showWhile(getShell().getDisplay(), new Runnable() {
- public void run() {
- IAdaptable element = (IAdaptable) event.getElement();
- if (element instanceof AbstractTaskContainer || element instanceof IProject) {
- treeViewer.setGrayed(element, false);
- } else if (element instanceof ElementCategory) {
- for (Object child : ((ElementCategory) element).getChildren(null)) {
- treeViewer.setChecked(child, event.getChecked());
- }
- } else if (element instanceof TaskRepository || element instanceof TaskRepositoryProjectMapping) {
- for (Object child : workingSetPageContentProvider.getChildren(element)) {
- treeViewer.setChecked(child, event.getChecked());
- }
- }
-
- validateInput();
- }
- });
- }
-
- protected void validateInput() {
- String errorMessage = null;
- String infoMessage = null;
- String newText = text.getText();
-
- if (!newText.equals(newText.trim())) {
- errorMessage = "The name must not have a leading or trailing whitespace.";
- } else if (firstCheck) {
- firstCheck = false;
- return;
- }
- if ("".equals(newText)) { //$NON-NLS-1$
- errorMessage = "The name must not be empty.";
- }
- if (errorMessage == null && (workingSet == null || !newText.equals(workingSet.getName()))) {
- IWorkingSet[] workingSets = PlatformUI.getWorkbench().getWorkingSetManager().getWorkingSets();
- for (IWorkingSet workingSet2 : workingSets) {
- if (newText.equals(workingSet2.getName())) {
- errorMessage = "A working set with the same name already exists.";
- }
- }
- }
- if (treeViewer.getCheckedElements().length == 0) {
- infoMessage = "No categories/queries selected.";
- }
- setMessage(infoMessage, INFORMATION);
- setErrorMessage(errorMessage);
- setPageComplete(errorMessage == null);
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/workingsets/TaskWorkingSetUpdater.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/workingsets/TaskWorkingSetUpdater.java
deleted file mode 100644
index cd4ee3961..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/workingsets/TaskWorkingSetUpdater.java
+++ /dev/null
@@ -1,308 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.workingsets;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Set;
-import java.util.concurrent.CopyOnWriteArrayList;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceChangeEvent;
-import org.eclipse.core.resources.IResourceChangeListener;
-import org.eclipse.core.resources.IResourceDelta;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.ITaskListChangeListener;
-import org.eclipse.mylyn.internal.tasks.core.TaskCategory;
-import org.eclipse.mylyn.internal.tasks.core.TaskContainerDelta;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkingSet;
-import org.eclipse.ui.IWorkingSetUpdater;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Eugene Kuleshov
- * @author Mik Kersten
- * @author Steffen Pingel
- */
-public class TaskWorkingSetUpdater implements IWorkingSetUpdater, ITaskListChangeListener, IResourceChangeListener {
-
- public static String ID_TASK_WORKING_SET = "org.eclipse.mylyn.tasks.ui.workingSet";
-
- private final List<IWorkingSet> workingSets = new CopyOnWriteArrayList<IWorkingSet>();
-
- private static class TaskWorkingSetDelta {
-
- private final IWorkingSet workingSet;
-
- private final List<Object> elements;
-
- private boolean changed;
-
- public TaskWorkingSetDelta(IWorkingSet workingSet) {
- this.workingSet = workingSet;
- this.elements = new ArrayList<Object>(Arrays.asList(workingSet.getElements()));
- }
-
- public int indexOf(Object element) {
- return elements.indexOf(element);
- }
-
- public void set(int index, Object element) {
- elements.set(index, element);
- changed = true;
- }
-
- public void remove(int index) {
- if (elements.remove(index) != null) {
- changed = true;
- }
- }
-
- public void process() {
- if (changed) {
- workingSet.setElements(elements.toArray(new IAdaptable[elements.size()]));
- }
- }
- }
-
- public TaskWorkingSetUpdater() {
- TasksUiInternal.getTaskList().addChangeListener(this);
- ResourcesPlugin.getWorkspace().addResourceChangeListener(this);
- }
-
- public void dispose() {
- TasksUiInternal.getTaskList().removeChangeListener(this);
- }
-
- public void add(IWorkingSet workingSet) {
- checkElementExistence(workingSet);
- synchronized (workingSets) {
- workingSets.add(workingSet);
- }
- }
-
- private void checkElementExistence(IWorkingSet workingSet) {
- ArrayList<IAdaptable> list = new ArrayList<IAdaptable>();
- for (IAdaptable adaptable : workingSet.getElements()) {
- if (adaptable instanceof AbstractTaskContainer) {
- String handle = ((AbstractTaskContainer) adaptable).getHandleIdentifier();
- for (IRepositoryElement element : TasksUiPlugin.getTaskList().getRootElements()) {
- if (element != null && element.getHandleIdentifier().equals(handle)) {
- list.add(adaptable);
- }
- }
- } else if (adaptable instanceof IProject) {
- IProject project = ResourcesPlugin.getWorkspace()
- .getRoot()
- .getProject(((IProject) adaptable).getName());
- if (project != null && project.exists()) {
- list.add(project);
- }
- }
- }
- workingSet.setElements(list.toArray(new IAdaptable[list.size()]));
- }
-
- public boolean contains(IWorkingSet workingSet) {
- synchronized (workingSets) {
- return workingSets.contains(workingSet);
- }
- }
-
- public boolean remove(IWorkingSet workingSet) {
- synchronized (workingSets) {
- return workingSets.remove(workingSet);
- }
- }
-
- public void containersChanged(Set<TaskContainerDelta> delta) {
- for (TaskContainerDelta taskContainerDelta : delta) {
- if (taskContainerDelta.getElement() instanceof TaskCategory
- || taskContainerDelta.getElement() instanceof IRepositoryQuery) {
- synchronized (workingSets) {
- switch (taskContainerDelta.getKind()) {
- case REMOVED:
- // Remove from all
- for (IWorkingSet workingSet : workingSets) {
- ArrayList<IAdaptable> elements = new ArrayList<IAdaptable>(
- Arrays.asList(workingSet.getElements()));
- elements.remove(taskContainerDelta.getElement());
- workingSet.setElements(elements.toArray(new IAdaptable[elements.size()]));
- }
- break;
- case ADDED:
- // Add to the active working set
- for (IWorkingSet workingSet : TaskWorkingSetUpdater.getEnabledSets()) {
- ArrayList<IAdaptable> elements = new ArrayList<IAdaptable>(
- Arrays.asList(workingSet.getElements()));
- elements.add(taskContainerDelta.getElement());
- workingSet.setElements(elements.toArray(new IAdaptable[elements.size()]));
- }
- break;
- }
- }
- }
- }
- }
-
- // TODO: consider putting back, but evaluate policy and note bug 197257
-// public void taskActivated(AbstractTask task) {
-// Set<AbstractTaskContainer> taskContainers = new HashSet<AbstractTaskContainer>(
-// TasksUiPlugin.getTaskList().getQueriesForHandle(task.getHandleIdentifier()));
-// taskContainers.addAll(task.getParentContainers());
-//
-// Set<AbstractTaskContainer> allActiveWorkingSetContainers = new HashSet<AbstractTaskContainer>();
-// for (IWorkingSet workingSet : PlatformUI.getWorkbench()
-// .getActiveWorkbenchWindow()
-// .getActivePage()
-// .getWorkingSets()) {
-// ArrayList<IAdaptable> elements = new ArrayList<IAdaptable>(Arrays.asList(workingSet.getElements()));
-// for (IAdaptable adaptable : elements) {
-// if (adaptable instanceof AbstractTaskContainer) {
-// allActiveWorkingSetContainers.add((AbstractTaskContainer) adaptable);
-// }
-// }
-// }
-// boolean isContained = false;
-// for (AbstractTaskContainer taskContainer : allActiveWorkingSetContainers) {
-// if (taskContainers.contains(taskContainer)) {
-// isContained = true;
-// break;
-// }
-// }
-//
-// ;
-// if (!isContained) {
-// IWorkingSet matchingWorkingSet = null;
-// for (IWorkingSet workingSet : PlatformUI.getWorkbench().getWorkingSetManager().getAllWorkingSets()) {
-// ArrayList<IAdaptable> elements = new ArrayList<IAdaptable>(Arrays.asList(workingSet.getElements()));
-// for (IAdaptable adaptable : elements) {
-// if (adaptable instanceof AbstractTaskContainer) {
-// if (((AbstractTaskContainer)adaptable).contains(task.getHandleIdentifier())) {
-// matchingWorkingSet = workingSet;
-// }
-// }
-// }
-// }
-//
-// if (matchingWorkingSet != null) {
-// new ToggleWorkingSetAction(matchingWorkingSet).run();
-// } else {
-// new ToggleAllWorkingSetsAction(PlatformUI.getWorkbench().getActiveWorkbenchWindow()).run();
-// }
-// }
-// }
-
- public static IWorkingSet[] getEnabledSets() {
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- if (window != null) {
- IWorkbenchPage page = window.getActivePage();
- if (page != null) {
- return page.getWorkingSets();
- }
- }
- return new IWorkingSet[0];
- }
-
- /**
- * TODO: move
- */
- public static boolean areNoTaskWorkingSetsEnabled() {
- IWorkingSet[] workingSets = PlatformUI.getWorkbench().getWorkingSetManager().getWorkingSets();
- for (IWorkingSet workingSet : workingSets) {
- if (workingSet != null && workingSet.getId().equalsIgnoreCase(ID_TASK_WORKING_SET)) {
- if (isWorkingSetEnabled(workingSet)) {
- return false;
- }
- }
- }
- return true;
- }
-
- public static boolean isWorkingSetEnabled(IWorkingSet set) {
- IWorkingSet[] enabledSets = TaskWorkingSetUpdater.getEnabledSets();
- for (IWorkingSet enabledSet : enabledSets) {
- if (enabledSet.equals(set)) {
- return true;
- }
- }
- return false;
- }
-
- public static boolean isOnlyTaskWorkingSetEnabled(IWorkingSet set) {
- if (!TaskWorkingSetUpdater.isWorkingSetEnabled(set)) {
- return false;
- }
-
- IWorkingSet[] enabledSets = TaskWorkingSetUpdater.getEnabledSets();
- for (int i = 0; i < enabledSets.length; i++) {
- if (!enabledSets[i].equals(set)
- && enabledSets[i].getId().equalsIgnoreCase(TaskWorkingSetUpdater.ID_TASK_WORKING_SET)) {
- return false;
- }
- }
- return true;
- }
-
- private void processResourceDelta(TaskWorkingSetDelta result, IResourceDelta delta) {
- IResource resource = delta.getResource();
- int type = resource.getType();
- int index = result.indexOf(resource);
- int kind = delta.getKind();
- int flags = delta.getFlags();
- if (kind == IResourceDelta.CHANGED && type == IResource.PROJECT && index != -1) {
- if ((flags & IResourceDelta.OPEN) != 0) {
- result.set(index, resource);
- }
- }
- if (index != -1 && kind == IResourceDelta.REMOVED) {
- if ((flags & IResourceDelta.MOVED_TO) != 0) {
- result.set(index, ResourcesPlugin.getWorkspace().getRoot().findMember(delta.getMovedToPath()));
- } else {
- result.remove(index);
- }
- }
-
- // Don't dive into closed or opened projects
- if (projectGotClosedOrOpened(resource, kind, flags)) {
- return;
- }
-
- IResourceDelta[] children = delta.getAffectedChildren();
- for (IResourceDelta element : children) {
- processResourceDelta(result, element);
- }
- }
-
- private boolean projectGotClosedOrOpened(IResource resource, int kind, int flags) {
- return resource.getType() == IResource.PROJECT && kind == IResourceDelta.CHANGED
- && (flags & IResourceDelta.OPEN) != 0;
- }
-
- public void resourceChanged(IResourceChangeEvent event) {
- for (IWorkingSet workingSet : workingSets) {
- TaskWorkingSetDelta workingSetDelta = new TaskWorkingSetDelta(workingSet);
- if (event.getDelta() != null) {
- processResourceDelta(workingSetDelta, event.getDelta());
- }
- workingSetDelta.process();
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/workingsets/WorkingSetLabelComparator.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/workingsets/WorkingSetLabelComparator.java
deleted file mode 100644
index 9d85f048c..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/workingsets/WorkingSetLabelComparator.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.workingsets;
-
-import java.text.Collator;
-import java.util.Comparator;
-
-import org.eclipse.ui.IWorkingSet;
-
-/**
- * @author Willian Mitsuda
- */
-public class WorkingSetLabelComparator implements Comparator<IWorkingSet> {
-
- public int compare(IWorkingSet ws1, IWorkingSet ws2) {
- return Collator.getInstance().compare(ws1.getLabel(), ws2.getLabel());
- }
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/AbstractRepositoryConnectorUi.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/AbstractRepositoryConnectorUi.java
deleted file mode 100644
index 05127bd2b..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/AbstractRepositoryConnectorUi.java
+++ /dev/null
@@ -1,245 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.ui;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.text.hyperlink.IHyperlink;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.CommonAddExistingTaskWizard;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITaskComment;
-import org.eclipse.mylyn.tasks.core.ITaskMapping;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
-import org.eclipse.mylyn.tasks.core.data.TaskAttachmentModel;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;
-import org.eclipse.mylyn.tasks.ui.wizards.ITaskRepositoryPage;
-import org.eclipse.mylyn.tasks.ui.wizards.ITaskSearchPage;
-import org.eclipse.mylyn.tasks.ui.wizards.TaskAttachmentPage;
-
-/**
- * Extend to provide connector-specific UI extensions.
- *
- * TODO: consider refactoring into extension points
- *
- * @author Mik Kersten
- * @author Eugene Kuleshov
- * @since 2.0
- */
-public abstract class AbstractRepositoryConnectorUi {
-
- private static final String LABEL_TASK_DEFAULT = "Task";
-
- private boolean customNotificationHandling = false;
-
- /**
- * @return the unique type of the repository, e.g. "bugzilla"
- */
- public abstract String getConnectorKind();
-
- /**
- * @since 3.0
- */
- public abstract ITaskRepositoryPage getSettingsPage(TaskRepository taskRepository);
-
- /**
- * @param repository
- * @param queryToEdit
- * can be null
- * @since 3.0
- */
- public abstract IWizard getQueryWizard(TaskRepository repository, IRepositoryQuery queryToEdit);
-
- /**
- * @since 3.0
- */
- public abstract IWizard getNewTaskWizard(TaskRepository taskRepository, ITaskMapping selection);
-
- /**
- * Override to return a custom task editor ID. If overriding this method the connector becomes responsible for
- * showing the additional pages handled by the default task editor. As of Mylyn 2.0M2 these are the Planning and
- * Context pages.
- *
- * @since 3.0
- */
- public String getTaskEditorId(ITask repositoryTask) {
- return TaskEditor.ID_EDITOR;
- }
-
- public abstract boolean hasSearchPage();
-
- /**
- * Contributions to the UI legend.
- *
- * @deprecated use {@link #getLegendElements()} instead
- */
- @Deprecated
- public List<ITask> getLegendItems() {
- return Collections.emptyList();
- }
-
- /**
- * Contributions to the UI legend.
- *
- * @since 3.0
- */
- public List<LegendElement> getLegendElements() {
- return Collections.emptyList();
- }
-
- /**
- * @param repositoryTask
- * can be null
- * @since 3.0
- */
- public String getTaskKindLabel(ITask task) {
- return LABEL_TASK_DEFAULT;
- }
-
- /**
- * Connector-specific task icons. Not recommended to override unless providing custom icons and kind overlays.
- *
- * For connectors that have a decorator that they want to reuse, the connector can maintain a reference to the label
- * provider and get the descriptor from the images it returns.
- *
- * @since 3.0
- */
- public ImageDescriptor getImageDescriptor(IRepositoryElement element) {
- if (element instanceof IRepositoryQuery) {
- return TasksUiImages.QUERY;
- } else if (element instanceof ITask) {
- return TasksUiImages.TASK;
- } else {
- return null;
- }
- }
-
- /**
- * Task kind overlay, recommended to override with connector-specific overlay.
- *
- * @since 3.0
- */
- public ImageDescriptor getTaskKindOverlay(ITask task) {
- return null;
- }
-
- /**
- * Connector-specific priority icons. Not recommended to override since priority icons are used elsewhere in the
- * Task List UI (e.g. filter selection in view menu).
- *
- * @since 3.0
- */
- public ImageDescriptor getTaskPriorityOverlay(ITask task) {
- return TasksUiImages.getImageDescriptorForPriority(PriorityLevel.fromString(task.getPriority()));
- }
-
- public IWizard getAddExistingTaskWizard(TaskRepository repository) {
- return new CommonAddExistingTaskWizard(repository);
- }
-
- /**
- * @since 3.0
- */
- public ITaskSearchPage getSearchPage(TaskRepository repository, IStructuredSelection selection) {
- return null;
- }
-
- /**
- * Override to return a URL that provides the user with an account creation page for the repository
- *
- * @param taskRepository
- * TODO
- */
- public String getAccountCreationUrl(TaskRepository taskRepository) {
- return null;
- }
-
- /**
- * Override to return a URL that provides the user with an account management page for the repository
- *
- * @param taskRepository
- * TODO
- */
- public String getAccountManagementUrl(TaskRepository taskRepository) {
- return null;
- }
-
- /**
- * Override to return a URL that provides the user with a history page for the task.
- *
- * @return a url of a page for the history of the task; null, if no history url is available
- * @since 3.0
- */
- public String getTaskHistoryUrl(TaskRepository taskRepository, ITask task) {
- return null;
- }
-
- /**
- * Override to return a textual reference to a comment, e.g. for Bugzilla this method returns <code>#12</code> for
- * comment 12. This reference is used when generating replies to comments
- *
- * @return a reference to <code>comment</code>; null, if no reference is available
- * @since 3.0
- */
- public String getReplyText(TaskRepository taskRepository, ITask task, ITaskComment taskComment, boolean includeTask) {
- return null;
- }
-
- /**
- * Returns an array of hyperlinks that link to tasks within <code>text</code>.
- *
- * @param repository
- * the task repository, never <code>null</code>
- * @param text
- * the line of text
- * @param textOffset
- * the offset within <code>text</code>
- * @param lineOffset
- * the offset of <code>text</code>
- * @return an array of hyperlinks
- * @since 2.0
- */
- public IHyperlink[] findHyperlinks(TaskRepository repository, String text, int textOffset, int lineOffset) {
- return null;
- }
-
- @Deprecated
- public void setCustomNotificationHandling(boolean customNotifications) {
- this.customNotificationHandling = customNotifications;
- }
-
- /**
- * @since 3.0
- */
- public boolean hasCustomNotifications() {
- return customNotificationHandling;
- }
-
- /**
- * @since 3.0
- * @return true if connector doesn't support non-grouping (flattening) of subtasks
- */
- public boolean hasStrictSubtaskHierarchy() {
- return false;
- }
-
- /**
- * @since 3.0
- */
- public IWizardPage getTaskAttachmentPage(TaskAttachmentModel model) {
- return new TaskAttachmentPage(model);
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/AbstractTaskRepositoryLinkProvider.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/AbstractTaskRepositoryLinkProvider.java
deleted file mode 100644
index 41af44d98..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/AbstractTaskRepositoryLinkProvider.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.ui;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExecutableExtension;
-import org.eclipse.mylyn.tasks.core.IRepositoryManager;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-/**
- * Extend to provide linking between repositories and tasks.
- *
- * @author Eugene Kuleshov
- * @since 2.0
- */
-public abstract class AbstractTaskRepositoryLinkProvider implements IExecutableExtension {
-
- private static final int DEFAULT_ORDER = 1000;
-
- private String id;
-
- private String name;
-
- private int order;
-
- public void setInitializationData(IConfigurationElement config, String propertyName, Object data) {
- id = config.getAttribute("id");
- name = config.getAttribute("name");
- try {
- order = Integer.parseInt(config.getAttribute("order"));
- } catch (NumberFormatException ex) {
- order = DEFAULT_ORDER;
- }
- }
-
- /**
- * This operation is invoked frequently by hyperlink detectors and needs to be fast (i.e. cannot do network access
- * or invoke long-running refreshes). Return null if the repository cannot be resolved without excessive file I/O.@since 3.0
- * @since 3.0
- */
- public abstract TaskRepository getTaskRepository(IResource resource, IRepositoryManager repositoryManager);
-
- public boolean canSetTaskRepository(IResource resource) {
- return false;
- }
-
- public boolean setTaskRepository(IResource resource, TaskRepository repository) {
- return false;
- }
-
- public String getId() {
- return id;
- }
-
- public String getName() {
- return name;
- }
-
- public int getOrder() {
- return order;
- }
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/ITasksUiConstants.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/ITasksUiConstants.java
deleted file mode 100644
index 3ae92adf3..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/ITasksUiConstants.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.ui;
-
-/**
- * @author Mik Kersten
- * @since 3.0
- * @noimplement This interface is not intended to be implemented by clients.
- */
-public interface ITasksUiConstants {
-
- public static final String ID_COMMAND_MARK_TASK_UNREAD = "org.eclipse.mylyn.tasks.ui.command.markTaskUnread";
-
- public static final String ID_COMMAND_MARK_TASK_READ = "org.eclipse.mylyn.tasks.ui.command.markTaskRead";
-
- public static final String ID_PAGE_PLANNING = "org.eclipse.mylyn.tasks.ui.pageFactory.Planning";
-
- public static final String ID_PERSPECTIVE_PLANNING = "org.eclipse.mylyn.tasks.ui.perspectives.planning";
-
- public static final String ID_PREFERENCES_COLORS_AND_FONTS = "org.eclipse.ui.preferencePages.ColorsAndFonts";
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/LegendElement.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/LegendElement.java
deleted file mode 100644
index 500748a7e..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/LegendElement.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.ui;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * @author Steffen Pingel
- * @since 3.0
- */
-public class LegendElement {
-
- public static LegendElement createTask(String label, ImageDescriptor overlay) {
- return new LegendElement(label, CommonImages.getCompositeTaskImage(TasksUiImages.TASK, overlay, false));
- }
-
- private final Image image;
-
- private final String label;
-
- private LegendElement(String label, Image image) {
- this.label = label;
- this.image = image;
- }
-
- public void dispose() {
- }
-
- public Image getImage() {
- return image;
- }
-
- public String getLabel() {
- return label;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskElementLabelProvider.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskElementLabelProvider.java
deleted file mode 100644
index a27c31687..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskElementLabelProvider.java
+++ /dev/null
@@ -1,299 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.ui;
-
-import java.util.HashSet;
-import java.util.Set;
-import java.util.regex.Pattern;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IColorProvider;
-import org.eclipse.jface.viewers.IFontProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonColors;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonFonts;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonThemes;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.Person;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
-import org.eclipse.mylyn.internal.tasks.core.ScheduledTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.TaskCategory;
-import org.eclipse.mylyn.internal.tasks.core.TaskGroup;
-import org.eclipse.mylyn.internal.tasks.core.UncategorizedTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.UnmatchedTaskContainer;
-import org.eclipse.mylyn.internal.tasks.ui.ITaskHighlighter;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITaskContainer;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.themes.IThemeManager;
-
-/**
- * @author Mik Kersten
- * @since 3.0
- */
-public class TaskElementLabelProvider extends LabelProvider implements IColorProvider, IFontProvider {
-
- private static final String NO_SUMMARY_AVAILABLE = ": <no summary available>";
-
- private final IThemeManager themeManager = PlatformUI.getWorkbench().getThemeManager();
-
- private static final Pattern pattern = Pattern.compile("\\d*: .*");
-
- private boolean wideImages = false;
-
- private class CompositeImageDescriptor {
-
- ImageDescriptor icon;
-
- ImageDescriptor overlayKind;
-
- };
-
- public TaskElementLabelProvider() {
- this(false);
- }
-
- public TaskElementLabelProvider(boolean wideImages) {
- super();
- this.wideImages = wideImages;
- }
-
- @Override
- public Image getImage(Object element) {
- CompositeImageDescriptor compositeDescriptor = getImageDescriptor(element);
- if (element instanceof ITask) {
- if (compositeDescriptor.overlayKind == null) {
- compositeDescriptor.overlayKind = CommonImages.OVERLAY_CLEAR;
- }
- return CommonImages.getCompositeTaskImage(compositeDescriptor.icon, compositeDescriptor.overlayKind,
- wideImages);
- } else if (element instanceof ITaskContainer) {
- return CommonImages.getCompositeTaskImage(compositeDescriptor.icon, CommonImages.OVERLAY_CLEAR, wideImages);
- } else {
- return CommonImages.getCompositeTaskImage(compositeDescriptor.icon, null, wideImages);
- }
- }
-
- private CompositeImageDescriptor getImageDescriptor(Object object) {
- CompositeImageDescriptor compositeDescriptor = new CompositeImageDescriptor();
- if (object instanceof UncategorizedTaskContainer) {
- compositeDescriptor.icon = TasksUiImages.CATEGORY_UNCATEGORIZED;
- return compositeDescriptor;
- } else if (object instanceof TaskCategory) {
- compositeDescriptor.icon = TasksUiImages.CATEGORY;
- } else if (object instanceof TaskGroup) {
- compositeDescriptor.icon = CommonImages.GROUPING;
- }
-
- if (object instanceof ITaskContainer) {
- IRepositoryElement element = (IRepositoryElement) object;
-
- AbstractRepositoryConnectorUi connectorUi = null;
- if (element instanceof ITask) {
- ITask repositoryTask = (ITask) element;
- connectorUi = TasksUiPlugin.getConnectorUi(((ITask) element).getConnectorKind());
- if (connectorUi != null) {
- compositeDescriptor.overlayKind = connectorUi.getTaskKindOverlay(repositoryTask);
- }
- } else if (element instanceof IRepositoryQuery) {
- connectorUi = TasksUiPlugin.getConnectorUi(((IRepositoryQuery) element).getConnectorKind());
- }
-
- if (connectorUi != null) {
- compositeDescriptor.icon = connectorUi.getImageDescriptor(element);
- return compositeDescriptor;
- } else {
- if (element instanceof UnmatchedTaskContainer) {
- compositeDescriptor.icon = TasksUiImages.QUERY_UNMATCHED;
- } else if (element instanceof IRepositoryQuery || object instanceof UnmatchedTaskContainer) {
- compositeDescriptor.icon = TasksUiImages.QUERY;
- } else if (element instanceof ITask) {
- compositeDescriptor.icon = TasksUiImages.TASK;
- } else if (element instanceof ScheduledTaskContainer) {
- compositeDescriptor.icon = CommonImages.CALENDAR;
- } else if (element instanceof Person) {
- compositeDescriptor.icon = CommonImages.PERSON;
- Person person = (Person) element;
- TaskRepository repository = TasksUi.getRepositoryManager().getRepository(person.getConnectorKind(),
- person.getRepositoryUrl());
-
- if (repository != null
- && !repository.isAnonymous()
- && (repository.getUserName() != null && repository.getUserName().equalsIgnoreCase(
- element.getHandleIdentifier()))) {
- compositeDescriptor.icon = CommonImages.PERSON_ME;
- }
- }
- return compositeDescriptor;
- }
- }
- return compositeDescriptor;
- }
-
- @Override
- public String getText(Object object) {
- if (object instanceof ITask) {
- ITask task = (ITask) object;
- if (task.getSummary() == null) {
- if (task.getTaskKey() != null) {
- return task.getTaskKey() + NO_SUMMARY_AVAILABLE;
- } else {
- return task.getTaskId() + NO_SUMMARY_AVAILABLE;
- }
- } else if (!pattern.matcher(task.getSummary()).matches()) {
- if (task.getTaskKey() != null) {
- return task.getTaskKey() + ": " + task.getSummary();
- } else {
- return task.getSummary();
- }
- } else {
- return task.getSummary();
- }
- } else if (object instanceof TaskGroup) {
- TaskGroup element = (TaskGroup) object;
- return element.getSummary();// + " / " + element.getChildren().size();
- } else if (object instanceof UnmatchedTaskContainer) {
-
- UnmatchedTaskContainer container = (UnmatchedTaskContainer) object;
-
- String result = container.getSummary();
- TaskRepository repository = TasksUi.getRepositoryManager().getRepository(container.getConnectorKind(),
- container.getRepositoryUrl());
- if (repository != null) {
- result = "Unmatched [" + repository.getRepositoryLabel() + "]";
- }
-
- return result;
-
- } else if (object instanceof ITaskContainer) {
- IRepositoryElement element = (IRepositoryElement) object;
- return element.getSummary();
- } else {
- return super.getText(object);
- }
- }
-
- public Color getForeground(Object object) {
- if (object instanceof AbstractTask) {
- AbstractTask task = (AbstractTask) object;
- if (task != null) {
- if (TasksUiPlugin.getTaskActivityManager().isCompletedToday(task)) {
- return themeManager.getCurrentTheme().getColorRegistry().get(CommonThemes.COLOR_COMPLETED_TODAY);
- } else if (task.isCompleted()) {
- return themeManager.getCurrentTheme().getColorRegistry().get(CommonThemes.COLOR_COMPLETED);
- } else if (TasksUi.getTaskActivityManager().isActive(task)) {
- return CommonColors.CONTEXT_ACTIVE;
- } else if (TasksUiPlugin.getTaskActivityManager().isOverdue(task)) {
- return themeManager.getCurrentTheme().getColorRegistry().get(CommonThemes.COLOR_OVERDUE);
- } else if (TasksUiPlugin.getTaskActivityManager().isDueToday(task)) {
- return themeManager.getCurrentTheme().getColorRegistry().get(CommonThemes.COLOR_SCHEDULED_TODAY);
- } else if (task.getScheduledForDate() != null && task.getScheduledForDate().isDay()
- && TasksUiPlugin.getTaskActivityManager().isPastReminder(task)) {
- return themeManager.getCurrentTheme().getColorRegistry().get(CommonThemes.COLOR_SCHEDULED_PAST);
- } else if (TasksUiPlugin.getTaskActivityManager().isScheduledForToday(task)) {
- return themeManager.getCurrentTheme().getColorRegistry().get(CommonThemes.COLOR_SCHEDULED_TODAY);
- } else if (TasksUiPlugin.getTaskActivityManager().isScheduledForThisWeek(task)) {
- return themeManager.getCurrentTheme()
- .getColorRegistry()
- .get(CommonThemes.COLOR_SCHEDULED_THIS_WEEK);
- }
- }
- } else if (object instanceof ITaskContainer) {
- for (ITask child : ((ITaskContainer) object).getChildren()) {
- if (child.isActive() || (child instanceof ITaskContainer && showHasActiveChild((ITaskContainer) child))) {
- return CommonColors.CONTEXT_ACTIVE;
- } else if (TasksUiPlugin.getTaskActivityManager().isOverdue(child)) {
-// } else if ((child.isPastReminder() && !child.isCompleted()) || showHasChildrenPastDue(child)) {
- return themeManager.getCurrentTheme().getColorRegistry().get(CommonThemes.COLOR_OVERDUE);
- }
- }
- }
- return null;
- }
-
- public Color getBackground(Object element) {
- if (element instanceof ITask) {
- ITask task = (ITask) element;
- ITaskHighlighter highlighter = TasksUiPlugin.getDefault().getHighlighter();
- if (highlighter != null) {
- return highlighter.getHighlightColor(task);
- }
- }
- return null;
- }
-
- public Font getFont(Object element) {
- if (element instanceof AbstractTask) {
- if (((AbstractTask) element).isSynchronizing()) {
- return CommonFonts.ITALIC;
- }
- }
-
- if (element instanceof IRepositoryQuery) {
- if (((RepositoryQuery) element).isSynchronizing()) {
- return CommonFonts.ITALIC;
- }
- }
-
- if (element instanceof ITaskContainer) {
- for (ITask child : ((ITaskContainer) element).getChildren()) {
- if (child.isActive() || (child instanceof ITaskContainer && showHasActiveChild((ITaskContainer) child))) {
- return CommonFonts.BOLD;
- }
- }
- }
-
- if (element instanceof AbstractTask) {
- if (((AbstractTask) element).isActive()) {
- return CommonFonts.BOLD;
- } else if (((AbstractTask) element).isCompleted()) {
- return CommonFonts.STRIKETHROUGH;
- }
- for (ITask child : ((ITaskContainer) element).getChildren()) {
- if (child.isActive() || (child instanceof ITaskContainer && showHasActiveChild((ITaskContainer) child))) {
- return CommonFonts.BOLD;
- }
- }
- }
- return null;
- }
-
- private boolean showHasActiveChild(ITaskContainer container) {
- if (!TasksUiPlugin.getDefault().groupSubtasks(container)) {
- return false;
- }
-
- return showHasActiveChildHelper(container, new HashSet<IRepositoryElement>());
- }
-
- private boolean showHasActiveChildHelper(ITaskContainer container, Set<IRepositoryElement> visitedContainers) {
- for (IRepositoryElement child : container.getChildren()) {
- if (visitedContainers.contains(child)) {
- continue;
- }
- visitedContainers.add(child);
- if (child instanceof ITask && ((AbstractTask) child).isActive()) {
- return true;
- } else if (child instanceof ITaskContainer) {
- if (showHasActiveChildHelper((ITaskContainer) child, visitedContainers)) {
- return true;
- }
- }
- }
- return false;
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskHyperlink.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskHyperlink.java
deleted file mode 100644
index 00914ba09..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskHyperlink.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.tasks.ui;
-
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.hyperlink.IHyperlink;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-/**
- * Immutable. Encapsulates information for linking to tasks from text.
- *
- * @author Eugene Kuleshov
- * @author Steffen Pingel
- */
-public final class TaskHyperlink implements IHyperlink {
-
- private final IRegion region;
-
- private final TaskRepository repository;
-
- private final String taskId;
-
- public TaskHyperlink(IRegion region, TaskRepository repository, String taskId) {
- this.region = region;
- this.repository = repository;
- this.taskId = taskId;
- }
-
- public IRegion getHyperlinkRegion() {
- return region;
- }
-
- public String getTaskId() {
- return taskId;
- }
-
- public String getTypeLabel() {
- return null;
- }
-
- /**
- * @Since 2.1
- * @return
- */
- public TaskRepository getRepository() {
- return repository;
- }
-
- public String getHyperlinkText() {
- return "Open Task " + taskId;
- }
-
- public void open() {
- if (repository != null) {
- TasksUiUtil.openTask(repository, taskId);
- } else {
- MessageDialog.openError(null, "Mylyn", "Could not determine repository for report");
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskRepositoryLocationUiFactory.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskRepositoryLocationUiFactory.java
deleted file mode 100644
index d48c541b5..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskRepositoryLocationUiFactory.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.ui;
-
-import org.eclipse.mylyn.commons.net.AbstractWebLocation;
-import org.eclipse.mylyn.internal.tasks.ui.TaskRepositoryLocationUi;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.TaskRepositoryLocationFactory;
-
-/**
- * @since 2.2
- * @author Steffen Pingel
- */
-public class TaskRepositoryLocationUiFactory extends TaskRepositoryLocationFactory {
-
- /**
- * @since 3.0
- */
- @Override
- public AbstractWebLocation createWebLocation(TaskRepository taskRepository) {
- return new TaskRepositoryLocationUi(taskRepository);
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUi.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUi.java
deleted file mode 100644
index 9382c3918..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUi.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.ui;
-
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.IRepositoryManager;
-import org.eclipse.mylyn.tasks.core.IRepositoryModel;
-import org.eclipse.mylyn.tasks.core.ITaskActivityManager;
-import org.eclipse.mylyn.tasks.core.data.ITaskDataManager;
-
-/**
- * @author Steffen Pingel
- * @author Mik Kersten
- * @since 3.0
- */
-public class TasksUi {
-
- public static AbstractRepositoryConnector getRepositoryConnector(String kind) {
- return getRepositoryManager().getRepositoryConnector(kind);
- }
-
- public static AbstractRepositoryConnectorUi getRepositoryConnectorUi(String kind) {
- return TasksUiPlugin.getConnectorUi(kind);
- }
-
- public static IRepositoryManager getRepositoryManager() {
- return TasksUiPlugin.getRepositoryManager();
- }
-
- public static ITaskActivityManager getTaskActivityManager() {
- return TasksUiPlugin.getTaskActivityManager();
- }
-
- public static ITaskDataManager getTaskDataManager() {
- return TasksUiPlugin.getTaskDataManager();
- }
-
- public static IRepositoryModel getRepositoryModel() {
- return TasksUiPlugin.getRepositoryModel();
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiImages.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiImages.java
deleted file mode 100644
index 12ef15056..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiImages.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.ui;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * API-3.0: consider removing images not used by clients
- *
- * @author Mik Kersten
- * @since 3.0
- */
-public class TasksUiImages {
-
- private static final URL baseURL = TasksUiPlugin.getDefault().getBundle().getEntry("/icons/");
-
- private static final String VIEW = "eview16";
-
- private static final String TOOL = "etool16";
-
- private static final String OBJ = "obj16";
-
- private static final String WIZBAN = "wizban";
-
- // Tasks and Task List elements
-
- public static final ImageDescriptor TASK = create(TOOL, "task.gif");
-
- public static final ImageDescriptor TASK_COMPLETE = create(TOOL, "task-complete.gif");
-
- public static final ImageDescriptor TASK_INCOMPLETE = create(TOOL, "task-incomplete.gif");
-
- public static final ImageDescriptor TASK_COMPLETED = create(TOOL, "task-completed.gif");
-
- public static final ImageDescriptor TASK_NOTES = create(TOOL, "task-notes.gif");
-
- public static final ImageDescriptor TASK_NEW = create(TOOL, "task-new.gif");
-
- public static final ImageDescriptor TASK_NEW_SUB = create(TOOL, "sub-task-new.gif");
-
- public static final ImageDescriptor TASK_REPOSITORY_HISTORY = create(TOOL, "task-repository-history.gif");
-
- public static final ImageDescriptor TASK_REMOTE = create(TOOL, "task-remote.gif");
-
- public static final ImageDescriptor TASK_WORKING_SET = create(TOOL, "open-task.gif");
-
- public static final ImageDescriptor TASKS_VIEW = create("eview16", "task-list.gif");
-
- public static final ImageDescriptor TASK_ATTACHMENT_PATCH = create(OBJ, "attachment-patch.gif");
-
- public static final ImageDescriptor TASK_RETRIEVE = create(TOOL, "task-retrieve.gif");
-
- public static final ImageDescriptor TASK_REPOSITORY = create(TOOL, "task-repository.gif");
-
- public static final ImageDescriptor TASK_REPOSITORY_NEW = create(TOOL, "task-repository-new.gif");
-
- public static final ImageDescriptor CATEGORY = create(TOOL, "category.gif");
-
- public static final ImageDescriptor CATEGORY_NEW = create(TOOL, "category-new.gif");
-
- public static final ImageDescriptor CATEGORY_UNCATEGORIZED = create(TOOL, "category-archive.gif");
-
- public static final ImageDescriptor QUERY = create(TOOL, "query.gif");
-
- public static final ImageDescriptor QUERY_NEW = create(TOOL, "query-new.gif");
-
- public static final ImageDescriptor QUERY_UNMATCHED = create(TOOL, "query-unmatched.png");
-
- public static final ImageDescriptor REPOSITORY = create("eview16", "repository.gif");
-
- public static final ImageDescriptor REPOSITORY_OFFLINE = ImageDescriptor.createWithFlags(TasksUiImages.REPOSITORY,
- SWT.IMAGE_GRAY);
-
- public static final ImageDescriptor REPOSITORY_SYNCHRONIZE = create(TOOL, "repository-synchronize.gif");
-
- public static final ImageDescriptor REPOSITORY_SUBMIT = create(TOOL, "repository-submit.gif");
-
- public static final ImageDescriptor REPOSITORY_SMALL = create(OBJ, "repository-small.gif");
-
- public static final ImageDescriptor REPOSITORY_NEW = create("etool16", "repository-new.gif");
-
- public static final ImageDescriptor REPOSITORIES_VIEW = create("eview16", "repositories.gif");
-
- // Context and activation
-
- public static final ImageDescriptor CONTEXT_ACTIVE = create(TOOL, "task-active.gif");
-
- public static final ImageDescriptor CONTEXT_ACTIVE_CENTERED = create(TOOL, "task-active-centered.gif");
-
- public static final ImageDescriptor CONTEXT_INACTIVE_EMPTY = create(TOOL, "task-inactive.gif");
-
- public static final ImageDescriptor CONTEXT_INACTIVE = create(TOOL, "task-context.gif");
-
- public static final ImageDescriptor CONTEXT_FOCUS = create(VIEW, "focus.gif");
-
- public static final ImageDescriptor CONTEXT_ATTACH = create(TOOL, "context-attach.gif");
-
- public static final ImageDescriptor CONTEXT_RETRIEVE = create(TOOL, "context-retrieve.gif");
-
- public static final ImageDescriptor CONTEXT_TRANSFER = create(TOOL, "context-transfer.gif");
-
- public static final ImageDescriptor CONTEXT_CLEAR = create(TOOL, "context-clear.gif");
-
- public static final ImageDescriptor CONTEXT_HISTORY_PREVIOUS = create(TOOL, "navigate-previous.gif");
-
- public static final ImageDescriptor CONTEXT_HISTORY_PREVIOUS_PAUSE = create(TOOL, "navigate-previous-pause.gif");
-
- public static final ImageDescriptor CONTEXT_HISTORY_PREVIOUS_ACTIVE = create(TOOL, "navigate-previous-active.gif");
-
- public static final ImageDescriptor CONTEXT_HISTORY_NEXT = create(TOOL, "navigate-next.gif");
-
- public static final ImageDescriptor CONTEXT_CAPTURE_PAUSE = create(TOOL, "capture-pause.gif");
-
- public static final ImageDescriptor CONTEXT_ADD = create(TOOL, "context-add.gif");
-
- public static final ImageDescriptor CONTEXT_COPY = create(TOOL, "context-transfer.gif");
-
- // Comments and collaboration
-
- public static final ImageDescriptor COMMENT = create(TOOL, "comment.gif");
-
- public static final ImageDescriptor COMMENT_SORT_DOWN = create(TOOL, "sort-down.gif");
-
- public static final ImageDescriptor COMMENT_SORT_UP = create(TOOL, "sort-up.gif");
-
- public static final ImageDescriptor COMMENT_SORT_DOWN_GRAY = create(TOOL, "sort-down-gray.gif");
-
- public static final ImageDescriptor COMMENT_SORT_UP_GRAY = create(TOOL, "sort-up-gray.gif");
-
- public static final ImageDescriptor COMMENT_REPLY = create(TOOL, "reply.gif");
-
- // Wizard banners
-
- public static final ImageDescriptor BANNER_REPOSITORY = create(WIZBAN, "banner-repository.gif");
-
- public static final ImageDescriptor BANNER_REPOSITORY_SETTINGS = create(WIZBAN, "banner-repository-settings.gif");
-
- public static final ImageDescriptor BANNER_REPOSITORY_CONTEXT = create(WIZBAN, "banner-repository-context.gif");
-
- public static final ImageDescriptor BANNER_WORKING_SET = create(WIZBAN, "workset_wiz.png");
-
- public static Image getImageForPriority(PriorityLevel priorityLevel) {
- if (priorityLevel == null) {
- return null;
- } else {
- ImageDescriptor imageDescriptor = getImageDescriptorForPriority(priorityLevel);
- if (imageDescriptor != null) {
- return CommonImages.getImage(imageDescriptor);
- }
- }
- return null;
- }
-
- public static ImageDescriptor getImageDescriptorForPriority(PriorityLevel priorityLevel) {
- if (priorityLevel == null) {
- return null;
- }
- switch (priorityLevel) {
- case P1:
- return CommonImages.PRIORITY_1;
- case P2:
- return CommonImages.PRIORITY_2;
- case P3:
- return CommonImages.PRIORITY_3;
- case P4:
- return CommonImages.PRIORITY_4;
- case P5:
- return CommonImages.PRIORITY_5;
- default:
- return null;
- }
- }
-
- public static ImageDescriptor create(String prefix, String name) {
- try {
- return ImageDescriptor.createFromURL(makeIconFileURL(prefix, name));
- } catch (MalformedURLException e) {
- return ImageDescriptor.getMissingImageDescriptor();
- }
- }
-
- private static URL makeIconFileURL(String prefix, String name) throws MalformedURLException {
- if (baseURL == null) {
- throw new MalformedURLException();
- }
-
- StringBuffer buffer = new StringBuffer(prefix);
- buffer.append('/');
- buffer.append(name);
- return new URL(baseURL, buffer.toString());
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiUtil.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiUtil.java
deleted file mode 100644
index 0e2996461..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiUtil.java
+++ /dev/null
@@ -1,506 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.ui;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Calendar;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.jface.window.Window;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.LocalTask;
-import org.eclipse.mylyn.internal.tasks.ui.ITasksUiPreferenceConstants;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiMessages;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskRepositoriesView;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.EditRepositoryWizard;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.MultiRepositoryAwareWizard;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.NewLocalTaskWizard;
-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.ITaskMapping;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.ITask.SynchronizationState;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditorInput;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.browser.IWebBrowser;
-import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
-import org.eclipse.ui.internal.browser.WebBrowserPreference;
-import org.eclipse.ui.internal.browser.WorkbenchBrowserSupport;
-
-/**
- * @since 2.0
- * @author Mik Kersten
- * @author Steffen Pingel
- * @author Shawn Minto
- */
-public class TasksUiUtil {
-
- /**
- * Flag that is passed along to the workbench browser support when a task is opened in a browser because no rich
- * editor was available.
- *
- * @see #openTask(String)
- */
- public static final int FLAG_NO_RICH_EDITOR = 1 << 17;
-
- private static final String ATTRIBUTE_OUTGOING_NEW_CONNECTOR_KIND = "outgoingNewConnectorKind";
-
- /**
- * @since 3.0
- */
- public static ITask createOutgoingNewTask(String connectorKind) {
- Assert.isNotNull(connectorKind);
- LocalTask task = TasksUiInternal.createNewLocalTask(null);
- task.setAttribute(ATTRIBUTE_OUTGOING_NEW_CONNECTOR_KIND, connectorKind);
- task.setSynchronizationState(SynchronizationState.OUTGOING_NEW);
- return task;
- }
-
- /**
- * @since 3.0
- */
- public static boolean isOutgoingNewTask(ITask task, String connectorKind) {
- Assert.isNotNull(task);
- Assert.isNotNull(connectorKind);
- return connectorKind.equals(task.getAttribute(ATTRIBUTE_OUTGOING_NEW_CONNECTOR_KIND));
- }
-
- public static TaskRepository getSelectedRepository() {
- return getSelectedRepository(null);
- }
-
- /**
- * Will use the workbench window's selection if viewer's selection is null
- */
- public static TaskRepository getSelectedRepository(StructuredViewer viewer) {
- IStructuredSelection selection = null;
- if (viewer != null) {
- selection = (IStructuredSelection) viewer.getSelection();
- }
- if (selection == null || selection.isEmpty()) {
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- ISelection windowSelection = window.getSelectionService().getSelection();
- if (windowSelection instanceof IStructuredSelection) {
- selection = (IStructuredSelection) windowSelection;
- }
- }
-
- if (selection == null) {
- return null;
- }
-
- Object element = selection.getFirstElement();
- if (element instanceof TaskRepository) {
- return (TaskRepository) selection.getFirstElement();
- } else if (element instanceof IRepositoryQuery) {
- IRepositoryQuery query = (IRepositoryQuery) element;
- return TasksUi.getRepositoryManager().getRepository(query.getConnectorKind(), query.getRepositoryUrl());
- } else if (element instanceof ITask) {
- ITask task = (ITask) element;
- return TasksUi.getRepositoryManager().getRepository(task.getConnectorKind(), task.getRepositoryUrl());
- } else if (element instanceof IResource) {
- IResource resource = (IResource) element;
- return TasksUiPlugin.getDefault().getRepositoryForResource(resource);
- } else if (element instanceof IAdaptable) {
- IAdaptable adaptable = (IAdaptable) element;
- IResource resource = (IResource) adaptable.getAdapter(IResource.class);
- if (resource != null) {
- return TasksUiPlugin.getDefault().getRepositoryForResource(resource);
- } else {
- ITask task = (ITask) adaptable.getAdapter(AbstractTask.class);
- if (task != null) {
- ITask rtask = task;
- return TasksUi.getRepositoryManager().getRepository(rtask.getConnectorKind(),
- rtask.getRepositoryUrl());
- }
- }
- }
-
- // TODO mapping between LogEntry.pliginId and repositories
- // TODO handle other selection types
- return null;
- }
-
- private static String getTaskEditorId(final ITask task) {
- String taskEditorId = TaskEditor.ID_EDITOR;
- if (task != null) {
- ITask repositoryTask = task;
- AbstractRepositoryConnectorUi repositoryUi = TasksUiPlugin.getConnectorUi(repositoryTask.getConnectorKind());
- String customTaskEditorId = repositoryUi.getTaskEditorId(repositoryTask);
- if (customTaskEditorId != null) {
- taskEditorId = customTaskEditorId;
- }
- }
- return taskEditorId;
- }
-
- public static IEditorPart openEditor(IEditorInput input, String editorId, IWorkbenchPage page) {
- try {
- return page.openEditor(input, editorId);
- } catch (PartInitException e) {
- StatusHandler.fail(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Open for editor failed: " + input
- + ", taskId: " + editorId, e));
- }
- return null;
- }
-
- public static int openEditRepositoryWizard(TaskRepository repository) {
- try {
- EditRepositoryWizard wizard = new EditRepositoryWizard(repository);
- Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- if (shell != null && !shell.isDisposed()) {
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.create();
- dialog.setBlockOnOpen(true);
- if (dialog.open() == Window.CANCEL) {
- dialog.close();
- return Window.CANCEL;
- }
- }
-
- if (TaskRepositoriesView.getFromActivePerspective() != null) {
- TaskRepositoriesView.getFromActivePerspective().getViewer().refresh();
- }
- } catch (Exception e) {
- StatusHandler.fail(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, e.getMessage(), e));
- }
- return Window.OK;
- }
-
- /**
- * @since 3.0
- */
- public static boolean openNewLocalTaskEditor(Shell shell, ITaskMapping taskSelection) {
- return openNewTaskEditor(shell, new NewLocalTaskWizard(taskSelection), taskSelection);
- }
-
- private static boolean openNewTaskEditor(Shell shell, IWizard wizard, ITaskMapping taskSelection) {
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.setBlockOnOpen(true);
-
- // make sure the wizard has created its pages
- dialog.create();
- if (!(wizard instanceof MultiRepositoryAwareWizard) && wizard.canFinish()) {
- wizard.performFinish();
- return true;
- }
-
- int result = dialog.open();
- return result == Window.OK;
- }
-
- /**
- * @since 3.0
- */
- public static boolean openNewTaskEditor(Shell shell, ITaskMapping taskSelection, TaskRepository taskRepository) {
- final IWizard wizard;
- List<TaskRepository> repositories = TasksUi.getRepositoryManager().getAllRepositories();
- if (taskRepository == null && repositories.size() == 1) {
- // only the Local repository connector is available
- taskRepository = repositories.get(0);
- }
-
- if (taskRepository != null) {
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(taskRepository.getConnectorKind());
- wizard = connectorUi.getNewTaskWizard(taskRepository, taskSelection);
- } else {
- wizard = TasksUiInternal.createNewTaskWizard(taskSelection);
- }
-
- return openNewTaskEditor(shell, wizard, taskSelection);
- }
-
- /**
- * Either pass in a repository and taskId, or fullUrl, or all of them
- *
- * @deprecated Use {@link #openTask(String,String,String)} instead
- */
- @Deprecated
- public static boolean openRepositoryTask(String repositoryUrl, String taskId, String fullUrl) {
- return openTask(repositoryUrl, taskId, fullUrl);
- }
-
- /**
- * @deprecated Use {@link #openTask(TaskRepository,String)} instead
- */
- @Deprecated
- public static boolean openRepositoryTask(TaskRepository repository, String taskId) {
- return openTask(repository, taskId);
- }
-
- /**
- * @since 3.0
- */
- public static boolean openTask(ITask task) {
- Assert.isNotNull(task);
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- if (window != null) {
- boolean openWithBrowser = !TasksUiPlugin.getDefault().getPreferenceStore().getBoolean(
- ITasksUiPreferenceConstants.EDITOR_TASKS_RICH);
- if (openWithBrowser) {
- openUrl(task.getUrl());
- return true;
- } else {
- TaskRepository taskRepository = TasksUi.getRepositoryManager().getRepository(task.getConnectorKind(),
- task.getRepositoryUrl());
- IEditorInput editorInput = new TaskEditorInput(taskRepository, task);
- boolean wasOpen = refreshEditorContentsIfOpen(task, editorInput);
- if (wasOpen) {
- synchronizeTask(task);
- return true;
- } else {
- IWorkbenchPage page = window.getActivePage();
- IEditorPart editor = openEditor(editorInput, getTaskEditorId(task), page);
- if (editor != null) {
- synchronizeTask(task);
- return true;
- }
- }
- }
- } else {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Unable to open editor for \""
- + task.getSummary() + "\": no active workbench window"));
- }
- return false;
- }
-
- private static void synchronizeTask(ITask task) {
- if (task instanceof LocalTask) {
- return;
- }
-
- AbstractRepositoryConnector connector = TasksUi.getRepositoryManager().getRepositoryConnector(
- task.getConnectorKind());
- TasksUiInternal.synchronizeTask(connector, task, false, null);
- }
-
- /**
- * Resolves a rich editor for the task if available.
- *
- * @since 3.0
- */
- public static void openTask(String url) {
- AbstractTask task = TasksUiUtil.getTaskByUrl(url);
- if (task != null && !(task instanceof LocalTask)) {
- openTask(task);
- } else {
- boolean opened = false;
- AbstractRepositoryConnector connector = TasksUiPlugin.getRepositoryManager()
- .getConnectorForRepositoryTaskUrl(url);
- if (connector != null) {
- String repositoryUrl = connector.getRepositoryUrlFromTaskUrl(url);
- String id = connector.getTaskIdFromTaskUrl(url);
- TaskRepository repository = TasksUi.getRepositoryManager().getRepository(connector.getConnectorKind(),
- repositoryUrl);
- opened = openTask(repository, id);
- }
- if (!opened) {
- openUrl(url, 0);
- }
- }
- }
-
- /**
- * Either pass in a repository and taskId, or fullUrl, or all of them
- *
- * @since 3.0
- */
- public static boolean openTask(String repositoryUrl, String taskId, String fullUrl) {
- AbstractTask task = null;
- if (repositoryUrl != null && taskId != null) {
- task = (AbstractTask) TasksUiInternal.getTaskList().getTask(repositoryUrl, taskId);
- }
- if (task == null && fullUrl != null) {
- task = TasksUiUtil.getTaskByUrl(fullUrl);
- }
- if (task == null && repositoryUrl != null && taskId != null) {
- task = TasksUiPlugin.getTaskList().getTaskByKey(repositoryUrl, taskId);
- }
-
- if (task != null) {
- return TasksUiUtil.openTask(task);
- }
-
- boolean opened = false;
-
- AbstractRepositoryConnector connector = TasksUiPlugin.getRepositoryManager().getConnectorForRepositoryTaskUrl(
- fullUrl);
- if (connector != null) {
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(connector.getConnectorKind());
- if (repositoryUrl != null && taskId != null) {
- opened = TasksUiInternal.openRepositoryTask(connectorUi.getConnectorKind(), repositoryUrl, taskId);
- } else {
- repositoryUrl = connector.getRepositoryUrlFromTaskUrl(fullUrl);
- taskId = connector.getTaskIdFromTaskUrl(fullUrl);
- if (repositoryUrl != null && taskId != null) {
- opened = TasksUiInternal.openRepositoryTask(connectorUi.getConnectorKind(), repositoryUrl, taskId);
- }
- }
- }
-
- if (!opened) {
- TasksUiUtil.openUrl(fullUrl);
- }
-
- return true;
- }
-
- /**
- * Searches for a task whose URL matches
- *
- * @return first task with a matching URL.
- * @since 2.0
- */
- private static AbstractTask getTaskByUrl(String taskUrl) {
- Collection<AbstractTask> tasks = TasksUiPlugin.getTaskList().getAllTasks();
- for (AbstractTask task : tasks) {
- String currUrl = task.getUrl();
- if (currUrl != null && !currUrl.equals("") && currUrl.equals(taskUrl)) {
- return task;
- }
- }
- return null;
- }
-
- /**
- * @since 3.0
- */
- public static boolean openTask(TaskRepository repository, String taskId) {
- Assert.isNotNull(repository);
- Assert.isNotNull(taskId);
-
- AbstractTask task = (AbstractTask) TasksUiInternal.getTaskList().getTask(repository.getRepositoryUrl(), taskId);
- if (task == null) {
- task = TasksUiPlugin.getTaskList().getTaskByKey(repository.getRepositoryUrl(), taskId);
- }
- if (task != null) {
- return TasksUiUtil.openTask(task);
- } else {
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(repository.getConnectorKind());
- if (connectorUi != null) {
- try {
- return TasksUiInternal.openRepositoryTask(connectorUi.getConnectorKind(),
- repository.getRepositoryUrl(), taskId);
- } catch (Exception e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Internal error while opening repository task", e));
- }
- }
- }
- return false;
- }
-
- /**
- * @since 3.0
- */
- public static void openUrl(String location) {
- openUrl(location, FLAG_NO_RICH_EDITOR);
- }
-
- private static void openUrl(String location, int customFlags) {
- try {
- URL url = null;
-
- if (location != null) {
- url = new URL(location);
- }
- if (WebBrowserPreference.getBrowserChoice() == WebBrowserPreference.EXTERNAL) {
- try {
- IWorkbenchBrowserSupport support = PlatformUI.getWorkbench().getBrowserSupport();
- support.getExternalBrowser().openURL(url);
- } catch (Exception e) {
- StatusHandler.fail(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Could not open task url", e));
- }
- } else {
- IWebBrowser browser = null;
- int flags = 0;
- if (WorkbenchBrowserSupport.getInstance().isInternalWebBrowserAvailable()) {
- flags = IWorkbenchBrowserSupport.AS_EDITOR | IWorkbenchBrowserSupport.LOCATION_BAR
- | IWorkbenchBrowserSupport.NAVIGATION_BAR;
- } else {
- flags = IWorkbenchBrowserSupport.AS_EXTERNAL | IWorkbenchBrowserSupport.LOCATION_BAR
- | IWorkbenchBrowserSupport.NAVIGATION_BAR;
- }
-
- String generatedId = "org.eclipse.mylyn.web.browser-" + Calendar.getInstance().getTimeInMillis();
- browser = WorkbenchBrowserSupport.getInstance().createBrowser(flags, generatedId, null, null);
- browser.openURL(url);
- }
- } catch (PartInitException e) {
- MessageDialog.openError(Display.getDefault().getActiveShell(), "Browser init error",
- "Browser could not be initiated");
- } catch (MalformedURLException e) {
- if (location != null && location.trim().equals("")) {
- MessageDialog.openInformation(Display.getDefault().getActiveShell(), TasksUiMessages.DIALOG_EDITOR,
- "No URL to open." + location);
- } else {
- MessageDialog.openInformation(Display.getDefault().getActiveShell(), TasksUiMessages.DIALOG_EDITOR,
- "Could not open URL: " + location);
- }
- }
- }
-
- /**
- * If task is already open and has incoming, must force refresh in place
- */
- private static boolean refreshEditorContentsIfOpen(ITask task, IEditorInput editorInput) {
- if (task != null) {
- if (task.getSynchronizationState() == SynchronizationState.INCOMING
- || task.getSynchronizationState() == SynchronizationState.CONFLICT) {
- for (TaskEditor editor : TasksUiInternal.getActiveRepositoryTaskEditors()) {
- if (editor.getEditorInput().equals(editorInput)) {
- editor.refreshEditorContents();
- editor.getEditorSite().getPage().activate(editor);
- return true;
- }
- }
- }
- }
- return false;
- }
-
- /**
- * @since 3.0
- */
- public static IViewPart openTasksViewInActivePerspective() {
- try {
- return PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(TaskListView.ID);
- } catch (Exception e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Could not show Task List view", e));
- return null;
- }
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractAttributeEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractAttributeEditor.java
deleted file mode 100644
index 4a034a440..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractAttributeEditor.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.ui.editors;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.mylyn.tasks.core.data.TaskAttributeMapper;
-import org.eclipse.mylyn.tasks.core.data.TaskDataModel;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.ui.forms.IFormColors;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-
-/**
- * @author Steffen Pingel
- * @since 3.0
- */
-public abstract class AbstractAttributeEditor {
-
- public static final int MAXIMUM_HEIGHT = 140;
-
- public static final int MAXIMUM_WIDTH = 500;
-
- // XXX why is this required?
- protected static final Font TEXT_FONT = JFaceResources.getDefaultFont();
-
- private Control control;
-
- private boolean decorationEnabled;
-
- private Label labelControl;
-
- private LayoutHint layoutHint;
-
- private final TaskDataModel manager;
-
- private final TaskAttribute taskAttribute;
-
- private boolean readOnly;
-
- public AbstractAttributeEditor(TaskDataModel manager, TaskAttribute taskAttribute) {
- Assert.isNotNull(manager);
- Assert.isNotNull(taskAttribute);
- this.manager = manager;
- this.taskAttribute = taskAttribute;
- setDecorationEnabled(true);
- setReadOnly(taskAttribute.getMetaData().isReadOnly());
- }
-
- protected void attributeChanged() {
- getModel().attributeChanged(getTaskAttribute());
- }
-
- public abstract void createControl(Composite parent, FormToolkit toolkit);
-
- public void createLabelControl(Composite composite, FormToolkit toolkit) {
- labelControl = toolkit.createLabel(composite, getLabel());
- labelControl.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
- }
-
- public void dispose() {
- }
-
- public TaskDataModel getModel() {
- return manager;
- }
-
- protected TaskAttributeMapper getAttributeMapper() {
- return getModel().getTaskData().getAttributeMapper();
- }
-
- public Control getControl() {
- return control;
- }
-
- public String getLabel() {
- String label = getAttributeMapper().getLabel(getTaskAttribute());
- return (label != null) ? label.replace("&", "&&") : null; // mask & from SWT
- }
-
- public Label getLabelControl() {
- return labelControl;
- }
-
- public LayoutHint getLayoutHint() {
- return layoutHint;
- }
-
- public TaskAttribute getTaskAttribute() {
- return taskAttribute;
- }
-
- public boolean hasLabel() {
- // TODO EDITOR
- return true;
- }
-
- public boolean isDecorationEnabled() {
- return decorationEnabled;
- }
-
- protected void setControl(Control control) {
- this.control = control;
- }
-
- public void setDecorationEnabled(boolean decorationEnabled) {
- this.decorationEnabled = decorationEnabled;
- }
-
- protected void setLayoutHint(LayoutHint layoutHint) {
- this.layoutHint = layoutHint;
- }
-
- public void decorate(Color color) {
- if (isDecorationEnabled()) {
- if (manager.hasBeenRead() && manager.hasIncomingChanges(getTaskAttribute())) {
- decorateIncoming(color);
- }
- if (manager.hasOutgoingChanges(getTaskAttribute())) {
- decorateOutgoing(color);
- }
- }
- }
-
- protected void decorateOutgoing(Color color) {
- if (labelControl != null) {
- labelControl.setText("*" + labelControl.getText());
- }
- }
-
- protected void decorateIncoming(Color color) {
- if (getControl() != null) {
- getControl().setBackground(color);
- }
- }
-
- public boolean isReadOnly() {
- return readOnly;
- }
-
- public void setReadOnly(boolean readOnly) {
- this.readOnly = readOnly;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRenderingEngine.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRenderingEngine.java
deleted file mode 100644
index 581176074..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRenderingEngine.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.ui.editors;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-/**
- * Extend to provide HTML preview for ticket description and comments
- *
- * @author Xiaoyang Guan
- * @since 2.1
- */
-// API 3.0 move to core?
-public abstract class AbstractRenderingEngine {
-
- /**
- * generate HTML preview page for <code>text</code>
- */
- public abstract String renderAsHtml(TaskRepository repository, String text, IProgressMonitor monitor)
- throws CoreException;
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage.java
deleted file mode 100644
index 701a20fda..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage.java
+++ /dev/null
@@ -1,1165 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.ui.editors;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.LinkedHashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.ISafeRunnable;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.ListenerList;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.SafeRunner;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.ControlContribution;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.dialogs.IMessageProvider;
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.text.TextSelection;
-import org.eclipse.jface.util.SafeRunnable;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.window.Window;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.ITaskListChangeListener;
-import org.eclipse.mylyn.internal.tasks.core.TaskContainerDelta;
-import org.eclipse.mylyn.internal.tasks.ui.AttachmentUtil;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.actions.ClearOutgoingAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.NewSubTaskAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.SynchronizeEditorAction;
-import org.eclipse.mylyn.internal.tasks.ui.editors.EditorUtil;
-import org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorActionContributor;
-import org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorActionPart;
-import org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorAttachmentPart;
-import org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorAttributePart;
-import org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorCommentPart;
-import org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorDescriptionPart;
-import org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorNewCommentPart;
-import org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorOutlineNode;
-import org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorOutlinePage;
-import org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorPeoplePart;
-import org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorPlanningPart;
-import org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorRichTextPart;
-import org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorSummaryPart;
-import org.eclipse.mylyn.internal.tasks.ui.editors.TaskListChangeAdapter;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.RepositoryStatus;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.ITask.SynchronizationState;
-import org.eclipse.mylyn.tasks.core.data.ITaskDataWorkingCopy;
-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.TaskDataModel;
-import org.eclipse.mylyn.tasks.core.data.TaskDataModelEvent;
-import org.eclipse.mylyn.tasks.core.data.TaskDataModelListener;
-import org.eclipse.mylyn.tasks.core.sync.SubmitJob;
-import org.eclipse.mylyn.tasks.core.sync.SubmitJobEvent;
-import org.eclipse.mylyn.tasks.core.sync.SubmitJobListener;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CCombo;
-import org.eclipse.swt.custom.CTabFolder;
-import org.eclipse.swt.custom.StyledText;
-import org.eclipse.swt.dnd.DND;
-import org.eclipse.swt.dnd.DropTarget;
-import org.eclipse.swt.dnd.FileTransfer;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.swt.events.FocusAdapter;
-import org.eclipse.swt.events.FocusEvent;
-import org.eclipse.swt.events.FocusListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.layout.RowLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Link;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.Spinner;
-import org.eclipse.swt.widgets.TabFolder;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.FilteredTree;
-import org.eclipse.ui.forms.IFormColors;
-import org.eclipse.ui.forms.IFormPart;
-import org.eclipse.ui.forms.IManagedForm;
-import org.eclipse.ui.forms.editor.FormPage;
-import org.eclipse.ui.forms.events.HyperlinkAdapter;
-import org.eclipse.ui.forms.events.HyperlinkEvent;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-import org.eclipse.ui.forms.widgets.Hyperlink;
-import org.eclipse.ui.forms.widgets.ScrolledForm;
-import org.eclipse.ui.handlers.IHandlerService;
-import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
-
-/**
- * Extend to provide a task editor page.
- *
- * @author Mik Kersten
- * @author Rob Elves
- * @author Steffen Pingel
- * @since 3.0
- */
-public abstract class AbstractTaskEditorPage extends FormPage implements ISelectionProvider, ISelectionChangedListener {
-
- private class SubmitTaskJobListener extends SubmitJobListener {
-
- private final boolean attachContext;
-
- public SubmitTaskJobListener(boolean attachContext) {
- this.attachContext = attachContext;
- }
-
- @Override
- public void done(SubmitJobEvent event) {
- final SubmitJob job = event.getJob();
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
-
- private void openNewTask(ITask newTask) {
- AbstractTaskContainer parent = null;
- AbstractTaskEditorPart actionPart = getPart(ID_PART_ACTIONS);
- if (actionPart instanceof TaskEditorAttributePart) {
- parent = ((TaskEditorActionPart) actionPart).getCategory();
- }
- // TODO copy context and scheduling
- TasksUiInternal.getTaskList().addTask(newTask, parent);
- close();
- TasksUiInternal.getTaskList().deleteTask(getTask());
- TasksUiInternal.openTaskInBackground(newTask, false);
- }
-
- public void run() {
- if (job.getStatus() == null) {
- if (job.getTask().equals(getTask())) {
- refreshFormContent();
- } else {
- openNewTask(job.getTask());
- }
- } else {
- handleSubmitError(job);
- }
-
- showEditorBusy(false);
- }
- });
- }
-
- @Override
- public void taskSubmitted(SubmitJobEvent event, IProgressMonitor monitor) throws CoreException {
- // attach context if required
- if (attachContext) {
- // TODO: review
- TaskAttributeMapper mapper = getModel().getTaskData().getAttributeMapper();
- TaskAttribute attribute = mapper.createTaskAttachment(getModel().getTaskData());
- AttachmentUtil.postContext(connector, getModel().getTaskRepository(), task, "", attribute, monitor);
- }
- }
-
- @Override
- public void taskSynchronized(SubmitJobEvent event, IProgressMonitor monitor) {
- }
-
- }
-
- private class TaskListChangeListener extends TaskListChangeAdapter {
- @Override
- public void containersChanged(Set<TaskContainerDelta> containers) {
- if (refreshDisabled) {
- return;
- }
- ITask taskToRefresh = null;
- for (TaskContainerDelta taskContainerDelta : containers) {
- if (task.equals(taskContainerDelta.getElement())) {
- if (taskContainerDelta.getKind().equals(TaskContainerDelta.Kind.CONTENT)
- && !taskContainerDelta.isTransient()) {
- taskToRefresh = (ITask) taskContainerDelta.getElement();
- break;
- }
- }
- }
- if (taskToRefresh != null) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- if (!isDirty() && task.getSynchronizationState() == SynchronizationState.INCOMING) {
- // automatically refresh if the user has not made any changes
- refreshFormContent();
- } else {
- getTaskEditor().setMessage("Task has incoming changes", IMessageProvider.WARNING,
- new HyperlinkAdapter() {
- @Override
- public void linkActivated(HyperlinkEvent e) {
- refreshFormContent();
- }
- });
- setSubmitEnabled(false);
- }
- }
- });
- }
- }
- }
-
- private static final String ERROR_NOCONNECTIVITY = "Unable to submit at this time. Check connectivity and retry.";
-
- public static final String ID_PART_ACTIONS = "org.eclipse.mylyn.tasks.ui.editors.parts.actions";
-
- public static final String ID_PART_ATTACHMENTS = "org.eclipse.mylyn.tasks.ui.editors.parts.attachments";
-
- public static final String ID_PART_ATTRIBUTES = "org.eclipse.mylyn.tasks.ui.editors.parts.attributes";
-
- public static final String ID_PART_COMMENTS = "org.eclipse.mylyn.tasks.ui.editors.parts.comments";
-
- public static final String ID_PART_DESCRIPTION = "org.eclipse.mylyn.tasks.ui.editors.part.descriptions";
-
- public static final String ID_PART_NEW_COMMENT = "org.eclipse.mylyn.tasks.ui.editors.part.newComment";
-
- public static final String ID_PART_PEOPLE = "org.eclipse.mylyn.tasks.ui.editors.part.people";
-
- public static final String ID_PART_PLANNING = "org.eclipse.mylyn.tasks.ui.editors.part.planning";
-
- public static final String ID_PART_SUMMARY = "org.eclipse.mylyn.tasks.ui.editors.part.summary";
-
- public static final String PATH_ACTIONS = "actions";
-
- public static final String PATH_ATTACHMENTS = "attachments";
-
- public static final String PATH_ATTRIBUTES = "attributes";
-
- public static final String PATH_COMMENTS = "comments";
-
- public static final String PATH_HEADER = "header";
-
- public static final String PATH_PEOPLE = "people";
-
- public static final String PATH_PLANNING = "planning";
-
-// private static final String ID_POPUP_MENU = "org.eclipse.mylyn.tasks.ui.editor.menu.page";
-
- private AttributeEditorFactory attributeEditorFactory;
-
- private AttributeEditorToolkit attributeEditorToolkit;
-
- private Action clearOutgoingAction;
-
- private AbstractRepositoryConnector connector;
-
- private final String connectorKind;
-
- private StructuredSelection defaultSelection;
-
- private Composite editorComposite;
-
- private boolean expandAttributesSection;
-
- private ScrolledForm form;
-
- private boolean formBusy;
-
- private Action historyAction;
-
- protected Control lastFocusControl;
-
- private ISelection lastSelection;
-
- private TaskDataModel model;
-
- private boolean needsAddToCategory;
-
- private NewSubTaskAction newSubTaskAction;
-
- private Action openBrowserAction;
-
- private boolean reflow;
-
- private volatile boolean refreshDisabled;
-
- private final ListenerList selectionChangedListeners;
-
- private SynchronizeEditorAction synchronizeEditorAction;
-
- private ITask task;
-
- private TaskData taskData;
-
- private ITaskListChangeListener taskListChangeListener;
-
- private FormToolkit toolkit;
-
- private TaskEditorOutlinePage outlinePage;
-
- public AbstractTaskEditorPage(TaskEditor editor, String connectorKind) {
- super(editor, "id", "label");
- Assert.isNotNull(connectorKind);
- this.connectorKind = connectorKind;
- this.reflow = true;
- this.selectionChangedListeners = new ListenerList();
- }
-
- private void addFocusListener(Composite composite, FocusListener listener) {
- Control[] children = composite.getChildren();
- for (Control control : children) {
- if ((control instanceof Text) || (control instanceof Button) || (control instanceof Combo)
- || (control instanceof CCombo) || (control instanceof Tree) || (control instanceof Table)
- || (control instanceof Spinner) || (control instanceof Link) || (control instanceof List)
- || (control instanceof TabFolder) || (control instanceof CTabFolder)
- || (control instanceof Hyperlink) || (control instanceof FilteredTree)
- || (control instanceof StyledText)) {
- control.addFocusListener(listener);
- }
- if (control instanceof Composite) {
- addFocusListener((Composite) control, listener);
- }
- }
- }
-
- public void addSelectionChangedListener(ISelectionChangedListener listener) {
- selectionChangedListeners.add(listener);
- }
-
- public void appendTextToNewComment(String text) {
- AbstractTaskEditorPart newCommentPart = getPart(ID_PART_NEW_COMMENT);
- if (newCommentPart instanceof TaskEditorRichTextPart) {
- ((TaskEditorRichTextPart) newCommentPart).appendText(text);
- newCommentPart.setFocus();
- }
- }
-
- public boolean canPerformAction(String actionId) {
- return EditorUtil.canPerformAction(actionId, EditorUtil.getFocusControl(this));
- }
-
- public void close() {
- Display activeDisplay = getSite().getShell().getDisplay();
- activeDisplay.asyncExec(new Runnable() {
- public void run() {
- if (getSite() != null && getSite().getPage() != null && !getManagedForm().getForm().isDisposed()) {
- if (getTaskEditor() != null) {
- getSite().getPage().closeEditor(getTaskEditor(), false);
- } else {
- getSite().getPage().closeEditor(AbstractTaskEditorPage.this, false);
- }
- }
- }
- });
- }
-
- protected AttributeEditorFactory createAttributeEditorFactory() {
- return new AttributeEditorFactory(getModel(), getTaskRepository());
- }
-
- AttributeEditorToolkit createAttributeEditorToolkit() {
- IHandlerService handlerService = (IHandlerService) getSite().getService(IHandlerService.class);
- return new AttributeEditorToolkit(handlerService);
- }
-
- @Override
- protected void createFormContent(final IManagedForm managedForm) {
- form = managedForm.getForm();
- toolkit = managedForm.getToolkit();
- registerDropListener(form);
-
- try {
- setReflow(false);
-
- editorComposite = form.getBody();
- GridLayout editorLayout = new GridLayout();
- editorComposite.setLayout(editorLayout);
- editorComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
-// menuManager = new MenuManager();
-// menuManager.setRemoveAllWhenShown(true);
-// getEditorSite().registerContextMenu(ID_POPUP_MENU, menuManager, this, true);
-// editorComposite.setMenu(menuManager.createContextMenu(editorComposite));
- editorComposite.setMenu(getTaskEditor().getMenu());
-
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(getConnectorKind());
- if (connectorUi == null) {
- getTaskEditor().setMessage("The editor may not be fully loaded", IMessageProvider.INFORMATION,
- new HyperlinkAdapter() {
- @Override
- public void linkActivated(HyperlinkEvent e) {
- refreshFormContent();
- }
- });
- }
-
- if (taskData != null) {
- createFormContentInternal();
- }
- updateHeaderMessage();
- } finally {
- setReflow(true);
- }
- }
-
- private void createFormContentInternal() {
- // end life-cycle of previous editor controls
- if (attributeEditorToolkit != null) {
- attributeEditorToolkit.dispose();
- }
-
- // start life-cycle of previous editor controls
- if (attributeEditorFactory == null) {
- attributeEditorFactory = createAttributeEditorFactory();
- Assert.isNotNull(attributeEditorFactory);
- }
- attributeEditorToolkit = createAttributeEditorToolkit();
- Assert.isNotNull(attributeEditorToolkit);
- attributeEditorToolkit.setMenu(editorComposite.getMenu());
- attributeEditorToolkit.setSelectionChangedListener(this);
-
- createParts();
-
- FocusListener listener = new FocusAdapter() {
- @Override
- public void focusGained(FocusEvent e) {
- lastFocusControl = (Control) e.widget;
- }
- };
- addFocusListener(editorComposite, listener);
- AbstractTaskEditorPart summaryPart = getPart(ID_PART_SUMMARY);
- if (summaryPart != null) {
- lastFocusControl = summaryPart.getControl();
- }
- }
-
- protected TaskDataModel createModel(TaskEditorInput input) throws CoreException {
- ITaskDataWorkingCopy taskDataState = TasksUi.getTaskDataManager().getWorkingCopy(task);
- TaskRepository taskRepository = TasksUi.getRepositoryManager().getRepository(getConnectorKind(),
- taskDataState.getRepositoryUrl());
- return new TaskDataModel(taskRepository, input.getTask(), taskDataState);
- }
-
- protected Set<TaskEditorPartDescriptor> createPartDescriptors() {
- Set<TaskEditorPartDescriptor> descriptors = new LinkedHashSet<TaskEditorPartDescriptor>();
- descriptors.add(new TaskEditorPartDescriptor(ID_PART_SUMMARY) {
- @Override
- public AbstractTaskEditorPart createPart() {
- return new TaskEditorSummaryPart();
- }
- }.setPath(PATH_HEADER));
- descriptors.add(new TaskEditorPartDescriptor(ID_PART_ATTRIBUTES) {
- @Override
- public AbstractTaskEditorPart createPart() {
- return new TaskEditorAttributePart();
- }
- }.setPath(PATH_ATTRIBUTES));
- if (!taskData.isNew()) {
- descriptors.add(new TaskEditorPartDescriptor(ID_PART_ATTACHMENTS) {
- @Override
- public AbstractTaskEditorPart createPart() {
- return new TaskEditorAttachmentPart();
- }
- }.setPath(PATH_ATTACHMENTS));
- }
- descriptors.add(new TaskEditorPartDescriptor(ID_PART_DESCRIPTION) {
- @Override
- public AbstractTaskEditorPart createPart() {
- TaskEditorDescriptionPart part = new TaskEditorDescriptionPart();
- if (getModel().getTaskData().isNew()) {
- part.setExpandVertically(true);
- part.setSectionStyle(ExpandableComposite.TITLE_BAR | ExpandableComposite.EXPANDED);
- }
- return part;
- }
- }.setPath(PATH_COMMENTS));
- if (!taskData.isNew()) {
- descriptors.add(new TaskEditorPartDescriptor(ID_PART_COMMENTS) {
- @Override
- public AbstractTaskEditorPart createPart() {
- return new TaskEditorCommentPart();
- }
- }.setPath(PATH_COMMENTS));
- }
- descriptors.add(new TaskEditorPartDescriptor(ID_PART_NEW_COMMENT) {
- @Override
- public AbstractTaskEditorPart createPart() {
- return new TaskEditorNewCommentPart();
- }
- }.setPath(PATH_COMMENTS));
- if (taskData.isNew()) {
- descriptors.add(new TaskEditorPartDescriptor(ID_PART_PLANNING) {
- @Override
- public AbstractTaskEditorPart createPart() {
- return new TaskEditorPlanningPart();
- }
- }.setPath(PATH_PLANNING));
- }
- descriptors.add(new TaskEditorPartDescriptor(ID_PART_ACTIONS) {
- @Override
- public AbstractTaskEditorPart createPart() {
- return new TaskEditorActionPart();
- }
- }.setPath(PATH_ACTIONS));
- descriptors.add(new TaskEditorPartDescriptor(ID_PART_PEOPLE) {
- @Override
- public AbstractTaskEditorPart createPart() {
- return new TaskEditorPeoplePart();
- }
- }.setPath(PATH_PEOPLE));
- return descriptors;
- }
-
- private void createParts() {
- List<TaskEditorPartDescriptor> descriptors = new LinkedList<TaskEditorPartDescriptor>(createPartDescriptors());
- // single column
- createParts(PATH_HEADER, editorComposite, descriptors);
- createParts(PATH_ATTRIBUTES, editorComposite, descriptors);
- createParts(PATH_ATTACHMENTS, editorComposite, descriptors);
- createParts(PATH_COMMENTS, editorComposite, descriptors);
- createParts(PATH_PLANNING, editorComposite, descriptors);
- // two column
- Composite bottomComposite = toolkit.createComposite(editorComposite);
- bottomComposite.setLayout(new GridLayout(2, false));
- GridDataFactory.fillDefaults().grab(true, false).applyTo(bottomComposite);
- createParts(PATH_ACTIONS, bottomComposite, descriptors);
- createParts(PATH_PEOPLE, bottomComposite, descriptors);
- bottomComposite.pack(true);
- }
-
- private void createParts(String path, final Composite parent, Collection<TaskEditorPartDescriptor> descriptors) {
- for (Iterator<TaskEditorPartDescriptor> it = descriptors.iterator(); it.hasNext();) {
- final TaskEditorPartDescriptor descriptor = it.next();
- if (path == null || path.equals(descriptor.getPath())) {
- SafeRunner.run(new ISafeRunnable() {
- public void handleException(Throwable e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Error creating task editor part: \"" + descriptor.getId() + "\"", e));
- }
-
- public void run() throws Exception {
- AbstractTaskEditorPart part = descriptor.createPart();
- part.setPartId(descriptor.getId());
- initializePart(parent, part);
- }
- });
- it.remove();
- }
- }
- }
-
- @Override
- public void dispose() {
- if (attributeEditorToolkit != null) {
- attributeEditorToolkit.dispose();
- }
- TasksUiInternal.getTaskList().removeChangeListener(taskListChangeListener);
- super.dispose();
- }
-
- public void doAction(String actionId) {
- EditorUtil.doAction(actionId, EditorUtil.getFocusControl(this));
- }
-
- @Override
- public void doSave(IProgressMonitor monitor) {
- if (!isDirty()) {
- return;
- }
-
- getManagedForm().commit(true);
-
- try {
- model.save(monitor);
- } catch (final CoreException e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Error saving task", e));
- getTaskEditor().setMessage("Could not save task", IMessageProvider.ERROR, new HyperlinkAdapter() {
- @Override
- public void linkActivated(HyperlinkEvent event) {
- TasksUiInternal.displayStatus("Save failed", e.getStatus());
- }
- });
- }
-
- updateHeaderMessage();
- getManagedForm().dirtyStateChanged();
- getTaskEditor().updateHeaderToolBar();
- }
-
- @Override
- public void doSaveAs() {
- throw new UnsupportedOperationException();
- }
-
- public void doSubmit() {
- showEditorBusy(true);
-
- doSave(new NullProgressMonitor());
-
- SubmitJob submitJob = TasksUiInternal.getJobFactory().createSubmitTaskJob(connector,
- getModel().getTaskRepository(), task, getModel().getTaskData(), getModel().getChangedOldAttributes());
- submitJob.addSubmitJobListener(new SubmitTaskJobListener(getAttachContext()));
- submitJob.schedule();
- }
-
- /**
- * Override for customizing the tool bar.
- */
- public void fillToolBar(IToolBarManager toolBarManager) {
- final TaskRepository taskRepository = (model != null) ? getModel().getTaskRepository() : null;
- if (taskRepository != null) {
- ControlContribution repositoryLabelControl = new ControlContribution("Title") {
- @Override
- protected Control createControl(Composite parent) {
- FormToolkit toolkit = getTaskEditor().getHeaderForm().getToolkit();
- Composite composite = toolkit.createComposite(parent);
- composite.setLayout(new RowLayout());
- composite.setBackground(null);
- String label = taskRepository.getRepositoryLabel();
- if (label.indexOf("//") != -1) {
- label = label.substring((taskRepository.getRepositoryUrl().indexOf("//") + 2));
- }
-
- Hyperlink link = new Hyperlink(composite, SWT.NONE);
- link.setText(label);
- link.setFont(JFaceResources.getBannerFont());
- link.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
- link.addHyperlinkListener(new HyperlinkAdapter() {
-
- @Override
- public void linkActivated(HyperlinkEvent e) {
- TasksUiUtil.openEditRepositoryWizard(taskRepository);
- }
- });
-
- return composite;
- }
- };
- toolBarManager.add(repositoryLabelControl);
- }
-
- if (taskRepository != null && !taskData.isNew()) {
- synchronizeEditorAction = new SynchronizeEditorAction();
- synchronizeEditorAction.selectionChanged(new StructuredSelection(getTaskEditor()));
- toolBarManager.add(synchronizeEditorAction);
-
- clearOutgoingAction = new ClearOutgoingAction(Collections.singletonList((IRepositoryElement) task));
- if (clearOutgoingAction.isEnabled()) {
- toolBarManager.add(clearOutgoingAction);
- }
-
- newSubTaskAction = new NewSubTaskAction();
- newSubTaskAction.selectionChanged(newSubTaskAction, new StructuredSelection(task));
- if (newSubTaskAction.isEnabled()) {
- toolBarManager.add(newSubTaskAction);
- }
-
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(taskData.getConnectorKind());
- if (connectorUi != null) {
- final String historyUrl = connectorUi.getTaskHistoryUrl(taskRepository, task);
- if (historyUrl != null) {
- historyAction = new Action() {
- @Override
- public void run() {
- TasksUiUtil.openUrl(historyUrl);
- }
- };
-
- historyAction.setImageDescriptor(TasksUiImages.TASK_REPOSITORY_HISTORY);
- historyAction.setToolTipText("History");
- toolBarManager.add(historyAction);
- }
- }
-
- final String taskUrlToOpen = task.getUrl();
- if (taskUrlToOpen != null) {
- openBrowserAction = new Action() {
- @Override
- public void run() {
- TasksUiUtil.openUrl(taskUrlToOpen);
- }
- };
-
- openBrowserAction.setImageDescriptor(CommonImages.BROWSER_OPEN_TASK);
- openBrowserAction.setToolTipText("Open with Web Browser");
- toolBarManager.add(openBrowserAction);
- }
- }
- }
-
- protected void fireSelectionChanged(ISelection selection) {
- // create an event
- final SelectionChangedEvent event = new SelectionChangedEvent(this, selection);
-
- // fire the event
- Object[] listeners = selectionChangedListeners.getListeners();
- for (int i = 0; i < listeners.length; ++i) {
- final ISelectionChangedListener l = (ISelectionChangedListener) listeners[i];
- SafeRunner.run(new SafeRunnable() {
- public void run() {
- l.selectionChanged(event);
- }
- });
- }
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public Object getAdapter(Class adapter) {
- if (adapter == IContentOutlinePage.class) {
- updateOutlinePage();
- return outlinePage;
- }
- return super.getAdapter(adapter);
- }
-
- private void updateOutlinePage() {
- if (outlinePage == null) {
- outlinePage = new TaskEditorOutlinePage();
- outlinePage.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- ISelection selection = event.getSelection();
- if (selection instanceof StructuredSelection) {
- Object select = ((StructuredSelection) selection).getFirstElement();
- if (select instanceof TaskEditorOutlineNode) {
- TaskEditorOutlineNode node = (TaskEditorOutlineNode) select;
- if (node.getData() != null) {
- EditorUtil.reveal(form, node.getData().getId());
- } else {
- EditorUtil.reveal(form, node.getLabel());
- }
- }
- }
- }
- });
- }
- if (getModel() != null) {
- TaskEditorOutlineNode node = TaskEditorOutlineNode.parse(getModel().getTaskData());
- outlinePage.setInput(getTaskRepository(), node);
- } else {
- outlinePage.setInput(null, null);
- }
- }
-
- private boolean getAttachContext() {
- AbstractTaskEditorPart actionPart = getPart(ID_PART_ACTIONS);
- if (actionPart instanceof TaskEditorAttributePart) {
- return ((TaskEditorActionPart) actionPart).getAttachContext();
- }
- return false;
- }
-
- public AttributeEditorFactory getAttributeEditorFactory() {
- return attributeEditorFactory;
- }
-
- public AttributeEditorToolkit getAttributeEditorToolkit() {
- return attributeEditorToolkit;
- }
-
- public AbstractRepositoryConnector getConnector() {
- return connector;
- }
-
- public String getConnectorKind() {
- return connectorKind;
- }
-
- /**
- * @return The composite for the whole editor.
- */
- public Composite getEditorComposite() {
- return editorComposite;
- }
-
- public TaskDataModel getModel() {
- return model;
- }
-
- public AbstractTaskEditorPart getPart(String partId) {
- Assert.isNotNull(partId);
- for (IFormPart part : getManagedForm().getParts()) {
- if (part instanceof AbstractTaskEditorPart) {
- AbstractTaskEditorPart taskEditorPart = (AbstractTaskEditorPart) part;
- if (partId.equals(taskEditorPart.getPartId())) {
- return taskEditorPart;
- }
- }
- }
- return null;
- }
-
- public ISelection getSelection() {
- return lastSelection;
- }
-
- public ITask getTask() {
- return task;
- }
-
- public TaskEditor getTaskEditor() {
- return (TaskEditor) getEditor();
- }
-
- public TaskRepository getTaskRepository() {
- return getModel().getTaskRepository();
- }
-
- private void handleSubmitError(SubmitJob job) {
- if (form != null && !form.isDisposed()) {
- final IStatus status = job.getStatus();
- if (status.getCode() == RepositoryStatus.REPOSITORY_COMMENT_REQUIRED) {
- TasksUiInternal.displayStatus("Comment required", status);
- AbstractTaskEditorPart newCommentPart = getPart(ID_PART_NEW_COMMENT);
- if (newCommentPart != null) {
- newCommentPart.setFocus();
- }
- } else if (status.getCode() == RepositoryStatus.ERROR_REPOSITORY_LOGIN) {
- if (TasksUiUtil.openEditRepositoryWizard(getTaskRepository()) == Window.OK) {
- doSubmit();
- }
- } else {
- String message;
- if (status.getCode() == RepositoryStatus.ERROR_IO) {
- message = ERROR_NOCONNECTIVITY;
- } else if (status.getMessage().length() > 0) {
- message = "Submit failed: " + status.getMessage();
- } else {
- message = "Submit failed";
- }
- getTaskEditor().setMessage(message, IMessageProvider.ERROR, new HyperlinkAdapter() {
- @Override
- public void linkActivated(HyperlinkEvent e) {
- TasksUiInternal.displayStatus("Submit failed", status);
- }
- });
- }
- }
- }
-
- @Override
- public void init(IEditorSite site, IEditorInput input) {
- super.init(site, input);
-
- site.setSelectionProvider(this);
-
- TaskEditorInput taskEditorInput = (TaskEditorInput) input;
- this.task = taskEditorInput.getTask();
- this.defaultSelection = new StructuredSelection(task);
- this.lastSelection = defaultSelection;
- try {
- setModel(createModel(taskEditorInput));
- } catch (final CoreException e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Error opening task", e));
- getTaskEditor().setStatus("Error opening task", "Open failed", e.getStatus());
- }
-
- taskListChangeListener = new TaskListChangeListener();
- TasksUiInternal.getTaskList().addChangeListener(taskListChangeListener);
- }
-
- private void initializePart(Composite parent, AbstractTaskEditorPart part) {
- getManagedForm().addPart(part);
- part.initialize(this);
- part.createControl(parent, toolkit);
- if (part.getControl() != null) {
- if (part.getExpandVertically()) {
- GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL).grab(true, true).applyTo(part.getControl());
- } else {
- GridDataFactory.fillDefaults().align(SWT.FILL, SWT.TOP).grab(true, false).applyTo(part.getControl());
- }
- // for outline
- if (ID_PART_COMMENTS.equals(part.getPartId())) {
- EditorUtil.setMarker(part.getControl(), TaskEditorOutlineNode.LABEL_COMMENTS);
- }
- }
- }
-
- @Override
- public boolean isDirty() {
- return (getModel() != null && getModel().isDirty()) || (getManagedForm() != null && getManagedForm().isDirty());
- }
-
- public boolean isExpandAttributesSection() {
- return expandAttributesSection;
- }
-
- @Override
- public boolean isSaveAsAllowed() {
- return false;
- }
-
- public boolean needsAddToCategory() {
- return needsAddToCategory;
- }
-
- /**
- * Force a re-layout of entire form.
- */
- public void reflow() {
- if (reflow) {
- form.layout(true, true);
- form.reflow(true);
- }
- }
-
- /**
- * Updates the editor contents in place.
- */
- public void refreshFormContent() {
- if (getManagedForm().getForm().isDisposed()) {
- // editor possibly closed as part of submit
- return;
- }
-
- try {
- showEditorBusy(true);
-
- doSave(new NullProgressMonitor());
- refreshInput();
-
- if (taskData != null) {
- try {
- setReflow(false);
- // save menu
- Menu menu = editorComposite.getMenu();
- setMenu(editorComposite, null);
-
- // clear old controls
- for (Control control : editorComposite.getChildren()) {
- control.dispose();
- }
- lastFocusControl = null;
- lastSelection = null;
-
- // restore menu
- editorComposite.setMenu(menu);
-
- createFormContentInternal();
-
- getTaskEditor().setMessage(null, 0);
- getTaskEditor().setActivePage(getId());
-
- setSubmitEnabled(true);
- } finally {
- setReflow(true);
- }
- }
-
- updateOutlinePage();
- updateHeaderMessage();
- getManagedForm().dirtyStateChanged();
- getTaskEditor().updateHeaderToolBar();
- } finally {
- showEditorBusy(false);
- }
- reflow();
- }
-
- private void refreshInput() {
- try {
- refreshDisabled = true;
- model.refresh(null);
- } catch (CoreException e) {
- getTaskEditor().setMessage("Failed to read task data: " + e.getMessage(), IMessageProvider.ERROR);
- taskData = null;
- return;
- } finally {
- refreshDisabled = false;
- }
-
- setTaskData(model.getTaskData());
- }
-
- private void registerDropListener(final Control control) {
- DropTarget target = new DropTarget(control, DND.DROP_COPY | DND.DROP_DEFAULT);
- final TextTransfer textTransfer = TextTransfer.getInstance();
- final FileTransfer fileTransfer = FileTransfer.getInstance();
- Transfer[] types = new Transfer[] { textTransfer, fileTransfer };
- target.setTransfer(types);
-
- // Adapted from eclipse.org DND Article by Veronika Irvine, IBM OTI Labs
- // http://www.eclipse.org/articles/Article-SWT-DND/DND-in-SWT.html#_dt10D
- // TODO EDITOR
- //target.addDropListener(new RepositoryTaskEditorDropListener(this, fileTransfer, textTransfer, control));
- }
-
- public void removeSelectionChangedListener(ISelectionChangedListener listener) {
- selectionChangedListeners.remove(listener);
- }
-
- public void selectionChanged(Object element) {
- selectionChanged(new SelectionChangedEvent(this, new StructuredSelection(element)));
- }
-
- public void selectionChanged(SelectionChangedEvent event) {
- ISelection selection = event.getSelection();
- if (selection instanceof TextSelection) {
- // only update global actions
- ((TaskEditorActionContributor) getEditorSite().getActionBarContributor()).updateSelectableActions(event.getSelection());
- return;
- }
- if (selection.isEmpty()) {
- // something was unselected, reset to default selection
- selection = defaultSelection;
- }
- if (!selection.equals(lastSelection)) {
- this.lastSelection = selection;
- fireSelectionChanged(lastSelection);
- }
- }
-
- public void setExpandAttributeSection(boolean expandAttributeSection) {
- this.expandAttributesSection = expandAttributeSection;
- }
-
- @Override
- public void setFocus() {
- if (lastFocusControl != null && !lastFocusControl.isDisposed()) {
- lastFocusControl.setFocus();
- }
- }
-
- /**
- * Used to prevent form menu from being disposed when disposing elements on the form during refresh
- */
- private void setMenu(Composite comp, Menu menu) {
- if (!comp.isDisposed()) {
- comp.setMenu(null);
- for (Control child : comp.getChildren()) {
- child.setMenu(null);
- if (child instanceof Composite) {
- setMenu((Composite) child, menu);
- }
- }
- }
- }
-
- private void setModel(TaskDataModel model) {
- Assert.isNotNull(model);
- this.model = model;
- this.connector = TasksUi.getRepositoryManager().getRepositoryConnector(getConnectorKind());
- setTaskData(model.getTaskData());
- model.addModelListener(new TaskDataModelListener() {
- @Override
- public void attributeChanged(TaskDataModelEvent event) {
- getManagedForm().dirtyStateChanged();
- }
- });
- }
-
- public void setNeedsAddToCategory(boolean needsAddToCategory) {
- this.needsAddToCategory = needsAddToCategory;
- }
-
- public void setReflow(boolean reflow) {
- this.reflow = reflow;
- form.setRedraw(reflow);
- }
-
- public void setSelection(ISelection selection) {
- IFormPart[] parts = getManagedForm().getParts();
- for (IFormPart formPart : parts) {
- if (formPart instanceof AbstractTaskEditorPart) {
- if (((AbstractTaskEditorPart) formPart).setSelection(selection)) {
- lastSelection = selection;
- return;
- }
- }
- }
- }
-
- // TODO EDITOR this needs to be tracked somewhere else
- private void setSubmitEnabled(boolean enabled) {
- AbstractTaskEditorPart actionPart = getPart(ID_PART_ACTIONS);
- if (actionPart instanceof TaskEditorAttributePart) {
- ((TaskEditorActionPart) actionPart).setSubmitEnabled(enabled);
- }
- }
-
- private void setTaskData(TaskData taskData) {
- this.taskData = taskData;
- }
-
- @Override
- public void showBusy(boolean busy) {
- if (!getManagedForm().getForm().isDisposed() && busy != formBusy) {
- // parentEditor.showBusy(busy);
-// if (synchronizeEditorAction != null) {
-// synchronizeEditorAction.setEnabled(!busy);
-// }
-//
-// if (openBrowserAction != null) {
-// openBrowserAction.setEnabled(!busy);
-// }
-//
-// if (historyAction != null) {
-// historyAction.setEnabled(!busy);
-// }
-//
-// if (actionPart != null) {
-// actionPart.setSubmitEnabled(!busy);
-// }
-//
-// if (newSubTaskAction != null) {
-// newSubTaskAction.setEnabled(!busy);
-// }
-//
-// if (clearOutgoingAction != null) {
-// clearOutgoingAction.setEnabled(!busy);
-// }
-
- EditorUtil.setEnabledState(editorComposite, !busy);
-
- formBusy = busy;
- }
- }
-
- public void showEditorBusy(boolean busy) {
- getTaskEditor().showBusy(busy);
- refreshDisabled = busy;
- }
-
- private void updateHeaderMessage() {
- if (taskData == null) {
- getTaskEditor().setMessage(
- "Task data not available. Press synchronize button (right) to retrieve latest data.",
- IMessageProvider.WARNING, new HyperlinkAdapter() {
- @Override
- public void linkActivated(HyperlinkEvent e) {
- if (synchronizeEditorAction != null) {
- synchronizeEditorAction.run();
- }
- }
- });
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPageFactory.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPageFactory.java
deleted file mode 100644
index d4faf347b..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPageFactory.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.ui.editors;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.forms.editor.FormPage;
-
-/**
- * @since 3.0
- * @author Steffen Pingel
- */
-public abstract class AbstractTaskEditorPageFactory {
-
- public static final int PRIORITY_ADDITIONS = 100;
-
- public static final int PRIORITY_CONTEXT = 20;
-
- public static final int PRIORITY_PLANNING = 10;
-
- public static final int PRIORITY_TASK = 30;
-
- private String id;
-
- public abstract boolean canCreatePageFor(TaskEditorInput input);
-
- public abstract FormPage createPage(TaskEditor parentEditor);
-
- public String[] getConflictingIds(TaskEditorInput input) {
- return null;
- }
-
- public String getId() {
- return id;
- }
-
- // TODO EDITOR life cycle of image?
- public abstract Image getPageImage();
-
- public abstract String getPageText();
-
- public int getPriority() {
- return PRIORITY_ADDITIONS;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPart.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPart.java
deleted file mode 100644
index e4e9037f6..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPart.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.ui.editors;
-
-import org.eclipse.jface.action.ToolBarManager;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.mylyn.internal.tasks.ui.editors.RichTextAttributeEditor;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.mylyn.tasks.core.data.TaskData;
-import org.eclipse.mylyn.tasks.core.data.TaskDataModel;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.layout.RowLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.forms.AbstractFormPart;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-import org.eclipse.ui.forms.widgets.Section;
-
-/**
- * @author Steffen Pingel
- * @since 3.0
- */
-public abstract class AbstractTaskEditorPart extends AbstractFormPart {
-
- // the default font of some controls, e.g. radio buttons, is too big; set this font explicitly on the control
- protected static final Font TEXT_FONT = JFaceResources.getDefaultFont();
-
- private Control control;
-
- private String partName;
-
- private String partId;
-
- private AbstractTaskEditorPage taskEditorPage;
-
- private boolean expandVertically;
-
- public AbstractTaskEditorPart() {
- }
-
- protected AbstractAttributeEditor createAttributeEditor(TaskAttribute attribute) {
- if (attribute == null) {
- return null;
- }
-
- String type = attribute.getMetaData().getType();
- if (type != null) {
- AttributeEditorFactory attributeEditorFactory = getTaskEditorPage().getAttributeEditorFactory();
- AbstractAttributeEditor editor = attributeEditorFactory.createEditor(type, attribute);
- if (editor instanceof RichTextAttributeEditor) {
- boolean spellChecking = getTaskEditorPage().getAttributeEditorToolkit().hasSpellChecking(attribute);
- ((RichTextAttributeEditor) editor).setSpellCheckingEnabled(spellChecking);
- }
- return editor;
- }
- return null;
- }
-
- public abstract void createControl(Composite parent, FormToolkit toolkit);
-
- protected Section createSection(Composite parent, FormToolkit toolkit, int style) {
- Section section = toolkit.createSection(parent, style);
- section.setText(getPartName());
- return section;
- }
-
- protected Section createSection(Composite parent, FormToolkit toolkit, boolean expandedState) {
- int style = ExpandableComposite.TITLE_BAR | ExpandableComposite.TWISTIE;
- if (expandedState) {
- style |= ExpandableComposite.EXPANDED;
- }
- return createSection(parent, toolkit, style);
- }
-
- protected void fillToolBar(ToolBarManager toolBarManager) {
- }
-
- public Control getControl() {
- return control;
- }
-
- public TaskDataModel getModel() {
- return getTaskEditorPage().getModel();
- }
-
- public String getPartId() {
- return partId;
- }
-
- public String getPartName() {
- return partName;
- }
-
- public TaskData getTaskData() {
- return getTaskEditorPage().getModel().getTaskData();
- }
-
- public AbstractTaskEditorPage getTaskEditorPage() {
- return taskEditorPage;
- }
-
- public void initialize(AbstractTaskEditorPage taskEditorPage) {
- this.taskEditorPage = taskEditorPage;
- }
-
- public void setControl(Control control) {
- this.control = control;
- }
-
- void setPartId(String partId) {
- this.partId = partId;
- }
-
- protected void setPartName(String partName) {
- this.partName = partName;
- }
-
- protected void setSection(FormToolkit toolkit, Section section) {
- if (section.getTextClient() == null) {
- ToolBarManager toolBarManager = new ToolBarManager(SWT.FLAT);
- fillToolBar(toolBarManager);
-
- // TODO toolBarManager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
-
- if (toolBarManager.getSize() > 0) {
- Composite toolbarComposite = toolkit.createComposite(section);
- toolbarComposite.setBackground(null);
- RowLayout rowLayout = new RowLayout();
- rowLayout.marginTop = 0;
- rowLayout.marginBottom = 0;
- toolbarComposite.setLayout(rowLayout);
-
- toolBarManager.createControl(toolbarComposite);
- section.setTextClient(toolbarComposite);
- }
- }
- setControl(section);
- }
-
- protected boolean setSelection(ISelection selection) {
- return false;
- }
-
- public boolean getExpandVertically() {
- return expandVertically;
- }
-
- public void setExpandVertically(boolean expandVertically) {
- this.expandVertically = expandVertically;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AttributeEditorFactory.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AttributeEditorFactory.java
deleted file mode 100644
index 9ce683fbd..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AttributeEditorFactory.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.ui.editors;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.mylyn.internal.tasks.ui.editors.BooleanAttributeEditor;
-import org.eclipse.mylyn.internal.tasks.ui.editors.DateAttributeEditor;
-import org.eclipse.mylyn.internal.tasks.ui.editors.LongTextAttributeEditor;
-import org.eclipse.mylyn.internal.tasks.ui.editors.MultiSelectionAttributeEditor;
-import org.eclipse.mylyn.internal.tasks.ui.editors.PersonAttributeEditor;
-import org.eclipse.mylyn.internal.tasks.ui.editors.RichTextAttributeEditor;
-import org.eclipse.mylyn.internal.tasks.ui.editors.SingleSelectionAttributeEditor;
-import org.eclipse.mylyn.internal.tasks.ui.editors.TextAttributeEditor;
-import org.eclipse.mylyn.internal.tasks.ui.editors.RepositoryTextViewerConfiguration.Mode;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.mylyn.tasks.core.data.TaskDataModel;
-import org.eclipse.swt.SWT;
-
-/**
- * @since 3.0
- * @author Steffen Pingel
- */
-public class AttributeEditorFactory {
-
- private final TaskDataModel model;
-
- private final TaskRepository taskRepository;
-
- public AttributeEditorFactory(TaskDataModel model, TaskRepository taskRepository) {
- this.model = model;
- this.taskRepository = taskRepository;
- }
-
- public AbstractAttributeEditor createEditor(String type, TaskAttribute taskAttribute) {
- Assert.isNotNull(type);
-
- if (TaskAttribute.TYPE_BOOLEAN.equals(type)) {
- return new BooleanAttributeEditor(model, taskAttribute);
- } else if (TaskAttribute.TYPE_DATE.equals(type)) {
- return new DateAttributeEditor(model, taskAttribute);
- } else if (TaskAttribute.TYPE_PERSON.equals(type)) {
- return new PersonAttributeEditor(model, taskAttribute);
- } else if (TaskAttribute.TYPE_LONG_RICH_TEXT.equals(type)) {
- return new RichTextAttributeEditor(model, taskRepository, taskAttribute);
- } else if (TaskAttribute.TYPE_LONG_TEXT.equals(type)) {
- return new LongTextAttributeEditor(model, taskAttribute);
- } else if (TaskAttribute.TYPE_MULTI_SELECT.equals(type)) {
- return new MultiSelectionAttributeEditor(model, taskAttribute);
- } else if (TaskAttribute.TYPE_SHORT_RICH_TEXT.equals(type)) {
- return new RichTextAttributeEditor(model, taskRepository, taskAttribute, SWT.SINGLE);
- } else if (TaskAttribute.TYPE_SHORT_TEXT.equals(type)) {
- return new TextAttributeEditor(model, taskAttribute);
- } else if (TaskAttribute.TYPE_SINGLE_SELECT.equals(type)) {
- return new SingleSelectionAttributeEditor(model, taskAttribute);
- } else if (TaskAttribute.TYPE_TASK_DEPENDENCY.equals(type)) {
- RichTextAttributeEditor editor = new RichTextAttributeEditor(model, taskRepository, taskAttribute,
- SWT.SINGLE);
- editor.setMode(Mode.TASK_RELATION);
- return editor;
- } else if (TaskAttribute.TYPE_URL.equals(type)) {
- RichTextAttributeEditor editor = new RichTextAttributeEditor(model, taskRepository, taskAttribute,
- SWT.SINGLE);
- editor.setMode(Mode.URL);
- return editor;
- }
-
- throw new IllegalArgumentException("Unsupported editor type: \"" + type + "\"");
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AttributeEditorToolkit.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AttributeEditorToolkit.java
deleted file mode 100644
index 89fbe1562..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AttributeEditorToolkit.java
+++ /dev/null
@@ -1,297 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.tasks.ui.editors;
-
-import org.eclipse.core.commands.IHandler;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.commands.ActionHandler;
-import org.eclipse.jface.fieldassist.ContentProposalAdapter;
-import org.eclipse.jface.fieldassist.ControlDecoration;
-import org.eclipse.jface.fieldassist.FieldDecoration;
-import org.eclipse.jface.fieldassist.FieldDecorationRegistry;
-import org.eclipse.jface.fieldassist.IContentProposalProvider;
-import org.eclipse.jface.fieldassist.TextContentAdapter;
-import org.eclipse.jface.text.ITextListener;
-import org.eclipse.jface.text.TextEvent;
-import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.jface.text.source.SourceViewer;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonThemes;
-import org.eclipse.mylyn.internal.tasks.ui.PersonProposalLabelProvider;
-import org.eclipse.mylyn.internal.tasks.ui.PersonProposalProvider;
-import org.eclipse.mylyn.internal.tasks.ui.editors.EditorUtil;
-import org.eclipse.mylyn.internal.tasks.ui.editors.RichTextAttributeEditor;
-import org.eclipse.mylyn.internal.tasks.ui.editors.RepositoryTextViewerConfiguration.Mode;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.StyledText;
-import org.eclipse.swt.events.FocusEvent;
-import org.eclipse.swt.events.FocusListener;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.ActiveShellExpression;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.fieldassist.ContentAssistCommandAdapter;
-import org.eclipse.ui.handlers.IHandlerActivation;
-import org.eclipse.ui.handlers.IHandlerService;
-import org.eclipse.ui.keys.IBindingService;
-import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
-import org.eclipse.ui.themes.IThemeManager;
-
-/**
- * @author Steffen Pingel
- * @since 3.0
- */
-// TODO EDITOR rename to AttributeUiToolkit?
-public class AttributeEditorToolkit {
-
- private class StyledTextFocusListener implements FocusListener {
-
- private final boolean spellCheck;
-
- private final SourceViewer viewer;
-
- public StyledTextFocusListener(SourceViewer viewer, boolean spellCheck) {
- this.viewer = viewer;
- this.spellCheck = spellCheck;
- }
-
- public void focusGained(FocusEvent e) {
- if (selectionChangedListener != null) {
- selectionChangedListener.selectionChanged(new SelectionChangedEvent(viewer, viewer.getSelection()));
- }
- activateHandlers(viewer, spellCheck);
- }
-
- public void focusLost(FocusEvent e) {
- deactivateHandlers();
- if (selectionChangedListener != null) {
- // make sure selection no text is selected when control looses focus
- StyledText st = (StyledText) e.widget;
- st.setSelectionRange(st.getCaretOffset(), 0);
- // update action enablement
- selectionChangedListener.selectionChanged(new SelectionChangedEvent(viewer, StructuredSelection.EMPTY));
- }
- }
-
- }
-
- private final Color colorIncoming;
-
- public IHandlerActivation contentAssistHandlerActivation;
-
- private final IHandlerService handlerService;
-
- private Menu menu;
-
- private IHandlerActivation quickAssistHandlerActivation;
-
- private ISelectionChangedListener selectionChangedListener;
-
- AttributeEditorToolkit(IHandlerService handlerService) {
- this.handlerService = handlerService;
- IThemeManager themeManager = PlatformUI.getWorkbench().getThemeManager();
- colorIncoming = themeManager.getCurrentTheme().getColorRegistry().get(CommonThemes.COLOR_INCOMING_BACKGROUND);
- }
-
- private IHandlerActivation activateHandler(SourceViewer viewer, int operation, String actionDefinitionId) {
- IHandler handler = createActionHandler(viewer, operation, actionDefinitionId);
- return handlerService.activateHandler(actionDefinitionId, handler, //
- new ActiveShellExpression(viewer.getTextWidget().getShell()));
- }
-
- private void activateHandlers(SourceViewer viewer, boolean spellCheck) {
- deactivateHandlers();
- if (spellCheck) {
- quickAssistHandlerActivation = activateHandler(viewer, ISourceViewer.QUICK_ASSIST,
- ITextEditorActionDefinitionIds.QUICK_ASSIST);
- }
- contentAssistHandlerActivation = activateHandler(viewer, ISourceViewer.CONTENTASSIST_PROPOSALS,
- ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
-
- }
-
- public void adapt(AbstractAttributeEditor editor) {
- if (editor.getControl() instanceof Text && hasContentAssist(editor.getTaskAttribute())) {
- Text text = (Text) editor.getControl();
-
- IContentProposalProvider contentProposalProvider = createContentProposalProvider(editor.getTaskAttribute());
- ILabelProvider labelPropsalProvider = createLabelProposalProvider(editor.getTaskAttribute());
-
- if (contentProposalProvider != null && labelPropsalProvider != null) {
- ContentAssistCommandAdapter adapter = applyContentAssist(text, contentProposalProvider);
- adapter.setLabelProvider(labelPropsalProvider);
- adapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
- }
- } else if (editor instanceof RichTextAttributeEditor) {
- RichTextAttributeEditor richTextEditor = (RichTextAttributeEditor) editor;
- boolean spellCheck = hasSpellChecking(editor.getTaskAttribute());
- final SourceViewer viewer = richTextEditor.getViewer();
- viewer.getControl().addFocusListener(new StyledTextFocusListener(viewer, spellCheck));
- if (selectionChangedListener != null) {
- viewer.addSelectionChangedListener(selectionChangedListener);
- viewer.addTextListener(new ITextListener() {
- public void textChanged(TextEvent event) {
- if (selectionChangedListener != null) {
- selectionChangedListener.selectionChanged(new SelectionChangedEvent(viewer,
- viewer.getSelection()));
- }
- }
- });
- }
- if (richTextEditor.getMode() == Mode.TASK_RELATION) {
- applyContentAssist(viewer.getControl(), null);
- }
- if (menu != null) {
- viewer.getControl().setMenu(menu);
- }
- EditorUtil.setTextViewer(editor.getControl(), viewer);
- }
-
- // for outline
- EditorUtil.setMarker(editor.getControl(), editor.getTaskAttribute().getId());
-
- editor.decorate(getColorIncoming());
- }
-
- /**
- * Adds content assist to the given text field.
- *
- * @param text
- * text field to decorate.
- * @param proposalProvider
- * instance providing content proposals
- * @return the ContentAssistCommandAdapter for the field.
- */
- private ContentAssistCommandAdapter applyContentAssist(Control control, IContentProposalProvider proposalProvider) {
- ControlDecoration controlDecoration = new ControlDecoration(control, (SWT.TOP | SWT.LEFT));
- controlDecoration.setMarginWidth(0);
- controlDecoration.setShowHover(true);
- controlDecoration.setShowOnlyOnFocus(true);
- FieldDecoration contentProposalImage = FieldDecorationRegistry.getDefault().getFieldDecoration(
- FieldDecorationRegistry.DEC_CONTENT_PROPOSAL);
- controlDecoration.setImage(contentProposalImage.getImage());
- IBindingService bindingService = (IBindingService) PlatformUI.getWorkbench().getService(IBindingService.class);
- controlDecoration.setDescriptionText(NLS.bind("Content Assist Available ({0})",
- bindingService.getBestActiveBindingFormattedFor(ContentAssistCommandAdapter.CONTENT_PROPOSAL_COMMAND)));
-
- if (proposalProvider != null) {
- TextContentAdapter textContentAdapter = new TextContentAdapter();
- ContentAssistCommandAdapter adapter = new ContentAssistCommandAdapter(control, textContentAdapter,
- proposalProvider, ContentAssistCommandAdapter.CONTENT_PROPOSAL_COMMAND, new char[0]);
- return adapter;
- }
- return null;
- }
-
- private IHandler createActionHandler(final SourceViewer viewer, final int operation, String actionDefinitionId) {
- Action quickFixAction = new Action() {
- @Override
- public void run() {
- if (viewer.canDoOperation(operation)) {
- viewer.doOperation(operation);
- }
- }
- };
- quickFixAction.setActionDefinitionId(actionDefinitionId);
- return new ActionHandler(quickFixAction);
- }
-
- /**
- * Creates an IContentProposalProvider to provide content assist proposals for the given attribute.
- *
- * @param attribute
- * attribute for which to provide content assist.
- * @return the IContentProposalProvider.
- */
- private IContentProposalProvider createContentProposalProvider(TaskAttribute attribute) {
- return new PersonProposalProvider(null, attribute.getTaskData());
- }
-
- private ILabelProvider createLabelProposalProvider(TaskAttribute attribute) {
- return new PersonProposalLabelProvider();
- }
-
- private void deactivateHandlers() {
- if (quickAssistHandlerActivation != null) {
- handlerService.deactivateHandler(quickAssistHandlerActivation);
- quickAssistHandlerActivation = null;
- }
- if (contentAssistHandlerActivation != null) {
- handlerService.deactivateHandler(contentAssistHandlerActivation);
- contentAssistHandlerActivation = null;
- }
- }
-
- void dispose() {
- deactivateHandlers();
- }
-
- public Color getColorIncoming() {
- return colorIncoming;
- }
-
- Menu getMenu() {
- return menu;
- }
-
- /**
- * Subclasses that support HTML preview of ticket description and comments override this method to return an
- * instance of AbstractRenderingEngine
- *
- * @return <code>null</code> if HTML preview is not supported for the repository (default)
- * @since 2.1
- */
- public AbstractRenderingEngine getRenderingEngine(TaskAttribute attribute) {
- return null;
- }
-
- ISelectionChangedListener getSelectionChangedListener() {
- return selectionChangedListener;
- }
-
- /**
- * Called to check if there's content assist available for the given attribute.
- *
- * @param attribute
- * the attribute
- * @return true if content assist is available for the specified attribute.
- */
- private boolean hasContentAssist(TaskAttribute taskAttribute) {
- String type = taskAttribute.getMetaData().getType();
- if (TaskAttribute.TYPE_PERSON.equals(type)) {
- return true;
- } else if (TaskAttribute.TYPE_TASK_DEPENDENCY.equals(type)) {
- return true;
- }
- return false;
- }
-
- boolean hasSpellChecking(TaskAttribute taskAttribute) {
- String type = taskAttribute.getMetaData().getType();
- if (TaskAttribute.TYPE_LONG_RICH_TEXT.equals(type) || TaskAttribute.TYPE_SHORT_RICH_TEXT.equals(type)) {
- return true;
- }
- return false;
- }
-
- void setMenu(Menu menu) {
- this.menu = menu;
- }
-
- void setSelectionChangedListener(ISelectionChangedListener selectionListener) {
- this.selectionChangedListener = selectionListener;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/BrowserFormPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/BrowserFormPage.java
deleted file mode 100644
index 84bce7b2b..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/BrowserFormPage.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.ui.editors;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.SWTError;
-import org.eclipse.swt.browser.Browser;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.forms.IManagedForm;
-import org.eclipse.ui.forms.editor.FormEditor;
-import org.eclipse.ui.forms.editor.FormPage;
-import org.eclipse.ui.forms.widgets.ScrolledForm;
-
-/**
- * A form page that contains a browser control.
- *
- * @since 3.0
- * @author Mik Kersten
- * @author Steffen Pingel
- */
-public class BrowserFormPage extends FormPage {
-
- public static final String ID_EDITOR = "org.eclipse.mylyn.tasks.ui.editor.browser";
-
- private Browser browser;
-
- public BrowserFormPage(FormEditor editor, String title) {
- super(editor, ID_EDITOR, title);
- }
-
- @Override
- protected void createFormContent(IManagedForm managedForm) {
- super.createFormContent(managedForm);
- try {
- ScrolledForm form = managedForm.getForm();
- form.getBody().setLayout(new FillLayout());
- browser = new Browser(form.getBody(), SWT.NONE);
- managedForm.getForm().setContent(browser);
- String url = getUrl();
- if (url != null) {
- browser.setUrl(url);
- }
- } catch (SWTError e) {
- // TODO review error handling
- StatusHandler.fail(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Could not create browser page: "
- + e.getMessage(), e));
- } catch (RuntimeException e) {
- // TODO review error handling
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Could not create browser page", e));
- }
- }
-
- /**
- * Returns a reference to the browser control.
- */
- public Browser getBrowser() {
- return browser;
- }
-
- /**
- * Returns the initial URL that is displayed in the browser control. The default implementation tries to determine
- * the URL from the editor input.
- * <p>
- * Subclasses should override this method to display a specific URL.
- *
- * @return the URL to load when the page is created; null, if no URL should be loaded
- */
- protected String getUrl() {
- IEditorInput input = getEditorInput();
- if (input instanceof TaskEditorInput) {
- return ((TaskEditorInput) input).getTask().getUrl();
- }
- return null;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/LayoutHint.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/LayoutHint.java
deleted file mode 100644
index cf149505a..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/LayoutHint.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.ui.editors;
-
-/**
- * @author Steffen Pingel
- * @since 3.0
- */
-public class LayoutHint {
-
- public final static int DEFAULT_PRIORITY = 10;
-
- public enum ColumnSpan {
- MULTIPLE, SINGLE
- };
-
- public enum RowSpan {
- MULTIPLE, SINGLE
- };
-
- public RowSpan rowSpan;
-
- public ColumnSpan columnSpan;
-
- public LayoutHint(RowSpan rowHint, ColumnSpan columnHint) {
- this.rowSpan = rowHint;
- this.columnSpan = columnHint;
- }
-
- public int getPriority() {
- if (columnSpan == null || columnSpan == ColumnSpan.SINGLE) {
- if (rowSpan == null || rowSpan == RowSpan.SINGLE) {
- return DEFAULT_PRIORITY;
- } else {
- return DEFAULT_PRIORITY * 2;
- }
- } else {
- if (rowSpan == null || rowSpan == RowSpan.SINGLE) {
- return DEFAULT_PRIORITY * 3;
- } else {
- return DEFAULT_PRIORITY * 4;
- }
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditor.java
deleted file mode 100644
index 7bfc4d2da..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditor.java
+++ /dev/null
@@ -1,648 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.ui.editors;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.dialogs.IMessageProvider;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.tasks.core.LocalRepositoryConnector;
-import org.eclipse.mylyn.internal.tasks.core.LocalTask;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-import org.eclipse.mylyn.internal.tasks.ui.TaskTransfer;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.actions.ToggleTaskActivationAction;
-import org.eclipse.mylyn.internal.tasks.ui.deprecated.AbstractRepositoryTaskEditor;
-import org.eclipse.mylyn.internal.tasks.ui.deprecated.AbstractRepositoryTaskEditorInput;
-import org.eclipse.mylyn.internal.tasks.ui.deprecated.AbstractTaskEditorFactory;
-import org.eclipse.mylyn.internal.tasks.ui.deprecated.NewTaskEditorInput;
-import org.eclipse.mylyn.internal.tasks.ui.deprecated.RepositoryTaskEditorInput;
-import org.eclipse.mylyn.internal.tasks.ui.editors.EditorBusyIndicator;
-import org.eclipse.mylyn.internal.tasks.ui.editors.EditorUtil;
-import org.eclipse.mylyn.internal.tasks.ui.editors.IBusyEditor;
-import org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorActionContributor;
-import org.eclipse.mylyn.internal.tasks.ui.util.SelectionProviderAdapter;
-import org.eclipse.mylyn.internal.tasks.ui.util.TaskDragSourceListener;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.swt.dnd.DND;
-import org.eclipse.swt.dnd.FileTransfer;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.forms.IManagedForm;
-import org.eclipse.ui.forms.editor.FormPage;
-import org.eclipse.ui.forms.editor.IFormPage;
-import org.eclipse.ui.forms.editor.SharedHeaderFormEditor;
-import org.eclipse.ui.forms.events.HyperlinkAdapter;
-import org.eclipse.ui.forms.events.HyperlinkEvent;
-import org.eclipse.ui.forms.events.IHyperlinkListener;
-import org.eclipse.ui.forms.widgets.Form;
-import org.eclipse.ui.part.WorkbenchPart;
-import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
-import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
-
-/**
- * @author Mik Kersten
- * @author Eric Booth (initial prototype)
- * @author Rob Elves
- */
-@SuppressWarnings( { "deprecation", "restriction" })
-public class TaskEditor extends SharedHeaderFormEditor {
-
- public static final String ID_EDITOR = "org.eclipse.mylyn.tasks.ui.editors.task";
-
- private ToggleTaskActivationAction activateAction;
-
- @Deprecated
- private IEditorPart contentOutlineProvider = null;
-
- private EditorBusyIndicator editorBusyIndicator;
-
- private MenuManager menuManager;
-
- private IHyperlinkListener messageHyperLinkListener;
-
- private ITask task;
-
- private TaskEditorInput taskEditorInput;
-
- private TaskDragSourceListener titleDragSourceListener;
-
- public TaskEditor() {
- }
-
- @Deprecated
- private void addPage(AbstractTaskEditorFactory factory) {
- IEditorInput editorInput;
- if (taskEditorInput != null && taskEditorInput.getTask() == null) {
- editorInput = new RepositoryTaskEditorInput(taskEditorInput.getTaskRepository(), taskEditorInput.getTask()
- .getTaskId(), "");
- } else {
- editorInput = getEditorInput();
- }
- if (factory.canCreateEditorFor(task) || factory.canCreateEditorFor(editorInput)) {
- try {
- IEditorPart editor = factory.createEditor(this, editorInput);
- IEditorInput input = task != null ? factory.createEditorInput(task) : editorInput;
- if (editor != null && input != null) {
- FormPage taskEditor = (FormPage) editor;
- editor.init(getEditorSite(), input);
- int index = addPage(taskEditor);
- if (input.getImageDescriptor() != null) {
- setPageImage(index, CommonImages.getImage(input.getImageDescriptor()));
- }
- if (editor instanceof AbstractRepositoryTaskEditor) {
- ((AbstractRepositoryTaskEditor) editor).setParentEditor(this);
-
- if (editorInput instanceof RepositoryTaskEditorInput) {
- RepositoryTaskEditorInput existingInput = (RepositoryTaskEditorInput) editorInput;
- setPartName(existingInput.getName());
- } else if (editorInput instanceof NewTaskEditorInput) {
- String label = ((NewTaskEditorInput) editorInput).getName();
- setPartName(label);
- }
- setPageText(index, factory.getTitle());
-
- // TODO review
- setActivePage(index);
- }
- }
-
- // HACK: overwrites if multiple present
- if (factory.providesOutline()) {
- contentOutlineProvider = editor;
- }
- } catch (Exception e) {
- StatusHandler.fail(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Could not create editor via factory: " + factory, e));
- }
- }
-
- }
-
- @Override
- protected void addPages() {
- initialize();
-
- // API REVIEW remove check
- if (taskEditorInput != null) {
- // determine factories
- Set<String> conflictingIds = new HashSet<String>();
- ArrayList<AbstractTaskEditorPageFactory> pageFactories = new ArrayList<AbstractTaskEditorPageFactory>();
- for (AbstractTaskEditorPageFactory pageFactory : TasksUiPlugin.getDefault().getTaskEditorPageFactories()) {
- if (pageFactory.canCreatePageFor(getTaskEditorInput())) {
- pageFactories.add(pageFactory);
- String[] ids = pageFactory.getConflictingIds(getTaskEditorInput());
- if (ids != null) {
- conflictingIds.addAll(Arrays.asList(ids));
- }
- }
- }
- for (Iterator<AbstractTaskEditorPageFactory> it = pageFactories.iterator(); it.hasNext();) {
- if (conflictingIds.contains(it.next().getId())) {
- it.remove();
- }
- }
-
- // sort by priority
- Collections.sort(pageFactories, new Comparator<AbstractTaskEditorPageFactory>() {
- public int compare(AbstractTaskEditorPageFactory o1, AbstractTaskEditorPageFactory o2) {
- return o1.getPriority() - o2.getPriority();
- }
- });
-
- // create pages
- for (AbstractTaskEditorPageFactory factory : pageFactories) {
- try {
- FormPage page = factory.createPage(this);
- int index = addPage(page);
- setPageImage(index, factory.getPageImage());
- setPageText(index, factory.getPageText());
- if (factory.getPriority() == AbstractTaskEditorPageFactory.PRIORITY_TASK) {
- setActivePage(index);
- }
- if (page instanceof ISelectionProvider) {
- ((ISelectionProvider) page).addSelectionChangedListener(getActionBarContributor());
- }
- } catch (Exception e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Could not create editor via factory: " + factory, e));
- }
- }
- }
-
- // API REVIEW remove code
- List<AbstractTaskEditorFactory> factories = new ArrayList<AbstractTaskEditorFactory>(TasksUiPlugin.getDefault()
- .getTaskEditorFactories());
- Collections.sort(factories, new Comparator<AbstractTaskEditorFactory>() {
- public int compare(AbstractTaskEditorFactory o1, AbstractTaskEditorFactory o2) {
- return o1.getTabOrderPriority() - o2.getTabOrderPriority();
- }
- });
- for (AbstractTaskEditorFactory factory : factories) {
- addPage(factory);
- }
-
- updateTitleImage();
- updateHeaderToolBar();
- }
-
- private void initialize() {
- editorBusyIndicator = new EditorBusyIndicator(new IBusyEditor() {
- public Image getTitleImage() {
- return TaskEditor.this.getTitleImage();
- }
-
- public void setTitleImage(Image image) {
- TaskEditor.this.setTitleImage(image);
- }
- });
-
- menuManager = new MenuManager();
- configureContextMenuManager(menuManager);
- Menu menu = menuManager.createContextMenu(getContainer());
- getContainer().setMenu(menu);
- getEditorSite().registerContextMenu(menuManager, getEditorSite().getSelectionProvider(), false);
- }
-
- /**
- * @since 3.0
- */
- @Deprecated
- public void configureContextMenuManager(MenuManager manager) {
- if (manager == null) {
- return;
- }
- IMenuListener listener = new IMenuListener() {
- public void menuAboutToShow(IMenuManager manager) {
- contextMenuAboutToShow(manager);
- }
- };
- manager.setRemoveAllWhenShown(true);
- manager.addMenuListener(listener);
- }
-
- @Deprecated
- protected void contextMenuAboutToShow(IMenuManager manager) {
- TaskEditorActionContributor contributor = getActionBarContributor();
- if (contributor != null) {
- contributor.contextMenuAboutToShow(manager);
- }
- }
-
- @Override
- protected void createHeaderContents(IManagedForm headerForm) {
- getToolkit().decorateFormHeading(headerForm.getForm().getForm());
- updateHeader();
- installTitleDrag(getHeaderForm().getForm().getForm());
- }
-
- @Override
- public void dispose() {
- if (editorBusyIndicator != null) {
- editorBusyIndicator.stop();
- }
- if (activateAction != null) {
- activateAction.dispose();
- }
- super.dispose();
- }
-
- @Override
- public void doSave(IProgressMonitor monitor) {
- for (IFormPage page : getPages()) {
- if (page.isDirty()) {
- page.doSave(monitor);
- }
- }
-
- editorDirtyStateChanged();
- }
-
- @Override
- public void doSaveAs() {
- throw new UnsupportedOperationException();
- }
-
- private TaskEditorActionContributor getActionBarContributor() {
- return (TaskEditorActionContributor) getEditorSite().getActionBarContributor();
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public Object getAdapter(Class adapter) {
- if (contentOutlineProvider != null) {
- return contentOutlineProvider.getAdapter(adapter);
- } else if (IContentOutlinePage.class.equals(adapter)) {
- IFormPage[] pages = getPages();
- for (IFormPage page : pages) {
- Object outlinePage = page.getAdapter(adapter);
- if (outlinePage != null) {
- return outlinePage;
- }
- }
- }
- return super.getAdapter(adapter);
- }
-
- /**
- * @since 3.0
- */
- public Menu getMenu() {
- return getContainer().getMenu();
- }
-
- @SuppressWarnings("unchecked")
- IFormPage[] getPages() {
- ArrayList formPages = new ArrayList();
- if (pages != null) {
- for (int i = 0; i < pages.size(); i++) {
- Object page = pages.get(i);
- if (page instanceof IFormPage) {
- formPages.add(page);
- }
- }
- }
- return (IFormPage[]) formPages.toArray(new IFormPage[formPages.size()]);
- }
-
- @Deprecated
- protected IWorkbenchSiteProgressService getProgressService() {
- Object siteService = getEditorSite().getAdapter(IWorkbenchSiteProgressService.class);
- if (siteService != null) {
- return (IWorkbenchSiteProgressService) siteService;
- }
- return null;
- }
-
- @Deprecated
- public ISelection getSelection() {
- if (getSite() != null && getSite().getSelectionProvider() != null) {
- return getSite().getSelectionProvider().getSelection();
- } else {
- return StructuredSelection.EMPTY;
- }
- }
-
- public TaskEditorInput getTaskEditorInput() {
- return taskEditorInput;
- }
-
- @Deprecated
- public Form getTopForm() {
- return this.getHeaderForm().getForm().getForm();
- }
-
- @Override
- public void init(IEditorSite site, IEditorInput input) throws PartInitException {
- // API REVIEW remove the commented parts
- // if (!(input instanceof TaskEditorInput)) {
-// throw new PartInitException("Invalid editor input \"" + input.getClass() + "\"");
-// }
-
- super.init(site, input);
-
- // API REVIEW remove the instanceof check
- if (input instanceof TaskEditorInput) {
- this.taskEditorInput = (TaskEditorInput) input;
- this.task = taskEditorInput.getTask();
- }
-
- setPartName(input.getName());
- }
-
- private void installTitleDrag(Form form) {
- // API 3.0 remove
- if (task == null) {
- return;
- }
-
- if (titleDragSourceListener == null) {
- Transfer[] transferTypes;
- if (null == task) {
- transferTypes = new Transfer[] { TextTransfer.getInstance() };
- } else {
- transferTypes = new Transfer[] { TaskTransfer.getInstance(), TextTransfer.getInstance(),
- FileTransfer.getInstance() };
- }
- titleDragSourceListener = new TaskDragSourceListener(new SelectionProviderAdapter() {
- @Override
- public ISelection getSelection() {
- return new StructuredSelection(task);
- }
- });
- form.addTitleDragSupport(DND.DROP_MOVE | DND.DROP_LINK, transferTypes, titleDragSourceListener);
- }
- }
-
- @Override
- public boolean isDirty() {
- for (IFormPage page : getPages()) {
- if (page.isDirty()) {
- return true;
- }
- }
- return false;
- }
-
- @Override
- public boolean isSaveAsAllowed() {
- return false;
- }
-
- @Deprecated
- public void markDirty() {
- firePropertyChange(PROP_DIRTY);
- }
-
- /**
- * Refresh editor with new contents (if any)
- */
- @Deprecated
- public void refreshEditorContents() {
- for (IFormPage page : getPages()) {
- if (page instanceof AbstractRepositoryTaskEditor) {
- AbstractRepositoryTaskEditor editor = (AbstractRepositoryTaskEditor) page;
- editor.refreshEditor();
- }
- }
- }
-
- @Override
- public void setFocus() {
- IFormPage page = getActivePageInstance();
- if (page != null) {
- page.setFocus();
- } else {
- super.setFocus();
- }
- }
-
- @Deprecated
- public void setFocusOfActivePage() {
- if (this.getActivePage() > -1) {
- IFormPage page = this.getPages()[this.getActivePage()];
- if (page != null) {
- page.setFocus();
- }
- }
- }
-
- public void setMessage(String message, int type) {
- setMessage(message, type, null);
- }
-
- /**
- * @since 2.3
- */
- public void setMessage(String message, int type, IHyperlinkListener listener) {
- if (getHeaderForm() != null && getHeaderForm().getForm() != null) {
- if (!getHeaderForm().getForm().isDisposed()) {
- Form form = getHeaderForm().getForm().getForm();
- form.setMessage(message, type);
- if (messageHyperLinkListener != null) {
- form.removeMessageHyperlinkListener(messageHyperLinkListener);
- }
- if (listener != null) {
- form.addMessageHyperlinkListener(listener);
- }
- messageHyperLinkListener = listener;
- }
- }
- }
-
- /**
- * @since 3.0
- */
- public void setStatus(String message, final String title, final IStatus status) {
- setMessage(message, IMessageProvider.ERROR, new HyperlinkAdapter() {
- @Override
- public void linkActivated(HyperlinkEvent event) {
- TasksUiInternal.displayStatus(title, status);
- }
- });
- }
-
- @Override
- public void showBusy(boolean busy) {
- if (busy) {
- if (TasksUiInternal.isAnimationsEnabled()) {
- editorBusyIndicator.start();
- }
- } else {
- editorBusyIndicator.stop();
- }
- Form form = getHeaderForm().getForm().getForm();
- EditorUtil.setEnabledState(form.getBody(), !busy);
- for (IFormPage page : getPages()) {
- if (page instanceof WorkbenchPart) {
- WorkbenchPart part = (WorkbenchPart) page;
- part.showBusy(busy);
- }
- }
- }
-
- private void updateHeader() {
- IEditorInput input = getEditorInput();
- if (input instanceof TaskEditorInput) {
- updateHeaderImage(task.getConnectorKind());
- updateHeaderLabel(task);
- } else if (input instanceof RepositoryTaskEditorInput) {
- RepositoryTaskData taskData = ((RepositoryTaskEditorInput) input).getTaskData();
- if (task != null) {
- updateHeaderImage(task.getConnectorKind());
- updateHeaderLabel(task);
- } else if (taskData != null) {
- updateHeaderImage(taskData.getConnectorKind());
- updateHeaderLabel(taskData);
- }
- }
- installTitleDrag(getHeaderForm().getForm().getForm());
- }
-
- /**
- * @since 3.0
- */
- public void updateHeaderToolBar() {
- Form form = getHeaderForm().getForm().getForm();
- IToolBarManager toolBarManager = form.getToolBarManager();
-
- toolBarManager.removeAll();
- toolBarManager.update(true);
-
- for (IFormPage page : getPages()) {
- if (page instanceof AbstractTaskEditorPage) {
- AbstractTaskEditorPage taskEditorPage = (AbstractTaskEditorPage) page;
- taskEditorPage.fillToolBar(toolBarManager);
- } else if (page instanceof AbstractRepositoryTaskEditor) {
- AbstractRepositoryTaskEditor taskEditorPage = (AbstractRepositoryTaskEditor) page;
- taskEditorPage.fillToolBar(toolBarManager);
- }
- }
-
- // TODO EDITOR remove check
- if (task != null) {
- if (activateAction == null) {
- activateAction = new ToggleTaskActivationAction(task, toolBarManager);
- }
- toolBarManager.add(new Separator("activation"));
- toolBarManager.add(activateAction);
- }
-
- toolBarManager.update(true);
- }
-
- private void updateHeaderImage(String connectorKind) {
- if (LocalRepositoryConnector.CONNECTOR_KIND.equals(connectorKind)) {
- getHeaderForm().getForm().setImage(CommonImages.getImage(TasksUiImages.TASK));
- } else {
- ImageDescriptor overlay = TasksUiPlugin.getDefault().getOverlayIcon(connectorKind);
- Image image = CommonImages.getImageWithOverlay(TasksUiImages.REPOSITORY, overlay, false, false);
- getHeaderForm().getForm().setImage(image);
- }
- }
-
- private void updateHeaderLabel(ITask task) {
- if (task instanceof LocalTask) {
- getHeaderForm().getForm().setText("Task: " + task.getSummary());
- } else {
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(task.getConnectorKind());
- String kindLabel = "";
- if (connectorUi != null) {
- kindLabel = connectorUi.getTaskKindLabel(task);
- }
-
- String idLabel = task.getTaskKey();
- if (idLabel != null) {
- getHeaderForm().getForm().setText(kindLabel + " " + idLabel);
- } else {
- getHeaderForm().getForm().setText(kindLabel);
- }
- }
- }
-
- @Deprecated
- private void updateHeaderLabel(RepositoryTaskData taskData) {
- String kindLabel = taskData.getTaskKind();
- String idLabel = taskData.getTaskKey();
-
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(taskData.getConnectorKind());
- if (connectorUi != null && task != null) {
- kindLabel = connectorUi.getTaskKindLabel(task);
- }
- if (taskData.isNew()) {
- kindLabel = "New " + kindLabel;
- idLabel = "";
- }
-
- if (getHeaderForm().getForm() != null) {
- if (idLabel != null) {
- getHeaderForm().getForm().setText(kindLabel + " " + idLabel);
- } else {
- getHeaderForm().getForm().setText(kindLabel);
- }
- }
- }
-
- /**
- * Update the title of the editor
- */
- @Deprecated
- public void updateTitle(String name) {
- // setContentDescription(name);
- setPartName(name);
- setTitleToolTip(name);
- updateHeader();
- }
-
- private void updateTitleImage() {
- if (task != null) {
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(task.getConnectorKind());
- if (connectorUi != null) {
- ImageDescriptor overlayDescriptor = connectorUi.getTaskKindOverlay(task);
- setTitleImage(CommonImages.getCompositeTaskImage(TasksUiImages.TASK, overlayDescriptor, false));
- } else {
- setTitleImage(CommonImages.getImage(TasksUiImages.TASK));
- }
- } else if (getEditorInput() instanceof AbstractRepositoryTaskEditorInput) {
- setTitleImage(CommonImages.getImage(TasksUiImages.TASK_REMOTE));
- } else {
- setTitleImage(CommonImages.getImage(TasksUiImages.TASK));
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditorInput.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditorInput.java
deleted file mode 100644
index ed94a4636..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditorInput.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-/*
- * Created on 19-Jan-2005
- */
-package org.eclipse.mylyn.tasks.ui.editors;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorInputFactory;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.IPersistableElement;
-
-/**
- * Input for task editors.
- *
- * @author Eric Booth
- * @author Rob Elves
- * @author Mik Kersten
- * @author Steffen Pingel
- * @since 2.0
- */
-public class TaskEditorInput implements IEditorInput, IPersistableElement {
-
- private static final int MAX_LABEL_LENGTH = 60;
-
- private final ITask task;
-
- private final TaskRepository taskRepository;
-
- private Object data;
-
- /**
- * @since 3.0
- */
- @Deprecated
- public TaskEditorInput(ITask task, boolean newTask) {
- this(TasksUi.getRepositoryManager().getRepository(task.getConnectorKind(), task.getRepositoryUrl()), task);
- }
-
- /**
- * @since 3.0
- */
- public TaskEditorInput(TaskRepository taskRepository, ITask task) {
- Assert.isNotNull(taskRepository);
- Assert.isNotNull(task);
- this.taskRepository = taskRepository;
- this.task = task;
- }
-
- /**
- * @since 2.0
- */
- @Override
- public boolean equals(Object obj) {
- if (this == obj) {
- return true;
- }
- if (obj == null) {
- return false;
- }
- if (getClass() != obj.getClass()) {
- return false;
- }
- TaskEditorInput other = (TaskEditorInput) obj;
- return task.equals(other.task);
- }
-
- /**
- * @since 2.0
- */
- public boolean exists() {
- return task != null;
- }
-
- /**
- * @since 2.0
- */
- @SuppressWarnings("unchecked")
- public Object getAdapter(Class adapter) {
- if (adapter == IEditorInput.class) {
- return this;
- }
- return null;
- }
-
- /**
- * @since 2.0
- */
- public String getFactoryId() {
- return TaskEditorInputFactory.ID_FACTORY;
- }
-
- /**
- * @since 2.0
- */
- public ImageDescriptor getImageDescriptor() {
- return null;
- }
-
- /**
- * @deprecated use {@link #getName()}
- * @since 2.0
- */
- @Deprecated
- public String getLabel() {
- return getName();
- }
-
- /**
- * @since 2.0
- */
- public String getName() {
- String toolTipText = getToolTipText();
- if (toolTipText == null) {
- return null;
- }
-
- if (task != null) {
- String taskKey = task.getTaskKey();
- if (taskKey != null) {
- return truncate(taskKey + ": " + toolTipText);
- }
- }
- return truncate(toolTipText);
- }
-
- /**
- * @since 2.0
- */
- public IPersistableElement getPersistable() {
- return this;
- }
-
- /**
- * Returns the task if the task is in the task list; returns <code>null</code> otherwise.
- *
- * @since 3.0
- */
- public ITask getTask() {
- return task;
- }
-
- /**
- * @since 3.0
- */
- public TaskRepository getTaskRepository() {
- return taskRepository;
- }
-
- /**
- * @since 2.0
- */
- public String getToolTipText() {
- return task.getSummary();
- }
-
- /**
- * @since 2.0
- */
- @Override
- public int hashCode() {
- return task.getTaskId().hashCode();
- }
-
- /**
- * @since 2.0
- */
- @Deprecated
- public boolean isNewTask() {
- return false;
- }
-
- /**
- * @since 2.0
- */
- public void saveState(IMemento memento) {
- TaskEditorInputFactory.saveState(memento, this);
- }
-
- private String truncate(String description) {
- if (description == null || description.length() <= MAX_LABEL_LENGTH) {
- return description;
- } else {
- return description.substring(0, MAX_LABEL_LENGTH) + "...";
- }
- }
-
- /**
- * @since 3.0
- */
- public Object getData() {
- return data;
- }
-
- /**
- * @since 3.0
- */
- public void setData(Object data) {
- this.data = data;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditorPartDescriptor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditorPartDescriptor.java
deleted file mode 100644
index d692f8e52..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditorPartDescriptor.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.ui.editors;
-
-import org.eclipse.core.runtime.Assert;
-
-/**
- * @author Steffen Pingel
- * @since 3.0
- */
-public abstract class TaskEditorPartDescriptor {
-
- private final String id;
-
- private String path;
-
-// public AbstractTaskEditorPart createPart() {
-// final AbstractTaskEditorPart[] result = new AbstractTaskEditorPart[1];
-// SafeRunnable.run(new ISafeRunnable() {
-//
-// public void handleException(Throwable exception) {
-// StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
-// "Unable to create instance of class \"" + getClassName() + "\" for task editor part \""
-// + getId() + "\""));
-// }
-//
-// public void run() throws Exception {
-// Class<?> clazz = Class.forName(getClassName());
-// result[0] = (AbstractTaskEditorPart) clazz.newInstance();
-// }
-//
-// });
-// return result[0];
-// }
-
- public TaskEditorPartDescriptor(String id) {
- Assert.isNotNull(id);
- this.id = id;
- }
-
- public abstract AbstractTaskEditorPart createPart();
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj) {
- return true;
- }
- if (obj == null) {
- return false;
- }
- if (getClass() != obj.getClass()) {
- return false;
- }
- TaskEditorPartDescriptor other = (TaskEditorPartDescriptor) obj;
- if (id == null) {
- if (other.id != null) {
- return false;
- }
- } else if (!id.equals(other.id)) {
- return false;
- }
- return true;
- }
-
- public String getId() {
- return id;
- }
-
- public String getPath() {
- return path;
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((id == null) ? 0 : id.hashCode());
- return result;
- }
-
- public TaskEditorPartDescriptor setPath(String path) {
- this.path = path;
- return this;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositoryQueryPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositoryQueryPage.java
deleted file mode 100644
index e2032b256..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositoryQueryPage.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.ui.wizards;
-
-import java.util.Set;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTaskCategory;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
-import org.eclipse.mylyn.internal.tasks.ui.deprecated.AbstractRepositoryQueryWizard;
-import org.eclipse.mylyn.internal.tasks.ui.search.SearchHitCollector;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.search.ui.NewSearchUI;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-/**
- * Extend to provide repository-specific query page to the Workbench search dialog.
- *
- * @author Rob Elves
- * @author Steffen Pingel
- * @since 3.0
- */
-public abstract class AbstractRepositoryQueryPage extends WizardPage implements ITaskSearchPage {
-
- private static final String TITLE = "Enter query parameters";
-
- private static final String DESCRIPTION = "If attributes are blank or stale press the Update button.";
-
- private ITaskSearchPageContainer searchContainer;
-
- private final TaskRepository taskRepository;
-
- private final IRepositoryQuery query;
-
- public AbstractRepositoryQueryPage(String title, TaskRepository taskRepository, IRepositoryQuery query) {
- super(title);
- Assert.isNotNull(taskRepository);
- this.taskRepository = taskRepository;
- this.query = query;
- setTitle(TITLE);
- setDescription(DESCRIPTION);
- setImageDescriptor(TasksUiImages.BANNER_REPOSITORY);
- setPageComplete(false);
- }
-
- public AbstractRepositoryQueryPage(String title, TaskRepository taskRepository) {
- this(title, taskRepository, null);
- }
-
- public IRepositoryQuery getQuery() {
- return query;
- }
-
- public abstract String getQueryTitle();
-
- @Override
- public boolean isPageComplete() {
- String queryTitle = getQueryTitle();
- if (queryTitle == null || queryTitle.equals("")) {
- setErrorMessage("Please specify a title for the query.");
- return false;
- } else {
- Set<RepositoryQuery> queries = TasksUiInternal.getTaskList().getQueries();
- Set<AbstractTaskCategory> categories = TasksUiInternal.getTaskList().getCategories();
- String oldSummary = null;
- if (query != null) {
- oldSummary = query.getSummary();
- } else if (getWizard() instanceof AbstractRepositoryQueryWizard) {
- oldSummary = ((AbstractRepositoryQueryWizard) getWizard()).getQuerySummary();
- }
- if (oldSummary != null && queryTitle.equals(oldSummary)) {
- setErrorMessage(null);
- return true;
- }
-
- for (AbstractTaskCategory category : categories) {
- if (queryTitle.equals(category.getSummary())) {
- setErrorMessage("A category with this name already exists, please choose another name.");
- return false;
- }
- }
- for (RepositoryQuery repositoryQuery : queries) {
- if (queryTitle.equals(repositoryQuery.getSummary()) && !query.equals(repositoryQuery)) {
- setErrorMessage("A query with this name already exists, please choose another name.");
- return false;
- }
- }
- }
- setErrorMessage(null);
- return true;
- }
-
- public IRepositoryQuery createQuery() {
- IRepositoryQuery query = TasksUi.getRepositoryModel().createQuery(getTaskRepository());
- applyTo(query);
- return query;
- }
-
- public abstract void applyTo(IRepositoryQuery query);
-
- public void saveState() {
- // empty
- }
-
- public void setContainer(ITaskSearchPageContainer container) {
- searchContainer = container;
- }
-
- public boolean inSearchContainer() {
- return searchContainer != null;
- }
-
- public boolean performSearch() {
- NewSearchUI.activateSearchResultView();
- AbstractRepositoryConnector connector = TasksUi.getRepositoryManager().getRepositoryConnector(
- taskRepository.getConnectorKind());
- if (connector != null) {
- try {
- SearchHitCollector collector = new SearchHitCollector(TasksUiInternal.getTaskList(), taskRepository,
- createQuery());
- NewSearchUI.runQueryInBackground(collector);
- } catch (UnsupportedOperationException e) {
- SearchHitCollector collector = new SearchHitCollector(TasksUiInternal.getTaskList(), taskRepository,
- getQuery());
- NewSearchUI.runQueryInBackground(collector);
- }
- }
- return true;
- }
-
- /**
- * @since 2.1
- */
- public void setControlsEnabled(boolean enabled) {
- setControlsEnabled(getControl(), enabled);
- }
-
- // TODO: make reusable or find better API, task editor has similar functionality
- private void setControlsEnabled(Control control, boolean enabled) {
- if (control instanceof Composite) {
- for (Control childControl : ((Composite) control).getChildren()) {
- childControl.setEnabled(enabled);
- setControlsEnabled(childControl, enabled);
- }
- }
- setPageComplete(isPageComplete());
- }
-
- public ITaskSearchPageContainer getSearchContainer() {
- return searchContainer;
- }
-
- public TaskRepository getTaskRepository() {
- return taskRepository;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositorySettingsPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositorySettingsPage.java
deleted file mode 100644
index c78a9697c..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositorySettingsPage.java
+++ /dev/null
@@ -1,1489 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.ui.wizards;
-
-import java.lang.reflect.InvocationTargetException;
-import java.nio.charset.Charset;
-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.OperationCanceledException;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.IMessageProvider;
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.preference.PreferenceDialog;
-import org.eclipse.jface.preference.StringFieldEditor;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.commons.net.AuthenticationCredentials;
-import org.eclipse.mylyn.commons.net.AuthenticationType;
-import org.eclipse.mylyn.internal.tasks.core.IRepositoryConstants;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryTemplateManager;
-import org.eclipse.mylyn.internal.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.RepositoryTemplate;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.FocusAdapter;
-import org.eclipse.swt.events.FocusEvent;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.dialogs.PreferencesUtil;
-import org.eclipse.ui.forms.events.ExpansionAdapter;
-import org.eclipse.ui.forms.events.ExpansionEvent;
-import org.eclipse.ui.forms.events.HyperlinkAdapter;
-import org.eclipse.ui.forms.events.HyperlinkEvent;
-import org.eclipse.ui.forms.events.IHyperlinkListener;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-import org.eclipse.ui.forms.widgets.Hyperlink;
-
-/**
- * Extend to provide custom repository settings. This page is typically invoked by the user requesting properties via
- * the Task Repositories view.
- *
- * @author Mik Kersten
- * @author Rob Elves
- * @author Steffen Pingel
- * @author Frank Becker
- */
-public abstract class AbstractRepositorySettingsPage extends WizardPage implements ITaskRepositoryPage {
-
- protected static final String PREFS_PAGE_ID_NET_PROXY = "org.eclipse.ui.net.NetPreferences";
-
- protected static final String LABEL_REPOSITORY_LABEL = "Label: ";
-
- protected static final String LABEL_SERVER = "Server: ";
-
- protected static final String LABEL_USER = "User ID: ";
-
- protected static final String LABEL_PASSWORD = "Password: ";
-
- protected static final String URL_PREFIX_HTTPS = "https://";
-
- protected static final String URL_PREFIX_HTTP = "http://";
-
- protected static final String INVALID_REPOSITORY_URL = "Repository url is invalid.";
-
- protected static final String INVALID_LOGIN = "Unable to authenticate with repository. Login credentials invalid.";
-
- protected AbstractRepositoryConnector connector;
-
- protected StringFieldEditor repositoryLabelEditor;
-
- protected Combo serverUrlCombo;
-
- private String serverVersion = TaskRepository.NO_VERSION_SPECIFIED;
-
- protected StringFieldEditor repositoryUserNameEditor;
-
- protected StringFieldEditor repositoryPasswordEditor;
-
- protected StringFieldEditor httpAuthUserNameEditor;
-
- protected StringFieldEditor httpAuthPasswordEditor;
-
- protected StringFieldEditor proxyHostnameEditor;
-
- protected StringFieldEditor proxyPortEditor;
-
- protected StringFieldEditor proxyUserNameEditor;
-
- protected StringFieldEditor proxyPasswordEditor;
-
- protected TaskRepository repository;
-
- private Button validateServerButton;
-
- private Combo otherEncodingCombo;
-
- private Button defaultEncoding;
-
- // private Combo timeZonesCombo;
-
- protected Button anonymousButton;
-
- private String oldUsername;
-
- private String oldPassword;
-
- private String oldHttpAuthUserId;
-
- private String oldHttpAuthPassword;
-
- private boolean needsAnonymousLogin;
-
- private boolean needsTimeZone;
-
- private boolean needsEncoding;
-
- private boolean needsHttpAuth;
-
- private boolean needsValidation;
-
- private boolean needsAdvanced;
-
- protected Composite compositeContainer;
-
- private Composite advancedComp;
-
- private Composite httpAuthComp;
-
- private Composite proxyAuthComp;
-
- private ExpandableComposite advancedExpComposite;
-
- private ExpandableComposite httpAuthExpComposite;
-
- private ExpandableComposite proxyExpComposite;
-
- private Set<String> repositoryUrls;
-
- private String originalUrl;
-
- private Button otherEncoding;
-
- private Button httpAuthButton;
-
- private boolean needsProxy;
-
- private Button systemProxyButton;
-
- private String oldProxyUsername = "";
-
- private String oldProxyPassword = "";
-
- // private Button proxyAuthButton;
-
- private String oldProxyHostname = "";
-
- private String oldProxyPort = "";
-
- private Button proxyAuthButton;
-
- private final FormToolkit toolkit = new FormToolkit(Display.getCurrent());
-
- private Hyperlink createAccountHyperlink;
-
- private Hyperlink manageAccountHyperlink;
-
- private Button savePasswordButton;
-
- private Button saveHttpPasswordButton;
-
- private Button saveProxyPasswordButton;
-
- private Button disconnectedButton;
-
- /**
- * @since 3.0
- */
- public AbstractRepositorySettingsPage(String title, String description, TaskRepository taskRepository) {
- super(title);
- this.repository = taskRepository;
- this.connector = TasksUi.getRepositoryManager().getRepositoryConnector(getConnectorKind());
- setTitle(title);
- setDescription(description);
- setNeedsAnonymousLogin(false);
- setNeedsEncoding(true);
- setNeedsTimeZone(true);
- setNeedsProxy(true);
- setNeedsValidation(true);
- setNeedsAdvanced(true);
- }
-
- /**
- * @since 3.0
- */
- public abstract String getConnectorKind();
-
- @Override
- public void dispose() {
- super.dispose();
- if (toolkit != null) {
- if (toolkit.getColors() != null) {
- toolkit.dispose();
- }
- }
- }
-
- public void createControl(Composite parent) {
-
- if (repository != null) {
- originalUrl = repository.getRepositoryUrl();
- oldUsername = repository.getUserName();
- oldPassword = repository.getPassword();
-
- if (repository.getHttpUser() != null && repository.getHttpPassword() != null) {
- oldHttpAuthUserId = repository.getHttpUser();
- oldHttpAuthPassword = repository.getHttpPassword();
- } else {
- oldHttpAuthPassword = "";
- oldHttpAuthUserId = "";
- }
-
- oldProxyHostname = repository.getProperty(TaskRepository.PROXY_HOSTNAME);
- oldProxyPort = repository.getProperty(TaskRepository.PROXY_PORT);
- if (oldProxyHostname == null) {
- oldProxyHostname = "";
- }
- if (oldProxyPort == null) {
- oldProxyPort = "";
- }
-
- oldProxyUsername = repository.getProxyUsername();
- oldProxyPassword = repository.getProxyPassword();
- if (oldProxyUsername == null) {
- oldProxyUsername = "";
- }
- if (oldProxyPassword == null) {
- oldProxyPassword = "";
- }
-
- } else {
- oldUsername = "";
- oldPassword = "";
- oldHttpAuthPassword = "";
- oldHttpAuthUserId = "";
- }
-
- compositeContainer = new Composite(parent, SWT.NULL);
- FillLayout layout = new FillLayout();
- compositeContainer.setLayout(layout);
-
- new Label(compositeContainer, SWT.NONE).setText(LABEL_SERVER);
- serverUrlCombo = new Combo(compositeContainer, SWT.DROP_DOWN);
- serverUrlCombo.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- isValidUrl(serverUrlCombo.getText());
- if (getWizard() != null) {
- getWizard().getContainer().updateButtons();
- }
- }
- });
-
- serverUrlCombo.addFocusListener(new FocusAdapter() {
-
- @Override
- public void focusLost(FocusEvent e) {
- updateHyperlinks();
- }
- });
-
- serverUrlCombo.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- isValidUrl(serverUrlCombo.getText());
- if (getWizard() != null) {
- getWizard().getContainer().updateButtons();
- }
- }
- });
-
- GridDataFactory.fillDefaults().hint(300, SWT.DEFAULT).grab(true, false).applyTo(serverUrlCombo);
-
- repositoryLabelEditor = new StringFieldEditor("", LABEL_REPOSITORY_LABEL, StringFieldEditor.UNLIMITED,
- compositeContainer) {
-
- @Override
- protected boolean doCheckState() {
- return true;
- // return isValidUrl(getStringValue());
- }
-
- @Override
- protected void valueChanged() {
- super.valueChanged();
- if (getWizard() != null) {
- getWizard().getContainer().updateButtons();
- }
- }
- };
- // repositoryLabelEditor.setErrorMessage("error");
-
- if (needsAnonymousLogin()) {
- anonymousButton = new Button(compositeContainer, SWT.CHECK);
- GridDataFactory.fillDefaults().span(2, SWT.DEFAULT).applyTo(anonymousButton);
-
- anonymousButton.setText("Anonymous Access");
- anonymousButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- setAnonymous(anonymousButton.getSelection());
- isPageComplete();
- }
- });
- }
-
- repositoryUserNameEditor = new StringFieldEditor("", LABEL_USER, StringFieldEditor.UNLIMITED,
- compositeContainer) {
-
- @Override
- protected boolean doCheckState() {
- return true;
- }
-
- @Override
- protected void valueChanged() {
- super.valueChanged();
- isPageComplete();
- if (getWizard() != null) {
- getWizard().getContainer().updateButtons();
- }
- }
- };
-
- repositoryPasswordEditor = new RepositoryStringFieldEditor("", LABEL_PASSWORD, StringFieldEditor.UNLIMITED,
- compositeContainer) {
-
- @Override
- protected boolean doCheckState() {
- return true;
- }
-
- @Override
- protected void valueChanged() {
- super.valueChanged();
- isPageComplete();
- if (getWizard() != null) {
- getWizard().getContainer().updateButtons();
- }
- }
- };
-
- savePasswordButton = new Button(compositeContainer, SWT.CHECK);
- GridDataFactory.fillDefaults().span(2, SWT.DEFAULT).applyTo(savePasswordButton);
- savePasswordButton.setText("Save Password");
-
- if (repository != null) {
- try {
- String repositoryLabel = repository.getProperty(IRepositoryConstants.PROPERTY_LABEL);
- if (repositoryLabel != null && repositoryLabel.length() > 0) {
- // repositoryLabelCombo.add(repositoryLabel);
- // repositoryLabelCombo.select(0);
- repositoryLabelEditor.setStringValue(repositoryLabel);
- }
- serverUrlCombo.setText(repository.getRepositoryUrl());
- repositoryUserNameEditor.setStringValue(repository.getUserName());
- repositoryPasswordEditor.setStringValue(repository.getPassword());
- } catch (Throwable t) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Could not set field value", t));
- }
- }
-
- if (needsAnonymousLogin()) {
- if (repository != null) {
- setAnonymous(repository.isAnonymous());
- } else {
- setAnonymous(true);
- }
- }
-
- if (repository != null) {
- savePasswordButton.setSelection(repository.getSavePassword(AuthenticationType.REPOSITORY));
- } else {
- savePasswordButton.setSelection(false);
- }
-
- // TODO: put this back if we can't get the info from all connectors
- // if (needsTimeZone()) {
- // Label timeZoneLabel = new Label(container, SWT.NONE);
- // timeZoneLabel.setText("Repository time zone: ");
- // timeZonesCombo = new Combo(container, SWT.READ_ONLY);
- // String[] timeZoneIds = TimeZone.getAvailableIDs();
- // Arrays.sort(timeZoneIds);
- // for (String zone : timeZoneIds) {
- // timeZonesCombo.add(zone);
- // }
- // boolean setZone = false;
- // if (repository != null) {
- // if (timeZonesCombo.indexOf(repository.getTimeZoneId()) > -1) {
- // timeZonesCombo.select(timeZonesCombo.indexOf(repository.getTimeZoneId()));
- // setZone = true;
- // }
- // }
- // if (!setZone) {
- // timeZonesCombo.select(timeZonesCombo.indexOf(TimeZone.getDefault().getID()));
- // }
- // }
-
- if (needsAdvanced() || needsEncoding()) {
-
- advancedExpComposite = toolkit.createExpandableComposite(compositeContainer, ExpandableComposite.COMPACT
- | ExpandableComposite.TWISTIE | ExpandableComposite.TITLE_BAR);
- advancedExpComposite.clientVerticalSpacing = 0;
- GridData gridData_2 = new GridData(SWT.FILL, SWT.FILL, true, false);
- gridData_2.horizontalIndent = -5;
- advancedExpComposite.setLayoutData(gridData_2);
- advancedExpComposite.setFont(compositeContainer.getFont());
- advancedExpComposite.setBackground(compositeContainer.getBackground());
- advancedExpComposite.setText("Additional Settings");
- advancedExpComposite.addExpansionListener(new ExpansionAdapter() {
- @Override
- public void expansionStateChanged(ExpansionEvent e) {
- getControl().getShell().pack();
- }
- });
-
- GridDataFactory.fillDefaults().span(2, SWT.DEFAULT).applyTo(advancedExpComposite);
-
- advancedComp = toolkit.createComposite(advancedExpComposite, SWT.NONE);
- GridLayout gridLayout2 = new GridLayout();
- gridLayout2.numColumns = 2;
- gridLayout2.verticalSpacing = 5;
- advancedComp.setLayout(gridLayout2);
- advancedComp.setBackground(compositeContainer.getBackground());
- advancedExpComposite.setClient(advancedComp);
-
- createAdditionalControls(advancedComp);
-
- if (needsEncoding()) {
- Label encodingLabel = new Label(advancedComp, SWT.HORIZONTAL);
- encodingLabel.setText("Character encoding:");
- GridDataFactory.fillDefaults().align(SWT.BEGINNING, SWT.TOP).applyTo(encodingLabel);
-
- Composite encodingContainer = new Composite(advancedComp, SWT.NONE);
- GridLayout gridLayout = new GridLayout(2, false);
- gridLayout.marginWidth = 0;
- gridLayout.marginHeight = 0;
- encodingContainer.setLayout(gridLayout);
-
- defaultEncoding = new Button(encodingContainer, SWT.RADIO);
- defaultEncoding.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1));
- defaultEncoding.setText("Default (" + TaskRepository.DEFAULT_CHARACTER_ENCODING + ")");
- defaultEncoding.setSelection(true);
-
- otherEncoding = new Button(encodingContainer, SWT.RADIO);
- otherEncoding.setText("Other:");
- otherEncodingCombo = new Combo(encodingContainer, SWT.READ_ONLY);
- for (String encoding : Charset.availableCharsets().keySet()) {
- if (!encoding.equals(TaskRepository.DEFAULT_CHARACTER_ENCODING)) {
- otherEncodingCombo.add(encoding);
- }
- }
-
- setDefaultEncoding();
-
- otherEncoding.addSelectionListener(new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (otherEncoding.getSelection()) {
- defaultEncoding.setSelection(false);
- otherEncodingCombo.setEnabled(true);
- } else {
- defaultEncoding.setSelection(true);
- otherEncodingCombo.setEnabled(false);
- }
- }
- });
-
- if (repository != null) {
- try {
- String repositoryEncoding = repository.getCharacterEncoding();
- if (repositoryEncoding != null) {// &&
- // !repositoryEncoding.equals(defaultEncoding))
- // {
- if (otherEncodingCombo.getItemCount() > 0
- && otherEncodingCombo.indexOf(repositoryEncoding) > -1) {
- otherEncodingCombo.setEnabled(true);
- otherEncoding.setSelection(true);
- defaultEncoding.setSelection(false);
- otherEncodingCombo.select(otherEncodingCombo.indexOf(repositoryEncoding));
- } else {
- setDefaultEncoding();
- }
- }
- } catch (Throwable t) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Could not set field value", t));
- }
- }
- }
- }
-
- if (needsHttpAuth()) {
- httpAuthExpComposite = toolkit.createExpandableComposite(compositeContainer, ExpandableComposite.COMPACT
- | ExpandableComposite.TWISTIE | ExpandableComposite.TITLE_BAR);
- httpAuthExpComposite.clientVerticalSpacing = 0;
- GridData gridData_2 = new GridData(SWT.FILL, SWT.FILL, true, false);
- gridData_2.horizontalIndent = -5;
- httpAuthExpComposite.setLayoutData(gridData_2);
- httpAuthExpComposite.setFont(compositeContainer.getFont());
- httpAuthExpComposite.setBackground(compositeContainer.getBackground());
- httpAuthExpComposite.setText("Http Authentication");
- httpAuthExpComposite.addExpansionListener(new ExpansionAdapter() {
- @Override
- public void expansionStateChanged(ExpansionEvent e) {
- getControl().getShell().pack();
- }
- });
-
- GridDataFactory.fillDefaults().span(2, SWT.DEFAULT).applyTo(httpAuthExpComposite);
-
- httpAuthComp = toolkit.createComposite(httpAuthExpComposite, SWT.NONE);
- GridLayout gridLayout2 = new GridLayout();
- gridLayout2.numColumns = 2;
- gridLayout2.verticalSpacing = 0;
- httpAuthComp.setLayout(gridLayout2);
- httpAuthComp.setBackground(compositeContainer.getBackground());
- httpAuthExpComposite.setClient(httpAuthComp);
-
- httpAuthButton = new Button(httpAuthComp, SWT.CHECK);
- GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.TOP).span(2, SWT.DEFAULT).applyTo(httpAuthButton);
-
- httpAuthButton.setText("Enabled");
-
- httpAuthButton.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- setHttpAuth(httpAuthButton.getSelection());
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- // ignore
- }
- });
-
- httpAuthUserNameEditor = new StringFieldEditor("", "User ID: ", StringFieldEditor.UNLIMITED, httpAuthComp) {
-
- @Override
- protected boolean doCheckState() {
- return true;
- }
-
- @Override
- protected void valueChanged() {
- super.valueChanged();
- if (getWizard() != null) {
- getWizard().getContainer().updateButtons();
- }
- }
- };
- httpAuthPasswordEditor = new RepositoryStringFieldEditor("", "Password: ", StringFieldEditor.UNLIMITED,
- httpAuthComp);
- ((RepositoryStringFieldEditor) httpAuthPasswordEditor).getTextControl().setEchoChar('*');
-
- saveHttpPasswordButton = new Button(httpAuthComp, SWT.CHECK);
- GridDataFactory.fillDefaults().span(2, SWT.DEFAULT).applyTo(saveHttpPasswordButton);
- saveHttpPasswordButton.setText("Save Http Password");
-
- httpAuthUserNameEditor.setEnabled(httpAuthButton.getSelection(), httpAuthComp);
- httpAuthPasswordEditor.setEnabled(httpAuthButton.getSelection(), httpAuthComp);
- saveHttpPasswordButton.setEnabled(httpAuthButton.getSelection());
-
- if (repository != null) {
- saveHttpPasswordButton.setSelection(repository.getSavePassword(AuthenticationType.HTTP));
- } else {
- saveHttpPasswordButton.setSelection(false);
- }
- setHttpAuth(oldHttpAuthPassword != null && oldHttpAuthUserId != null && !oldHttpAuthUserId.equals(""));
-
- httpAuthExpComposite.setExpanded(httpAuthButton.getSelection());
- }
-
- if (needsProxy()) {
- addProxySection();
- }
-
- addStatusSection();
-
- Composite managementComposite = new Composite(compositeContainer, SWT.NULL);
- GridLayout managementLayout = new GridLayout(4, false);
- managementLayout.marginHeight = 0;
- managementLayout.marginWidth = 0;
- managementLayout.horizontalSpacing = 10;
- managementComposite.setLayout(managementLayout);
- managementComposite.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false, 2, 1));
-
- if (needsValidation()) {
- validateServerButton = new Button(managementComposite, SWT.PUSH);
- GridDataFactory.swtDefaults().span(2, SWT.DEFAULT).grab(false, false).applyTo(validateServerButton);
- validateServerButton.setText("Validate Settings");
- validateServerButton.addSelectionListener(new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- validateSettings();
- }
- });
- }
-
- createAccountHyperlink = toolkit.createHyperlink(managementComposite, "Create new account", SWT.NONE);
- createAccountHyperlink.setBackground(managementComposite.getBackground());
- createAccountHyperlink.addHyperlinkListener(new HyperlinkAdapter() {
- @Override
- public void linkActivated(HyperlinkEvent e) {
-// TaskRepository repository = getRepository();
- TaskRepository repository = createTaskRepository();
-// if (repository == null && getServerUrl() != null && getServerUrl().length() > 0) {
-// repository = createTaskRepository();
-// }
- if (repository != null) {
- String accountCreationUrl = TasksUiPlugin.getConnectorUi(connector.getConnectorKind())
- .getAccountCreationUrl(repository);
- if (accountCreationUrl != null) {
- TasksUiUtil.openUrl(accountCreationUrl);
- }
- }
- }
- });
-
- manageAccountHyperlink = toolkit.createHyperlink(managementComposite, "Change account settings", SWT.NONE);
- manageAccountHyperlink.setBackground(managementComposite.getBackground());
- manageAccountHyperlink.addHyperlinkListener(new HyperlinkAdapter() {
- @Override
- public void linkActivated(HyperlinkEvent e) {
- TaskRepository repository = getRepository();
- if (repository == null && getRepositoryUrl() != null && getRepositoryUrl().length() > 0) {
- repository = createTaskRepository();
- }
- if (repository != null) {
- String accountManagementUrl = TasksUiPlugin.getConnectorUi(connector.getConnectorKind())
- .getAccountManagementUrl(repository);
- if (accountManagementUrl != null) {
- TasksUiUtil.openUrl(accountManagementUrl);
- }
- }
- }
- });
-
- // bug 131656: must set echo char after setting value on Mac
- ((RepositoryStringFieldEditor) repositoryPasswordEditor).getTextControl().setEchoChar('*');
-
- if (needsAnonymousLogin()) {
- // do this after username and password widgets have been intialized
- if (repository != null) {
- setAnonymous(isAnonymousAccess());
- }
- }
-
- updateHyperlinks();
-
- setControl(compositeContainer);
- }
-
- private void addProxySection() {
-
- proxyExpComposite = toolkit.createExpandableComposite(compositeContainer, ExpandableComposite.COMPACT
- | ExpandableComposite.TWISTIE | ExpandableComposite.TITLE_BAR);
- proxyExpComposite.clientVerticalSpacing = 0;
- GridData gridData_2 = new GridData(SWT.FILL, SWT.FILL, true, false);
- gridData_2.horizontalIndent = -5;
- proxyExpComposite.setLayoutData(gridData_2);
- proxyExpComposite.setFont(compositeContainer.getFont());
- proxyExpComposite.setBackground(compositeContainer.getBackground());
- proxyExpComposite.setText("Proxy Server Configuration");
- proxyExpComposite.addExpansionListener(new ExpansionAdapter() {
- @Override
- public void expansionStateChanged(ExpansionEvent e) {
- getControl().getShell().pack();
- }
- });
-
- GridDataFactory.fillDefaults().span(2, SWT.DEFAULT).applyTo(proxyExpComposite);
-
- proxyAuthComp = toolkit.createComposite(proxyExpComposite, SWT.NONE);
- GridLayout gridLayout2 = new GridLayout();
- gridLayout2.numColumns = 2;
- gridLayout2.verticalSpacing = 0;
- proxyAuthComp.setLayout(gridLayout2);
- proxyAuthComp.setBackground(compositeContainer.getBackground());
- proxyExpComposite.setClient(proxyAuthComp);
-
- Composite settingsComposite = new Composite(proxyAuthComp, SWT.NULL);
- GridLayout gridLayout3 = new GridLayout();
- gridLayout3.numColumns = 2;
- gridLayout3.verticalSpacing = 0;
- settingsComposite.setLayout(gridLayout3);
-
- systemProxyButton = new Button(settingsComposite, SWT.CHECK);
- GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.TOP).span(2, SWT.DEFAULT).applyTo(settingsComposite);
-
- systemProxyButton.setText("Use global Network Connections preferences");
- Hyperlink changeProxySettingsLink = toolkit.createHyperlink(settingsComposite, "Change Settings", SWT.NULL);
- changeProxySettingsLink.setBackground(compositeContainer.getBackground());
- changeProxySettingsLink.addHyperlinkListener(new IHyperlinkListener() {
-
- public void linkActivated(HyperlinkEvent e) {
- PreferenceDialog dlg = PreferencesUtil.createPreferenceDialogOn(getShell(), PREFS_PAGE_ID_NET_PROXY,
- new String[] { PREFS_PAGE_ID_NET_PROXY }, null);
- dlg.open();
- }
-
- public void linkEntered(HyperlinkEvent e) {
- // ignore
- }
-
- public void linkExited(HyperlinkEvent e) {
- // ignore
- }
- });
-
- systemProxyButton.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- setUseDefaultProxy(systemProxyButton.getSelection());
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- // ignore
- }
- });
-
- proxyHostnameEditor = new StringFieldEditor("", "Proxy host address: ", StringFieldEditor.UNLIMITED,
- proxyAuthComp) {
-
- @Override
- protected boolean doCheckState() {
- return true;
- }
-
- @Override
- protected void valueChanged() {
- super.valueChanged();
- if (getWizard() != null) {
- getWizard().getContainer().updateButtons();
- }
- }
- };
- proxyHostnameEditor.setStringValue(oldProxyHostname);
-
- proxyPortEditor = new RepositoryStringFieldEditor("", "Proxy host port: ", StringFieldEditor.UNLIMITED,
- proxyAuthComp);
-
- proxyPortEditor.setStringValue(oldProxyPort);
-
- proxyHostnameEditor.setEnabled(systemProxyButton.getSelection(), proxyAuthComp);
- proxyPortEditor.setEnabled(systemProxyButton.getSelection(), proxyAuthComp);
-
- // ************* PROXY AUTHENTICATION **************
-
- proxyAuthButton = new Button(proxyAuthComp, SWT.CHECK);
- GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.TOP).span(2, SWT.DEFAULT).applyTo(proxyAuthButton);
-
- proxyAuthButton.setText("Enable proxy authentication");
- proxyAuthButton.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- setProxyAuth(proxyAuthButton.getSelection());
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- // ignore
- }
- });
-
- proxyUserNameEditor = new StringFieldEditor("", "User ID: ", StringFieldEditor.UNLIMITED, proxyAuthComp) {
-
- @Override
- protected boolean doCheckState() {
- return true;
- }
-
- @Override
- protected void valueChanged() {
- super.valueChanged();
- if (getWizard() != null) {
- getWizard().getContainer().updateButtons();
- }
- }
- };
- proxyPasswordEditor = new RepositoryStringFieldEditor("", "Password: ", StringFieldEditor.UNLIMITED,
- proxyAuthComp);
- ((RepositoryStringFieldEditor) proxyPasswordEditor).getTextControl().setEchoChar('*');
-
- // proxyPasswordEditor.setEnabled(httpAuthButton.getSelection(),
- // advancedComp);
- // ((StringFieldEditor)
- // httpAuthPasswordEditor).setEnabled(httpAuthButton.getSelection(),
- // advancedComp);
-
- saveProxyPasswordButton = new Button(proxyAuthComp, SWT.CHECK);
- GridDataFactory.fillDefaults().span(2, SWT.DEFAULT).applyTo(saveProxyPasswordButton);
- saveProxyPasswordButton.setText("Save Proxy Password");
- saveProxyPasswordButton.setEnabled(proxyAuthButton.getSelection());
-
- if (repository != null) {
- saveProxyPasswordButton.setSelection(repository.getSavePassword(AuthenticationType.PROXY));
- } else {
- saveProxyPasswordButton.setSelection(false);
- }
-
- setProxyAuth(oldProxyUsername != null && oldProxyPassword != null && !oldProxyUsername.equals(""));
-
- setUseDefaultProxy(repository != null ? repository.isDefaultProxyEnabled() : true);
- proxyExpComposite.setExpanded(!systemProxyButton.getSelection());
- }
-
- private void addStatusSection() {
- ExpandableComposite statusComposite = toolkit.createExpandableComposite(compositeContainer,
- ExpandableComposite.COMPACT | ExpandableComposite.TWISTIE | ExpandableComposite.TITLE_BAR);
- statusComposite.clientVerticalSpacing = 0;
- GridData gd = new GridData(SWT.FILL, SWT.FILL, true, false);
- gd.horizontalIndent = -5;
- statusComposite.setLayoutData(gd);
- statusComposite.setFont(compositeContainer.getFont());
- statusComposite.setBackground(compositeContainer.getBackground());
- statusComposite.setText("Status");
- statusComposite.addExpansionListener(new ExpansionAdapter() {
- @Override
- public void expansionStateChanged(ExpansionEvent e) {
- getControl().getShell().pack();
- }
- });
- GridDataFactory.fillDefaults().span(2, SWT.DEFAULT).applyTo(statusComposite);
-
- Composite composite = toolkit.createComposite(statusComposite, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.verticalSpacing = 0;
- composite.setLayout(layout);
- composite.setBackground(compositeContainer.getBackground());
- statusComposite.setClient(composite);
-
- disconnectedButton = new Button(composite, SWT.CHECK);
- disconnectedButton.setText("Disconnected");
- GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.TOP).span(2, SWT.DEFAULT).applyTo(disconnectedButton);
- disconnectedButton.setSelection(repository != null ? repository.isOffline() : false);
- statusComposite.setExpanded(disconnectedButton.getSelection());
- }
-
- protected void setEncoding(String encoding) {
- if (encoding.equals(TaskRepository.DEFAULT_CHARACTER_ENCODING)) {
- setDefaultEncoding();
- } else {
- if (otherEncodingCombo.indexOf(encoding) != -1) {
- defaultEncoding.setSelection(false);
- otherEncodingCombo.setEnabled(true);
- otherEncoding.setSelection(true);
- otherEncodingCombo.select(otherEncodingCombo.indexOf(encoding));
- } else {
- setDefaultEncoding();
- }
- }
- }
-
- private void setDefaultEncoding() {
- defaultEncoding.setSelection(true);
- otherEncoding.setSelection(false);
- otherEncodingCombo.setEnabled(false);
- if (otherEncodingCombo.getItemCount() > 0) {
- otherEncodingCombo.select(0);
- }
- }
-
- public void setAnonymous(boolean selected) {
- if (!needsAnonymousLogin) {
- return;
- }
-
- anonymousButton.setSelection(selected);
-
- if (selected) {
- oldUsername = repositoryUserNameEditor.getStringValue();
- oldPassword = (repositoryPasswordEditor).getStringValue();
- repositoryUserNameEditor.setStringValue("");
- repositoryPasswordEditor.setStringValue("");
- } else {
- repositoryUserNameEditor.setStringValue(oldUsername);
- repositoryPasswordEditor.setStringValue(oldPassword);
- }
-
- repositoryUserNameEditor.setEnabled(!selected, compositeContainer);
- repositoryPasswordEditor.setEnabled(!selected, compositeContainer);
- savePasswordButton.setEnabled(!selected);
- if (getWizard() != null) {
- getWizard().getContainer().updateButtons();
- }
- }
-
- public void setHttpAuth(boolean selected) {
- if (!needsHttpAuth) {
- return;
- }
- httpAuthButton.setSelection(selected);
- if (!selected) {
- oldHttpAuthUserId = httpAuthUserNameEditor.getStringValue();
- oldHttpAuthPassword = httpAuthPasswordEditor.getStringValue();
- httpAuthUserNameEditor.setStringValue(null);
- httpAuthPasswordEditor.setStringValue(null);
- } else {
- httpAuthUserNameEditor.setStringValue(oldHttpAuthUserId);
- httpAuthPasswordEditor.setStringValue(oldHttpAuthPassword);
- }
- httpAuthUserNameEditor.setEnabled(selected, httpAuthComp);
- httpAuthPasswordEditor.setEnabled(selected, httpAuthComp);
- saveHttpPasswordButton.setEnabled(selected);
- }
-
- /**
- * @since 2.2
- */
- public boolean getHttpAuth() {
- return httpAuthButton.getSelection();
- }
-
- public void setUseDefaultProxy(boolean selected) {
- if (!needsProxy) {
- return;
- }
-
- systemProxyButton.setSelection(selected);
-
- if (selected) {
- oldProxyHostname = proxyHostnameEditor.getStringValue();
- oldProxyPort = proxyPortEditor.getStringValue();
- // proxyHostnameEditor.setStringValue(null);
- // proxyPortEditor.setStringValue(null);
- } else {
- proxyHostnameEditor.setStringValue(oldProxyHostname);
- proxyPortEditor.setStringValue(oldProxyPort);
- }
- proxyHostnameEditor.setEnabled(!selected, proxyAuthComp);
- proxyPortEditor.setEnabled(!selected, proxyAuthComp);
- proxyAuthButton.setEnabled(!selected);
- setProxyAuth(proxyAuthButton.getSelection());
- }
-
- public void setProxyAuth(boolean selected) {
-
- proxyAuthButton.setSelection(selected);
- proxyAuthButton.setEnabled(!systemProxyButton.getSelection());
- if (!selected) {
- oldProxyUsername = proxyUserNameEditor.getStringValue();
- oldProxyPassword = proxyPasswordEditor.getStringValue();
- proxyUserNameEditor.setStringValue(null);
- proxyPasswordEditor.setStringValue(null);
- } else {
- proxyUserNameEditor.setStringValue(oldProxyUsername);
- proxyPasswordEditor.setStringValue(oldProxyPassword);
- }
-
- proxyUserNameEditor.setEnabled(selected && !systemProxyButton.getSelection(), proxyAuthComp);
- proxyPasswordEditor.setEnabled(selected && !systemProxyButton.getSelection(), proxyAuthComp);
- saveProxyPasswordButton.setEnabled(selected && !systemProxyButton.getSelection());
- }
-
- /**
- * @since 2.2
- */
- public boolean getProxyAuth() {
- return proxyAuthButton.getSelection();
- }
-
- /**
- * @since 3.0
- */
- protected void addRepositoryTemplatesToServerUrlCombo() {
- final RepositoryTemplateManager templateManager = TasksUiPlugin.getRepositoryTemplateManager();
- for (RepositoryTemplate template : templateManager.getTemplates(connector.getConnectorKind())) {
- serverUrlCombo.add(template.label);
- }
- serverUrlCombo.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- String text = serverUrlCombo.getText();
- RepositoryTemplate template = templateManager.getTemplate(connector.getConnectorKind(), text);
- if (template != null) {
- repositoryTemplateSelected(template);
- return;
- }
- }
-
- });
- }
-
- /**
- * @since 3.0
- */
- protected void repositoryTemplateSelected(RepositoryTemplate template) {
- }
-
- protected abstract void createAdditionalControls(Composite parent);
-
- protected abstract boolean isValidUrl(String name);
-
- void updateHyperlinks() {
- if (getRepositoryUrl() != null && getRepositoryUrl().length() > 0) {
- TaskRepository repository = createTaskRepository();
- String accountCreationUrl = TasksUiPlugin.getConnectorUi(connector.getConnectorKind())
- .getAccountCreationUrl(repository);
- createAccountHyperlink.setEnabled(accountCreationUrl != null);
- createAccountHyperlink.setVisible(accountCreationUrl != null);
-
- String accountManagementUrl = TasksUiPlugin.getConnectorUi(connector.getConnectorKind())
- .getAccountManagementUrl(repository);
- manageAccountHyperlink.setEnabled(accountManagementUrl != null);
- manageAccountHyperlink.setVisible(accountManagementUrl != null);
- } else {
- createAccountHyperlink.setEnabled(false);
- createAccountHyperlink.setVisible(false);
- manageAccountHyperlink.setEnabled(false);
- manageAccountHyperlink.setVisible(false);
- }
- }
-
- public String getRepositoryLabel() {
- return repositoryLabelEditor.getStringValue();
- }
-
- /**
- * @since 3.0
- */
- public String getRepositoryUrl() {
- return TaskRepositoryManager.stripSlashes(serverUrlCombo.getText());
- }
-
- public String getUserName() {
- return repositoryUserNameEditor.getStringValue();
- }
-
- public String getPassword() {
- return repositoryPasswordEditor.getStringValue();
- }
-
- public String getHttpAuthUserId() {
- if (needsHttpAuth()) {
- return httpAuthUserNameEditor.getStringValue();
- } else {
- return "";
- }
- }
-
- public String getHttpAuthPassword() {
- if (needsHttpAuth()) {
- return httpAuthPasswordEditor.getStringValue();
- } else {
- return "";
- }
- }
-
- public String getProxyHostname() {
- if (needsProxy()) {
- return proxyHostnameEditor.getStringValue();
- } else {
- return "";
- }
- }
-
- public String getProxyPort() {
- if (needsProxy()) {
- return proxyPortEditor.getStringValue();
- } else {
- return "";
- }
- }
-
- public Boolean getUseDefaultProxy() {
- if (needsProxy()) {
- return systemProxyButton.getSelection();
- } else {
- return true;
- }
- }
-
- public String getProxyUserName() {
- if (needsProxy()) {
- return proxyUserNameEditor.getStringValue();
- } else {
- return "";
- }
- }
-
- public String getProxyPassword() {
- if (needsProxy()) {
- return proxyPasswordEditor.getStringValue();
- } else {
- return "";
- }
- }
-
- public void init(IWorkbench workbench) {
- // ignore
- }
-
- public boolean isAnonymousAccess() {
- if (anonymousButton != null) {
- return anonymousButton.getSelection();
- } else {
- return false;
- }
- }
-
- /**
- * Exposes StringFieldEditor.refreshValidState()
- *
- * TODO: is there a better way?
- */
- private static class RepositoryStringFieldEditor extends StringFieldEditor {
- public RepositoryStringFieldEditor(String name, String labelText, int style, Composite parent) {
- super(name, labelText, style, parent);
- }
-
- @Override
- public void refreshValidState() {
- try {
- super.refreshValidState();
- } catch (Exception e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Problem refreshing password field", e));
- }
- }
-
- @Override
- public Text getTextControl() {
- return super.getTextControl();
- }
-
- }
-
- @Override
- public boolean isPageComplete() {
- String errorMessage = null;
- String url = getRepositoryUrl();
- errorMessage = isUniqueUrl(url);
- if (errorMessage == null && !isValidUrl(url)) {
- errorMessage = "Enter a valid server url";
- }
- if (errorMessage == null) {
- errorMessage = credentialsComplete();
- }
-
- setErrorMessage(errorMessage);
- return errorMessage == null;
- }
-
- private String credentialsComplete() {
- if ((needsAnonymousLogin() && !anonymousButton.getSelection())
- && (repositoryUserNameEditor.getStringValue().trim().equals("") || (repositoryPasswordEditor.getStringValue()
- .trim().equals("")))) {
- return "Repository user name and password must not be blank";
- }
- return null;
-
- }
-
- protected String isUniqueUrl(String urlString) {
- if (!urlString.equals(originalUrl)) {
- if (repositoryUrls == null) {
- List<TaskRepository> repositories = TasksUi.getRepositoryManager().getAllRepositories();
- repositoryUrls = new HashSet<String>(repositories.size());
- for (TaskRepository repository : repositories) {
- repositoryUrls.add(repository.getRepositoryUrl());
- }
- }
-
- if (repositoryUrls.contains(urlString)) {
- return "Repository already exists.";
- }
- }
- return null;
- }
-
- @Deprecated
- public void setRepository(TaskRepository repository) {
- this.repository = repository;
- }
-
- @Deprecated
- public void setVersion(String previousVersion) {
- if (previousVersion == null) {
- serverVersion = TaskRepository.NO_VERSION_SPECIFIED;
- } else {
- serverVersion = previousVersion;
- }
- }
-
- public String getVersion() {
- return serverVersion;
- }
-
- public TaskRepository getRepository() {
- return repository;
- }
-
- public String getCharacterEncoding() {
- if (defaultEncoding == null) {
- return null;
- }
-
- if (defaultEncoding.getSelection()) {
- return TaskRepository.DEFAULT_CHARACTER_ENCODING;
- } else {
- if (otherEncodingCombo.getSelectionIndex() > -1) {
- return otherEncodingCombo.getItem(otherEncodingCombo.getSelectionIndex());
- } else {
- return TaskRepository.DEFAULT_CHARACTER_ENCODING;
- }
- }
- }
-
- public TaskRepository createTaskRepository() {
- TaskRepository repository = new TaskRepository(connector.getConnectorKind(), getRepositoryUrl());
- applyTo(repository);
- return repository;
- }
-
- /**
- * @since 2.2
- */
- public void applyTo(TaskRepository repository) {
- repository.setVersion(getVersion());
- if (needsEncoding()) {
- repository.setCharacterEncoding(getCharacterEncoding());
- }
-
- if (isAnonymousAccess()) {
- repository.setCredentials(AuthenticationType.REPOSITORY, null, getSavePassword());
- } else {
- AuthenticationCredentials credentials = new AuthenticationCredentials(getUserName(), getPassword());
- repository.setCredentials(AuthenticationType.REPOSITORY, credentials, getSavePassword());
- }
- repository.setRepositoryLabel(getRepositoryLabel());
- repository.setAnonymous(isAnonymousAccess());
-
- if (needsHttpAuth()) {
- if (getHttpAuth()) {
- AuthenticationCredentials webCredentials = new AuthenticationCredentials(getHttpAuthUserId(),
- getHttpAuthPassword());
- repository.setCredentials(AuthenticationType.HTTP, webCredentials, getSaveHttpPassword());
- } else {
- repository.setCredentials(AuthenticationType.HTTP, null, getSaveHttpPassword());
- }
- }
-
- if (needsProxy()) {
- repository.setProperty(TaskRepository.PROXY_USEDEFAULT, String.valueOf(getUseDefaultProxy()));
- repository.setProperty(TaskRepository.PROXY_HOSTNAME, getProxyHostname());
- repository.setProperty(TaskRepository.PROXY_PORT, getProxyPort());
- if (getProxyAuth()) {
- AuthenticationCredentials webCredentials = new AuthenticationCredentials(getProxyUserName(),
- getProxyPassword());
- repository.setCredentials(AuthenticationType.PROXY, webCredentials, getSaveProxyPassword());
- } else {
- repository.setCredentials(AuthenticationType.PROXY, null, getSaveProxyPassword());
- }
- }
-
- repository.setOffline(disconnectedButton.getSelection());
- }
-
- public AbstractRepositoryConnector getConnector() {
- return connector;
- }
-
- public boolean needsEncoding() {
- return needsEncoding;
- }
-
- public boolean needsTimeZone() {
- return needsTimeZone;
- }
-
- public boolean needsAnonymousLogin() {
- return needsAnonymousLogin;
- }
-
- public boolean needsAdvanced() {
- return needsAdvanced;
- }
-
- public void setNeedsEncoding(boolean needsEncoding) {
- this.needsEncoding = needsEncoding;
- }
-
- public void setNeedsTimeZone(boolean needsTimeZone) {
- this.needsTimeZone = needsTimeZone;
- }
-
- public void setNeedsAdvanced(boolean needsAdvanced) {
- this.needsAdvanced = needsAdvanced;
- }
-
- public boolean needsHttpAuth() {
- return this.needsHttpAuth;
- }
-
- public void setNeedsHttpAuth(boolean needsHttpAuth) {
- this.needsHttpAuth = needsHttpAuth;
- }
-
- public void setNeedsProxy(boolean needsProxy) {
- this.needsProxy = needsProxy;
- }
-
- public boolean needsProxy() {
- return this.needsProxy;
- }
-
- public void setNeedsAnonymousLogin(boolean needsAnonymousLogin) {
- this.needsAnonymousLogin = needsAnonymousLogin;
- }
-
- public void setNeedsValidation(boolean needsValidation) {
- this.needsValidation = needsValidation;
- }
-
- public boolean needsValidation() {
- return needsValidation;
- }
-
- /** for testing */
- public void setUrl(String url) {
- serverUrlCombo.setText(url);
- }
-
- /** for testing */
- public void setUserId(String id) {
- repositoryUserNameEditor.setStringValue(id);
- }
-
- /** for testing */
- public void setPassword(String pass) {
- repositoryPasswordEditor.setStringValue(pass);
- }
-
- /**
- * @since 2.2
- */
- public Boolean getSavePassword() {
- return savePasswordButton.getSelection();
- }
-
- /**
- * @since 2.2
- */
- public Boolean getSaveProxyPassword() {
- if (needsProxy()) {
- return saveProxyPasswordButton.getSelection();
- } else {
- return false;
- }
- }
-
- /**
- * @since 2.2
- */
- public Boolean getSaveHttpPassword() {
- if (needsHttpAuth()) {
- return saveHttpPasswordButton.getSelection();
- } else {
- return false;
- }
- }
-
- protected void validateSettings() {
- final Validator validator = getValidator(createTaskRepository());
- if (validator == null) {
- return;
- }
-
- try {
- getWizard().getContainer().run(true, true, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- monitor.beginTask("Validating server settings", IProgressMonitor.UNKNOWN);
- try {
- validator.run(monitor);
- if (validator.getStatus() == null) {
- validator.setStatus(Status.OK_STATUS);
- }
- } catch (CoreException e) {
- validator.setStatus(e.getStatus());
- } catch (OperationCanceledException e) {
- validator.setStatus(Status.CANCEL_STATUS);
- throw new InterruptedException();
- } catch (Exception e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
- });
- } catch (InvocationTargetException e) {
- StatusHandler.fail(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Internal error validating repository", e.getCause()));
- return;
- } catch (InterruptedException e) {
- // canceled
- return;
- }
-
- applyValidatorResult(validator);
- getWizard().getContainer().updateButtons();
- }
-
- protected void applyValidatorResult(Validator validator) {
- IStatus status = validator.getStatus();
- String message = status.getMessage();
- if (message == null || message.length() == 0) {
- message = null;
- }
- switch (status.getSeverity()) {
- case IStatus.OK:
- if (status == Status.OK_STATUS) {
- if (getUserName().length() > 0) {
- message = "Authentication credentials are valid.";
- } else {
- message = "Repository is valid.";
- }
- }
- setMessage(message, IMessageProvider.INFORMATION);
- break;
- case IStatus.INFO:
- setMessage(message, IMessageProvider.INFORMATION);
- break;
- case IStatus.WARNING:
- setMessage(message, IMessageProvider.WARNING);
- break;
- default:
- setMessage(message, IMessageProvider.ERROR);
- break;
- }
- setErrorMessage(null);
- }
-
- protected abstract Validator getValidator(TaskRepository repository);
-
- // public for testing
- public abstract class Validator {
-
- private IStatus status;
-
- public abstract void run(IProgressMonitor monitor) throws CoreException;
-
- public IStatus getStatus() {
- return status;
- }
-
- public void setStatus(IStatus status) {
- this.status = status;
- }
-
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/ITaskRepositoryPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/ITaskRepositoryPage.java
deleted file mode 100644
index 772a7a30f..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/ITaskRepositoryPage.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.ui.wizards;
-
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-/**
- * @author Steffen Pingel
- * @since 3.0
- */
-public interface ITaskRepositoryPage extends IWizardPage {
-
- public abstract TaskRepository createTaskRepository();
-
- public abstract void applyTo(TaskRepository repository);
-
- public abstract String getRepositoryUrl();
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/ITaskSearchPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/ITaskSearchPage.java
deleted file mode 100644
index 70b434e57..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/ITaskSearchPage.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.ui.wizards;
-
-import org.eclipse.jface.dialogs.IDialogPage;
-
-/**
- * @author Steffen Pingel
- * @since 3.0
- */
-public interface ITaskSearchPage extends IDialogPage {
-
- public abstract void setContainer(ITaskSearchPageContainer container);
-
- public abstract boolean performSearch();
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/ITaskSearchPageContainer.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/ITaskSearchPageContainer.java
deleted file mode 100644
index c86b9eef6..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/ITaskSearchPageContainer.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.ui.wizards;
-
-import org.eclipse.jface.operation.IRunnableContext;
-
-/**
- * @author Steffen Pingel
- * @since 3.0
- */
-public interface ITaskSearchPageContainer {
-
- public abstract IRunnableContext getRunnableContext();
-
- public abstract void setPerformActionEnabled(boolean enabled);
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/NewTaskWizard.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/NewTaskWizard.java
deleted file mode 100644
index f32a24f05..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/NewTaskWizard.java
+++ /dev/null
@@ -1,208 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.ui.wizards;
-
-import java.lang.reflect.InvocationTargetException;
-
-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.OperationCanceledException;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractAttributeFactory;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractLegacyRepositoryConnector;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.TaskSelection;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.deprecated.NewTaskEditorInput;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.ITaskMapping;
-import org.eclipse.mylyn.tasks.core.RepositoryStatus;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.data.TaskData;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;
-import org.eclipse.ui.INewWizard;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Extend for customizing how new tasks editors are created.
- *
- * @author Steffen Pingel
- * @since 2.0
- */
-public class NewTaskWizard extends Wizard implements INewWizard {
-
- private final TaskRepository taskRepository;
-
- private ITaskMapping taskSelection;
-
- /**
- * @since 3.0
- */
- public NewTaskWizard(TaskRepository taskRepository, ITaskMapping taskSelection) {
- Assert.isNotNull(taskRepository);
- this.taskRepository = taskRepository;
- this.taskSelection = taskSelection;
- setDefaultPageImageDescriptor(TasksUiImages.BANNER_REPOSITORY);
- setNeedsProgressMonitor(true);
- }
-
- public NewTaskWizard(TaskRepository taskRepository) {
- this.taskRepository = taskRepository;
- }
-
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- }
-
- @Override
- public void addPages() {
- }
-
- @Override
- public boolean canFinish() {
- return true;
- }
-
- /**
- * @since 3.0
- */
- protected ITaskMapping getInitializationData() {
- return null;
- }
-
- /**
- * @since 3.0
- */
- public TaskRepository getTaskRepository() {
- return taskRepository;
- }
-
- /**
- * @since 3.0
- */
- public ITaskMapping getTaskSelection() {
- return taskSelection;
- }
-
- @SuppressWarnings( { "deprecation", "restriction" })
- @Override
- public boolean performFinish() {
- AbstractRepositoryConnector connector = TasksUi.getRepositoryManager().getRepositoryConnector(
- taskRepository.getConnectorKind());
- if (connector instanceof AbstractLegacyRepositoryConnector) {
- return createLegacyTask((AbstractLegacyRepositoryConnector) connector);
- }
-
- final TaskData[] taskData = new TaskData[1];
- final ITaskMapping initializationData = getInitializationData();
- final ITaskMapping selectionData = getTaskSelection();
- try {
- IRunnableWithProgress runnable = new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- taskData[0] = TasksUiInternal.createTaskData(taskRepository, initializationData, selectionData,
- monitor);
- } catch (OperationCanceledException e) {
- throw new InterruptedException();
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- }
- }
- };
- getContainer().run(true, true, runnable);
- } catch (InvocationTargetException e) {
- if (e.getCause() instanceof CoreException) {
- TasksUiInternal.displayStatus("Error creating new task", ((CoreException) e.getCause()).getStatus());
- } else {
- StatusHandler.fail(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Error creating new task",
- e.getCause()));
- }
- return false;
- } catch (InterruptedException e) {
- return false;
- }
-
- try {
- TasksUiInternal.createAndOpenNewTask(taskData[0]);
- return true;
- } catch (CoreException e) {
- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Failed to open new task", e));
- TasksUiInternal.displayStatus("Create Task", new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Failed to create new task: " + e.getMessage()));
- return false;
- }
- }
-
- @SuppressWarnings( { "deprecation", "restriction" })
- private boolean createLegacyTask(AbstractLegacyRepositoryConnector legacyConnector) {
- final org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractTaskDataHandler taskDataHandler = legacyConnector.getLegacyTaskDataHandler();
- if (taskDataHandler == null) {
- TasksUiInternal.displayStatus("Error creating new task", new RepositoryStatus(IStatus.ERROR,
- TasksUiPlugin.ID_PLUGIN, RepositoryStatus.ERROR_REPOSITORY,
- "The selected repository does not support creating new tasks."));
- return false;
- }
-
- AbstractAttributeFactory attributeFactory = taskDataHandler.getAttributeFactory(
- taskRepository.getRepositoryUrl(), taskRepository.getConnectorKind(), AbstractTask.DEFAULT_TASK_KIND);
-
- final RepositoryTaskData taskData = new RepositoryTaskData(attributeFactory, taskRepository.getConnectorKind(),
- taskRepository.getRepositoryUrl(), TasksUiPlugin.getDefault().getNextNewRepositoryTaskId());
- taskData.setNew(true);
-
- try {
- IRunnableWithProgress runnable = new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- if (!taskDataHandler.initializeTaskData(taskRepository, taskData, monitor)) {
- throw new CoreException(new RepositoryStatus(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- RepositoryStatus.ERROR_REPOSITORY,
- "The selected repository does not support creating new tasks."));
- }
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- }
- }
- };
-
- getContainer().run(true, true, runnable);
- } catch (InvocationTargetException e) {
- if (e.getCause() instanceof CoreException) {
- TasksUiInternal.displayStatus("Error creating new task", ((CoreException) e.getCause()).getStatus());
- } else {
- StatusHandler.fail(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Error creating new task",
- e.getCause()));
- }
- return false;
- } catch (InterruptedException e) {
- return false;
- }
-
- if (taskSelection instanceof TaskSelection) {
- taskDataHandler.cloneTaskData(((TaskSelection) taskSelection).getLegacyTaskData(), taskData);
- }
-
- NewTaskEditorInput editorInput = new NewTaskEditorInput(taskRepository, taskData);
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- TasksUiUtil.openEditor(editorInput, TaskEditor.ID_EDITOR, page);
- return true;
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/NewWebTaskWizard.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/NewWebTaskWizard.java
deleted file mode 100644
index 1fd16b7e4..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/NewWebTaskWizard.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.ui.wizards;
-
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.TaskSelection;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.NewWebTaskPage;
-import org.eclipse.mylyn.tasks.core.ITaskMapping;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.ui.INewWizard;
-import org.eclipse.ui.IWorkbench;
-
-/**
- * Wizard for creating new tickets through a web browser.
- *
- * @author Eugene Kuleshov
- * @author Mik Kersten
- * @author Steffen Pingel
- * @since 2.0
- */
-public class NewWebTaskWizard extends Wizard implements INewWizard {
-
- protected TaskRepository taskRepository;
-
- protected String newTaskUrl;
-
- private final ITaskMapping taskSelection;
-
- /**
- * @since 3.0
- */
- public NewWebTaskWizard(TaskRepository taskRepository, String newTaskUrl, ITaskMapping taskSelection) {
- this.taskRepository = taskRepository;
- this.newTaskUrl = newTaskUrl;
- this.taskSelection = taskSelection;
-
- setWindowTitle("New Task");
- setDefaultPageImageDescriptor(TasksUiImages.BANNER_REPOSITORY);
- }
-
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- }
-
- @Override
- public void addPages() {
- addPage(new NewWebTaskPage(taskSelection));
- }
-
- @Override
- public boolean canFinish() {
- return true;
- }
-
- @Override
- public boolean performFinish() {
- handleSelection(taskSelection);
- TasksUiUtil.openUrl(newTaskUrl);
- return true;
- }
-
- private void handleSelection(final ITaskMapping taskSelection) {
- if (taskSelection == null) {
- return;
- }
-
- if (taskSelection instanceof TaskSelection) {
- RepositoryTaskData taskData = ((TaskSelection) taskSelection).getLegacyTaskData();
- String summary = taskData.getSummary();
- String description = taskData.getDescription();
-
- Clipboard clipboard = new Clipboard(getShell().getDisplay());
- clipboard.setContents(new Object[] { summary + "\n" + description },
- new Transfer[] { TextTransfer.getInstance() });
- }
- // FIXME 3.0 implement TaskData support
-
- MessageDialog.openInformation(
- getShell(),
- "New Task",
- "This connector does not provide a rich task editor for creating tasks.\n\n"
- + "The error contents have been placed in the clipboard so that you can paste them into the entry form.");
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/RepositoryQueryWizard.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/RepositoryQueryWizard.java
deleted file mode 100644
index e6be135ba..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/RepositoryQueryWizard.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.ui.wizards;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-
-/**
- * Extend to provide a custom edit query dialog, typically invoked by the user requesting properties on a query node in
- * the Task List.
- *
- * @author Mik Kersten
- * @author Steffen Pingel
- * @since 3.0
- */
-public class RepositoryQueryWizard extends Wizard {
-
- private static final String TITLE = "Edit Repository Query";
-
- private final TaskRepository repository;
-
- /**
- * @since 3.0
- */
- public RepositoryQueryWizard(TaskRepository repository) {
- Assert.isNotNull(repository);
- this.repository = repository;
- setNeedsProgressMonitor(true);
- setWindowTitle(TITLE);
- setDefaultPageImageDescriptor(TasksUiImages.BANNER_REPOSITORY);
- }
-
- @Override
- public boolean canFinish() {
- IWizardPage currentPage = getContainer().getCurrentPage();
- if (currentPage instanceof AbstractRepositoryQueryPage) {
- return currentPage.isPageComplete();
- }
- return false;
- }
-
- @Override
- public boolean performFinish() {
- IWizardPage currentPage = getContainer().getCurrentPage();
- if (!(currentPage instanceof AbstractRepositoryQueryPage)) {
- StatusHandler.fail(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
- "Current wizard page does not extends AbstractRepositoryQueryPage"));
- return false;
- }
-
- AbstractRepositoryQueryPage page = (AbstractRepositoryQueryPage) currentPage;
- IRepositoryQuery query = page.getQuery();
- if (query != null) {
- page.applyTo(query);
- if (query instanceof RepositoryQuery) {
- TasksUiPlugin.getTaskList().notifyElementChanged((RepositoryQuery) query);
- }
- } else {
- query = page.createQuery();
- TasksUiInternal.getTaskList().addQuery((RepositoryQuery) query);
- }
- AbstractRepositoryConnector connector = TasksUi.getRepositoryManager().getRepositoryConnector(
- getTaskRepository().getConnectorKind());
- TasksUiInternal.synchronizeQuery(connector, (RepositoryQuery) query, null, true);
- return true;
- }
-
- public TaskRepository getTaskRepository() {
- return repository;
- }
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/TaskAttachmentPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/TaskAttachmentPage.java
deleted file mode 100644
index ddf26edfc..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/TaskAttachmentPage.java
+++ /dev/null
@@ -1,326 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.ui.wizards;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.mylyn.context.core.ContextCore;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.tasks.core.data.TaskAttachmentMapper;
-import org.eclipse.mylyn.tasks.core.data.TaskAttachmentModel;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * A wizard page to enter details of a new attachment.
- *
- * @author Jeff Pound
- * @author Mik Kersten
- * @author Steffen Pingel
- * @since 3.0
- */
-public class TaskAttachmentPage extends WizardPage {
-
- private static List<String> contentTypes;
-
- private static Map<String, String> extensions2Types;
-
- static {
- /* For UI */
- contentTypes = new LinkedList<String>();
- contentTypes.add("text/plain");
- contentTypes.add("text/html");
- contentTypes.add("application/xml");
- contentTypes.add("image/gif");
- contentTypes.add("image/jpeg");
- contentTypes.add("image/png");
- contentTypes.add("application/octet-stream");
-
- /* For auto-detect */
- extensions2Types = new HashMap<String, String>();
- extensions2Types.put("txt", "text/plain");
- extensions2Types.put("html", "text/html");
- extensions2Types.put("htm", "text/html");
- extensions2Types.put("jpg", "image/jpeg");
- extensions2Types.put("jpeg", "image/jpeg");
- extensions2Types.put("gif", "image/gif");
- extensions2Types.put("png", "image/png");
- extensions2Types.put("xml", "application/xml");
- extensions2Types.put("zip", "application/octet-stream");
- extensions2Types.put("tar", "application/octet-stream");
- extensions2Types.put("gz", "application/octet-stream");
- }
-
- private Button attachContextButton;
-
- private Text commentText;
-
- private Text descriptionText;
-
- private Combo contentTypeList;
-
- private Text fileNameText;
-
- private Button isPatchButton;
-
- private final TaskAttachmentModel model;
-
- private boolean needsDescription;
-
- private final TaskAttachmentMapper taskAttachment;
-
- private boolean first = true;
-
- public TaskAttachmentPage(TaskAttachmentModel model) {
- super("AttachmentDetails");
- this.model = model;
- this.taskAttachment = TaskAttachmentMapper.createFrom(model.getAttribute());
- setTitle("Attachment Details");
- setNeedsDescription(true);
- }
-
- public void createControl(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout gridLayout = new GridLayout();
- gridLayout.numColumns = 3;
- composite.setLayout(gridLayout);
- setControl(composite);
-
- composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- composite.setLayout(new GridLayout(3, false));
-
- new Label(composite, SWT.NONE).setText("File");
- fileNameText = new Text(composite, SWT.BORDER);
- fileNameText.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, 2, 1));
-
- if (needsDescription) {
- new Label(composite, SWT.NONE).setText("Description");
- descriptionText = new Text(composite, SWT.BORDER);
- descriptionText.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, 2, 1));
-
- descriptionText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- if ("".equals(descriptionText.getText().trim())) {
- setErrorMessage("Description required");
- } else {
- taskAttachment.setDescription(descriptionText.getText().trim());
- if (!"".equals(fileNameText.getText())) {
- setPageComplete(true);
- setErrorMessage(null);
- }
- }
- }
-
- });
- }
-
- Label label = new Label(composite, SWT.NONE);
- label.setLayoutData(new GridData(SWT.LEFT, SWT.FILL, false, false));
- label.setText("Comment");
- commentText = new Text(composite, SWT.V_SCROLL | SWT.BORDER | SWT.WRAP);
- commentText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));
-
- new Label(composite, SWT.NONE).setText("Content Type");// .setBackground(parent.getBackground());
-
- contentTypeList = new Combo(composite, SWT.BORDER | SWT.DROP_DOWN | SWT.READ_ONLY);
- contentTypeList.setLayoutData(new GridData(SWT.DEFAULT, SWT.DEFAULT, false, false, 2, 1));
- final HashMap<String, Integer> contentTypeIndices = new HashMap<String, Integer>();
- Iterator<String> iter = contentTypes.iterator();
- int i = 0;
- while (iter.hasNext()) {
- String next = iter.next();
- contentTypeList.add(next);
- contentTypeIndices.put(next, new Integer(i));
- i++;
- }
-
- /* Update attachment on select content type */
- contentTypeList.addSelectionListener(new SelectionListener() {
- public void widgetDefaultSelected(SelectionEvent e) {
- // ignore
- }
-
- public void widgetSelected(SelectionEvent e) {
- taskAttachment.setContentType(contentTypeList.getItem(contentTypeList.getSelectionIndex()));
- }
- });
- contentTypeList.select(0);
- taskAttachment.setContentType(contentTypeList.getItem(0));
-
- // TODO: is there a better way to pad?
- new Label(composite, SWT.NONE);
-
- isPatchButton = new Button(composite, SWT.CHECK);
- isPatchButton.setLayoutData(new GridData(SWT.DEFAULT, SWT.DEFAULT, false, false, 2, 1));
- isPatchButton.setText("Patch");
-
- // TODO: is there a better way to pad?
- new Label(composite, SWT.NONE);
-
- attachContextButton = new Button(composite, SWT.CHECK);
- attachContextButton.setLayoutData(new GridData(SWT.DEFAULT, SWT.DEFAULT, false, false, 2, 1));
- attachContextButton.setText("Attach Context");
- attachContextButton.setImage(CommonImages.getImage(TasksUiImages.CONTEXT_ATTACH));
- attachContextButton.setEnabled(ContextCore.getContextManager()
- .hasContext(model.getTask().getHandleIdentifier()));
-
- /*
- * Attachment file name listener, update the local attachment
- * accordingly
- */
- fileNameText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- // Determine type by extension
- int index = fileNameText.getText().lastIndexOf(".");
- if (index > 0 && index < fileNameText.getText().length()) {
- String ext = fileNameText.getText().substring(index + 1);
- String type = extensions2Types.get(ext.toLowerCase(Locale.ENGLISH));
- if (type != null) {
- contentTypeList.select(contentTypeIndices.get(type));
- taskAttachment.setContentType(type);
- }
- }
-
- // check page completenes
- if (descriptionText != null && "".equals(descriptionText.getText())) {
- setErrorMessage("Description required");
- } else {
- if (!"".equals(fileNameText.getText())) {
- setPageComplete(true);
- setErrorMessage(null);
- }
- }
- }
- });
-
- fileNameText.setText(taskAttachment.getFileName() == null ? "" : taskAttachment.getFileName()); //$NON-NLS-1$
-
- /* Listener for isPatch */
- isPatchButton.addSelectionListener(new SelectionListener() {
- private int lastSelected;
-
- public void widgetDefaultSelected(SelectionEvent e) {
- // ignore
- }
-
- public void widgetSelected(SelectionEvent e) {
- taskAttachment.setPatch(isPatchButton.getSelection());
- if (isPatchButton.getSelection()) {
- lastSelected = contentTypeList.getSelectionIndex();
- contentTypeList.select(0);
- contentTypeList.setEnabled(false);
- if (attachContextButton.isEnabled()) {
- attachContextButton.setSelection(true);
- }
- } else {
- contentTypeList.setEnabled(true);
- contentTypeList.select(lastSelected);
- }
- }
- });
-
- setErrorMessage(null);
-
- if (descriptionText != null) {
- descriptionText.setFocus();
- } else {
- commentText.setFocus();
- }
- }
-
- public TaskAttachmentModel getModel() {
- return model;
- }
-
- @Override
- public IWizardPage getNextPage() {
- taskAttachment.applyTo(model.getAttribute());
- model.setComment(commentText.getText());
- model.setAttachContext(attachContextButton.getSelection());
- model.setContentType(taskAttachment.getContentType());
- return super.getNextPage();
- }
-
- @Override
- public boolean isPageComplete() {
- return !"".equals(fileNameText.getText().trim())
- && (descriptionText == null || !"".equals(descriptionText.getText().trim()));
- }
-
- private void setContentType(String contentType) {
- String[] typeList = contentTypeList.getItems();
- for (int i = 0; i < typeList.length; i++) {
- if (typeList[i].equals(contentType)) {
- contentTypeList.select(i);
- break;
- }
- }
- }
-
- private void setFilePath(String path) {
- fileNameText.setText(path);
- if (path.endsWith(".patch")) {
- isPatchButton.setSelection(true);
- if (attachContextButton.isEnabled()) {
- attachContextButton.setSelection(true);
- }
- }
- }
-
- public void setNeedsDescription(boolean supportsDescription) {
- this.needsDescription = supportsDescription;
- if (supportsDescription) {
- setMessage("Enter a description and verify the content type of the attachment");
- } else {
- setMessage("Verify the content type of the attachment");
- }
- }
-
- public boolean supportsDescription() {
- return needsDescription;
- }
-
- @Override
- public void setVisible(boolean visible) {
- if (visible) {
- if (fileNameText.getText().length() == 0) {
- setFilePath(getModel().getSource().getName());
- }
- setContentType(getModel().getSource().getContentType());
- }
- super.setVisible(visible);
- if (first) {
- if (descriptionText != null) {
- descriptionText.setFocus();
- } else {
- commentText.setFocus();
- }
- first = false;
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.test-feature/.project b/org.eclipse.mylyn.test-feature/.project
deleted file mode 100644
index aceb4b4da..000000000
--- a/org.eclipse.mylyn.test-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.mylyn.test-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.test-feature/.settings/org.eclipse.mylyn.tasks.ui.prefs b/org.eclipse.mylyn.test-feature/.settings/org.eclipse.mylyn.tasks.ui.prefs
deleted file mode 100644
index aebf29b64..000000000
--- a/org.eclipse.mylyn.test-feature/.settings/org.eclipse.mylyn.tasks.ui.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Mon Mar 03 23:56:47 PST 2008
-eclipse.preferences.version=1
-project.repository.kind=bugzilla
-project.repository.url=https\://bugs.eclipse.org/bugs
diff --git a/org.eclipse.mylyn.test-feature/about.html b/org.eclipse.mylyn.test-feature/about.html
deleted file mode 100644
index 0dd939c09..000000000
--- a/org.eclipse.mylyn.test-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 7, 2007</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.test-feature/build.properties b/org.eclipse.mylyn.test-feature/build.properties
deleted file mode 100644
index adf04e61f..000000000
--- a/org.eclipse.mylyn.test-feature/build.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-bin.includes = feature.xml,\
- about.html,\
- epl-v10.html,\
- license.html
-src.includes = about.html
diff --git a/org.eclipse.mylyn.test-feature/epl-v10.html b/org.eclipse.mylyn.test-feature/epl-v10.html
deleted file mode 100644
index ed4b19665..000000000
--- a/org.eclipse.mylyn.test-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.test-feature/feature.xml b/org.eclipse.mylyn.test-feature/feature.xml
deleted file mode 100644
index d73392017..000000000
--- a/org.eclipse.mylyn.test-feature/feature.xml
+++ /dev/null
@@ -1,227 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.mylyn.test_feature"
- label="Mylyn Test Feature"
- version="3.0.0.qualifier"
- plugin="org.eclipse.mylyn">
-
- <description url="http://eclipse.org/mylyn">
- Provides tests for the Mylyn project.
- </description>
-
- <copyright>
- Copyright (c) 2004 - 2007 Mylyn project committers and others.
- </copyright>
-
- <license url="license.html">
- Eclipse Foundation Software User Agreement
-
-March 17, 2005
-Usage Of Content
-
-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.
-Applicable Licenses
-
-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 http://www.eclipse.org/legal/epl-v10.html. For purposes of the EPL, &quot;Program&quot; will mean the Content.
-
-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;).
-
- * 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;).
- * Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Javaâ„¢ ARchive) in a directory named &quot;plugins&quot;.
- * 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.
- * 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.
-
-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:
-
- * The top-level (root) directory
- * Plug-in and Fragment directories
- * Inside Plug-ins and Fragments packaged as JARs
- * Sub-directories of the directory named &quot;src&quot; of certain Plug-ins
- * Feature directories
-
-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.
-
-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):
-
- * Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)
- * Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)
- * Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)
- * IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)
- * Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)
- * Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)
-
-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.
-Cryptography
-
-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.
-
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.
- </license>
-
- <requires>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.junit"/>
- <import plugin="org.eclipse.jface.text"/>
- <import plugin="org.eclipse.ui.ide"/>
- <import plugin="org.eclipse.ui.views"/>
- <import plugin="org.eclipse.ui.editors"/>
- <import plugin="org.eclipse.ui.workbench.texteditor"/>
- <import plugin="org.eclipse.mylyn.bugzilla.core"/>
- <import plugin="org.eclipse.mylyn.bugzilla.ui"/>
- <import plugin="org.eclipse.mylyn.tasks.ui"/>
- <import plugin="org.eclipse.mylyn.context.core"/>
- <import plugin="org.eclipse.mylyn.tasks.core"/>
- <import plugin="org.eclipse.ui.forms"/>
- <import plugin="org.eclipse.mylyn"/>
- <import plugin="org.eclipse.search"/>
- <import plugin="org.eclipse.mylyn.commons.net"/>
- <import plugin="org.eclipse.mylyn.bugzilla.ide" version="2.3.0" match="greaterOrEqual"/>
- <import plugin="org.eclipse.mylyn.commons.ui" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.jdt.core"/>
- <import plugin="org.eclipse.pde"/>
- <import plugin="org.eclipse.pde.core"/>
- <import plugin="org.eclipse.mylyn.monitor.ui"/>
- <import plugin="org.eclipse.mylyn.monitor.core"/>
- <import plugin="org.eclipse.mylyn.commons.core"/>
- <import plugin="org.eclipse.ui.workbench"/>
- <import plugin="org.eclipse.mylyn.team.ui"/>
- <import plugin="org.eclipse.mylyn.resources.ui"/>
- <import plugin="org.eclipse.jdt.ui"/>
- <import plugin="org.eclipse.jface"/>
- <import plugin="org.eclipse.mylyn.java.ui"/>
- <import plugin="org.eclipse.mylyn.ide.ui"/>
- <import plugin="org.eclipse.mylyn.context.ui"/>
- <import plugin="org.eclipse.jdt.launching"/>
- <import plugin="org.eclipse.mylyn.pde.ui"/>
- <import plugin="org.eclipse.mylyn.jira.core"/>
- <import plugin="org.eclipse.mylyn.jira.ui"/>
- <import plugin="org.eclipse.mylyn.monitor.usage"/>
- <import plugin="org.eclipse.jdt"/>
- <import plugin="org.eclipse.ui.browser"/>
- <import plugin="org.eclipse.mylyn.sandbox.ui"/>
- <import plugin="org.eclipse.core.net"/>
- <import plugin="org.eclipse.mylyn.web.tasks"/>
- <import plugin="org.eclipse.test.performance"/>
- <import plugin="org.eclipse.mylyn.tasks.bugs"/>
- <import plugin="org.eclipse.mylyn.team.cvs"/>
- <import plugin="org.eclipse.team.core"/>
- <import plugin="org.eclipse.team.cvs.ui"/>
- <import plugin="org.eclipse.team.cvs.core"/>
- <import plugin="org.apache.xmlrpc" version="3.0.0" match="greaterOrEqual"/>
- <import plugin="org.eclipse.mylyn.trac.ui"/>
- <import plugin="org.eclipse.mylyn.trac.core"/>
- <import plugin="org.eclipse.mylyn.xplanner.core"/>
- <import plugin="org.eclipse.mylyn.xplanner.ui"/>
- <import plugin="org.eclipse.mylyn.context.core" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.mylyn.monitor.usage" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.mylyn.context.ui" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.mylyn.tasks.ui" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.mylyn.monitor.ui" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.mylyn.monitor.core" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.mylyn.commons.core" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.ui.navigator"/>
- <import plugin="org.eclipse.mylyn.tasks.core" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.mylyn.commons.ui" version="3.0.0" match="greaterOrEqual"/>
- </requires>
-
- <plugin
- id="org.eclipse.mylyn.bugzilla.tests"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
- <plugin
- id="org.eclipse.mylyn.context.tests"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
- <plugin
- id="org.eclipse.mylyn.ide.tests"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.java.tests"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
- <plugin
- id="org.eclipse.mylyn.jira.tests"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.monitor.tests"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
- <plugin
- id="org.eclipse.mylyn.resources.tests"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
- <plugin
- id="org.eclipse.mylyn.sandbox.tests"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.tasks.tests"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
- <plugin
- id="org.eclipse.mylyn.team.tests"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.tests"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
- <plugin
- id="org.eclipse.mylyn.trac.tests"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.xplanner.tests"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.monitor.reports"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.web.ui"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/org.eclipse.mylyn.test-feature/license.html b/org.eclipse.mylyn.test-feature/license.html
deleted file mode 100644
index 15a10cfd3..000000000
--- a/org.eclipse.mylyn.test-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.trac-feature/.project b/org.eclipse.mylyn.trac-feature/.project
deleted file mode 100644
index e5f4bfbf8..000000000
--- a/org.eclipse.mylyn.trac-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.mylyn.trac-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.trac-feature/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.mylyn.trac-feature/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 8b08f1b8b..000000000
--- a/org.eclipse.mylyn.trac-feature/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,340 +0,0 @@
-#Thu Apr 24 21:03:23 PDT 2008
-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=ignore
-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,NORMAL
-org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,API
-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=false
-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.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.trac-feature/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.mylyn.trac-feature/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 5e70d0848..000000000
--- a/org.eclipse.mylyn.trac-feature/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,63 +0,0 @@
-#Sat Mar 01 03:38:47 PST 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">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*******************************************************************************\n * Copyright (c) 2004, 2007 Mylyn project committers and others.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *******************************************************************************/\n\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ignore\n${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ignore</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created JavaScript files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for vars" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Jsdoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created function stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated function stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_methods=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=true
-sp_cleanup.correct_indentation=true
-sp_cleanup.format_source_code=true
-sp_cleanup.format_source_code_changes_only=false
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=true
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=true
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=true
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=true
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=true
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/org.eclipse.mylyn.trac-feature/.settings/org.eclipse.mylyn.tasklist.prefs b/org.eclipse.mylyn.trac-feature/.settings/org.eclipse.mylyn.tasklist.prefs
deleted file mode 100644
index 37d812da3..000000000
--- a/org.eclipse.mylyn.trac-feature/.settings/org.eclipse.mylyn.tasklist.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Mon Jun 18 17:15:36 PDT 2007
-eclipse.preferences.version=1
-project.repository.kind=bugzilla
-project.repository.url=https\://bugs.eclipse.org/bugs
diff --git a/org.eclipse.mylyn.trac-feature/.settings/org.eclipse.mylyn.tasks.ui.prefs b/org.eclipse.mylyn.trac-feature/.settings/org.eclipse.mylyn.tasks.ui.prefs
deleted file mode 100644
index 47ada1798..000000000
--- a/org.eclipse.mylyn.trac-feature/.settings/org.eclipse.mylyn.tasks.ui.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Thu Dec 20 14:12:59 PST 2007
-eclipse.preferences.version=1
-project.repository.kind=bugzilla
-project.repository.url=https\://bugs.eclipse.org/bugs
diff --git a/org.eclipse.mylyn.trac-feature/about.html b/org.eclipse.mylyn.trac-feature/about.html
deleted file mode 100644
index 0dd939c09..000000000
--- a/org.eclipse.mylyn.trac-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 7, 2007</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/org.eclipse.mylyn.trac-feature/build.properties b/org.eclipse.mylyn.trac-feature/build.properties
deleted file mode 100644
index adf04e61f..000000000
--- a/org.eclipse.mylyn.trac-feature/build.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-bin.includes = feature.xml,\
- about.html,\
- epl-v10.html,\
- license.html
-src.includes = about.html
diff --git a/org.eclipse.mylyn.trac-feature/epl-v10.html b/org.eclipse.mylyn.trac-feature/epl-v10.html
deleted file mode 100644
index ed4b19665..000000000
--- a/org.eclipse.mylyn.trac-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.trac-feature/feature.xml b/org.eclipse.mylyn.trac-feature/feature.xml
deleted file mode 100644
index 12d97e7ce..000000000
--- a/org.eclipse.mylyn.trac-feature/feature.xml
+++ /dev/null
@@ -1,120 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.mylyn.trac_feature"
- label="Mylyn Connector: Trac"
- version="3.0.0.qualifier"
- provider-name="Eclipse.org"
- plugin="org.eclipse.mylyn">
-
- <description url="http://trac.edgewall.org">
- Provides Task List integration, offline support and rich editing for the open source Trac issue tracker.
- </description>
-
- <copyright>
- Copyright (c) 2004 - 2007 Mylyn project committers and others.
- </copyright>
-
- <license url="license.html">
- Eclipse Foundation Software User Agreement
-
-March 17, 2005
-Usage Of Content
-
-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.
-Applicable Licenses
-
-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 http://www.eclipse.org/legal/epl-v10.html. For purposes of the EPL, &quot;Program&quot; will mean the Content.
-
-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;).
-
- * 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;).
- * Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Javaâ„¢ ARchive) in a directory named &quot;plugins&quot;.
- * 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.
- * 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.
-
-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:
-
- * The top-level (root) directory
- * Plug-in and Fragment directories
- * Inside Plug-ins and Fragments packaged as JARs
- * Sub-directories of the directory named &quot;src&quot; of certain Plug-ins
- * Feature directories
-
-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.
-
-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):
-
- * Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)
- * Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)
- * Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)
- * IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)
- * Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)
- * Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)
-
-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.
-Cryptography
-
-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.
-
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.
- </license>
-
- <url>
- <update label="Mylyn for Eclipse 3.4" url="http://download.eclipse.org/tools/mylyn/update/e3.4"/>
- </url>
-
- <requires>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.jface.text"/>
- <import plugin="org.eclipse.search" version="3.4.0" match="greaterOrEqual"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.ui.forms"/>
- <import plugin="org.eclipse.mylyn.tasks.core" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.mylyn.tasks.ui" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.mylyn.context.core" version="3.0.0" match="compatible"/>
- <import plugin="org.apache.xmlrpc" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.osgi"/>
- <import plugin="org.apache.commons.httpclient"/>
- <import plugin="org.apache.commons.logging"/>
- <import feature="org.eclipse.mylyn_feature" version="3.0.0.qualifier" match="perfect"/>
- <import plugin="org.eclipse.mylyn.commons.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"/>
- </requires>
-
- <plugin
- id="org.eclipse.mylyn.trac.ui"
- download-size="0"
- install-size="0"
- version="3.0.0.qualifier"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.trac.core"
- download-size="0"
- install-size="0"
- version="3.0.0.qualifier"
- unpack="false"/>
-
- <plugin
- id="org.apache.xmlrpc"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.apache.ws.commons.util"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="javax.xml.bind"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/org.eclipse.mylyn.trac-feature/license.html b/org.eclipse.mylyn.trac-feature/license.html
deleted file mode 100644
index 15a10cfd3..000000000
--- a/org.eclipse.mylyn.trac-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.trac.core/.classpath b/org.eclipse.mylyn.trac.core/.classpath
deleted file mode 100644
index 304e86186..000000000
--- a/org.eclipse.mylyn.trac.core/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/org.eclipse.mylyn.trac.core/.cvsignore b/org.eclipse.mylyn.trac.core/.cvsignore
deleted file mode 100644
index c5e82d745..000000000
--- a/org.eclipse.mylyn.trac.core/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin \ No newline at end of file
diff --git a/org.eclipse.mylyn.trac.core/.project b/org.eclipse.mylyn.trac.core/.project
deleted file mode 100644
index 831876dac..000000000
--- a/org.eclipse.mylyn.trac.core/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.mylyn.trac.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.trac.core/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.mylyn.trac.core/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 8b08f1b8b..000000000
--- a/org.eclipse.mylyn.trac.core/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,340 +0,0 @@
-#Thu Apr 24 21:03:23 PDT 2008
-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=ignore
-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,NORMAL
-org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,API
-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=false
-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.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.trac.core/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.mylyn.trac.core/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 5e70d0848..000000000
--- a/org.eclipse.mylyn.trac.core/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,63 +0,0 @@
-#Sat Mar 01 03:38:47 PST 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">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*******************************************************************************\n * Copyright (c) 2004, 2007 Mylyn project committers and others.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *******************************************************************************/\n\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ignore\n${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ignore</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created JavaScript files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for vars" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Jsdoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created function stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated function stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_methods=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=true
-sp_cleanup.correct_indentation=true
-sp_cleanup.format_source_code=true
-sp_cleanup.format_source_code_changes_only=false
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=true
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=true
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=true
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=true
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=true
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/org.eclipse.mylyn.trac.core/.settings/org.eclipse.ltk.core.refactoring.prefs b/org.eclipse.mylyn.trac.core/.settings/org.eclipse.ltk.core.refactoring.prefs
deleted file mode 100644
index 7ab03bdac..000000000
--- a/org.eclipse.mylyn.trac.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.trac.core/.settings/org.eclipse.mylyn.tasklist.prefs b/org.eclipse.mylyn.trac.core/.settings/org.eclipse.mylyn.tasklist.prefs
deleted file mode 100644
index 0a2cc0b30..000000000
--- a/org.eclipse.mylyn.trac.core/.settings/org.eclipse.mylyn.tasklist.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Mon Jun 18 17:14:59 PDT 2007
-eclipse.preferences.version=1
-project.repository.kind=bugzilla
-project.repository.url=https\://bugs.eclipse.org/bugs
diff --git a/org.eclipse.mylyn.trac.core/.settings/org.eclipse.mylyn.tasks.ui.prefs b/org.eclipse.mylyn.trac.core/.settings/org.eclipse.mylyn.tasks.ui.prefs
deleted file mode 100644
index d8c6d26af..000000000
--- a/org.eclipse.mylyn.trac.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.trac.core/.settings/org.eclipse.pde.prefs b/org.eclipse.mylyn.trac.core/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index e8f2d5620..000000000
--- a/org.eclipse.mylyn.trac.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.trac.core/META-INF/MANIFEST.MF b/org.eclipse.mylyn.trac.core/META-INF/MANIFEST.MF
deleted file mode 100644
index b20cfe9b0..000000000
--- a/org.eclipse.mylyn.trac.core/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,18 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Mylyn Trac Connector Core
-Bundle-SymbolicName: org.eclipse.mylyn.trac.core;singleton:=true
-Bundle-Version: 3.0.0.qualifier
-Bundle-Vendor: Eclipse.org
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.mylyn.context.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.mylyn.tasks.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.mylyn.commons.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.mylyn.commons.net;bundle-version="[3.0.0,4.0.0)",
- org.apache.xmlrpc;bundle-version="[3.0.0,4.0.0)"
-Bundle-ActivationPolicy: lazy
-Export-Package: org.eclipse.mylyn.internal.trac.core;x-friends:="org.eclipse.mylyn.trac.ui",
- org.eclipse.mylyn.internal.trac.core.model;x-friends:="org.eclipse.mylyn.trac.ui",
- org.eclipse.mylyn.internal.trac.core.util;x-friends:="org.eclipse.mylyn.trac.ui"
-Bundle-Activator: org.eclipse.mylyn.internal.trac.core.TracCorePlugin
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/org.eclipse.mylyn.trac.core/about.html b/org.eclipse.mylyn.trac.core/about.html
deleted file mode 100644
index 0dd939c09..000000000
--- a/org.eclipse.mylyn.trac.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 7, 2007</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/org.eclipse.mylyn.trac.core/build.properties b/org.eclipse.mylyn.trac.core/build.properties
deleted file mode 100644
index f3115fec7..000000000
--- a/org.eclipse.mylyn.trac.core/build.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2007 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
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html
-src.includes = about.html
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/AbstractTracClient.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/AbstractTracClient.java
deleted file mode 100644
index 2bee2b55c..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/AbstractTracClient.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.core;
-
-import java.io.IOException;
-import java.net.HttpURLConnection;
-import java.net.Proxy;
-import java.net.URL;
-
-import org.apache.commons.httpclient.Cookie;
-import org.apache.commons.httpclient.HostConfiguration;
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.NameValuePair;
-import org.apache.commons.httpclient.methods.PostMethod;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.mylyn.commons.net.AbstractWebLocation;
-import org.eclipse.mylyn.commons.net.AuthenticationCredentials;
-import org.eclipse.mylyn.commons.net.WebUtil;
-import org.eclipse.mylyn.internal.trac.core.model.TracComponent;
-import org.eclipse.mylyn.internal.trac.core.model.TracMilestone;
-import org.eclipse.mylyn.internal.trac.core.model.TracPriority;
-import org.eclipse.mylyn.internal.trac.core.model.TracSeverity;
-import org.eclipse.mylyn.internal.trac.core.model.TracTicketField;
-import org.eclipse.mylyn.internal.trac.core.model.TracTicketResolution;
-import org.eclipse.mylyn.internal.trac.core.model.TracTicketStatus;
-import org.eclipse.mylyn.internal.trac.core.model.TracTicketType;
-import org.eclipse.mylyn.internal.trac.core.model.TracVersion;
-
-/**
- * @author Steffen Pingel
- */
-public abstract class AbstractTracClient implements ITracClient {
-
- protected static final String USER_AGENT = "TracConnector";
-
- private static final String LOGIN_COOKIE_NAME = "trac_auth";
-
- protected final String repositoryUrl;
-
- protected final Version version;
-
- protected final AbstractWebLocation location;
-
- protected TracClientData data;
-
- public AbstractTracClient(URL repositoryUrl, Version version, String username, String password, Proxy proxy) {
- this.repositoryUrl = repositoryUrl.toString();
- this.version = version;
-
- this.location = null;
-
- this.data = new TracClientData();
- }
-
- public AbstractTracClient(AbstractWebLocation location, Version version) {
- this.location = location;
- this.version = version;
- this.repositoryUrl = location.getUrl();
-
- this.data = new TracClientData();
- }
-
- public Version getVersion() {
- return version;
- }
-
- protected boolean credentialsValid(AuthenticationCredentials credentials) {
- return credentials != null && credentials.getUserName().length() > 0;
- }
-
- protected void authenticateAccountManager(HttpClient httpClient, HostConfiguration hostConfiguration,
- AuthenticationCredentials credentials, IProgressMonitor monitor) throws IOException, TracLoginException {
- PostMethod post = new PostMethod(WebUtil.getRequestPath(repositoryUrl + LOGIN_URL));
- post.setFollowRedirects(false);
- String formToken = getFormToken(httpClient);
- NameValuePair[] data = { new NameValuePair("referer", ""),
- new NameValuePair("user", credentials.getUserName()),
- new NameValuePair("password", credentials.getPassword()), new NameValuePair("__FORM_TOKEN", formToken) };
-
- post.setRequestBody(data);
- try {
- int code = WebUtil.execute(httpClient, hostConfiguration, post, monitor);
- // code should be a redirect in case of success
- if (code == HttpURLConnection.HTTP_OK) {
- throw new TracLoginException();
- }
- } finally {
- post.releaseConnection();
- }
- }
-
- private String getFormToken(HttpClient httpClient) {
- Cookie[] cookies = httpClient.getState().getCookies();
- for (Cookie cookie : cookies) {
- if ("trac_form_token".equals(cookie.getName())) {
- return cookie.getValue();
- }
- }
- return "";
- }
-
- /**
- * Check if authentication cookie has been set.
- *
- * @throws TracLoginException
- * thrown if the cookie has not been set
- */
- protected void validateAuthenticationState(HttpClient httpClient) throws TracLoginException {
- Cookie[] cookies = httpClient.getState().getCookies();
- for (Cookie cookie : cookies) {
- if (LOGIN_COOKIE_NAME.equals(cookie.getName())) {
- return;
- }
- }
-
- throw new TracLoginException();
- }
-
- public TracComponent[] getComponents() {
- return (data.components != null) ? data.components.toArray(new TracComponent[0]) : null;
- }
-
- public TracMilestone[] getMilestones() {
- return (data.milestones != null) ? data.milestones.toArray(new TracMilestone[0]) : null;
- }
-
- public TracPriority[] getPriorities() {
- return (data.priorities != null) ? data.priorities.toArray(new TracPriority[0]) : null;
- }
-
- public TracSeverity[] getSeverities() {
- return (data.severities != null) ? data.severities.toArray(new TracSeverity[0]) : null;
- }
-
- public TracTicketField[] getTicketFields() {
- return (data.ticketFields != null) ? data.ticketFields.toArray(new TracTicketField[0]) : null;
- }
-
- public TracTicketResolution[] getTicketResolutions() {
- return (data.ticketResolutions != null) ? data.ticketResolutions.toArray(new TracTicketResolution[0]) : null;
- }
-
- public TracTicketStatus[] getTicketStatus() {
- return (data.ticketStatus != null) ? data.ticketStatus.toArray(new TracTicketStatus[0]) : null;
- }
-
- public TracTicketType[] getTicketTypes() {
- return (data.ticketTypes != null) ? data.ticketTypes.toArray(new TracTicketType[0]) : null;
- }
-
- public TracVersion[] getVersions() {
- return (data.versions != null) ? data.versions.toArray(new TracVersion[0]) : null;
- }
-
- public boolean hasAttributes() {
- return (data.lastUpdate != 0);
- }
-
- public void updateAttributes(IProgressMonitor monitor, boolean force) throws TracException {
- if (!hasAttributes() || force) {
- updateAttributes(monitor);
- data.lastUpdate = System.currentTimeMillis();
- }
- }
-
- public abstract void updateAttributes(IProgressMonitor monitor) throws TracException;
-
- public void setData(TracClientData data) {
- this.data = data;
- }
-
- public String[] getDefaultTicketResolutions() {
- return new String[] { "fixed", "invalid", "wontfix", "duplicate", "worksforme" };
- }
-
- public String[] getDefaultTicketActions(String status) {
- if ("new".equals(status)) {
- return new String[] { "leave", "resolve", "reassign", "accept" };
- } else if ("assigned".equals(status)) {
- return new String[] { "leave", "resolve", "reassign" };
- } else if ("reopened".equals(status)) {
- return new String[] { "leave", "resolve", "reassign" };
- } else if ("closed".equals(status)) {
- return new String[] { "leave", "reopen" };
- }
- return null;
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/AbstractWikiHandler.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/AbstractWikiHandler.java
deleted file mode 100644
index 371fa2f42..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/AbstractWikiHandler.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.core;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.mylyn.internal.trac.core.model.TracWikiPage;
-import org.eclipse.mylyn.internal.trac.core.model.TracWikiPageInfo;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-/**
- * @author Xiaoyang Guan
- */
-public abstract class AbstractWikiHandler {
-
- public abstract String[] downloadAllPageNames(TaskRepository repository, IProgressMonitor monitor)
- throws CoreException;
-
- public abstract String getWikiUrl(TaskRepository repository);
-
- public abstract TracWikiPage getWikiPage(TaskRepository repository, String pageName, IProgressMonitor monitor)
- throws CoreException;
-
- public abstract void postWikiPage(TaskRepository repository, TracWikiPage page, IProgressMonitor monitor)
- throws CoreException;
-
- public abstract TracWikiPageInfo[] getPageHistory(TaskRepository repository, String pageName,
- IProgressMonitor monitor) throws CoreException;
-}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/ITracClient.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/ITracClient.java
deleted file mode 100644
index 1d9f45c77..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/ITracClient.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.core;
-
-import java.io.InputStream;
-import java.util.Date;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.mylyn.internal.trac.core.model.TracComponent;
-import org.eclipse.mylyn.internal.trac.core.model.TracMilestone;
-import org.eclipse.mylyn.internal.trac.core.model.TracPriority;
-import org.eclipse.mylyn.internal.trac.core.model.TracSearch;
-import org.eclipse.mylyn.internal.trac.core.model.TracSeverity;
-import org.eclipse.mylyn.internal.trac.core.model.TracTicket;
-import org.eclipse.mylyn.internal.trac.core.model.TracTicketField;
-import org.eclipse.mylyn.internal.trac.core.model.TracTicketResolution;
-import org.eclipse.mylyn.internal.trac.core.model.TracTicketStatus;
-import org.eclipse.mylyn.internal.trac.core.model.TracTicketType;
-import org.eclipse.mylyn.internal.trac.core.model.TracVersion;
-
-/**
- * Defines the requirements for classes that provide remote access to Trac repositories.
- *
- * @author Steffen Pingel
- */
-public interface ITracClient {
-
- public enum Version {
- XML_RPC, TRAC_0_9;
-
- public static Version fromVersion(String version) {
- try {
- return Version.valueOf(version);
- } catch (IllegalArgumentException e) {
- return null;
- }
- }
-
- @Override
- public String toString() {
- switch (this) {
- case TRAC_0_9:
- return "Web (Trac 0.9 or 0.10)";
- case XML_RPC:
- return "XML-RPC Plugin (Rev. " + TracXmlRpcClient.REQUIRED_REVISION + ")";
- default:
- return null;
- }
- }
-
- }
-
- public static final String CHARSET = "UTF-8";
-
- public static final String TIME_ZONE = "UTC";
-
- public static final String LOGIN_URL = "/login";
-
- public static final String QUERY_URL = "/query?format=tab";
-
- public static final String TICKET_URL = "/ticket/";
-
- public static final String NEW_TICKET_URL = "/newticket";
-
- public static final String CUSTOM_QUERY_URL = "/query";
-
- public static final String TICKET_ATTACHMENT_URL = "/attachment/ticket/";
-
- public static final String DEFAULT_USERNAME = "anonymous";
-
- public static final String WIKI_URL = "/wiki/";
-
- public static final String REPORT_URL = "/report/";
-
- public static final String CHANGESET_URL = "/changeset/";
-
- public static final String REVISION_LOG_URL = "/log/";
-
- public static final String MILESTONE_URL = "/milestone/";
-
- public static final String BROWSER_URL = "/browser/";
-
- public static final String ATTACHMENT_URL = "/attachment/ticket/";
-
- /**
- * Gets ticket with <code>id</code> from repository.
- *
- * @param id
- * the id of the ticket to get
- * @param monitor
- * TODO
- * @return the ticket
- * @throws TracException
- * thrown in case of a connection error
- */
- TracTicket getTicket(int id, IProgressMonitor monitor) throws TracException;
-
- /**
- * Returns the access type.
- */
- Version getVersion();
-
- /**
- * Queries tickets from repository. All found tickets are added to <code>result</code>.
- *
- * @param query
- * the search criteria
- * @param result
- * the list of found tickets
- * @param monitor
- * TODO
- * @throws TracException
- * thrown in case of a connection error
- */
- void search(TracSearch query, List<TracTicket> result, IProgressMonitor monitor) throws TracException;
-
- /**
- * Validates the repository connection.
- *
- * @throws TracException
- * thrown in case of a connection error
- */
- void validate(IProgressMonitor monitor) throws TracException;
-
- /**
- * Returns true, if the repository details are cached. If this method returns true, invoking
- * <tt>updateAttributes(monitor, false)</tt> will return without opening a connection.
- *
- * @see #updateAttributes(IProgressMonitor, boolean)
- */
- boolean hasAttributes();
-
- /**
- * Updates cached repository details: milestones, versions etc.
- *
- * @throws TracException
- * thrown in case of a connection error
- */
- void updateAttributes(IProgressMonitor monitor, boolean force) throws TracException;
-
- TracComponent[] getComponents();
-
- TracTicketField[] getTicketFields();
-
- TracMilestone[] getMilestones();
-
- TracPriority[] getPriorities();
-
- TracSeverity[] getSeverities();
-
- TracTicketResolution[] getTicketResolutions();
-
- TracTicketStatus[] getTicketStatus();
-
- TracTicketType[] getTicketTypes();
-
- TracVersion[] getVersions();
-
- InputStream getAttachmentData(int ticketId, String filename, IProgressMonitor monitor) throws TracException;
-
- void putAttachmentData(int ticketId, String name, String description, InputStream source, IProgressMonitor monitor)
- throws TracException;
-
- void deleteAttachment(int ticketId, String filename, IProgressMonitor monitor) throws TracException;
-
- /**
- * @return the id of the created ticket
- */
- int createTicket(TracTicket ticket, IProgressMonitor monitor) throws TracException;
-
- void updateTicket(TracTicket ticket, String comment, IProgressMonitor monitor) throws TracException;
-
- /**
- * Sets a reference to the cached repository attributes.
- *
- * @param data
- * cached repository attributes
- */
- void setData(TracClientData data);
-
- Set<Integer> getChangedTickets(Date since, IProgressMonitor monitor) throws TracException;
-
- Date getTicketLastChanged(Integer id, IProgressMonitor monitor) throws TracException;
-
-}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/ITracWikiClient.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/ITracWikiClient.java
deleted file mode 100644
index c73fed91b..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/ITracWikiClient.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.core;
-
-import java.io.InputStream;
-import java.util.Date;
-import java.util.Map;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.mylyn.internal.trac.core.model.TracWikiPage;
-import org.eclipse.mylyn.internal.trac.core.model.TracWikiPageInfo;
-
-/**
- * Interface for the WikiRPC API provided by the Trac XML-RPC Plugin
- *
- * @author Xiaoyang Guan
- * @since 2.1
- */
-public interface ITracWikiClient {
-
- /**
- * Render arbitrary wiki text as HTML
- *
- * @param sourceText
- * wiki source text
- * @param monitor TODO
- * @return The HTML-formatted string of the wiki text
- * @throws TracException
- * thrown in case of a connection error
- */
- public String wikiToHtml(String sourceText, IProgressMonitor monitor) throws TracException;
-
- /**
- * Validates the Trac XML-RPC WikiRPC API version of the repository
- * @param monitor TODO
- *
- * @throws TracException
- */
- public void validateWikiRpcApi(IProgressMonitor monitor) throws TracException;
-
- /**
- * Gets the list of the names of all pages from the repository
- * @param monitor TODO
- *
- * @return The array of the names of all Wiki pages
- * @throws TracException
- */
- public String[] getAllWikiPageNames(IProgressMonitor monitor) throws TracException;
-
- /**
- * Gets the latest version of a Wiki page from the repository
- *
- * @param pageName
- * the name of the Wiki page
- * @param monitor TODO
- * @return the Wiki page at the latest version
- * @throws TracException
- */
- public TracWikiPage getWikiPage(String pageName, IProgressMonitor monitor) throws TracException;
-
- /**
- * Gets a specific version of a Wiki page from the repository
- *
- * @param pageName
- * the name of the Wiki page
- * @param version
- * the version of the Wiki page
- * @param monitor TODO
- * @return the Wiki page at the specified version
- * @throws TracException
- */
- public TracWikiPage getWikiPage(String pageName, int version, IProgressMonitor monitor) throws TracException;
-
- /**
- * Gets the information about the latest version of a Wiki page from the repository
- *
- * @param pageName
- * the name of the Wiki page
- * @param monitor TODO
- * @return The information about the page at the latest version
- * @throws TracException
- */
- public TracWikiPageInfo getWikiPageInfo(String pageName, IProgressMonitor monitor) throws TracException;
-
- /**
- * Gets the information about the specified version of a Wiki page from the repository
- *
- * @param pageName
- * the name of the Wiki page
- * @param version
- * the version of the Wiki page
- * @param monitor TODO
- * @return The information about the page at the specified version
- * @throws TracException
- */
- public TracWikiPageInfo getWikiPageInfo(String pageName, int version, IProgressMonitor monitor) throws TracException;
-
- /**
- * Gets the information about all versions of a Wiki page from the repository
- *
- * @param pageName
- * the name of the Wiki page
- * @param monitor TODO
- * @return array of TracWikiPageInfo that contains the information about all versions of the page
- * @throws TracException
- */
- public TracWikiPageInfo[] getWikiPageInfoAllVersions(String pageName, IProgressMonitor monitor) throws TracException;
-
- /**
- * Gets the raw Wiki text of the latest version of a Wiki page from the repository
- *
- * @param pageName
- * the name of the Wiki page
- * @param monitor TODO
- * @return the raw Wiki text of the page, latest version
- * @throws TracException
- */
- public String getWikiPageContent(String pageName, IProgressMonitor monitor) throws TracException;
-
- /**
- * Gets the raw Wiki text of the specified version of a Wiki page from the repository
- *
- * @param pageName
- * the name of the Wiki page
- * @param version
- * the version of the Wiki page
- * @param monitor TODO
- * @return the raw Wiki text of the page, specified version
- * @throws TracException
- */
- public String getWikiPageContent(String pageName, int version, IProgressMonitor monitor) throws TracException;
-
- /**
- * Gets the rendered HTML of the latest version of a Wiki page from the repository
- *
- * @param pageName
- * the name of the Wiki page
- * @param monitor TODO
- * @return the rendered HTML of the page, latest version
- * @throws TracException
- */
- public String getWikiPageHtml(String pageName, IProgressMonitor monitor) throws TracException;
-
- /**
- * Gets the rendered HTML of the specified version of a Wiki page from the repository
- *
- * @param pageName
- * the name of the Wiki page
- * @param version
- * the version of the Wiki page
- * @param monitor TODO
- * @return the rendered HTML of the page, specified version
- * @throws TracException
- */
- public String getWikiPageHtml(String pageName, int version, IProgressMonitor monitor) throws TracException;
-
- /**
- * Gets the list of information about all pages that have been modified since a given date from the repository
- *
- * @param since
- * the date from which the changes to the Wiki pages should be retrieved
- * @param monitor TODO
- * @return array of TracWikiPageInfo that contains the information about the modified pages
- * @throws TracException
- */
- public TracWikiPageInfo[] getRecentWikiChanges(Date since, IProgressMonitor monitor) throws TracException;
-
- /**
- * Writes the content of a Wiki page to the repository
- *
- * @param pageName
- * the name of the Wiki page
- * @param content
- * the content of the page to be written
- * @param attributes
- * a Map used to set any Wiki-specific things, which the server can freely ignore or incorporate.
- * Standard names are:
- * <ul>
- * <li> comment (String): A comment for the page.
- * <li> minoredit (Boolean): This was a minor edit only.
- * </ul>
- * @param monitor TODO
- * @return <code>true</code> if successful
- * @throws TracException
- */
- public boolean putWikipage(String pageName, String content, Map<String, Object> attributes, IProgressMonitor monitor) throws TracException;
-
- /**
- * Gets the list of the names of attachments on a given Wiki page from the repository
- *
- * @param pageName
- * the name of the Wiki page
- * @param monitor TODO
- * @return an array of the names of attachments on the given page. Returns an empty array if the page has no
- * attachment or the page does not exist.
- * @throws TracException
- */
- public String[] listWikiPageAttachments(String pageName, IProgressMonitor monitor) throws TracException;
-
- /**
- * Gets the content of an attachment on a Wiki page from the repository
- *
- * @param pageName
- * the name of the Wiki page
- * @param fileName
- * the name of the attachment file
- * @param monitor TODO
- * @return An InputStream of the content of the attachment
- * @throws TracException
- */
- public InputStream getWikiPageAttachmentData(String pageName, String fileName, IProgressMonitor monitor) throws TracException;
-
- /**
- * Attach a file to a Wiki page on the repository.
- * <p>
- * Note: The standard implementation of WikiRPC API for uploading attachments may ignore the description of the
- * attachment and always use <code>true</code> for <code>replace</code>
- *
- * @param pageName
- * the name of the Wiki page
- * @param fileName
- * the name of the file to be attached
- * @param description
- * the description of the attachment
- * @param in
- * An InputStream of the content of the attachment
- * @param replace
- * whether to overwrite an existing attachment with the same filename
- * @param monitor TODO
- * @return The (possibly transformed) filename of the attachment. If <code>replace</code> is <code>true</code>,
- * the returned name is always the same as the argument <code>fileName</code>; if <code>replace</code>
- * is <code>false</code> and an attachment with name <code>fileName</code> already exists, a different
- * name is generated for the new attachment by the repository server and the new name is returned.
- * @throws TracException
- */
- public String putWikiPageAttachmentData(String pageName, String fileName, String description, InputStream in,
- boolean replace, IProgressMonitor monitor) throws TracException;
-}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/InvalidTicketException.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/InvalidTicketException.java
deleted file mode 100644
index 94783d77a..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/InvalidTicketException.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.core;
-
-/**
- * Indicates an error while parsing a ticket retrieved from a repository.
- *
- * @author Steffen Pingel
- */
-public class InvalidTicketException extends TracException {
-
- private static final long serialVersionUID = 7716941243394876876L;
-
- public InvalidTicketException(String message) {
- super(message);
- }
-
- public InvalidTicketException() {
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/InvalidWikiPageException.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/InvalidWikiPageException.java
deleted file mode 100644
index 9abb95605..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/InvalidWikiPageException.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.core;
-
-/**
- * Indicates an error while parsing the page info retrieved from a repository. If the requested page name or version
- * doesn't exist on the repository, the XmlRpcPlugin returns an Integer of 0 without generating any error info.
- *
- * @author Xiaoyang Guan
- */
-public class InvalidWikiPageException extends TracRemoteException {
-
- private static final long serialVersionUID = 7505355497334178587L;
-
- public InvalidWikiPageException() {
- }
-
- public InvalidWikiPageException(String message) {
- super(message);
- }
-
- public InvalidWikiPageException(Throwable cause) {
- super(cause);
- }
-
- public InvalidWikiPageException(String message, Throwable cause) {
- super(message, cause);
- }
-}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracAttachmentHandler.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracAttachmentHandler.java
deleted file mode 100644
index 91a54767a..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracAttachmentHandler.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.core;
-
-import java.io.InputStream;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractAttachmentHandler;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.ITaskAttachment;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryAttachment;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskAttribute;
-import org.eclipse.mylyn.internal.trac.core.model.TracTicket;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.RepositoryStatus;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-/**
- * @author Steffen Pingel
- */
-public class TracAttachmentHandler extends AbstractAttachmentHandler {
-
- private final TracRepositoryConnector connector;
-
- public TracAttachmentHandler(TracRepositoryConnector connector) {
- this.connector = connector;
- }
-
- @Override
- public InputStream getAttachmentAsStream(TaskRepository repository, RepositoryAttachment attachment,
- IProgressMonitor monitor) throws CoreException {
- String filename = attachment.getAttributeValue(RepositoryTaskAttribute.ATTACHMENT_FILENAME);
- if (filename == null) {
- throw new CoreException(new RepositoryStatus(repository.getRepositoryUrl(), IStatus.ERROR, TracCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_REPOSITORY, "Attachment download from " + repository.getRepositoryUrl()
- + " failed, missing attachment filename."));
- }
-
- try {
- ITracClient client = connector.getClientManager().getTracClient(repository);
- int id = Integer.parseInt(attachment.getTaskId());
- return client.getAttachmentData(id, filename, monitor);
- } catch (Exception e) {
- throw new CoreException(TracCorePlugin.toStatus(e, repository));
- }
- }
-
- @Override
- public void uploadAttachment(TaskRepository repository, ITask task, ITaskAttachment attachment,
- String comment, IProgressMonitor monitor) throws CoreException {
- if (!TracRepositoryConnector.hasAttachmentSupport(repository, task)) {
- throw new CoreException(new RepositoryStatus(repository.getRepositoryUrl(), IStatus.INFO, TracCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_REPOSITORY, "Attachments are not supported by this repository access type"));
- }
-
- monitor.beginTask("Uploading attachment", IProgressMonitor.UNKNOWN);
- try {
- try {
- ITracClient client = connector.getClientManager().getTracClient(repository);
- int id = Integer.parseInt(task.getTaskId());
- client.putAttachmentData(id, attachment.getFilename(), attachment.getDescription(),
- attachment.createInputStream(), monitor);
- if (comment != null && comment.length() > 0) {
- TracTicket ticket = new TracTicket(id);
- client.updateTicket(ticket, comment, monitor);
- }
- } catch (Exception e) {
- throw new CoreException(TracCorePlugin.toStatus(e, repository));
- }
- } finally {
- monitor.done();
- }
- }
-
- @Override
- public boolean canDownloadAttachment(TaskRepository repository, ITask task) {
- if (repository == null) {
- return false;
- }
- return TracRepositoryConnector.hasAttachmentSupport(repository, task);
- }
-
- @Override
- public boolean canUploadAttachment(TaskRepository repository, ITask task) {
- if (repository == null) {
- return false;
- }
- return TracRepositoryConnector.hasAttachmentSupport(repository, task);
- }
-
- @Override
- public boolean canDeprecate(TaskRepository repository, RepositoryAttachment attachment) {
- return false;
- }
-
- @Override
- public void updateAttachment(TaskRepository repository, RepositoryAttachment attachment) throws CoreException {
- throw new UnsupportedOperationException();
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracAttributeFactory.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracAttributeFactory.java
deleted file mode 100644
index ec6c59f4a..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracAttributeFactory.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.core;
-
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractAttributeFactory;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskAttribute;
-import org.eclipse.mylyn.internal.trac.core.model.TracTicket.Key;
-import org.eclipse.mylyn.internal.trac.core.util.TracUtils;
-
-/**
- * Provides a mapping from Mylyn task keys to Trac ticket keys.
- *
- * @author Steffen Pingel
- */
-public class TracAttributeFactory extends AbstractAttributeFactory {
-
- private static final long serialVersionUID = 5333211422546115138L;
-
- private static Map<String, Attribute> attributeByTracKey = new HashMap<String, Attribute>();
-
- private static Map<String, String> tracKeyByTaskKey = new HashMap<String, String>();
-
- public enum Attribute {
- CC(Key.CC, "CC:", RepositoryTaskAttribute.USER_CC, true, false), //
- CHANGE_TIME(Key.CHANGE_TIME, "Last Modification:", RepositoryTaskAttribute.DATE_MODIFIED, true, true), //
- COMPONENT(Key.COMPONENT, "Component:", RepositoryTaskAttribute.PRODUCT), //
- DESCRIPTION(Key.DESCRIPTION, "Description:", RepositoryTaskAttribute.DESCRIPTION, true, false), //
- ID(Key.ID, "<used by search engine>", null, true), //
- KEYWORDS(Key.KEYWORDS, "Keywords:", RepositoryTaskAttribute.KEYWORDS), //
- MILESTONE(Key.MILESTONE, "Milestone:", null), //
- NEW_CC(RepositoryTaskAttribute.NEW_CC, "Add CC:"), //
- OWNER(Key.OWNER, "Assigned to:", RepositoryTaskAttribute.USER_ASSIGNED, true, true), //
- PRIORITY(Key.PRIORITY, "Priority:", null), //
- REPORTER(Key.REPORTER, "Reporter:", RepositoryTaskAttribute.USER_REPORTER, true, true), //
- RESOLUTION(Key.RESOLUTION, "Resolution:", RepositoryTaskAttribute.RESOLUTION, false, true), //
- SEVERITY(Key.SEVERITY, "Severity:", null), //
- STATUS(Key.STATUS, "Status:", RepositoryTaskAttribute.STATUS, false, true), //
- SUMMARY(Key.SUMMARY, "Summary:", RepositoryTaskAttribute.SUMMARY, true), //
- TIME(Key.TIME, "Created:", RepositoryTaskAttribute.DATE_CREATION, true, true), //
- TYPE(Key.TYPE, "Type:", null), //
- VERSION(Key.VERSION, "Version:", null);
-
- private final boolean isHidden;
-
- private final boolean isReadOnly;
-
- private final String tracKey;
-
- private final String prettyName;
-
- private final String taskKey;
-
- Attribute(String tracKey, String prettyName, String taskKey, boolean hidden, boolean readonly) {
- this.tracKey = tracKey;
- this.taskKey = taskKey;
- this.prettyName = prettyName;
- this.isHidden = hidden;
- this.isReadOnly = readonly;
-
- attributeByTracKey.put(tracKey, this);
- if (taskKey != null) {
- tracKeyByTaskKey.put(taskKey, tracKey);
- }
- }
-
- Attribute(Key key, String prettyName, String taskKey, boolean hidden, boolean readonly) {
- this(key.getKey(), prettyName, taskKey, hidden, readonly);
- }
-
- Attribute(Key key, String prettyName, String taskKey, boolean hidden) {
- this(key.getKey(), prettyName, taskKey, hidden, false);
- }
-
- Attribute(Key key, String prettyName, String taskKey) {
- this(key.getKey(), prettyName, taskKey, false, false);
- }
-
- /**
- * This is for Mylyn attributes that do not map to Trac attributes.
- */
- Attribute(String taskKey, String prettyName) {
- this(taskKey, prettyName, taskKey, true, false);
- }
-
- public String getTaskKey() {
- return taskKey;
- }
-
- public String getTracKey() {
- return tracKey;
- }
-
- public boolean isHidden() {
- return isHidden;
- }
-
- public boolean isReadOnly() {
- return isReadOnly;
- }
-
- @Override
- public String toString() {
- return prettyName;
- }
- }
-
- static {
- // make sure hash maps get initialized when class is loaded
- Attribute.values();
- }
-
- @Override
- public boolean isHidden(String key) {
- if (isInternalAttribute(key)) {
- return true;
- }
-
- Attribute attribute = attributeByTracKey.get(key);
- return (attribute != null) ? attribute.isHidden() : false;
- }
-
- @Override
- public String getName(String key) {
- Attribute attribute = attributeByTracKey.get(key);
- // TODO if attribute == null it is probably a custom field: need
- // to query custom field information from repoository
- return (attribute != null) ? attribute.toString() : key;
- }
-
- @Override
- public boolean isReadOnly(String key) {
- Attribute attribute = attributeByTracKey.get(key);
- return (attribute != null) ? attribute.isReadOnly() : false;
- }
-
- @Override
- public String mapCommonAttributeKey(String key) {
- String tracKey = tracKeyByTaskKey.get(key);
- return (tracKey != null) ? tracKey : key;
- }
-
- static boolean isInternalAttribute(String id) {
- return RepositoryTaskAttribute.COMMENT_NEW.equals(id) || RepositoryTaskAttribute.REMOVE_CC.equals(id)
- || RepositoryTaskAttribute.NEW_CC.equals(id) || RepositoryTaskAttribute.ADD_SELF_CC.equals(id);
- }
-
- @Override
- public Date getDateForAttributeType(String attributeKey, String dateString) {
- if (dateString == null || dateString.length() == 0) {
- return null;
- }
-
- try {
- String mappedKey = mapCommonAttributeKey(attributeKey);
- if (mappedKey.equals(Attribute.TIME.getTracKey()) || mappedKey.equals(Attribute.CHANGE_TIME.getTracKey())) {
- return TracUtils.parseDate(Integer.valueOf(dateString));
- }
- } catch (Exception e) {
- }
- return null;
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracClientData.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracClientData.java
deleted file mode 100644
index 3a51c14aa..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracClientData.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.core;
-
-import java.io.Serializable;
-import java.util.List;
-
-import org.eclipse.mylyn.internal.trac.core.model.TracComponent;
-import org.eclipse.mylyn.internal.trac.core.model.TracMilestone;
-import org.eclipse.mylyn.internal.trac.core.model.TracPriority;
-import org.eclipse.mylyn.internal.trac.core.model.TracSeverity;
-import org.eclipse.mylyn.internal.trac.core.model.TracTicketField;
-import org.eclipse.mylyn.internal.trac.core.model.TracTicketResolution;
-import org.eclipse.mylyn.internal.trac.core.model.TracTicketStatus;
-import org.eclipse.mylyn.internal.trac.core.model.TracTicketType;
-import org.eclipse.mylyn.internal.trac.core.model.TracVersion;
-
-public class TracClientData implements Serializable {
-
- private static final long serialVersionUID = 6891961984245981675L;
-
- List<TracComponent> components;
-
- List<TracMilestone> milestones;
-
- List<TracPriority> priorities;
-
- List<TracSeverity> severities;
-
- List<TracTicketField> ticketFields;
-
- List<TracTicketResolution> ticketResolutions;
-
- List<TracTicketStatus> ticketStatus;
-
- List<TracTicketType> ticketTypes;
-
- List<TracVersion> versions;
-
- long lastUpdate;
-
-}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracClientFactory.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracClientFactory.java
deleted file mode 100644
index de02be215..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracClientFactory.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.core;
-
-import java.net.MalformedURLException;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.mylyn.commons.net.AbstractWebLocation;
-import org.eclipse.mylyn.internal.trac.core.ITracClient.Version;
-
-/**
- * @author Steffen Pingel
- */
-public class TracClientFactory {
-
- public static ITracClient createClient(AbstractWebLocation location, Version version) {
- if (version == Version.TRAC_0_9) {
- return new TracWebClient(location, version);
- } else if (version == Version.XML_RPC) {
- return new TracXmlRpcClient(location, version);
- }
-
- throw new RuntimeException("Invalid repository version: " + version);
- }
-
- /**
- * Tries all supported access types for <code>location</code> and returns the corresponding version if successful;
- * throws an exception otherwise.
- *
- * <p>
- * Order of the tried access types: XML-RPC, Trac 0.9
- */
- public static Version probeClient(AbstractWebLocation location) throws MalformedURLException, TracException {
- try {
- ITracClient repository = new TracXmlRpcClient(location, Version.XML_RPC);
- repository.validate(new NullProgressMonitor());
- return Version.XML_RPC;
- } catch (TracException e) {
- try {
- ITracClient repository = new TracWebClient(location, Version.TRAC_0_9);
- repository.validate(new NullProgressMonitor());
- return Version.TRAC_0_9;
- } catch (TracLoginException e2) {
- throw e;
- } catch (TracException e2) {
- }
- }
-
- throw new TracException();
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracClientManager.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracClientManager.java
deleted file mode 100644
index 0778c5b28..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracClientManager.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.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.Map;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.commons.net.AbstractWebLocation;
-import org.eclipse.mylyn.internal.trac.core.ITracClient.Version;
-import org.eclipse.mylyn.tasks.core.IRepositoryListener;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.TaskRepositoryLocationFactory;
-
-/**
- * Caches {@link ITracClient} objects.
- *
- * @author Steffen Pingel
- */
-public class TracClientManager implements IRepositoryListener {
-
- private final Map<String, ITracClient> clientByUrl = new HashMap<String, ITracClient>();
-
- private final Map<String, TracClientData> clientDataByUrl = new HashMap<String, TracClientData>();
-
- private final File cacheFile;
-
- private TaskRepositoryLocationFactory taskRepositoryLocationFactory;
-
- public TracClientManager(File cacheFile, TaskRepositoryLocationFactory taskRepositoryLocationFactory) {
- this.cacheFile = cacheFile;
- this.taskRepositoryLocationFactory = taskRepositoryLocationFactory;
-
- readCache();
- }
-
- public synchronized ITracClient getTracClient(TaskRepository taskRepository) {
- ITracClient repository = clientByUrl.get(taskRepository.getRepositoryUrl());
- if (repository == null) {
- AbstractWebLocation location = taskRepositoryLocationFactory.createWebLocation(taskRepository);
- repository = TracClientFactory.createClient(location, Version.fromVersion(taskRepository.getVersion()));
- clientByUrl.put(taskRepository.getRepositoryUrl(), repository);
-
- TracClientData data = clientDataByUrl.get(taskRepository.getRepositoryUrl());
- if (data == null) {
- data = new TracClientData();
- clientDataByUrl.put(taskRepository.getRepositoryUrl(), data);
- }
- repository.setData(data);
- }
- return repository;
- }
-
- public void repositoriesRead() {
- // ignore
- }
-
- public synchronized void repositoryAdded(TaskRepository repository) {
- // make sure there is no stale client still in the cache, bug #149939
- clientByUrl.remove(repository.getRepositoryUrl());
- clientDataByUrl.remove(repository.getRepositoryUrl());
- }
-
- public synchronized void repositoryRemoved(TaskRepository repository) {
- clientByUrl.remove(repository.getRepositoryUrl());
- clientDataByUrl.remove(repository.getRepositoryUrl());
- }
-
- public synchronized void repositorySettingsChanged(TaskRepository repository) {
- clientByUrl.remove(repository.getRepositoryUrl());
- // if url is changed a stale data object will be left in
- // clientDataByUrl, bug #149939
- }
-
- public void readCache() {
- if (cacheFile == null || !cacheFile.exists()) {
- return;
- }
-
- ObjectInputStream in = null;
- try {
- in = new ObjectInputStream(new FileInputStream(cacheFile));
- int size = in.readInt();
- for (int i = 0; i < size; i++) {
- String url = (String) in.readObject();
- TracClientData data = (TracClientData) in.readObject();
- if (url != null && data != null) {
- clientDataByUrl.put(url, data);
- }
- }
- } catch (Throwable e) {
- StatusHandler.log(new Status(IStatus.WARNING, TracCorePlugin.PLUGIN_ID,
- "The Trac respository configuration cache could not be read", e));
- } finally {
- if (in != null) {
- try {
- in.close();
- } catch (IOException e) {
- // ignore
- }
- }
- }
-
- }
-
- public void writeCache() {
- if (cacheFile == null) {
- return;
- }
-
- ObjectOutputStream out = null;
- try {
- out = new ObjectOutputStream(new FileOutputStream(cacheFile));
- out.writeInt(clientDataByUrl.size());
- for (String url : clientDataByUrl.keySet()) {
- out.writeObject(url);
- out.writeObject(clientDataByUrl.get(url));
- }
- } catch (IOException e) {
- StatusHandler.log(new Status(IStatus.WARNING, TracCorePlugin.PLUGIN_ID,
- "The Trac respository configuration cache could not be written", e));
- } finally {
- if (out != null) {
- try {
- out.close();
- } catch (IOException e) {
- // ignore
- }
- }
- }
- }
-
- public TaskRepositoryLocationFactory getTaskRepositoryLocationFactory() {
- return taskRepositoryLocationFactory;
- }
-
- public void setTaskRepositoryLocationFactory(TaskRepositoryLocationFactory taskRepositoryLocationFactory) {
- this.taskRepositoryLocationFactory = taskRepositoryLocationFactory;
- }
-
- public void repositoryUrlChanged(TaskRepository repository, String oldUrl) {
- // ignore
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracCorePlugin.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracCorePlugin.java
deleted file mode 100644
index 56143cf55..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracCorePlugin.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.trac.core;
-
-import java.net.MalformedURLException;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.mylyn.tasks.core.RepositoryStatus;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.osgi.framework.BundleContext;
-
-/**
- * The headless Trac plug-in class.
- *
- * @author Steffen Pingel
- */
-public class TracCorePlugin extends Plugin {
-
- public static final String PLUGIN_ID = "org.eclipse.mylyn.trac.core";
-
- public static final String ENCODING_UTF_8 = "UTF-8";
-
- private static TracCorePlugin plugin;
-
- public final static String REPOSITORY_KIND = "trac";
-
- private TracRepositoryConnector connector;
-
- public TracCorePlugin() {
- }
-
- public static TracCorePlugin getDefault() {
- return plugin;
- }
-
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- @Override
- public void stop(BundleContext context) throws Exception {
- if (connector != null) {
- connector.stop();
- connector = null;
- }
-
- plugin = null;
- super.stop(context);
- }
-
- public TracRepositoryConnector getConnector() {
- return connector;
- }
-
- void setConnector(TracRepositoryConnector connector) {
- this.connector = connector;
- }
-
- /**
- * Returns the path to the file caching repository attributes.
- */
- protected IPath getRepostioryAttributeCachePath() {
- IPath stateLocation = Platform.getStateLocation(getBundle());
- IPath cacheFile = stateLocation.append("repositoryConfigurations");
- return cacheFile;
- }
-
- public static IStatus toStatus(Throwable e, TaskRepository repository) {
- if (e instanceof TracLoginException) {
- return RepositoryStatus.createLoginError(repository.getRepositoryUrl(), PLUGIN_ID);
- } else if (e instanceof TracPermissionDeniedException) {
- return TracStatus.createPermissionDeniedError(repository.getRepositoryUrl(), PLUGIN_ID);
- } else if (e instanceof InvalidTicketException) {
- return new RepositoryStatus(repository.getRepositoryUrl(), IStatus.ERROR, PLUGIN_ID, RepositoryStatus.ERROR_IO,
- "The server returned an unexpected response", e);
- } else if (e instanceof TracException) {
- String message = e.getMessage();
- if (message == null) {
- message = "I/O error has occured";
- }
- return new RepositoryStatus(repository.getRepositoryUrl(), IStatus.ERROR, PLUGIN_ID, RepositoryStatus.ERROR_IO,
- message, e);
- } else if (e instanceof ClassCastException) {
- return new RepositoryStatus(IStatus.ERROR, PLUGIN_ID, RepositoryStatus.ERROR_IO,
- "Unexpected server response: " + e.getMessage(), e);
- } else if (e instanceof MalformedURLException) {
- return new RepositoryStatus(IStatus.ERROR, PLUGIN_ID, RepositoryStatus.ERROR_IO,
- "Repository URL is invalid", e);
- } else {
- return new RepositoryStatus(IStatus.ERROR, PLUGIN_ID, RepositoryStatus.ERROR_INTERNAL, "Unexpected error",
- e);
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracException.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracException.java
deleted file mode 100644
index 7556ef0d5..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracException.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.core;
-
-/**
- * Indicates an error during repository access.
- *
- * @author Steffen Pingel
- */
-public class TracException extends Exception {
-
- private static final long serialVersionUID = 1929614326467463462L;
-
- public TracException() {
- }
-
- public TracException(String message) {
- super(message);
- }
-
- public TracException(Throwable cause) {
- super(cause.getMessage(), cause);
- }
-
- public TracException(String message, Throwable cause) {
- super(message, cause);
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracLoginException.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracLoginException.java
deleted file mode 100644
index 52119788a..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracLoginException.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.core;
-
-/**
- * Indicates an authentication error during login.
- *
- * @author Steffen Pingel
- */
-public class TracLoginException extends TracException {
-
- private static final long serialVersionUID = -6128773690643367414L;
-
- public TracLoginException() {
- }
-
- public TracLoginException(String message) {
- super(message);
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracNoSuchMethodException.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracNoSuchMethodException.java
deleted file mode 100644
index 736c6a89f..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracNoSuchMethodException.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.core;
-
-import org.apache.xmlrpc.XmlRpcException;
-
-public class TracNoSuchMethodException extends TracException {
-
- private static final long serialVersionUID = 9075003728286406705L;
-
- public TracNoSuchMethodException(XmlRpcException e) {
- super(e);
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracPermissionDeniedException.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracPermissionDeniedException.java
deleted file mode 100644
index eadb8ddb4..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracPermissionDeniedException.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.core;
-
-/**
- * Indicates insufficient permissions to execute an operation.
- *
- * @author Steffen Pingel
- */
-public class TracPermissionDeniedException extends TracException {
-
- private static final long serialVersionUID = -6128773690643367414L;
-
- public TracPermissionDeniedException() {
- }
-
- public TracPermissionDeniedException(String message) {
- super(message);
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracProxyAuthenticationException.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracProxyAuthenticationException.java
deleted file mode 100644
index 7f69e3067..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracProxyAuthenticationException.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.core;
-
-public class TracProxyAuthenticationException extends TracException {
-
- private static final long serialVersionUID = 305145749259511429L;
-
- public TracProxyAuthenticationException(String message) {
- super(message);
- }
-
- public TracProxyAuthenticationException() {
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracRemoteException.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracRemoteException.java
deleted file mode 100644
index 164896aad..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracRemoteException.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.core;
-
-/**
- * Indicates that an exception on the repository side has been encountered while processing the request.
- *
- * @author Steffen Pingel
- */
-public class TracRemoteException extends TracException {
-
- private static final long serialVersionUID = -6761365344287289624L;
-
- public TracRemoteException() {
- }
-
- public TracRemoteException(String message) {
- super(message);
- }
-
- public TracRemoteException(Throwable cause) {
- super(cause);
- }
-
- public TracRemoteException(String message, Throwable cause) {
- super(message, cause);
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracRepositoryConnector.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracRepositoryConnector.java
deleted file mode 100644
index a6dede07f..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracRepositoryConnector.java
+++ /dev/null
@@ -1,442 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.core;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-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.OperationCanceledException;
-import org.eclipse.core.runtime.Status;
-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.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractAttachmentHandler;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractLegacyRepositoryConnector;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractTaskDataHandler;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.LegacyTaskDataCollector;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryOperation;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskAttribute;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-import org.eclipse.mylyn.internal.trac.core.ITracClient.Version;
-import org.eclipse.mylyn.internal.trac.core.TracAttributeFactory.Attribute;
-import org.eclipse.mylyn.internal.trac.core.TracTask.Kind;
-import org.eclipse.mylyn.internal.trac.core.model.TracPriority;
-import org.eclipse.mylyn.internal.trac.core.model.TracTicket;
-import org.eclipse.mylyn.internal.trac.core.model.TracTicket.Key;
-import org.eclipse.mylyn.internal.trac.core.util.TracUtils;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.RepositoryStatus;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.TaskRepositoryLocationFactory;
-import org.eclipse.mylyn.tasks.core.data.TaskDataCollector;
-import org.eclipse.mylyn.tasks.core.sync.ISynchronizationSession;
-
-/**
- * @author Steffen Pingel
- */
-public class TracRepositoryConnector extends AbstractLegacyRepositoryConnector {
-
- private final static String CLIENT_LABEL = "Trac (supports 0.9 or 0.10 through Web and XML-RPC)";
-
- private TracClientManager clientManager;
-
- private final TracTaskDataHandler taskDataHandler = new TracTaskDataHandler(this);
-
- private final TracAttachmentHandler attachmentHandler = new TracAttachmentHandler(this);
-
- private TaskRepositoryLocationFactory taskRepositoryLocationFactory = new TaskRepositoryLocationFactory();
-
- private File repositoryConfigurationCacheFile;
-
- public TracRepositoryConnector(File repositoryConfigurationCacheFile) {
- this.repositoryConfigurationCacheFile = repositoryConfigurationCacheFile;
-
- }
-
- public TracRepositoryConnector() {
- if (TracCorePlugin.getDefault() != null) {
- TracCorePlugin.getDefault().setConnector(this);
- IPath path = TracCorePlugin.getDefault().getRepostioryAttributeCachePath();
- repositoryConfigurationCacheFile = path.toFile();
- }
- }
-
- @Override
- public boolean canCreateNewTask(TaskRepository repository) {
- return true;
- }
-
- @Override
- public boolean canCreateTaskFromKey(TaskRepository repository) {
- return true;
- }
-
- private final TracWikiHandler wikiHandler = new TracWikiHandler(this);
-
- public boolean hasWiki(TaskRepository repository) {
- // check the access mode to validate Wiki support
- ITracClient client = getClientManager().getTracClient(repository);
- if (client instanceof ITracWikiClient) {
- return true;
- }
- return false;
- }
-
- public AbstractWikiHandler getWikiHandler() {
- return wikiHandler;
- }
-
- @Override
- public String getLabel() {
- return CLIENT_LABEL;
- }
-
- @Override
- public String getConnectorKind() {
- return TracCorePlugin.REPOSITORY_KIND;
- }
-
- @Override
- public String getRepositoryUrlFromTaskUrl(String url) {
- if (url == null) {
- return null;
- }
- int index = url.lastIndexOf(ITracClient.TICKET_URL);
- return index == -1 ? null : url.substring(0, index);
- }
-
- @Override
- public String getTaskIdFromTaskUrl(String url) {
- if (url == null) {
- return null;
- }
- int index = url.lastIndexOf(ITracClient.TICKET_URL);
- return index == -1 ? null : url.substring(index + ITracClient.TICKET_URL.length());
- }
-
- @Override
- public String getTaskUrl(String repositoryUrl, String taskId) {
- return repositoryUrl + ITracClient.TICKET_URL + taskId;
- }
-
- @Override
- public AbstractAttachmentHandler getAttachmentHandler() {
- return attachmentHandler;
- }
-
- @Override
- public AbstractTaskDataHandler getLegacyTaskDataHandler() {
- return taskDataHandler;
- }
-
- @Override
- public IStatus performQuery(TaskRepository repository, IRepositoryQuery query, TaskDataCollector resultCollector,
- ISynchronizationSession event, IProgressMonitor monitor) {
- try {
- monitor.beginTask("Querying repository", IProgressMonitor.UNKNOWN);
-
- final List<TracTicket> tickets = new ArrayList<TracTicket>();
-
- ITracClient client;
- try {
- client = getClientManager().getTracClient(repository);
- if (query instanceof TracRepositoryQuery) {
- client.search(((TracRepositoryQuery) query).getTracSearch(), tickets, monitor);
- }
-
- client.updateAttributes(monitor, false);
- for (TracTicket ticket : tickets) {
- RepositoryTaskData taskData = taskDataHandler.createTaskDataFromTicket(client, repository, ticket,
- monitor);
- ((LegacyTaskDataCollector) resultCollector).accept(taskData);
- }
- } catch (Throwable e) {
- return TracCorePlugin.toStatus(e, repository);
- }
-
- return Status.OK_STATUS;
- } finally {
- monitor.done();
- }
- }
-
- @Override
- public void preSynchronization(ISynchronizationSession session, IProgressMonitor monitor) throws CoreException {
- monitor = Policy.monitorFor(monitor);
- try {
- monitor.beginTask("Getting changed tasks", IProgressMonitor.UNKNOWN);
-
- if (!session.isFullSynchronization()) {
- return;
- }
-
- // there are no Trac tasks in the task list, skip contacting the repository
- if (session.getTasks().isEmpty()) {
- return;
- }
-
- TaskRepository repository = session.getTaskRepository();
- if (!TracRepositoryConnector.hasChangedSince(repository)) {
- // always run the queries for web mode
- return;
- }
-
- if (repository.getSynchronizationTimeStamp() == null
- || repository.getSynchronizationTimeStamp().length() == 0) {
- for (ITask task : session.getTasks()) {
- session.markStale(task);
- }
- return;
- }
-
- Date since = new Date(0);
- try {
- since = TracUtils.parseDate(Integer.parseInt(repository.getSynchronizationTimeStamp()));
- } catch (NumberFormatException e) {
- }
-
- try {
- ITracClient client = getClientManager().getTracClient(repository);
- Set<Integer> ids = client.getChangedTickets(since, monitor);
- if (ids.isEmpty()) {
- // repository is unchanged
- session.setNeedsPerformQueries(false);
- return;
- }
-
- if (ids.size() == 1) {
- // getChangedTickets() is expected to always return at least
- // one ticket because
- // the repository synchronization timestamp is set to the
- // most recent modification date
- Integer id = ids.iterator().next();
- Date lastChanged = client.getTicketLastChanged(id, monitor);
- if (since.equals(lastChanged)) {
- // repository didn't actually change
- session.setNeedsPerformQueries(false);
- return;
- }
- }
-
- for (ITask task : session.getTasks()) {
- Integer id = getTicketId(task.getTaskId());
- if (ids.contains(id)) {
- session.markStale(task);
- }
- }
- } catch (OperationCanceledException e) {
- throw e;
- } catch (Exception e) {
- // TODO catch TracException
- throw new CoreException(TracCorePlugin.toStatus(e, repository));
- }
- } finally {
- monitor.done();
- }
- }
-
- @Override
- public AbstractTask createTask(String repositoryUrl, String id, String summary) {
- TracTask tracTask = new TracTask(repositoryUrl, id, summary);
- tracTask.setCreationDate(new Date());
- return tracTask;
- }
-
- @Override
- public boolean updateTaskFromTaskData(TaskRepository taskRepository, ITask task, RepositoryTaskData taskData) {
- TracTask tracTask = (TracTask) task;
- ITracClient client = getClientManager().getTracClient(taskRepository);
-
- task.setSummary(taskData.getSummary());
- task.setOwner(taskData.getAttributeValue(RepositoryTaskAttribute.USER_ASSIGNED));
- if (TracTask.isCompleted(taskData.getStatus())) {
- task.setCompletionDate(TracUtils.parseDate(Integer.valueOf(taskData.getLastModified())));
- } else {
- task.setCompletionDate(null);
- }
- task.setUrl(taskRepository.getRepositoryUrl() + ITracClient.TICKET_URL + taskData.getTaskId());
-
- String priority = taskData.getAttributeValue(Attribute.PRIORITY.getTracKey());
- TracPriority[] tracPriorities = client.getPriorities();
- task.setPriority(TracTask.getTaskPriority(priority, tracPriorities).toString());
-
- Kind kind = TracTask.Kind.fromType(taskData.getAttributeValue(Attribute.TYPE.getTracKey()));
- task.setTaskKind((kind != null) ? kind.toString() : null);
-
- tracTask.setSupportsSubtasks(taskDataHandler.canInitializeSubTaskData(null, taskData));
-
- // TODO check return value
- return false;
- }
-
- public static int getTicketId(String taskId) throws CoreException {
- try {
- return Integer.parseInt(taskId);
- } catch (NumberFormatException e) {
- throw new CoreException(new Status(IStatus.ERROR, TracCorePlugin.PLUGIN_ID, IStatus.OK,
- "Invalid ticket id: " + taskId, e));
- }
- }
-
- public synchronized TracClientManager getClientManager() {
- if (clientManager == null) {
- clientManager = new TracClientManager(repositoryConfigurationCacheFile, taskRepositoryLocationFactory);
- }
- return clientManager;
- }
-
- public static boolean hasChangedSince(TaskRepository repository) {
- return Version.XML_RPC.name().equals(repository.getVersion());
- }
-
- public static boolean hasRichEditor(TaskRepository repository) {
- return Version.XML_RPC.name().equals(repository.getVersion());
- }
-
- public static boolean hasRichEditor(TaskRepository repository, ITask task) {
- return hasRichEditor(repository);
- }
-
- public static boolean hasAttachmentSupport(TaskRepository repository, ITask task) {
- return Version.XML_RPC.name().equals(repository.getVersion());
- }
-
- public void stop() {
- if (clientManager != null) {
- clientManager.writeCache();
- }
- }
-
- @Override
- public void updateRepositoryConfiguration(TaskRepository repository, IProgressMonitor monitor) throws CoreException {
- try {
- ITracClient client = getClientManager().getTracClient(repository);
- client.updateAttributes(monitor, true);
- } catch (Exception e) {
- throw new CoreException(RepositoryStatus.createStatus(repository.getRepositoryUrl(), IStatus.WARNING,
- TracCorePlugin.PLUGIN_ID, "Could not update attributes"));
- }
- }
-
- public static String getDisplayUsername(TaskRepository repository) {
- AuthenticationCredentials credentials = repository.getCredentials(AuthenticationType.REPOSITORY);
- if (credentials != null && credentials.getUserName().length() > 0) {
- return ITracClient.DEFAULT_USERNAME;
- }
- return repository.getUserName();
- }
-
- @Override
- public String getTaskIdPrefix() {
- return "#";
- }
-
- public static TracTicket getTracTicket(TaskRepository repository, RepositoryTaskData data)
- throws InvalidTicketException, CoreException {
- TracTicket ticket = new TracTicket(getTicketId(data.getTaskId()));
-
- List<RepositoryTaskAttribute> attributes = data.getAttributes();
- for (RepositoryTaskAttribute attribute : attributes) {
- if (TracAttributeFactory.isInternalAttribute(attribute.getId())) {
- // ignore
- } else if (!attribute.isReadOnly()) {
- ticket.putValue(attribute.getId(), attribute.getValue());
- }
- }
-
- // set cc value
- StringBuilder sb = new StringBuilder();
- List<String> removeValues = data.getAttributeValues(RepositoryTaskAttribute.REMOVE_CC);
- List<String> values = data.getAttributeValues(RepositoryTaskAttribute.USER_CC);
- for (String user : values) {
- if (!removeValues.contains(user)) {
- if (sb.length() > 0) {
- sb.append(",");
- }
- sb.append(user);
- }
- }
- if (data.getAttributeValue(RepositoryTaskAttribute.NEW_CC).length() > 0) {
- if (sb.length() > 0) {
- sb.append(",");
- }
- sb.append(data.getAttributeValue(RepositoryTaskAttribute.NEW_CC));
- }
- if (RepositoryTaskAttribute.TRUE.equals(data.getAttributeValue(RepositoryTaskAttribute.ADD_SELF_CC))) {
- if (sb.length() > 0) {
- sb.append(",");
- }
- sb.append(repository.getUserName());
- }
- ticket.putBuiltinValue(Key.CC, sb.toString());
-
- RepositoryOperation operation = data.getSelectedOperation();
- if (operation != null) {
- String action = operation.getKnobName();
- if (!"leave".equals(action)) {
- if ("accept".equals(action)) {
- ticket.putValue("status", TracTask.Status.ASSIGNED.toStatusString());
- ticket.putValue("owner", getDisplayUsername(repository));
- } else if ("resolve".equals(action)) {
- ticket.putValue("status", TracTask.Status.CLOSED.toStatusString());
- ticket.putValue("resolution", operation.getOptionSelection());
- } else if ("reopen".equals(action)) {
- ticket.putValue("status", TracTask.Status.REOPENED.toStatusString());
- ticket.putValue("resolution", "");
- } else if ("reassign".equals(operation.getKnobName())) {
- ticket.putValue("status", TracTask.Status.NEW.toStatusString());
- ticket.putValue("owner", operation.getInputValue());
- }
- }
- }
-
- return ticket;
- }
-
- public TaskRepositoryLocationFactory getTaskRepositoryLocationFactory() {
- return taskRepositoryLocationFactory;
- }
-
- public synchronized void setTaskRepositoryLocationFactory(
- TaskRepositoryLocationFactory taskRepositoryLocationFactory) {
- this.taskRepositoryLocationFactory = taskRepositoryLocationFactory;
- if (this.clientManager != null) {
- clientManager.setTaskRepositoryLocationFactory(taskRepositoryLocationFactory);
- }
- }
-
- @Override
- public RepositoryTaskData getLegacyTaskData(TaskRepository repository, String taskId, IProgressMonitor monitor)
- throws CoreException {
- return getLegacyTaskDataHandler().getTaskData(repository, taskId, monitor);
- }
-
- @Override
- public void postSynchronization(ISynchronizationSession event, IProgressMonitor monitor) throws CoreException {
- try {
- monitor.beginTask("", 1);
- if (event.isFullSynchronization()) {
- event.getTaskRepository().setSynchronizationTimeStamp(
- getSynchronizationTimestamp(event.getTaskRepository(), event.getChangedTasks()));
- }
- } finally {
- monitor.done();
- }
- }
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracRepositoryQuery.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracRepositoryQuery.java
deleted file mode 100644
index 5744bd599..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracRepositoryQuery.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.core;
-
-import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
-import org.eclipse.mylyn.internal.trac.core.model.TracSearch;
-
-/**
- * @author Steffen Pingel
- */
-public class TracRepositoryQuery extends RepositoryQuery {
-
- public TracRepositoryQuery(String repositoryUrl, String queryUrl, String description) {
- super(description);
-
- assert queryUrl.startsWith(repositoryUrl + ITracClient.QUERY_URL);
-
- setRepositoryUrl(repositoryUrl);
- setUrl(queryUrl);
- }
-
- @Override
- public String getConnectorKind() {
- return TracCorePlugin.REPOSITORY_KIND;
- }
-
- public String getQueryParameter() {
- String url = getUrl();
- int i = url.indexOf(ITracClient.QUERY_URL);
- if (i == -1) {
- return null;
- }
- return url.substring(i + ITracClient.QUERY_URL.length());
- }
-
- /**
- * Creates a <code>TracSearch</code> object from this query.
- */
- public TracSearch getTracSearch() {
- TracSearch search = new TracSearch();
- String url = getQueryParameter();
- if (url != null) {
- search.fromUrl(url);
- }
- return search;
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracStatus.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracStatus.java
deleted file mode 100644
index 2d9a3c949..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracStatus.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.core;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.mylyn.tasks.core.RepositoryStatus;
-
-/**
- * @author Steffen Pingel
- */
-public class TracStatus {
-
- public static IStatus createPermissionDeniedError(String repositoryUrl, String pluginId) {
- return new RepositoryStatus(repositoryUrl, IStatus.ERROR, TracCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_PERMISSION_DENIED, "Permission denied.");
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracTask.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracTask.java
deleted file mode 100644
index 30d94f878..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracTask.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.core;
-
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.trac.core.model.TracPriority;
-
-/**
- * @author Steffen Pingel
- */
-public class TracTask extends AbstractTask {
-
- public enum Kind {
- DEFECT, ENHANCEMENT, TASK;
-
- public static Kind fromString(String type) {
- if (type == null) {
- return null;
- }
- if (type.equals("Defect")) {
- return DEFECT;
- }
- if (type.equals("Enhancement")) {
- return ENHANCEMENT;
- }
- if (type.equals("Task")) {
- return TASK;
- }
- return null;
- }
-
- public static Kind fromType(String type) {
- if (type == null) {
- return null;
- }
- if (type.equals("defect")) {
- return DEFECT;
- }
- if (type.equals("enhancement")) {
- return ENHANCEMENT;
- }
- if (type.equals("task")) {
- return TASK;
- }
- return null;
- }
-
- @Override
- public String toString() {
- switch (this) {
- case DEFECT:
- return "Defect";
- case ENHANCEMENT:
- return "Enhancement";
- case TASK:
- return "Task";
- default:
- return "";
- }
- }
-
- }
-
- public enum Status {
- ASSIGNED, CLOSED, NEW, REOPENED;
-
- public static Status fromStatus(String status) {
- if (status == null) {
- return null;
- }
- if (status.equals("new")) {
- return NEW;
- }
- if (status.equals("assigned")) {
- return ASSIGNED;
- }
- if (status.equals("reopened")) {
- return REOPENED;
- }
- if (status.equals("closed")) {
- return CLOSED;
- }
- return null;
- }
-
- public String toStatusString() {
- switch (this) {
- case NEW:
- return "new";
- case ASSIGNED:
- return "assigned";
- case REOPENED:
- return "reopened";
- case CLOSED:
- return "closed";
- default:
- return "";
- }
- }
-
- @Override
- public String toString() {
- switch (this) {
- case NEW:
- return "New";
- case ASSIGNED:
- return "Assigned";
- case REOPENED:
- return "Reopened";
- case CLOSED:
- return "Closed";
- default:
- return "";
- }
- }
-
- }
-
- public enum TracPriorityLevel {
- BLOCKER, CRITICAL, MAJOR, MINOR, TRIVIAL;
-
- public static TracPriorityLevel fromPriority(String priority) {
- if (priority == null) {
- return null;
- }
- if (priority.equals("blocker")) {
- return BLOCKER;
- }
- if (priority.equals("critical")) {
- return CRITICAL;
- }
- if (priority.equals("major")) {
- return MAJOR;
- }
- if (priority.equals("minor")) {
- return MINOR;
- }
- if (priority.equals("trivial")) {
- return TRIVIAL;
- }
- return null;
- }
-
- public PriorityLevel toPriorityLevel() {
- switch (this) {
- case BLOCKER:
- return PriorityLevel.P1;
- case CRITICAL:
- return PriorityLevel.P2;
- case MAJOR:
- return PriorityLevel.P3;
- case MINOR:
- return PriorityLevel.P4;
- case TRIVIAL:
- return PriorityLevel.P5;
- default:
- return null;
- }
- }
-
- @Override
- public String toString() {
- switch (this) {
- case BLOCKER:
- return "blocker";
- case CRITICAL:
- return "critical";
- case MAJOR:
- return "major";
- case MINOR:
- return "minor";
- case TRIVIAL:
- return "trivial";
- default:
- return null;
- }
- }
-
- }
-
- private static int TASK_PRIORITY_LEVELS = 5;
-
- public static PriorityLevel getTaskPriority(String tracPriority) {
- if (tracPriority != null) {
- TracPriorityLevel priority = TracPriorityLevel.fromPriority(tracPriority);
- if (priority != null) {
- return priority.toPriorityLevel();
- }
- }
- return PriorityLevel.getDefault();
- }
-
- public static PriorityLevel getTaskPriority(String priority, TracPriority[] tracPriorities) {
- if (priority != null && tracPriorities != null && tracPriorities.length > 0) {
- int minValue = tracPriorities[0].getValue();
- int range = tracPriorities[tracPriorities.length - 1].getValue() - minValue;
- for (TracPriority tracPriority : tracPriorities) {
- if (priority.equals(tracPriority.getName())) {
- float relativeValue = (float) (tracPriority.getValue() - minValue) / range;
- int value = (int) (relativeValue * TASK_PRIORITY_LEVELS) + 1;
- return PriorityLevel.fromLevel(value);
- }
- }
- }
- return getTaskPriority(priority);
- }
-
- public static boolean isCompleted(String tracStatus) {
- TracTask.Status status = TracTask.Status.fromStatus(tracStatus);
- return status == TracTask.Status.CLOSED;
- }
-
- private boolean supportsSubtasks = false;
-
- public TracTask(String repositoryUrl, String id, String label) {
- super(repositoryUrl, id, label);
- setUrl(repositoryUrl + ITracClient.TICKET_URL + id);
- }
-
- @Override
- public String getConnectorKind() {
- return TracCorePlugin.REPOSITORY_KIND;
- }
-
- @Override
- public boolean isLocal() {
- return false;
- }
-
- public boolean getSupportsSubtasks() {
- return supportsSubtasks;
- }
-
- public void setSupportsSubtasks(boolean supportsSubtasks) {
- this.supportsSubtasks = supportsSubtasks;
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracTaskDataHandler.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracTaskDataHandler.java
deleted file mode 100644
index e7eb04701..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracTaskDataHandler.java
+++ /dev/null
@@ -1,467 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.core;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.StringTokenizer;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.mylyn.commons.net.Policy;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractAttributeFactory;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractTaskDataHandler;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.DefaultTaskSchema;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryAttachment;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryOperation;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskAttribute;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.TaskComment;
-import org.eclipse.mylyn.internal.trac.core.TracAttributeFactory.Attribute;
-import org.eclipse.mylyn.internal.trac.core.TracTask.Kind;
-import org.eclipse.mylyn.internal.trac.core.model.TracAttachment;
-import org.eclipse.mylyn.internal.trac.core.model.TracComment;
-import org.eclipse.mylyn.internal.trac.core.model.TracPriority;
-import org.eclipse.mylyn.internal.trac.core.model.TracTicket;
-import org.eclipse.mylyn.internal.trac.core.model.TracTicketField;
-import org.eclipse.mylyn.internal.trac.core.model.TracTicket.Key;
-import org.eclipse.mylyn.internal.trac.core.util.TracUtils;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.RepositoryStatus;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-/**
- * @author Steffen Pingel
- */
-public class TracTaskDataHandler extends AbstractTaskDataHandler {
-
- public static final String ATTRIBUTE_BLOCKED_BY = "blockedby";
-
- public static final String ATTRIBUTE_BLOCKING = "blocking";
-
- private static final String CC_DELIMETER = ", ";
-
- private final AbstractAttributeFactory attributeFactory = new TracAttributeFactory();
-
- private final TracRepositoryConnector connector;
-
- public TracTaskDataHandler(TracRepositoryConnector connector) {
- this.connector = connector;
- }
-
- @Override
- public RepositoryTaskData getTaskData(TaskRepository repository, String taskId, IProgressMonitor monitor)
- throws CoreException {
- monitor = Policy.monitorFor(monitor);
- try {
- monitor.beginTask("Task Download", IProgressMonitor.UNKNOWN);
- return downloadTaskData(repository, TracRepositoryConnector.getTicketId(taskId), monitor);
- } finally {
- monitor.done();
- }
- }
-
- public RepositoryTaskData downloadTaskData(TaskRepository repository, int taskId, IProgressMonitor monitor)
- throws CoreException {
- ITracClient client = connector.getClientManager().getTracClient(repository);
- TracTicket ticket;
- try {
- client.updateAttributes(monitor, false);
- ticket = client.getTicket(taskId, monitor);
- } catch (OperationCanceledException e) {
- throw e;
- } catch (Exception e) {
- // TODO catch TracException
- throw new CoreException(TracCorePlugin.toStatus(e, repository));
- }
- return createTaskDataFromTicket(client, repository, ticket, monitor);
- }
-
- public RepositoryTaskData createTaskDataFromTicket(ITracClient client, TaskRepository repository,
- TracTicket ticket, IProgressMonitor monitor) throws CoreException {
- RepositoryTaskData taskData = new RepositoryTaskData(attributeFactory, TracCorePlugin.REPOSITORY_KIND,
- repository.getRepositoryUrl(), ticket.getId() + "");
- try {
- if (!TracRepositoryConnector.hasRichEditor(repository)) {
- updateTaskDataFromTicket(taskData, ticket, client);
- taskData.setPartial(true);
- } else {
- createDefaultAttributes(attributeFactory, taskData, client, true);
- updateTaskData(repository, attributeFactory, taskData, ticket);
- }
- return taskData;
- } catch (OperationCanceledException e) {
- throw e;
- } catch (Exception e) {
- // TODO catch TracException
- throw new CoreException(TracCorePlugin.toStatus(e, repository));
- }
- }
-
- @Override
- public AbstractAttributeFactory getAttributeFactory(String repositoryUrl, String repositoryKind, String taskKind) {
- // we don't care about the repository information right now
- return attributeFactory;
- }
-
- @Override
- public AbstractAttributeFactory getAttributeFactory(RepositoryTaskData taskData) {
- return getAttributeFactory(taskData.getRepositoryUrl(), taskData.getConnectorKind(), taskData.getTaskKind());
- }
-
- public static void updateTaskData(TaskRepository repository, AbstractAttributeFactory factory,
- RepositoryTaskData data, TracTicket ticket) {
- if (ticket.getCreated() != null) {
- data.setAttributeValue(Attribute.TIME.getTracKey(), TracUtils.toTracTime(ticket.getCreated()) + "");
- }
-
- Date lastChanged = ticket.getLastChanged();
-
- Map<String, String> valueByKey = ticket.getValues();
- for (String key : valueByKey.keySet()) {
- if (Key.CC.getKey().equals(key)) {
- StringTokenizer t = new StringTokenizer(valueByKey.get(key), CC_DELIMETER);
- while (t.hasMoreTokens()) {
- data.addAttributeValue(key, t.nextToken());
- }
- } else {
- data.setAttributeValue(key, valueByKey.get(key));
- }
- }
-
- TracComment[] comments = ticket.getComments();
- if (comments != null) {
- for (int i = 0; i < comments.length; i++) {
- if (!"comment".equals(comments[i].getField()) || "".equals(comments[i].getNewValue())) {
- continue;
- }
-
- TaskComment taskComment = new TaskComment(factory, data.getComments().size() + 1);
- taskComment.setAttributeValue(RepositoryTaskAttribute.COMMENT_AUTHOR, comments[i].getAuthor());
- taskComment.setAttributeValue(RepositoryTaskAttribute.COMMENT_DATE, comments[i].getCreated().toString());
- taskComment.setAttributeValue(RepositoryTaskAttribute.COMMENT_TEXT, comments[i].getNewValue());
- data.addComment(taskComment);
- }
- }
-
- TracAttachment[] attachments = ticket.getAttachments();
- if (attachments != null) {
- for (int i = 0; i < attachments.length; i++) {
- RepositoryAttachment taskAttachment = new RepositoryAttachment(factory);
- taskAttachment.setCreator(attachments[i].getAuthor());
- taskAttachment.setRepositoryKind(TracCorePlugin.REPOSITORY_KIND);
- taskAttachment.setRepositoryUrl(repository.getRepositoryUrl());
- taskAttachment.setTaskId("" + ticket.getId());
- taskAttachment.setAttributeValue(Attribute.DESCRIPTION.getTracKey(), attachments[i].getDescription());
- taskAttachment.setAttributeValue(RepositoryTaskAttribute.ATTACHMENT_FILENAME,
- attachments[i].getFilename());
- taskAttachment.setAttributeValue(RepositoryTaskAttribute.ATTACHMENT_SIZE, attachments[i].getSize() + "");
- taskAttachment.setAttributeValue(RepositoryTaskAttribute.USER_OWNER, attachments[i].getAuthor());
- if (attachments[i].getCreated() != null) {
- if (lastChanged == null || attachments[i].getCreated().after(lastChanged)) {
- lastChanged = attachments[i].getCreated();
- }
-
- taskAttachment.setAttributeValue(RepositoryTaskAttribute.ATTACHMENT_DATE,
- attachments[i].getCreated().toString());
- }
- taskAttachment.setAttributeValue(RepositoryTaskAttribute.ATTACHMENT_URL, repository.getRepositoryUrl()
- + ITracClient.TICKET_ATTACHMENT_URL + ticket.getId() + "/" + attachments[i].getFilename());
- taskAttachment.setAttributeValue(RepositoryTaskAttribute.ATTACHMENT_ID, i + "");
- data.addAttachment(taskAttachment);
- }
- }
-
- String[] actions = ticket.getActions();
- if (actions != null) {
- // add operations in a defined order
- List<String> actionList = new ArrayList<String>(Arrays.asList(actions));
- addOperation(repository, data, ticket, actionList, "leave");
- addOperation(repository, data, ticket, actionList, "accept");
- addOperation(repository, data, ticket, actionList, "resolve");
- addOperation(repository, data, ticket, actionList, "reassign");
- addOperation(repository, data, ticket, actionList, "reopen");
- }
-
- if (lastChanged != null) {
- data.setAttributeValue(Attribute.CHANGE_TIME.getTracKey(), TracUtils.toTracTime(lastChanged) + "");
- }
- }
-
- // TODO Reuse Labels from BugzillaServerFacade
- private static void addOperation(TaskRepository repository, RepositoryTaskData data, TracTicket ticket,
- List<String> actions, String action) {
- if (!actions.remove(action)) {
- return;
- }
-
- RepositoryOperation operation = null;
- if ("leave".equals(action)) {
- operation = new RepositoryOperation(action, "Leave as " + data.getStatus() + " " + data.getResolution());
- operation.setChecked(true);
- } else if ("accept".equals(action)) {
- operation = new RepositoryOperation(action, "Accept");
- } else if ("resolve".equals(action)) {
- operation = new RepositoryOperation(action, "Resolve as");
- operation.setUpOptions("resolution");
- for (String resolution : ticket.getResolutions()) {
- operation.addOption(resolution, resolution);
- }
- } else if ("reassign".equals(action)) {
- operation = new RepositoryOperation(action, "Reassign to");
- operation.setInputName("owner");
- operation.setInputValue(TracRepositoryConnector.getDisplayUsername(repository));
- } else if ("reopen".equals(action)) {
- operation = new RepositoryOperation(action, "Reopen");
- }
-
- if (operation != null) {
- data.addOperation(operation);
- }
- }
-
- public static void createDefaultAttributes(AbstractAttributeFactory factory, RepositoryTaskData data,
- ITracClient client, boolean existingTask) {
- TracTicketField[] fields = client.getTicketFields();
-
- if (existingTask) {
- createAttribute(factory, data, Attribute.STATUS, client.getTicketStatus());
- createAttribute(factory, data, Attribute.RESOLUTION, client.getTicketResolutions());
- }
-
- createAttribute(factory, data, Attribute.COMPONENT, client.getComponents());
- createAttribute(factory, data, Attribute.VERSION, client.getVersions(), true);
- createAttribute(factory, data, Attribute.PRIORITY, client.getPriorities());
- createAttribute(factory, data, Attribute.SEVERITY, client.getSeverities());
-
- createAttribute(factory, data, Attribute.TYPE, client.getTicketTypes());
- RepositoryTaskAttribute attribute = createAttribute(factory, data, Attribute.OWNER);
- if (!existingTask) {
- attribute.setReadOnly(false);
- }
- createAttribute(factory, data, Attribute.MILESTONE, client.getMilestones(), true);
- if (existingTask) {
- createAttribute(factory, data, Attribute.REPORTER);
- }
-
- if (existingTask) {
- createAttribute(factory, data, Attribute.NEW_CC);
- }
- createAttribute(factory, data, Attribute.CC);
- createAttribute(factory, data, Attribute.KEYWORDS);
-
- if (!existingTask) {
- createAttribute(factory, data, Attribute.SUMMARY);
- createAttribute(factory, data, Attribute.DESCRIPTION);
- }
-
- if (fields != null) {
- for (TracTicketField field : fields) {
- if (field.isCustom()) {
- createAttribute(data, field);
- }
- }
- }
- }
-
- private static void createAttribute(RepositoryTaskData data, TracTicketField field) {
- RepositoryTaskAttribute attr = new RepositoryTaskAttribute(field.getName(), field.getLabel(), false);
- if (field.getType() == TracTicketField.Type.CHECKBOX) {
- // attr.addOption("True", "1");
- // attr.addOption("False", "0");
- attr.addOption("1", "1");
- attr.addOption("0", "0");
-
- if (field.getDefaultValue() != null) {
- attr.setValue(field.getDefaultValue());
- }
- } else if (field.getType() == TracTicketField.Type.SELECT || field.getType() == TracTicketField.Type.RADIO) {
- String[] values = field.getOptions();
- if (values != null && values.length > 0) {
- if (field.isOptional()) {
- attr.addOption("", "");
- }
- for (String value : values) {
- attr.addOption(value, value);
- }
-
- if (field.getDefaultValue() != null) {
- try {
- int index = Integer.parseInt(field.getDefaultValue());
- if (index > 0 && index < values.length) {
- attr.setValue(values[index]);
- }
- } catch (NumberFormatException e) {
- for (String value : values) {
- if (field.getDefaultValue().equals(value.toString())) {
- attr.setValue(value);
- break;
- }
- }
- }
- }
- }
- } else {
- if (field.getDefaultValue() != null) {
- attr.setValue(field.getDefaultValue());
- }
- }
- data.addAttribute(attr.getId(), attr);
- }
-
- private static RepositoryTaskAttribute createAttribute(AbstractAttributeFactory factory, RepositoryTaskData data,
- Attribute attribute, Object[] values, boolean allowEmtpy) {
- RepositoryTaskAttribute attr = factory.createAttribute(attribute.getTracKey());
- if (values != null && values.length > 0) {
- if (allowEmtpy) {
- attr.addOption("", "");
- }
- for (Object value : values) {
- attr.addOption(value.toString(), value.toString());
- }
- } else {
- attr.setHidden(true);
- attr.setReadOnly(true);
- }
- data.addAttribute(attribute.getTracKey(), attr);
- return attr;
- }
-
- private static RepositoryTaskAttribute createAttribute(AbstractAttributeFactory factory, RepositoryTaskData data,
- Attribute attribute) {
- RepositoryTaskAttribute attr = factory.createAttribute(attribute.getTracKey());
- data.addAttribute(attribute.getTracKey(), attr);
- return attr;
- }
-
- private static RepositoryTaskAttribute createAttribute(AbstractAttributeFactory factory, RepositoryTaskData data,
- Attribute attribute, Object[] values) {
- return createAttribute(factory, data, attribute, values, false);
- }
-
- @Override
- public String postTaskData(TaskRepository repository, RepositoryTaskData taskData, IProgressMonitor monitor)
- throws CoreException {
- try {
- TracTicket ticket = TracRepositoryConnector.getTracTicket(repository, taskData);
- ITracClient server = connector.getClientManager().getTracClient(repository);
- if (taskData.isNew()) {
- int id = server.createTicket(ticket, monitor);
- return id + "";
- } else {
- server.updateTicket(ticket, taskData.getNewComment(), monitor);
- return null;
- }
- } catch (OperationCanceledException e) {
- throw e;
- } catch (Exception e) {
- // TODO catch TracException
- throw new CoreException(TracCorePlugin.toStatus(e, repository));
- }
- }
-
- @Override
- public boolean initializeTaskData(TaskRepository repository, RepositoryTaskData data, IProgressMonitor monitor)
- throws CoreException {
- try {
- ITracClient client = connector.getClientManager().getTracClient(repository);
- client.updateAttributes(monitor, false);
- createDefaultAttributes(attributeFactory, data, client, false);
- return true;
- } catch (OperationCanceledException e) {
- throw e;
- } catch (Exception e) {
- // TODO catch TracException
- throw new CoreException(TracCorePlugin.toStatus(e, repository));
- }
- }
-
- @Override
- public boolean initializeSubTaskData(TaskRepository repository, RepositoryTaskData taskData,
- RepositoryTaskData parentTaskData, IProgressMonitor monitor) throws CoreException {
- initializeTaskData(repository, taskData, monitor);
- RepositoryTaskAttribute attribute = taskData.getAttribute(ATTRIBUTE_BLOCKING);
- if (attribute == null) {
- throw new CoreException(new RepositoryStatus(repository, IStatus.ERROR, TracCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_REPOSITORY, "The repository does not support subtasks"));
- }
- cloneTaskData(parentTaskData, taskData);
- taskData.setDescription("");
- taskData.setSummary("");
- attribute.setValue(parentTaskData.getTaskId());
- return true;
- }
-
- @Override
- public Set<String> getSubTaskIds(RepositoryTaskData taskData) {
- RepositoryTaskAttribute attribute = taskData.getAttribute(ATTRIBUTE_BLOCKED_BY);
- if (attribute != null) {
- Set<String> result = new HashSet<String>();
- StringTokenizer t = new StringTokenizer(attribute.getValue(), ", ");
- while (t.hasMoreTokens()) {
- result.add(t.nextToken());
- }
- return result;
- }
- return Collections.emptySet();
- }
-
- @Override
- public boolean canInitializeSubTaskData(ITask task, RepositoryTaskData parentTaskData) {
- if (parentTaskData != null) {
- return parentTaskData.getAttribute(ATTRIBUTE_BLOCKED_BY) != null;
- } else if (task instanceof TracTask) {
- return ((TracTask) task).getSupportsSubtasks();
- }
- return false;
- }
-
- /**
- * Updates attributes of <code>taskData</code> from <code>ticket</code>.
- */
- public void updateTaskDataFromTicket(RepositoryTaskData taskData, TracTicket ticket, ITracClient client) {
- DefaultTaskSchema schema = new DefaultTaskSchema(taskData);
- if (ticket.getValue(Key.SUMMARY) != null) {
- schema.setSummary(ticket.getValue(Key.SUMMARY));
- }
-
- if (TracTask.isCompleted(ticket.getValue(Key.STATUS))) {
- schema.setCompletionDate(ticket.getLastChanged());
- } else {
- schema.setCompletionDate(null);
- }
-
- String priority = ticket.getValue(Key.PRIORITY);
- TracPriority[] tracPriorities = client.getPriorities();
- schema.setPriority(TracTask.getTaskPriority(priority, tracPriorities));
-
- if (ticket.getValue(Key.TYPE) != null) {
- Kind kind = TracTask.Kind.fromType(ticket.getValue(Key.TYPE));
- schema.setTaskKind((kind != null) ? kind.toString() : ticket.getValue(Key.TYPE));
- }
-
- if (ticket.getCreated() != null) {
- schema.setCreationDate(ticket.getCreated());
- }
-
- if (ticket.getCustomValue(TracTaskDataHandler.ATTRIBUTE_BLOCKING) != null) {
- taskData.addAttribute(ATTRIBUTE_BLOCKED_BY, new RepositoryTaskAttribute(ATTRIBUTE_BLOCKED_BY, "Blocked by",
- true));
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracWebClient.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracWebClient.java
deleted file mode 100644
index f565ba71f..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracWebClient.java
+++ /dev/null
@@ -1,793 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.core;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.StreamTokenizer;
-import java.io.StringReader;
-import java.net.HttpURLConnection;
-import java.text.ParseException;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.StringTokenizer;
-
-import javax.swing.text.html.HTML.Tag;
-
-import org.apache.commons.httpclient.HostConfiguration;
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.HttpStatus;
-import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;
-import org.apache.commons.httpclient.auth.AuthScope;
-import org.apache.commons.httpclient.cookie.CookiePolicy;
-import org.apache.commons.httpclient.methods.GetMethod;
-import org.apache.commons.lang.StringEscapeUtils;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.commons.net.AbstractWebLocation;
-import org.eclipse.mylyn.commons.net.AuthenticationCredentials;
-import org.eclipse.mylyn.commons.net.AuthenticationType;
-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.UnsupportedRequestException;
-import org.eclipse.mylyn.commons.net.WebUtil;
-import org.eclipse.mylyn.commons.net.HtmlStreamTokenizer.Token;
-import org.eclipse.mylyn.internal.trac.core.model.TracComponent;
-import org.eclipse.mylyn.internal.trac.core.model.TracMilestone;
-import org.eclipse.mylyn.internal.trac.core.model.TracPriority;
-import org.eclipse.mylyn.internal.trac.core.model.TracSearch;
-import org.eclipse.mylyn.internal.trac.core.model.TracSearchFilter;
-import org.eclipse.mylyn.internal.trac.core.model.TracSeverity;
-import org.eclipse.mylyn.internal.trac.core.model.TracTicket;
-import org.eclipse.mylyn.internal.trac.core.model.TracTicketResolution;
-import org.eclipse.mylyn.internal.trac.core.model.TracTicketStatus;
-import org.eclipse.mylyn.internal.trac.core.model.TracTicketType;
-import org.eclipse.mylyn.internal.trac.core.model.TracVersion;
-import org.eclipse.mylyn.internal.trac.core.model.TracSearchFilter.CompareOperator;
-import org.eclipse.mylyn.internal.trac.core.model.TracTicket.Key;
-import org.eclipse.mylyn.internal.trac.core.util.TracUtils;
-import org.eclipse.mylyn.internal.trac.core.util.TracHttpClientTransportFactory.TracHttpException;
-
-/**
- * Represents a Trac repository that is accessed through the Trac's query script and web interface.
- *
- * @author Steffen Pingel
- */
-public class TracWebClient extends AbstractTracClient {
-
- private class Request {
-
- private final String url;
-
- private HostConfiguration hostConfiguration;
-
- public Request(String url) {
- this.url = url;
- }
-
- public GetMethod execute(IProgressMonitor monitor) throws TracLoginException, IOException, TracHttpException {
- hostConfiguration = WebUtil.createHostConfiguration(httpClient, location, monitor);
-
- for (int attempt = 0; attempt < 2; attempt++) {
- // force authentication
- if (!authenticated) {
- AuthenticationCredentials credentials = location.getCredentials(AuthenticationType.REPOSITORY);
- if (credentialsValid(credentials)) {
- authenticate(monitor);
- }
- }
-
- GetMethod method = new GetMethod(WebUtil.getRequestPath(url));
- int code;
- try {
- code = WebUtil.execute(httpClient, hostConfiguration, method, monitor);
- } catch (IOException e) {
- method.releaseConnection();
- throw e;
- }
-
- if (code == HttpURLConnection.HTTP_OK) {
- return method;
- } else if (code == HttpURLConnection.HTTP_UNAUTHORIZED || code == HttpURLConnection.HTTP_FORBIDDEN) {
- // login or re-authenticate due to an expired session
- method.releaseConnection();
- authenticated = false;
- authenticate(monitor);
- } else {
- throw new TracHttpException(code);
- }
- }
-
- throw new TracLoginException();
- }
-
- private void authenticate(IProgressMonitor monitor) throws TracLoginException, IOException {
- while (true) {
- AuthenticationCredentials credentials = location.getCredentials(AuthenticationType.REPOSITORY);
- if (!credentialsValid(credentials)) {
- throw new TracLoginException();
- }
-
- // try standard basic/digest authentication first
- AuthScope authScope = new AuthScope(AuthScope.ANY_HOST, AuthScope.ANY_PORT, AuthScope.ANY_REALM);
- httpClient.getState().setCredentials(authScope,
- WebUtil.getHttpClientCredentials(credentials, WebUtil.getHost(repositoryUrl)));
-
- GetMethod method = new GetMethod(WebUtil.getRequestPath(repositoryUrl + LOGIN_URL));
- method.setFollowRedirects(false);
- int code;
- try {
- httpClient.getParams().setAuthenticationPreemptive(true);
- code = WebUtil.execute(httpClient, hostConfiguration, method, monitor);
- if (needsReauthentication(code, monitor)) {
- continue;
- }
- } finally {
- method.releaseConnection();
- httpClient.getParams().setAuthenticationPreemptive(false);
- }
-
- // the expected return code is a redirect, anything else is suspicious
- if (code == HttpURLConnection.HTTP_OK) {
- // try form-based authentication via AccountManagerPlugin as a
- // fall-back
- authenticateAccountManager(httpClient, hostConfiguration, credentials, monitor);
- }
-
- validateAuthenticationState(httpClient);
-
- // success since no exception was thrown
- authenticated = true;
- break;
- }
- }
-
- private boolean needsReauthentication(int code, IProgressMonitor monitor) throws IOException,
- TracLoginException {
- final AuthenticationType authenticationType;
- if (code == HttpStatus.SC_UNAUTHORIZED || code == HttpStatus.SC_FORBIDDEN) {
- authenticationType = AuthenticationType.REPOSITORY;
- } else if (code == HttpStatus.SC_PROXY_AUTHENTICATION_REQUIRED) {
- authenticationType = AuthenticationType.PROXY;
- } else {
- return false;
- }
-
- try {
- location.requestCredentials(authenticationType, null, monitor);
- } catch (UnsupportedRequestException e) {
- throw new TracLoginException();
- }
-
- hostConfiguration = WebUtil.createHostConfiguration(httpClient, location, monitor);
- return true;
- }
-
- }
-
- private final HttpClient httpClient;
-
- private boolean authenticated;
-
- public TracWebClient(AbstractWebLocation location, Version version) {
- super(location, version);
-
- httpClient = new HttpClient();
- httpClient.setHttpConnectionManager(new MultiThreadedHttpConnectionManager());
- httpClient.getParams().setCookiePolicy(CookiePolicy.RFC_2109);
-
- WebUtil.configureHttpClient(httpClient, USER_AGENT);
- }
-
- private synchronized GetMethod connect(String requestUrl, IProgressMonitor monitor) throws TracException {
- monitor = Policy.monitorFor(monitor);
- try {
- Request request = new Request(requestUrl);
- return request.execute(monitor);
- } catch (TracException e) {
- throw e;
- } catch (Exception e) {
- throw new TracException(e);
- }
- }
-
- /**
- * Fetches the web site of a single ticket and returns the Trac ticket.
- *
- * @param id
- * Trac id of ticket
- */
- public TracTicket getTicket(int id, IProgressMonitor monitor) throws TracException {
- GetMethod method = connect(repositoryUrl + ITracClient.TICKET_URL + id, monitor);
- try {
- TracTicket ticket = new TracTicket(id);
-
- InputStream in = WebUtil.getResponseBodyAsStream(method, monitor);
- try {
- BufferedReader reader = new BufferedReader(new InputStreamReader(in, ITracClient.CHARSET));
- HtmlStreamTokenizer tokenizer = new HtmlStreamTokenizer(reader, null);
- for (Token token = tokenizer.nextToken(); token.getType() != Token.EOF; token = tokenizer.nextToken()) {
- if (token.getType() == Token.TAG) {
- HtmlTag tag = (HtmlTag) token.getValue();
- if (tag.getTagType() == Tag.TD) {
- String headers = tag.getAttribute("headers");
- if ("h_component".equals(headers)) {
- ticket.putBuiltinValue(Key.COMPONENT, getText(tokenizer));
- } else if ("h_milestone".equals(headers)) {
- ticket.putBuiltinValue(Key.MILESTONE, getText(tokenizer));
- } else if ("h_priority".equals(headers)) {
- ticket.putBuiltinValue(Key.PRIORITY, getText(tokenizer));
- } else if ("h_severity".equals(headers)) {
- ticket.putBuiltinValue(Key.SEVERITY, getText(tokenizer));
- } else if ("h_version".equals(headers)) {
- ticket.putBuiltinValue(Key.VERSION, getText(tokenizer));
- } else if ("h_keywords".equals(headers)) {
- ticket.putBuiltinValue(Key.KEYWORDS, getText(tokenizer));
- } else if ("h_cc".equals(headers)) {
- ticket.putBuiltinValue(Key.CC, getText(tokenizer));
- } else if ("h_owner".equals(headers)) {
- ticket.putBuiltinValue(Key.OWNER, getText(tokenizer));
- } else if ("h_reporter".equals(headers)) {
- ticket.putBuiltinValue(Key.REPORTER, getText(tokenizer));
- }
- // TODO handle custom fields
- } else if (tag.getTagType() == Tag.H2 && "summary".equals(tag.getAttribute("class"))) {
- ticket.putBuiltinValue(Key.SUMMARY, getText(tokenizer));
- } else if (tag.getTagType() == Tag.H3 && "status".equals(tag.getAttribute("class"))) {
- String text = getStrongText(tokenizer);
- if (text.length() > 0) {
- // Trac 0.9 format: status / status (resolution)
- int i = text.indexOf(" (");
- if (i != -1) {
- ticket.putBuiltinValue(Key.STATUS, text.substring(0, i));
- ticket.putBuiltinValue(Key.RESOLUTION, text.substring(i + 2, text.length() - 1));
- } else {
- ticket.putBuiltinValue(Key.STATUS, text);
- }
- }
- } else if (tag.getTagType() == Tag.SPAN) {
- String clazz = tag.getAttribute("class");
- if ("status".equals(clazz)) {
- // Trac 0.10 format: (status type) / (status type: resolution)
- String text = getText(tokenizer);
- if (text.startsWith("(") && text.endsWith(")")) {
- StringTokenizer t = new StringTokenizer(text.substring(1, text.length() - 1), " :");
- if (t.hasMoreTokens()) {
- ticket.putBuiltinValue(Key.STATUS, t.nextToken());
- }
- if (t.hasMoreTokens()) {
- ticket.putBuiltinValue(Key.TYPE, t.nextToken());
- }
- if (t.hasMoreTokens()) {
- ticket.putBuiltinValue(Key.RESOLUTION, t.nextToken());
- }
- }
- }
- }
- // TODO parse description
- }
- }
- } finally {
- in.close();
- }
-
- if (ticket.isValid() && ticket.getValue(Key.SUMMARY) != null) {
- return ticket;
- }
-
- throw new InvalidTicketException();
- } catch (IOException e) {
- throw new TracException(e);
- } catch (ParseException e) {
- throw new TracException(e);
- } finally {
- method.releaseConnection();
- }
- }
-
- public void search(TracSearch query, List<TracTicket> tickets, IProgressMonitor monitor) throws TracException {
- GetMethod method = connect(repositoryUrl + ITracClient.QUERY_URL + query.toUrl(), monitor);
- try {
- InputStream in = WebUtil.getResponseBodyAsStream(method, monitor);
- try {
- BufferedReader reader = new BufferedReader(new InputStreamReader(in, ITracClient.CHARSET));
- String line;
-
- Map<String, String> constantValues = getExactMatchValues(query);
-
- // first line contains names of returned ticket fields
- line = reader.readLine();
- if (line == null) {
- throw new InvalidTicketException();
- }
- StringTokenizer t = new StringTokenizer(line, "\t");
- Key[] fields = new Key[t.countTokens()];
- for (int i = 0; i < fields.length; i++) {
- fields[i] = Key.fromKey(t.nextToken());
- }
-
- // create a ticket for each following line of output
- while ((line = reader.readLine()) != null) {
- t = new StringTokenizer(line, "\t");
- TracTicket ticket = new TracTicket();
- for (int i = 0; i < fields.length && t.hasMoreTokens(); i++) {
- if (fields[i] != null) {
- try {
- if (fields[i] == Key.ID) {
- ticket.setId(Integer.parseInt(t.nextToken()));
- } else if (fields[i] == Key.TIME) {
- ticket.setCreated(TracUtils.parseDate(Integer.parseInt(t.nextToken())));
- } else if (fields[i] == Key.CHANGE_TIME) {
- ticket.setLastChanged(TracUtils.parseDate(Integer.parseInt(t.nextToken())));
- } else {
- ticket.putBuiltinValue(fields[i], parseTicketValue(t.nextToken()));
- }
- } catch (NumberFormatException e) {
- StatusHandler.log(new Status(IStatus.WARNING, TracCorePlugin.PLUGIN_ID,
- "Error parsing response: '" + line + "'", e));
- }
- }
- }
-
- if (ticket.isValid()) {
- for (String key : constantValues.keySet()) {
- ticket.putValue(key, parseTicketValue(constantValues.get(key)));
- }
-
- tickets.add(ticket);
- }
- }
- } finally {
- in.close();
- }
- } catch (IOException e) {
- throw new TracException(e);
- } finally {
- method.releaseConnection();
- }
- }
-
- /**
- * Trac has sepcial encoding rules for the returned output: None is represented by "--".
- */
- private String parseTicketValue(String value) {
- if ("--".equals(value)) {
- return "";
- }
- return value;
- }
-
- /**
- * Extracts constant values from <code>query</code>. The Trac query script does not return fields that matched
- * exactly againt a single value.
- */
- private Map<String, String> getExactMatchValues(TracSearch query) {
- Map<String, String> values = new HashMap<String, String>();
- List<TracSearchFilter> filters = query.getFilters();
- for (TracSearchFilter filter : filters) {
- if (filter.getOperator() == CompareOperator.IS && filter.getValues().size() == 1) {
- values.put(filter.getFieldName(), filter.getValues().get(0));
- }
- }
- return values;
- }
-
- public void validate(IProgressMonitor monitor) throws TracException {
- GetMethod method = connect(repositoryUrl + "/", monitor);
- try {
- InputStream in = WebUtil.getResponseBodyAsStream(method, monitor);
- try {
- BufferedReader reader = new BufferedReader(new InputStreamReader(in, ITracClient.CHARSET));
-
- boolean inFooter = false;
- boolean valid = false;
- String version = null;
-
- HtmlStreamTokenizer tokenizer = new HtmlStreamTokenizer(reader, null);
- for (Token token = tokenizer.nextToken(); token.getType() != Token.EOF; token = tokenizer.nextToken()) {
- if (token.getType() == Token.TAG) {
- HtmlTag tag = (HtmlTag) token.getValue();
- if (tag.getTagType() == Tag.DIV) {
- String id = tag.getAttribute("id");
- inFooter = !tag.isEndTag() && "footer".equals(id);
- } else if (tag.getTagType() == Tag.STRONG && inFooter) {
- version = getText(tokenizer);
- } else if (tag.getTagType() == Tag.A) {
- String id = tag.getAttribute("id");
- if ("tracpowered".equals(id)) {
- valid = true;
- }
- }
- }
- }
-
- if (version != null && !(version.startsWith("Trac 0.9") || version.startsWith("Trac 0.10"))) {
- throw new TracException("The Trac version " + version
- + " is unsupported. Please use version 0.9.x or 0.10.x.");
- }
-
- if (!valid) {
- throw new TracException("Not a valid Trac repository");
- }
- } finally {
- in.close();
- }
- } catch (IOException e) {
- throw new TracException(e);
- } catch (ParseException e) {
- throw new TracException(e);
- } finally {
- method.releaseConnection();
- }
- }
-
- @Override
- public void updateAttributes(IProgressMonitor monitor) throws TracException {
- monitor.beginTask("Updating attributes", IProgressMonitor.UNKNOWN);
-
- GetMethod method = connect(repositoryUrl + ITracClient.CUSTOM_QUERY_URL, monitor);
- try {
- InputStream in = WebUtil.getResponseBodyAsStream(method, monitor);
- try {
- BufferedReader reader = new BufferedReader(new InputStreamReader(in, ITracClient.CHARSET));
- HtmlStreamTokenizer tokenizer = new HtmlStreamTokenizer(reader, null);
- for (Token token = tokenizer.nextToken(); token.getType() != Token.EOF; token = tokenizer.nextToken()) {
- if (monitor.isCanceled()) {
- throw new OperationCanceledException();
- }
-
- if (token.getType() == Token.TAG) {
- HtmlTag tag = (HtmlTag) token.getValue();
- if (tag.getTagType() == Tag.SCRIPT) {
- String text = getText(tokenizer).trim();
- if (text.startsWith("var properties=")) {
- parseAttributes(text);
- }
- }
- }
- }
-
- addResolutionAndStatus();
- } finally {
- in.close();
- }
- } catch (IOException e) {
- throw new TracException(e);
- } catch (ParseException e) {
- throw new TracException(e);
- } finally {
- method.releaseConnection();
- }
- }
-
- enum AttributeState {
- INIT, IN_LIST, IN_ATTRIBUTE_KEY, IN_ATTRIBUTE_VALUE, IN_ATTRIBUTE_VALUE_LIST
- };
-
- /**
- * Parses the JavaScript code from the query page to extract repository configuration.
- */
- private void parseAttributes(String text) throws IOException {
- StreamTokenizer t = new StreamTokenizer(new StringReader(text));
- t.quoteChar('"');
-
- AttributeFactory attributeFactory = null;
- String attributeType = null;
-
- AttributeState state = AttributeState.INIT;
- int tokenType;
- while ((tokenType = t.nextToken()) != StreamTokenizer.TT_EOF) {
- switch (tokenType) {
- case StreamTokenizer.TT_WORD:
- if (state == AttributeState.IN_LIST) {
- if ("component".equals(t.sval)) {
- data.components = new ArrayList<TracComponent>();
- attributeFactory = new AttributeFactory() {
- public void addAttribute(String value) {
- data.components.add(new TracComponent(value));
- }
- };
- } else if ("milestone".equals(t.sval)) {
- data.milestones = new ArrayList<TracMilestone>();
- attributeFactory = new AttributeFactory() {
- public void addAttribute(String value) {
- data.milestones.add(new TracMilestone(value));
- }
- };
- } else if ("priority".equals(t.sval)) {
- data.priorities = new ArrayList<TracPriority>();
- attributeFactory = new AttributeFactory() {
- public void addAttribute(String value) {
- data.priorities.add(new TracPriority(value, data.priorities.size() + 1));
- }
- };
- } else if ("resolution".equals(t.sval)) {
- data.ticketResolutions = new ArrayList<TracTicketResolution>();
- attributeFactory = new AttributeFactory() {
- public void addAttribute(String value) {
- data.ticketResolutions.add(new TracTicketResolution(value,
- data.ticketResolutions.size() + 1));
- }
- };
- } else if ("severity".equals(t.sval)) {
- data.severities = new ArrayList<TracSeverity>();
- attributeFactory = new AttributeFactory() {
- public void addAttribute(String value) {
- data.severities.add(new TracSeverity(value, data.severities.size() + 1));
- }
- };
- } else if ("status".equals(t.sval)) {
- data.ticketStatus = new ArrayList<TracTicketStatus>();
- attributeFactory = new AttributeFactory() {
- public void addAttribute(String value) {
- data.ticketStatus.add(new TracTicketStatus(value, data.ticketStatus.size() + 1));
- }
- };
- } else if ("type".equals(t.sval)) {
- data.ticketTypes = new ArrayList<TracTicketType>();
- attributeFactory = new AttributeFactory() {
- public void addAttribute(String value) {
- data.ticketTypes.add(new TracTicketType(value, data.ticketTypes.size() + 1));
- }
- };
- } else if ("version".equals(t.sval)) {
- data.versions = new ArrayList<TracVersion>();
- attributeFactory = new AttributeFactory() {
- public void addAttribute(String value) {
- data.versions.add(new TracVersion(value));
- }
- };
- } else {
- attributeFactory = null;
- }
- } else if (state == AttributeState.IN_ATTRIBUTE_KEY) {
- attributeType = t.sval;
- }
- break;
- case '"':
- if (state == AttributeState.IN_ATTRIBUTE_VALUE_LIST && "options".equals(attributeType)) {
- if (attributeFactory != null) {
- attributeFactory.addAttribute(t.sval);
- }
- }
- break;
- case ':':
- if (state == AttributeState.IN_ATTRIBUTE_KEY) {
- state = AttributeState.IN_ATTRIBUTE_VALUE;
- }
- break;
- case ',':
- if (state == AttributeState.IN_ATTRIBUTE_VALUE) {
- state = AttributeState.IN_ATTRIBUTE_KEY;
- }
- break;
- case '[':
- if (state == AttributeState.IN_ATTRIBUTE_VALUE) {
- state = AttributeState.IN_ATTRIBUTE_VALUE_LIST;
- }
- break;
- case ']':
- if (state == AttributeState.IN_ATTRIBUTE_VALUE_LIST) {
- state = AttributeState.IN_ATTRIBUTE_VALUE;
- }
- break;
- case '{':
- if (state == AttributeState.INIT) {
- state = AttributeState.IN_LIST;
- } else if (state == AttributeState.IN_LIST) {
- state = AttributeState.IN_ATTRIBUTE_KEY;
- } else {
- throw new IOException("Error parsing attributes: unexpected token '{'");
- }
- break;
- case '}':
- if (state == AttributeState.IN_ATTRIBUTE_KEY || state == AttributeState.IN_ATTRIBUTE_VALUE) {
- state = AttributeState.IN_LIST;
- } else if (state == AttributeState.IN_LIST) {
- state = AttributeState.INIT;
- } else {
- throw new IOException("Error parsing attributes: unexpected token '}'");
- }
- break;
- }
- }
- }
-
- public void updateAttributesNewTicketPage(IProgressMonitor monitor) throws TracException {
- monitor.beginTask("Updating attributes", IProgressMonitor.UNKNOWN);
-
- GetMethod method = connect(repositoryUrl + ITracClient.NEW_TICKET_URL, monitor);
- try {
- InputStream in = WebUtil.getResponseBodyAsStream(method, monitor);
- try {
- BufferedReader reader = new BufferedReader(new InputStreamReader(in, ITracClient.CHARSET));
- HtmlStreamTokenizer tokenizer = new HtmlStreamTokenizer(reader, null);
- for (Token token = tokenizer.nextToken(); token.getType() != Token.EOF; token = tokenizer.nextToken()) {
- if (monitor.isCanceled()) {
- throw new OperationCanceledException();
- }
-
- if (token.getType() == Token.TAG) {
- HtmlTag tag = (HtmlTag) token.getValue();
- if (tag.getTagType() == Tag.SELECT) {
- String name = tag.getAttribute("id");
- if ("component".equals(name)) {
- List<String> values = getOptionValues(tokenizer);
- data.components = new ArrayList<TracComponent>(values.size());
- for (String value : values) {
- data.components.add(new TracComponent(value));
- }
- } else if ("milestone".equals(name)) {
- List<String> values = getOptionValues(tokenizer);
- data.milestones = new ArrayList<TracMilestone>(values.size());
- for (String value : values) {
- data.milestones.add(new TracMilestone(value));
- }
- } else if ("priority".equals(name)) {
- List<String> values = getOptionValues(tokenizer);
- data.priorities = new ArrayList<TracPriority>(values.size());
- for (int i = 0; i < values.size(); i++) {
- data.priorities.add(new TracPriority(values.get(i), i + 1));
- }
- } else if ("severity".equals(name)) {
- List<String> values = getOptionValues(tokenizer);
- data.severities = new ArrayList<TracSeverity>(values.size());
- for (int i = 0; i < values.size(); i++) {
- data.severities.add(new TracSeverity(values.get(i), i + 1));
- }
- } else if ("type".equals(name)) {
- List<String> values = getOptionValues(tokenizer);
- data.ticketTypes = new ArrayList<TracTicketType>(values.size());
- for (int i = 0; i < values.size(); i++) {
- data.ticketTypes.add(new TracTicketType(values.get(i), i + 1));
- }
- } else if ("version".equals(name)) {
- List<String> values = getOptionValues(tokenizer);
- data.versions = new ArrayList<TracVersion>(values.size());
- for (String value : values) {
- data.versions.add(new TracVersion(value));
- }
- }
- }
- }
- }
-
- addResolutionAndStatus();
- } finally {
- in.close();
- }
- } catch (IOException e) {
- throw new TracException(e);
- } catch (ParseException e) {
- throw new TracException(e);
- } finally {
- method.releaseConnection();
- }
- }
-
- private void addResolutionAndStatus() {
- data.ticketResolutions = new ArrayList<TracTicketResolution>(5);
- data.ticketResolutions.add(new TracTicketResolution("fixed", 1));
- data.ticketResolutions.add(new TracTicketResolution("invalid", 2));
- data.ticketResolutions.add(new TracTicketResolution("wontfix", 3));
- data.ticketResolutions.add(new TracTicketResolution("duplicate", 4));
- data.ticketResolutions.add(new TracTicketResolution("worksforme", 5));
-
- data.ticketStatus = new ArrayList<TracTicketStatus>(4);
- data.ticketStatus.add(new TracTicketStatus("new", 1));
- data.ticketStatus.add(new TracTicketStatus("assigned", 2));
- data.ticketStatus.add(new TracTicketStatus("reopened", 3));
- data.ticketStatus.add(new TracTicketStatus("closed", 4));
- }
-
- private List<String> getOptionValues(HtmlStreamTokenizer tokenizer) throws IOException, ParseException {
- List<String> values = new ArrayList<String>();
- for (Token token = tokenizer.nextToken(); token.getType() != Token.EOF; token = tokenizer.nextToken()) {
- if (token.getType() == Token.TAG) {
- HtmlTag tag = (HtmlTag) token.getValue();
- if (tag.getTagType() == Tag.OPTION && !tag.isEndTag()) {
- String value = getText(tokenizer).trim();
- if (value.length() > 0) {
- values.add(value);
- }
- } else {
- return values;
- }
- }
- }
- return values;
- }
-
- private String getText(HtmlStreamTokenizer tokenizer) throws IOException, ParseException {
- StringBuilder sb = new StringBuilder();
- for (Token token = tokenizer.nextToken(); token.getType() != Token.EOF; token = tokenizer.nextToken()) {
- if (token.getType() == Token.TEXT) {
- sb.append(token.toString());
- } else if (token.getType() == Token.COMMENT) {
- // ignore
- } else {
- break;
- }
- }
- return StringEscapeUtils.unescapeHtml(sb.toString());
- }
-
- /**
- * Looks for a <code>strong</code> tag and returns the text enclosed by the tag.
- */
- private String getStrongText(HtmlStreamTokenizer tokenizer) throws IOException, ParseException {
- for (Token token = tokenizer.nextToken(); token.getType() != Token.EOF; token = tokenizer.nextToken()) {
- if (token.getType() == Token.TAG && ((HtmlTag) token.getValue()).getTagType() == Tag.STRONG) {
- return getText(tokenizer);
- } else if (token.getType() == Token.COMMENT) {
- // ignore
- } else if (token.getType() == Token.TEXT) {
- // ignore
- } else {
- break;
- }
- }
- return "";
- }
-
- public InputStream getAttachmentData(int id, String filename, IProgressMonitor monitor) throws TracException {
- GetMethod method = connect(repositoryUrl + ITracClient.ATTACHMENT_URL + id + "/" + filename + "?format=raw",
- monitor);
- try {
- // the receiver is responsible for closing the stream which will
- // release the connection
- return method.getResponseBodyAsStream();
- } catch (IOException e) {
- method.releaseConnection();
- throw new TracException(e);
- }
- }
-
- public void putAttachmentData(int id, String name, String description, InputStream in, IProgressMonitor monitor)
- throws TracException {
- throw new TracException("Unsupported operation");
- }
-
- public void deleteAttachment(int ticketId, String filename, IProgressMonitor monitor) throws TracException {
- throw new TracException("Unsupported operation");
- }
-
- public int createTicket(TracTicket ticket, IProgressMonitor monitor) throws TracException {
- throw new TracException("Unsupported operation");
- }
-
- public void updateTicket(TracTicket ticket, String comment, IProgressMonitor monitor) throws TracException {
- throw new TracException("Unsupported operation");
- }
-
- public Set<Integer> getChangedTickets(Date since, IProgressMonitor monitor) throws TracException {
- return null;
- }
-
- private interface AttributeFactory {
-
- void addAttribute(String value);
-
- }
-
- public Date getTicketLastChanged(Integer id, IProgressMonitor monitor) {
- throw new UnsupportedOperationException();
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracWikiHandler.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracWikiHandler.java
deleted file mode 100644
index 3ff0468b9..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracWikiHandler.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.core;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.mylyn.internal.trac.core.model.TracWikiPage;
-import org.eclipse.mylyn.internal.trac.core.model.TracWikiPageInfo;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-/**
- * @author Xiaoyang Guan
- */
-public class TracWikiHandler extends AbstractWikiHandler {
-
- private final TracRepositoryConnector connector;
-
- public TracWikiHandler(TracRepositoryConnector connector) {
- this.connector = connector;
- }
-
- @Override
- public String[] downloadAllPageNames(TaskRepository repository, IProgressMonitor monitor) throws CoreException {
- monitor.beginTask("Download Wiki Page Names", IProgressMonitor.UNKNOWN);
- try {
- String[] names = getTracWikiClient(repository).getAllWikiPageNames(monitor);
- return names;
- } catch (TracException e) {
- throw new CoreException(TracCorePlugin.toStatus(e, repository));
- } finally {
- monitor.done();
- }
- }
-
- @Override
- public TracWikiPage getWikiPage(TaskRepository repository, String pageName, IProgressMonitor monitor)
- throws CoreException {
- monitor.beginTask("Download Wiki Page", IProgressMonitor.UNKNOWN);
- try {
- TracWikiPage page = getTracWikiClient(repository).getWikiPage(pageName, monitor);
- return page;
- } catch (TracException e) {
- throw new CoreException(TracCorePlugin.toStatus(e, repository));
- } finally {
- monitor.done();
- }
- }
-
- @Override
- public void postWikiPage(TaskRepository repository, TracWikiPage newPage, IProgressMonitor monitor)
- throws CoreException {
- monitor.beginTask("Upload Wiki Page", IProgressMonitor.UNKNOWN);
- try {
- String pageName = newPage.getPageInfo().getPageName();
- String content = newPage.getContent();
- Map<String, Object> attributes = new HashMap<String, Object>();
- attributes.put("comment", newPage.getPageInfo().getComment());
- attributes.put("author", newPage.getPageInfo().getAuthor());
- boolean success = getTracWikiClient(repository).putWikipage(pageName, content, attributes, monitor);
- if (success) {
- return;
- } else {
- throw new CoreException(TracCorePlugin.toStatus(new TracException(
- "Failed to upload wiki page. No further information available."), repository));
- }
- } catch (TracException e) {
- throw new CoreException(TracCorePlugin.toStatus(e, repository));
- } finally {
- monitor.done();
- }
- }
-
- @Override
- public TracWikiPageInfo[] getPageHistory(TaskRepository repository, String pageName, IProgressMonitor monitor)
- throws CoreException {
- monitor.beginTask("Retrieve Wiki Page History", IProgressMonitor.UNKNOWN);
- try {
- TracWikiPageInfo[] versions = getTracWikiClient(repository).getWikiPageInfoAllVersions(pageName, monitor);
- return versions;
- } catch (TracException e) {
- throw new CoreException(TracCorePlugin.toStatus(e, repository));
- } finally {
- monitor.done();
- }
- }
-
- private ITracWikiClient getTracWikiClient(TaskRepository repository) throws TracException {
- ITracClient client = connector.getClientManager().getTracClient(repository);
- if (client instanceof ITracWikiClient) {
- return (ITracWikiClient) client;
- } else {
- throw new TracException("The access mode of " + repository.toString()
- + " does not support Wiki page editting.");
- }
- }
-
- @Override
- public String getWikiUrl(TaskRepository repository) {
- return repository.getRepositoryUrl() + ITracClient.WIKI_URL;
- }
-}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracXmlRpcClient.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracXmlRpcClient.java
deleted file mode 100644
index 2537adc47..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracXmlRpcClient.java
+++ /dev/null
@@ -1,940 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.trac.core;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.TimeZone;
-
-import org.apache.commons.httpclient.HostConfiguration;
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.HttpStatus;
-import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;
-import org.apache.commons.httpclient.cookie.CookiePolicy;
-import org.apache.xmlrpc.XmlRpcException;
-import org.apache.xmlrpc.client.XmlRpcClient;
-import org.apache.xmlrpc.client.XmlRpcClientConfigImpl;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.commons.net.AbstractWebLocation;
-import org.eclipse.mylyn.commons.net.AuthenticationCredentials;
-import org.eclipse.mylyn.commons.net.AuthenticationType;
-import org.eclipse.mylyn.commons.net.Policy;
-import org.eclipse.mylyn.commons.net.UnsupportedRequestException;
-import org.eclipse.mylyn.commons.net.WebUtil;
-import org.eclipse.mylyn.internal.trac.core.model.TracAttachment;
-import org.eclipse.mylyn.internal.trac.core.model.TracComment;
-import org.eclipse.mylyn.internal.trac.core.model.TracComponent;
-import org.eclipse.mylyn.internal.trac.core.model.TracMilestone;
-import org.eclipse.mylyn.internal.trac.core.model.TracPriority;
-import org.eclipse.mylyn.internal.trac.core.model.TracSearch;
-import org.eclipse.mylyn.internal.trac.core.model.TracSeverity;
-import org.eclipse.mylyn.internal.trac.core.model.TracTicket;
-import org.eclipse.mylyn.internal.trac.core.model.TracTicketField;
-import org.eclipse.mylyn.internal.trac.core.model.TracTicketResolution;
-import org.eclipse.mylyn.internal.trac.core.model.TracTicketStatus;
-import org.eclipse.mylyn.internal.trac.core.model.TracTicketType;
-import org.eclipse.mylyn.internal.trac.core.model.TracVersion;
-import org.eclipse.mylyn.internal.trac.core.model.TracWikiPage;
-import org.eclipse.mylyn.internal.trac.core.model.TracWikiPageInfo;
-import org.eclipse.mylyn.internal.trac.core.model.TracTicket.Key;
-import org.eclipse.mylyn.internal.trac.core.util.TracHttpClientTransportFactory;
-import org.eclipse.mylyn.internal.trac.core.util.TracUtils;
-import org.eclipse.mylyn.internal.trac.core.util.TracXmlRpcClientRequest;
-import org.eclipse.mylyn.internal.trac.core.util.TracHttpClientTransportFactory.TracHttpException;
-
-/**
- * Represents a Trac repository that is accessed through the Trac XmlRpcPlugin.
- *
- * @author Steffen Pingel
- * @author Xiaoyang Guan
- */
-public class TracXmlRpcClient extends AbstractTracClient implements ITracWikiClient {
-
- private class XmlRpcRequest {
-
- private final String method;
-
- private final Object[] parameters;
-
- public XmlRpcRequest(String method, Object[] parameters) {
- this.method = method;
- this.parameters = parameters;
- }
-
- public Object execute(IProgressMonitor monitor) throws TracException {
- try {
- // first attempt
- return executeCallInternal(monitor);
- } catch (TracPermissionDeniedException e) {
- if (accountMangerAuthenticationFailed) {
- // do not try again if this has failed in the past since it
- // is more likely that XML_RPC permissions have not been set
- throw e;
- }
-
- AuthenticationCredentials credentials = location.getCredentials(AuthenticationType.REPOSITORY);
- if (!credentialsValid(credentials)) {
- throw e;
- }
-
- // try form-based authentication via AccountManagerPlugin as a
- // fall-back
- HostConfiguration hostConfiguration = WebUtil.createHostConfiguration(httpClient, location, monitor);
- try {
- authenticateAccountManager(httpClient, hostConfiguration, credentials, monitor);
- } catch (TracLoginException loginException) {
- // caused by wrong user name or password
- throw loginException;
- } catch (IOException ignore) {
- accountMangerAuthenticationFailed = true;
- throw e;
- }
-
- try {
- validateAuthenticationState(httpClient);
- } catch (TracLoginException ignore) {
- // most likely form based authentication is not supported by
- // repository
- accountMangerAuthenticationFailed = true;
- throw e;
- }
-
- factory.setCookies(httpClient.getState().getCookies());
- }
-
- // second attempt
- return executeCallInternal(monitor);
- }
-
- private Object executeCallInternal(IProgressMonitor monitor) throws TracException {
- try {
- TracXmlRpcClientRequest request = new TracXmlRpcClientRequest(xmlrpc.getClientConfig(), method,
- parameters, monitor);
- return xmlrpc.execute(request);
- } catch (TracHttpException e) {
- if (e.code == HttpStatus.SC_UNAUTHORIZED) {
- throw new TracLoginException();
- } else if (e.code == HttpStatus.SC_FORBIDDEN) {
- throw new TracPermissionDeniedException();
- } else if (e.code == HttpStatus.SC_PROXY_AUTHENTICATION_REQUIRED) {
- throw new TracProxyAuthenticationException();
- } else {
- throw new TracException(e);
- }
- } catch (XmlRpcException e) {
- if (e.code == NO_SUCH_METHOD_ERROR) {
- throw new TracNoSuchMethodException(e);
- } else {
- throw new TracRemoteException(e);
- }
- } catch (Exception e) {
- throw new TracException(e);
- }
- }
-
- }
-
- public static final String XMLRPC_URL = "/xmlrpc";
-
- public static final String REQUIRED_REVISION = "1950";
-
- public static final int REQUIRED_EPOCH = 0;
-
- public static final int REQUIRED_MAJOR = 0;
-
- public static final int REQUIRED_MINOR = 1;
-
- private static final int NO_SUCH_METHOD_ERROR = 1;
-
- private static final int LATEST_VERSION = -1;
-
- public static final int REQUIRED_WIKI_RPC_VERSION = 2;
-
- private XmlRpcClient xmlrpc;
-
- private TracHttpClientTransportFactory factory;
-
- private int majorAPIVersion = -1;
-
- private int minorAPIVersion = -1;
-
- private int epochAPIVersion = -1;
-
- private boolean accountMangerAuthenticationFailed;
-
- private XmlRpcClientConfigImpl config;
-
- private final HttpClient httpClient;
-
- public TracXmlRpcClient(AbstractWebLocation location, Version version) {
- super(location, version);
-
- httpClient = new HttpClient();
- httpClient.setHttpConnectionManager(new MultiThreadedHttpConnectionManager());
- httpClient.getParams().setCookiePolicy(CookiePolicy.RFC_2109);
- WebUtil.configureHttpClient(httpClient, USER_AGENT);
- }
-
- public synchronized XmlRpcClient getClient() throws TracException {
- if (xmlrpc == null) {
- config = new XmlRpcClientConfigImpl();
- config.setEncoding(ITracClient.CHARSET);
- config.setTimeZone(TimeZone.getTimeZone(ITracClient.TIME_ZONE));
- config.setContentLengthOptional(false);
- config.setConnectionTimeout(WebUtil.getConnectionTimeout());
- config.setReplyTimeout(WebUtil.getSocketTimeout());
-
- xmlrpc = new XmlRpcClient();
- xmlrpc.setConfig(config);
-
- factory = new TracHttpClientTransportFactory(xmlrpc, httpClient);
- factory.setLocation(location);
- xmlrpc.setTransportFactory(factory);
- }
-
- // update configuration with latest values
- AuthenticationCredentials credentials = location.getCredentials(AuthenticationType.REPOSITORY);
- if (credentialsValid(credentials)) {
- config.setBasicUserName(credentials.getUserName());
- config.setBasicPassword(credentials.getPassword());
- } else {
- config.setBasicUserName(null);
- config.setBasicPassword(null);
- }
- config.setServerURL(getXmlRpcUrl(credentials));
-
- return xmlrpc;
- }
-
- private URL getXmlRpcUrl(AuthenticationCredentials credentials) throws TracException {
- try {
- String location = repositoryUrl.toString();
- if (credentialsValid(credentials)) {
- location += LOGIN_URL;
- }
- location += XMLRPC_URL;
-
- return new URL(location);
- } catch (Exception e) {
- throw new TracException(e);
- }
- }
-
- private Object call(IProgressMonitor monitor, String method, Object... parameters) throws TracException {
- monitor = Policy.monitorFor(monitor);
- while (true) {
- getClient();
-
- try {
- XmlRpcRequest request = new XmlRpcRequest(method, parameters);
- return request.execute(monitor);
- } catch (TracLoginException e) {
- try {
- location.requestCredentials(AuthenticationType.REPOSITORY, null, monitor);
- } catch (UnsupportedRequestException ignored) {
- throw e;
- }
- } catch (TracPermissionDeniedException e) {
- try {
- location.requestCredentials(AuthenticationType.REPOSITORY, null, monitor);
- } catch (UnsupportedRequestException ignored) {
- throw e;
- }
- } catch (TracProxyAuthenticationException e) {
- try {
- location.requestCredentials(AuthenticationType.PROXY, null, monitor);
- } catch (UnsupportedRequestException ignored) {
- throw e;
- }
- }
- }
- }
-
- private Object[] multicall(IProgressMonitor monitor, Map<String, Object>... calls) throws TracException {
- Object[] result = (Object[]) call(monitor, "system.multicall", new Object[] { calls });
- for (Object item : result) {
- try {
- checkForException(item);
- } catch (XmlRpcException e) {
- throw new TracRemoteException(e);
- } catch (Exception e) {
- throw new TracException(e);
- }
- }
- return result;
- }
-
- private void checkForException(Object result) throws NumberFormatException, XmlRpcException {
- if (result instanceof Map) {
- Map<?, ?> exceptionData = (Map<?, ?>) result;
- if (exceptionData.containsKey("faultCode") && exceptionData.containsKey("faultString")) {
- throw new XmlRpcException(Integer.parseInt(exceptionData.get("faultCode").toString()),
- (String) exceptionData.get("faultString"));
- }
- }
- }
-
- private Map<String, Object> createMultiCall(String methodName, Object... parameters) throws TracException {
- Map<String, Object> table = new HashMap<String, Object>();
- table.put("methodName", methodName);
- table.put("params", parameters);
- return table;
- }
-
- private Object getMultiCallResult(Object item) {
- return ((Object[]) item)[0];
- }
-
- public void validate(IProgressMonitor monitor) throws TracException {
- try {
- Object[] result = (Object[]) call(monitor, "system.getAPIVersion");
- if (result.length >= 3) {
- epochAPIVersion = (Integer) result[0];
- majorAPIVersion = (Integer) result[1];
- minorAPIVersion = (Integer) result[2];
- } else if (result.length >= 2) {
- epochAPIVersion = 0;
- majorAPIVersion = (Integer) result[0];
- minorAPIVersion = (Integer) result[1];
- } else {
- throw new TracException(
- "The API version is unsupported, please update your Trac XML-RPC Plugin to revision "
- + REQUIRED_REVISION + " or later");
- }
- } catch (TracNoSuchMethodException e) {
- throw new TracException(
- "Required API calls are missing, please update your Trac XML-RPC Plugin to revision "
- + REQUIRED_REVISION + " or later");
- }
-
- if (!isAPIVersionOrHigher(REQUIRED_EPOCH, REQUIRED_MAJOR, REQUIRED_MINOR, monitor)) {
- throw new TracException("The API version " + majorAPIVersion + "." + minorAPIVersion
- + " is unsupported, please update your Trac XML-RPC Plugin to revision " + REQUIRED_REVISION
- + " or later");
- }
- }
-
- private void updateAPIVersion(IProgressMonitor monitor) throws TracException {
- if (epochAPIVersion == -1 || majorAPIVersion == -1 || minorAPIVersion == -1) {
- validate(monitor);
- }
- }
-
- private boolean isAPIVersionOrHigher(int epoch, int major, int minor, IProgressMonitor monitor)
- throws TracException {
- updateAPIVersion(monitor);
- return (epochAPIVersion > epoch || (epochAPIVersion == epoch && majorAPIVersion > major || (majorAPIVersion == major && minorAPIVersion >= minor)));
- }
-
- public TracTicket getTicket(int id, IProgressMonitor monitor) throws TracException {
- Object[] result = (Object[]) call(monitor, "ticket.get", id);
- TracTicket ticket = parseTicket(result);
-
- result = (Object[]) call(monitor, "ticket.changeLog", id, 0);
- for (Object item : result) {
- ticket.addComment(parseChangeLogEntry((Object[]) item));
- }
-
- result = (Object[]) call(monitor, "ticket.listAttachments", id);
- for (Object item : result) {
- ticket.addAttachment(parseAttachment((Object[]) item));
- }
-
- String[] actions = getActions(id, monitor);
- ticket.setActions(actions);
-
- updateAttributes(new NullProgressMonitor(), false);
- TracTicketResolution[] resolutions = getTicketResolutions();
- if (resolutions != null) {
- String[] resolutionStrings = new String[resolutions.length];
- for (int i = 0; i < resolutions.length; i++) {
- resolutionStrings[i] = resolutions[i].getName();
- }
- ticket.setResolutions(resolutionStrings);
- } else {
- ticket.setResolutions(getDefaultTicketResolutions());
- }
-
- return ticket;
- }
-
- private TracAttachment parseAttachment(Object[] entry) {
- TracAttachment attachment = new TracAttachment((String) entry[0]);
- attachment.setDescription((String) entry[1]);
- attachment.setSize((Integer) entry[2]);
- attachment.setCreated(parseDate(entry[3]));
- attachment.setAuthor((String) entry[4]);
- return attachment;
- }
-
- private TracComment parseChangeLogEntry(Object[] entry) {
- TracComment comment = new TracComment();
- comment.setCreated(parseDate(entry[0]));
- comment.setAuthor((String) entry[1]);
- comment.setField((String) entry[2]);
- comment.setOldValue((String) entry[3]);
- comment.setNewValue((String) entry[4]);
- return comment;
- }
-
- /* public for testing */
- @SuppressWarnings("unchecked")
- public List<TracTicket> getTickets(int[] ids, IProgressMonitor monitor) throws TracException {
- Map<String, Object>[] calls = new Map[ids.length];
- for (int i = 0; i < calls.length; i++) {
- calls[i] = createMultiCall("ticket.get", ids[i]);
- }
-
- Object[] result = multicall(monitor, calls);
- assert result.length == ids.length;
-
- List<TracTicket> tickets = new ArrayList<TracTicket>(result.length);
- for (Object item : result) {
- Object[] ticketResult = (Object[]) getMultiCallResult(item);
- tickets.add(parseTicket(ticketResult));
- }
-
- return tickets;
- }
-
- @SuppressWarnings("unchecked")
- public void search(TracSearch query, List<TracTicket> tickets, IProgressMonitor monitor) throws TracException {
- // an empty query string is not valid, therefore prepend order
- Object[] result = (Object[]) call(monitor, "ticket.query", "order=id" + query.toQuery());
-
- Map<String, Object>[] calls = new Map[result.length];
- for (int i = 0; i < calls.length; i++) {
- calls[i] = createMultiCall("ticket.get", result[i]);
- }
- result = multicall(monitor, calls);
-
- for (Object item : result) {
- Object[] ticketResult = (Object[]) getMultiCallResult(item);
- tickets.add(parseTicket(ticketResult));
- }
- }
-
- private TracTicket parseTicket(Object[] ticketResult) throws InvalidTicketException {
- TracTicket ticket = new TracTicket((Integer) ticketResult[0]);
- ticket.setCreated(parseDate(ticketResult[1]));
- ticket.setLastChanged(parseDate(ticketResult[2]));
- Map<?, ?> attributes = (Map<?, ?>) ticketResult[3];
- for (Object key : attributes.keySet()) {
- ticket.putValue(key.toString(), attributes.get(key).toString());
- }
- return ticket;
- }
-
- private Date parseDate(Object object) {
- if (object instanceof Date) {
- return (Date) object;
- } else if (object instanceof Integer) {
- return TracUtils.parseDate((Integer) object);
- }
- throw new ClassCastException("Unexpected object type for date: " + object.getClass());
- }
-
- @Override
- public synchronized void updateAttributes(IProgressMonitor monitor) throws TracException {
- monitor.beginTask("Updating attributes", 9);
-
- Object[] result = getAttributes("ticket.component", monitor);
- data.components = new ArrayList<TracComponent>(result.length);
- for (Object item : result) {
- data.components.add(parseComponent((Map<?, ?>) getMultiCallResult(item)));
- }
- advance(monitor, 1);
-
- result = getAttributes("ticket.milestone", monitor);
- data.milestones = new ArrayList<TracMilestone>(result.length);
- for (Object item : result) {
- data.milestones.add(parseMilestone((Map<?, ?>) getMultiCallResult(item)));
- }
- advance(monitor, 1);
-
- List<TicketAttributeResult> attributes = getTicketAttributes("ticket.priority", monitor);
- data.priorities = new ArrayList<TracPriority>(result.length);
- for (TicketAttributeResult attribute : attributes) {
- data.priorities.add(new TracPriority(attribute.name, attribute.value));
- }
- Collections.sort(data.priorities);
- advance(monitor, 1);
-
- attributes = getTicketAttributes("ticket.resolution", monitor);
- data.ticketResolutions = new ArrayList<TracTicketResolution>(result.length);
- for (TicketAttributeResult attribute : attributes) {
- data.ticketResolutions.add(new TracTicketResolution(attribute.name, attribute.value));
- }
- Collections.sort(data.ticketResolutions);
- advance(monitor, 1);
-
- attributes = getTicketAttributes("ticket.severity", monitor);
- data.severities = new ArrayList<TracSeverity>(result.length);
- for (TicketAttributeResult attribute : attributes) {
- data.severities.add(new TracSeverity(attribute.name, attribute.value));
- }
- Collections.sort(data.severities);
- advance(monitor, 1);
-
- boolean trac011 = isAPIVersionOrHigher(1, 0, 0, monitor);
- attributes = getTicketAttributes("ticket.status", trac011, monitor);
- data.ticketStatus = new ArrayList<TracTicketStatus>(result.length);
- for (TicketAttributeResult attribute : attributes) {
- data.ticketStatus.add(new TracTicketStatus(attribute.name, attribute.value));
- }
- Collections.sort(data.ticketStatus);
- advance(monitor, 1);
-
- attributes = getTicketAttributes("ticket.type", monitor);
- data.ticketTypes = new ArrayList<TracTicketType>(result.length);
- for (TicketAttributeResult attribute : attributes) {
- data.ticketTypes.add(new TracTicketType(attribute.name, attribute.value));
- }
- Collections.sort(data.ticketTypes);
- advance(monitor, 1);
-
- result = getAttributes("ticket.version", monitor);
- data.versions = new ArrayList<TracVersion>(result.length);
- for (Object item : result) {
- data.versions.add(parseVersion((Map<?, ?>) getMultiCallResult(item)));
- }
- advance(monitor, 1);
-
- result = (Object[]) call(monitor, "ticket.getTicketFields");
- data.ticketFields = new ArrayList<TracTicketField>(result.length);
- for (Object item : result) {
- data.ticketFields.add(parseTicketField((Map<?, ?>) item));
- }
- advance(monitor, 1);
- }
-
- private void advance(IProgressMonitor monitor, int worked) {
- monitor.worked(worked);
- if (monitor.isCanceled()) {
- throw new OperationCanceledException();
- }
-
- }
-
- private TracComponent parseComponent(Map<?, ?> result) {
- TracComponent component = new TracComponent((String) result.get("name"));
- component.setOwner((String) result.get("owner"));
- component.setDescription((String) result.get("description"));
- return component;
- }
-
- private TracMilestone parseMilestone(Map<?, ?> result) {
- TracMilestone milestone = new TracMilestone((String) result.get("name"));
- milestone.setCompleted(parseDate(result.get("completed")));
- milestone.setDue(parseDate(result.get("due")));
- milestone.setDescription((String) result.get("description"));
- return milestone;
- }
-
- private TracVersion parseVersion(Map<?, ?> result) {
- TracVersion version = new TracVersion((String) result.get("name"));
- version.setTime(parseDate(result.get("time")));
- version.setDescription((String) result.get("description"));
- return version;
- }
-
- private TracTicketField parseTicketField(Map<?, ?> result) {
- TracTicketField field = new TracTicketField((String) result.get("name"));
- field.setType(TracTicketField.Type.fromString((String) result.get("type")));
- field.setLabel((String) result.get("label"));
- field.setDefaultValue((String) result.get("value"));
- Object[] items = (Object[]) result.get("options");
- if (items != null) {
- String[] options = new String[items.length];
- for (int i = 0; i < items.length; i++) {
- options[i] = (String) items[i];
- }
- field.setOptions(options);
- }
- if (result.get("custom") != null) {
- field.setCustom((Boolean) result.get("custom"));
- }
- if (result.get("order") != null) {
- field.setOrder((Integer) result.get("order"));
- }
- if (result.get("optional") != null) {
- field.setOptional((Boolean) result.get("optional"));
- }
- if (result.get("width") != null) {
- field.setWidth((Integer) result.get("width"));
- }
- if (result.get("height") != null) {
- field.setHeight((Integer) result.get("height"));
- }
- return field;
- }
-
- @SuppressWarnings("unchecked")
- private Object[] getAttributes(String attributeType, IProgressMonitor monitor) throws TracException {
- Object[] ids = (Object[]) call(monitor, attributeType + ".getAll");
- Map<String, Object>[] calls = new Map[ids.length];
- for (int i = 0; i < calls.length; i++) {
- calls[i] = createMultiCall(attributeType + ".get", ids[i]);
- }
-
- Object[] result = multicall(monitor, calls);
- assert result.length == ids.length;
-
- return result;
- }
-
- private List<TicketAttributeResult> getTicketAttributes(String attributeType, IProgressMonitor monitor)
- throws TracException {
- return getTicketAttributes(attributeType, false, monitor);
- }
-
- @SuppressWarnings("unchecked")
- private List<TicketAttributeResult> getTicketAttributes(String attributeType, boolean assignValues,
- IProgressMonitor monitor) throws TracException {
- // get list of attribute ids first
- Object[] ids = (Object[]) call(monitor, attributeType + ".getAll");
- // fetch all attributes in a single call
- Map<String, Object>[] calls = new Map[ids.length];
- for (int i = 0; i < calls.length; i++) {
- calls[i] = createMultiCall(attributeType + ".get", ids[i]);
- }
-
- Object[] result = multicall(monitor, calls);
- assert result.length == ids.length;
-
- List<TicketAttributeResult> attributes = new ArrayList<TicketAttributeResult>(result.length);
- for (int i = 0; i < calls.length; i++) {
- try {
- TicketAttributeResult attribute = new TicketAttributeResult();
- attribute.name = (String) ids[i];
- Object value = getMultiCallResult(result[i]);
- if (assignValues) {
- attribute.value = i;
- } else {
- attribute.value = (value instanceof Integer) ? (Integer) value : Integer.parseInt((String) value);
- }
- attributes.add(attribute);
- } catch (ClassCastException e) {
- StatusHandler.log(new Status(IStatus.WARNING, TracCorePlugin.PLUGIN_ID,
- "Invalid response from Trac repository for attribute type: '" + attributeType + "'", e));
- } catch (NumberFormatException e) {
- StatusHandler.log(new Status(IStatus.WARNING, TracCorePlugin.PLUGIN_ID,
- "Invalid response from Trac repository for attribute type: '" + attributeType + "'", e));
- }
- }
-
- return attributes;
- }
-
- public InputStream getAttachmentData(int ticketId, String filename, IProgressMonitor monitor) throws TracException {
- byte[] data = (byte[]) call(monitor, "ticket.getAttachment", ticketId, filename);
- return new ByteArrayInputStream(data);
- }
-
- public void putAttachmentData(int ticketId, String filename, String description, InputStream in,
- IProgressMonitor monitor) throws TracException {
- byte[] data;
- try {
- data = readData(in, new NullProgressMonitor());
- } catch (IOException e) {
- throw new TracException(e);
- }
- call(monitor, "ticket.putAttachment", ticketId, filename, description, data, false);
- }
-
- private byte[] readData(InputStream in, IProgressMonitor monitor) throws IOException {
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- try {
- byte[] buffer = new byte[512];
- while (true) {
- int count = in.read(buffer);
- if (count == -1) {
- return out.toByteArray();
- }
- if (monitor.isCanceled()) {
- throw new OperationCanceledException();
- }
- out.write(buffer, 0, count);
- if (monitor.isCanceled()) {
- throw new OperationCanceledException();
- }
- }
- } finally {
- try {
- in.close();
- } catch (IOException e) {
- StatusHandler.log(new Status(IStatus.ERROR, TracCorePlugin.PLUGIN_ID,
- "Error closing attachment stream", e));
- }
- }
- }
-
- public void deleteAttachment(int ticketId, String filename, IProgressMonitor monitor) throws TracException {
- call(monitor, "ticket.deleteAttachment", ticketId, filename);
- }
-
- private class TicketAttributeResult {
-
- String name;
-
- int value;
-
- }
-
- public int createTicket(TracTicket ticket, IProgressMonitor monitor) throws TracException {
- Map<String, String> attributes = ticket.getValues();
- String summary = attributes.remove(Key.SUMMARY.getKey());
- String description = attributes.remove(Key.DESCRIPTION.getKey());
- if (summary == null || description == null) {
- throw new InvalidTicketException();
- }
- if (isAPIVersionOrHigher(0, 0, 2, monitor)) {
- return (Integer) call(monitor, "ticket.create", summary, description, attributes, true);
- } else {
- return (Integer) call(monitor, "ticket.create", summary, description, attributes);
- }
- }
-
- public void updateTicket(TracTicket ticket, String comment, IProgressMonitor monitor) throws TracException {
- updateAPIVersion(monitor);
-
- Map<String, String> attributes = ticket.getValues();
- if (isAPIVersionOrHigher(0, 0, 2, monitor)) {
- call(monitor, "ticket.update", ticket.getId(), comment, attributes, true);
- } else {
- call(monitor, "ticket.update", ticket.getId(), comment, attributes);
- }
- }
-
- public Set<Integer> getChangedTickets(Date since, IProgressMonitor monitor) throws TracException {
- Object[] ids;
- ids = (Object[]) call(monitor, "ticket.getRecentChanges", since);
- Set<Integer> result = new HashSet<Integer>();
- for (Object id : ids) {
- result.add((Integer) id);
- }
- return result;
- }
-
- public String[] getActions(int id, IProgressMonitor monitor) throws TracException {
- Object[] actions = (Object[]) call(monitor, "ticket.getAvailableActions", id);
- String[] result = new String[actions.length];
- for (int i = 0; i < result.length; i++) {
- result[i] = (String) actions[i];
- }
- return result;
- }
-
- public Date getTicketLastChanged(Integer id, IProgressMonitor monitor) throws TracException {
- Object[] result = (Object[]) call(monitor, "ticket.get", id);
- return parseDate(result[2]);
- }
-
- public void validateWikiRpcApi(IProgressMonitor monitor) throws TracException {
- if (((Integer) call(monitor, "wiki.getRPCVersionSupported")) < 2) {
- validate(monitor);
- }
- }
-
- public String wikiToHtml(String sourceText, IProgressMonitor monitor) throws TracException {
- return (String) call(monitor, "wiki.wikiToHtml", sourceText);
- }
-
- public String[] getAllWikiPageNames(IProgressMonitor monitor) throws TracException {
- Object[] result = (Object[]) call(monitor, "wiki.getAllPages");
- String[] wikiPageNames = new String[result.length];
- for (int i = 0; i < wikiPageNames.length; i++) {
- wikiPageNames[i] = (String) result[i];
- }
- return wikiPageNames;
- }
-
- public TracWikiPageInfo getWikiPageInfo(String pageName, IProgressMonitor monitor) throws TracException {
- return getWikiPageInfo(pageName, LATEST_VERSION, null);
- }
-
- public TracWikiPageInfo getWikiPageInfo(String pageName, int version, IProgressMonitor monitor)
- throws TracException {
- // Note: if an unexpected null value is passed to XmlRpcPlugin, XmlRpcClient will throw a TracRemoteException.
- // So, this null-parameter checking may be omitted if resorting to XmlRpcClient is more appropriate.
- if (pageName == null) {
- throw new IllegalArgumentException("Wiki page name cannot be null");
- }
-
- Object result = (version == LATEST_VERSION) ? call(monitor, "wiki.getPageInfo", pageName) //
- : call(monitor, "wiki.getPageInfoVersion", pageName, version);
- return parseWikiPageInfo(result);
- }
-
- @SuppressWarnings("unchecked")
- public TracWikiPageInfo[] getWikiPageInfoAllVersions(String pageName, IProgressMonitor monitor)
- throws TracException {
- TracWikiPageInfo latestVersion = getWikiPageInfo(pageName, null);
- Map<String, Object>[] calls = new Map[latestVersion.getVersion() - 1];
- for (int i = 0; i < calls.length; i++) {
- calls[i] = createMultiCall("wiki.getPageInfoVersion", pageName, i + 1);
- }
-
- Object[] result = multicall(monitor, calls);
-
- TracWikiPageInfo[] versions = new TracWikiPageInfo[result.length + 1];
- for (int i = 0; i < result.length; i++) {
- Object pageInfoResult = getMultiCallResult(result[i]);
- versions[i] = parseWikiPageInfo(pageInfoResult);
- }
- versions[result.length] = latestVersion;
-
- return versions;
- }
-
- private TracWikiPageInfo parseWikiPageInfo(Object pageInfoResult) throws InvalidWikiPageException {
- // Note: Trac XML-RPC Plugin returns 0 (as Integer) if pageName or version doesn't exist,
- // and XmlRpcClient doesn't throw an Exception in this case
- if (pageInfoResult instanceof Map<?, ?>) {
- TracWikiPageInfo pageInfo = new TracWikiPageInfo();
- Map<?, ?> infoMap = (Map<?, ?>) pageInfoResult;
- pageInfo.setPageName((String) infoMap.get("name"));
- pageInfo.setAuthor((String) infoMap.get("author"));
- pageInfo.setLastModified(parseDate(infoMap.get("lastModified")));
- pageInfo.setVersion((Integer) infoMap.get("version"));
- return pageInfo;
- } else {
- throw new InvalidWikiPageException("Wiki page name or version does not exist");
- }
- }
-
- public String getWikiPageContent(String pageName, IProgressMonitor monitor) throws TracException {
- return getWikiPageContent(pageName, LATEST_VERSION, null);
- }
-
- public String getWikiPageContent(String pageName, int version, IProgressMonitor monitor) throws TracException {
- // Note: if an unexpected null value is passed to XmlRpcPlugin, XmlRpcClient will throw a TracRemoteException.
- // So, this null-parameter checking may be omitted if resorting to XmlRpcClient is more appropriate.
- if (pageName == null) {
- throw new IllegalArgumentException("Wiki page name cannot be null");
- }
- if (version == LATEST_VERSION) {
- // XmlRpcClient throws a TracRemoteException if pageName or version doesn't exist
- return (String) call(monitor, "wiki.getPage", pageName);
- } else {
- return (String) call(monitor, "wiki.getPageVersion", pageName, version);
- }
- }
-
- public String getWikiPageHtml(String pageName, IProgressMonitor monitor) throws TracException {
- return getWikiPageHtml(pageName, LATEST_VERSION, null);
- }
-
- public String getWikiPageHtml(String pageName, int version, IProgressMonitor monitor) throws TracException {
- if (pageName == null) {
- throw new IllegalArgumentException("Wiki page name cannot be null");
- }
-
- if (version == LATEST_VERSION) {
- // XmlRpcClient throws a TracRemoteException if pageName or version doesn't exist
- return (String) call(monitor, "wiki.getPageHTML", pageName);
- } else {
- return (String) call(monitor, "wiki.getPageHTMLVersion", pageName, version);
- }
- }
-
- public TracWikiPageInfo[] getRecentWikiChanges(Date since, IProgressMonitor monitor) throws TracException {
- if (since == null) {
- throw new IllegalArgumentException("Date parameter cannot be null");
- }
-
- Object[] result = (Object[]) call(monitor, "wiki.getRecentChanges", since);
- TracWikiPageInfo[] changes = new TracWikiPageInfo[result.length];
- for (int i = 0; i < result.length; i++) {
- changes[i] = parseWikiPageInfo(result[i]);
- }
- return changes;
- }
-
- public TracWikiPage getWikiPage(String pageName, IProgressMonitor monitor) throws TracException {
- return getWikiPage(pageName, LATEST_VERSION, null);
- }
-
- public TracWikiPage getWikiPage(String pageName, int version, IProgressMonitor monitor) throws TracException {
- TracWikiPage page = new TracWikiPage();
- page.setPageInfo(getWikiPageInfo(pageName, version, null));
- page.setContent(getWikiPageContent(pageName, version, null));
- page.setPageHTML(getWikiPageHtml(pageName, version, null));
- return page;
- }
-
- public boolean putWikipage(String pageName, String content, Map<String, Object> attributes, IProgressMonitor monitor)
- throws TracException {
- Boolean result = (Boolean) call(monitor, "wiki.putPage", pageName, content, attributes);
- return result.booleanValue();
- }
-
- public String[] listWikiPageAttachments(String pageName, IProgressMonitor monitor) throws TracException {
- Object[] result = (Object[]) call(monitor, "wiki.listAttachments", pageName);
- String[] attachments = new String[result.length];
- for (int i = 0; i < attachments.length; i++) {
- attachments[i] = (String) result[i];
- }
- return attachments;
- }
-
- public InputStream getWikiPageAttachmentData(String pageName, String fileName, IProgressMonitor monitor)
- throws TracException {
- String attachmentName = pageName + "/" + fileName;
- byte[] data = (byte[]) call(monitor, "wiki.getAttachment", attachmentName);
- return new ByteArrayInputStream(data);
- }
-
- /**
- * Attach a file to a Wiki page on the repository.
- * <p>
- * This implementation uses the wiki.putAttachmentEx() call, which provides a richer functionality specific to Trac.
- *
- * @param pageName
- * the name of the Wiki page
- * @param fileName
- * the name of the file to be attached
- * @param description
- * the description of the attachment
- * @param in
- * An InputStream of the content of the attachment
- * @param replace
- * whether to overwrite an existing attachment with the same filename
- * @return The (possibly transformed) filename of the attachment. If <code>replace</code> is <code>true</code>, the
- * returned name is always the same as the argument <code>fileName</code>; if <code>replace</code> is
- * <code>false</code> and an attachment with name <code>fileName</code> already exists, a number is appended to the
- * file name (before suffix) and the generated filename of the attachment is returned.
- * @throws TracException
- */
- public String putWikiPageAttachmentData(String pageName, String fileName, String description, InputStream in,
- boolean replace, IProgressMonitor monitor) throws TracException {
- byte[] data;
- try {
- data = readData(in, new NullProgressMonitor());
- } catch (IOException e) {
- throw new TracException(e);
- }
- return (String) call(monitor, "wiki.putAttachmentEx", pageName, fileName, description, data, replace);
- }
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracAttachment.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracAttachment.java
deleted file mode 100644
index 0d67f62bc..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracAttachment.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.core.model;
-
-import java.util.Date;
-
-/**
- * @author Steffen Pingel
- */
-public class TracAttachment {
-
- private String author;
-
- private Date created;
-
- private String description;
-
- private String filename;
-
- int size;
-
- public TracAttachment(String filename) {
- this.filename = filename;
- }
-
- public String getAuthor() {
- return author;
- }
-
- public Date getCreated() {
- return created;
- }
-
- public String getDescription() {
- return description;
- }
-
- public String getFilename() {
- return filename;
- }
-
- public int getSize() {
- return size;
- }
-
- public void setAuthor(String author) {
- this.author = author;
- }
-
- public void setCreated(Date created) {
- this.created = created;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public void setFilename(String filename) {
- this.filename = filename;
- }
-
- public void setSize(int size) {
- this.size = size;
- }
-
- @Override
- public String toString() {
- return filename;
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracAttribute.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracAttribute.java
deleted file mode 100644
index ed74bf8a7..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracAttribute.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.core.model;
-
-import java.io.Serializable;
-
-/**
- * @author Steffen Pingel
- */
-public class TracAttribute implements Serializable {
-
- private static final long serialVersionUID = -4535033208999685315L;
-
- private String name;
-
- public TracAttribute(String name) {
- this.name = name;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- @Override
- public String toString() {
- return name;
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracComment.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracComment.java
deleted file mode 100644
index 2853623e2..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracComment.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.core.model;
-
-import java.util.Date;
-
-/**
- * @author Steffen Pingel
- */
-public class TracComment {
-
- private String author;
-
- private Date created;
-
- private String field;
-
- private String newValue;
-
- private String oldValue;
-
- private boolean permanent;
-
- public TracComment() {
- }
-
- public String getAuthor() {
- return author;
- }
-
- public Date getCreated() {
- return created;
- }
-
- public String getField() {
- return field;
- }
-
- public String getNewValue() {
- return newValue;
- }
-
- public String getOldValue() {
- return oldValue;
- }
-
- public boolean isPermanent() {
- return permanent;
- }
-
- public void setAuthor(String author) {
- this.author = author;
- }
-
- public void setCreated(Date created) {
- this.created = created;
- }
-
- public void setField(String field) {
- this.field = field;
- }
-
- public void setNewValue(String newValue) {
- this.newValue = newValue;
- }
-
- public void setOldValue(String oldValue) {
- this.oldValue = oldValue;
- }
-
- public void setPermanent(boolean permanent) {
- this.permanent = permanent;
- }
-
- @Override
- public String toString() {
- return "[" + field + "] " + author + ": " + oldValue + " -> " + newValue;
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracComponent.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracComponent.java
deleted file mode 100644
index 55aa33015..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracComponent.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.core.model;
-
-/**
- * @author Steffen Pingel
- */
-public class TracComponent extends TracAttribute {
-
- private static final long serialVersionUID = -6181067219323677076L;
-
- private String owner;
-
- private String description;
-
- public TracComponent(String name) {
- super(name);
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public String getOwner() {
- return owner;
- }
-
- public void setOwner(String owner) {
- this.owner = owner;
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracMilestone.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracMilestone.java
deleted file mode 100644
index 0b1ba7065..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracMilestone.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.core.model;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * @author Steffen Pingel
- */
-public class TracMilestone extends TracAttribute implements Serializable {
-
- private static final long serialVersionUID = 6648558552508886484L;
-
- private Date due;
-
- private Date completed;
-
- private String description;
-
- public TracMilestone(String name) {
- super(name);
- }
-
- public Date getCompleted() {
- return completed;
- }
-
- public void setCompleted(Date completed) {
- this.completed = completed;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public Date getDue() {
- return due;
- }
-
- public void setDue(Date due) {
- this.due = due;
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracPriority.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracPriority.java
deleted file mode 100644
index 7cc3d3d33..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracPriority.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.core.model;
-
-/**
- * @author Steffen Pingel
- */
-public class TracPriority extends TracTicketAttribute {
-
- private static final long serialVersionUID = 3617078252773178266L;
-
- public TracPriority(String name, int value) {
- super(name, value);
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracSearch.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracSearch.java
deleted file mode 100644
index 836f08a27..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracSearch.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.core.model;
-
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import java.net.URLEncoder;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.StringTokenizer;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.trac.core.ITracClient;
-import org.eclipse.mylyn.internal.trac.core.TracCorePlugin;
-import org.eclipse.mylyn.internal.trac.core.model.TracSearchFilter.CompareOperator;
-
-/**
- * Represents a Trac search. A search can have multiple {@link TracSearchFilter}s that all need to match.
- *
- * @author Steffen Pingel
- */
-public class TracSearch {
-
- /** Stores search criteria in the order entered by the user. */
- private final Map<String, TracSearchFilter> filterByFieldName = new LinkedHashMap<String, TracSearchFilter>();
-
- /** The field the result is ordered by. */
- private String orderBy;
-
- private boolean ascending = true;
-
- public TracSearch(String queryParameter) {
- fromUrl(queryParameter);
- }
-
- public TracSearch() {
- }
-
- public void addFilter(String key, String value) {
- TracSearchFilter filter = filterByFieldName.get(key);
- if (filter == null) {
- filter = new TracSearchFilter(key);
- CompareOperator operator = CompareOperator.fromUrl(value);
- filter.setOperator(operator);
- filterByFieldName.put(key, filter);
- }
-
- filter.addValue(value.substring(filter.getOperator().getQueryValue().length()));
- }
-
- public void addFilter(TracSearchFilter filter) {
- filterByFieldName.put(filter.getFieldName(), filter);
- }
-
- public List<TracSearchFilter> getFilters() {
- return new ArrayList<TracSearchFilter>(filterByFieldName.values());
- }
-
- public void setAscending(boolean ascending) {
- this.ascending = ascending;
- }
-
- public boolean isAscending() {
- return ascending;
- }
-
- public void setOrderBy(String orderBy) {
- this.orderBy = orderBy;
- }
-
- public String getOrderBy() {
- return orderBy;
- }
-
- /**
- * Returns a Trac query string that conforms to the format defined at
- * {@link http://projects.edgewall.com/trac/wiki/TracQuery#QueryLanguage}.
- *
- * @return the empty string, if no search order and criteria are defined; a string that starts with &amp;, otherwise
- */
- public String toQuery() {
- StringBuilder sb = new StringBuilder();
- if (orderBy != null) {
- sb.append("&order=");
- sb.append(orderBy);
- if (!ascending) {
- sb.append("&desc=1");
- }
- }
- for (TracSearchFilter filter : filterByFieldName.values()) {
- sb.append("&");
- sb.append(filter.getFieldName());
- sb.append(filter.getOperator().getQueryValue());
- sb.append("=");
- List<String> values = filter.getValues();
- for (Iterator<String> it = values.iterator(); it.hasNext();) {
- sb.append(it.next());
- if (it.hasNext()) {
- sb.append("|");
- }
- }
- }
- return sb.toString();
- }
-
- /**
- * Returns a URL encoded string that can be passed as an argument to the Trac query script.
- *
- * @return the empty string, if no search order and criteria are defined; a string that starts with &amp;, otherwise
- */
- public String toUrl() {
- StringBuilder sb = new StringBuilder();
- if (orderBy != null) {
- sb.append("&order=");
- sb.append(orderBy);
- if (!ascending) {
- sb.append("&desc=1");
- }
- } else if (filterByFieldName.isEmpty()) {
- // TODO figure out why search must be ordered when logged in (otherwise
- // no results will be returned)
- sb.append("&order=id");
- }
-
- for (TracSearchFilter filter : filterByFieldName.values()) {
- for (String value : filter.getValues()) {
- sb.append("&");
- sb.append(filter.getFieldName());
- sb.append("=");
- try {
- sb.append(URLEncoder.encode(filter.getOperator().getQueryValue(), ITracClient.CHARSET));
- sb.append(URLEncoder.encode(value, ITracClient.CHARSET));
- } catch (UnsupportedEncodingException e) {
- StatusHandler.log(new Status(IStatus.WARNING, TracCorePlugin.PLUGIN_ID,
- "Unexpected exception while decoding URL", e));
- }
- }
- }
- return sb.toString();
- }
-
- public void fromUrl(String url) {
- StringTokenizer t = new StringTokenizer(url, "&");
- while (t.hasMoreTokens()) {
- String token = t.nextToken();
- int i = token.indexOf("=");
- if (i != -1) {
- try {
- String key = URLDecoder.decode(token.substring(0, i), ITracClient.CHARSET);
- String value = URLDecoder.decode(token.substring(i + 1), ITracClient.CHARSET);
-
- if ("order".equals(key)) {
- setOrderBy(value);
- } else if ("desc".equals(key)) {
- setAscending(!"1".equals(value));
- } else if ("group".equals(key) || "groupdesc".equals(key) || "verbose".equals(key)) {
- // ignore these parameters
- } else {
- addFilter(key, value);
- }
- } catch (UnsupportedEncodingException e) {
- StatusHandler.log(new Status(IStatus.WARNING, TracCorePlugin.PLUGIN_ID,
- "Unexpected exception while decoding URL", e));
- }
- }
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracSearchFilter.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracSearchFilter.java
deleted file mode 100644
index 0ba93e3ff..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracSearchFilter.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.core.model;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Represents a search criterion. Each criterion is applied to a field such as milestone or priority. It has a compare
- * operator and a list of values. The compare mode is <code>OR</code> for the operators <code>contains</code>,
- * <code>starts with</code>, <code>ends with</code> and <code>is</code>. The compare mode is <code>AND</code>
- * for all other (negated) operators.
- *
- * @author Steffen Pingel
- */
-public class TracSearchFilter {
-
- public enum CompareOperator {
- CONTAINS("~"), CONTAINS_NOT("!~"), BEGINS_WITH("^"), NOT_BEGINS_WITH("!^"), ENDS_WITH("$"), NOT_ENDS_WITH("!$"), IS(
- ""), IS_NOT("!");
-
- public static CompareOperator fromUrl(String value) {
- for (CompareOperator operator : values()) {
- if (operator != IS && operator != IS_NOT && value.startsWith(operator.queryValue)) {
- return operator;
- }
- }
- if (value.startsWith(IS_NOT.queryValue)) {
- return IS_NOT;
- }
- return IS;
- }
-
- /** The string that represent the operator in a Trac query. */
- private String queryValue;
-
- CompareOperator(String queryValue) {
- this.queryValue = queryValue;
- }
-
- public String getQueryValue() {
- return queryValue;
- }
-
- @Override
- public String toString() {
- switch (this) {
- case CONTAINS:
- return "contains";
- case CONTAINS_NOT:
- return "does not contain";
- case BEGINS_WITH:
- return "begins with";
- case NOT_BEGINS_WITH:
- return "does not begin with";
- case ENDS_WITH:
- return "ends with";
- case NOT_ENDS_WITH:
- return "does not end with";
- case IS_NOT:
- return "is not";
- default:
- return "is";
- }
- }
-
- }
-
- private final String fieldName;
-
- private CompareOperator operator;
-
- private final List<String> values = new ArrayList<String>();
-
- public TracSearchFilter(String fieldName) {
- this.fieldName = fieldName;
- }
-
- public void addValue(String value) {
- values.add(value);
- }
-
- public String getFieldName() {
- return fieldName;
- }
-
- public CompareOperator getOperator() {
- return operator;
- }
-
- public List<String> getValues() {
- return values;
- }
-
- public void setOperator(CompareOperator operator) {
- this.operator = operator;
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracSeverity.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracSeverity.java
deleted file mode 100644
index b863d04f0..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracSeverity.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.core.model;
-
-/**
- * @author Steffen Pingel
- */
-public class TracSeverity extends TracTicketAttribute {
-
- private static final long serialVersionUID = 2173932517704827316L;
-
- public TracSeverity(String name, int value) {
- super(name, value);
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracTicket.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracTicket.java
deleted file mode 100644
index 1c356b688..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracTicket.java
+++ /dev/null
@@ -1,222 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.core.model;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.mylyn.internal.trac.core.InvalidTicketException;
-
-/**
- * Represents a Trac ticket as it is retrieved from a Trac repository.
- *
- * @author Steffen Pingel
- */
-public class TracTicket {
-
- /**
- * Represents the key of a string propertiy of a ticket.
- *
- * @author Steffen Pingel
- */
- public enum Key {
- CC("cc"), CHANGE_TIME("changetime"), COMPONENT("component"), DESCRIPTION("description"), ID("id"), KEYWORDS(
- "keywords"), MILESTONE("milestone"), OWNER("owner"), PRIORITY("priority"), REPORTER("reporter"), RESOLUTION(
- "resolution"), STATUS("status"), SEVERITY("severity"), SUMMARY("summary"), TIME("time"), TYPE("type"), VERSION(
- "version");
-
- public static Key fromKey(String name) {
- for (Key key : Key.values()) {
- if (key.getKey().equals(name)) {
- return key;
- }
- }
- return null;
- }
-
- private String key;
-
- Key(String key) {
- this.key = key;
- }
-
- @Override
- public String toString() {
- return key;
- }
-
- public String getKey() {
- return key;
- }
- }
-
- public static final int INVALID_ID = -1;
-
- private Date created;
-
- /**
- * User defined custom ticket fields.
- *
- * @see http://projects.edgewall.com/trac/wiki/TracTicketsCustomFields
- */
- private Map<String, String> customValueByKey;
-
- private int id = INVALID_ID;
-
- private Date lastChanged;
-
- /** Trac's built-in ticket properties. */
- private final Map<Key, String> valueByKey = new HashMap<Key, String>();
-
- private List<TracComment> comments;
-
- private List<TracAttachment> attachments;
-
- private String[] actions;
-
- private String[] resolutions;
-
- public TracTicket() {
- }
-
- /**
- * Constructs a Trac ticket.
- *
- * @param id
- * the numeric Trac ticket id
- */
- public TracTicket(int id) {
- this.id = id;
- }
-
- public Date getCreated() {
- return created;
- }
-
- public int getId() {
- return id;
- }
-
- public Date getLastChanged() {
- return lastChanged;
- }
-
- public String getCustomValue(String key) {
- if (customValueByKey == null) {
- return null;
- }
- return customValueByKey.get(key);
- }
-
- public String getValue(Key key) {
- return valueByKey.get(key);
- }
-
- public Map<String, String> getValues() {
- Map<String, String> result = new HashMap<String, String>();
- for (Key key : valueByKey.keySet()) {
- result.put(key.getKey(), valueByKey.get(key));
- }
- if (customValueByKey != null) {
- result.putAll(customValueByKey);
- }
- return result;
- }
-
- public boolean isValid() {
- return getId() != TracTicket.INVALID_ID;
- }
-
- public void putBuiltinValue(Key key, String value) throws InvalidTicketException {
- valueByKey.put(key, value);
- }
-
- public void putCustomValue(String key, String value) {
- if (customValueByKey == null) {
- customValueByKey = new HashMap<String, String>();
- }
- customValueByKey.put(key, value);
- }
-
- /**
- * Stores a value as it is retrieved from the repository.
- *
- * @throws InvalidTicketException
- * thrown if the type of <code>value</code> is not valid
- */
- public boolean putValue(String keyName, String value) throws InvalidTicketException {
- Key key = Key.fromKey(keyName);
- if (key != null) {
- if (key == Key.ID || key == Key.TIME || key == Key.CHANGE_TIME) {
- return false;
- }
- putBuiltinValue(key, value);
- } else if (value != null) {
- putCustomValue(keyName, value);
- } else {
- throw new InvalidTicketException("Expected string value for custom key '" + keyName + "', got '" + value
- + "'");
- }
- return true;
- }
-
- public void setCreated(Date created) {
- this.created = created;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public void setLastChanged(Date lastChanged) {
- this.lastChanged = lastChanged;
- }
-
- public void addComment(TracComment comment) {
- if (comments == null) {
- comments = new ArrayList<TracComment>();
- }
- comments.add(comment);
- }
-
- public void addAttachment(TracAttachment attachment) {
- if (attachments == null) {
- attachments = new ArrayList<TracAttachment>();
- }
- attachments.add(attachment);
- }
-
- public TracComment[] getComments() {
- return (comments != null) ? comments.toArray(new TracComment[0]) : null;
- }
-
- public TracAttachment[] getAttachments() {
- return (attachments != null) ? attachments.toArray(new TracAttachment[0]) : null;
- }
-
- public void setActions(String[] actions) {
- this.actions = actions;
- }
-
- public String[] getActions() {
- return actions;
- }
-
- public void setResolutions(String[] resolutions) {
- this.resolutions = resolutions;
- }
-
- public String[] getResolutions() {
- return resolutions;
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracTicketAttribute.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracTicketAttribute.java
deleted file mode 100644
index decea9a5f..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracTicketAttribute.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.core.model;
-
-import java.io.Serializable;
-
-/**
- * @author Steffen Pingel
- */
-public class TracTicketAttribute implements Comparable<TracTicketAttribute>, Serializable {
-
- private static final long serialVersionUID = -8611030780681519787L;
-
- private final String name;
-
- private final int value;
-
- public TracTicketAttribute(String name, int value) {
- this.name = name;
- this.value = value;
- }
-
- public int compareTo(TracTicketAttribute o) {
- return value - o.value;
- }
-
- public String getName() {
- return name;
- }
-
- public int getValue() {
- return value;
- }
-
- @Override
- public String toString() {
- return name;
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracTicketField.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracTicketField.java
deleted file mode 100644
index 6e52d0bbc..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracTicketField.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.core.model;
-
-import java.io.Serializable;
-
-/**
- * @author Steffen Pingel
- */
-public class TracTicketField implements Serializable {
-
- private static final long serialVersionUID = -640983268404073300L;
-
- public enum Type {
- TEXT, CHECKBOX, SELECT, RADIO, TEXTAREA;
-
- public static Type fromString(String value) {
- value = value.toLowerCase();
- if ("text".equals(value)) {
- return TEXT;
- } else if ("checkbox".equals(value)) {
- return CHECKBOX;
- } else if ("select".equals(value)) {
- return SELECT;
- } else if ("radio".equals(value)) {
- return RADIO;
- } else if ("textarea".equals(value)) {
- return TEXTAREA;
- }
- return TEXT;
- }
-
- }
-
- public static final int DEFAULT_SIZE = -1;
-
- private String name;
-
- private Type type;
-
- private String label;
-
- private String[] options;
-
- private String defaultValue;
-
- private boolean custom;
-
- private int order;
-
- private boolean optional;
-
- private int width = DEFAULT_SIZE;
-
- private int height = DEFAULT_SIZE;
-
- public TracTicketField(String name) {
- this.name = name;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public Type getType() {
- return type;
- }
-
- public void setType(Type type) {
- this.type = type;
- }
-
- public String getLabel() {
- return label;
- }
-
- public void setLabel(String label) {
- this.label = label;
- }
-
- public String[] getOptions() {
- return options;
- }
-
- public void setOptions(String[] options) {
- this.options = options;
- }
-
- public int getOrder() {
- return order;
- }
-
- public void setOrder(int order) {
- this.order = order;
- }
-
- public boolean isOptional() {
- return optional;
- }
-
- public void setOptional(boolean optional) {
- this.optional = optional;
- }
-
- public int getWidth() {
- return width;
- }
-
- public void setWidth(int width) {
- this.width = width;
- }
-
- public int getHeight() {
- return height;
- }
-
- public void setHeight(int height) {
- this.height = height;
- }
-
- public String getDefaultValue() {
- return defaultValue;
- }
-
- public void setDefaultValue(String defaultValue) {
- this.defaultValue = defaultValue;
- }
-
- public boolean isCustom() {
- return custom;
- }
-
- public void setCustom(boolean custom) {
- this.custom = custom;
- }
-
- @Override
- public String toString() {
- return name;
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracTicketResolution.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracTicketResolution.java
deleted file mode 100644
index 4838c6628..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracTicketResolution.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.core.model;
-
-/**
- * @author Steffen Pingel
- */
-public class TracTicketResolution extends TracTicketAttribute {
-
- private static final long serialVersionUID = -6933211257044813716L;
-
- public TracTicketResolution(String name, int value) {
- super(name, value);
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracTicketStatus.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracTicketStatus.java
deleted file mode 100644
index 45f9e7caf..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracTicketStatus.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.core.model;
-
-/**
- * @author Steffen Pingel
- */
-public class TracTicketStatus extends TracTicketAttribute {
-
- private static final long serialVersionUID = -8844909853931772506L;
-
- public TracTicketStatus(String name, int value) {
- super(name, value);
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracTicketType.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracTicketType.java
deleted file mode 100644
index 8d09a2107..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracTicketType.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.core.model;
-
-/**
- * @author Steffen Pingel
- */
-public class TracTicketType extends TracTicketAttribute {
-
- private static final long serialVersionUID = -3157354751904259304L;
-
- public TracTicketType(String name, int value) {
- super(name, value);
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracVersion.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracVersion.java
deleted file mode 100644
index 0b4665fa1..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracVersion.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.core.model;
-
-import java.util.Date;
-
-/**
- * @author Steffen Pingel
- */
-public class TracVersion extends TracAttribute {
-
- private static final long serialVersionUID = 9018237956062697410L;
-
- private Date time;
-
- private String description;
-
- public TracVersion(String name) {
- super(name);
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public Date getTime() {
- return time;
- }
-
- public void setTime(Date time) {
- this.time = time;
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracWikiPage.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracWikiPage.java
deleted file mode 100644
index e064cbe3d..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracWikiPage.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.core.model;
-
-/**
- * Represents a Trac Wiki page at a specific version.
- *
- * @author Xiaoyang Guan
- */
-public class TracWikiPage {
-
- private TracWikiPageInfo pageInfo;
-
- private String content;
-
- private String pageHTML;
-
- public TracWikiPage() {
- }
-
- public TracWikiPageInfo getPageInfo() {
- return pageInfo;
- }
-
- public void setPageInfo(TracWikiPageInfo pageInfo) {
- this.pageInfo = pageInfo;
- }
-
- public String getContent() {
- return content;
- }
-
- public void setContent(String content) {
- this.content = content;
- }
-
- public String getPageHTML() {
- return pageHTML;
- }
-
- public void setPageHTML(String pageHTML) {
- this.pageHTML = pageHTML;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (obj == null) {
- return false;
- } else if (this == obj) {
- return true;
- } else if (getClass() != obj.getClass()) {
- return false;
- } else {
- TracWikiPage other = (TracWikiPage) obj;
- return content.equals(other.content) && pageInfo.toString().equals(other.pageInfo.toString());
- }
- }
-}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracWikiPageInfo.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracWikiPageInfo.java
deleted file mode 100644
index 36983a035..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracWikiPageInfo.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.core.model;
-
-import java.util.Date;
-
-/**
- * Information about a Trac Wiki page at a specific version
- *
- * @author Xiaoyang Guan
- */
-public class TracWikiPageInfo {
-
- private String pageName;
-
- private String author;
-
- private Date lastModified;
-
- private int version;
-
- private String comment;
-
- public TracWikiPageInfo() {
- }
-
- public String getPageName() {
- return pageName;
- }
-
- public void setPageName(String pageName) {
- this.pageName = pageName;
- }
-
- public String getAuthor() {
- return author;
- }
-
- public void setAuthor(String author) {
- this.author = author;
- }
-
- public Date getLastModified() {
- return lastModified;
- }
-
- public void setLastModified(Date lastModified) {
- this.lastModified = lastModified;
- }
-
- public int getVersion() {
- return version;
- }
-
- public void setVersion(int version) {
- this.version = version;
- }
-
- public String getComment() {
- return comment;
- }
-
- public void setComment(String comment) {
- this.comment = comment;
- }
-
- @Override
- public String toString() {
- return pageName + ": version " + version + " by " + author + " last modified at " + lastModified;
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/util/TracHttpClientTransportFactory.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/util/TracHttpClientTransportFactory.java
deleted file mode 100644
index 4a7460ef2..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/util/TracHttpClientTransportFactory.java
+++ /dev/null
@@ -1,284 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.core.util;
-
-import java.io.BufferedOutputStream;
-import java.io.FilterOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.HttpURLConnection;
-
-import org.apache.commons.httpclient.Cookie;
-import org.apache.commons.httpclient.Credentials;
-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.HttpVersion;
-import org.apache.commons.httpclient.UsernamePasswordCredentials;
-import org.apache.commons.httpclient.auth.AuthScope;
-import org.apache.commons.httpclient.methods.PostMethod;
-import org.apache.commons.httpclient.methods.RequestEntity;
-import org.apache.commons.httpclient.params.HttpMethodParams;
-import org.apache.xmlrpc.XmlRpcException;
-import org.apache.xmlrpc.XmlRpcRequest;
-import org.apache.xmlrpc.client.XmlRpcClient;
-import org.apache.xmlrpc.client.XmlRpcClientException;
-import org.apache.xmlrpc.client.XmlRpcHttpClientConfig;
-import org.apache.xmlrpc.client.XmlRpcHttpTransport;
-import org.apache.xmlrpc.client.XmlRpcTransport;
-import org.apache.xmlrpc.client.XmlRpcTransportFactory;
-import org.apache.xmlrpc.common.XmlRpcStreamConfig;
-import org.apache.xmlrpc.common.XmlRpcStreamRequestConfig;
-import org.apache.xmlrpc.util.HttpUtil;
-import org.apache.xmlrpc.util.XmlRpcIOException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.mylyn.commons.net.AbstractWebLocation;
-import org.eclipse.mylyn.commons.net.WebUtil;
-import org.xml.sax.SAXException;
-
-/**
- * A custom transport factory used to establish XML-RPC connections. Uses the Mylyn proxy settings.
- *
- * @author Steffen Pingel
- */
-public class TracHttpClientTransportFactory implements XmlRpcTransportFactory {
-
- /**
- * A transport that uses the Apache HttpClient library.
- */
- public static class TracHttpClientTransport extends XmlRpcHttpTransport {
-
- private final HttpClient httpClient;
-
- private final AbstractWebLocation location;
-
- private final Cookie[] cookies;
-
- private PostMethod method;
-
- private int contentLength = -1;
-
- private XmlRpcHttpClientConfig config;
-
- private IProgressMonitor monitor;
-
- private HostConfiguration hostConfiguration;
-
- public TracHttpClientTransport(XmlRpcClient client, HttpClient httpClient, AbstractWebLocation location,
- Cookie[] cookies) {
- super(client, "");
-
- this.httpClient = httpClient;
- this.location = location;
- this.cookies = cookies;
- }
-
- @Override
- protected void close() throws XmlRpcClientException {
- method.releaseConnection();
- }
-
- public int getContentLength() {
- return contentLength;
- }
-
- @Override
- protected InputStream getInputStream() throws XmlRpcException {
- int responseCode = method.getStatusCode();
- if (responseCode != HttpURLConnection.HTTP_OK) {
- throw new TracHttpException(responseCode);
- }
-
- try {
- return method.getResponseBodyAsStream();
- } catch (HttpException e) {
- throw new XmlRpcClientException("Error in HTTP transport: " + e.getMessage(), e);
- } catch (IOException e) {
- throw new XmlRpcClientException("I/O error in server communication: " + e.getMessage(), e);
- }
- }
-
- @Override
- protected String getUserAgent() {
- return WebUtil.getUserAgent("");
- }
-
- @Override
- protected void initHttpHeaders(XmlRpcRequest request) throws XmlRpcClientException {
- config = (XmlRpcHttpClientConfig) request.getConfig();
-
- if (request instanceof TracXmlRpcClientRequest) {
- TracXmlRpcClientRequest tracRequest = (TracXmlRpcClientRequest) request;
- monitor = tracRequest.getProgressMonitor();
- } else {
- monitor = null;
- }
-
- String url = config.getServerURL().toString();
- hostConfiguration = WebUtil.createHostConfiguration(httpClient, location, monitor);
- if (cookies != null) {
- httpClient.getState().addCookies(cookies);
- }
- method = new PostMethod(WebUtil.getRequestPath(url));
-
- super.initHttpHeaders(request);
-
- if (config.getConnectionTimeout() != 0) {
- httpClient.getHttpConnectionManager().getParams().setConnectionTimeout(config.getConnectionTimeout());
- }
-
- if (config.getReplyTimeout() != 0) {
- httpClient.getHttpConnectionManager().getParams().setSoTimeout(config.getConnectionTimeout());
- }
-
- method.getParams().setVersion(HttpVersion.HTTP_1_1);
- }
-
- @Override
- protected boolean isResponseGzipCompressed(XmlRpcStreamRequestConfig config) {
- Header header = method.getResponseHeader("Content-Encoding");
- return header != null && HttpUtil.isUsingGzipEncoding(header.getValue());
- }
-
- @Override
- protected void setContentLength(int contentLength) {
- this.contentLength = contentLength;
- }
-
- @Override
- protected void setCredentials(XmlRpcHttpClientConfig config) throws XmlRpcClientException {
- String userName = config.getBasicUserName();
- if (userName != null) {
- String encoding = config.getBasicEncoding();
- if (encoding == null) {
- encoding = XmlRpcStreamConfig.UTF8_ENCODING;
- }
- httpClient.getParams().setParameter(HttpMethodParams.CREDENTIAL_CHARSET, encoding);
- Credentials creds = new UsernamePasswordCredentials(userName, config.getBasicPassword());
- AuthScope scope = new AuthScope(null, AuthScope.ANY_PORT, null, AuthScope.ANY_SCHEME);
- httpClient.getState().setCredentials(scope, creds);
- httpClient.getParams().setAuthenticationPreemptive(true);
- }
- }
-
- @Override
- protected void setRequestHeader(String header, String value) {
- method.setRequestHeader(new Header(header, value));
- }
-
- @Override
- protected void writeRequest(final ReqWriter writer) throws XmlRpcException {
- method.setRequestEntity(new RequestEntity() {
- public long getContentLength() {
- return TracHttpClientTransport.this.getContentLength();
- }
-
- public String getContentType() {
- return "text/xml";
- }
-
- public boolean isRepeatable() {
- return getContentLength() != -1;
- }
-
- public void writeRequest(OutputStream pOut) throws IOException {
- try {
- /* Make sure, that the socket is not closed by replacing it with our
- * own BufferedOutputStream.
- */
- OutputStream ostream;
- if (isUsingByteArrayOutput(config)) {
- // No need to buffer the output.
- ostream = new FilterOutputStream(pOut) {
- @Override
- public void close() throws IOException {
- flush();
- }
- };
- } else {
- ostream = new BufferedOutputStream(pOut) {
- @Override
- public void close() throws IOException {
- flush();
- }
- };
- }
- writer.write(ostream);
- } catch (XmlRpcException e) {
- throw new XmlRpcIOException(e);
- } catch (SAXException e) {
- throw new XmlRpcIOException(e);
- }
- }
- });
-
- try {
- WebUtil.execute(httpClient, hostConfiguration, method, monitor);
- } catch (XmlRpcIOException e) {
- Throwable t = e.getLinkedException();
- if (t instanceof XmlRpcException) {
- throw (XmlRpcException) t;
- } else {
- throw new XmlRpcException("Unexpected exception: " + t.getMessage(), t);
- }
- } catch (IOException e) {
- throw new XmlRpcException("I/O error while communicating with HTTP server: " + e.getMessage(), e);
- }
- }
-
- }
-
- public static class TracHttpException extends XmlRpcException {
-
- private static final long serialVersionUID = 9032521978140685830L;
-
- public TracHttpException(int responseCode) {
- super(responseCode, "HTTP Error " + responseCode);
- }
-
- }
-
- protected static final String USER_AGENT = "TracConnector Apache XML-RPC/3.0";
-
- private final XmlRpcClient xmlRpcClient;
-
- private Cookie[] cookies;
-
- private AbstractWebLocation location;
-
- private final HttpClient httpClient;
-
- public TracHttpClientTransportFactory(XmlRpcClient xmlRpcClient, HttpClient httpClient) {
- this.xmlRpcClient = xmlRpcClient;
- this.httpClient = httpClient;
- }
-
- public Cookie[] getCookies() {
- return cookies;
- }
-
- public AbstractWebLocation getLocation() {
- return location;
- }
-
- public XmlRpcTransport getTransport() {
- return new TracHttpClientTransport(xmlRpcClient, httpClient, location, cookies);
- }
-
- public void setCookies(Cookie[] cookies) {
- this.cookies = cookies;
- }
-
- public void setLocation(AbstractWebLocation location) {
- this.location = location;
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/util/TracUtils.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/util/TracUtils.java
deleted file mode 100644
index dfd105712..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/util/TracUtils.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.core.util;
-
-import java.util.Date;
-
-/**
- * Provides static helper methods.
- *
- * @author Steffen Pingel
- */
-public class TracUtils {
-
- public static Date parseDate(long seconds) {
- return new Date(seconds * 1000l);
-// Calendar c = Calendar.getInstance();
-// c.setTimeZone(TimeZone.getTimeZone(ITracClient.TIME_ZONE));
-// c.setTimeInMillis(seconds * 1000l);
-// return c.getTime();
- }
-
- public static long toTracTime(Date date) {
-// Calendar c = Calendar.getInstance();
-// c.setTime(date);
-// c.setTimeZone(TimeZone.getTimeZone(ITracClient.TIME_ZONE));
-// return c.getTimeInMillis() / 1000l;
- return date.getTime() / 1000l;
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/util/TracXmlRpcClientRequest.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/util/TracXmlRpcClientRequest.java
deleted file mode 100644
index d93c0dc20..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/util/TracXmlRpcClientRequest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.core.util;
-
-import org.apache.xmlrpc.XmlRpcRequestConfig;
-import org.apache.xmlrpc.client.XmlRpcClientRequestImpl;
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * @author Steffen Pingel
- */
-public class TracXmlRpcClientRequest extends XmlRpcClientRequestImpl {
-
- private final IProgressMonitor progressMonitor;
-
- public TracXmlRpcClientRequest(XmlRpcRequestConfig config, String methodName, Object[] params,
- IProgressMonitor monitor) {
- super(config, methodName, params);
- this.progressMonitor = monitor;
- }
-
- public IProgressMonitor getProgressMonitor() {
- return progressMonitor;
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.tests/.classpath b/org.eclipse.mylyn.trac.tests/.classpath
deleted file mode 100644
index d7d62759f..000000000
--- a/org.eclipse.mylyn.trac.tests/.classpath
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
- <accessrules>
- <accessrule kind="accessible" pattern="org/eclipse/mylyn/**"/>
- </accessrules>
- </classpathentry>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/org.eclipse.mylyn.trac.tests/.cvsignore b/org.eclipse.mylyn.trac.tests/.cvsignore
deleted file mode 100644
index b0b9ecf46..000000000
--- a/org.eclipse.mylyn.trac.tests/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-bin
-credentials.properties
-credentials.properties
diff --git a/org.eclipse.mylyn.trac.tests/.project b/org.eclipse.mylyn.trac.tests/.project
deleted file mode 100644
index 1f3b6278e..000000000
--- a/org.eclipse.mylyn.trac.tests/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.mylyn.trac.tests</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/org.eclipse.mylyn.trac.tests/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.mylyn.trac.tests/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 8b08f1b8b..000000000
--- a/org.eclipse.mylyn.trac.tests/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,340 +0,0 @@
-#Thu Apr 24 21:03:23 PDT 2008
-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=ignore
-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,NORMAL
-org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,API
-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=false
-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.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.trac.tests/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.mylyn.trac.tests/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 5e70d0848..000000000
--- a/org.eclipse.mylyn.trac.tests/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,63 +0,0 @@
-#Sat Mar 01 03:38:47 PST 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">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*******************************************************************************\n * Copyright (c) 2004, 2007 Mylyn project committers and others.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *******************************************************************************/\n\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ignore\n${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ignore</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created JavaScript files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for vars" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Jsdoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created function stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated function stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_methods=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=true
-sp_cleanup.correct_indentation=true
-sp_cleanup.format_source_code=true
-sp_cleanup.format_source_code_changes_only=false
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=true
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=true
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=true
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=true
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=true
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/org.eclipse.mylyn.trac.tests/.settings/org.eclipse.ltk.core.refactoring.prefs b/org.eclipse.mylyn.trac.tests/.settings/org.eclipse.ltk.core.refactoring.prefs
deleted file mode 100644
index 7ab03bdac..000000000
--- a/org.eclipse.mylyn.trac.tests/.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.trac.tests/.settings/org.eclipse.mylyn.tasklist.prefs b/org.eclipse.mylyn.trac.tests/.settings/org.eclipse.mylyn.tasklist.prefs
deleted file mode 100644
index 0a2cc0b30..000000000
--- a/org.eclipse.mylyn.trac.tests/.settings/org.eclipse.mylyn.tasklist.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Mon Jun 18 17:14:59 PDT 2007
-eclipse.preferences.version=1
-project.repository.kind=bugzilla
-project.repository.url=https\://bugs.eclipse.org/bugs
diff --git a/org.eclipse.mylyn.trac.tests/.settings/org.eclipse.mylyn.tasks.ui.prefs b/org.eclipse.mylyn.trac.tests/.settings/org.eclipse.mylyn.tasks.ui.prefs
deleted file mode 100644
index d8c6d26af..000000000
--- a/org.eclipse.mylyn.trac.tests/.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.trac.tests/.settings/org.eclipse.pde.prefs b/org.eclipse.mylyn.trac.tests/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index e8f2d5620..000000000
--- a/org.eclipse.mylyn.trac.tests/.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.trac.tests/META-INF/MANIFEST.MF b/org.eclipse.mylyn.trac.tests/META-INF/MANIFEST.MF
deleted file mode 100644
index 26936032a..000000000
--- a/org.eclipse.mylyn.trac.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,23 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Mylyn Trac Connector Tests
-Bundle-SymbolicName: org.eclipse.mylyn.trac.tests;singleton:=true
-Bundle-Version: 0.0.0
-Require-Bundle: org.apache.xmlrpc;bundle-version="3.0.0",
- org.junit,
- org.eclipse.core.runtime,
- org.eclipse.jface.text,
- org.eclipse.ui,
- org.eclipse.ui.workbench.texteditor,
- org.eclipse.mylyn.context.core,
- org.eclipse.mylyn.context.tests,
- org.eclipse.mylyn.tasks.ui,
- org.eclipse.mylyn.tasks.core,
- org.eclipse.mylyn.trac.ui,
- org.eclipse.mylyn.trac.core,
- org.eclipse.mylyn.commons.net
-Export-Package: org.eclipse.mylyn.internal.trac.ui;x-internal:=true,
- org.eclipse.mylyn.trac.tests;x-internal:=true,
- org.eclipse.mylyn.trac.tests.support;x-internal:=true
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Bundle-Vendor: Eclipse.org
diff --git a/org.eclipse.mylyn.trac.tests/about.html b/org.eclipse.mylyn.trac.tests/about.html
deleted file mode 100644
index 0dd939c09..000000000
--- a/org.eclipse.mylyn.trac.tests/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 7, 2007</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/org.eclipse.mylyn.trac.tests/build.properties b/org.eclipse.mylyn.trac.tests/build.properties
deleted file mode 100644
index 6af7dc4a4..000000000
--- a/org.eclipse.mylyn.trac.tests/build.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2006 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
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html
-src.includes = META-INF/
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtilTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtilTest.java
deleted file mode 100644
index 2e0d0ad4e..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtilTest.java
+++ /dev/null
@@ -1,203 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.trac.ui;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jface.text.Region;
-import org.eclipse.jface.text.hyperlink.IHyperlink;
-import org.eclipse.mylyn.internal.trac.core.TracCorePlugin;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TaskHyperlink;
-
-public class TracHyperlinkUtilTest extends TestCase {
-
- private TaskRepository repository;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
-
- repository = new TaskRepository(TracCorePlugin.REPOSITORY_KIND, "http://localhost");
- }
-
- public void testFindHyperlinksComment() {
- IHyperlink[] links = TracHyperlinkUtil.findTracHyperlinks(repository, "comment:ticket:12:34", 0, 0);
- assertNotNull(links);
- assertEquals(1, links.length);
- assertEquals(new Region(0, 20), links[0].getHyperlinkRegion());
- assertEquals("12", ((TaskHyperlink) links[0]).getTaskId());
- }
-
- public void testFindHyperlinksTicket() {
- IHyperlink[] links = TracHyperlinkUtil.findTicketHyperlinks(repository, "#11", 0, 0);
- assertNotNull(links);
- assertEquals(1, links.length);
- assertEquals(new Region(0, 3), links[0].getHyperlinkRegion());
- assertEquals("11", ((TaskHyperlink) links[0]).getTaskId());
-
- links = TracHyperlinkUtil.findTicketHyperlinks(repository, "#11, #234", 6, 0);
- assertNotNull(links);
- assertEquals(1, links.length);
- assertEquals("234", ((TaskHyperlink) links[0]).getTaskId());
-
- links = TracHyperlinkUtil.findTicketHyperlinks(repository, " ticket:123 ", 2, 0);
- assertNotNull(links);
- assertEquals(1, links.length);
- assertEquals(new Region(2, 10), links[0].getHyperlinkRegion());
- assertEquals("123", ((TaskHyperlink) links[0]).getTaskId());
- }
-
- public void testFindHyperlinksReport() {
- IHyperlink[] links = TracHyperlinkUtil.findTracHyperlinks(repository, "report:123", 0, 0);
- assertEquals(1, links.length);
- assertEquals(new Region(0, 10), links[0].getHyperlinkRegion());
- assertEquals("http://localhost/report/123", ((WebHyperlink) links[0]).getURLString());
-
- links = TracHyperlinkUtil.findTracHyperlinks(repository, "{123}", 0, 0);
- assertEquals(1, links.length);
- assertEquals(new Region(0, 5), links[0].getHyperlinkRegion());
- assertEquals("http://localhost/report/123", ((WebHyperlink) links[0]).getURLString());
- }
-
- public void testFindHyperlinksChangeset() {
- IHyperlink[] links = TracHyperlinkUtil.findTracHyperlinks(repository, "r123", 0, 0);
- assertEquals(1, links.length);
- assertEquals(new Region(0, 4), links[0].getHyperlinkRegion());
- assertEquals("http://localhost/changeset/123", ((WebHyperlink) links[0]).getURLString());
-
- links = TracHyperlinkUtil.findTracHyperlinks(repository, "[123]", 0, 0);
- assertEquals(1, links.length);
- assertEquals(new Region(0, 5), links[0].getHyperlinkRegion());
- assertEquals("http://localhost/changeset/123", ((WebHyperlink) links[0]).getURLString());
-
- links = TracHyperlinkUtil.findTracHyperlinks(repository, "changeset:123", 0, 0);
- assertEquals(1, links.length);
- assertEquals(new Region(0, 13), links[0].getHyperlinkRegion());
- assertEquals("http://localhost/changeset/123", ((WebHyperlink) links[0]).getURLString());
-
- links = TracHyperlinkUtil.findTracHyperlinks(repository, "[123/trunk]", 0, 0);
- assertEquals(1, links.length);
- assertEquals(new Region(0, 11), links[0].getHyperlinkRegion());
- assertEquals("http://localhost/changeset/123/trunk", ((WebHyperlink) links[0]).getURLString());
-
- links = TracHyperlinkUtil.findTracHyperlinks(repository, "changeset:123/trunk", 0, 0);
- assertEquals(1, links.length);
- assertEquals(new Region(0, 19), links[0].getHyperlinkRegion());
- assertEquals("http://localhost/changeset/123/trunk", ((WebHyperlink) links[0]).getURLString());
- }
-
- public void testFindHyperlinksRevisionLog() {
- IHyperlink[] links = TracHyperlinkUtil.findTracHyperlinks(repository, "r123:456", 0, 0);
- assertEquals(2, links.length);
- assertEquals("http://localhost/log/?rev=123&stop_rev=456", ((WebHyperlink) links[0]).getURLString());
- assertEquals(new Region(0, 8), links[0].getHyperlinkRegion());
-
- links = TracHyperlinkUtil.findTracHyperlinks(repository, "[123:456]", 0, 0);
- assertEquals(1, links.length);
- assertEquals("http://localhost/log/?rev=123&stop_rev=456", ((WebHyperlink) links[0]).getURLString());
- assertEquals(new Region(0, 9), links[0].getHyperlinkRegion());
-
- links = TracHyperlinkUtil.findTracHyperlinks(repository, "log:@123:456", 0, 0);
- assertEquals(1, links.length);
- assertEquals("http://localhost/log/?rev=123&stop_rev=456", ((WebHyperlink) links[0]).getURLString());
- assertEquals(new Region(0, 12), links[0].getHyperlinkRegion());
-
- links = TracHyperlinkUtil.findTracHyperlinks(repository, "log:trunk@123:456", 0, 0);
- assertEquals(1, links.length);
- assertEquals("http://localhost/log/trunk?rev=123&stop_rev=456", ((WebHyperlink) links[0]).getURLString());
- assertEquals(new Region(0, 17), links[0].getHyperlinkRegion());
- }
-
- public void testFindHyperlinksDiff() {
- IHyperlink[] links = TracHyperlinkUtil.findTracHyperlinks(repository, "diff:@123:456", 0, 0);
- assertNotNull(links);
- assertEquals(1, links.length);
- assertEquals("http://localhost/changeset/?new=456&old=123", ((WebHyperlink) links[0]).getURLString());
-
- links = TracHyperlinkUtil.findTracHyperlinks(repository,
- "diff:trunk/trac@3538//sandbox/vc-refactoring/trac@3539", 0, 0);
- assertNotNull(links);
- assertEquals(1, links.length);
- assertEquals(
- "http://localhost/changeset/?new_path=sandbox%2Fvc-refactoring%2Ftrac&old_path=trunk%2Ftrac&new=3539&old=3538",
- ((WebHyperlink) links[0]).getURLString());
-
- links = TracHyperlinkUtil.findTracHyperlinks(repository,
- "diff:tags/trac-0.9.2/wiki-default//tags/trac-0.9.3/wiki-default", 0, 0);
- assertNotNull(links);
- assertEquals(1, links.length);
- assertEquals(
- "http://localhost/changeset/?new_path=tags%2Ftrac-0.9.3%2Fwiki-default&old_path=tags%2Ftrac-0.9.2%2Fwiki-default",
- ((WebHyperlink) links[0]).getURLString());
- }
-
- public void testFindHyperlinksWiki() {
- IHyperlink[] links = TracHyperlinkUtil.findTracHyperlinks(repository, "[wiki:page]", 1, 0);
- assertNotNull(links);
- assertEquals(1, links.length);
- assertEquals("http://localhost/wiki/page", ((WebHyperlink) links[0]).getURLString());
-
- links = TracHyperlinkUtil.findTracHyperlinks(repository, "wiki:page", 0, 0);
- assertNotNull(links);
- assertEquals(1, links.length);
- assertEquals("http://localhost/wiki/page", ((WebHyperlink) links[0]).getURLString());
-
- links = TracHyperlinkUtil.findTracHyperlinks(repository, "Page", 0, 0);
- assertNull(links);
-
- links = TracHyperlinkUtil.findTracHyperlinks(repository, "ab Page dc", 0, 0);
- assertNull(links);
-
- links = TracHyperlinkUtil.findTracHyperlinks(repository, "paGe", 0, 0);
- assertNull(links);
-
- links = TracHyperlinkUtil.findTracHyperlinks(repository, "WikiPage", 0, 0);
- assertNotNull(links);
- assertEquals(1, links.length);
- assertEquals("http://localhost/wiki/WikiPage", ((WebHyperlink) links[0]).getURLString());
- assertEquals(new Region(0, 8), links[0].getHyperlinkRegion());
-
- }
-
- public void testFindHyperlinksMilestone() {
- IHyperlink[] links = TracHyperlinkUtil.findTracHyperlinks(repository, "milestone:1.0", 1, 0);
- assertNotNull(links);
- assertEquals(1, links.length);
- assertEquals("http://localhost/milestone/1.0", ((WebHyperlink) links[0]).getURLString());
- }
-
- public void testFindHyperlinksAttachment() {
- IHyperlink[] links = TracHyperlinkUtil.findTracHyperlinks(repository, "attachment:ticket:123:foo.bar", 1, 0);
- assertNotNull(links);
- assertEquals("123", ((TaskHyperlink) links[0]).getTaskId());
- }
-
- public void testFindHyperlinksFiles() {
- IHyperlink[] links = TracHyperlinkUtil.findTracHyperlinks(repository, "source:trunk/foo", 1, 0);
- assertNotNull(links);
- assertEquals(1, links.length);
- assertEquals("http://localhost/browser/trunk/foo", ((WebHyperlink) links[0]).getURLString());
-
- links = TracHyperlinkUtil.findTracHyperlinks(repository, "source:trunk/foo@123", 1, 0);
- assertNotNull(links);
- assertEquals(1, links.length);
- assertEquals("http://localhost/browser/trunk/foo?rev=123", ((WebHyperlink) links[0]).getURLString());
-
- links = TracHyperlinkUtil.findTracHyperlinks(repository, "source:trunk/foo@123#L456", 1, 0);
- assertNotNull(links);
- assertEquals(1, links.length);
- assertEquals("http://localhost/browser/trunk/foo?rev=123#L456", ((WebHyperlink) links[0]).getURLString());
-
- links = TracHyperlinkUtil.findTracHyperlinks(repository, "source:/tags/foo_bar-1.1", 1, 0);
- assertNotNull(links);
- assertEquals(1, links.length);
- assertEquals("http://localhost/browser/tags/foo_bar-1.1", ((WebHyperlink) links[0]).getURLString());
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AbstractTracClientRepositoryTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AbstractTracClientRepositoryTest.java
deleted file mode 100644
index c5dd03545..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AbstractTracClientRepositoryTest.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.trac.tests;
-
-import java.net.InetSocketAddress;
-import java.net.Proxy;
-import java.net.Proxy.Type;
-
-import org.eclipse.mylyn.context.tests.support.TestUtil;
-import org.eclipse.mylyn.context.tests.support.TestUtil.Credentials;
-import org.eclipse.mylyn.context.tests.support.TestUtil.PrivilegeLevel;
-import org.eclipse.mylyn.internal.trac.core.ITracClient;
-import org.eclipse.mylyn.internal.trac.core.TracException;
-import org.eclipse.mylyn.internal.trac.core.TracLoginException;
-import org.eclipse.mylyn.internal.trac.core.ITracClient.Version;
-
-/**
- * Test cases for classes that implement {@link ITracClient}.
- *
- * @author Steffen Pingel
- */
-public class AbstractTracClientRepositoryTest extends AbstractTracClientTest {
-
- public AbstractTracClientRepositoryTest(Version version) {
- super(version);
- }
-
- public void testValidate010() throws Exception {
- validate(TracTestConstants.TEST_TRAC_010_URL);
- }
-
- public void testValidate010DigestAuth() throws Exception {
- validate(TracTestConstants.TEST_TRAC_010_DIGEST_AUTH_URL);
- }
-
- public void testValidate011() throws Exception {
- validate(TracTestConstants.TEST_TRAC_011_URL);
- }
-
- public void testValidate010FormAuth() throws Exception {
- validate(TracTestConstants.TEST_TRAC_010_FORM_AUTH_URL);
- }
-
- protected void validate(String url) throws Exception {
- Credentials credentials = TestUtil.readCredentials(PrivilegeLevel.USER);
-
- // standard connect
- connect(url);
- repository.validate(callback);
-
- // invalid url
- connect("http://non.existant/repository");
- try {
- repository.validate(callback);
- fail("Expected TracException");
- } catch (TracException e) {
- }
-
- // invalid password
- connect(url, credentials.username, "wrongpassword");
- try {
- repository.validate(callback);
- fail("Expected TracLoginException");
- } catch (TracLoginException e) {
- }
-
- // invalid username
- connect(url, "wrongusername", credentials.password);
- try {
- repository.validate(callback);
- fail("Expected TracLoginException");
- } catch (TracLoginException e) {
- }
- }
-
- public void testProxy() throws Exception {
- connect(TracTestConstants.TEST_TRAC_010_URL, "", "", new Proxy(Type.HTTP, new InetSocketAddress(
- "invalidhostname", 8080)));
- try {
- repository.validate(callback);
- fail("Expected IOException");
- } catch (TracException e) {
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AbstractTracClientSearchTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AbstractTracClientSearchTest.java
deleted file mode 100644
index b9f0dc997..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AbstractTracClientSearchTest.java
+++ /dev/null
@@ -1,249 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.trac.tests;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.mylyn.internal.trac.core.ITracClient;
-import org.eclipse.mylyn.internal.trac.core.TracException;
-import org.eclipse.mylyn.internal.trac.core.ITracClient.Version;
-import org.eclipse.mylyn.internal.trac.core.model.TracSearch;
-import org.eclipse.mylyn.internal.trac.core.model.TracTicket;
-import org.eclipse.mylyn.internal.trac.core.model.TracTicket.Key;
-import org.eclipse.mylyn.trac.tests.support.TestFixture;
-import org.eclipse.mylyn.trac.tests.support.XmlRpcServer.TestData;
-import org.eclipse.mylyn.trac.tests.support.XmlRpcServer.Ticket;
-
-/**
- * Test cases that validate search results for classes that implement {@link ITracClient}.
- *
- * @author Steffen Pingel
- */
-public abstract class AbstractTracClientSearchTest extends AbstractTracClientTest {
-
- protected List<Ticket> tickets;
-
- private TestData data;
-
- public AbstractTracClientSearchTest(Version version) {
- super(version);
- }
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
-
- data = TestFixture.init010();
- tickets = data.tickets;
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
-
- // TestFixture.cleanupRepository1();
- }
-
- protected void assertTicketEquals(Ticket ticket, TracTicket tracTicket) throws Exception {
- assertTrue(tracTicket.isValid());
-
- Map<?, ?> expectedValues = ticket.getValues();
- Map<String, String> values = tracTicket.getValues();
- for (String key : values.keySet()) {
- assertEquals("Values for key '" + key + "' did not match", expectedValues.get(key), values.get(key));
- }
- }
-
- public void testGetTicket096() throws Exception {
- if (version == Version.XML_RPC) {
- return;
- }
-
- connect096();
- getTicket();
- }
-
- public void testGetTicket010() throws Exception {
- connect010();
- getTicket();
- }
-
- public void testGetTicket011() throws Exception {
- if (version == Version.TRAC_0_9) {
- // XXX web mode is broken for Trac 0.11: need to fix bug 175211
- return;
- }
-
- connect011();
- getTicket();
- }
-
- private void getTicket() throws Exception {
- TracTicket ticket = repository.getTicket(tickets.get(0).getId(), null);
- assertTicketEquals(tickets.get(0), ticket);
-
- ticket = repository.getTicket(tickets.get(1).getId(), null);
- assertTicketEquals(tickets.get(1), ticket);
- }
-
- public void testGetTicketInvalidId096() throws Exception {
- if (version == Version.XML_RPC) {
- return;
- }
-
- connect096();
- getTicketInvalidId();
- }
-
- public void testGetTicketInvalidId010() throws Exception {
- connect010();
- getTicketInvalidId();
- }
-
- public void testGetTicketInvalidId011() throws Exception {
- connect011();
- getTicketInvalidId();
- }
-
- private void getTicketInvalidId() throws Exception {
- try {
- repository.getTicket(Integer.MAX_VALUE, null);
- fail("Expected TracException");
- } catch (TracException e) {
- }
- }
-
- public void testGetTicketUmlaute010() throws Exception {
- connect010();
- getTicketUmlaute();
- }
-
- public void testGetTicketUmlaute011() throws Exception {
- if (version == Version.TRAC_0_9) {
- // XXX need to fix bug 175211
- return;
- }
-
- connect011();
- getTicketUmlaute();
- }
-
- private void getTicketUmlaute() throws Exception {
- TracTicket ticket = repository.getTicket(data.htmlEntitiesTicketId, null);
- assertEquals("test html entities: \u00E4\u00F6\u00FC", ticket.getValue(Key.SUMMARY));
- if (version == Version.XML_RPC) {
- assertEquals("\u00C4\u00D6\u00DC\n\nmulti\nline\n\n'''bold'''\n", ticket.getValue(Key.DESCRIPTION));
- } else {
- assertEquals(null, ticket.getValue(Key.DESCRIPTION));
- }
- }
-
- public void testSearchAll010() throws Exception {
- connect010();
- searchAll();
- }
-
- public void testSearchAll011() throws Exception {
- connect011();
- searchAll();
- }
-
- private void searchAll() throws Exception {
- TracSearch search = new TracSearch();
- List<TracTicket> result = new ArrayList<TracTicket>();
- repository.search(search, result, null);
- //assertEquals(tickets.size(), result.size());
- assertTrue(result.size() >= tickets.size());
- }
-
- public void testSearchEmpty010() throws Exception {
- connect010();
- searchEmpty();
- }
-
- public void testSearchEmpty011() throws Exception {
- connect011();
- searchEmpty();
- }
-
- private void searchEmpty() throws Exception {
- TracSearch search = new TracSearch();
- search.addFilter("milestone", "does not exist");
- List<TracTicket> result = new ArrayList<TracTicket>();
- repository.search(search, result, null);
- assertEquals(0, result.size());
- }
-
- public void testSearchMilestone1010() throws Exception {
- connect010();
- searchMilestone1();
- }
-
- public void testSearchMilestone1011() throws Exception {
- connect011();
- searchMilestone1();
- }
-
- private void searchMilestone1() throws Exception {
- TracSearch search = new TracSearch();
- search.addFilter("milestone", "milestone1");
- List<TracTicket> result = new ArrayList<TracTicket>();
- repository.search(search, result, null);
- assertEquals(1, result.size());
- assertTicketEquals(tickets.get(0), result.get(0));
- }
-
- public void testSearchMilestone2010() throws Exception {
- connect010();
- searchMilestone2();
- }
-
- public void testSearchMilestone2011() throws Exception {
- connect011();
- searchMilestone2();
- }
-
- private void searchMilestone2() throws Exception {
- TracSearch search = new TracSearch();
- search.addFilter("milestone", "milestone1");
- search.addFilter("milestone", "milestone2");
- search.setOrderBy("id");
- List<TracTicket> result = new ArrayList<TracTicket>();
- repository.search(search, result, null);
- assertEquals(3, result.size());
- assertTicketEquals(tickets.get(0), result.get(0));
- assertTicketEquals(tickets.get(1), result.get(1));
- assertTicketEquals(tickets.get(2), result.get(2));
- }
-
- public void testSearchExactMatch010() throws Exception {
- connect010();
- searchExactMatch();
- }
-
- public void testSearchExactMatch011() throws Exception {
- connect011();
- searchExactMatch();
- }
-
- private void searchExactMatch() throws Exception {
- TracSearch search = new TracSearch();
- search.addFilter("milestone", "milestone1");
- search.addFilter("summary", "summary1");
- List<TracTicket> result = new ArrayList<TracTicket>();
- repository.search(search, result, null);
- assertEquals(1, result.size());
- assertTicketEquals(tickets.get(0), result.get(0));
- assertEquals("milestone1", result.get(0).getValue(Key.MILESTONE));
- assertEquals("summary1", result.get(0).getValue(Key.SUMMARY));
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AbstractTracClientTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AbstractTracClientTest.java
deleted file mode 100644
index 79ee5a305..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AbstractTracClientTest.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.trac.tests;
-
-import java.net.Proxy;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.mylyn.commons.net.IProxyProvider;
-import org.eclipse.mylyn.commons.net.WebLocation;
-import org.eclipse.mylyn.context.tests.support.TestUtil;
-import org.eclipse.mylyn.context.tests.support.TestUtil.Credentials;
-import org.eclipse.mylyn.context.tests.support.TestUtil.PrivilegeLevel;
-import org.eclipse.mylyn.internal.trac.core.ITracClient;
-import org.eclipse.mylyn.internal.trac.core.TracClientFactory;
-import org.eclipse.mylyn.internal.trac.core.ITracClient.Version;
-
-/**
- * Provides a base implementation for test cases that access trac repositories.
- *
- * @author Steffen Pingel
- */
-public abstract class AbstractTracClientTest extends TestCase {
-
- public String repositoryUrl;
-
- public ITracClient repository;
-
- public String username;
-
- public String password;
-
- public Version version;
-
- private final PrivilegeLevel level;
-
- final IProgressMonitor callback = new NullProgressMonitor();
-
- public AbstractTracClientTest(Version version, PrivilegeLevel level) {
- this.version = version;
- this.level = level;
- }
-
- public AbstractTracClientTest(Version version) {
- this(version, PrivilegeLevel.USER);
- }
-
- public AbstractTracClientTest() {
- this(null, PrivilegeLevel.USER);
- }
-
- public ITracClient connect096() throws Exception {
- return connect(TracTestConstants.TEST_TRAC_096_URL);
- }
-
- public ITracClient connect010() throws Exception {
- return connect(TracTestConstants.TEST_TRAC_010_URL);
- }
-
- public ITracClient connect010DigestAuth() throws Exception {
- return connect(TracTestConstants.TEST_TRAC_010_DIGEST_AUTH_URL);
- }
-
- public ITracClient connect011() throws Exception {
- return connect(TracTestConstants.TEST_TRAC_011_URL);
- }
-
- public ITracClient connect(String url) throws Exception {
- return connect(url, Proxy.NO_PROXY);
- }
-
- public ITracClient connect(String url, Proxy proxy) throws Exception {
- Credentials credentials = TestUtil.readCredentials(level);
- return connect(url, credentials.username, credentials.password, proxy);
- }
-
- public ITracClient connect(String url, String username, String password) throws Exception {
- return connect(url, username, password, Proxy.NO_PROXY);
- }
-
- public ITracClient connect(String url, String username, String password, Proxy proxy) throws Exception {
- return connect(url, username, password, proxy, version);
- }
-
- public ITracClient connect(String url, String username, String password, final Proxy proxy, Version version)
- throws Exception {
- this.repositoryUrl = url;
- this.username = username;
- this.password = password;
-
- WebLocation location = new WebLocation(url, username, password, new IProxyProvider() {
- public Proxy getProxyForHost(String host, String proxyType) {
- return proxy;
- }
- });
- this.repository = TracClientFactory.createClient(location, version);
-
- return this.repository;
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracTests.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracTests.java
deleted file mode 100644
index e4e7e1db2..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracTests.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.trac.tests;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.mylyn.internal.trac.ui.TracHyperlinkUtilTest;
-
-/**
- * @author Mik Kersten
- * @author Steffen Pingel
- */
-public class AllTracTests {
-
- public static Test suite() {
- TestSuite suite = new TestSuite("Test for org.eclipse.mylyn.trac.tests");
- // $JUnit-BEGIN$
- suite.addTestSuite(TracSearchTest.class);
- suite.addTestSuite(TracTicketTest.class);
- suite.addTestSuite(TracXmlRpcClientTest.class);
- suite.addTestSuite(TracXmlRpcClientSearchTest.class);
- suite.addTestSuite(TracWebClientTest.class);
- suite.addTestSuite(TracWebClientSearchTest.class);
- suite.addTestSuite(TracClientFactoryTest.class);
- suite.addTestSuite(TracRepositoryConnectorTest.class);
- suite.addTestSuite(TracQueryTest.class);
- suite.addTestSuite(TracRepositoryQueryTest.class);
- suite.addTestSuite(TracClientManagerTest.class);
- suite.addTestSuite(TracAttachmentHandlerTest.class);
- suite.addTestSuite(RepositorySearchQueryTest.class);
- suite.addTestSuite(TracTaskDataHandlerTest.class);
- suite.addTestSuite(TracTaskTest.class);
- suite.addTestSuite(TracRepositorySettingsPageTest.class);
- suite.addTestSuite(TracClientProxyTest.class);
- suite.addTestSuite(TracHyperlinkUtilTest.class);
- // $JUnit-END$
- return suite;
- }
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/MockAttachment.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/MockAttachment.java
deleted file mode 100644
index cd44fec39..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/MockAttachment.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.trac.tests;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-
-import org.eclipse.mylyn.internal.tasks.core.deprecated.ITaskAttachment;
-
-public class MockAttachment implements ITaskAttachment {
-
- private final byte[] data;
-
- public MockAttachment(byte[] data) {
- this.data = data;
- }
-
- public InputStream createInputStream() throws IOException {
- return new ByteArrayInputStream(data);
- }
-
- public String getContentType() {
- return "application/binary";
- }
-
- public String getDescription() {
- return "description";
- }
-
- public String getFilename() {
- return "filename.txt";
- }
-
- public long getLength() {
- return data.length;
- }
-
- public boolean isPatch() {
- return false;
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/RepositorySearchQueryTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/RepositorySearchQueryTest.java
deleted file mode 100644
index 1d7acea74..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/RepositorySearchQueryTest.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.trac.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.mylyn.commons.net.AuthenticationCredentials;
-import org.eclipse.mylyn.commons.net.AuthenticationType;
-import org.eclipse.mylyn.context.tests.support.TestUtil;
-import org.eclipse.mylyn.context.tests.support.TestUtil.Credentials;
-import org.eclipse.mylyn.context.tests.support.TestUtil.PrivilegeLevel;
-import org.eclipse.mylyn.internal.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.search.SearchHitCollector;
-import org.eclipse.mylyn.internal.trac.core.ITracClient;
-import org.eclipse.mylyn.internal.trac.core.TracCorePlugin;
-import org.eclipse.mylyn.internal.trac.core.TracRepositoryQuery;
-import org.eclipse.mylyn.internal.trac.core.ITracClient.Version;
-import org.eclipse.mylyn.internal.trac.core.model.TracSearch;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.trac.tests.support.TestFixture;
-import org.eclipse.mylyn.trac.tests.support.XmlRpcServer.TestData;
-
-/**
- * @author Steffen Pingel
- */
-public class RepositorySearchQueryTest extends TestCase {
-
- private TestData data;
-
- private TaskRepositoryManager manager;
-
-// private TracRepositoryConnector connector;
-
- private TaskRepository repository;
-
- public RepositorySearchQueryTest() {
- }
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
-
- data = TestFixture.init010();
- manager = TasksUiPlugin.getRepositoryManager();
- manager.clearRepositories(TasksUiPlugin.getDefault().getRepositoriesFilePath());
-
-// connector = (TracRepositoryConnector) manager.getRepositoryConnector(TracUiPlugin.REPOSITORY_KIND);
- }
-
- protected void init(String url, Version version) {
- Credentials credentials = TestUtil.readCredentials(PrivilegeLevel.USER);
-
- repository = new TaskRepository(TracCorePlugin.REPOSITORY_KIND, url);
- repository.setCredentials(AuthenticationType.REPOSITORY, new AuthenticationCredentials(credentials.username,
- credentials.password), false);
- repository.setTimeZoneId(ITracClient.TIME_ZONE);
- repository.setCharacterEncoding(ITracClient.CHARSET);
- repository.setVersion(version.name());
-
- manager.addRepository(repository);
- }
-
- public void testSearch() {
- init(TracTestConstants.TEST_TRAC_096_URL, Version.TRAC_0_9);
-
- TracSearch search = new TracSearch();
- String queryUrl = repository.getRepositoryUrl() + ITracClient.QUERY_URL + search.toUrl();
- TracRepositoryQuery query = new TracRepositoryQuery(repository.getRepositoryUrl(), queryUrl, "description");
- SearchHitCollector collector = new SearchHitCollector(TasksUiPlugin.getTaskList(),
- repository, query);
-
- collector.run(new NullProgressMonitor());
- for (ITask task : collector.getTasks()) {
- assertEquals(TracTestConstants.TEST_TRAC_096_URL, task.getRepositoryUrl());
- }
- assertEquals(data.tickets.size(), collector.getTasks().size());
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TestProxy.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TestProxy.java
deleted file mode 100644
index 368262191..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TestProxy.java
+++ /dev/null
@@ -1,234 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.trac.tests;
-
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.EOFException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.InterruptedIOException;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.net.ServerSocket;
-import java.net.Socket;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.StringTokenizer;
-
-public class TestProxy implements Runnable {
-
- public static final String NOT_FOUND = "HTTP/1.1 404 Not Found";
-
- private int listenPort;
-
- private Message request;
-
- private Message response;
-
- private Thread runner;
-
- private IOException exception;
-
- private volatile boolean stopped = false;
-
- public TestProxy(int listenPort) {
- this.listenPort = listenPort;
- }
-
- public TestProxy() {
- }
-
- public synchronized int getListenPort() throws InterruptedException {
- while (listenPort == 0) {
- wait();
- }
- return listenPort;
- }
-
- public void start() {
- runner = new Thread(this, "TestProxy :" + listenPort);
- runner.start();
- }
-
- public int startAndWait() throws InterruptedException {
- start();
- int port = getListenPort();
- // wait for socket to enter accept call
- Thread.sleep(100);
- return port;
- }
-
- public void run() {
- ServerSocket serverSocket = null;
- try {
- serverSocket = new ServerSocket(listenPort);
- synchronized (this) {
- listenPort = serverSocket.getLocalPort();
- notifyAll();
- }
- while (!stopped) {
- Socket socket = serverSocket.accept();
- try {
- Message request = readMessage(socket.getInputStream());
- setRequest(request);
-
- Message response = waitForResponse();
- writeMessage(response, socket.getOutputStream());
- } finally {
- try {
- socket.close();
- } catch (IOException e1) {
- }
- }
- }
- } catch (InterruptedIOException e) {
- } catch (IOException e) {
- setException(e);
- } catch (InterruptedException e) {
- } finally {
- if (serverSocket != null) {
- try {
- serverSocket.close();
- } catch (IOException e) {
- }
- }
- }
-
- }
-
- private void writeMessage(Message message, OutputStream out) throws IOException {
- BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(out));
- writer.write(message.toString());
- }
-
- private synchronized void setException(IOException exception) {
- this.exception = exception;
- notifyAll();
- }
-
- public synchronized void checkForException() throws IOException {
- if (exception != null) {
- throw exception;
- }
- }
-
- private Message readMessage(InputStream in) throws IOException {
- BufferedReader reader = new BufferedReader(new InputStreamReader(in));
- Message message = null;
- String line;
- while ((line = reader.readLine()) != null) {
- if (line.length() == 0) {
- if (message == null) {
- throw new IOException("Incomplete message");
- }
- return message;
- }
-
- if (message == null) {
- message = new Message(line);
- } else {
- StringTokenizer t = new StringTokenizer(line, ":");
- message.headers.put(t.nextToken(), t.nextToken().trim());
- }
- }
- throw new EOFException();
- }
-
- public void stop() {
- stopped = true;
- runner.interrupt();
- try {
- runner.join(500);
- } catch (InterruptedException e) {
- }
- }
-
- public Message getRequest() {
- return request;
- }
-
- public synchronized Message waitForRequest() throws InterruptedException {
- while (request == null) {
- wait();
- }
- return request;
- }
-
- public synchronized Message waitForResponse() throws InterruptedException {
- while (response == null) {
- wait();
- }
- return response;
- }
-
- public synchronized void setResponse(Message response) {
- this.response = response;
- notifyAll();
- }
-
- public synchronized void setResponse(String response) {
- this.response = new Message(response);
- notifyAll();
- }
-
- public synchronized void setRequest(Message request) {
- this.request = request;
- notifyAll();
- }
-
- public static class Message {
-
- public Message(String request) {
- this.request = request;
- }
-
- public String request;
-
- public Map<String, String> headers = new HashMap<String, String>();
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append(request);
- sb.append("\n");
- if (headers != null) {
- for (String key : headers.keySet()) {
- sb.append(key + ": " + headers.get(key));
- sb.append("\n");
- }
- }
- sb.append("\n");
- return sb.toString();
- }
-
- public String getMethod() {
- int i = request.indexOf(" ");
- return (i != -1) ? request.substring(0, i) : request;
- }
-
- }
-
- public static void main(String[] args) {
- TestProxy proxy = new TestProxy(8080);
- proxy.start();
- try {
- proxy.setResponse(new Message("404 / HTTP 1.1"));
- try {
- System.out.println(proxy.waitForRequest());
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- } finally {
- proxy.stop();
- }
-
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracAttachmentHandlerTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracAttachmentHandlerTest.java
deleted file mode 100644
index ed97ccc54..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracAttachmentHandlerTest.java
+++ /dev/null
@@ -1,206 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.trac.tests;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.mylyn.commons.net.AuthenticationCredentials;
-import org.eclipse.mylyn.commons.net.AuthenticationType;
-import org.eclipse.mylyn.context.tests.support.TestUtil;
-import org.eclipse.mylyn.context.tests.support.TestUtil.Credentials;
-import org.eclipse.mylyn.context.tests.support.TestUtil.PrivilegeLevel;
-import org.eclipse.mylyn.internal.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractAttachmentHandler;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.FileAttachment;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.internal.trac.core.ITracClient;
-import org.eclipse.mylyn.internal.trac.core.TracCorePlugin;
-import org.eclipse.mylyn.internal.trac.core.TracRepositoryConnector;
-import org.eclipse.mylyn.internal.trac.core.TracTask;
-import org.eclipse.mylyn.internal.trac.core.ITracClient.Version;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.trac.tests.support.TestFixture;
-import org.eclipse.mylyn.trac.tests.support.XmlRpcServer.TestData;
-
-/**
- * @author Steffen Pingel
- */
-public class TracAttachmentHandlerTest extends TestCase {
-
- private TaskRepository repository;
-
- private TaskRepositoryManager manager;
-
- private TracRepositoryConnector connector;
-
- private AbstractAttachmentHandler attachmentHandler;
-
- private TestData data;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
-
- manager = TasksUiPlugin.getRepositoryManager();
- manager.clearRepositories(TasksUiPlugin.getDefault().getRepositoriesFilePath());
- data = TestFixture.init010();
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- protected void init(String url, Version version) {
- String kind = TracCorePlugin.REPOSITORY_KIND;
- Credentials credentials = TestUtil.readCredentials(PrivilegeLevel.USER);
-
- repository = new TaskRepository(kind, url);
- repository.setCredentials(AuthenticationType.REPOSITORY, new AuthenticationCredentials(credentials.username,
- credentials.password), false);
- repository.setTimeZoneId(ITracClient.TIME_ZONE);
- repository.setCharacterEncoding(ITracClient.CHARSET);
- repository.setVersion(version.name());
-
- manager.addRepository(repository);
-
- AbstractRepositoryConnector abstractConnector = manager.getRepositoryConnector(kind);
- connector = (TracRepositoryConnector) abstractConnector;
-
- attachmentHandler = connector.getAttachmentHandler();
- }
-
- public void testDownloadAttachmentXmlRpc010() throws Exception {
- downloadAttachmentXmlRpc(TracTestConstants.TEST_TRAC_010_URL);
- }
-
- public void testDownloadAttachmentXmlRpc011() throws Exception {
- downloadAttachmentXmlRpc(TracTestConstants.TEST_TRAC_011_URL);
- }
-
- private void downloadAttachmentXmlRpc(String url) throws Exception {
- init(url, Version.XML_RPC);
- TracTask task = (TracTask) TasksUiInternal.createTask(repository, data.attachmentTicketId + "",
- new NullProgressMonitor());
- TasksUiInternal.synchronizeTask(connector, task, true, null);
- RepositoryTaskData taskData = TasksUiPlugin.getTaskDataStorageManager().getNewTaskData(task.getRepositoryUrl(),
- task.getTaskId());
-
- assertTrue(taskData.getAttachments().size() > 0);
- File file = File.createTempFile("attachment", null);
- file.deleteOnExit();
- attachmentHandler.downloadAttachment(repository, taskData.getAttachments().get(0), new FileOutputStream(file),
- new NullProgressMonitor());
-
- byte[] result = new byte[6];
- InputStream in = new FileInputStream(file);
- try {
- in.read(result);
- assertEquals("Mylar\n", new String(result));
- assertEquals(-1, in.read());
- } finally {
- in.close();
- }
- }
-
- public void testGetAttachmentDataXmlRpc010() throws Exception {
- getAttachmentDataXmlRpc(TracTestConstants.TEST_TRAC_010_URL);
- }
-
- public void testGetAttachmentDataXmlRpc011() throws Exception {
- getAttachmentDataXmlRpc(TracTestConstants.TEST_TRAC_011_URL);
- }
-
- private void getAttachmentDataXmlRpc(String url) throws Exception {
- init(url, Version.XML_RPC);
- TracTask task = (TracTask) TasksUiInternal.createTask(repository, data.attachmentTicketId + "",
- new NullProgressMonitor());
- TasksUiInternal.synchronizeTask(connector, task, true, null);
- RepositoryTaskData taskData = TasksUiPlugin.getTaskDataStorageManager().getNewTaskData(task.getRepositoryUrl(),
- task.getTaskId());
-
- assertTrue(taskData.getAttachments().size() > 0);
- InputStream in = attachmentHandler.getAttachmentAsStream(repository, taskData.getAttachments().get(0),
- new NullProgressMonitor());
- byte[] result = new byte[6];
- try {
- in.read(result);
- } finally {
- in.close();
- }
- assertEquals("Mylar\n", new String(result));
- }
-
- public void testUploadAttachmentXmlRpc010() throws Exception {
- uploadAttachmentXmlRpc(TracTestConstants.TEST_TRAC_010_URL);
- }
-
- public void testUploadAttachmentXmlRpc011() throws Exception {
- uploadAttachmentXmlRpc(TracTestConstants.TEST_TRAC_011_URL);
- }
-
- private void uploadAttachmentXmlRpc(String url) throws Exception {
- init(url, Version.XML_RPC);
- TracTask task = (TracTask) TasksUiInternal.createTask(repository, data.attachmentTicketId + "",
- new NullProgressMonitor());
- File file = File.createTempFile("attachment", null);
- file.deleteOnExit();
- OutputStream out = new FileOutputStream(file);
- try {
- out.write("Mylar".getBytes());
- } finally {
- out.close();
- }
- FileAttachment attachment = new FileAttachment(file);
- attachment.setDescription("");
- attachmentHandler.uploadAttachment(repository, task, attachment, "comment", new NullProgressMonitor());
-
- ITracClient client = connector.getClientManager().getTracClient(repository);
- InputStream in = client.getAttachmentData(data.attachmentTicketId, file.getName(), null);
- byte[] result = new byte[5];
- in.read(result);
- assertEquals("Mylar", new String(result));
- }
-
- public void testCanUploadAttachmentXmlRpc() throws CoreException {
- init(TracTestConstants.TEST_TRAC_010_URL, Version.XML_RPC);
- TracTask task = (TracTask) TasksUiInternal.createTask(repository, data.attachmentTicketId + "", null);
- assertTrue(attachmentHandler.canUploadAttachment(repository, task));
- }
-
- public void testCanUploadAttachmentWeb() throws CoreException {
- init(TracTestConstants.TEST_TRAC_010_URL, Version.TRAC_0_9);
- TracTask task = (TracTask) TasksUiInternal.createTask(repository, data.attachmentTicketId + "", null);
- assertFalse(attachmentHandler.canUploadAttachment(repository, task));
- }
-
- public void testCanDownloadAttachmentXmlRpc() throws Exception {
- init(TracTestConstants.TEST_TRAC_010_URL, Version.XML_RPC);
- TracTask task = (TracTask) TasksUiInternal.createTask(repository, data.attachmentTicketId + "", null);
- assertTrue(attachmentHandler.canDownloadAttachment(repository, task));
- }
-
- public void testCanDownloadAttachmentWeb() throws Exception {
- init(TracTestConstants.TEST_TRAC_010_URL, Version.TRAC_0_9);
- TracTask task = (TracTask) TasksUiInternal.createTask(repository, data.attachmentTicketId + "", null);
- assertFalse(attachmentHandler.canDownloadAttachment(repository, task));
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientFactoryTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientFactoryTest.java
deleted file mode 100644
index b5e913b48..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientFactoryTest.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.trac.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.commons.net.WebLocation;
-import org.eclipse.mylyn.context.tests.support.TestUtil;
-import org.eclipse.mylyn.context.tests.support.TestUtil.Credentials;
-import org.eclipse.mylyn.context.tests.support.TestUtil.PrivilegeLevel;
-import org.eclipse.mylyn.internal.trac.core.ITracClient;
-import org.eclipse.mylyn.internal.trac.core.TracClientFactory;
-import org.eclipse.mylyn.internal.trac.core.TracException;
-import org.eclipse.mylyn.internal.trac.core.TracLoginException;
-import org.eclipse.mylyn.internal.trac.core.TracWebClient;
-import org.eclipse.mylyn.internal.trac.core.TracXmlRpcClient;
-import org.eclipse.mylyn.internal.trac.core.ITracClient.Version;
-
-/**
- * @author Steffen Pingel
- */
-public class TracClientFactoryTest extends TestCase {
-
- public void testCreateClient() throws Exception {
- WebLocation location = new WebLocation(TracTestConstants.TEST_TRAC_010_URL, "user", "password");
- ITracClient client = TracClientFactory.createClient(location, Version.TRAC_0_9);
- assertTrue(client instanceof TracWebClient);
-
- location = new WebLocation(TracTestConstants.TEST_TRAC_010_SSL_URL, "user", "password");
- client = TracClientFactory.createClient(location, Version.TRAC_0_9);
- assertTrue(client instanceof TracWebClient);
-
- location = new WebLocation(TracTestConstants.TEST_TRAC_010_URL, "user", "password");
- client = TracClientFactory.createClient(location, Version.XML_RPC);
- assertTrue(client instanceof TracXmlRpcClient);
-
- location = new WebLocation(TracTestConstants.TEST_TRAC_010_SSL_URL, "user", "password");
- client = TracClientFactory.createClient(location, Version.XML_RPC);
- assertTrue(client instanceof TracXmlRpcClient);
- }
-
- public void testCreateClientNull() throws Exception {
- try {
- WebLocation location = new WebLocation(TracTestConstants.TEST_TRAC_010_URL, "user", "password");
- TracClientFactory.createClient(location, null);
- fail("Expected Exception");
- } catch (Exception e) {
- }
- }
-
- public void testProbeClient096() throws Exception {
- probeClient(TracTestConstants.TEST_TRAC_096_URL, false);
- }
-
- public void testProbeClient010() throws Exception {
- probeClient(TracTestConstants.TEST_TRAC_010_URL, true);
- }
-
- public void testProbeClient010DigestAuth() throws Exception {
- probeClient(TracTestConstants.TEST_TRAC_010_DIGEST_AUTH_URL, true);
- }
-
- protected void probeClient(String url, boolean xmlrpcInstalled) throws Exception {
- Credentials credentials = TestUtil.readCredentials(PrivilegeLevel.USER);
- WebLocation location = new WebLocation(url, credentials.username, credentials.password);
- Version version = TracClientFactory.probeClient(location);
- if (xmlrpcInstalled) {
- assertEquals(Version.XML_RPC, version);
- } else {
- assertEquals(Version.TRAC_0_9, version);
- }
-
- location = new WebLocation(url, "", "");
- version = TracClientFactory.probeClient(location);
- assertEquals(Version.TRAC_0_9, version);
-
- try {
- location = new WebLocation(url, "invaliduser", "password");
- version = TracClientFactory.probeClient(location);
- fail("Expected TracLoginException, got " + version);
- } catch (TracLoginException e) {
- }
-
- try {
- location = new WebLocation(url + "/nonexistant", "", "");
- version = TracClientFactory.probeClient(location);
- fail("Expected TracException, got " + version);
- } catch (TracException e) {
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientManagerTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientManagerTest.java
deleted file mode 100644
index 77641ec60..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientManagerTest.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.trac.tests;
-
-import java.io.File;
-import java.util.Arrays;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.mylyn.commons.net.AuthenticationType;
-import org.eclipse.mylyn.internal.trac.core.ITracClient;
-import org.eclipse.mylyn.internal.trac.core.TracClientManager;
-import org.eclipse.mylyn.internal.trac.core.TracCorePlugin;
-import org.eclipse.mylyn.internal.trac.core.ITracClient.Version;
-import org.eclipse.mylyn.internal.trac.core.model.TracMilestone;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.TaskRepositoryLocationFactory;
-
-/**
- * @author Steffen Pingel
- */
-public class TracClientManagerTest extends TestCase {
-
- public void testNullCache() throws Exception {
- TaskRepository taskRepository = new TaskRepository(TracCorePlugin.REPOSITORY_KIND,
- TracTestConstants.TEST_TRAC_096_URL);
- taskRepository.setVersion(Version.TRAC_0_9.name());
-
- TracClientManager manager = new TracClientManager(null, new TaskRepositoryLocationFactory());
- ITracClient client = manager.getTracClient(taskRepository);
- assertNull(client.getMilestones());
-
- manager.writeCache();
- assertNull(client.getMilestones());
- }
-
- public void testReadCache() throws Exception {
- TaskRepository taskRepository = new TaskRepository(TracCorePlugin.REPOSITORY_KIND,
- TracTestConstants.TEST_TRAC_096_URL);
- taskRepository.setVersion(Version.TRAC_0_9.name());
-
- File file = File.createTempFile("mylyn", null);
- file.deleteOnExit();
-
- TracClientManager manager = new TracClientManager(file, new TaskRepositoryLocationFactory());
- ITracClient client = manager.getTracClient(taskRepository);
- assertNull(client.getMilestones());
- }
-
- public void testWriteCache() throws Exception {
- TaskRepository taskRepository = new TaskRepository(TracCorePlugin.REPOSITORY_KIND,
- TracTestConstants.TEST_TRAC_096_URL);
- taskRepository.setVersion(Version.TRAC_0_9.name());
- taskRepository.setCredentials(AuthenticationType.REPOSITORY, null, false);
-
- File file = File.createTempFile("mylyn", null);
- file.deleteOnExit();
-
- TracClientManager manager = new TracClientManager(file, new TaskRepositoryLocationFactory());
- ITracClient client = manager.getTracClient(taskRepository);
- assertNull(client.getMilestones());
-
- client.updateAttributes(new NullProgressMonitor(), false);
- assertTrue(client.getMilestones().length > 0);
- TracMilestone[] milestones = client.getMilestones();
-
- manager.writeCache();
- manager = new TracClientManager(file, new TaskRepositoryLocationFactory());
- assertEquals(Arrays.asList(milestones), Arrays.asList(client.getMilestones()));
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientProxyTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientProxyTest.java
deleted file mode 100644
index f8451317d..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientProxyTest.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.trac.tests;
-
-import java.net.InetSocketAddress;
-import java.net.Proxy;
-import java.net.Proxy.Type;
-
-import org.eclipse.mylyn.internal.trac.core.ITracClient;
-import org.eclipse.mylyn.internal.trac.core.TracException;
-import org.eclipse.mylyn.internal.trac.core.ITracClient.Version;
-
-public class TracClientProxyTest extends AbstractTracClientTest {
-
- private TestProxy testProxy;
-
- private Proxy proxy;
-
- private int proxyPort;
-
- public TracClientProxyTest() {
- }
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
-
- testProxy = new TestProxy();
- proxyPort = testProxy.startAndWait();
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
-
- testProxy.stop();
- }
-
- public void testConnectProxyWeb() throws Exception {
- version = Version.TRAC_0_9;
- connectProxy(TracTestConstants.TEST_TRAC_010_URL, "GET");
- }
-
- public void testConnectProxyXmlRpc() throws Exception {
- version = Version.XML_RPC;
- connectProxy(TracTestConstants.TEST_TRAC_010_URL, "POST");
- }
-
- public void testConnectProxySslWeb() throws Exception {
- version = Version.TRAC_0_9;
- connectProxy(TracTestConstants.TEST_TRAC_010_SSL_URL, "CONNECT");
- }
-
- public void testConnectProxySslXmlRpc() throws Exception {
- version = Version.XML_RPC;
- connectProxy(TracTestConstants.TEST_TRAC_010_SSL_URL, "CONNECT");
- }
-
- private void connectProxy(String url, String expectedMethod) throws Exception {
- testProxy.setResponse(TestProxy.NOT_FOUND);
- proxy = new Proxy(Type.HTTP, new InetSocketAddress("localhost", proxyPort));
- ITracClient client = connect(url, proxy);
- try {
- client.validate(callback);
- } catch (TracException e) {
- }
-
- assertEquals(expectedMethod, testProxy.getRequest().getMethod());
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracQueryTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracQueryTest.java
deleted file mode 100644
index 92a188f1d..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracQueryTest.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.trac.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.internal.trac.core.ITracClient;
-import org.eclipse.mylyn.internal.trac.core.TracRepositoryQuery;
-import org.eclipse.mylyn.internal.trac.core.model.TracSearch;
-
-/**
- * @author Steffen Pingel
- */
-public class TracQueryTest extends TestCase {
-
- private TracRepositoryQuery createQuery(String parameter) {
- // FIXME: remove this external depencency
- String url = "http://oss.steffenpingel.de/mylar-trac-connector";
- return new TracRepositoryQuery(url, url + ITracClient.QUERY_URL + parameter, "description");
- }
-
- public void testGetTracSearch() {
- String queryParameter = "&order=priority&status=new&status=assigned&status=reopened&milestone=M1&owner=%7E%C3%A4%C3%B6%C3%BC";
- TracRepositoryQuery query = createQuery(queryParameter);
- TracSearch search = query.getTracSearch();
- assertEquals(queryParameter, search.toUrl());
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryConnectorTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryConnectorTest.java
deleted file mode 100644
index 80f005a1a..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryConnectorTest.java
+++ /dev/null
@@ -1,311 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.trac.tests;
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Comparator;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.mylyn.commons.net.AuthenticationCredentials;
-import org.eclipse.mylyn.commons.net.AuthenticationType;
-import org.eclipse.mylyn.context.tests.support.TestUtil;
-import org.eclipse.mylyn.context.tests.support.TestUtil.Credentials;
-import org.eclipse.mylyn.context.tests.support.TestUtil.PrivilegeLevel;
-import org.eclipse.mylyn.internal.context.core.ContextCorePlugin;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.LegacyTaskDataCollector;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-import org.eclipse.mylyn.internal.tasks.ui.AttachmentUtil;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.EditRepositoryWizard;
-import org.eclipse.mylyn.internal.trac.core.ITracClient;
-import org.eclipse.mylyn.internal.trac.core.TracCorePlugin;
-import org.eclipse.mylyn.internal.trac.core.TracRepositoryConnector;
-import org.eclipse.mylyn.internal.trac.core.TracRepositoryQuery;
-import org.eclipse.mylyn.internal.trac.core.TracTask;
-import org.eclipse.mylyn.internal.trac.core.ITracClient.Version;
-import org.eclipse.mylyn.internal.trac.core.model.TracSearch;
-import org.eclipse.mylyn.internal.trac.core.model.TracVersion;
-import org.eclipse.mylyn.internal.trac.ui.wizard.TracRepositorySettingsPage;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.TaskRepositoryLocationFactory;
-import org.eclipse.mylyn.trac.tests.support.TestFixture;
-import org.eclipse.mylyn.trac.tests.support.XmlRpcServer.TestData;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Steffen Pingel
- */
-public class TracRepositoryConnectorTest extends TestCase {
-
- private TestData data;
-
- private TaskRepository repository;
-
- private TaskRepositoryManager manager;
-
- private TracRepositoryConnector connector;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
-
- TracCorePlugin.getDefault()
- .getConnector()
- .setTaskRepositoryLocationFactory(new TaskRepositoryLocationFactory());
-
- manager = TasksUiPlugin.getRepositoryManager();
- manager.clearRepositories(TasksUiPlugin.getDefault().getRepositoriesFilePath());
-
- data = TestFixture.init010();
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
-
- // TestFixture.cleanupRepository1();
- }
-
- protected void init(String url, Version version) {
- String kind = TracCorePlugin.REPOSITORY_KIND;
- Credentials credentials = TestUtil.readCredentials(PrivilegeLevel.USER);
-
- repository = new TaskRepository(kind, url);
- repository.setCredentials(AuthenticationType.REPOSITORY, new AuthenticationCredentials(credentials.username,
- credentials.password), false);
- repository.setTimeZoneId(ITracClient.TIME_ZONE);
- repository.setCharacterEncoding(ITracClient.CHARSET);
- repository.setVersion(version.name());
-
- manager.addRepository(repository);
-
- AbstractRepositoryConnector abstractConnector = manager.getRepositoryConnector(kind);
- assertEquals(abstractConnector.getConnectorKind(), kind);
-
- connector = (TracRepositoryConnector) abstractConnector;
- }
-
- public void testGetRepositoryUrlFromTaskUrl() {
- TracRepositoryConnector connector = new TracRepositoryConnector();
- assertEquals("http://host/repo", connector.getRepositoryUrlFromTaskUrl("http://host/repo/ticket/1"));
- assertEquals("http://host", connector.getRepositoryUrlFromTaskUrl("http://host/ticket/2342"));
- assertEquals(null, connector.getRepositoryUrlFromTaskUrl("http://host/repo/2342"));
- assertEquals(null, connector.getRepositoryUrlFromTaskUrl("http://host/repo/ticket-2342"));
- }
-
- public void testCreateTaskFromExistingKeyXmlRpc011() throws CoreException {
- init(TracTestConstants.TEST_TRAC_010_URL, Version.XML_RPC);
- createTaskFromExistingKey();
- }
-
- public void testCreateTaskFromExistingKeyXmlRpc010() throws CoreException {
- init(TracTestConstants.TEST_TRAC_010_URL, Version.XML_RPC);
- createTaskFromExistingKey();
- }
-
- public void testCreateTaskFromExistingKeyTracWeb011() throws CoreException {
- init(TracTestConstants.TEST_TRAC_010_URL, Version.TRAC_0_9);
- createTaskFromExistingKey();
- }
-
- public void testCreateTaskFromExistingKeyTracWeb010() throws CoreException {
- init(TracTestConstants.TEST_TRAC_010_URL, Version.TRAC_0_9);
- createTaskFromExistingKey();
- }
-
- public void testCreateTaskFromExistingKeyTracWeb096() throws CoreException {
- init(TracTestConstants.TEST_TRAC_096_URL, Version.TRAC_0_9);
- createTaskFromExistingKey();
- }
-
- protected void createTaskFromExistingKey() throws CoreException {
- String id = data.tickets.get(0).getId() + "";
- AbstractTask task = (AbstractTask) TasksUiInternal.createTask(repository, id, null);
- assertNotNull(task);
- assertEquals(TracTask.class, task.getClass());
- assertTrue(task.getSummary().contains("summary1"));
- assertEquals(repository.getRepositoryUrl() + ITracClient.TICKET_URL + id, task.getUrl());
-
- try {
- task = (AbstractTask) TasksUiInternal.createTask(repository, "does not exist", null);
- fail("Expected CoreException");
- } catch (CoreException e) {
- }
-
- // No longer parsing as an integer
- // try {
- // task = connector.createTaskFromExistingId(repository,
- // Integer.MAX_VALUE + "");
- // fail("Expected CoreException");
- // } catch (CoreException e) {
- // }
- }
-
- public void testClientManagerChangeTaskRepositorySettings() throws MalformedURLException {
- init(TracTestConstants.TEST_TRAC_010_URL, Version.TRAC_0_9);
- ITracClient client = connector.getClientManager().getTracClient(repository);
- assertEquals(Version.TRAC_0_9, client.getVersion());
-
- EditRepositoryWizard wizard = new EditRepositoryWizard(repository);
- Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- WizardDialog dialog = new WizardDialog(shell, wizard);
- try {
- dialog.create();
-
- ((TracRepositorySettingsPage) wizard.getSettingsPage()).setTracVersion(Version.XML_RPC);
- assertTrue(wizard.performFinish());
-
- client = connector.getClientManager().getTracClient(repository);
- assertEquals(Version.XML_RPC, client.getVersion());
- } finally {
- dialog.close();
- }
- }
-
- public void testPerformQueryXmlRpc011() {
- performQuery(TracTestConstants.TEST_TRAC_011_URL, Version.XML_RPC);
- }
-
- public void testPerformQueryXmlRpc010() {
- performQuery(TracTestConstants.TEST_TRAC_010_URL, Version.XML_RPC);
- }
-
- public void testPerformQueryWeb011() {
- performQuery(TracTestConstants.TEST_TRAC_010_URL, Version.TRAC_0_9);
- }
-
- public void testPerformQueryWeb010() {
- performQuery(TracTestConstants.TEST_TRAC_010_URL, Version.TRAC_0_9);
- }
-
- public void testPerformQueryWeb096() {
- performQuery(TracTestConstants.TEST_TRAC_096_URL, Version.TRAC_0_9);
- }
-
- protected void performQuery(String url, Version version) {
- init(url, version);
-
- TracSearch search = new TracSearch();
- search.addFilter("milestone", "milestone1");
- search.addFilter("milestone", "milestone2");
- search.setOrderBy("id");
-
- String queryUrl = url + ITracClient.QUERY_URL + search.toUrl();
- TracRepositoryQuery query = new TracRepositoryQuery(url, queryUrl, "description");
-
- //MultiStatus queryStatus = new MultiStatus(TracUiPlugin.PLUGIN_ID, IStatus.OK, "Query result", null);
- final List<RepositoryTaskData> result = new ArrayList<RepositoryTaskData>();
- LegacyTaskDataCollector hitCollector = new LegacyTaskDataCollector() {
- @Override
- public void accept(RepositoryTaskData hit) {
- result.add(hit);
- }
- };
- IStatus queryStatus = connector.performQuery(repository, query, hitCollector, null, new NullProgressMonitor());
-
- assertTrue(queryStatus.isOK());
- assertEquals(3, result.size());
- assertEquals(data.tickets.get(0).getId() + "", result.get(0).getTaskId());
- assertEquals(data.tickets.get(1).getId() + "", result.get(1).getTaskId());
- assertEquals(data.tickets.get(2).getId() + "", result.get(2).getTaskId());
- }
-
- public void testUpdateAttributesWeb011() throws Exception {
- init(TracTestConstants.TEST_TRAC_011_URL, Version.TRAC_0_9);
- updateAttributes();
- }
-
- public void testUpdateAttributesWeb010() throws Exception {
- init(TracTestConstants.TEST_TRAC_010_URL, Version.TRAC_0_9);
- updateAttributes();
- }
-
- public void testUpdateAttributesWeb096() throws Exception {
- init(TracTestConstants.TEST_TRAC_096_URL, Version.TRAC_0_9);
- updateAttributes();
- }
-
- public void testUpdateAttributesXmlRpc011() throws Exception {
- init(TracTestConstants.TEST_TRAC_011_URL, Version.XML_RPC);
- updateAttributes();
- }
-
- public void testUpdateAttributesXmlRpc010() throws Exception {
- init(TracTestConstants.TEST_TRAC_010_URL, Version.XML_RPC);
- updateAttributes();
- }
-
- protected void updateAttributes() throws Exception {
- connector.updateRepositoryConfiguration(repository, new NullProgressMonitor());
-
- ITracClient server = connector.getClientManager().getTracClient(repository);
- TracVersion[] versions = server.getVersions();
- assertEquals(2, versions.length);
- Arrays.sort(versions, new Comparator<TracVersion>() {
- public int compare(TracVersion o1, TracVersion o2) {
- return o1.getName().compareTo(o2.getName());
- }
- });
- assertEquals("1.0", versions[0].getName());
- assertEquals("2.0", versions[1].getName());
- }
-
- public void testContextXmlRpc010() throws Exception {
- init(TracTestConstants.TEST_TRAC_010_URL, Version.XML_RPC);
- TracTask task = (TracTask) TasksUiInternal.createTask(repository, data.attachmentTicketId + "", null);
- TasksUiInternal.synchronizeTask(connector, task, true, null);
-
- //int size = task.getTaskData().getAttachments().size();
-
- File sourceContextFile = ContextCorePlugin.getContextStore().getFileForContext(task.getHandleIdentifier());
- sourceContextFile.createNewFile();
- sourceContextFile.deleteOnExit();
-
- assertTrue(AttachmentUtil.attachContext(connector.getAttachmentHandler(), repository, task, "",
- new NullProgressMonitor()));
-
- TasksUiInternal.synchronizeTask(connector, task, true, null);
- // TODO attachment may have been overridden therefore size may not have changed
- //assertEquals(size + 1, task.getTaskData().getAttachments().size());
-
- //RepositoryAttachment attachment = task.getTaskData().getAttachments().get(size);
- //assertTrue(connector.retrieveContext(repository, task, attachment, TasksUiPlugin.getDefault().getProxySettings(), TasksUiPlugin.getDefault().getDataDirectory()));
- }
-
- public void testContextWeb096() throws Exception {
- init(TracTestConstants.TEST_TRAC_096_URL, Version.TRAC_0_9);
- TracTask task = (TracTask) TasksUiInternal.createTask(repository, data.attachmentTicketId + "", null);
-
- File sourceContextFile = ContextCorePlugin.getContextStore().getFileForContext(task.getHandleIdentifier());
- sourceContextFile.createNewFile();
- sourceContextFile.deleteOnExit();
-
- try {
- AttachmentUtil.attachContext(connector.getAttachmentHandler(), repository, task, "",
- new NullProgressMonitor());
- fail("expected CoreException"); // operation should not be supported
- } catch (CoreException e) {
- }
- }
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryQueryTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryQueryTest.java
deleted file mode 100644
index 4f1bf42f9..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryQueryTest.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.trac.tests;
-
-import java.util.Arrays;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.mylyn.internal.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.internal.tasks.ui.RefactorRepositoryUrlOperation;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.trac.core.ITracClient;
-import org.eclipse.mylyn.internal.trac.core.TracCorePlugin;
-import org.eclipse.mylyn.internal.trac.core.TracRepositoryQuery;
-import org.eclipse.mylyn.internal.trac.core.TracTask;
-import org.eclipse.mylyn.internal.trac.core.model.TracSearch;
-import org.eclipse.mylyn.internal.trac.core.model.TracSearchFilter;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-/**
- * @author Steffen Pingel
- */
-public class TracRepositoryQueryTest extends TestCase {
-
- public void testChangeRepositoryUrl() throws Exception {
- TaskRepositoryManager manager = TasksUiPlugin.getRepositoryManager();
- manager.clearRepositories(TasksUiPlugin.getDefault().getRepositoriesFilePath());
-
- TaskRepository repository = new TaskRepository(TracCorePlugin.REPOSITORY_KIND,
- TracTestConstants.TEST_TRAC_096_URL);
- manager.addRepository(repository);
-
- TracSearch search = new TracSearch();
- String queryUrl = repository.getRepositoryUrl() + ITracClient.QUERY_URL + search.toUrl();
- TracRepositoryQuery query = new TracRepositoryQuery(repository.getRepositoryUrl(), queryUrl, "description");
- TasksUiPlugin.getTaskList().addQuery(query);
-
- TracTask task = new TracTask(TracTestConstants.TEST_TRAC_096_URL, "" + 123, "desc");
- TasksUiPlugin.getTaskList().addTask(task);
-
- String oldUrl = repository.getRepositoryUrl();
- String newUrl = TracTestConstants.TEST_TRAC_010_URL;
- new RefactorRepositoryUrlOperation(oldUrl, newUrl).run(new NullProgressMonitor());
- repository.setRepositoryUrl(newUrl);
-
- assertEquals(newUrl, query.getRepositoryUrl());
- assertEquals(newUrl + ITracClient.QUERY_URL + search.toUrl(), query.getUrl());
- assertEquals(newUrl + ITracClient.TICKET_URL + 123, task.getUrl());
- }
-
- public void testGetFilterList() {
- String repositoryUrl = "https://foo.bar/repo";
- String parameterUrl = "&status=new&status=assigned&status=reopened&milestone=0.1";
- String queryUrl = repositoryUrl + ITracClient.QUERY_URL + parameterUrl;
- TracRepositoryQuery query = new TracRepositoryQuery(repositoryUrl, queryUrl, "description");
-
- TracSearch filterList = query.getTracSearch();
-
- assertEquals(parameterUrl, filterList.toUrl());
- assertEquals("&status=new|assigned|reopened&milestone=0.1", filterList.toQuery());
-
- List<TracSearchFilter> list = filterList.getFilters();
- TracSearchFilter filter = list.get(0);
- assertEquals("status", filter.getFieldName());
- assertEquals(Arrays.asList("new", "assigned", "reopened"), filter.getValues());
- filter = list.get(1);
- assertEquals("milestone", filter.getFieldName());
- assertEquals(Arrays.asList("0.1"), filter.getValues());
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositorySettingsPageTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositorySettingsPageTest.java
deleted file mode 100644
index 41086d15d..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositorySettingsPageTest.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.trac.tests;
-
-import java.net.Proxy;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.trac.core.ITracClient;
-import org.eclipse.mylyn.internal.trac.core.TracCorePlugin;
-import org.eclipse.mylyn.internal.trac.core.ITracClient.Version;
-import org.eclipse.mylyn.internal.trac.ui.TracConnectorUi;
-import org.eclipse.mylyn.internal.trac.ui.wizard.TracRepositorySettingsPage;
-import org.eclipse.mylyn.internal.trac.ui.wizard.TracRepositorySettingsPage.TracValidator;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Steffen Pingel
- */
-public class TracRepositorySettingsPageTest extends AbstractTracClientTest {
-
- private TracConnectorUi connector;
-
- private TracRepositorySettingsPage page;
-
- private TracValidator validator;
-
- public TracRepositorySettingsPageTest() {
- super(null);
- }
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
-
- connector = (TracConnectorUi) TasksUiPlugin.getConnectorUi(TracCorePlugin.REPOSITORY_KIND);
- page = new TracRepositorySettingsPage(null);
-
- Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- page.createControl(shell);
- page.setVisible(true);
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
-
- // TestFixture.cleanupRepository1();
- }
-
- @Override
- public ITracClient connect(String url, String username, String password, Proxy proxy, Version version)
- throws Exception {
- page.setAnonymous(false);
- page.setUrl(url);
- page.setUserId(username);
- page.setPassword(password);
- page.setTracVersion(version);
- validator = page.new TracValidator(page.createTaskRepository(), version);
- return null;
- }
-
- public void testValidateXmlRpc() throws Exception {
- version = Version.XML_RPC;
- connect010();
-
- validator.run(new NullProgressMonitor());
- assertNull(validator.getResult());
- assertNull(validator.getStatus());
- }
-
- public void testValidateWeb() throws Exception {
- version = Version.TRAC_0_9;
- connect010();
-
- validator.run(new NullProgressMonitor());
- assertNull(validator.getResult());
- assertNull(validator.getStatus());
- }
-
- public void testValidateAutomaticUser() throws Exception {
- version = null;
- connect010();
-
- validator.run(new NullProgressMonitor());
- assertEquals(Version.XML_RPC, validator.getResult());
- assertNull(validator.getStatus());
- }
-
- public void testValidateAutomaticAnonymous() throws Exception {
- version = null;
- connect(TracTestConstants.TEST_TRAC_010_URL, "", "");
-
- validator.run(new NullProgressMonitor());
- assertEquals(Version.TRAC_0_9, validator.getResult());
- assertNotNull(validator.getStatus());
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracSearchTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracSearchTest.java
deleted file mode 100644
index 004097eed..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracSearchTest.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.trac.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.internal.trac.core.model.TracSearch;
-
-/**
- * @author Steffen Pingel
- */
-public class TracSearchTest extends TestCase {
-
- private static final String QUERY1 = "&status=new|assigned|reopened&milestone~=0.1";
-
- private static final String URL1 = "&status=new&status=assigned&status=reopened&milestone=%7E0.1";
-
- private TracSearch search1;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
-
- search1 = new TracSearch();
- search1.addFilter("status", "new");
- search1.addFilter("status", "assigned");
- search1.addFilter("status", "reopened");
- search1.addFilter("milestone", "~0.1");
- }
-
- public void testToQuery() {
- assertEquals(QUERY1, search1.toQuery());
- }
-
- public void testToQueryEmpty() {
- assertEquals("", new TracSearch().toQuery());
- }
-
- public void testToQueryOperators1() {
- TracSearch search = new TracSearch();
- search.addFilter("is", "a");
- search.addFilter("contains", "~b");
- search.addFilter("starts", "^c");
- search.addFilter("ends", "$d");
- search.addFilter("nis", "!e");
- search.addFilter("ncontains", "!~f");
- search.addFilter("nstarts", "!^g");
- search.addFilter("nends", "!$h");
-
- assertEquals("&is=a&contains~=b&starts^=c&ends$=d&nis!=e&ncontains!~=f&nstarts!^=g&nends!$=h", search.toQuery());
- }
-
- public void testToQueryOperators2() {
- TracSearch search = new TracSearch();
- search.addFilter("nstarts", "!^g");
- search.addFilter("nis", "!e");
- search.addFilter("is", "a");
-
- assertEquals("&nstarts!^=g&nis!=e&is=a", search.toQuery());
- }
-
- public void testToQuerySortOrder() {
- search1.setOrderBy("id");
- assertEquals("&order=id" + QUERY1, search1.toQuery());
-
- search1.setAscending(false);
- assertEquals("&order=id&desc=1" + QUERY1, search1.toQuery());
-
- search1.setOrderBy("summary");
- search1.setAscending(true);
- assertEquals("&order=summary" + QUERY1, search1.toQuery());
- }
-
- public void testToUrl() {
- assertEquals(URL1, search1.toUrl());
- }
-
- public void testToUrlEmpty() {
- // assertEquals("", new TracSearch().toUrl());
- // returns non-empty string to work around a strange Trac behaviour, see
- // TracSearch.toUrl()
- assertEquals("&order=id", new TracSearch().toUrl());
- }
-
- public void testToUrlEncoding() {
- search1.addFilter("encoded", "&");
- assertEquals(URL1 + "&encoded=%26", search1.toUrl());
- }
-
- public void testToUrlOperators1() {
- TracSearch search = new TracSearch();
- search.addFilter("is", "a");
- search.addFilter("contains", "~b");
- search.addFilter("starts", "^c");
- search.addFilter("ends", "$d");
- search.addFilter("nis", "!e");
- search.addFilter("ncontains", "!~f");
- search.addFilter("nstarts", "!^g");
- search.addFilter("nends", "!$h");
-
- assertEquals(
- "&is=a&contains=%7Eb&starts=%5Ec&ends=%24d&nis=%21e&ncontains=%21%7Ef&nstarts=%21%5Eg&nends=%21%24h",
- search.toUrl());
- }
-
- public void testToUrlOperators2() {
- TracSearch search = new TracSearch();
- search.addFilter("nstarts", "!^g");
- search.addFilter("nis", "!e");
- search.addFilter("is", "a");
-
- assertEquals("&nstarts=%21%5Eg&nis=%21e&is=a", search.toUrl());
- }
-
- public void testToUrlSortOrder() {
- search1.setOrderBy("id");
- assertEquals("&order=id" + QUERY1, search1.toQuery());
-
- search1.setAscending(false);
- assertEquals("&order=id&desc=1" + QUERY1, search1.toQuery());
-
- search1.setOrderBy("summary");
- search1.setAscending(true);
- assertEquals("&order=summary" + QUERY1, search1.toQuery());
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTaskDataHandlerTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTaskDataHandlerTest.java
deleted file mode 100644
index 426fd36f3..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTaskDataHandlerTest.java
+++ /dev/null
@@ -1,435 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.trac.tests;
-
-import java.util.Date;
-import java.util.HashSet;
-import java.util.Set;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.mylyn.commons.net.AuthenticationCredentials;
-import org.eclipse.mylyn.commons.net.AuthenticationType;
-import org.eclipse.mylyn.context.tests.support.TestUtil;
-import org.eclipse.mylyn.context.tests.support.TestUtil.Credentials;
-import org.eclipse.mylyn.context.tests.support.TestUtil.PrivilegeLevel;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.IdentityAttributeFactory;
-import org.eclipse.mylyn.internal.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractAttachmentHandler;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.DefaultTaskSchema;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.ITaskAttachment;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskAttribute;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-import org.eclipse.mylyn.internal.tasks.core.sync.SynchronizationSession;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.internal.trac.core.ITracClient;
-import org.eclipse.mylyn.internal.trac.core.InvalidTicketException;
-import org.eclipse.mylyn.internal.trac.core.TracAttributeFactory;
-import org.eclipse.mylyn.internal.trac.core.TracCorePlugin;
-import org.eclipse.mylyn.internal.trac.core.TracRepositoryConnector;
-import org.eclipse.mylyn.internal.trac.core.TracTask;
-import org.eclipse.mylyn.internal.trac.core.TracTaskDataHandler;
-import org.eclipse.mylyn.internal.trac.core.ITracClient.Version;
-import org.eclipse.mylyn.internal.trac.core.model.TracTicket;
-import org.eclipse.mylyn.internal.trac.core.model.TracTicket.Key;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.RepositoryStatus;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.trac.tests.support.TestFixture;
-import org.eclipse.mylyn.trac.tests.support.TracTestUtil;
-import org.eclipse.mylyn.trac.tests.support.XmlRpcServer.TestData;
-
-/**
- * @author Steffen Pingel
- */
-public class TracTaskDataHandlerTest extends TestCase {
-
- private TracRepositoryConnector connector;
-
- private TaskRepository repository;
-
- private TaskRepositoryManager manager;
-
- private TestData data;
-
- private TracTaskDataHandler taskDataHandler;
-
- private ITracClient client;
-
- public TracTaskDataHandlerTest() {
- }
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
-
- data = TestFixture.init010();
-
- manager = TasksUiPlugin.getRepositoryManager();
- manager.clearRepositories(TasksUiPlugin.getDefault().getRepositoriesFilePath());
-
- connector = (TracRepositoryConnector) manager.getRepositoryConnector(TracCorePlugin.REPOSITORY_KIND);
-
- taskDataHandler = (TracTaskDataHandler) connector.getLegacyTaskDataHandler();
- }
-
- protected void init(String url, Version version) {
- Credentials credentials = TestUtil.readCredentials(PrivilegeLevel.USER);
-
- repository = new TaskRepository(TracCorePlugin.REPOSITORY_KIND, url);
- repository.setCredentials(AuthenticationType.REPOSITORY, new AuthenticationCredentials(credentials.username,
- credentials.password), false);
- repository.setTimeZoneId(ITracClient.TIME_ZONE);
- repository.setCharacterEncoding(ITracClient.CHARSET);
- repository.setVersion(version.name());
-
- manager.addRepository(repository);
-
- client = connector.getClientManager().getTracClient(repository);
- }
-
- public void testGetChangedSinceLastSyncWeb096() throws Exception {
- init(TracTestConstants.TEST_TRAC_096_URL, Version.TRAC_0_9);
- TracTask task = (TracTask) TasksUiInternal.createTask(repository, data.offlineHandlerTicketId + "", null);
-
- Set<ITask> tasks = new HashSet<ITask>();
- tasks.add(task);
- SynchronizationSession event = new SynchronizationSession();
- event.setNeedsPerformQueries(true);
- event.setTaskRepository(repository);
- event.setFullSynchronization(true);
- event.setTasks(tasks);
-
- assertEquals(null, repository.getSynchronizationTimeStamp());
- connector.preSynchronization(event, null);
- assertTrue(event.needsPerformQueries());
- assertEquals(null, repository.getSynchronizationTimeStamp());
- assertFalse(task.isStale());
-
- int time = (int) (System.currentTimeMillis() / 1000) + 1;
- repository.setSynchronizationTimeStamp(time + "");
- connector.preSynchronization(event, null);
- assertTrue(event.needsPerformQueries());
- assertFalse(task.isStale());
- }
-
- public void testMarkStaleTasksXmlRpc010() throws Exception {
- init(TracTestConstants.TEST_TRAC_010_URL, Version.XML_RPC);
- markStaleTasks();
- }
-
- public void testMarkStaleTasksXmlRpc011() throws Exception {
- init(TracTestConstants.TEST_TRAC_011_URL, Version.XML_RPC);
- markStaleTasks();
- }
-
- private void markStaleTasks() throws Exception {
- TracTicket ticket = TracTestUtil.createTicket(client, "markStaleTasks");
- TracTask task = (TracTask) TasksUiInternal.createTask(repository, ticket.getId() + "", null);
- TasksUiInternal.synchronizeTask(connector, task, true, null);
- RepositoryTaskData taskData = TasksUiPlugin.getTaskDataStorageManager().getNewTaskData(task.getRepositoryUrl(),
- task.getTaskId());
-
- int lastModified = Integer.parseInt(taskData.getLastModified());
-
- Set<ITask> tasks = new HashSet<ITask>();
- tasks.add(task);
- SynchronizationSession event = new SynchronizationSession();
- event.setNeedsPerformQueries(true);
- event.setTaskRepository(repository);
- event.setFullSynchronization(true);
-
- // an empty set should not cause contact to the repository
- repository.setSynchronizationTimeStamp(null);
- event.setTasks(new HashSet<ITask>());
- connector.preSynchronization(event, null);
- assertTrue(event.needsPerformQueries());
- assertNull(repository.getSynchronizationTimeStamp());
-
- repository.setSynchronizationTimeStamp(null);
- event.setTasks(tasks);
- connector.preSynchronization(event, null);
- assertTrue(event.needsPerformQueries());
- assertTrue(task.isStale());
-
- // always returns the ticket because time comparison mode is >=
- task.setStale(false);
- repository.setSynchronizationTimeStamp(lastModified + "");
- connector.preSynchronization(event, null);
- // TODO this was fixed so it returns false now but only if the
- // query returns a single task
- assertFalse(event.needsPerformQueries());
- assertFalse(task.isStale());
-
- task.setStale(false);
- repository.setSynchronizationTimeStamp((lastModified + 1) + "");
- event.setNeedsPerformQueries(true);
- connector.preSynchronization(event, null);
- assertFalse(event.needsPerformQueries());
- assertFalse(task.isStale());
-
- // change ticket making sure it gets a new change time
- Thread.sleep(1000);
- ticket.putBuiltinValue(Key.DESCRIPTION, lastModified + "");
- client.updateTicket(ticket, "comment", null);
-
- task.setStale(false);
- repository.setSynchronizationTimeStamp((lastModified + 1) + "");
- event.setNeedsPerformQueries(true);
- connector.preSynchronization(event, null);
- assertTrue(event.needsPerformQueries());
- assertTrue(task.isStale());
- }
-
- public void testMarkStaleTasksNoTimeStampXmlRpc010() throws Exception {
- init(TracTestConstants.TEST_TRAC_010_URL, Version.XML_RPC);
- markStaleTasksNoTimeStamp();
- }
-
- public void testMarkStaleTasksNoTimeStampXmlRpc011() throws Exception {
- init(TracTestConstants.TEST_TRAC_011_URL, Version.XML_RPC);
- markStaleTasksNoTimeStamp();
- }
-
- private void markStaleTasksNoTimeStamp() throws Exception {
- TracTask task = (TracTask) TasksUiInternal.createTask(repository, data.offlineHandlerTicketId + "", null);
- Set<ITask> tasks = new HashSet<ITask>();
- tasks.add(task);
- SynchronizationSession event = new SynchronizationSession();
- event.setNeedsPerformQueries(true);
- event.setTaskRepository(repository);
- event.setFullSynchronization(true);
- event.setTasks(tasks);
-
- task.setStale(false);
- repository.setSynchronizationTimeStamp(null);
- connector.preSynchronization(event, null);
- assertTrue(event.needsPerformQueries());
- assertTrue(task.isStale());
-
- task.setStale(false);
- repository.setSynchronizationTimeStamp("");
- connector.preSynchronization(event, null);
- assertTrue(event.needsPerformQueries());
- assertTrue(task.isStale());
-
- task.setStale(false);
- repository.setSynchronizationTimeStamp("0");
- connector.preSynchronization(event, null);
- assertTrue(event.needsPerformQueries());
- assertTrue(task.isStale());
-
- task.setStale(false);
- repository.setSynchronizationTimeStamp("abc");
- connector.preSynchronization(event, null);
- assertTrue(event.needsPerformQueries());
- assertTrue(task.isStale());
- }
-
- public void testNonNumericTaskId() {
- try {
- connector.getLegacyTaskDataHandler().getTaskData(repository, "abc", new NullProgressMonitor());
- fail("Expected CoreException");
- } catch (CoreException e) {
- }
- }
-
- public void testAttachmentChangesLastModifiedDate010() throws Exception {
- init(TracTestConstants.TEST_TRAC_010_URL, Version.XML_RPC);
- attachmentChangesLastModifiedDate();
- }
-
- public void testAttachmentChangesLastModifiedDate011() throws Exception {
- init(TracTestConstants.TEST_TRAC_011_URL, Version.XML_RPC);
- attachmentChangesLastModifiedDate();
- }
-
- private void attachmentChangesLastModifiedDate() throws Exception {
- RepositoryTaskData taskData = taskDataHandler.getTaskData(repository, data.attachmentTicketId + "",
- new NullProgressMonitor());
- TracTask task = new TracTask(repository.getRepositoryUrl(), data.attachmentTicketId + "", "");
- connector.updateTaskFromTaskData(repository, task, taskData);
- Date lastModified = taskDataHandler.getAttributeFactory(taskData).getDateForAttributeType(
- RepositoryTaskAttribute.DATE_MODIFIED, taskData.getLastModified());
-
- AbstractAttachmentHandler attachmentHandler = connector.getAttachmentHandler();
- ITaskAttachment attachment = new MockAttachment("abc".getBytes());
- attachmentHandler.uploadAttachment(repository, task, attachment, null, new NullProgressMonitor());
-
- taskData = taskDataHandler.getTaskData(repository, data.attachmentTicketId + "", new NullProgressMonitor());
- Date newLastModified = taskDataHandler.getAttributeFactory(taskData).getDateForAttributeType(
- RepositoryTaskAttribute.DATE_MODIFIED, taskData.getLastModified());
- assertTrue("Expected " + newLastModified + " to be more recent than " + lastModified,
- newLastModified.after(lastModified));
- }
-
- public void testPostTaskDataInvalidCredentials010() throws Exception {
- init(TracTestConstants.TEST_TRAC_010_URL, Version.XML_RPC);
- postTaskDataInvalidCredentials();
- }
-
- public void testPostTaskDataInvalidCredentials011() throws Exception {
- init(TracTestConstants.TEST_TRAC_011_URL, Version.XML_RPC);
- postTaskDataInvalidCredentials();
- }
-
- private void postTaskDataInvalidCredentials() throws Exception {
- TracTask task = (TracTask) TasksUiInternal.createTask(repository, data.offlineHandlerTicketId + "", null);
- TasksUiInternal.synchronizeTask(connector, task, true, null);
- RepositoryTaskData taskData = TasksUiPlugin.getTaskDataStorageManager().getNewTaskData(task.getRepositoryUrl(),
- task.getTaskId());
-
- taskData.setNewComment("new comment");
- repository.setCredentials(AuthenticationType.REPOSITORY, new AuthenticationCredentials("foo", "bar"), false);
- try {
- taskDataHandler.postTaskData(repository, taskData, new NullProgressMonitor());
- } catch (CoreException expected) {
- assertEquals(RepositoryStatus.ERROR_REPOSITORY_LOGIN, expected.getStatus().getCode());
- }
- assertEquals("new comment", taskData.getNewComment());
- }
-
- public void testCanInitializeTaskData() throws Exception {
- init(TracTestConstants.TEST_TRAC_010_URL, Version.XML_RPC);
-
- TracTask task = new TracTask("", "", "");
- assertFalse(taskDataHandler.canInitializeSubTaskData(task, null));
- task.setSupportsSubtasks(true);
- assertTrue(taskDataHandler.canInitializeSubTaskData(task, null));
-
- RepositoryTaskData taskData = taskDataHandler.getTaskData(repository, data.offlineHandlerTicketId + "",
- new NullProgressMonitor());
- assertFalse(taskDataHandler.canInitializeSubTaskData(null, taskData));
- taskData.setAttributeValue(TracTaskDataHandler.ATTRIBUTE_BLOCKED_BY, "");
- assertTrue(taskDataHandler.canInitializeSubTaskData(null, taskData));
-
- task.setSupportsSubtasks(false);
- connector.updateTaskFromTaskData(repository, task, taskData);
- assertTrue(taskDataHandler.canInitializeSubTaskData(task, null));
- }
-
- public void testInitializeSubTaskData() throws Exception {
- init(TracTestConstants.TEST_TRAC_010_URL, Version.XML_RPC);
-
- RepositoryTaskData parentTaskData = taskDataHandler.getTaskData(repository, data.offlineHandlerTicketId + "",
- new NullProgressMonitor());
- try {
- taskDataHandler.initializeSubTaskData(repository, parentTaskData, parentTaskData, new NullProgressMonitor());
- fail("expected CoreException");
- } catch (CoreException expected) {
- }
-
- parentTaskData.setSummary("abc");
- parentTaskData.setDescription("def");
- String component = parentTaskData.getAttribute(TracAttributeFactory.Attribute.COMPONENT.getTracKey())
- .getOptions()
- .get(0);
- parentTaskData.setAttributeValue(TracAttributeFactory.Attribute.COMPONENT.getTracKey(), component);
- parentTaskData.setAttributeValue(TracTaskDataHandler.ATTRIBUTE_BLOCKED_BY, "");
- RepositoryTaskData subTaskData = new RepositoryTaskData(parentTaskData.getAttributeFactory(),
- TracCorePlugin.REPOSITORY_KIND, "", "");
- subTaskData.setAttributeValue(TracTaskDataHandler.ATTRIBUTE_BLOCKING, "");
- taskDataHandler.initializeSubTaskData(repository, subTaskData, parentTaskData, new NullProgressMonitor());
- assertEquals("", subTaskData.getSummary());
- assertEquals("", subTaskData.getDescription());
- assertEquals(component, subTaskData.getAttributeValue(TracAttributeFactory.Attribute.COMPONENT.getTracKey()));
- assertEquals(parentTaskData.getTaskId(), subTaskData.getAttributeValue(TracTaskDataHandler.ATTRIBUTE_BLOCKING));
- assertEquals("", parentTaskData.getAttributeValue(TracTaskDataHandler.ATTRIBUTE_BLOCKED_BY));
- }
-
- public void testGetSubTaskIds() throws Exception {
- RepositoryTaskData taskData = new RepositoryTaskData(new TracAttributeFactory(),
- TracCorePlugin.REPOSITORY_KIND, "", "");
- taskData.setAttributeValue(TracTaskDataHandler.ATTRIBUTE_BLOCKED_BY, "123 456");
- Set<String> subTaskIds = taskDataHandler.getSubTaskIds(taskData);
- assertEquals(2, subTaskIds.size());
- assertTrue(subTaskIds.contains("123"));
- assertTrue(subTaskIds.contains("456"));
-
- taskData.setAttributeValue(TracTaskDataHandler.ATTRIBUTE_BLOCKED_BY, "7,8");
- subTaskIds = taskDataHandler.getSubTaskIds(taskData);
- assertEquals(2, subTaskIds.size());
- assertTrue(subTaskIds.contains("7"));
- assertTrue(subTaskIds.contains("8"));
-
- taskData.setAttributeValue(TracTaskDataHandler.ATTRIBUTE_BLOCKED_BY, " 7 , 8, ");
- subTaskIds = taskDataHandler.getSubTaskIds(taskData);
- assertEquals(2, subTaskIds.size());
- assertTrue(subTaskIds.contains("7"));
- assertTrue(subTaskIds.contains("8"));
-
- taskData.setAttributeValue(TracTaskDataHandler.ATTRIBUTE_BLOCKED_BY, "7");
- subTaskIds = taskDataHandler.getSubTaskIds(taskData);
- assertEquals(1, subTaskIds.size());
- assertTrue(subTaskIds.contains("7"));
-
- taskData.setAttributeValue(TracTaskDataHandler.ATTRIBUTE_BLOCKED_BY, "");
- subTaskIds = taskDataHandler.getSubTaskIds(taskData);
- assertEquals(0, subTaskIds.size());
-
- taskData.setAttributeValue(TracTaskDataHandler.ATTRIBUTE_BLOCKED_BY, " ");
- subTaskIds = taskDataHandler.getSubTaskIds(taskData);
- assertEquals(0, subTaskIds.size());
- }
-
- public void testUpdateTaskDetails() throws Exception {
- init(TracTestConstants.TEST_TRAC_010_URL, Version.TRAC_0_9);
-
- TracTicket ticket = new TracTicket(123);
- ticket.putBuiltinValue(Key.DESCRIPTION, "mydescription");
- ticket.putBuiltinValue(Key.PRIORITY, "mypriority");
- ticket.putBuiltinValue(Key.SUMMARY, "mysummary");
- ticket.putBuiltinValue(Key.TYPE, "mytype");
-
- ITracClient client = connector.getClientManager().getTracClient(repository);
- RepositoryTaskData taskData = new RepositoryTaskData(IdentityAttributeFactory.getInstance(),
- TracCorePlugin.REPOSITORY_KIND, repository.getRepositoryUrl(), ticket.getId() + "");
- taskDataHandler.updateTaskDataFromTicket(taskData, ticket, client);
-
- TracTask task = new TracTask(TracTestConstants.TEST_TRAC_010_URL, "" + 123, "desc");
- assertEquals(TracTestConstants.TEST_TRAC_010_URL + ITracClient.TICKET_URL + "123", task.getUrl());
- assertEquals("desc", task.getSummary());
-
- DefaultTaskSchema schema = new DefaultTaskSchema(taskData);
- schema.applyTo(task);
-
- assertEquals(TracTestConstants.TEST_TRAC_010_URL + ITracClient.TICKET_URL + "123", task.getUrl());
- assertEquals("123", task.getTaskKey());
- assertEquals("mysummary", task.getSummary());
- assertEquals("P3", task.getPriority());
- assertEquals("mytype", task.getTaskKind());
- }
-
- public void testUpdateTaskDetailsSummaryOnly() throws InvalidTicketException {
- init(TracTestConstants.TEST_TRAC_010_URL, Version.TRAC_0_9);
-
- TracTicket ticket = new TracTicket(456);
- ticket.putBuiltinValue(Key.SUMMARY, "mysummary");
-
- TracTask task = new TracTask(TracTestConstants.TEST_TRAC_010_URL, "" + 456, "desc");
-
- ITracClient client = connector.getClientManager().getTracClient(repository);
- RepositoryTaskData taskData = new RepositoryTaskData(IdentityAttributeFactory.getInstance(),
- TracCorePlugin.REPOSITORY_KIND, repository.getRepositoryUrl(), ticket.getId() + "");
- taskDataHandler.updateTaskDataFromTicket(taskData, ticket, client);
- DefaultTaskSchema schema = new DefaultTaskSchema(taskData);
- schema.applyTo(task);
-
- assertEquals(TracTestConstants.TEST_TRAC_010_URL + ITracClient.TICKET_URL + "456", task.getUrl());
- assertEquals("456", task.getTaskKey());
- assertEquals("mysummary", task.getSummary());
- assertEquals("P3", task.getPriority());
- assertEquals(AbstractTask.DEFAULT_TASK_KIND, task.getTaskKind());
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTaskEditorTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTaskEditorTest.java
deleted file mode 100644
index 082d6d556..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTaskEditorTest.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.trac.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.mylyn.commons.net.AuthenticationCredentials;
-import org.eclipse.mylyn.commons.net.AuthenticationType;
-import org.eclipse.mylyn.context.tests.support.TestUtil;
-import org.eclipse.mylyn.context.tests.support.TestUtil.Credentials;
-import org.eclipse.mylyn.context.tests.support.TestUtil.PrivilegeLevel;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractTaskDataHandler;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.internal.trac.core.ITracClient;
-import org.eclipse.mylyn.internal.trac.core.TracCorePlugin;
-import org.eclipse.mylyn.internal.trac.core.TracRepositoryConnector;
-import org.eclipse.mylyn.internal.trac.core.ITracClient.Version;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-
-/**
- * @author Steffen Pingel
- */
-public class TracTaskEditorTest extends TestCase {
-
- private TracRepositoryConnector connector;
-
- private TaskRepository repository;
-
- private TaskRepositoryManager manager;
-
- private AbstractTaskDataHandler taskDataHandler;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
-
- manager = TasksUiPlugin.getRepositoryManager();
- manager.clearRepositories(TasksUiPlugin.getDefault().getRepositoriesFilePath());
-
- connector = (TracRepositoryConnector) manager.getRepositoryConnector(TracCorePlugin.REPOSITORY_KIND);
-
- taskDataHandler = connector.getLegacyTaskDataHandler();
- }
-
- protected void init(String url, Version version) {
- Credentials credentials = TestUtil.readCredentials(PrivilegeLevel.USER);
-
- repository = new TaskRepository(TracCorePlugin.REPOSITORY_KIND, url);
- repository.setCredentials(AuthenticationType.REPOSITORY, new AuthenticationCredentials(credentials.username,
- credentials.password), false);
- repository.setTimeZoneId(ITracClient.TIME_ZONE);
- repository.setCharacterEncoding(ITracClient.CHARSET);
- repository.setVersion(version.name());
-
- manager.addRepository(repository);
- }
-
- public void testGetSelectedRepository() throws Exception {
- init(TracTestConstants.TEST_TRAC_010_URL, Version.XML_RPC);
-
- RepositoryTaskData taskData = taskDataHandler.getTaskData(repository, "1", new NullProgressMonitor());
- AbstractTask task = connector.createTask(repository.getRepositoryUrl(), taskData.getTaskId(), "");
- connector.updateTaskFromTaskData(repository, task, taskData);
- TasksUiPlugin.getTaskList().addTask(task);
- TasksUiUtil.openTask(task);
-
- TaskListView taskListView = TaskListView.getFromActivePerspective();
- // force refresh since automatic reresh is delayed
- taskListView.getViewer().refresh();
- taskListView.getViewer().expandAll();
- taskListView.getViewer().setSelection(new StructuredSelection(task));
-
- assertFalse(taskListView.getViewer().getSelection().isEmpty());
- assertEquals(repository, TasksUiUtil.getSelectedRepository(taskListView.getViewer()));
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTaskTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTaskTest.java
deleted file mode 100644
index 511818533..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTaskTest.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.trac.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.internal.trac.core.TracTask;
-import org.eclipse.mylyn.internal.trac.core.model.TracPriority;
-
-/**
- * @author Steffen Pingel
- */
-public class TracTaskTest extends TestCase {
-
- public void testIsCompleted() {
- assertTrue(TracTask.isCompleted("closed"));
- assertFalse(TracTask.isCompleted("Closed"));
- assertFalse(TracTask.isCompleted("new"));
- assertFalse(TracTask.isCompleted("assigned"));
- assertFalse(TracTask.isCompleted("reopened"));
- assertFalse(TracTask.isCompleted("foobar"));
- assertFalse(TracTask.isCompleted(""));
- assertFalse(TracTask.isCompleted(null));
- }
-
- public void testGetTaskPriority() {
- assertEquals("P1", TracTask.getTaskPriority("blocker").toString());
- assertEquals("P2", TracTask.getTaskPriority("critical").toString());
- assertEquals("P3", TracTask.getTaskPriority("major").toString());
- assertEquals("P3", TracTask.getTaskPriority(null).toString());
- assertEquals("P3", TracTask.getTaskPriority("").toString());
- assertEquals("P3", TracTask.getTaskPriority("foo bar").toString());
- assertEquals("P4", TracTask.getTaskPriority("minor").toString());
- assertEquals("P5", TracTask.getTaskPriority("trivial").toString());
- }
-
- public void testGetTaskPriorityFromTracPriorities() {
- TracPriority p1 = new TracPriority("a", 1);
- TracPriority p2 = new TracPriority("b", 2);
- TracPriority p3 = new TracPriority("c", 3);
- TracPriority[] priorities = new TracPriority[] { p1, p2, p3 };
- assertEquals("P1", TracTask.getTaskPriority("a", priorities).toString());
- assertEquals("P3", TracTask.getTaskPriority("b", priorities).toString());
- assertEquals("P5", TracTask.getTaskPriority("c", priorities).toString());
- assertEquals("P3", TracTask.getTaskPriority("foo", priorities).toString());
- assertEquals("P3", TracTask.getTaskPriority(null, priorities).toString());
-
- p1 = new TracPriority("a", 10);
- priorities = new TracPriority[] { p1 };
- assertEquals("P1", TracTask.getTaskPriority("a", priorities).toString());
- assertEquals("P3", TracTask.getTaskPriority("b", priorities).toString());
- assertEquals("P3", TracTask.getTaskPriority(null, priorities).toString());
-
- p1 = new TracPriority("1", 10);
- p2 = new TracPriority("2", 20);
- p3 = new TracPriority("3", 30);
- TracPriority p4 = new TracPriority("4", 40);
- TracPriority p5 = new TracPriority("5", 70);
- TracPriority p6 = new TracPriority("6", 100);
- priorities = new TracPriority[] { p1, p2, p3, p4, p5, p6 };
- assertEquals("P1", TracTask.getTaskPriority("1", priorities).toString());
- assertEquals("P1", TracTask.getTaskPriority("2", priorities).toString());
- assertEquals("P2", TracTask.getTaskPriority("3", priorities).toString());
- assertEquals("P2", TracTask.getTaskPriority("4", priorities).toString());
- assertEquals("P4", TracTask.getTaskPriority("5", priorities).toString());
- assertEquals("P5", TracTask.getTaskPriority("6", priorities).toString());
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTestConstants.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTestConstants.java
deleted file mode 100644
index 9e24b244a..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTestConstants.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.trac.tests;
-
-/**
- * @author Steffen Pingel
- */
-public class TracTestConstants {
-
- public static final String SERVER = System.getProperty("mylyn.trac.server", "mylyn.eclipse.org");
-
- public static final String TEST_TRAC_096_URL = "http://" + SERVER + "/trac096";
-
- public static final String TEST_TRAC_010_URL = "http://" + SERVER + "/trac010";
-
- public static final String TEST_TRAC_010_SSL_URL = "https://" + SERVER + "/trac010";
-
- public static final String TEST_TRAC_010_DIGEST_AUTH_URL = "http://" + SERVER + "/trac010digest";
-
- public static final String TEST_TRAC_010_FORM_AUTH_URL = "http://" + SERVER + "/trac010formauth";
-
- public static final String TEST_TRAC_011_URL = "http://" + SERVER + "/trac011";
-
- public static final String TEST_TRAC_INVALID_URL = "http://" + SERVER + "/doesnotexist";
-
-}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTicketTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTicketTest.java
deleted file mode 100644
index f3fd07a41..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTicketTest.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.trac.tests;
-
-import java.util.Calendar;
-import java.util.Date;
-import java.util.TimeZone;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.internal.trac.core.InvalidTicketException;
-import org.eclipse.mylyn.internal.trac.core.model.TracTicket;
-import org.eclipse.mylyn.internal.trac.core.model.TracTicket.Key;
-import org.eclipse.mylyn.internal.trac.core.util.TracUtils;
-
-/**
- * @author Steffen Pingel
- */
-public class TracTicketTest extends TestCase {
-
- public void testValid() {
- TracTicket ticket = new TracTicket();
- assertFalse(ticket.isValid());
-
- ticket.setId(1);
- assertTrue(ticket.isValid());
- }
-
- public void testPutTracValue() throws InvalidTicketException {
- TracTicket ticket = new TracTicket(1);
- ticket.putValue("summary", "a");
- assertEquals("a", ticket.getValue(Key.SUMMARY));
- assertEquals(null, ticket.getCustomValue("summary"));
- assertEquals(null, ticket.getCustomValue("a"));
-
- ticket.putValue("summary", "b");
- ticket.putValue("custom", "c");
- assertEquals("b", ticket.getValue(Key.SUMMARY));
- assertEquals(null, ticket.getCustomValue("summary"));
- assertEquals("c", ticket.getCustomValue("custom"));
- }
-
- public void testPutTracValueId() throws InvalidTicketException {
- TracTicket ticket = new TracTicket();
- assertFalse(ticket.putValue("id", "1"));
- }
-
- public void testSetCreated() throws InvalidTicketException {
- TracTicket ticket = new TracTicket(1);
- ticket.setCreated(TracUtils.parseDate(0));
- assertEquals(TimeZone.getTimeZone("GMT").getOffset(0) * 1000, ticket.getCreated().getTime());
-
- Date date = new Date();
- Calendar utc = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
- utc.setTime(date);
- ticket.setCreated(TracUtils.parseDate((int) (utc.getTimeInMillis() / 1000)));
-
- assertEquals(date.getTime() / 1000, ticket.getCreated().getTime() / 1000);
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracWebClientSearchTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracWebClientSearchTest.java
deleted file mode 100644
index 7b67ffd9e..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracWebClientSearchTest.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.trac.tests;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.mylyn.internal.trac.core.ITracClient.Version;
-import org.eclipse.mylyn.internal.trac.core.model.TracSearch;
-import org.eclipse.mylyn.internal.trac.core.model.TracTicket;
-
-/**
- * @author Steffen Pingel
- */
-public class TracWebClientSearchTest extends AbstractTracClientSearchTest {
-
- public TracWebClientSearchTest() {
- super(Version.TRAC_0_9);
- }
-
- // TODO move this test to AbstracTracClientTest when bug 162094 is resolved
- public void testSearchMilestoneAmpersand010() throws Exception {
- connect010();
- searchMilestoneAmpersand();
- }
-
- public void testSearchMilestoneAmpersand011() throws Exception {
- connect011();
- searchMilestoneAmpersand();
- }
-
- private void searchMilestoneAmpersand() throws Exception {
- TracSearch search = new TracSearch();
- search.addFilter("milestone", "mile&stone");
- search.setOrderBy("id");
- List<TracTicket> result = new ArrayList<TracTicket>();
- repository.search(search, result, null);
- assertEquals(1, result.size());
- assertTicketEquals(tickets.get(7), result.get(0));
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracWebClientTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracWebClientTest.java
deleted file mode 100644
index 8b1bd08e0..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracWebClientTest.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.trac.tests;
-
-import java.util.Arrays;
-import java.util.Comparator;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.mylyn.internal.trac.core.TracException;
-import org.eclipse.mylyn.internal.trac.core.ITracClient.Version;
-import org.eclipse.mylyn.internal.trac.core.model.TracVersion;
-
-/**
- * @author Steffen Pingel
- */
-public class TracWebClientTest extends AbstractTracClientRepositoryTest {
-
- public TracWebClientTest() {
- super(Version.TRAC_0_9);
- }
-
- public void testValidate096() throws Exception {
- validate(TracTestConstants.TEST_TRAC_096_URL);
- }
-
- @Override
- public void testValidate011() throws Exception {
- try {
- validate(TracTestConstants.TEST_TRAC_011_URL);
- } catch (TracException e) {
- }
- }
-
- public void testValidateAnyPage() throws Exception {
- connect("http://mylyn.eclipse.org/");
- try {
- repository.validate(callback);
- fail("Expected TracException");
- } catch (TracException e) {
- }
- }
-
- public void testValidateAnonymousLogin() throws Exception {
- connect(TracTestConstants.TEST_TRAC_010_URL, "", "");
- repository.validate(callback);
-
- connect(TracTestConstants.TEST_TRAC_096_URL, "", "");
- repository.validate(callback);
- }
-
- public void testUpdateAttributesAnonymous096() throws Exception {
- connect(TracTestConstants.TEST_TRAC_096_URL, "", "");
- updateAttributes();
- }
-
- public void testUpdateAttributesAnonymous010() throws Exception {
- connect(TracTestConstants.TEST_TRAC_010_URL, "", "");
- updateAttributes();
- }
-
- private void updateAttributes() throws TracException {
- assertNull(repository.getMilestones());
- repository.updateAttributes(new NullProgressMonitor(), true);
- TracVersion[] versions = repository.getVersions();
- assertEquals(2, versions.length);
- Arrays.sort(versions, new Comparator<TracVersion>() {
- public int compare(TracVersion o1, TracVersion o2) {
- return o1.getName().compareTo(o2.getName());
- }
- });
- assertEquals("1.0", versions[0].getName());
- assertEquals("2.0", versions[1].getName());
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracXmlRpcClientSearchTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracXmlRpcClientSearchTest.java
deleted file mode 100644
index 629350520..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracXmlRpcClientSearchTest.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.trac.tests;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.mylyn.internal.trac.core.ITracClient.Version;
-import org.eclipse.mylyn.internal.trac.core.model.TracSearch;
-import org.eclipse.mylyn.internal.trac.core.model.TracTicket;
-import org.eclipse.mylyn.internal.trac.core.model.TracTicket.Key;
-
-/**
- * @author Steffen Pingel
- */
-public class TracXmlRpcClientSearchTest extends AbstractTracClientSearchTest {
-
- public TracXmlRpcClientSearchTest() {
- super(Version.XML_RPC);
- }
-
- public void testSearchValidateTicket010() throws Exception {
- connect010();
- searchValidateTicket();
- }
-
- public void testSearchValidateTicket011() throws Exception {
- connect011();
- searchValidateTicket();
- }
-
- public void searchValidateTicket() throws Exception {
- TracSearch search = new TracSearch();
- search.addFilter("summary", "summary1");
- List<TracTicket> result = new ArrayList<TracTicket>();
- repository.search(search, result, null);
- assertEquals(1, result.size());
- assertTicketEquals(tickets.get(0), result.get(0));
- assertEquals("component1", result.get(0).getValue(Key.COMPONENT));
- assertEquals("description1", result.get(0).getValue(Key.DESCRIPTION));
- assertEquals("milestone1", result.get(0).getValue(Key.MILESTONE));
- assertEquals("anonymous", result.get(0).getValue(Key.REPORTER));
- assertEquals("summary1", result.get(0).getValue(Key.SUMMARY));
- // assertEquals("", result.get(0).getValue(Key.VERSION));
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracXmlRpcClientTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracXmlRpcClientTest.java
deleted file mode 100644
index dcf36c77d..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracXmlRpcClientTest.java
+++ /dev/null
@@ -1,338 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.trac.tests;
-
-import java.util.Arrays;
-import java.util.Comparator;
-import java.util.Date;
-import java.util.List;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.mylyn.internal.trac.core.TracPermissionDeniedException;
-import org.eclipse.mylyn.internal.trac.core.TracRemoteException;
-import org.eclipse.mylyn.internal.trac.core.TracXmlRpcClient;
-import org.eclipse.mylyn.internal.trac.core.ITracClient.Version;
-import org.eclipse.mylyn.internal.trac.core.model.TracVersion;
-import org.eclipse.mylyn.internal.trac.core.model.TracWikiPage;
-import org.eclipse.mylyn.internal.trac.core.model.TracWikiPageInfo;
-
-/**
- * @author Steffen Pingel
- * @author Xiaoyang Guan
- */
-public class TracXmlRpcClientTest extends AbstractTracClientRepositoryTest {
-
- public TracXmlRpcClientTest() {
- super(Version.XML_RPC);
- }
-
- @Override
- public void testValidate011() throws Exception {
- validate(TracTestConstants.TEST_TRAC_011_URL);
- }
-
- public void testValidateFailNoAuth() throws Exception {
- connect(TracTestConstants.TEST_TRAC_010_URL, "", "");
- try {
- repository.validate(callback);
- fail("Expected TracPermissiongDeniedException");
- } catch (TracPermissionDeniedException e) {
- }
- }
-
- public void testMulticallExceptions() throws Exception {
- connect010();
- try {
- ((TracXmlRpcClient) repository).getTickets(new int[] { 1, Integer.MAX_VALUE }, null);
- fail("Expected TracRemoteException");
- } catch (TracRemoteException e) {
- }
- }
-
- public void testUpdateAttributes010() throws Exception {
- connect010();
- updateAttributes();
- }
-
- public void testUpdateAttributes011() throws Exception {
- connect011();
- updateAttributes();
- }
-
- public void updateAttributes() throws Exception {
- assertNull(repository.getMilestones());
- repository.updateAttributes(new NullProgressMonitor(), true);
- TracVersion[] versions = repository.getVersions();
- assertEquals(2, versions.length);
- Arrays.sort(versions, new Comparator<TracVersion>() {
- public int compare(TracVersion o1, TracVersion o2) {
- return o1.getName().compareTo(o2.getName());
- }
- });
- assertEquals("1.0", versions[0].getName());
- assertEquals("", versions[0].getDescription());
- assertEquals(new Date(0), versions[0].getTime());
- assertEquals("2.0", versions[1].getName());
- assertEquals("", versions[1].getDescription());
- assertEquals(new Date(0), versions[1].getTime());
- }
-
- public void testWikiToHtml010() throws Exception {
- connect010();
- wikiToHtml(TracTestConstants.TEST_TRAC_010_URL);
- }
-
- public void testWikiToHtml011() throws Exception {
- connect011();
- wikiToHtml("/trac011");
- }
-
- public void wikiToHtml(String tracUrl) throws Exception {
- String html = ((TracXmlRpcClient) repository).wikiToHtml("", null);
- assertEquals("", html);
-
- html = ((TracXmlRpcClient) repository).wikiToHtml("A simple line of text.", null);
- assertEquals("<p>\nA simple line of text.\n</p>\n", html);
-
- String source = "= WikiFormattingTesting =\n" + " * '''bold''', '''!''' can be bold too''', and '''! '''\n"
- + " * ''italic''\n" + " * '''''bold italic'''''\n" + " * __underline__\n"
- + " * {{{monospace}}} or `monospace`\n" + " * ~~strike-through~~\n" + " * ^superscript^ \n"
- + " * ,,subscript,,\n" + "= Heading =\n" + "== Subheading ==\n";
-
- String expectedHtml = "<h1 id=\"WikiFormattingTesting\"><a class=\"missing wiki\" href=\""
- + tracUrl
- + "/wiki/WikiFormattingTesting\" rel=\"nofollow\">WikiFormattingTesting?</a></h1>\n<ul><li><strong>bold</strong>, <strong>\'\'\' can be bold too</strong>, and <strong>! </strong>\n</li><li><i>italic</i>\n</li><li><strong><i>bold italic</i></strong>\n</li><li><span class=\"underline\">underline</span>\n</li><li><tt>monospace</tt> or <tt>monospace</tt>\n</li><li><del>strike-through</del>\n</li><li><sup>superscript</sup> \n</li><li><sub>subscript</sub>\n</li></ul><h1 id=\"Heading\">Heading</h1>\n<h2 id=\"Subheading\">Subheading</h2>\n";
-
- html = ((TracXmlRpcClient) repository).wikiToHtml(source, null);
- assertEquals(expectedHtml, html);
- }
-
- public void testValidateWikiAPI010() throws Exception {
- connect010();
- ((TracXmlRpcClient) repository).validateWikiRpcApi(null);
- }
-
- public void testValidateWikiAPI011() throws Exception {
- connect011();
- ((TracXmlRpcClient) repository).validateWikiRpcApi(null);
- }
-
- public void testGetAllWikiPageNames010() throws Exception {
- connect010();
- getAllWikiPageNames();
- }
-
- public void testGetAllWikiPageNames011() throws Exception {
- connect011();
- getAllWikiPageNames();
- }
-
- private void getAllWikiPageNames() throws Exception {
- String[] names = ((TracXmlRpcClient) repository).getAllWikiPageNames(null);
- List<String> all = Arrays.asList(names);
- assertTrue(all.contains("Test"));
- }
-
- public void testGetWikiPage010() throws Exception {
- connect010();
- getWikiPage();
- }
-
- public void testGetWikiPage011() throws Exception {
- connect011();
- getWikiPage();
- }
-
- private void getWikiPage() throws Exception {
- TracWikiPage page = ((TracXmlRpcClient) repository).getWikiPage("TestGetPage", null);
- assertEquals("TestGetPage", page.getPageInfo().getPageName());
- assertEquals("tests@mylyn.eclipse.org", page.getPageInfo().getAuthor());
- assertEquals(2, page.getPageInfo().getVersion());
- // XXX: The Date returned from Wiki API seems to have a problem with the Time Zone
- //String date = "Sat Nov 11 18:10:56 EST 2006";
- //assertEquals(date, page.getPageVersion().getLastModified().toString());
- assertEquals("Version 2", page.getContent());
- assertTrue(page.getPageHTML().startsWith("<html>"));
-
- page = ((TracXmlRpcClient) repository).getWikiPage("TestGetPage", 1, null);
- assertEquals("TestGetPage", page.getPageInfo().getPageName());
- assertEquals("anonymous", page.getPageInfo().getAuthor());
- assertEquals(1, page.getPageInfo().getVersion());
- assertEquals("Version 1", page.getContent());
- assertTrue(page.getPageHTML().startsWith("<html>"));
- }
-
- public void testGetWikiPageInvalid010() throws Exception {
- connect010();
- getWikiPageInvalid();
- }
-
- public void testGetWikiPageInvalid011() throws Exception {
- connect011();
- getWikiPageInvalid();
- }
-
- private void getWikiPageInvalid() throws Exception {
- // get info -- non-existing version
- try {
- ((TracXmlRpcClient) repository).getWikiPageInfo("Test", 10, null);
- fail("Expected TracRemoteException");
- } catch (TracRemoteException e) {
- }
-
- // get info -- non-existing page name
- try {
- ((TracXmlRpcClient) repository).getWikiPageInfo("NoSuchPage", null);
- fail("Expected TracRemoteException");
- } catch (TracRemoteException e) {
- }
-
- // get info -- null parameter
- try {
- ((TracXmlRpcClient) repository).getWikiPageInfo(null, null);
- fail("Expected RuntimeException");
- } catch (IllegalArgumentException e) {
- }
-
- // get content -- non-existing version
- try {
- ((TracXmlRpcClient) repository).getWikiPageContent("Test", 10, null);
- fail("Expected TracRemoteException");
- } catch (TracRemoteException e) {
- }
-
- // get content -- non-existing page name
- try {
- ((TracXmlRpcClient) repository).getWikiPageContent("NoSuchPage", null);
- fail("Expected TracRemoteException");
- } catch (TracRemoteException e) {
- }
-
- // get content -- null parameter
- try {
- ((TracXmlRpcClient) repository).getWikiPageContent(null, null);
- fail("Expected RuntimeException");
- } catch (IllegalArgumentException e) {
- }
-
- // get HTML -- non-existing version
- try {
- ((TracXmlRpcClient) repository).getWikiPageHtml("Test", 10, null);
- fail("Expected TracRemoteException");
- } catch (TracRemoteException e) {
- }
-
- // get HTML -- non-existing page name
- try {
- ((TracXmlRpcClient) repository).getWikiPageHtml("NoSuchPage", null);
- fail("Expected TracRemoteException");
- } catch (TracRemoteException e) {
- }
-
- // get HTML -- null parameter
- try {
- ((TracXmlRpcClient) repository).getWikiPageHtml(null, null);
- fail("Expected RuntimeException");
- } catch (IllegalArgumentException e) {
- }
-
- // get a page -- non-existing version
- try {
- ((TracXmlRpcClient) repository).getWikiPage("Test", 10, null);
- fail("Expected TracRemoteException");
- } catch (TracRemoteException e) {
- }
-
- // get a page -- non-existing page name
- try {
- ((TracXmlRpcClient) repository).getWikiPage("NoSuchPage", null);
- fail("Expected TracRemoteException");
- } catch (TracRemoteException e) {
- }
-
- // get a page -- null parameter
- try {
- ((TracXmlRpcClient) repository).getWikiPage(null, null);
- fail("Expected RuntimeException");
- } catch (IllegalArgumentException e) {
- }
-
- // get all versions of a page -- non-existing page name
- try {
- ((TracXmlRpcClient) repository).getWikiPageInfoAllVersions("NoSuchPage", null);
- fail("Expected TracRemoteException");
- } catch (TracRemoteException e) {
- }
-
- // get all versions of a page -- null parameter
- try {
- ((TracXmlRpcClient) repository).getWikiPageInfoAllVersions(null, null);
- fail("Expected RuntimeException");
- } catch (IllegalArgumentException e) {
- }
- }
-
- public void testGetWikiPageInfoAllVersions010() throws Exception {
- connect010();
- getWikiPageInfoAllVersions();
- }
-
- public void testGetWikiPageInfoAllVersions011() throws Exception {
- connect011();
- getWikiPageInfoAllVersions();
- }
-
- private void getWikiPageInfoAllVersions() throws Exception {
- String pageName = "Test";
-
- TracWikiPageInfo[] versions = ((TracXmlRpcClient) repository).getWikiPageInfoAllVersions(pageName, null);
- assertTrue(versions.length >= 1);
- int counter = 1;
- for (TracWikiPageInfo version : versions) {
- assertTrue(version.getPageName().equals(pageName));
- assertTrue(version.getVersion() == counter++); // assuming versions are ordered increasingly
- }
- }
-
- public void testGetRecentWikiChanges010() throws Exception {
- connect010();
- getRecentWikiChanges();
- }
-
- public void testGetRecentWikiChanges011() throws Exception {
- connect011();
- getRecentWikiChanges();
- }
-
- private void getRecentWikiChanges() throws Exception {
- TracWikiPageInfo[] changes = ((TracXmlRpcClient) repository).getRecentWikiChanges(new Date(0), null);
- TracWikiPageInfo testPage = null;
- for (TracWikiPageInfo item : changes) {
- assertTrue(item.getPageName() != null);
- if (item.getPageName().equals("Test")) {
- testPage = item;
- }
- }
- assertTrue(testPage != null);
- }
-
- public void testPutWikiPage010() throws Exception {
- connect010();
- putWikiPage();
- }
-
- public void testPutWikiPage011() throws Exception {
- connect011();
- putWikiPage();
- }
-
- private void putWikiPage() throws Exception {
- // TODO: testing wiki.putPage()
- }
-}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracXmlRpcTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracXmlRpcTest.java
deleted file mode 100644
index 8fd36bb9e..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracXmlRpcTest.java
+++ /dev/null
@@ -1,505 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.trac.tests;
-
-import java.io.IOException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.Hashtable;
-import java.util.List;
-import java.util.Map;
-import java.util.Random;
-
-import junit.framework.TestCase;
-
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.xmlrpc.XmlRpcException;
-import org.apache.xmlrpc.client.XmlRpcClient;
-import org.apache.xmlrpc.client.XmlRpcClientConfigImpl;
-import org.eclipse.mylyn.context.tests.support.TestUtil;
-import org.eclipse.mylyn.context.tests.support.TestUtil.Credentials;
-import org.eclipse.mylyn.context.tests.support.TestUtil.PrivilegeLevel;
-import org.eclipse.mylyn.internal.trac.core.util.TracHttpClientTransportFactory;
-
-/**
- * Test cases for <a href="http://trac-hacks.org/wiki/XmlRpcPlugin">Trac XML-RPC Plugin</a> API. Revision 1188 or
- * higher is required.
- *
- * <p>
- * This class does not depend on any Mylar (connector) classes except for TracHttpClientTransportFactory which is needed
- * for initialization of HttpClient.
- *
- * @author Steffen Pingel
- */
-public class TracXmlRpcTest extends TestCase {
-
- public static final String XMLRPC_URL = "/login/xmlrpc";
-
- private XmlRpcClient xmlrpc;
-
- private String username;
-
- // private String password;
-
- private Random random;
-
- private ArrayList<Integer> tickets;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
-
- random = new Random();
-
- Credentials credentials = TestUtil.readCredentials(PrivilegeLevel.ADMIN);
- createConnection(new URL(TracTestConstants.TEST_TRAC_010_URL + XMLRPC_URL), credentials.username,
- credentials.password);
-
- tickets = new ArrayList<Integer>();
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
-
- for (int id : tickets) {
- call("ticket.delete", id);
- }
- }
-
- private void createConnection(URL url, String username, String password) throws Exception {
- XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
- config.setEncoding("UTF-8");
- config.setBasicUserName(username);
- config.setBasicPassword(password);
- config.setServerURL(url);
-
- xmlrpc = new XmlRpcClient();
- xmlrpc.setConfig(config);
-
- TracHttpClientTransportFactory factory = new TracHttpClientTransportFactory(xmlrpc, new HttpClient());
- xmlrpc.setTransportFactory(factory);
-
- this.username = username;
- // this.password = password;
- }
-
- private int createTicket(String summary, String description, Map<String, Object> attributes)
- throws XmlRpcException, IOException {
- int id = (Integer) call("ticket.create", summary, description, attributes);
- tickets.add(id);
- return id;
- }
-
- private Object call(String method, Object... parameters) throws XmlRpcException, IOException {
- Object result = xmlrpc.execute(method, parameters);
- if (result instanceof XmlRpcException) {
- throw (XmlRpcException) result;
- }
- return result;
- }
-
- public Map<String, Object> createMultiCall(String methodName, Object... parameters) throws XmlRpcException,
- IOException {
- Map<String, Object> table = new Hashtable<String, Object>();
- table.put("methodName", methodName);
- table.put("params", parameters);
- return table;
- }
-
- private void internalTestCrud(String module) throws XmlRpcException, IOException {
- try {
- call(module + ".delete", "foo");
- } catch (XmlRpcException e) {
- }
-
- call(module + ".create", "foo", "bar");
- try {
- assertHasValue((Object[]) call(module + ".getAll"), "foo");
- assertEquals("bar", (String) (call(module + ".get", "foo")));
-
- call(module + ".update", "foo", "baz");
- assertEquals("baz", (String) (call(module + ".get", "foo")));
- } finally {
- call(module + ".delete", "foo");
- }
- }
-
- private Object createValue(Object fieldName, Object clazz) {
- if (clazz == String.class) {
- return fieldName.toString() + random.nextInt();
- } else if (clazz == Date.class) {
- return new Date();
- } else if (clazz == Boolean.class) {
- return random.nextBoolean();
- } else if (clazz == Double.class) {
- return random.nextDouble();
- } else if (clazz == Integer.class) {
- return random.nextInt();
- }
-
- throw new RuntimeException("Invalid test data: " + fieldName + ", " + clazz);
- }
-
- private void internalTestComponent(String module, Object... fields) throws XmlRpcException, IOException {
- try {
- call(module + ".delete", "foo");
- } catch (XmlRpcException e) {
- }
-
- Map<String, Object> attributes = new Hashtable<String, Object>();
- for (int i = 0; i < fields.length; i += 2) {
- attributes.put((String) fields[i], createValue(fields[i], fields[i + 1]));
- }
-
- call(module + ".create", "foo", attributes);
-
- try {
- assertHasValue((Object[]) call(module + ".getAll"), "foo");
- Map<?, ?> values = (Map<?, ?>) call(module + ".get", "foo");
- for (String attribute : attributes.keySet()) {
- assertEquals(attributes.get(attribute), values.get(attribute));
- }
-
- for (int i = 0; i < fields.length; i += 2) {
- attributes.put((String) fields[i], createValue(fields[i], fields[i + 1]));
- }
-
- call(module + ".update", "foo", attributes);
- values = (Map<?, ?>) call(module + ".get", "foo");
- for (String attribute : attributes.keySet()) {
- assertEquals(attributes.get(attribute), values.get(attribute));
- }
- } finally {
- call(module + ".delete", "foo");
- }
- }
-
- public void testMilestoneDate() throws XmlRpcException, IOException {
- try {
- call("ticket.milestone.delete", "foo");
- } catch (XmlRpcException e) {
- }
-
- int due = (int) (System.currentTimeMillis() / 1000) + 1000;
- int completed = (int) (System.currentTimeMillis() / 1000);
-
- Map<String, Object> attributes = new Hashtable<String, Object>();
- attributes.put("description", "description");
- attributes.put("due", due);
- attributes.put("completed", completed);
-
- call("ticket.milestone.create", "foo", attributes);
-
- Map<?, ?> values = (Map<?, ?>) call("ticket.milestone.get", "foo");
- assertEquals(new Integer(due), values.get("due"));
- assertEquals(new Integer(completed), values.get("completed"));
-
- call("ticket.milestone.delete", "foo");
- }
-
- private void assertHasValue(Object[] items, Object value) {
- for (Object item : items) {
- if (item.equals(value)) {
- return;
- }
- }
- fail("Could not find expected value: " + value);
- }
-
- private void assertTicketHasAttributes(Map<String, Object> attributes, int id, Object[] ticket) {
- assertTicketHasAttributes(attributes, id, ticket, true);
- }
-
- private void assertTicketHasAttributes(Map<String, Object> attributes, int id, Object[] ticket, boolean newTicket) {
- assertEquals(id, ticket[0]);
- assertTrue(ticket[1] instanceof Integer); // time created
- // time changed
- if (newTicket) {
- assertEquals(ticket[1], ticket[2]);
- } else {
- assertTrue((Integer) ticket[2] >= (Integer) ticket[1]);
- }
- Map<?, ?> values = (Map<?, ?>) ticket[3];
- for (String attribute : attributes.keySet()) {
- assertEquals(attributes.get(attribute), values.get(attribute));
- }
- }
-
- public void testGetTicket() throws XmlRpcException, IOException {
- Map<String, Object> attributes = new Hashtable<String, Object>();
- attributes.put("type", "task");
- attributes.put("status", "closed");
- int id = createTicket("summary", "description", attributes);
-
- attributes.put("summary", "summary");
- attributes.put("description", "description");
-
- Object[] ticket = (Object[]) call("ticket.get", id);
- assertTicketHasAttributes(attributes, id, ticket);
- }
-
- public void testGetTicketNonExistant() throws XmlRpcException, IOException {
- try {
- call("ticket.delete", Integer.MAX_VALUE);
- } catch (Exception e) {
- // ignore
- }
-
- try {
- List<?> ticket = (List<?>) call("ticket.get", Integer.MAX_VALUE);
- fail("Expected XmlRpcException, got ticket instead: " + ticket);
- } catch (XmlRpcException e) {
- // ignore
- }
- }
-
- public void testGetTicketUmlaute() throws XmlRpcException, IOException {
- Map<String, Object> attributes = new Hashtable<String, Object>();
- int id = createTicket("summarya\u0308O\u030b", "\u00d8", attributes);
-
- attributes.put("summary", "summarya\u0308O\u030b");
- attributes.put("description", "\u00d8");
-
- Object[] ticket = (Object[]) call("ticket.get", id);
- assertTicketHasAttributes(attributes, id, ticket);
- }
-
- public void testUpdateTicket() throws XmlRpcException, IOException {
- int id = createTicket("summary", "description", new Hashtable<String, Object>());
-
- Map<String, Object> attributes = new Hashtable<String, Object>();
- attributes.put("summary", "changed");
- call("ticket.update", id, "my comment", attributes);
-
- attributes.put("description", "description");
-
- Object[] ticket = (Object[]) call("ticket.get", id);
- Map<?, ?> values = (Map<?, ?>) ticket[3];
- for (String attribute : attributes.keySet()) {
- assertEquals(attributes.get(attribute), values.get(attribute));
- }
- }
-
- public void testTicketCustomFields() throws XmlRpcException, IOException {
- Map<String, Object> attributes = new Hashtable<String, Object>();
- attributes.put("custom_text_field", "myvalue");
- int id = createTicket("summary", "description", attributes);
-
- // check for default values
- attributes.put("custom_checkbox_field", "1");
- attributes.put("custom_select_field", "two");
- attributes.put("custom_radio_field", "baz");
- attributes.put("custom_textarea_field", "default text");
-
- Object[] ticket = (Object[]) call("ticket.get", id);
- assertTicketHasAttributes(attributes, id, ticket);
-
- attributes.put("custom_text_field", "myvalue2");
- attributes.put("custom_checkbox_field", "0");
- attributes.put("custom_select_field", "one");
- attributes.put("custom_radio_field", "foo");
- attributes.put("custom_textarea_field", "mytext");
-
- call("ticket.update", id, "my comment", attributes);
-
- ticket = (Object[]) call("ticket.get", id);
- assertTicketHasAttributes(attributes, id, ticket, false);
- }
-
- public void testGetChangeLog() throws XmlRpcException, IOException {
- int id = createTicket("summary", "description", new Hashtable<String, Object>());
-
- Map<String, Object> attributes = new Hashtable<String, Object>();
- attributes.put("summary", "changed");
- call("ticket.update", id, "my comment", attributes);
-
- Object[] log = (Object[]) call("ticket.changeLog", id, 0);
- Object[] entry = (Object[]) log[0];
- assertTrue(entry[0] instanceof Integer); // time
- assertEquals(username, entry[1]); // author
- assertEquals("summary", entry[2]); // field
- assertEquals("summary", entry[3]); // old value
- assertEquals("changed", entry[4]); // new value
- }
-
- public void testMultiGetTicket() throws XmlRpcException, IOException {
- int id1 = createTicket("summary1", "description1", new Hashtable<String, Object>());
- int id2 = createTicket("summary2", "description2", new Hashtable<String, Object>());
-
- List<Map<?, ?>> calls = new ArrayList<Map<?, ?>>();
- calls.add(createMultiCall("ticket.get", id1));
- calls.add(createMultiCall("ticket.get", id2));
- Object[] ret = (Object[]) call("system.multicall", calls);
-
- Object[] ticket = (Object[]) ((Object[]) ret[0])[0];
- Map<String, Object> attributes = new Hashtable<String, Object>();
- attributes.put("summary", "summary1");
- attributes.put("description", "description1");
- assertTicketHasAttributes(attributes, id1, ticket);
-
- ticket = (Object[]) ((Object[]) ret[1])[0];
- attributes.clear();
- attributes.put("summary", "summary2");
- attributes.put("description", "description2");
- assertTicketHasAttributes(attributes, id2, ticket);
- }
-
- public void testAttachment() throws XmlRpcException, IOException {
- int id = createTicket("summary", "description", new Hashtable<String, Object>());
-
- String filename = (String) call("ticket.putAttachment", id, "attach.txt", "description", "data".getBytes(),
- true);
- // the returned filename may differ, since another ticket may have an
- // attachment named "attach.txt"
- // assertEquals("attach.txt", filename);
-
- Object[] ret = (Object[]) call("ticket.listAttachments", id);
- assertEquals(1, ret.length);
- Object[] attachment = (Object[]) ret[0];
- assertEquals("attach.txt", attachment[0]);
- assertEquals("description", attachment[1]);
- assertEquals(4, attachment[2]);
- // date
- assertEquals(username, attachment[4]);
-
- byte[] bytes = (byte[]) call("ticket.getAttachment", id, filename);
- String data = new String(bytes);
- assertEquals("data", data);
-
- // test override
-
- String filename2 = (String) call("ticket.putAttachment", id, filename, "newdescription", "newdata".getBytes(),
- true);
- assertEquals(filename, filename2);
- ret = (Object[]) call("ticket.listAttachments", id);
- assertEquals(1, ret.length);
- attachment = (Object[]) ret[0];
- assertEquals("attach.txt", attachment[0]);
- assertEquals("newdescription", attachment[1]);
- assertEquals(7, attachment[2]);
- // date
- assertEquals(username, attachment[4]);
- bytes = (byte[]) call("ticket.getAttachment", id, filename);
- data = new String(bytes);
- assertEquals("newdata", data);
-
- String filename3 = (String) call("ticket.putAttachment", id, "attach.txt", "description", "data".getBytes(),
- false);
- assertFalse("attach.txt".equals(filename3));
- ret = (Object[]) call("ticket.listAttachments", id);
- assertEquals(2, ret.length);
- }
-
- public void testDeleteAttachment() throws XmlRpcException, IOException {
- int id = createTicket("summary", "description", new Hashtable<String, Object>());
-
- String filename = (String) call("ticket.putAttachment", id, "attach.txt", "description", "data".getBytes(),
- true);
-
- Object[] ret = (Object[]) call("ticket.listAttachments", id);
- assertEquals(1, ret.length);
-
- call("ticket.deleteAttachment", id, filename);
-
- ret = (Object[]) call("ticket.listAttachments", id);
- assertEquals(0, ret.length);
- }
-
- public void testDuplicateAttachment() throws XmlRpcException, IOException {
- int id1 = createTicket("summary", "description", new Hashtable<String, Object>());
- int id2 = createTicket("summary", "description", new Hashtable<String, Object>());
-
- String filename1 = (String) call("ticket.putAttachment", id1, "attach.txt", "description", "data".getBytes(),
- true);
- String filename2 = (String) call("ticket.putAttachment", id2, "attach.txt", "description", "data2".getBytes(),
- true);
- assertEquals("attach.txt", filename1);
- assertEquals(filename1, filename2);
-
- byte[] bytes = (byte[]) call("ticket.getAttachment", id1, "attach.txt");
- String data = new String(bytes);
- assertEquals("data", data);
-
- bytes = (byte[]) call("ticket.getAttachment", id2, "attach.txt");
- data = new String(bytes);
- assertEquals("data2", data);
- }
-
- public void testQuery() throws XmlRpcException, IOException {
- Object[] ret = (Object[]) call("ticket.query", "summary~=foo|bar|baz");
- for (Object id : ret) {
- call("ticket.delete", (Integer) id);
- }
-
- int id1 = createTicket("foobarsum1", "description", new Hashtable<String, Object>());
- int id2 = createTicket("foobaz sum2", "description", new Hashtable<String, Object>());
- int id3 = createTicket("foobarbaz3", "foobarbaz description3", new Hashtable<String, Object>());
-
- ret = (Object[]) call("ticket.query", "summary=foobarsum1|foobaz sum2");
- assertEquals(2, ret.length);
- assertEquals(id1, ret[0]);
- assertEquals(id2, ret[1]);
-
- // the first criterium is ignored
- ret = (Object[]) call("ticket.query", "summary~=foobarsum1&summary~=foobaz sum2");
- assertEquals(1, ret.length);
- assertEquals(id2, ret[0]);
-
- ret = (Object[]) call("ticket.query", "summary~=bar|baz");
- assertEquals(3, ret.length);
-
- ret = (Object[]) call("ticket.query", "description~=foobarbaz description3");
- assertEquals(1, ret.length);
- assertEquals(id3, ret[0]);
- }
-
- public void testQueryAll() throws XmlRpcException, IOException {
- int id = createTicket("foo", "description", new Hashtable<String, Object>());
-
- Object[] ret = (Object[]) call("ticket.query", "order=id");
- assertTrue(ret.length > 0);
- assertHasValue(ret, id);
- }
-
- public void testPriorities() throws XmlRpcException, IOException {
- internalTestCrud("ticket.priority");
- }
-
- public void testSeverities() throws XmlRpcException, IOException {
- internalTestCrud("ticket.severity");
- }
-
- public void testType() throws XmlRpcException, IOException {
- internalTestCrud("ticket.type");
- }
-
- public void testStatus() throws XmlRpcException, IOException {
- internalTestCrud("ticket.status");
- }
-
- public void testResolutions() throws XmlRpcException, IOException {
- internalTestCrud("ticket.resolution");
- }
-
- public void testVersions() throws XmlRpcException, IOException {
- internalTestComponent("ticket.version", "time", Integer.class, "description", String.class);
- }
-
- public void testComponents() throws XmlRpcException, IOException {
- internalTestComponent("ticket.component", "owner", String.class, "description", String.class);
- }
-
- public void testMilestones() throws XmlRpcException, IOException {
- internalTestComponent("ticket.milestone", "due", Integer.class, "completed", Integer.class, "description",
- String.class);
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TestFixture.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TestFixture.java
deleted file mode 100644
index 010729b4e..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TestFixture.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.trac.tests.support;
-
-import org.eclipse.mylyn.context.tests.support.TestUtil;
-import org.eclipse.mylyn.context.tests.support.TestUtil.Credentials;
-import org.eclipse.mylyn.context.tests.support.TestUtil.PrivilegeLevel;
-import org.eclipse.mylyn.trac.tests.TracTestConstants;
-
-/**
- * Initializes Trac repositories to a defined state. This is done once per test run, since cleaning and initializing the
- * repository for each test method would take too long.
- *
- * @author Steffen Pingel
- */
-public class TestFixture {
-
- public static XmlRpcServer.TestData data010;
-
- /**
- * Adds the existing repository content to the test data of <code>server</code>.
- */
- private static void initializeTestData(XmlRpcServer server) throws Exception {
- server.ticketMilestone("milestone1").itemCreated();
- server.ticketMilestone("milestone2").itemCreated();
- server.ticketMilestone("milestone3").itemCreated();
- server.ticketMilestone("milestone4").itemCreated();
- server.ticketMilestone("mile&stone").itemCreated();
-
- server.ticketVersion("1.0").itemCreated();
- server.ticketVersion("2.0").itemCreated();
-
- server.ticket(1).itemCreated();
- server.ticket(2).itemCreated();
- server.ticket(3).itemCreated();
- server.ticket(4).itemCreated();
- server.ticket(5).itemCreated();
- server.ticket(6).itemCreated();
- server.ticket(7).itemCreated();
- server.ticket(8).itemCreated();
- }
-
-// private static void initializeRepository(XmlRpcServer server) throws Exception {
-// server.ticketVersion(null).deleteAll();
-// server.ticketVersion("1.0").create(0, "");
-// server.ticketVersion("2.0").create(0, "");
-//
-// server.ticketMilestone(null).deleteAll();
-// server.ticketMilestone("milestone1").create();
-// server.ticketMilestone("milestone2").create();
-// server.ticketMilestone("milestone3").create();
-// server.ticketMilestone("milestone4").create();
-//
-// server.ticket().deleteAll();
-// Ticket ticket = server.ticket().create("summary1", "description1");
-// ticket.update("comment", "milestone", "milestone1");
-// ticket = server.ticket().create("summary2", "description2");
-// ticket.update("comment", "milestone", "milestone2");
-// ticket = server.ticket().create("summary3", "description3");
-// ticket.update("comment", "milestone", "milestone2");
-// ticket = server.ticket().create("summary4", "description4");
-//
-// ticket = server.ticket().create("test html entities: ���", "���\n\nmulti\nline\n\n'''bold'''\n");
-// ticket = server.ticket().create("offline handler test", "");
-// }
-
- public static XmlRpcServer.TestData init010() throws Exception {
- if (data010 == null) {
- Credentials credentials = TestUtil.readCredentials(PrivilegeLevel.USER);
- XmlRpcServer server = new XmlRpcServer(TracTestConstants.TEST_TRAC_010_URL, credentials.username,
- credentials.password);
-
- initializeTestData(server);
- data010 = server.getData();
- }
- return data010;
- }
-
- public static void cleanup010() throws Exception {
- if (data010 != null) {
- // data010.cleanup();
- data010 = null;
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracTestCleanupUtil.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracTestCleanupUtil.java
deleted file mode 100644
index 59ac8375b..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracTestCleanupUtil.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.trac.tests.support;
-
-import org.eclipse.mylyn.context.tests.support.TestUtil.PrivilegeLevel;
-import org.eclipse.mylyn.internal.trac.core.TracException;
-import org.eclipse.mylyn.internal.trac.core.ITracClient.Version;
-import org.eclipse.mylyn.internal.trac.core.model.TracAttachment;
-import org.eclipse.mylyn.internal.trac.core.model.TracTicket;
-import org.eclipse.mylyn.trac.tests.AbstractTracClientTest;
-import org.eclipse.mylyn.trac.tests.support.XmlRpcServer.TestData;
-
-/**
- * Utility that cleans up artifacts created by the Trac test suite. This class should be run periodically to speed up
- * execution of (attachment) tests.
- *
- * @author Steffen Pingel
- */
-public class TracTestCleanupUtil extends AbstractTracClientTest {
-
- private TestData data;
-
- public TracTestCleanupUtil() {
- super(Version.XML_RPC, PrivilegeLevel.ADMIN);
- }
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
-
- data = TestFixture.init010();
- }
-
- public void testCleanup010() throws Exception {
- connect010();
- cleanup();
- }
-
- public void testCleanup011() throws Exception {
- connect011();
- cleanup();
- }
-
- private void cleanup() throws TracException {
- TracTicket ticket = repository.getTicket(data.attachmentTicketId, null);
- TracAttachment[] attachments = ticket.getAttachments();
- // skips the first attachment
- for (int i = 1; i < attachments.length; i++) {
- repository.deleteAttachment(data.attachmentTicketId, attachments[i].getFilename(), null);
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracTestUtil.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracTestUtil.java
deleted file mode 100644
index 680e93eb8..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracTestUtil.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.trac.tests.support;
-
-import org.eclipse.mylyn.internal.trac.core.ITracClient;
-import org.eclipse.mylyn.internal.trac.core.model.TracTicket;
-import org.eclipse.mylyn.internal.trac.core.model.TracTicket.Key;
-
-/**
- * @author Steffen Pingel
- */
-public class TracTestUtil {
-
- public static TracTicket createTicket(ITracClient client, String summary) throws Exception {
- TracTicket ticket = new TracTicket();
- ticket.putBuiltinValue(Key.SUMMARY, summary);
- ticket.putBuiltinValue(Key.DESCRIPTION, "");
- int id = client.createTicket(ticket, null);
- return client.getTicket(id, null);
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/XmlRpcServer.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/XmlRpcServer.java
deleted file mode 100644
index 7de05db84..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/XmlRpcServer.java
+++ /dev/null
@@ -1,364 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.trac.tests.support;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Hashtable;
-import java.util.List;
-import java.util.Map;
-import java.util.Vector;
-
-import org.apache.xmlrpc.XmlRpcException;
-import org.apache.xmlrpc.client.XmlRpcClient;
-import org.eclipse.mylyn.commons.net.WebLocation;
-import org.eclipse.mylyn.internal.trac.core.TracXmlRpcClient;
-import org.eclipse.mylyn.internal.trac.core.ITracClient.Version;
-
-/**
- * @author Steffen Pingel
- */
-public class XmlRpcServer {
-
- public abstract class AbstractTracItem {
-
- public abstract void delete() throws Exception;
-
- void itemCreated() {
- data.items.add(this);
- }
-
- void itemDeleted() {
- data.items.remove(this);
- }
-
- }
-
- /**
- * Represents a Trac type with multiple attributes such as a milestone.
- */
- public class ModelEnum extends AbstractTracItem {
-
- private final String[] attributes;
-
- private final String id;
-
- private final String module;
-
- public ModelEnum(String module, String id, String... attributes) {
- this.module = module;
- this.id = id;
- this.attributes = attributes;
- }
-
- public ModelEnum create(Object... params) throws Exception {
- call(module + ".create", id, toMap(params));
- itemCreated();
- return this;
- }
-
- @Override
- public void delete() throws Exception {
- call(module + ".delete", id);
- itemDeleted();
- }
-
- public void deleteAll() throws Exception {
- String[] ids = getAll();
- for (String id : ids) {
- call(module + ".delete", id);
- }
- }
-
- public ModelEnum deleteAndCreate(Object... params) throws Exception {
- if (Arrays.asList(getAll()).contains(id)) {
- delete();
- }
-
- return create(params);
- }
-
- @SuppressWarnings("unchecked")
- public Object[] get() throws Exception {
- Hashtable values = (Hashtable) call(module + ".get", id);
- Object[] result = new Object[values.size()];
- for (int i = 0; i < result.length && i < attributes.length; i++) {
- result[i] = values.get(attributes[i]);
- }
- return result;
- }
-
- public String[] getAll() throws Exception {
- return Arrays.asList((Object[]) call(module + ".getAll")).toArray(new String[0]);
- }
-
- private Hashtable<String, Object> toMap(Object... params) {
- Hashtable<String, Object> attrs = new Hashtable<String, Object>();
- for (int i = 0; i < attributes.length && i < params.length; i++) {
- attrs.put(attributes[i], params[i]);
- }
- return attrs;
- }
-
- public ModelEnum update(Object... params) throws Exception {
- call(module + ".update", id, toMap(params));
- return this;
- }
-
- }
-
- /**
- * Records changes to the repository.
- */
- public class TestData {
-
- // all created items
- List<AbstractTracItem> items = new ArrayList<AbstractTracItem>();
-
- // all created tickets
- public List<Ticket> tickets = new ArrayList<Ticket>();
-
- public int attachmentTicketId = 5;
-
- public int htmlEntitiesTicketId = 6;
-
- public int offlineHandlerTicketId = 7;
-
- /**
- * Undo all changes.
- */
- public void cleanup() throws Exception {
- while (!items.isEmpty()) {
- items.get(0).delete();
- }
- }
-
- }
-
- /**
- * Represents a Trac ticket.
- */
- public class Ticket extends AbstractTracItem {
-
- private Integer id;
-
- public Ticket(Integer id) {
- this.id = id;
- }
-
- public Ticket create(String summary, String description) throws Exception {
- this.id = (Integer) call("ticket.create", summary, description, new Hashtable<String, Object>());
- if (id == null) {
- throw new RuntimeException("Could not create ticket: " + summary);
- }
- itemCreated();
- return this;
- }
-
- @Override
- public void delete() throws Exception {
- call("ticket.delete", id);
- itemDeleted();
- }
-
- public void deleteAll() throws Exception {
- Integer[] ids = getAll();
- for (Integer id : ids) {
- call("ticket.delete", id);
- }
- }
-
- public Object getValue(String key) throws Exception {
- return getValues().get(key);
- }
-
- public Map<?, ?> getValues() throws Exception {
- return (Map<?, ?>) ((Object[]) call("ticket.get", id))[3];
- }
-
- public Integer[] getAll() throws Exception {
- return Arrays.asList((Object[]) call("ticket.query", "order=id")).toArray(new Integer[0]);
- }
-
- public int getId() {
- return id;
- }
-
- @Override
- protected void itemCreated() {
- super.itemCreated();
- data.tickets.add(this);
- }
-
- @Override
- protected void itemDeleted() {
- super.itemDeleted();
- data.tickets.remove(this);
- }
-
- public Ticket update(String comment, String key, String value) throws Exception {
- Hashtable<String, Object> attrs = new Hashtable<String, Object>();
- attrs.put(key, value);
- call("ticket.update", id, comment, attrs);
- return this;
- }
-
- }
-
- /**
- * Represents a Trac type that has a single attribute such as a priority.
- */
- public class TicketEnum extends AbstractTracItem {
-
- private final String id;
-
- private final String module;
-
- public TicketEnum(String module, String id) {
- this.module = module;
- this.id = id;
- }
-
- public TicketEnum create(String param) throws Exception {
- call(module + ".create", id, param);
- itemCreated();
- return this;
- }
-
- @Override
- public void delete() throws Exception {
- call(module + ".delete", id);
- itemDeleted();
- }
-
- public void deleteAll() throws Exception {
- String[] ids = getAll();
- for (String id : ids) {
- call(module + ".delete", id);
- }
- }
-
- public TicketEnum deleteAndCreate(String param) throws Exception {
- if (Arrays.asList(getAll()).contains(id)) {
- delete();
- }
-
- return create(param);
- }
-
- public String get() throws Exception {
- return (String) call(module + ".get", id);
- }
-
- public String[] getAll() throws Exception {
- return Arrays.asList((Object[]) call(module + ".getAll")).toArray(new String[0]);
- }
-
- public TicketEnum update(String param) throws Exception {
- call(module + ".update", id, param);
- return this;
- }
-
- }
-
- private final XmlRpcClient client;
-
- private final TestData data;
-
- private final String password;
-
- private final TracXmlRpcClient repository;
-
- private final String url;
-
- private final String username;
-
- public XmlRpcServer(String url, String username, String password) throws Exception {
- this.url = url;
- this.username = username;
- this.password = password;
-
- this.data = new TestData();
-
- this.repository = new TracXmlRpcClient(new WebLocation(url, username, password), Version.XML_RPC);
- this.client = repository.getClient();
- }
-
- private Object call(String method, Object... parameters) throws XmlRpcException, IOException {
- Vector<Object> params = new Vector<Object>(parameters.length);
- for (Object parameter : parameters) {
- params.add(parameter);
- }
-
- Object result = client.execute(method, params);
- if (result instanceof XmlRpcException) {
- throw (XmlRpcException) result;
- }
- return result;
- }
-
- public TestData getData() {
- return data;
- }
-
- public String getPassword() {
- return password;
- }
-
- public TracXmlRpcClient getRepository() throws MalformedURLException {
- return repository;
- }
-
- public String getUrl() {
- return url;
- }
-
- public String getUsername() {
- return username;
- }
-
- public Ticket ticket() throws Exception {
- return new Ticket(null);
- }
-
- public Ticket ticket(int id) throws Exception {
- return new Ticket(id);
- }
-
- public ModelEnum ticketComponent(String id) throws Exception {
- return new ModelEnum("ticket.component", id, "owner", "description");
- }
-
- public ModelEnum ticketMilestone(String id) throws Exception {
- return new ModelEnum("ticket.milestone", id, "due", "completed", "description");
- }
-
- public TicketEnum ticketPriority(String id) throws Exception {
- return new TicketEnum("ticket.priority", id);
- }
-
- public TicketEnum ticketSeverity(String id) throws Exception {
- return new TicketEnum("ticket.severity", id);
- }
-
- public TicketEnum ticketStatus(String id) throws Exception {
- return new TicketEnum("ticket.status", id);
- }
-
- public TicketEnum ticketType(String id) throws Exception {
- return new TicketEnum("ticket.type", id);
- }
-
- public ModelEnum ticketVersion(String id) throws Exception {
- return new ModelEnum("ticket.version", id, "time", "description");
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.ui/.classpath b/org.eclipse.mylyn.trac.ui/.classpath
deleted file mode 100644
index 304e86186..000000000
--- a/org.eclipse.mylyn.trac.ui/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/org.eclipse.mylyn.trac.ui/.cvsignore b/org.eclipse.mylyn.trac.ui/.cvsignore
deleted file mode 100644
index c5e82d745..000000000
--- a/org.eclipse.mylyn.trac.ui/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin \ No newline at end of file
diff --git a/org.eclipse.mylyn.trac.ui/.project b/org.eclipse.mylyn.trac.ui/.project
deleted file mode 100644
index 6c9ffc283..000000000
--- a/org.eclipse.mylyn.trac.ui/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.mylyn.trac.ui</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/org.eclipse.mylyn.trac.ui/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.mylyn.trac.ui/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 8b08f1b8b..000000000
--- a/org.eclipse.mylyn.trac.ui/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,340 +0,0 @@
-#Thu Apr 24 21:03:23 PDT 2008
-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=ignore
-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,NORMAL
-org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,API
-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=false
-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.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.trac.ui/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.mylyn.trac.ui/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 5e70d0848..000000000
--- a/org.eclipse.mylyn.trac.ui/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,63 +0,0 @@
-#Sat Mar 01 03:38:47 PST 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">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*******************************************************************************\n * Copyright (c) 2004, 2007 Mylyn project committers and others.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *******************************************************************************/\n\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ignore\n${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ignore</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created JavaScript files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for vars" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Jsdoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created function stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated function stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_methods=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=true
-sp_cleanup.correct_indentation=true
-sp_cleanup.format_source_code=true
-sp_cleanup.format_source_code_changes_only=false
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=true
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=true
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=true
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=true
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=true
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/org.eclipse.mylyn.trac.ui/.settings/org.eclipse.ltk.core.refactoring.prefs b/org.eclipse.mylyn.trac.ui/.settings/org.eclipse.ltk.core.refactoring.prefs
deleted file mode 100644
index 7ab03bdac..000000000
--- a/org.eclipse.mylyn.trac.ui/.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.trac.ui/.settings/org.eclipse.mylyn.tasklist.prefs b/org.eclipse.mylyn.trac.ui/.settings/org.eclipse.mylyn.tasklist.prefs
deleted file mode 100644
index 0a2cc0b30..000000000
--- a/org.eclipse.mylyn.trac.ui/.settings/org.eclipse.mylyn.tasklist.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Mon Jun 18 17:14:59 PDT 2007
-eclipse.preferences.version=1
-project.repository.kind=bugzilla
-project.repository.url=https\://bugs.eclipse.org/bugs
diff --git a/org.eclipse.mylyn.trac.ui/.settings/org.eclipse.mylyn.tasks.ui.prefs b/org.eclipse.mylyn.trac.ui/.settings/org.eclipse.mylyn.tasks.ui.prefs
deleted file mode 100644
index d8c6d26af..000000000
--- a/org.eclipse.mylyn.trac.ui/.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.trac.ui/.settings/org.eclipse.pde.prefs b/org.eclipse.mylyn.trac.ui/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index e8f2d5620..000000000
--- a/org.eclipse.mylyn.trac.ui/.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.trac.ui/META-INF/MANIFEST.MF b/org.eclipse.mylyn.trac.ui/META-INF/MANIFEST.MF
deleted file mode 100644
index ce1d89d72..000000000
--- a/org.eclipse.mylyn.trac.ui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,22 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Mylyn Trac Connector UI
-Bundle-SymbolicName: org.eclipse.mylyn.trac.ui;singleton:=true
-Bundle-Version: 3.0.0.qualifier
-Bundle-Activator: org.eclipse.mylyn.internal.trac.ui.TracUiPlugin
-Bundle-Vendor: Eclipse.org
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.jface.text,
- org.eclipse.ui,
- org.eclipse.ui.forms,
- org.eclipse.mylyn.commons.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.mylyn.tasks.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.mylyn.tasks.ui;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.mylyn.trac.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.ui;bundle-version="[3.0.0,4.0.0)"
-Bundle-ActivationPolicy: lazy
-Export-Package: org.eclipse.mylyn.internal.trac.ui;x-internal:=true,
- org.eclipse.mylyn.internal.trac.ui.editor;x-internal:=true,
- org.eclipse.mylyn.internal.trac.ui.wizard;x-internal:=true
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/org.eclipse.mylyn.trac.ui/about.html b/org.eclipse.mylyn.trac.ui/about.html
deleted file mode 100644
index 0dd939c09..000000000
--- a/org.eclipse.mylyn.trac.ui/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 7, 2007</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/org.eclipse.mylyn.trac.ui/build.properties b/org.eclipse.mylyn.trac.ui/build.properties
deleted file mode 100644
index 1976ca356..000000000
--- a/org.eclipse.mylyn.trac.ui/build.properties
+++ /dev/null
@@ -1,15 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2006 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
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- icons/,\
- about.html
-src.includes = about.html
diff --git a/org.eclipse.mylyn.trac.ui/icons/etool16/task-repository.gif b/org.eclipse.mylyn.trac.ui/icons/etool16/task-repository.gif
deleted file mode 100644
index 78470a36f..000000000
--- a/org.eclipse.mylyn.trac.ui/icons/etool16/task-repository.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.trac.ui/icons/eview16/overlay-critical.gif b/org.eclipse.mylyn.trac.ui/icons/eview16/overlay-critical.gif
deleted file mode 100644
index 41497b1df..000000000
--- a/org.eclipse.mylyn.trac.ui/icons/eview16/overlay-critical.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.trac.ui/icons/eview16/overlay-enhancement.gif b/org.eclipse.mylyn.trac.ui/icons/eview16/overlay-enhancement.gif
deleted file mode 100644
index 9a75b1efe..000000000
--- a/org.eclipse.mylyn.trac.ui/icons/eview16/overlay-enhancement.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.trac.ui/icons/eview16/overlay-trac.gif b/org.eclipse.mylyn.trac.ui/icons/eview16/overlay-trac.gif
deleted file mode 100644
index 41ed156ca..000000000
--- a/org.eclipse.mylyn.trac.ui/icons/eview16/overlay-trac.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.trac.ui/icons/eview16/trac-icon.gif b/org.eclipse.mylyn.trac.ui/icons/eview16/trac-icon.gif
deleted file mode 100644
index dd0832e3d..000000000
--- a/org.eclipse.mylyn.trac.ui/icons/eview16/trac-icon.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.trac.ui/plugin.xml b/org.eclipse.mylyn.trac.ui/plugin.xml
deleted file mode 100644
index a3d1beaa9..000000000
--- a/org.eclipse.mylyn.trac.ui/plugin.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
- <extension
- id="org.eclipse.mylyn.trac.repository"
- name="Trac Repository"
- point="org.eclipse.mylyn.tasks.ui.repositories">
- <connectorCore
- class="org.eclipse.mylyn.internal.trac.core.TracRepositoryConnector"
- id="org.eclipse.mylyn.trac.tasklist.repositories"
- name="Trac Repository Connector"/>
- <connectorUi
- brandingIcon="icons/eview16/trac-icon.gif"
- class="org.eclipse.mylyn.internal.trac.ui.TracConnectorUi"
- id="Trac Repository UI"
- overlayIcon="icons/eview16/overlay-trac.gif"/>
- <taskListFactory
- class="org.eclipse.mylyn.internal.trac.ui.TracTaskListFactory"
- id="org.eclipse.mylyn.trac.tasklist.taskListFactory"
- name="Trac Externalizer"/>
- </extension>
- <extension
- point="org.eclipse.mylyn.tasks.core.templates">
- <repository
- addAutomatically="false"
- anonymous="true"
- label="Edgewall"
- repositoryKind="trac"
- urlRepository="http://trac.edgewall.org"
- version="TRAC_0_9"/>
- </extension>
- <extension
- point="org.eclipse.mylyn.tasks.ui.editors">
- <editorFactory class="org.eclipse.mylyn.internal.trac.ui.editor.TracTaskEditorFactory"/>
- </extension>
- <extension
- point="org.eclipse.ui.workbench.texteditor.hyperlinkDetectors">
- <hyperlinkDetector
- class="org.eclipse.mylyn.internal.trac.ui.TracHyperlinkDetector"
- id="org.eclipse.mylyn.trac.ui.hyperlinksDetectors.Trac"
- name="Trac Links"
- targetId="org.eclipse.mylyn.tasks.ui.TaskEditor">
- </hyperlinkDetector>
- </extension>
-
-</plugin>
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracConnectorUi.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracConnectorUi.java
deleted file mode 100644
index af4e75053..000000000
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracConnectorUi.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.ui;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.text.hyperlink.IHyperlink;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.mylyn.internal.trac.core.ITracClient;
-import org.eclipse.mylyn.internal.trac.core.TracCorePlugin;
-import org.eclipse.mylyn.internal.trac.core.TracRepositoryConnector;
-import org.eclipse.mylyn.internal.trac.core.TracRepositoryQuery;
-import org.eclipse.mylyn.internal.trac.core.TracTask;
-import org.eclipse.mylyn.internal.trac.core.TracTask.Kind;
-import org.eclipse.mylyn.internal.trac.ui.wizard.EditTracQueryWizard;
-import org.eclipse.mylyn.internal.trac.ui.wizard.NewTracQueryWizard;
-import org.eclipse.mylyn.internal.trac.ui.wizard.TracCustomQueryPage;
-import org.eclipse.mylyn.internal.trac.ui.wizard.TracRepositorySettingsPage;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITaskMapping;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.wizards.ITaskRepositoryPage;
-import org.eclipse.mylyn.tasks.ui.wizards.ITaskSearchPage;
-import org.eclipse.mylyn.tasks.ui.wizards.NewTaskWizard;
-import org.eclipse.mylyn.tasks.ui.wizards.NewWebTaskWizard;
-
-/**
- * @author Mik Kersten
- * @author Steffen Pingel
- */
-public class TracConnectorUi extends AbstractRepositoryConnectorUi {
-
- @Override
- public IHyperlink[] findHyperlinks(TaskRepository repository, String text, int lineOffset, int regionOffset) {
- return TracHyperlinkUtil.findTicketHyperlinks(repository, text, lineOffset, regionOffset);
- }
-
- @Override
- public String getTaskKindLabel(ITask repositoryTask) {
- return "Ticket";
- }
-
- @Override
- public ITaskRepositoryPage getSettingsPage(TaskRepository taskRepository) {
- return new TracRepositorySettingsPage(taskRepository);
- }
-
- @Override
- public ITaskSearchPage getSearchPage(TaskRepository repository, IStructuredSelection selection) {
- return new TracCustomQueryPage(repository);
- }
-
- @Override
- public boolean hasSearchPage() {
- return true;
- }
-
- @Override
- public IWizard getNewTaskWizard(TaskRepository repository, ITaskMapping selection) {
- if (TracRepositoryConnector.hasRichEditor(repository)) {
- return new NewTaskWizard(repository, selection);
- } else {
- return new NewWebTaskWizard(repository, repository.getRepositoryUrl() + ITracClient.NEW_TICKET_URL,
- selection);
- }
- }
-
- @Override
- public IWizard getQueryWizard(TaskRepository repository, IRepositoryQuery query) {
- if (query instanceof TracRepositoryQuery) {
- return new EditTracQueryWizard(repository, query);
- } else {
- return new NewTracQueryWizard(repository);
- }
- }
-
- @Override
- public String getConnectorKind() {
- return TracCorePlugin.REPOSITORY_KIND;
- }
-
- @Override
- public ImageDescriptor getTaskKindOverlay(ITask task) {
- Kind kind = Kind.fromString(task.getTaskKind());
- if (kind == Kind.DEFECT) {
- return TracImages.OVERLAY_DEFECT;
- } else if (kind == Kind.ENHANCEMENT) {
- return TracImages.OVERLAY_ENHANCEMENT;
- } else if (kind == Kind.TASK) {
- return null;
- }
- return super.getTaskKindOverlay(task);
- }
-
- @Override
- public List<ITask> getLegendItems() {
- List<ITask> legendItems = new ArrayList<ITask>();
-
- TracTask defect = new TracTask("", Kind.DEFECT.name(), Kind.DEFECT.toString());
- defect.setTaskKind(Kind.DEFECT.toString());
- legendItems.add(defect);
-
- TracTask enhancement = new TracTask("", Kind.ENHANCEMENT.name(), Kind.ENHANCEMENT.toString());
- enhancement.setTaskKind(Kind.ENHANCEMENT.toString());
- legendItems.add(enhancement);
-
- TracTask task = new TracTask("", Kind.TASK.name(), Kind.TASK.toString());
- task.setTaskKind(Kind.TASK.toString());
- legendItems.add(task);
-
- return legendItems;
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkDetector.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkDetector.java
deleted file mode 100644
index f4d10a8f1..000000000
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkDetector.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.ui;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.hyperlink.AbstractHyperlinkDetector;
-import org.eclipse.jface.text.hyperlink.IHyperlink;
-import org.eclipse.mylyn.internal.trac.core.TracCorePlugin;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-/**
- * @author Steffen Pingel
- */
-public class TracHyperlinkDetector extends AbstractHyperlinkDetector {
-
- public TracHyperlinkDetector() {
- }
-
- public IHyperlink[] detectHyperlinks(ITextViewer textViewer, IRegion region, boolean canShowMultipleHyperlinks) {
- TaskRepository taskRepository = (TaskRepository) getAdapter(TaskRepository.class);
- if (taskRepository != null && TracCorePlugin.REPOSITORY_KIND.equals(taskRepository.getConnectorKind())) {
- IDocument document = textViewer.getDocument();
- if (document == null) {
- return null;
- }
-
- IRegion lineInfo;
- String line;
- try {
- lineInfo = document.getLineInformationOfOffset(region.getOffset());
- line = document.get(lineInfo.getOffset(), lineInfo.getLength());
- } catch (BadLocationException ex) {
- return null;
- }
-
- return TracHyperlinkUtil.findTracHyperlinks(taskRepository, line,
- region.getOffset() - lineInfo.getOffset(), lineInfo.getOffset());
- }
- return null;
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtil.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtil.java
deleted file mode 100644
index 19b1cb3bf..000000000
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtil.java
+++ /dev/null
@@ -1,307 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.trac.ui;
-
-import java.io.UnsupportedEncodingException;
-import java.net.URLEncoder;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.Region;
-import org.eclipse.jface.text.hyperlink.IHyperlink;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.trac.core.ITracClient;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TaskHyperlink;
-
-/**
- * Utility class for detecting Trac hyperlinks.
- *
- * @author Steffen Pingel
- */
-public class TracHyperlinkUtil {
-
- static Pattern ticketPattern = Pattern.compile("(ticket:|#)(\\d+)");
-
- static Pattern commentPattern = Pattern.compile("comment:ticket:(\\d+):(\\d+)");
-
- static Pattern reportPattern1 = Pattern.compile("report:(\\d+)");
-
- static Pattern reportPattern2 = Pattern.compile("\\{(\\d+)\\}");
-
- static Pattern changesetPattern1 = Pattern.compile("(r|changeset:)(\\d+)(/\\w+)?");
-
- static Pattern changesetPattern2 = Pattern.compile("\\[(\\d+)(/\\w+)?\\]");
-
- static Pattern revisionLogPattern1 = Pattern.compile("r(\\d+):(\\d+)");
-
- static Pattern revisionLogPattern2 = Pattern.compile("\\[(\\d+):(\\d+)\\]");
-
- static Pattern revisionLogPattern3 = Pattern.compile("log:(\\w+)?@(\\d+):(\\d+)");
-
- static Pattern diffPattern1 = Pattern.compile("diff:@(\\d+):(\\d+)");
-
- static Pattern diffPattern2 = Pattern.compile("diff:([\\w\\./-]+)(@(\\d+))?//([\\w\\./-]+)(@(\\d+))?");
-
- static Pattern wikiPattern1 = Pattern.compile("wiki:(\\w+)");
-
- static Pattern wikiPattern2 = Pattern.compile("[A-Z][a-z0-9]+[A-Z]\\w*");
-
- static Pattern milestonePattern = Pattern.compile("milestone:([\\w\\.]+)");
-
- static Pattern attachmentPattern = Pattern.compile("attachment:ticket:(\\d+):([\\w\\.]+)");
-
- static Pattern filesPattern = Pattern.compile("source:/*([\\w\\./\\-_]+)(@(\\d+)(#L(\\d+))?)?");
-
- /**
- * Detects hyperlinks to Trac tickets.
- */
- public static IHyperlink[] findTicketHyperlinks(TaskRepository repository, String text, int lineOffset,
- int regionOffset) {
- List<IHyperlink> links = null;
- Matcher m = ticketPattern.matcher(text);
- while (m.find()) {
- if (isInRegion(lineOffset, m)) {
- String id = m.group(2);
- if (links == null) {
- links = new ArrayList<IHyperlink>();
- }
- links.add(new TaskHyperlink(determineRegion(regionOffset, m), repository, id));
- }
- }
- return links == null ? null : links.toArray(new IHyperlink[0]);
- }
-
- /**
- * Detects Trac hyperlinks.
- *
- * <ul>
- * <li>Ticket comments: comment:ticket:1:2
- * <li>Reports: {1} or report:1
- * <li>Changesets: r1, [1], changeset:1 or (restricted) [1/trunk], changeset:1/trunk
- * <li>Revision log: r1:3, [1:3] or log:@1:3, log:trunk@1:3
- * <li>Diffs: diff:@1:3, diff:tags/trac-0.9.2/wiki-default//tags/trac-0.9.3/wiki-default or
- * diff:trunk/trac@3538//sandbox/vc-refactoring@3539
- * <li>Wiki pages: CamelCase or wiki:CamelCase
- * <li>Milestones: milestone:1.0
- * <li>Attachment: attachment:ticket:944:attachment.1073.diff
- * <li>Files: source:trunk/COPYING
- * <li>A specific file revision: source:/trunk/COPYING@200
- * <li>A particular line of a specific file revision: source:/trunk/COPYING@200#L25
- * </ul>
- *
- * @see http://trac.edgewall.org/wiki/TracLinks
- */
- public static IHyperlink[] findTracHyperlinks(TaskRepository repository, String text, int lineOffset,
- int regionOffset) {
- List<IHyperlink> links = new ArrayList<IHyperlink>();
-
- Matcher m = ticketPattern.matcher(text);
- while (m.find()) {
- if (isInRegion(lineOffset, m)) {
- String id = m.group(2);
- links.add(new TaskHyperlink(determineRegion(regionOffset, m), repository, id));
- }
- }
-
- m = commentPattern.matcher(text);
- while (m.find()) {
- if (isInRegion(lineOffset, m)) {
- String id = m.group(1);
- // String comment = m.group(2);
- links.add(new TaskHyperlink(determineRegion(regionOffset, m), repository, id));
- }
- }
-
- m = reportPattern1.matcher(text);
- while (m.find()) {
- if (isInRegion(lineOffset, m)) {
- String id = m.group(1);
- links.add(new WebHyperlink(determineRegion(regionOffset, m), repository.getRepositoryUrl()
- + ITracClient.REPORT_URL + id));
- }
- }
-
- m = reportPattern2.matcher(text);
- while (m.find()) {
- if (isInRegion(lineOffset, m)) {
- String id = m.group(1);
- links.add(new WebHyperlink(determineRegion(regionOffset, m), repository.getRepositoryUrl()
- + ITracClient.REPORT_URL + id));
- }
- }
-
- m = revisionLogPattern1.matcher(text);
- while (m.find()) {
- if (isInRegion(lineOffset, m)) {
- String rev = m.group(1);
- String stopRev = m.group(2);
- String url = repository.getRepositoryUrl() + ITracClient.REVISION_LOG_URL + "?rev=" + rev + "&stop_rev="
- + stopRev;
- links.add(new WebHyperlink(determineRegion(regionOffset, m), url));
- }
- }
-
- m = revisionLogPattern2.matcher(text);
- while (m.find()) {
- if (isInRegion(lineOffset, m)) {
- String rev = m.group(1);
- String stopRev = m.group(2);
- String url = repository.getRepositoryUrl() + ITracClient.REVISION_LOG_URL + "?rev=" + rev + "&stop_rev="
- + stopRev;
- links.add(new WebHyperlink(determineRegion(regionOffset, m), url));
- }
- }
-
- m = revisionLogPattern3.matcher(text);
- while (m.find()) {
- if (isInRegion(lineOffset, m)) {
- String branch = m.group(1);
- String rev = m.group(2);
- String stopRev = m.group(3);
- String url = repository.getRepositoryUrl() + ITracClient.REVISION_LOG_URL;
- if (branch != null) {
- url += branch;
- }
- url += "?rev=" + rev + "&stop_rev=" + stopRev;
- links.add(new WebHyperlink(determineRegion(regionOffset, m), url));
- }
- }
-
- m = changesetPattern1.matcher(text);
- while (m.find()) {
- if (isInRegion(lineOffset, m)) {
- String rev = m.group(2);
- String branch = m.group(3);
- String url = repository.getRepositoryUrl() + ITracClient.CHANGESET_URL + rev;
- if (branch != null) {
- url += branch;
- }
- links.add(new WebHyperlink(determineRegion(regionOffset, m), url));
- }
- }
-
- m = changesetPattern2.matcher(text);
- while (m.find()) {
- if (isInRegion(lineOffset, m)) {
- String rev = m.group(1);
- String branch = m.group(2);
- String url = repository.getRepositoryUrl() + ITracClient.CHANGESET_URL + rev;
- if (branch != null) {
- url += branch;
- }
- links.add(new WebHyperlink(determineRegion(regionOffset, m), url));
- }
- }
-
- m = diffPattern1.matcher(text);
- while (m.find()) {
- if (isInRegion(lineOffset, m)) {
- String old_rev = m.group(1);
- String new_rev = m.group(2);
- String url = repository.getRepositoryUrl() + ITracClient.CHANGESET_URL;
- url += "?new=" + new_rev + "&old=" + old_rev;
- links.add(new WebHyperlink(determineRegion(regionOffset, m), url));
- }
- }
-
- m = diffPattern2.matcher(text);
- while (m.find()) {
- if (isInRegion(lineOffset, m)) {
- String old_path = m.group(1);
- String old_rev = m.group(3);
- String new_path = m.group(4);
- String new_rev = m.group(6);
- String url = repository.getRepositoryUrl() + ITracClient.CHANGESET_URL;
- try {
- url += "?new_path=" + URLEncoder.encode(new_path, "UTF-8");
- url += "&old_path=" + URLEncoder.encode(old_path, "UTF-8");
- } catch (UnsupportedEncodingException e) {
- StatusHandler.log(new Status(IStatus.WARNING, TracUiPlugin.PLUGIN_ID, "Unexcpected exception", e));
- continue;
- }
- if (new_rev != null) {
- url += "&new=" + new_rev;
- }
- if (old_rev != null) {
- url += "&old=" + old_rev;
- }
- links.add(new WebHyperlink(determineRegion(regionOffset, m), url));
- }
- }
-
- m = wikiPattern1.matcher(text);
- while (m.find()) {
- if (isInRegion(lineOffset, m)) {
- String page = m.group(1);
- links.add(new WebHyperlink(determineRegion(regionOffset, m), repository.getRepositoryUrl() + ITracClient.WIKI_URL
- + page));
- }
- }
-
- m = wikiPattern2.matcher(text);
- while (m.find()) {
- if (isInRegion(lineOffset, m)) {
- String page = m.group(0);
- links.add(new WebHyperlink(determineRegion(regionOffset, m), repository.getRepositoryUrl() + ITracClient.WIKI_URL
- + page));
- }
- }
-
- m = milestonePattern.matcher(text);
- while (m.find()) {
- if (isInRegion(lineOffset, m)) {
- String milestone = m.group(1);
- links.add(new WebHyperlink(determineRegion(regionOffset, m), repository.getRepositoryUrl()
- + ITracClient.MILESTONE_URL + milestone));
- }
- }
-
- m = attachmentPattern.matcher(text);
- while (m.find()) {
- if (isInRegion(lineOffset, m)) {
- String id = m.group(1);
- // String attachment = m.group(2);
- links.add(new TaskHyperlink(determineRegion(regionOffset, m), repository, id));
- }
- }
-
- m = filesPattern.matcher(text);
- while (m.find()) {
- if (isInRegion(lineOffset, m)) {
- String filename = m.group(1);
- String rev = m.group(3);
- String line = m.group(5);
- String url = repository.getRepositoryUrl() + ITracClient.BROWSER_URL + filename;
- if (rev != null) {
- url += "?rev=" + rev;
- if (line != null) {
- url += "#L" + line;
- }
- }
- links.add(new WebHyperlink(determineRegion(regionOffset, m), url));
- }
- }
-
- return links.isEmpty() ? null : links.toArray(new IHyperlink[0]);
- }
-
- private static boolean isInRegion(int lineOffset, Matcher m) {
- return (lineOffset >= m.start() && lineOffset <= m.end());
- }
-
- private static IRegion determineRegion(int regionOffset, Matcher m) {
- return new Region(regionOffset + m.start(), m.end() - m.start());
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracImages.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracImages.java
deleted file mode 100644
index e7348d5f6..000000000
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracImages.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.trac.ui;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-
-/**
- * @author Shawn Minto
- * @author Mik Kersten
- * @author Steffen Pingel
- */
-public class TracImages {
-
- private static final URL baseURL = TracUiPlugin.getDefault().getBundle().getEntry("/icons/");
-
- public static final String T_VIEW = "eview16";
-
- public static final ImageDescriptor OVERLAY_DEFECT = create(T_VIEW, "overlay-critical.gif");
-
- public static final ImageDescriptor OVERLAY_ENHANCEMENT = create(T_VIEW, "overlay-enhancement.gif");
-
- private static ImageDescriptor create(String prefix, String name) {
- try {
- return ImageDescriptor.createFromURL(makeIconFileURL(prefix, name));
- } catch (MalformedURLException e) {
- return ImageDescriptor.getMissingImageDescriptor();
- }
- }
-
- private static URL makeIconFileURL(String prefix, String name) throws MalformedURLException {
- if (baseURL == null) {
- throw new MalformedURLException();
- }
-
- StringBuilder buffer = new StringBuilder(prefix);
- if (prefix != "") {
- buffer.append('/');
- }
- buffer.append(name);
- return new URL(baseURL, buffer.toString());
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracTaskListFactory.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracTaskListFactory.java
deleted file mode 100644
index 9d8d51740..000000000
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracTaskListFactory.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.ui;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractTaskListFactory;
-import org.eclipse.mylyn.internal.trac.core.TracRepositoryQuery;
-import org.eclipse.mylyn.internal.trac.core.TracTask;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.w3c.dom.Element;
-
-/**
- * @author Steffen Pingel
- * @author Mik Kersten
- */
-public class TracTaskListFactory extends AbstractTaskListFactory {
-
- private static final String KEY_TRAC = "Trac";
-
- private static final String KEY_TRAC_TASK = KEY_TRAC + AbstractTaskListFactory.KEY_TASK;
-
- private static final String KEY_TRAC_QUERY = KEY_TRAC + AbstractTaskListFactory.KEY_QUERY;
-
- private static final String KEY_SUPPORTS_SUBTASKS = "SupportsSubtasks";
-
- @Override
- public String getTaskElementName() {
- return KEY_TRAC_TASK;
- }
-
- @Override
- public Set<String> getQueryElementNames() {
- Set<String> names = new HashSet<String>();
- names.add(KEY_TRAC_QUERY);
- return names;
- }
-
- @Override
- public boolean canCreate(ITask task) {
- return task instanceof TracTask;
- }
-
- @Override
- public boolean canCreate(IRepositoryQuery category) {
- return category instanceof TracRepositoryQuery;
- }
-
- @Override
- public String getQueryElementName(IRepositoryQuery query) {
- return query instanceof TracRepositoryQuery ? KEY_TRAC_QUERY : "";
- }
-
- @Override
- public AbstractTask createTask(String repositoryUrl, String taskId, String summary, Element element) {
- boolean supportsSubtasks = false;
- if (element.hasAttribute(KEY_SUPPORTS_SUBTASKS)) {
- supportsSubtasks = Boolean.valueOf(element.getAttribute(KEY_SUPPORTS_SUBTASKS));
- }
-
- TracTask task = new TracTask(repositoryUrl, taskId, summary);
- task.setSupportsSubtasks(supportsSubtasks);
- return task;
- }
-
- @Override
- public RepositoryQuery createQuery(String repositoryUrl, String queryString, String label, Element element) {
- return new TracRepositoryQuery(repositoryUrl, queryString, label);
- }
-}
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracUiPlugin.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracUiPlugin.java
deleted file mode 100644
index 58e97beb9..000000000
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracUiPlugin.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.trac.ui;
-
-import org.eclipse.mylyn.internal.trac.core.TracCorePlugin;
-import org.eclipse.mylyn.tasks.ui.TaskRepositoryLocationUiFactory;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * @author Mik Kersten
- * @author Steffen Pingel
- */
-public class TracUiPlugin extends AbstractUIPlugin {
-
- public static final String PLUGIN_ID = "org.eclipse.mylyn.trac.ui";
-
- public final static String TITLE_MESSAGE_DIALOG = "Mylyn Trac Client";
-
- public static final String NEW_BUG_EDITOR_ID = PLUGIN_ID + ".newBugEditor";
-
- private static TracUiPlugin plugin;
-
- public TracUiPlugin() {
- plugin = this;
- }
-
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
-
- TracCorePlugin.getDefault().getConnector().setTaskRepositoryLocationFactory(
- new TaskRepositoryLocationUiFactory());
- TasksUi.getRepositoryManager().addListener(TracCorePlugin.getDefault().getConnector().getClientManager());
- }
-
- @Override
- public void stop(BundleContext context) throws Exception {
- TasksUi.getRepositoryManager().removeListener(
- TracCorePlugin.getDefault().getConnector().getClientManager());
-
- plugin = null;
- super.stop(context);
- }
-
- public static TracUiPlugin getDefault() {
- return plugin;
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/WebHyperlink.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/WebHyperlink.java
deleted file mode 100644
index 4431531f4..000000000
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/WebHyperlink.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.trac.ui;
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.hyperlink.IHyperlink;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-
-/**
- * Encapsulates link from text to a URL.
- *
- * @author Steffen Pingel
- * @since 2.0
- */
-public class WebHyperlink implements IHyperlink {
-
- private final IRegion region;
-
- private final String url;
-
- public WebHyperlink(IRegion region, String url) {
- this.region = region;
- this.url = url;
- }
-
- public IRegion getHyperlinkRegion() {
- return region;
- }
-
- public String getTypeLabel() {
- return null;
- }
-
- public String getHyperlinkText() {
- return "Open URL " + url;
- }
-
- public void open() {
- TasksUiUtil.openTask(url);
- }
-
- public String getURLString() {
- return url;
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/NewTracTaskEditor.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/NewTracTaskEditor.java
deleted file mode 100644
index 2c010b438..000000000
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/NewTracTaskEditor.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.ui.editor;
-
-import org.eclipse.jface.fieldassist.ContentProposalAdapter;
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractLegacyDuplicateDetector;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskAttribute;
-import org.eclipse.mylyn.internal.tasks.ui.deprecated.AbstractNewRepositoryTaskEditor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.fieldassist.ContentAssistCommandAdapter;
-import org.eclipse.ui.forms.editor.FormEditor;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-import org.eclipse.ui.forms.widgets.Section;
-
-/**
- * @author Steffen Pingel
- */
-public class NewTracTaskEditor extends AbstractNewRepositoryTaskEditor {
-
- public NewTracTaskEditor(FormEditor editor) {
- super(editor);
- }
-
- @Override
- public AbstractLegacyDuplicateDetector getDuplicateDetector(String name) {
- return new TracDuplicateDetector();
- }
-
- @Override
- protected void createPeopleLayout(Composite composite) {
- FormToolkit toolkit = getManagedForm().getToolkit();
- Section peopleSection = createSection(composite, getSectionLabel(SECTION_NAME.PEOPLE_SECTION));
- GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL).grab(true, true).applyTo(peopleSection);
- Composite peopleComposite = toolkit.createComposite(peopleSection);
- GridLayout layout = new GridLayout(2, false);
- layout.marginRight = 5;
- peopleComposite.setLayout(layout);
- GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL).grab(true, true).applyTo(peopleComposite);
-
- Label label = toolkit.createLabel(peopleComposite, "Assign to:");
- GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(label);
- Composite textFieldComposite = toolkit.createComposite(peopleComposite);
- GridDataFactory.fillDefaults().grab(true, false).applyTo(textFieldComposite);
- GridLayout textLayout = new GridLayout();
- textFieldComposite.setLayout(textLayout);
-
- RepositoryTaskAttribute attribute = taskData.getAttribute(RepositoryTaskAttribute.USER_ASSIGNED);
-
- Text textField = createTextField(textFieldComposite, attribute, SWT.FLAT);
- toolkit.paintBordersFor(textFieldComposite);
- GridDataFactory.fillDefaults().grab(true, false).applyTo(textField);
- peopleSection.setClient(peopleComposite);
-
- ContentAssistCommandAdapter adapter = applyContentAssist(textField, createContentProposalProvider(attribute));
-
- ILabelProvider propsalLabelProvider = createProposalLabelProvider(attribute);
- if (propsalLabelProvider != null) {
- adapter.setLabelProvider(propsalLabelProvider);
- }
- adapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
-
- toolkit.paintBordersFor(peopleComposite);
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracDuplicateDetector.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracDuplicateDetector.java
deleted file mode 100644
index 660f34e2d..000000000
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracDuplicateDetector.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.ui.editor;
-
-import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractLegacyDuplicateDetector;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-import org.eclipse.mylyn.internal.trac.core.ITracClient;
-import org.eclipse.mylyn.internal.trac.core.TracRepositoryQuery;
-import org.eclipse.mylyn.internal.trac.core.model.TracSearch;
-import org.eclipse.mylyn.internal.trac.core.model.TracSearchFilter;
-import org.eclipse.mylyn.internal.trac.core.model.TracSearchFilter.CompareOperator;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-public class TracDuplicateDetector extends AbstractLegacyDuplicateDetector {
-
- @Override
- public RepositoryQuery getDuplicatesQuery(TaskRepository repository, RepositoryTaskData taskData) {
- TracSearchFilter filter = new TracSearchFilter("description");
- filter.setOperator(CompareOperator.CONTAINS);
-
- String searchString = AbstractLegacyDuplicateDetector.getStackTraceFromDescription(taskData.getDescription());
-
- filter.addValue(searchString);
-
- TracSearch search = new TracSearch();
- search.addFilter(filter);
-
- // TODO copied from TracCustomQueryPage.getQueryUrl()
- StringBuilder sb = new StringBuilder();
- sb.append(repository.getRepositoryUrl());
- sb.append(ITracClient.QUERY_URL);
- sb.append(search.toUrl());
-
- TracRepositoryQuery query = new TracRepositoryQuery(repository.getRepositoryUrl(), sb.toString(),
- "<Duplicate Search>");
- return query;
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracRenderingEngine.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracRenderingEngine.java
deleted file mode 100644
index 3d5ad65d0..000000000
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracRenderingEngine.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.ui.editor;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.mylyn.internal.trac.core.ITracClient;
-import org.eclipse.mylyn.internal.trac.core.TracCorePlugin;
-import org.eclipse.mylyn.internal.trac.core.TracException;
-import org.eclipse.mylyn.internal.trac.core.TracXmlRpcClient;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractRenderingEngine;
-
-/**
- *
- * @author Xiaoyang Guan
- * @since 2.1
- */
-public class TracRenderingEngine extends AbstractRenderingEngine {
-
- /**
- * generate HTML preview page for <code>text</code>
- */
- @Override
- public String renderAsHtml(TaskRepository repository, String text, IProgressMonitor monitor) throws CoreException {
- monitor.beginTask("Render HTML Preview", IProgressMonitor.UNKNOWN);
- try {
- ITracClient client = TracCorePlugin.getDefault()
- .getConnector()
- .getClientManager()
- .getTracClient(repository);
- if (client instanceof TracXmlRpcClient) {
- TracXmlRpcClient tracXmlRpcClient = (TracXmlRpcClient) client;
- String htmlText = tracXmlRpcClient.wikiToHtml(text, monitor);
- if (monitor.isCanceled()) {
- throw new OperationCanceledException();
- }
-
- String htmlHeader = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">"
- + "<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"en\" xml:lang=\"en\">"
- + "<head>"
- + "<link rel=\"stylesheet\" href=\"REPOSITORY_URL/chrome/common/css/trac.css\" type=\"text/css\" />"
- + "<link rel=\"stylesheet\" href=\"REPOSITORY_URL/chrome/common/css/wiki.css\" type=\"text/css\" />"
- + "<link rel=\"icon\" href=\"REPOSITORY_URL/chrome/common/trac.ico\" type=\"image/x-icon\" />"
- + "<link rel=\"shortcut icon\" href=\"EPOSITORY_URL/chrome/common/trac.ico\" type=\"image/x-icon\" />"
- + "<style type=\"text/css\">body {background: #f4f4f4 url(REPOSITORY_URL/chrome/common/draft.png);margin: 0;padding: 0;}</style>"
- + "</head>";
- String htmlBody = "<body> " + htmlText + "</body>";
- String htmlFooter = "</html>";
-
- String html = htmlHeader.replace("REPOSITORY_URL", repository.getRepositoryUrl()) + htmlBody + htmlFooter;
- return html;
- } else {
- throw new CoreException(TracCorePlugin.toStatus(new TracException(
- "Preview is available only in XML-RPC access mode"), repository));
- }
- } catch (TracException e) {
- throw new CoreException(TracCorePlugin.toStatus(e, repository));
- } finally {
- monitor.done();
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracTaskEditor.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracTaskEditor.java
deleted file mode 100644
index b79d969f6..000000000
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracTaskEditor.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.ui.editor;
-
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryOperation;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskAttribute;
-import org.eclipse.mylyn.internal.tasks.ui.deprecated.AbstractRepositoryTaskEditor;
-import org.eclipse.mylyn.internal.trac.core.TracAttributeFactory;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractRenderingEngine;
-import org.eclipse.ui.forms.editor.FormEditor;
-
-/**
- * @author Steffen Pingel
- * @author Xiaoyang Guan (Wiki HTML preview)
- */
-public class TracTaskEditor extends AbstractRepositoryTaskEditor {
-
- private final TracRenderingEngine renderingEngine = new TracRenderingEngine();
-
- public TracTaskEditor(FormEditor editor) {
- super(editor);
- }
-
- @Override
- protected void validateInput() {
- }
-
- @Override
- protected AbstractRenderingEngine getRenderingEngine() {
- return renderingEngine;
- }
-
- public TaskRepository getRepository() {
- return repository;
- }
-
- @Override
- protected boolean hasContentAssist(RepositoryTaskAttribute attribute) {
- return TracAttributeFactory.Attribute.NEW_CC.getTaskKey().equals(attribute.getId());
- }
-
- @Override
- protected boolean hasContentAssist(RepositoryOperation repositoryOperation) {
- return "owner".equals(repositoryOperation.getInputName());
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracTaskEditorFactory.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracTaskEditorFactory.java
deleted file mode 100644
index 3b8d899bf..000000000
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracTaskEditorFactory.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.ui.editor;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.tasks.ui.deprecated.AbstractTaskEditorFactory;
-import org.eclipse.mylyn.internal.tasks.ui.deprecated.RepositoryTaskEditorInput;
-import org.eclipse.mylyn.internal.trac.core.TracCorePlugin;
-import org.eclipse.mylyn.internal.trac.core.TracRepositoryConnector;
-import org.eclipse.mylyn.internal.trac.core.TracTask;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.mylyn.tasks.ui.editors.BrowserFormPage;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditorInput;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-
-/**
- * @author Steffen Pingel
- */
-public class TracTaskEditorFactory extends AbstractTaskEditorFactory {
-
- private static final String TITLE = "Browser";
-
- @Override
- public boolean canCreateEditorFor(ITask task) {
- return (task instanceof TracTask);
- }
-
- @Override
- public boolean canCreateEditorFor(IEditorInput input) {
- if (input instanceof RepositoryTaskEditorInput) {
- RepositoryTaskEditorInput taskInput = (RepositoryTaskEditorInput) input;
- return taskInput.getTaskData() != null
- && TracCorePlugin.REPOSITORY_KIND.equals(taskInput.getRepository().getConnectorKind());
- } else if (input instanceof TaskEditorInput) {
- TaskEditorInput taskInput = (TaskEditorInput) input;
- return taskInput.getTask() instanceof TracTask;
- }
-
- return false;
- }
-
- @Override
- public IEditorPart createEditor(TaskEditor parentEditor, IEditorInput editorInput) {
- if (editorInput instanceof RepositoryTaskEditorInput) {
- RepositoryTaskEditorInput taskInput = (RepositoryTaskEditorInput) editorInput;
- if (taskInput.getTaskData().isNew()) {
- return new NewTracTaskEditor(parentEditor);
- } else {
- return new TracTaskEditor(parentEditor);
- }
- } else if (editorInput instanceof TaskEditorInput) {
- TaskRepository repository = TasksUi.getRepositoryManager().getRepository(TracCorePlugin.REPOSITORY_KIND,
- ((TaskEditorInput) editorInput).getTask().getRepositoryUrl());
- if (TracRepositoryConnector.hasRichEditor(repository)) {
- // the editor is actually initialized with a RepositoryTaskEditorInput, see bug 193430
- return new TracTaskEditor(parentEditor);
- } else {
- return new BrowserFormPage(parentEditor, TITLE);
- }
- }
- return null;
- }
-
- @Override
- public IEditorInput createEditorInput(ITask task) {
- TracTask tracTask = (TracTask) task;
- TaskRepository repository = TasksUi.getRepositoryManager().getRepository(TracCorePlugin.REPOSITORY_KIND,
- tracTask.getRepositoryUrl());
- if (TracRepositoryConnector.hasRichEditor(repository)) {
- return new RepositoryTaskEditorInput(repository, tracTask.getTaskId(), tracTask.getUrl());
- } else {
- return new TaskEditorInput(repository, task) {
- @Override
- public ImageDescriptor getImageDescriptor() {
- return CommonImages.BROWSER_SMALL;
- }
- };
- }
- }
-
- @Override
- public String getTitle() {
- return "Trac";
- }
-
- @Override
- public boolean providesOutline() {
- return true;
- }
-}
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/EditTracQueryWizard.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/EditTracQueryWizard.java
deleted file mode 100644
index 7c39da879..000000000
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/EditTracQueryWizard.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.ui.wizard;
-
-import org.eclipse.mylyn.internal.tasks.ui.deprecated.AbstractRepositoryQueryWizard;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-/**
- * @author Steffen Pingel
- */
-public class EditTracQueryWizard extends AbstractRepositoryQueryWizard {
-
-// private TracCustomQueryPage queryPage;
-
- public EditTracQueryWizard(TaskRepository repository, IRepositoryQuery query) {
- super(repository, query);
- }
-
- @Override
- public void addPages() {
- page = new TracCustomQueryPage(repository, query);
- page.setWizard(this);
- addPage(page);
- }
-
- @Override
- public boolean canFinish() {
- if (page.getNextPage() == null) {
- return page.isPageComplete();
- }
- return page.getNextPage().isPageComplete();
- }
-
-// @Override
-// public boolean performFinish() {
-// AbstractRepositoryQuery q = queryPage.getQuery();
-// if (q != null) {
-// TasksUiPlugin.getTaskList().deleteQuery(query);
-// TasksUiPlugin.getTaskList().addQuery(q);
-//
-// AbstractRepositoryConnector connector = TasksUiPlugin.getRepositoryManager().getRepositoryConnector(
-// repository.getKind());
-// if (connector != null) {
-// TasksUiPlugin.getSynchronizationManager().synchronize(connector, q, null);
-// }
-// }
-//
-// return true;
-// }
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/NewTracQueryWizard.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/NewTracQueryWizard.java
deleted file mode 100644
index 0702dfffc..000000000
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/NewTracQueryWizard.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.ui.wizard;
-
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractLegacyRepositoryConnector;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-
-/**
- * @author Steffen Pingel
- */
-public class NewTracQueryWizard extends Wizard {
-
- private static final String TITLE = "New Trac Query";
-
- private final TaskRepository repository;
-
- private TracCustomQueryPage queryPage;
-
- public NewTracQueryWizard(TaskRepository repository) {
- this.repository = repository;
-
- setNeedsProgressMonitor(true);
- setWindowTitle(TITLE);
- setDefaultPageImageDescriptor(TasksUiImages.BANNER_REPOSITORY);
- }
-
- @Override
- public void addPages() {
- queryPage = new TracCustomQueryPage(repository);
- queryPage.setWizard(this);
- addPage(queryPage);
- }
-
- @Override
- public boolean canFinish() {
- return queryPage.isPageComplete();
- }
-
- @Override
- public boolean performFinish() {
- RepositoryQuery query = queryPage.getQuery();
- if (query != null) {
- TasksUiInternal.getTaskList().addQuery(query);
- AbstractLegacyRepositoryConnector connector = (AbstractLegacyRepositoryConnector) TasksUi.getRepositoryManager()
- .getRepositoryConnector(repository.getConnectorKind());
- if (connector != null) {
- TasksUiInternal.synchronizeQuery(connector, query, null, true);
- }
- }
- return true;
- }
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/NewTracTaskPage.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/NewTracTaskPage.java
deleted file mode 100644
index 5f44b670c..000000000
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/NewTracTaskPage.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.ui.wizard;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractAttributeFactory;
-import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.internal.trac.core.ITracClient;
-import org.eclipse.mylyn.internal.trac.core.TracCorePlugin;
-import org.eclipse.mylyn.internal.trac.core.TracException;
-import org.eclipse.mylyn.internal.trac.core.TracRepositoryConnector;
-import org.eclipse.mylyn.internal.trac.core.TracTaskDataHandler;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * Wizard page for creating new Trac tickets through a rich editor.
- *
- * @author Steffen Pingel
- */
-public class NewTracTaskPage extends WizardPage {
-
- // private boolean firstTime;
-
- private final TaskRepository taskRepository;
-
- private RepositoryTaskData taskData;
-
- public NewTracTaskPage(TaskRepository taskRepository) {
- super("New Task");
-
- setTitle("Create via Rich Editor");
- setDescription("This will open an editor that can be used to create a new task.");
-
- this.taskRepository = taskRepository;
- }
-
- public void createControl(Composite parent) {
- Text text = new Text(parent, SWT.WRAP);
- text.setEditable(false);
- setControl(text);
- }
-
- @Override
- public void setVisible(boolean visible) {
- super.setVisible(visible);
-
- // if (visible && firstTime) {
- // firstTime = false;
- // if (!hasAttributes()) {
- // // delay the execution so the dialog's progress bar is visible
- // // when the attributes are updated
- // Display.getDefault().asyncExec(new Runnable() {
- // public void run() {
- // if (getControl() != null && !getControl().isDisposed()) {
- // updateAttributesFromRepository();
- // }
- // }
- // });
- // }
- // }
- updateAttributesFromRepository();
- }
-
- // private boolean hasAttributes() {
- // TracRepositoryConnector connector = (TracRepositoryConnector)
- // TasksUiPlugin.getRepositoryManager()
- // .getRepositoryConnector(TracCorePlugin.REPOSITORY_KIND);
- // try {
- // ITracClient client =
- // connector.getClientManager().getRepository(taskRepository);
- // return client.hasAttributes();
- // } catch (MalformedURLException e) {
- // return false;
- // }
- // }
-
- @Override
- public boolean isPageComplete() {
- return taskData != null;
- }
-
- private void updateAttributesFromRepository() {
- TracRepositoryConnector connector = (TracRepositoryConnector) TasksUi.getRepositoryManager()
- .getRepositoryConnector(TracCorePlugin.REPOSITORY_KIND);
- final ITracClient client = connector.getClientManager().getTracClient(taskRepository);
-
- if (!client.hasAttributes()) {
- try {
- IRunnableWithProgress runnable = new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- client.updateAttributes(monitor, true);
- } catch (TracException e) {
- throw new InvocationTargetException(e);
- }
- }
- };
-
- getContainer().run(true, true, runnable);
- } catch (InvocationTargetException e) {
- TasksUiInternal.displayStatus("Error updating attributes", TracCorePlugin.toStatus(e.getCause(),
- taskRepository));
- return;
- } catch (InterruptedException e) {
- return;
- }
- }
-
- TracTaskDataHandler offlineHandler = (TracTaskDataHandler) connector.getLegacyTaskDataHandler();
- AbstractAttributeFactory attributeFactory = offlineHandler.getAttributeFactory(taskRepository.getRepositoryUrl(),
- taskRepository.getConnectorKind(), AbstractTask.DEFAULT_TASK_KIND);
- this.taskData = new RepositoryTaskData(attributeFactory, TracCorePlugin.REPOSITORY_KIND,
- taskRepository.getRepositoryUrl(), TasksUiPlugin.getDefault().getNextNewRepositoryTaskId());
- this.taskData.setNew(true);
- TracTaskDataHandler.createDefaultAttributes(taskData.getAttributeFactory(), taskData, client, false);
- }
-
- public RepositoryTaskData getRepositoryTaskData() {
- return taskData;
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracCustomQueryPage.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracCustomQueryPage.java
deleted file mode 100644
index 9e740a40f..000000000
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracCustomQueryPage.java
+++ /dev/null
@@ -1,770 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- *******************************************************************************/
-package org.eclipse.mylyn.internal.trac.ui.wizard;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.internal.trac.core.ITracClient;
-import org.eclipse.mylyn.internal.trac.core.TracCorePlugin;
-import org.eclipse.mylyn.internal.trac.core.TracException;
-import org.eclipse.mylyn.internal.trac.core.TracRepositoryConnector;
-import org.eclipse.mylyn.internal.trac.core.TracRepositoryQuery;
-import org.eclipse.mylyn.internal.trac.core.model.TracSearch;
-import org.eclipse.mylyn.internal.trac.core.model.TracSearchFilter;
-import org.eclipse.mylyn.internal.trac.core.model.TracSearchFilter.CompareOperator;
-import org.eclipse.mylyn.internal.trac.ui.TracUiPlugin;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.mylyn.tasks.ui.wizards.AbstractRepositoryQueryPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.KeyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.List;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.progress.IProgressService;
-
-/**
- * Trac search page. Provides a form similar to the one the Bugzilla connector uses.
- *
- * @author Steffen Pingel
- */
-public class TracCustomQueryPage extends AbstractRepositoryQueryPage {
-
- private static final String TITLE = "Enter query parameters";
-
- private static final String DESCRIPTION = "If attributes are blank or stale press the Update button.";
-
- private static final String TITLE_QUERY_TITLE = "Query Title:";
-
- private final TracRepositoryQuery query;
-
- private Text titleText;
-
- private static final int PRODUCT_HEIGHT = 60;
-
- private static final int STATUS_HEIGHT = 40;
-
- protected final static String PAGE_NAME = "TracSearchPage"; //$NON-NLS-1$
-
- private static final String SEARCH_URL_ID = PAGE_NAME + ".SEARCHURL";
-
- protected Combo summaryText = null;
-
- protected Combo repositoryCombo = null;
-
- private TextSearchField summaryField;
-
- private TextSearchField descriptionField;
-
- private ListSearchField componentField;
-
- private ListSearchField versionField;
-
- private ListSearchField milestoneField;
-
- private ListSearchField priorityField;
-
- private ListSearchField typeField;
-
- private ListSearchField resolutionField;
-
- private ListSearchField statusField;
-
- private Button updateButton;
-
- private TextSearchField keywordsField;
-
- private final Map<String, SearchField> searchFieldByName = new HashMap<String, SearchField>();
-
- private boolean firstTime = true;
-
- // private UserSearchField ownerField;
- //
- // private UserSearchField reporterField;
- //
- // private UserSearchField ccField;
-
- public TracCustomQueryPage(TaskRepository repository, IRepositoryQuery query) {
- super(TITLE, repository);
- this.query = (TracRepositoryQuery) query;
- setTitle(TITLE);
- setDescription(DESCRIPTION);
- }
-
- public TracCustomQueryPage(TaskRepository repository) {
- this(repository, null);
- }
-
- public void createControl(Composite parent) {
- Composite control = new Composite(parent, SWT.NONE);
- GridData gd = new GridData(GridData.FILL_BOTH);
- control.setLayoutData(gd);
- GridLayout layout = new GridLayout(4, false);
- if (inSearchContainer()) {
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- }
- control.setLayout(layout);
-
- createTitleGroup(control);
-
- summaryField = new TextSearchField("summary");
- summaryField.createControls(control, "Summary");
-
- descriptionField = new TextSearchField("description");
- descriptionField.createControls(control, "Description");
-
- keywordsField = new TextSearchField("keywords");
- keywordsField.createControls(control, "Keywords");
-
- createOptionsGroup(control);
-
- createUserGroup(control);
-
- if (query != null) {
- titleText.setText(query.getSummary());
- restoreWidgetValues(query.getTracSearch());
- }
-
- setControl(control);
- }
-
- @Override
- public boolean canFlipToNextPage() {
- return false;
- }
-
- private void restoreWidgetValues(TracSearch search) {
- java.util.List<TracSearchFilter> filters = search.getFilters();
- for (TracSearchFilter filter : filters) {
- SearchField field = searchFieldByName.get(filter.getFieldName());
- if (field != null) {
- field.setFilter(filter);
- } else {
- StatusHandler.log(new Status(IStatus.WARNING, TracUiPlugin.PLUGIN_ID,
- "Ignoring invalid search filter: " + filter));
- }
- }
- }
-
- private void createTitleGroup(Composite control) {
- if (inSearchContainer()) {
- return;
- }
-
- Label titleLabel = new Label(control, SWT.NONE);
- titleLabel.setText(TITLE_QUERY_TITLE);
-
- titleText = new Text(control, SWT.BORDER);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
- gd.horizontalSpan = 3;
- titleText.setLayoutData(gd);
- titleText.addKeyListener(new KeyListener() {
- public void keyPressed(KeyEvent e) {
- // ignore
- }
-
- public void keyReleased(KeyEvent e) {
- getContainer().updateButtons();
- }
- });
- }
-
- protected Control createOptionsGroup(Composite control) {
- Group group = new Group(control, SWT.NONE);
- // group.setText("Ticket Attributes");
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- group.setLayout(layout);
- GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
- gd.horizontalSpan = 4;
- group.setLayoutData(gd);
-
- createProductAttributes(group);
- createTicketAttributes(group);
- createUpdateButton(group);
-
- return group;
- }
-
- protected void createUserGroup(Composite control) {
- UserSearchField userField = new UserSearchField();
- userField.createControls(control);
- }
-
- /**
- * Creates the area for selection on product attributes component/version/milestone.
- */
- protected Control createProductAttributes(Composite control) {
- Composite group = new Composite(control, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
- group.setLayout(layout);
- GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
- gd.horizontalSpan = 1;
- group.setLayoutData(gd);
-
- Label label = new Label(group, SWT.LEFT);
- label.setText("Component");
-
- label = new Label(group, SWT.LEFT);
- label.setText("Version");
-
- label = new Label(group, SWT.LEFT);
- label.setText("Milestone");
-
- componentField = new ListSearchField("component");
- componentField.createControls(group, PRODUCT_HEIGHT);
-
- versionField = new ListSearchField("version");
- versionField.createControls(group, PRODUCT_HEIGHT);
-
- milestoneField = new ListSearchField("milestone");
- milestoneField.createControls(group, PRODUCT_HEIGHT);
-
- return group;
- }
-
- /**
- * Creates the area for selection of ticket attributes status/resolution/priority.
- */
- protected Control createTicketAttributes(Composite control) {
- Composite group = new Composite(control, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 4;
- group.setLayout(layout);
- GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
- gd.horizontalSpan = 1;
- group.setLayoutData(gd);
-
- Label label = new Label(group, SWT.LEFT);
- label.setText("Status");
-
- label = new Label(group, SWT.LEFT);
- label.setText("Resolution");
-
- label = new Label(group, SWT.LEFT);
- label.setText("Type");
-
- label = new Label(group, SWT.LEFT);
- label.setText("Priority");
-
- statusField = new ListSearchField("status");
- statusField.createControls(group, STATUS_HEIGHT);
-
- resolutionField = new ListSearchField("resolution");
- resolutionField.createControls(group, STATUS_HEIGHT);
-
- typeField = new ListSearchField("type");
- typeField.createControls(group, STATUS_HEIGHT);
-
- priorityField = new ListSearchField("priority");
- priorityField.createControls(group, STATUS_HEIGHT);
-
- return group;
- }
-
- protected Control createUpdateButton(final Composite control) {
- Composite group = new Composite(control, SWT.NONE);
- GridLayout layout = new GridLayout(2, false);
- group.setLayout(layout);
- group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- updateButton = new Button(group, SWT.PUSH);
- updateButton.setText("Update Attributes from Repository");
- updateButton.setLayoutData(new GridData());
- updateButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (getTaskRepository() != null) {
- updateAttributesFromRepository(true);
- } else {
- MessageDialog.openInformation(Display.getCurrent().getActiveShell(),
- TracUiPlugin.TITLE_MESSAGE_DIALOG, TaskRepositoryManager.MESSAGE_NO_REPOSITORY);
- }
- }
- });
-
- return group;
- }
-
- @Override
- public void setVisible(boolean visible) {
- super.setVisible(visible);
-
- if (getSearchContainer() != null) {
- getSearchContainer().setPerformActionEnabled(true);
- }
-
- if (visible && firstTime) {
- firstTime = false;
- if (!hasAttributes()) {
- // delay the execution so the dialog's progress bar is visible
- // when the attributes are updated
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- if (getControl() != null && !getControl().isDisposed()) {
- initializePage();
- }
- }
-
- });
- } else {
- // no remote connection is needed to get attributes therefore do
- // not use delayed execution to avoid flickering
- initializePage();
- }
- }
- }
-
- private void initializePage() {
- updateAttributesFromRepository(false);
- boolean restored = (query != null);
- if (inSearchContainer()) {
- restored |= restoreWidgetValues();
- }
- if (!restored) {
- // initialize with default values
- }
- }
-
- private boolean hasAttributes() {
- TracRepositoryConnector connector = (TracRepositoryConnector) TasksUi.getRepositoryManager()
- .getRepositoryConnector(TracCorePlugin.REPOSITORY_KIND);
- ITracClient client = connector.getClientManager().getTracClient(getTaskRepository());
- return client.hasAttributes();
- }
-
- private void updateAttributesFromRepository(final boolean force) {
- TracRepositoryConnector connector = (TracRepositoryConnector) TasksUi.getRepositoryManager()
- .getRepositoryConnector(TracCorePlugin.REPOSITORY_KIND);
- final ITracClient client = connector.getClientManager().getTracClient(getTaskRepository());
-
- if (!client.hasAttributes() || force) {
- try {
- IRunnableWithProgress runnable = new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- client.updateAttributes(monitor, force);
- } catch (TracException e) {
- throw new InvocationTargetException(e);
- }
- }
- };
-
- if (getContainer() != null) {
- getContainer().run(true, true, runnable);
- } else if (getSearchContainer() != null) {
- getSearchContainer().getRunnableContext().run(true, true, runnable);
- } else {
- IProgressService service = PlatformUI.getWorkbench().getProgressService();
- service.busyCursorWhile(runnable);
- }
- } catch (InvocationTargetException e) {
- TasksUiInternal.displayStatus("Error updating attributes", TracCorePlugin.toStatus(e.getCause(),
- getTaskRepository()));
- return;
- } catch (InterruptedException e) {
- return;
- }
- }
-
- statusField.setValues(client.getTicketStatus());
- resolutionField.setValues(client.getTicketResolutions());
- typeField.setValues(client.getTicketTypes());
- priorityField.setValues(client.getPriorities());
-
- componentField.setValues(client.getComponents());
- versionField.setValues(client.getVersions());
- milestoneField.setValues(client.getMilestones());
- }
-
- @Override
- public boolean isPageComplete() {
- if (titleText != null && titleText.getText().length() > 0) {
- return true;
- }
- return false;
- }
-
- public String getQueryUrl(String repsitoryUrl) {
- TracSearch search = getTracSearch();
-
- StringBuilder sb = new StringBuilder();
- sb.append(repsitoryUrl);
- sb.append(ITracClient.QUERY_URL);
- sb.append(search.toUrl());
- return sb.toString();
- }
-
- private TracSearch getTracSearch() {
- TracSearch search = new TracSearch();
- for (SearchField field : searchFieldByName.values()) {
- TracSearchFilter filter = field.getFilter();
- if (filter != null) {
- search.addFilter(filter);
- }
- }
- return search;
- }
-
- @Override
- public TracRepositoryQuery getQuery() {
- return new TracRepositoryQuery(getTaskRepository().getRepositoryUrl(),
- getQueryUrl(getTaskRepository().getRepositoryUrl()), getTitleText());
- }
-
- private String getTitleText() {
- return (titleText != null) ? titleText.getText() : "<search>";
- }
-
- // public boolean performAction() {
- //
- // Proxy proxySettings = TasksUiPlugin.getDefault().getProxySettings();
- // SearchHitCollector collector = new
- // SearchHitCollector(TasksUiPlugin.getTaskList(),
- // repository, getQuery(), proxySettings);
- // NewSearchUI.runQueryInBackground(collector);
- //
- // return true;
- // }
-
- @Override
- public boolean performSearch() {
- if (inSearchContainer()) {
- saveState();
- }
-
- return super.performSearch();
- }
-
- @Override
- public IDialogSettings getDialogSettings() {
- IDialogSettings settings = TracUiPlugin.getDefault().getDialogSettings();
- IDialogSettings dialogSettings = settings.getSection(PAGE_NAME);
- if (dialogSettings == null) {
- dialogSettings = settings.addNewSection(PAGE_NAME);
- }
- return dialogSettings;
- }
-
- private boolean restoreWidgetValues() {
- IDialogSettings settings = getDialogSettings();
- String repoId = "." + getTaskRepository().getRepositoryUrl();
-
- String searchUrl = settings.get(SEARCH_URL_ID + repoId);
- if (searchUrl == null) {
- return false;
- }
-
- restoreWidgetValues(new TracSearch(searchUrl));
- return true;
- }
-
- @Override
- public void saveState() {
- String repoId = "." + getTaskRepository().getRepositoryUrl();
- IDialogSettings settings = getDialogSettings();
- settings.put(SEARCH_URL_ID + repoId, getTracSearch().toUrl());
- }
-
- private abstract class SearchField {
-
- protected String fieldName;
-
- public SearchField(String fieldName) {
- this.fieldName = fieldName;
-
- if (fieldName != null) {
- assert !searchFieldByName.containsKey(fieldName);
- searchFieldByName.put(fieldName, this);
- }
- }
-
- public String getFieldName() {
- return fieldName;
- }
-
- public abstract TracSearchFilter getFilter();
-
- public abstract void setFilter(TracSearchFilter filter);
-
- }
-
- private class TextSearchField extends SearchField {
-
- private Combo conditionCombo;
-
- protected Text searchText;
-
- private Label label;
-
- private final CompareOperator[] compareOperators = { CompareOperator.CONTAINS, CompareOperator.CONTAINS_NOT,
- CompareOperator.BEGINS_WITH, CompareOperator.ENDS_WITH, CompareOperator.IS, CompareOperator.IS_NOT, };
-
- public TextSearchField(String fieldName) {
- super(fieldName);
- }
-
- public void createControls(Composite parent, String labelText) {
- if (labelText != null) {
- label = new Label(parent, SWT.LEFT);
- label.setText(labelText);
- }
-
- conditionCombo = new Combo(parent, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
- for (CompareOperator op : compareOperators) {
- conditionCombo.add(op.toString());
- }
- conditionCombo.setText(compareOperators[0].toString());
-
- searchText = new Text(parent, SWT.BORDER);
- GridData gd = new GridData(SWT.FILL, SWT.CENTER, true, false);
- // the user search field has additional controls and no fieldName
- if (fieldName != null) {
- gd.horizontalSpan = 2;
- }
- searchText.setLayoutData(gd);
- }
-
- public CompareOperator getCondition() {
- return compareOperators[conditionCombo.getSelectionIndex()];
- }
-
- public String getSearchText() {
- return searchText.getText();
- }
-
- public boolean setCondition(CompareOperator operator) {
- if (conditionCombo != null) {
- int i = conditionCombo.indexOf(operator.toString());
- if (i != -1) {
- conditionCombo.select(i);
- return true;
- }
- }
- return false;
- }
-
- public void setSearchText(String text) {
- searchText.setText(text);
- }
-
- @Override
- public TracSearchFilter getFilter() {
- String text = getSearchText();
- if (text.length() == 0) {
- return null;
- }
-
- TracSearchFilter newFilter = new TracSearchFilter(getFieldName());
- newFilter.setOperator(getCondition());
- newFilter.addValue(getSearchText());
- return newFilter;
- }
-
- @Override
- public void setFilter(TracSearchFilter filter) {
- setCondition(filter.getOperator());
- java.util.List<String> values = filter.getValues();
- setSearchText(values.get(0));
- }
-
- public void setFieldName(String fieldName) {
- this.fieldName = fieldName;
- }
-
- }
-
- private class ListSearchField extends SearchField {
-
- private List list;
-
- public ListSearchField(String fieldName) {
- super(fieldName);
- }
-
- public void setValues(Object[] items) {
- // preserve selected values
- TracSearchFilter filter = getFilter();
-
- list.removeAll();
- if (items != null) {
- list.setEnabled(true);
- for (Object item : items) {
- list.add(item.toString());
- }
-
- // restore selected values
- if (filter != null) {
- setFilter(filter);
- }
- } else {
- list.setEnabled(false);
- }
- }
-
- public void createControls(Composite parent, int height) {
- list = new List(parent, SWT.MULTI | SWT.V_SCROLL | SWT.BORDER);
- GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
- gd.heightHint = height;
- list.setLayoutData(gd);
- }
-
- @Override
- public TracSearchFilter getFilter() {
- int[] indicies = list.getSelectionIndices();
- if (indicies.length == 0) {
- return null;
- }
-
- TracSearchFilter newFilter = new TracSearchFilter(getFieldName());
- newFilter.setOperator(CompareOperator.IS);
- for (int i : indicies) {
- newFilter.addValue(list.getItem(i));
- }
- return newFilter;
- }
-
- @Override
- public void setFilter(TracSearchFilter filter) {
- list.deselectAll();
- java.util.List<String> values = filter.getValues();
- for (String item : values) {
- int i = list.indexOf(item);
- if (i != -1) {
- list.select(i);
- } else {
- list.add(item, 0);
- list.select(0);
- }
- }
- }
-
- public void selectItems(String[] items) {
- list.deselectAll();
- for (String item : items) {
- int i = list.indexOf(item);
- if (i != -1) {
- list.select(i);
- }
- }
- }
-
- }
-
- private class UserSearchField extends SearchField {
-
- private final TextSearchField textField;
-
- private Combo userCombo;
-
- public UserSearchField() {
- super(null);
-
- textField = new TextSearchField(null);
-
- new UserSelectionSearchField("owner", 0);
-
- new UserSelectionSearchField("reporter", 1);
-
- new UserSelectionSearchField("cc", 2);
- }
-
- public void createControls(Composite parent) {
- userCombo = new Combo(parent, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
- userCombo.add("Owner");
- userCombo.add("Reporter");
- userCombo.add("CC");
- userCombo.select(0);
-
- textField.createControls(parent, null);
- }
-
- @Override
- public TracSearchFilter getFilter() {
- return null;
- }
-
- @Override
- public void setFilter(TracSearchFilter filter) {
- }
-
- private void setSelection(int index) {
- userCombo.select(index);
- }
-
- private int getSelection() {
- return userCombo.getSelectionIndex();
- }
-
- class UserSelectionSearchField extends SearchField {
-
- private final int index;
-
- public UserSelectionSearchField(String fieldName, int index) {
- super(fieldName);
-
- this.index = index;
- }
-
- @Override
- public TracSearchFilter getFilter() {
- if (index == getSelection()) {
- textField.setFieldName(fieldName);
- return textField.getFilter();
- }
- return null;
- }
-
- @Override
- public void setFilter(TracSearchFilter filter) {
- textField.setFieldName(fieldName);
- textField.setFilter(filter);
- setSelection(index);
- }
-
- }
-
- }
-
- @Override
- public String getQueryTitle() {
- return (titleText != null) ? titleText.getText() : null;
- }
-
- @Override
- public void applyTo(IRepositoryQuery query) {
- throw new UnsupportedOperationException();
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracQueryWizardPage.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracQueryWizardPage.java
deleted file mode 100644
index 1a2c5d2b8..000000000
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracQueryWizardPage.java
+++ /dev/null
@@ -1,447 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.ui.wizard;
-
-import java.util.ArrayList;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.internal.trac.core.ITracClient;
-import org.eclipse.mylyn.internal.trac.core.TracRepositoryQuery;
-import org.eclipse.mylyn.internal.trac.core.model.TracSearch;
-import org.eclipse.mylyn.internal.trac.core.model.TracSearchFilter;
-import org.eclipse.mylyn.internal.trac.core.model.TracSearchFilter.CompareOperator;
-import org.eclipse.mylyn.internal.trac.ui.TracUiPlugin;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.ScrolledComposite;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.KeyListener;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * @author Steffen Pingel
- */
-public class TracQueryWizardPage extends WizardPage {
-
- private static final String TITLE = "New Trac Query";
-
- private static final String DESCRIPTION = "Add search filters to define query.";
-
- private static final String TITLE_QUERY_TITLE = "Query Title";
-
- private final TaskRepository repository;
-
- private final TracRepositoryQuery query;
-
- private Text titleText;
-
- private Composite scrollComposite;
-
- /* Maintain order of criterions in order to be able to restore this later. */
- private final Set<SearchField> visibleSearchFields = new LinkedHashSet<SearchField>();
-
- private List<SearchField> searchFields;
-
- public TracQueryWizardPage(TaskRepository repository, IRepositoryQuery query) {
- super(TITLE);
-
- this.repository = repository;
- this.query = (TracRepositoryQuery) query;
-
- setTitle(TITLE);
- setDescription(DESCRIPTION);
- }
-
- public TracQueryWizardPage(TaskRepository repository) {
- this(repository, null);
- }
-
- public void createControl(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- composite.setLayoutData(new GridData());
- composite.setLayout(new GridLayout(1, false));
-
- createTitleGroup(composite);
-
- ScrolledComposite scrolledComposite = new ScrolledComposite(composite, SWT.V_SCROLL | SWT.BORDER);
- GridData gd = new GridData(GridData.FILL, GridData.FILL, true, true);
- scrolledComposite.setExpandHorizontal(true);
- scrolledComposite.setLayoutData(gd);
-
- scrollComposite = new Composite(scrolledComposite, SWT.None);
- scrolledComposite.setContent(scrollComposite);
- scrollComposite.setLayout(new GridLayout(4, false));
-
- createAddFilterGroup(composite);
-
- if (query != null) {
- titleText.setText(query.getSummary());
- restoreSearchFilterFromQuery(query);
- }
-
- setControl(composite);
- }
-
- private void restoreSearchFilterFromQuery(TracRepositoryQuery query) {
- TracSearch search = query.getTracSearch();
- List<TracSearchFilter> filters = search.getFilters();
- for (TracSearchFilter filter : filters) {
- SearchField field = getSearchField(filter.getFieldName());
- if (field != null) {
- showSearchField(field, filter);
- } else {
- StatusHandler.log(new Status(IStatus.WARNING, TracUiPlugin.PLUGIN_ID,
- "Ignoring invalid search filter: " + filter));
- }
- }
- }
-
- private SearchField getSearchField(String fieldName) {
- for (SearchField searchField : searchFields) {
- if (searchField.getFieldName().equals(fieldName)) {
- return searchField;
- }
- }
- return null;
- }
-
- private void createAddFilterGroup(Composite parent) {
- GridLayout layout;
- GridData gd;
-
- Composite composite = new Composite(parent, SWT.NONE);
- layout = new GridLayout(2, false);
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- gd = new GridData(GridData.BEGINNING | GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
- composite.setLayoutData(gd);
-
- Label label = new Label(composite, SWT.LEFT);
- label.setText("Select to add filter: ");
-
- // condition
- final Combo filterCombo = new Combo(composite, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
-
- searchFields = new ArrayList<SearchField>();
- searchFields.add(new TextSearchField("summary", "Summary"));
- searchFields.add(new TextSearchField("reporter", "Reporter"));
- searchFields.add(new TextSearchField("owner", "Owner"));
- searchFields.add(new TextSearchField("type", "Type"));
- searchFields.add(new TextSearchField("status", "Status"));
- searchFields.add(new TextSearchField("priority", "Priority"));
- searchFields.add(new TextSearchField("milestone", "Milestone"));
- searchFields.add(new TextSearchField("component", "Component"));
- searchFields.add(new TextSearchField("version", "Version"));
- searchFields.add(new TextSearchField("resoution", "Resolution"));
- searchFields.add(new TextSearchField("keywords", "Keywords"));
- searchFields.add(new TextSearchField("cc", "CC"));
-
- filterCombo.add("");
- for (SearchField field : searchFields) {
- filterCombo.add(field.getDisplayName());
- }
-
- filterCombo.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- if (filterCombo.getText().length() > 0) {
- SearchField field = searchFields.get(filterCombo.getSelectionIndex() - 1);
- showSearchField(field, null);
- filterCombo.setText("");
- }
- }
- });
- }
-
- private void createTitleGroup(Composite composite) {
- Group group = new Group(composite, SWT.NONE);
- group.setText(TITLE_QUERY_TITLE);
- group.setLayout(new GridLayout(1, false));
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- group.setLayoutData(gd);
-
- titleText = new Text(group, SWT.BORDER);
- gd = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
- titleText.setLayoutData(gd);
-
- titleText.addKeyListener(new KeyListener() {
- public void keyPressed(KeyEvent e) {
- // ignore
- }
-
- public void keyReleased(KeyEvent e) {
- getContainer().updateButtons();
- }
- });
- }
-
- @Override
- public boolean isPageComplete() {
- if (titleText != null && titleText.getText().length() > 0) {
- return true;
- }
- return false;
- }
-
- private void showSearchField(SearchField field, TracSearchFilter filter) {
- assert filter == null || !visibleSearchFields.contains(field);
-
- if (!visibleSearchFields.contains(field)) {
- field.createControls(scrollComposite, filter);
- visibleSearchFields.add(field);
- } else {
- field.addControl(scrollComposite);
- }
- updateScrollPane();
- }
-
- public String getQueryUrl(String repsitoryUrl) {
- TracSearch search = new TracSearch();
- for (SearchField field : visibleSearchFields) {
- search.addFilter(field.getFilter());
- }
-
- StringBuilder sb = new StringBuilder();
- sb.append(repsitoryUrl);
- sb.append(ITracClient.QUERY_URL);
- sb.append(search.toUrl());
- return sb.toString();
- }
-
- public TracRepositoryQuery getQuery() {
- return new TracRepositoryQuery(repository.getRepositoryUrl(), getQueryUrl(repository.getRepositoryUrl()), titleText.getText());
- }
-
- private void hideSearchField(SearchField field) {
- visibleSearchFields.remove(field);
- }
-
- private void updateScrollPane() {
- scrollComposite.setSize(scrollComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
- scrollComposite.layout();
- }
-
- private abstract class SearchField {
-
- protected String fieldName;
-
- private final String displayName;
-
- public SearchField(String fieldName, String displayName) {
- this.fieldName = fieldName;
- this.displayName = displayName;
- }
-
- public abstract void createControls(Composite parent, TracSearchFilter filter);
-
- public abstract void addControl(Composite parent);
-
- public String getFieldName() {
- return fieldName;
- }
-
- public String getDisplayName() {
- return displayName;
- }
-
- public abstract TracSearchFilter getFilter();
-
- }
-
- private class TextSearchField extends SearchField {
-
- private final CompareOperator[] compareOperators = { CompareOperator.CONTAINS, CompareOperator.CONTAINS_NOT,
- CompareOperator.BEGINS_WITH, CompareOperator.ENDS_WITH, CompareOperator.IS, CompareOperator.IS_NOT, };
-
- private List<TextCriterion> criterions;
-
- public TextSearchField(String fieldName, String displayName) {
- super(fieldName, displayName);
- }
-
- @Override
- public void createControls(Composite parent, TracSearchFilter filter) {
- if (filter != null) {
- TextCriterion first = addCriterion(parent);
- first.setCondition(filter.getOperator());
- List<String> values = filter.getValues();
- if (!values.isEmpty()) {
- first.setSearchText(values.get(0));
- for (int i = 1; i < values.size(); i++) {
- TextCriterion criterion = addCriterion(parent);
- criterion.setSearchText(values.get(1));
- }
- }
- } else {
- addCriterion(parent);
- }
-
- }
-
- @Override
- public void addControl(Composite parent) {
- addCriterion(parent);
- }
-
- public TextCriterion addCriterion(Composite parent) {
- TextCriterion criterion = new TextCriterion();
- if (criterions == null) {
- criterions = new ArrayList<TextCriterion>();
- criterion.createControl(parent);
- } else {
- criterion.createControl(parent, criterions.get(criterions.size() - 1));
- }
- criterions.add(criterion);
- return criterion;
- }
-
- @Override
- public TracSearchFilter getFilter() {
- TracSearchFilter newFilter = new TracSearchFilter(getFieldName());
- newFilter.setOperator(criterions.get(0).getCondition());
- for (TextCriterion criterion : criterions) {
- newFilter.addValue(criterion.getSearchText());
- }
- return newFilter;
- }
-
- public void removeCriterion(TextCriterion criterion) {
- int i = criterions.indexOf(criterion);
- if (i == -1) {
- throw new RuntimeException();
- }
- if (i == 0) {
- // the first criterion is special since it contains the compare
- // operator combo
- if (criterions.size() > 1) {
- // copy the value from the second criterion to the first
- TextCriterion sourceCriterion = criterions.get(1);
- criterion.searchText.setText(sourceCriterion.searchText.getText());
- removeCriterionByIndex(1);
- } else {
- // no more criterions, remove all controls
- removeCriterionByIndex(0);
- hideSearchField(this);
- }
- } else {
- removeCriterionByIndex(i);
- }
- }
-
- private void removeCriterionByIndex(int i) {
- criterions.get(i).remove();
- criterions.remove(i);
- updateScrollPane();
- }
-
- private class TextCriterion {
-
- private Combo conditionCombo;
-
- private Text searchText;
-
- private Label label;
-
- private Button removeButton;
-
- public void createControl(Composite parent) {
- label = new Label(parent, SWT.LEFT);
- label.setText(getDisplayName() + ": ");
-
- conditionCombo = new Combo(parent, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
- for (CompareOperator op : compareOperators) {
- conditionCombo.add(op.toString());
- }
- conditionCombo.setText(compareOperators[0].toString());
-
- createSearchTextAndRemoveButton(parent);
- }
-
- public void createControl(Composite parent, TextCriterion top) {
- label = new Label(parent, SWT.RIGHT);
- GridData gd = new GridData();
- gd.horizontalAlignment = SWT.END;
- gd.horizontalSpan = 2;
- label.setLayoutData(gd);
- label.setText("or");
-
- createSearchTextAndRemoveButton(parent);
-
- label.moveBelow(top.removeButton);
- searchText.moveBelow(label);
- removeButton.moveBelow(searchText);
- }
-
- private void createSearchTextAndRemoveButton(Composite parent) {
- searchText = new Text(parent, SWT.BORDER);
- GridData gd = new GridData(GridData.GRAB_HORIZONTAL | GridData.FILL_HORIZONTAL);
- searchText.setLayoutData(gd);
-
- removeButton = new Button(parent, SWT.PUSH);
- removeButton.setText("-");
- removeButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
- TextSearchField.this.removeCriterion(TextCriterion.this);
- }
- });
- }
-
- public void remove() {
- label.dispose();
- if (conditionCombo != null) {
- conditionCombo.dispose();
- }
- searchText.dispose();
- removeButton.dispose();
- }
-
- public CompareOperator getCondition() {
- return (conditionCombo != null) ? compareOperators[conditionCombo.getSelectionIndex()] : null;
- }
-
- public String getSearchText() {
- return searchText.getText();
- }
-
- public boolean setCondition(CompareOperator operator) {
- if (conditionCombo != null) {
- int i = conditionCombo.indexOf(operator.toString());
- if (i != -1) {
- conditionCombo.select(i);
- return true;
- }
- }
- return false;
- }
-
- public void setSearchText(String text) {
- searchText.setText(text);
- }
-
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracRepositorySettingsPage.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracRepositorySettingsPage.java
deleted file mode 100644
index 3d2993d71..000000000
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracRepositorySettingsPage.java
+++ /dev/null
@@ -1,245 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.trac.ui.wizard;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.mylyn.commons.net.AbstractWebLocation;
-import org.eclipse.mylyn.internal.trac.core.ITracClient;
-import org.eclipse.mylyn.internal.trac.core.TracClientFactory;
-import org.eclipse.mylyn.internal.trac.core.TracCorePlugin;
-import org.eclipse.mylyn.internal.trac.core.TracException;
-import org.eclipse.mylyn.internal.trac.core.TracLoginException;
-import org.eclipse.mylyn.internal.trac.core.TracPermissionDeniedException;
-import org.eclipse.mylyn.internal.trac.core.ITracClient.Version;
-import org.eclipse.mylyn.internal.trac.ui.TracUiPlugin;
-import org.eclipse.mylyn.tasks.core.RepositoryStatus;
-import org.eclipse.mylyn.tasks.core.RepositoryTemplate;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.TaskRepositoryLocationFactory;
-import org.eclipse.mylyn.tasks.ui.wizards.AbstractRepositorySettingsPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-
-/**
- * @author Steffen Pingel
- */
-public class TracRepositorySettingsPage extends AbstractRepositorySettingsPage {
-
- private static final String TITLE = "Trac Repository Settings";
-
- private static final String DESCRIPTION = "Example: http://trac.edgewall.org";
-
- private Combo accessTypeCombo;
-
- /** Supported access types. */
- private Version[] versions;
-
- public TracRepositorySettingsPage(TaskRepository taskRepository) {
- super(TITLE, DESCRIPTION, taskRepository);
- setNeedsAnonymousLogin(true);
- setNeedsEncoding(false);
- setNeedsTimeZone(false);
- }
-
- @Override
- protected void repositoryTemplateSelected(RepositoryTemplate template) {
- repositoryLabelEditor.setStringValue(template.label);
- setUrl(template.repositoryUrl);
- setAnonymous(template.anonymous);
-
- try {
- Version version = Version.valueOf(template.version);
- setTracVersion(version);
- } catch (RuntimeException ex) {
- setTracVersion(Version.TRAC_0_9);
- }
-
- getContainer().updateButtons();
- }
-
- @Override
- protected void createAdditionalControls(final Composite parent) {
- addRepositoryTemplatesToServerUrlCombo();
-
- Label accessTypeLabel = new Label(parent, SWT.NONE);
- accessTypeLabel.setText("Access Type: ");
- accessTypeCombo = new Combo(parent, SWT.READ_ONLY);
-
- accessTypeCombo.add("Automatic (Use Validate Settings)");
- versions = Version.values();
- for (Version version : versions) {
- accessTypeCombo.add(version.toString());
- }
- if (repository != null) {
- setTracVersion(Version.fromVersion(repository.getVersion()));
- } else {
- setTracVersion(null);
- }
- accessTypeCombo.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- if (accessTypeCombo.getSelectionIndex() > 0) {
- setVersion(versions[accessTypeCombo.getSelectionIndex() - 1].name());
- }
- getWizard().getContainer().updateButtons();
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- // ignore
- }
- });
- }
-
- @Override
- public boolean isPageComplete() {
- // make sure "Automatic" is not selected as a version
- return super.isPageComplete() && accessTypeCombo != null && accessTypeCombo.getSelectionIndex() != 0;
- }
-
- @Override
- protected boolean isValidUrl(String name) {
- if ((name.startsWith(URL_PREFIX_HTTPS) || name.startsWith(URL_PREFIX_HTTP)) && !name.endsWith("/")) {
- try {
- new URL(name);
- return true;
- } catch (MalformedURLException e) {
- }
- }
- return false;
- }
-
- public Version getTracVersion() {
- if (accessTypeCombo.getSelectionIndex() == 0) {
- return null;
- } else {
- return versions[accessTypeCombo.getSelectionIndex() - 1];
- }
- }
-
- public void setTracVersion(Version version) {
- if (version == null) {
- // select "Automatic"
- accessTypeCombo.select(0);
- } else {
- int i = accessTypeCombo.indexOf(version.toString());
- if (i != -1) {
- accessTypeCombo.select(i);
- }
- setVersion(version.name());
- }
- }
-
- @Override
- protected void applyValidatorResult(Validator validator) {
- super.applyValidatorResult(validator);
-
- if (((TracValidator) validator).getResult() != null) {
- setTracVersion(((TracValidator) validator).getResult());
- }
- }
-
- // public for testing
- public class TracValidator extends Validator {
-
- private final String repositoryUrl;
-
- private final TaskRepository taskRepository;
-
- private final Version version;
-
- private Version result;
-
- public TracValidator(TaskRepository taskRepository, Version version) {
- this.repositoryUrl = taskRepository.getRepositoryUrl();
- this.taskRepository = taskRepository;
- this.version = version;
- }
-
- @Override
- public void run(IProgressMonitor monitor) throws CoreException {
- try {
- //validate(Provider.of(monitor));
- validate(monitor);
- } catch (MalformedURLException e) {
- throw new CoreException(RepositoryStatus.createStatus(repositoryUrl, IStatus.ERROR,
- TracUiPlugin.PLUGIN_ID, INVALID_REPOSITORY_URL));
- } catch (TracLoginException e) {
- throw new CoreException(RepositoryStatus.createStatus(repositoryUrl, IStatus.ERROR,
- TracUiPlugin.PLUGIN_ID, INVALID_LOGIN));
- } catch (TracPermissionDeniedException e) {
- throw new CoreException(RepositoryStatus.createStatus(repositoryUrl, IStatus.ERROR,
- TracUiPlugin.PLUGIN_ID, "Insufficient permissions for selected access type."));
- } catch (TracException e) {
- String message = "No Trac repository found at url";
- if (e.getMessage() != null) {
- message += ": " + e.getMessage();
- }
- throw new CoreException(RepositoryStatus.createStatus(repositoryUrl, IStatus.ERROR,
- TracUiPlugin.PLUGIN_ID, message));
- }
- }
-
- public void validate(IProgressMonitor monitor) throws MalformedURLException, TracException {
- AbstractWebLocation location = new TaskRepositoryLocationFactory().createWebLocation(taskRepository);
-
- if (version != null) {
- ITracClient client = TracClientFactory.createClient(location, version);
- client.validate(monitor);
- } else {
- // probe version: XML-RPC access first, then web
- // access
- try {
- ITracClient client = TracClientFactory.createClient(location, Version.XML_RPC);
- client.validate(monitor);
- result = Version.XML_RPC;
- } catch (TracException e) {
- try {
- ITracClient client = TracClientFactory.createClient(location, Version.TRAC_0_9);
- client.validate(monitor);
- result = Version.TRAC_0_9;
-
- if (e instanceof TracPermissionDeniedException) {
- setStatus(RepositoryStatus.createStatus(repositoryUrl, IStatus.INFO,
- TracUiPlugin.PLUGIN_ID,
- "Authentication credentials are valid. Note: Insufficient permissions for XML-RPC access, falling back to web access."));
- }
- } catch (TracLoginException e2) {
- throw e;
- } catch (TracException e2) {
- throw new TracException();
- }
- }
- }
- }
-
- public Version getResult() {
- return result;
- }
-
- }
-
- @Override
- protected Validator getValidator(TaskRepository repository) {
- return new TracValidator(repository, getTracVersion());
- }
-
- @Override
- public String getConnectorKind() {
- return TracCorePlugin.REPOSITORY_KIND;
- }
-
-}

Back to the top