Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcvs2git2007-09-25 05:14:54 +0000
committercvs2git2007-09-25 05:14:54 +0000
commitaec2aacc0f8cee84dc20591fcc2a10cbdcc8c687 (patch)
tree73167edb345183e56d544d76de23287c062186bf
parentbb912fe7e38ae93fc5f925a8f906bc9c37b1bc9c (diff)
downloadorg.eclipse.mylyn.tasks-aec2aacc0f8cee84dc20591fcc2a10cbdcc8c687.tar.gz
org.eclipse.mylyn.tasks-aec2aacc0f8cee84dc20591fcc2a10cbdcc8c687.tar.xz
org.eclipse.mylyn.tasks-aec2aacc0f8cee84dc20591fcc2a10cbdcc8c687.zip
This commit was manufactured by cvs2svn to create tag 'Root_e_3_3_m_2_x'.Root_e_3_3_m_2_x
Sprout from master 2007-09-25 05:14:53 UTC mkersten 'Version update' 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.mylar.tasklist.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/pom.xml 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/BugzillaAttachmentHandler.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/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/BugzillaCorePlugin.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/BugzillaReportElement.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/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/BugzillaTaskDataHandler.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.mylar.tasklist.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.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/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/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/TaskReportGeneratorTest.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/test-attach-1181009324093.txt org.eclipse.mylyn.bugzilla.tests/test-attach-1182233735875.txt 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.mylar.tasklist.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/BugzillaAuthenticator.java 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/BugzillaUiPlugin.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/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/search/IBugzillaResultEditorMatchAdapter.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/EditBugzillaQueryWizard.java org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/NewBugzillaQueryWizard.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.mylar.tasklist.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/icons/etool16/report-bug.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.tasks.core/.classpath org.eclipse.mylyn.tasks.core/.cvsignore org.eclipse.mylyn.tasks.core/.project 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.ltk.core.refactoring.prefs org.eclipse.mylyn.tasks.core/.settings/org.eclipse.mylar.tasklist.prefs org.eclipse.mylyn.tasks.core/.settings/org.eclipse.mylyn.tasklist.prefs org.eclipse.mylyn.tasks.core/.settings/org.eclipse.mylyn.tasks.ui.prefs org.eclipse.mylyn.tasks.core/.settings/org.eclipse.pde.prefs org.eclipse.mylyn.tasks.core/META-INF/MANIFEST.MF org.eclipse.mylyn.tasks.core/about.html org.eclipse.mylyn.tasks.core/build-user.xml org.eclipse.mylyn.tasks.core/build.properties org.eclipse.mylyn.tasks.core/icons/elcl16/edge-ref-bug.gif org.eclipse.mylyn.tasks.core/plugin.xml org.eclipse.mylyn.tasks.core/pom.xml org.eclipse.mylyn.tasks.core/schema/templates.exsd 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/IRepositoryConstants.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/ITaskRepositoryFilter.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/RepositoryTaskHandleUtil.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/ScheduledTaskDelegate.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/TaskArchive.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/TaskDataManager.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/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/TaskRepositoriesExternalizer.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/UnfiledCategory.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractAttachmentHandler.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractAttributeFactory.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/AbstractRepositoryQuery.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTask.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskCategory.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskContainer.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskDataHandler.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskListFactory.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AttributeContainer.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/FileAttachment.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ILinkedTaskInfo.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/ITaskAttachment.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskCollector.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskFactory.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskListChangeListener.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskRepositoryListener.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/QueryHitCollector.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/RepositoryAttachment.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/RepositoryOperation.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/RepositoryTaskAttribute.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/RepositoryTaskData.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/TaskComment.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskContainerDelta.java org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskList.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/TaskRepositoryManager.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.mylar.tasklist.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.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/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/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/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/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/RetrieveTitleFromUrlTest.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/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/TaskDataManagerTest.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/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/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/TasksTestsPlugin.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/UrlConnectionUtilTest.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/MockRepositoryTask.java org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockStatusHandler.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/web/NamedPatternTest.java org.eclipse.mylyn.tasks.tests/testdata/legacy/tasklist_0_4_8.xml 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/.project 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.mylar.tasklist.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/elcl16/blank.gif org.eclipse.mylyn.tasks.ui/icons/elcl16/bug-search.gif org.eclipse.mylyn.tasks.ui/icons/elcl16/clearDot.gif org.eclipse.mylyn.tasks.ui/icons/elcl16/collapseall.png org.eclipse.mylyn.tasks.ui/icons/elcl16/delete.gif org.eclipse.mylyn.tasks.ui/icons/elcl16/expandall.gif org.eclipse.mylyn.tasks.ui/icons/elcl16/filter-archive.gif org.eclipse.mylyn.tasks.ui/icons/elcl16/filter-complete.gif org.eclipse.mylyn.tasks.ui/icons/elcl16/filter-priority.gif org.eclipse.mylyn.tasks.ui/icons/elcl16/refresh-small.gif org.eclipse.mylyn.tasks.ui/icons/elcl16/refresh.gif org.eclipse.mylyn.tasks.ui/icons/elcl16/remove.gif org.eclipse.mylyn.tasks.ui/icons/elcl16/reply.gif org.eclipse.mylyn.tasks.ui/icons/elcl16/task-search.gif org.eclipse.mylyn.tasks.ui/icons/elcl16/warning.gif org.eclipse.mylyn.tasks.ui/icons/etool16/attachment-patch.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-fit.png org.eclipse.mylyn.tasks.ui/icons/etool16/capture-pause.gif org.eclipse.mylyn.tasks.ui/icons/etool16/capture-screen.png 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/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/copy.png org.eclipse.mylyn.tasks.ui/icons/etool16/find-clear-disabled.gif org.eclipse.mylyn.tasks.ui/icons/etool16/find-clear.gif org.eclipse.mylyn.tasks.ui/icons/etool16/go-into.gif org.eclipse.mylyn.tasks.ui/icons/etool16/go-up.gif org.eclipse.mylyn.tasks.ui/icons/etool16/import.gif org.eclipse.mylyn.tasks.ui/icons/etool16/link-editor.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-browser.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/overlay-repository.gif org.eclipse.mylyn.tasks.ui/icons/etool16/overlay-web.gif org.eclipse.mylyn.tasks.ui/icons/etool16/person-me-narrow.gif org.eclipse.mylyn.tasks.ui/icons/etool16/person-me.gif org.eclipse.mylyn.tasks.ui/icons/etool16/person-narrow.gif org.eclipse.mylyn.tasks.ui/icons/etool16/person.gif org.eclipse.mylyn.tasks.ui/icons/etool16/presentation.gif org.eclipse.mylyn.tasks.ui/icons/etool16/query-new.gif org.eclipse.mylyn.tasks.ui/icons/etool16/query.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/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-items.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-completed.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-notes.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-server.gif org.eclipse.mylyn.tasks.ui/icons/etool16/task.gif org.eclipse.mylyn.tasks.ui/icons/etool16/toolbar-arrow-down.gif org.eclipse.mylyn.tasks.ui/icons/etool16/toolbar-arrow-right.gif org.eclipse.mylyn.tasks.ui/icons/etool16/view-filter.gif org.eclipse.mylyn.tasks.ui/icons/eview16/focus-view.gif org.eclipse.mylyn.tasks.ui/icons/eview16/notification-close.gif org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-completed.gif org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-conflicting.gif org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-due.gif org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-has-context.gif org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-has-due.gif org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-incoming-multiple.gif org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-incoming-new.gif org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-incoming.gif org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-offline.gif org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-outgoing.gif org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-overdue.gif org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-repository-context.gif org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-repository.gif org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-synch-incoming-new.gif org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-synch-incoming.gif org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-synch-outgoing.gif org.eclipse.mylyn.tasks.ui/icons/eview16/perspective-planning.png org.eclipse.mylyn.tasks.ui/icons/eview16/priority-1.gif org.eclipse.mylyn.tasks.ui/icons/eview16/priority-2.gif org.eclipse.mylyn.tasks.ui/icons/eview16/priority-3.gif org.eclipse.mylyn.tasks.ui/icons/eview16/priority-4.gif org.eclipse.mylyn.tasks.ui/icons/eview16/priority-5.gif org.eclipse.mylyn.tasks.ui/icons/eview16/progress/1.png org.eclipse.mylyn.tasks.ui/icons/eview16/progress/2.png org.eclipse.mylyn.tasks.ui/icons/eview16/progress/3.png org.eclipse.mylyn.tasks.ui/icons/eview16/progress/4.png org.eclipse.mylyn.tasks.ui/icons/eview16/progress/5.png org.eclipse.mylyn.tasks.ui/icons/eview16/progress/6.png org.eclipse.mylyn.tasks.ui/icons/eview16/progress/7.png org.eclipse.mylyn.tasks.ui/icons/eview16/progress/8.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/status-conflict.gif org.eclipse.mylyn.tasks.ui/icons/eview16/status-normal.gif org.eclipse.mylyn.tasks.ui/icons/eview16/status-server-context.gif org.eclipse.mylyn.tasks.ui/icons/eview16/task-activity.gif org.eclipse.mylyn.tasks.ui/icons/eview16/task-bug.gif org.eclipse.mylyn.tasks.ui/icons/eview16/task-list.gif org.eclipse.mylyn.tasks.ui/icons/find.gif org.eclipse.mylyn.tasks.ui/icons/obj16/attachment-patch.gif org.eclipse.mylyn.tasks.ui/icons/obj16/browser-small.gif org.eclipse.mylyn.tasks.ui/icons/obj16/calendar-small.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-blank.gif org.eclipse.mylyn.tasks.ui/icons/ovr16/overlay-complete.gif org.eclipse.mylyn.tasks.ui/icons/ovr16/overlay-local.gif org.eclipse.mylyn.tasks.ui/icons/ovr16/overlay-warning.gif org.eclipse.mylyn.tasks.ui/icons/ovr16/solid-white.gif org.eclipse.mylyn.tasks.ui/icons/wizban/banner-export.gif org.eclipse.mylyn.tasks.ui/icons/wizban/banner-import.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/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/AddExistingTaskJob.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/CompositeContainerImageDescriptor.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/CompositeSynchImageDescriptor.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/CompositeTaskImageDescriptor.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ContextCapturePauseHandler.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ContextUiUtil.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/ITaskListNotification.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/ITasksUiConstants.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/LocalTaskConnectorUi.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/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/RetrieveTitleFromUrlJob.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/ScheduledTaskListSynchJob.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/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/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/TaskListColorsAndFonts.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/TaskListImageDescriptor.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListImageHyperlink.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationIncoming.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/TaskListNotificationPopup.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationQueryIncoming.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationReminder.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListPatternFilter.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/TaskSearchPage.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskStatusMenuContributor.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/TasksReminderDialog.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksUiImages.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksUiPreferenceConstants.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/WorkspaceAwareContextStore.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/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/ActivityReportAction.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/AttachFileAction.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/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/MarkTaskReadAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/MarkTaskUnreadAction.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/NewTaskAction.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/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/ReportBugAction.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/TaskListElementPropertiesAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskNavigateDropDownAction.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/AddTaskRepositoryHandler.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/TaskRepositoryParameterValues.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/editors/AttachmentTableLabelProvider.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/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/EditorBusyIndicator.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/RepositoryAttachmentEditorInput.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/SpellingDialog.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/TaskEditorInputFactory.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/TaskPlanningEditor.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/planner/CompletedTaskCollector.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/DateSelectionDialog.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/ITaskCollector.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/ITaskPlannerContentProvider.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/InProgressTaskCollector.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/OpenTaskEditorAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/PlannedTasksContentProvider.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/ReminderCellEditor.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/RemoveTaskAction.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskActivityContentProvider.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskActivityEditorInput.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskActivityEditorPart.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskActivitySorter.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskActivityWizard.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskActivityWizardPage.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskPlanContentProvider.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskPlanSorter.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskPlannerLabelProvider.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskReportGenerator.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/RepositorySearchResultView.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/SearchResultTableContentProvider.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/util/BackgroundSaveTimer.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/DelegatingTaskExternalizer.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/TaskDataExportJob.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskListSaveManager.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskListWriter.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/WebBrowserDialog.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/AbstractFilteredTree.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/AdaptiveRefreshPolicy.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/DatePickerPanel.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/IFilteredTreeListener.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/ResetRepositoryConfigurationAction.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/TaskActivationHistory.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskActivityLabelProvider.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskElementLabelProvider.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/TaskListDragSourceListener.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/TaskListTableSorter.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListToolTipHandler.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/WorkweekProgressBar.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/AbstractRepositoryClientWizard.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/CloneTaskWizard.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/ContextAttachWizard.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ContextAttachWizardPage.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ContextRetrieveWizard.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ContextRetrieveWizardPage.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/InputAttachmentSourcePage.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/ScreenShotAttachmentPage.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/SelectRepositoryClientPage.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/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/tasks/ui/AbstractDuplicateDetector.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/DatePicker.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/RepositorySynchronizationManager.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/SynchronizeQueryJob.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/SynchronizeTaskJob.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskFactory.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/TaskListManager.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiPlugin.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiProxyChangeListener.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/WebHyperlink.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractNewRepositoryTaskEditor.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/AbstractRepositoryTaskEditor.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditorInput.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorFactory.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/NewTaskEditorInput.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/RepositoryTaskEditorDropListener.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/RepositoryTaskEditorInput.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/TaskFormPage.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskTextViewerConfiguration.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/search/AbstractRepositoryQueryPage.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/search/RepositorySearchResult.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/search/SearchHitCollector.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractEditQueryWizard.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/NewTaskWizard.java org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/NewWebTaskWizard.java 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.mylar.tasklist.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/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.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.mylar.tasklist.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/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/TracTestPlugin.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/TestCleanupUtil.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/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.mylar.tasklist.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/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/editor/BrowserFormPage.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/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/NewTracTaskWizard.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/.classpath17
-rw-r--r--org.eclipse.mylyn.bugzilla.core/.cvsignore3
-rw-r--r--org.eclipse.mylyn.bugzilla.core/.project28
-rw-r--r--org.eclipse.mylyn.bugzilla.core/.settings/org.eclipse.jdt.core.prefs316
-rw-r--r--org.eclipse.mylyn.bugzilla.core/.settings/org.eclipse.jdt.ui.prefs6
-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.mylar.tasklist.prefs4
-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.prefs12
-rw-r--r--org.eclipse.mylyn.bugzilla.core/META-INF/MANIFEST.MF16
-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.properties16
-rw-r--r--org.eclipse.mylyn.bugzilla.core/plugin.xml5
-rw-r--r--org.eclipse.mylyn.bugzilla.core/pom.xml143
-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/BugzillaAttachmentHandler.java81
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttributeFactory.java146
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java1224
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClientFactory.java38
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClientManager.java60
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaCorePlugin.java365
-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/BugzillaReportElement.java89
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryConnector.java674
-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/BugzillaStatus.java108
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTask.java67
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java342
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/IBugzillaConstants.java277
-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.java53
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/RepositoryConfiguration.java382
-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.java35
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxBugzillaQueryContentHandler.java125
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxConfigurationContentHandler.java390
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxMultiBugReportContentHandler.java301
-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.java157
-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.java220
-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/.classpath11
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/.cvsignore2
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/.project28
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/.settings/org.eclipse.jdt.core.prefs316
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/.settings/org.eclipse.jdt.ui.prefs6
-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.mylar.tasklist.prefs4
-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.prefs12
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/META-INF/MANIFEST.MF30
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/about.html27
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/build.properties17
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AbstractBugzillaTest.java165
-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.java234
-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.java803
-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.java125
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskHyperlinkDetectorTest.java135
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskListManagerTest.java232
-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.java96
-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.java271
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/EncodingTest.java86
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/NewBugWizardTest.java79
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryEditorWizardTest.java180
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryReportFactoryTest.java452
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryTaskHandleTest.java74
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskEditorTest.java79
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskListNotificationManagerTest.java134
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskListStandaloneTest.java208
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskReportGeneratorTest.java189
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/headless/BugzillaQueryTest.java175
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/headless/BugzillaTaskHistoryTest.java161
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/test-attach-1181009324093.txt1
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/test-attach-1182233735875.txt1
-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/.classpath20
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/.cvsignore1
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/.project28
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/.settings/org.eclipse.jdt.core.prefs316
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/.settings/org.eclipse.jdt.ui.prefs6
-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.mylar.tasklist.prefs4
-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.prefs12
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/META-INF/MANIFEST.MF31
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/about.html27
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/build-user.xml3
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/build.properties19
-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.xml39
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaAuthenticator.java56
-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.java283
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaCompareStructureCreator.java70
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaImages.java94
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiPlugin.java290
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditor.java685
-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.java154
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/NewBugzillaTaskEditor.java199
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java1592
-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/search/IBugzillaResultEditorMatchAdapter.java27
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaConnectorUi.java216
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaCustomQueryDialog.java109
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaCustomQueryWizardPage.java131
-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.java516
-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.java90
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskListFactory.java99
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/EditBugzillaQueryWizard.java42
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/NewBugzillaQueryWizard.java94
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/StackTrace.java367
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/BugzillaProductPage.java404
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/NewBugzillaTaskWizard.java100
-rw-r--r--org.eclipse.mylyn.help.ui/.classpath11
-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/.project28
-rw-r--r--org.eclipse.mylyn.help.ui/.settings/org.eclipse.jdt.core.prefs316
-rw-r--r--org.eclipse.mylyn.help.ui/.settings/org.eclipse.jdt.ui.prefs6
-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.mylar.tasklist.prefs4
-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.prefs12
-rw-r--r--org.eclipse.mylyn.help.ui/META-INF/MANIFEST.MF15
-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.properties26
-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.html260
-rw-r--r--org.eclipse.mylyn.help.ui/doc/overview.html61
-rw-r--r--org.eclipse.mylyn.help.ui/doc/toc.xml10
-rw-r--r--org.eclipse.mylyn.help.ui/icons/etool16/icons-legend.gifbin200 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.help.ui/icons/etool16/report-bug.gifbin580 -> 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.xml118
-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.java405
-rw-r--r--org.eclipse.mylyn.tasks.core/.classpath15
-rw-r--r--org.eclipse.mylyn.tasks.core/.cvsignore2
-rw-r--r--org.eclipse.mylyn.tasks.core/.project28
-rw-r--r--org.eclipse.mylyn.tasks.core/.settings/org.eclipse.jdt.core.prefs316
-rw-r--r--org.eclipse.mylyn.tasks.core/.settings/org.eclipse.jdt.ui.prefs6
-rw-r--r--org.eclipse.mylyn.tasks.core/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--org.eclipse.mylyn.tasks.core/.settings/org.eclipse.mylar.tasklist.prefs4
-rw-r--r--org.eclipse.mylyn.tasks.core/.settings/org.eclipse.mylyn.tasklist.prefs4
-rw-r--r--org.eclipse.mylyn.tasks.core/.settings/org.eclipse.mylyn.tasks.ui.prefs4
-rw-r--r--org.eclipse.mylyn.tasks.core/.settings/org.eclipse.pde.prefs12
-rw-r--r--org.eclipse.mylyn.tasks.core/META-INF/MANIFEST.MF15
-rw-r--r--org.eclipse.mylyn.tasks.core/about.html27
-rw-r--r--org.eclipse.mylyn.tasks.core/build-user.xml3
-rw-r--r--org.eclipse.mylyn.tasks.core/build.properties15
-rw-r--r--org.eclipse.mylyn.tasks.core/icons/elcl16/edge-ref-bug.gifbin572 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.core/plugin.xml31
-rw-r--r--org.eclipse.mylyn.tasks.core/pom.xml137
-rw-r--r--org.eclipse.mylyn.tasks.core/schema/templates.exsd194
-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/IRepositoryConstants.java37
-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/ITaskRepositoryFilter.java54
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/LocalAttachment.java124
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/LocalRepositoryConnector.java132
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/LocalTask.java54
-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.java67
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/Person.java35
-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/SaxRepositoriesContentHandler.java55
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/SaxRepositoriesWriter.java182
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ScheduledTaskContainer.java226
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ScheduledTaskDelegate.java288
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskActivityManager.java757
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskActivityUtil.java162
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskArchive.java46
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskCategory.java30
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskDataManager.java327
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskDataState.java119
-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/TaskRepositoriesExternalizer.java124
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/UnfiledCategory.java49
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractAttachmentHandler.java213
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractAttributeFactory.java42
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractRepositoryConnector.java368
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractRepositoryQuery.java88
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTask.java469
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskCategory.java38
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskContainer.java178
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskDataHandler.java81
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskListFactory.java63
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AttributeContainer.java156
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/FileAttachment.java85
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ILinkedTaskInfo.java29
-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/ITaskAttachment.java34
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskCollector.java28
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskFactory.java32
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskListChangeListener.java23
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskRepositoryListener.java27
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/QueryHitCollector.java62
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/RepositoryAttachment.java117
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/RepositoryOperation.java216
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/RepositoryStatus.java194
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/RepositoryTaskAttribute.java285
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/RepositoryTaskData.java338
-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/TaskComment.java97
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskContainerDelta.java65
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskList.java763
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepository.java470
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepositoryManager.java401
-rw-r--r--org.eclipse.mylyn.tasks.tests/.classpath15
-rw-r--r--org.eclipse.mylyn.tasks.tests/.cvsignore1
-rw-r--r--org.eclipse.mylyn.tasks.tests/.project28
-rw-r--r--org.eclipse.mylyn.tasks.tests/.settings/org.eclipse.jdt.core.prefs316
-rw-r--r--org.eclipse.mylyn.tasks.tests/.settings/org.eclipse.jdt.ui.prefs6
-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.mylar.tasklist.prefs4
-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.prefs12
-rw-r--r--org.eclipse.mylyn.tasks.tests/META-INF/MANIFEST.MF29
-rw-r--r--org.eclipse.mylyn.tasks.tests/about.html27
-rw-r--r--org.eclipse.mylyn.tasks.tests/build.properties18
-rw-r--r--org.eclipse.mylyn.tasks.tests/plugin.xml27
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AllTasksTests.java68
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AttachmentJobTest.java115
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/BackgroundSaveTest.java63
-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/NewTaskWizardRepositorySelectionTest.java88
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/OfflineCachingStorageTest.java151
-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/PersonProposalProviderTest.java54
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ProjectRepositoryAssociationTest.java70
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/QueryExportImportTest.java338
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/RepositorySettingsPageTest.java178
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/RepositoryTaskSynchronizationTest.java454
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/RetrieveTitleFromUrlTest.java40
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ScheduledPresentationTest.java168
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TableSorterTest.java34
-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/TaskActivityTimingTest.java1045
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskDataExportTest.java132
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskDataImportTest.java123
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskDataManagerTest.java257
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskExportImportTest.java145
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskHistoryTest.java248
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskKeyComparatorTest.java61
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskList06DataMigrationTest.java323
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListBackupManagerTest.java86
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListContentProviderTest.java63
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListDnDTest.java74
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListManagerTest.java1008
-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/TaskListTest.java27
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListUiTest.java393
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskPlanningEditorTest.java113
-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/TaskRepositoryManagerTest.java218
-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.java29
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskTest.java59
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskTestUtil.java51
-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/UrlConnectionUtilTest.java85
-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.java168
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockRepositoryConnectorUi.java49
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockRepositoryQuery.java35
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockRepositoryTask.java62
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockStatusHandler.java32
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockTaskListFactory.java111
-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/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/.classpath15
-rw-r--r--org.eclipse.mylyn.tasks.ui/.cvsignore2
-rw-r--r--org.eclipse.mylyn.tasks.ui/.project28
-rw-r--r--org.eclipse.mylyn.tasks.ui/.settings/org.eclipse.jdt.core.prefs316
-rw-r--r--org.eclipse.mylyn.tasks.ui/.settings/org.eclipse.jdt.ui.prefs6
-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.mylar.tasklist.prefs4
-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.prefs12
-rw-r--r--org.eclipse.mylyn.tasks.ui/META-INF/MANIFEST.MF47
-rw-r--r--org.eclipse.mylyn.tasks.ui/about.html27
-rw-r--r--org.eclipse.mylyn.tasks.ui/build.properties23
-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/elcl16/blank.gifbin55 -> 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/elcl16/clearDot.gifbin43 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/elcl16/collapseall.pngbin192 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/elcl16/delete.gifbin351 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/elcl16/expandall.gifbin164 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/elcl16/filter-archive.gifbin350 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/elcl16/filter-complete.gifbin135 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/elcl16/filter-priority.gifbin192 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/elcl16/refresh-small.gifbin146 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/elcl16/refresh.gifbin216 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/elcl16/remove.gifbin163 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/elcl16/reply.gifbin189 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/elcl16/task-search.gifbin587 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/elcl16/warning.gifbin322 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/attachment-patch.gifbin578 -> 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-fit.pngbin469 -> 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/capture-screen.pngbin699 -> 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/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/copy.pngbin413 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/find-clear-disabled.gifbin53 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/find-clear.gifbin186 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/go-into.gifbin357 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/go-up.gifbin562 -> 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/link-editor.gifbin160 -> 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-browser.gifbin565 -> 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/overlay-repository.gifbin80 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/overlay-web.gifbin167 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/person-me-narrow.gifbin293 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/person-me.gifbin307 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/person-narrow.gifbin294 -> 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/presentation.gifbin101 -> 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.gifbin332 -> 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/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-items.gifbin218 -> 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-completed.gifbin343 -> 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-notes.gifbin337 -> 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-server.gifbin339 -> 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/toolbar-arrow-down.gifbin165 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/toolbar-arrow-right.gifbin167 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/etool16/view-filter.gifbin219 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/focus-view.gifbin357 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/notification-close.gifbin88 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-completed.gifbin106 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-conflicting.gifbin187 -> 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/overlay-has-context.gifbin162 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-has-due.gifbin179 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-incoming-multiple.gifbin301 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-incoming-new.gifbin190 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-incoming.gifbin178 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-offline.gifbin895 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-outgoing.gifbin182 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-overdue.gifbin178 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-repository-context.gifbin166 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-repository.gifbin79 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-synch-incoming-new.gifbin189 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-synch-incoming.gifbin187 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-synch-outgoing.gifbin190 -> 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/priority-1.gifbin136 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/priority-2.gifbin123 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/priority-3.gifbin50 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/priority-4.gifbin179 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/priority-5.gifbin186 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/progress/1.pngbin3410 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/progress/2.pngbin3414 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/progress/3.pngbin3414 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/progress/4.pngbin3414 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/progress/5.pngbin3405 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/progress/6.pngbin3406 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/progress/7.pngbin3401 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/progress/8.pngbin3407 -> 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/status-conflict.gifbin202 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/status-normal.gifbin55 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/status-server-context.gifbin175 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/task-activity.gifbin581 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/task-bug.gifbin341 -> 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/find.gifbin157 -> 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/browser-small.gifbin519 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/obj16/calendar-small.gifbin318 -> 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-blank.gifbin51 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/ovr16/overlay-complete.gifbin106 -> 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/ovr16/overlay-warning.gifbin180 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/ovr16/solid-white.gifbin58 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/wizban/banner-export.gifbin3220 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/wizban/banner-import.gifbin3247 -> 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/workset_wiz.pngbin6602 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/plugin.xml994
-rw-r--r--org.eclipse.mylyn.tasks.ui/schema/actions.exsd129
-rw-r--r--org.eclipse.mylyn.tasks.ui/schema/duplicateDetectors.exsd119
-rw-r--r--org.eclipse.mylyn.tasks.ui/schema/editors.exsd135
-rw-r--r--org.eclipse.mylyn.tasks.ui/schema/presentations.exsd128
-rw-r--r--org.eclipse.mylyn.tasks.ui/schema/projectLinkProviders.exsd126
-rw-r--r--org.eclipse.mylyn.tasks.ui/schema/repositories.exsd246
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/AbstractTaskListFilter.java24
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/AddExistingTaskJob.java118
-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/CompositeContainerImageDescriptor.java60
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/CompositeSynchImageDescriptor.java59
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/CompositeTaskImageDescriptor.java67
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ContextCapturePauseHandler.java115
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ContextUiUtil.java142
-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/ITaskListNotification.java36
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ITaskListNotificationProvider.java20
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ITasksUiConstants.java32
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/LocalTaskConnectorUi.java49
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/MoveToCategoryMenuContributor.java107
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/OfflineCachingStorage.java320
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/OfflineFileStorage.java715
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/OpenRepositoryTaskJob.java116
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/PersonContentProposal.java61
-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.java163
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/PlanningPerspectiveFactory.java68
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/RepositoryAwareStatusHandler.java102
-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/RetrieveTitleFromUrlJob.java126
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ScheduleTaskMenuContributor.java301
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ScheduledPresentation.java33
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ScheduledTaskListSynchJob.java173
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskArchiveFilter.java24
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskCompletionFilter.java30
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskHistoryDropDown.java206
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskHistoryHandler.java51
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskLabelDecorator.java90
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListBackupManager.java234
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListColorsAndFonts.java116
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListHyperlink.java47
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListImageDescriptor.java78
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListImageHyperlink.java47
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationIncoming.java126
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager.java221
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationPopup.java216
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationQueryIncoming.java104
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationReminder.java108
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListPatternFilter.java25
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListSynchronizationScheduler.java151
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskPriorityFilter.java56
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskRepositoryAdapterFactory.java57
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskSearchPage.java503
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskStatusMenuContributor.java61
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskTransfer.java109
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskTrimWidget.java359
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskWorkingSetFilter.java74
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksReminderDialog.java265
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksUiImages.java432
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksUiPreferenceConstants.java62
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/WorkspaceAwareContextStore.java50
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AbstractChangeCompletionAction.java54
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AbstractTaskAction.java55
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AbstractTaskRepositoryAction.java43
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ActivateTaskDialogAction.java65
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ActivateTaskHistoryDropDownAction.java208
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ActivityReportAction.java50
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AddRepositoryAction.java45
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AddRepositoryTaskAction.java56
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AttachFileAction.java60
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ClearOutgoingAction.java65
-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.java40
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CopyAttachmentToClipboardJob.java84
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CopyTaskDetailsAction.java100
-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.java131
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DeleteTaskRepositoryAction.java88
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DownloadAttachmentJob.java87
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/EditRepositoryPropertiesAction.java54
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ExpandAllAction.java40
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/FilterArchiveContainerAction.java49
-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.java54
-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.java75
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/MarkTaskIncompleteAction.java74
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/MarkTaskReadAction.java50
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/MarkTaskUnreadAction.java51
-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.java86
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewQueryAction.java103
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewTaskAction.java105
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenRepositoryTask.java116
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTaskAction.java70
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTaskListElementAction.java50
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTaskSearchAction.java36
-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.java60
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/PresentationDropDownSelectionAction.java119
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/QueryCloneAction.java99
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/QueryExportAction.java109
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/QueryImportAction.java107
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RemoveFromCategoryAction.java87
-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/ReportBugAction.java24
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RestoreTaskListAction.java66
-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.java37
-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.java91
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/SynchronizeSelectedAction.java157
-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.java45
-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.java139
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskImportAction.java127
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskListElementPropertiesAction.java45
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskNavigateDropDownAction.java112
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskSelectionDialog.java300
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskWorkingSetAction.java360
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ToggleAllWorkingSetsAction.java56
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ToggleTaskActivationAction.java91
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ToggleWorkingSetAction.java88
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/AddTaskRepositoryHandler.java81
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/RemoteTaskSelectionDialog.java328
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/TaskRepositoryParameterValues.java36
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/AbstractWorkingSetDialogCOPY.java429
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AttachmentTableLabelProvider.java150
-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/CategoryEditor.java128
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/CategoryEditorInput.java78
-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/EditorBusyIndicator.java177
-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/RepositoryAttachmentEditorInput.java127
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTaskOutlineComparer.java44
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTaskOutlineNode.java328
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTaskOutlinePage.java178
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTaskSelection.java158
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTextViewer.java56
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/SpellingDialog.java101
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorActionContributor.java420
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorInputFactory.java41
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskHyperlinkDetector.java115
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskPlanningEditor.java951
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskSpellingReconcileStrategy.java184
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskUrlHyperlink.java30
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskUrlHyperlinkDetector.java114
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/CompletedTaskCollector.java54
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/DateSelectionDialog.java102
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/ITaskCollector.java23
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/ITaskPlannerContentProvider.java18
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/InProgressTaskCollector.java77
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/OpenTaskEditorAction.java50
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/PlannedTasksContentProvider.java68
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/ReminderCellEditor.java93
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/RemoveTaskAction.java42
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskActivityContentProvider.java81
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskActivityEditorInput.java192
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskActivityEditorPart.java692
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskActivitySorter.java95
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskActivityWizard.java66
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskActivityWizardPage.java365
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskPlanContentProvider.java48
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskPlanSorter.java87
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskPlannerLabelProvider.java138
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskReportGenerator.java119
-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.java551
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/properties/ProjectPropertiesLinkProvider.java81
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/properties/ProjectTaskRepositoryPage.java186
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/AbstractRepositorySearchQuery.java42
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/CreateQueryFromSearchAction.java83
-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/RepositorySearchResultView.java321
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultContentProvider.java61
-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.java71
-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/SearchResultTableContentProvider.java90
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchScoreComputerAdapterFactory.java51
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/BackgroundSaveTimer.java97
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/DelegatingTaskExternalizer.java666
-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/TaskDataExportJob.java258
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskListSaveManager.java316
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskListWriter.java722
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TasksUiExtensionReader.java450
-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/AbstractFilteredTree.java224
-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/AdaptiveRefreshPolicy.java108
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/CustomTaskListDecorationDrawer.java172
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/DatePickerPanel.java191
-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/IFilteredTreeListener.java18
-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/ResetRepositoryConfigurationAction.java83
-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.java67
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskActivationHistory.java142
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskActivityLabelProvider.java173
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskElementLabelProvider.java379
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskInputDialog.java288
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskKeyComparator.java65
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListCellModifier.java115
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListContentProvider.java326
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListDragSourceListener.java178
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListDropAdapter.java344
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListFilteredTree.java526
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListTableSorter.java154
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListToolTipHandler.java569
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java1696
-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.java252
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoryLabelProvider.java89
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskScheduleContentProvider.java97
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskTableLabelProvider.java99
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/WorkweekProgressBar.java170
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/AbstractRepositoryClientWizard.java91
-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/CloneTaskWizard.java28
-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/ContextAttachWizard.java52
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ContextAttachWizardPage.java93
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ContextRetrieveWizard.java57
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ContextRetrieveWizardPage.java197
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/EditRepositoryWizard.java102
-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/InputAttachmentSourcePage.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.java289
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewAttachmentWizard.java327
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewAttachmentWizardDialog.java42
-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.java55
-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.java58
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewTaskPage.java33
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewTaskWizard.java27
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewWebTaskPage.java40
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/PreviewAttachmentPage.java215
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ScreenShotAttachmentPage.java425
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/SelectRepositoryClientPage.java126
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/SelectRepositoryPage.java272
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataExportWizard.java187
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataExportWizardPage.java293
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataImportWizard.java240
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataImportWizardPage.java387
-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.java51
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/workingsets/TaskWorkingSetElementFactory.java57
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/workingsets/TaskWorkingSetPage.java454
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/workingsets/TaskWorkingSetUpdater.java228
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/AbstractDuplicateDetector.java45
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/AbstractRepositoryConnectorUi.java248
-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/DatePicker.java277
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/RepositorySynchronizationManager.java366
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/SynchronizeQueryJob.java233
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/SynchronizeTaskJob.java296
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskFactory.java168
-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/TaskListManager.java849
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiPlugin.java1077
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiProxyChangeListener.java36
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiUtil.java558
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/WebHyperlink.java50
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractNewRepositoryTaskEditor.java562
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRenderingEngine.java27
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditor.java3526
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditorInput.java123
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorFactory.java45
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/NewTaskEditorInput.java42
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/RepositoryTaskEditorDropListener.java143
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/RepositoryTaskEditorInput.java104
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditor.java499
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditorInput.java172
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskFormPage.java668
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskTextViewerConfiguration.java193
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/search/AbstractRepositoryQueryPage.java174
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/search/RepositorySearchResult.java93
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/search/SearchHitCollector.java176
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractEditQueryWizard.java69
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositorySettingsPage.java1317
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/NewTaskWizard.java114
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/NewWebTaskWizard.java61
-rw-r--r--org.eclipse.mylyn.trac.core/.classpath11
-rw-r--r--org.eclipse.mylyn.trac.core/.cvsignore1
-rw-r--r--org.eclipse.mylyn.trac.core/.project28
-rw-r--r--org.eclipse.mylyn.trac.core/.settings/org.eclipse.jdt.core.prefs316
-rw-r--r--org.eclipse.mylyn.trac.core/.settings/org.eclipse.jdt.ui.prefs6
-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.mylar.tasklist.prefs4
-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.prefs12
-rw-r--r--org.eclipse.mylyn.trac.core/META-INF/MANIFEST.MF19
-rw-r--r--org.eclipse.mylyn.trac.core/about.html27
-rw-r--r--org.eclipse.mylyn.trac.core/build.properties16
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/AbstractTracClient.java181
-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.java191
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/ITracWikiClient.java226
-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.java168
-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.java63
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracClientManager.java140
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracCorePlugin.java126
-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/TracRemoteException.java35
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracRepositoryConnector.java420
-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.java166
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracTaskDataHandler.java354
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracWebClient.java721
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracWikiHandler.java113
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracXmlRpcClient.java867
-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.java175
-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.java77
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/util/TracHttpClientTransportFactory.java183
-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.tests/.classpath7
-rw-r--r--org.eclipse.mylyn.trac.tests/.cvsignore3
-rw-r--r--org.eclipse.mylyn.trac.tests/.project28
-rw-r--r--org.eclipse.mylyn.trac.tests/.settings/org.eclipse.jdt.core.prefs316
-rw-r--r--org.eclipse.mylyn.trac.tests/.settings/org.eclipse.jdt.ui.prefs6
-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.mylar.tasklist.prefs4
-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.prefs12
-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.properties11
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtilTest.java204
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AbstractTracClientRepositoryTest.java110
-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.java97
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracTests.java50
-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.java87
-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.java207
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientFactoryTest.java93
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientManagerTest.java76
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientProxyTest.java75
-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.java345
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryQueryTest.java77
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositorySettingsPageTest.java105
-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.java269
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTaskTest.java41
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTestConstants.java30
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTestPlugin.java51
-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.java504
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TestCleanupUtil.java58
-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/XmlRpcServer.java367
-rw-r--r--org.eclipse.mylyn.trac.ui/.classpath15
-rw-r--r--org.eclipse.mylyn.trac.ui/.cvsignore1
-rw-r--r--org.eclipse.mylyn.trac.ui/.project28
-rw-r--r--org.eclipse.mylyn.trac.ui/.settings/org.eclipse.jdt.core.prefs316
-rw-r--r--org.eclipse.mylyn.trac.ui/.settings/org.eclipse.jdt.ui.prefs6
-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.mylar.tasklist.prefs4
-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.prefs12
-rw-r--r--org.eclipse.mylyn.trac.ui/META-INF/MANIFEST.MF25
-rw-r--r--org.eclipse.mylyn.trac.ui/about.html27
-rw-r--r--org.eclipse.mylyn.trac.ui/build.properties19
-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.xml38
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracConnectorUi.java130
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtil.java281
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracImages.java49
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracTaskListFactory.java69
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracUiPlugin.java53
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/BrowserFormPage.java61
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/NewTracTaskEditor.java103
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracRenderingEngine.java75
-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.java100
-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.java63
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/NewTracTaskPage.java144
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/NewTracTaskWizard.java66
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracCustomQueryPage.java780
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracQueryWizardPage.java443
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracRepositorySettingsPage.java255
1015 files changed, 0 insertions, 112660 deletions
diff --git a/org.eclipse.mylyn.bugzilla.core/.classpath b/org.eclipse.mylyn.bugzilla.core/.classpath
deleted file mode 100644
index d12be34be..000000000
--- a/org.eclipse.mylyn.bugzilla.core/.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="discouraged" pattern="**/mylyn/**/internal/**"/>
- <accessrule kind="accessible" pattern="**/internal/**"/>
- <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 8d9696887..000000000
--- a/org.eclipse.mylyn.bugzilla.core/.project
+++ /dev/null
@@ -1,28 +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>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</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 888de1277..000000000
--- a/org.eclipse.mylyn.bugzilla.core/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,316 +0,0 @@
-#Sun Jun 24 11:52:58 EDT 2007
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.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=disabled
-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.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.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
-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=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-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.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.5
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=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_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 \ No newline at end of file
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 1e4caec9f..000000000
--- a/org.eclipse.mylyn.bugzilla.core/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,6 +0,0 @@
-#Mon Jul 09 18:11:45 PDT 2007
-eclipse.preferences.version=1
-formatter_profile=_Mylar based on Eclipse [built-in]
-formatter_settings_version=11
-internal.default.compliance=default
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return the ${bare_field_name}\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} the ${bare_field_name} to set\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\r\n * \r\n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author ${user}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*******************************************************************************\r\n * Copyright (c) 2004, 2007 Mylyn project committers and others.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n *******************************************************************************/\r\n\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ignore\r\n${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ignore</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template></templates>
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.mylar.tasklist.prefs b/org.eclipse.mylyn.bugzilla.core/.settings/org.eclipse.mylar.tasklist.prefs
deleted file mode 100644
index a6cf96a98..000000000
--- a/org.eclipse.mylyn.bugzilla.core/.settings/org.eclipse.mylar.tasklist.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Fri Oct 20 16:54:30 PDT 2006
-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.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 769b229ff..000000000
--- a/org.eclipse.mylyn.bugzilla.core/.settings/org.eclipse.pde.prefs
+++ /dev/null
@@ -1,12 +0,0 @@
-#Thu Nov 03 15:45:55 PST 2005
-compilers.p.deprecated=2
-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-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 d8f2fd266..000000000
--- a/org.eclipse.mylyn.bugzilla.core/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,16 +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: 2.1.0.v20070924-2200
-Bundle-Activator: org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.mylyn.tasks.core,
- org.eclipse.mylyn.web.core,
- org.eclipse.mylyn.monitor.core
-Eclipse-AutoStart: true
-Bundle-Vendor: Eclipse.org
-Bundle-ClassPath: .
-Export-Package: org.eclipse.mylyn.internal.bugzilla.core,
- org.eclipse.mylyn.internal.bugzilla.core.history
-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 9ac76aa82..000000000
--- a/org.eclipse.mylyn.bugzilla.core/build.properties
+++ /dev/null
@@ -1,16 +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 = src/,\
- META-INF/,\
- 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 33ca93ceb..000000000
--- a/org.eclipse.mylyn.bugzilla.core/plugin.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
-
-</plugin>
diff --git a/org.eclipse.mylyn.bugzilla.core/pom.xml b/org.eclipse.mylyn.bugzilla.core/pom.xml
deleted file mode 100644
index ca9345ef8..000000000
--- a/org.eclipse.mylyn.bugzilla.core/pom.xml
+++ /dev/null
@@ -1,143 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.eclipse.mylyn.bugzilla</groupId>
- <artifactId>core</artifactId>
- <version>2.0.0-v20070706-2000</version>
- <packaging>jar</packaging>
- <name>Mylyn Bugzilla Core</name>
- <url>http://www.eclipse.org/mylyn</url>
- <description>
- Eclipse Mylyn is a task-focused UI that reduces information overload and
- makes multi-tasking easy.
- </description>
-
- <organization>
- <name>Eclipse Foundation</name>
- <url>http://www.eclipse.org</url>
- </organization>
-
- <licenses>
- <license>
- <name>Eclipse Public License</name>
- <url>http://www.eclipse.org/org/documents/epl-v10.html</url>
- <distribution>repo</distribution>
- </license>
- </licenses>
-
- <scm>
- <connection>
- scm:cvs:pserver:anonymous:@dev.eclipse.org:/cvsroot/tools:org.eclipse.mylyn/org.eclipse.mylyn.bugzilla.core
- </connection>
- <url>
- http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.mylyn/org.eclipse.mylyn.bugzilla.core/?root&#61;Tools_Project
- </url>
- </scm>
-
- <issueManagement>
- <system>Bugzilla</system>
- <url>https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Mylyn</url>
- </issueManagement>
-
- <repositories>
- <repository>
- <id>central-eclipse</id>
- <name>Central Eclipse Repository</name>
- <url>http://repo1.maven.org/eclipse</url>
- </repository>
- </repositories>
-
- <dependencies>
- <dependency>
- <groupId>commons-httpclient</groupId>
- <artifactId>commons-httpclient</artifactId>
- <version>3.0.1</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.eclipse.core</groupId>
- <artifactId>runtime</artifactId>
- <version>3.3.100-v20070530</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.eclipse.equinox</groupId>
- <artifactId>common</artifactId>
- <version>3.3.0-v20070426</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.eclipse.mylyn.monitor</groupId>
- <artifactId>core</artifactId>
- <version>2.0.0-v20070706-2000</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.eclipse.mylyn.tasks</groupId>
- <artifactId>core</artifactId>
- <version>2.0.0-v20070706-2000</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.eclipse.mylyn.web</groupId>
- <artifactId>core</artifactId>
- <version>2.0.0-v20070706-2000</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.eclipse</groupId>
- <artifactId>osgi</artifactId>
- <version>3.3.0-v20070530</version>
- <scope>compile</scope>
- </dependency>
- </dependencies>
-
- <build>
- <sourceDirectory>src</sourceDirectory>
- <resources>
- <resource>
- <directory>.</directory>
- <includes>
- <include>about.html</include>
- <include>plugin.xml</include>
- </includes>
- </resource>
- </resources>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <showDeprecation>true</showDeprecation>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <archive>
- <manifestFile>META-INF/MANIFEST.MF</manifestFile>
- </archive>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-changelog-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jxr-plugin</artifactId>
- </plugin>
- </plugins>
- </reporting>
-
-</project>
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 2e27bacba..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.eclipse.mylyn.web.core.XmlUtil;
-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 InputStream inStream;
-
- private 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() {
- @Override
- public int read() throws IOException {
- int c;
- while ((c = is.read()) != -1) {
- if (XmlUtil.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 b4c2da989..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.tasks.core.ITaskAttachment;
-
-/**
- * @author Steffen Pingel
- */
-public class AttachmentPartSource implements PartSource {
-
- private 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/BugzillaAttachmentHandler.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttachmentHandler.java
deleted file mode 100644
index cae2633c3..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttachmentHandler.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.internal.bugzilla.core;
-
-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.Status;
-import org.eclipse.mylyn.tasks.core.AbstractAttachmentHandler;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.ITaskAttachment;
-import org.eclipse.mylyn.tasks.core.RepositoryAttachment;
-import org.eclipse.mylyn.tasks.core.RepositoryStatus;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-/**
- * @author Mik Kersten
- * @author Rob Elves
- */
-public class BugzillaAttachmentHandler extends AbstractAttachmentHandler {
-
- private BugzillaRepositoryConnector connector;
-
- public BugzillaAttachmentHandler(BugzillaRepositoryConnector connector) {
- this.connector = connector;
- }
-
- @Override
- public InputStream getAttachmentAsStream(TaskRepository repository, RepositoryAttachment attachment,
- IProgressMonitor monitor) throws CoreException {
- try {
- BugzillaClient client = connector.getClientManager().getClient(repository);
- return client.getAttachmentData(attachment.getId());
- } catch (IOException e) {
- throw new CoreException(new BugzillaStatus(Status.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_IO, repository.getUrl(), e));
- }
- }
-
- @Override
- public void uploadAttachment(TaskRepository repository, AbstractTask task, ITaskAttachment attachment,
- String comment, IProgressMonitor monitor) throws CoreException {
- try {
- String bugId = task.getTaskId();
- BugzillaClient client = connector.getClientManager().getClient(repository);
- client.postAttachment(bugId, comment, attachment);
- } catch (IOException e) {
- throw new CoreException(new BugzillaStatus(Status.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_IO, repository.getUrl(), e));
- }
- }
-
- @Override
- public boolean canDownloadAttachment(TaskRepository repository, AbstractTask task) {
- return true;
- }
-
- @Override
- public boolean canUploadAttachment(TaskRepository repository, AbstractTask task) {
- return true;
- }
-
- @Override
- public boolean canDeprecate(TaskRepository repository, RepositoryAttachment attachment) {
- return false;
- }
-
- @Override
- public void updateAttachment(TaskRepository repository, RepositoryAttachment attachment) throws CoreException {
- // implement
- }
-
-}
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 715cc24a1..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttributeFactory.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public 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.tasks.core.AbstractAttributeFactory;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskAttribute;
-
-/**
- * @author Rob Elves
- * @author Mik Kersten
- */
-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 BugzillaReportElement.NEWCC.getKeyString();
- } else if (key.equals(RepositoryTaskAttribute.COMMENT_DATE)) {
- return BugzillaReportElement.BUG_WHEN.getKeyString();
- } else if (key.equals(RepositoryTaskAttribute.COMMENT_AUTHOR)) { // was USER_OWNER
- return BugzillaReportElement.WHO.getKeyString();
- } else if (key.equals(RepositoryTaskAttribute.USER_CC)) {
- return BugzillaReportElement.CC.getKeyString();
- } else if (key.equals(RepositoryTaskAttribute.COMMENT_TEXT)) {
- return BugzillaReportElement.THETEXT.getKeyString();
- } else if (key.equals(RepositoryTaskAttribute.DATE_CREATION)) {
- return BugzillaReportElement.CREATION_TS.getKeyString();
- } else if (key.equals(RepositoryTaskAttribute.DESCRIPTION)) {
- return BugzillaReportElement.DESC.getKeyString();
- } else if (key.equals(RepositoryTaskAttribute.ATTACHMENT_ID)) {
- return BugzillaReportElement.ATTACHID.getKeyString();
- } else if (key.equals(RepositoryTaskAttribute.ATTACHMENT_TYPE)) {
- return BugzillaReportElement.TYPE.getKeyString();
- } else if (key.equals(RepositoryTaskAttribute.ATTACHMENT_CTYPE)) {
- return BugzillaReportElement.CTYPE.getKeyString();
- } else if (key.equals(RepositoryTaskAttribute.USER_ASSIGNED)) {
- return BugzillaReportElement.ASSIGNED_TO.getKeyString();
- } else if (key.equals(RepositoryTaskAttribute.RESOLUTION)) {
- return BugzillaReportElement.RESOLUTION.getKeyString();
- } else if (key.equals(RepositoryTaskAttribute.STATUS)) {
- return BugzillaReportElement.BUG_STATUS.getKeyString();
- } else if (key.equals(RepositoryTaskAttribute.DATE_MODIFIED)) {
- return BugzillaReportElement.DELTA_TS.getKeyString();
- } else if (key.equals(RepositoryTaskAttribute.USER_REPORTER)) {
- return BugzillaReportElement.REPORTER.getKeyString();
- } else if (key.equals(RepositoryTaskAttribute.SUMMARY)) {
- return BugzillaReportElement.SHORT_DESC.getKeyString();
- } else if (key.equals(RepositoryTaskAttribute.PRODUCT)) {
- return BugzillaReportElement.PRODUCT.getKeyString();
- } else if (key.equals(RepositoryTaskAttribute.KEYWORDS)) {
- return BugzillaReportElement.KEYWORDS.getKeyString();
- } else if (key.equals(RepositoryTaskAttribute.ATTACHMENT_DATE)) {
- return BugzillaReportElement.DATE.getKeyString();
- } else if (key.equals(RepositoryTaskAttribute.ADD_SELF_CC)) {
- return BugzillaReportElement.ADDSELFCC.getKeyString();
- } else if (key.equals(RepositoryTaskAttribute.PRIORITY)) {
- return BugzillaReportElement.PRIORITY.getKeyString();
- } else if (key.equals(RepositoryTaskAttribute.COMMENT_NEW)) {
- return BugzillaReportElement.NEW_COMMENT.getKeyString();
- } else {
- return key;
- }
- }
-
- @Override
- public boolean isHidden(String key) {
- try {
- return BugzillaReportElement.valueOf(key.trim().toUpperCase(Locale.ENGLISH)).isHidden();
- } catch (IllegalArgumentException e) {
- return false;
- }
- }
-
- @Override
- public String getName(String key) {
- try {
- return BugzillaReportElement.valueOf(key.trim().toUpperCase(Locale.ENGLISH)).toString();
- } catch (IllegalArgumentException e) {
- return "<unknown>";
- }
- }
-
- @Override
- public boolean isReadOnly(String key) {
- try {
- return BugzillaReportElement.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(BugzillaReportElement.DELTA_TS.getKeyString())) {
- parsedDate = new SimpleDateFormat(delta_ts_format).parse(dateString);
- } else if (mappedKey.equals(BugzillaReportElement.CREATION_TS.getKeyString())) {
- parsedDate = new SimpleDateFormat(creation_ts_format).parse(dateString);
- } else if (mappedKey.equals(BugzillaReportElement.BUG_WHEN.getKeyString())) {
- parsedDate = new SimpleDateFormat(comment_creation_ts_format).parse(dateString);
- } else if (mappedKey.equals(BugzillaReportElement.DATE.getKeyString())) {
- 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/BugzillaClient.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java
deleted file mode 100644
index 8e60000c0..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java
+++ /dev/null
@@ -1,1224 +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.net.HttpURLConnection;
-import java.net.Proxy;
-import java.net.URL;
-import java.nio.charset.Charset;
-import java.text.ParseException;
-import java.util.ArrayList;
-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 org.apache.commons.httpclient.DefaultHttpMethodRetryHandler;
-import org.apache.commons.httpclient.Header;
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.HttpException;
-import org.apache.commons.httpclient.HttpMethod;
-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.PostMethod;
-import org.apache.commons.httpclient.methods.multipart.FilePart;
-import org.apache.commons.httpclient.methods.multipart.MultipartRequestEntity;
-import org.apache.commons.httpclient.methods.multipart.Part;
-import org.apache.commons.httpclient.methods.multipart.PartBase;
-import org.apache.commons.httpclient.methods.multipart.StringPart;
-import org.apache.commons.httpclient.params.HttpMethodParams;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.mylyn.internal.bugzilla.core.history.BugzillaTaskHistoryParser;
-import org.eclipse.mylyn.internal.bugzilla.core.history.TaskHistory;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.ITaskAttachment;
-import org.eclipse.mylyn.tasks.core.ITaskCollector;
-import org.eclipse.mylyn.tasks.core.QueryHitCollector;
-import org.eclipse.mylyn.tasks.core.RepositoryOperation;
-import org.eclipse.mylyn.tasks.core.RepositoryStatus;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskAttribute;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.web.core.HtmlStreamTokenizer;
-import org.eclipse.mylyn.web.core.HtmlTag;
-import org.eclipse.mylyn.web.core.WebClientUtil;
-import org.eclipse.mylyn.web.core.HtmlStreamTokenizer.Token;
-
-/**
- * @author Mik Kersten
- * @author Rob Elves
- * @author Steffen Pingel
- */
-public class BugzillaClient {
-
- 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_REMOVECC = "removecc";
-
- 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 int MAX_RETRY = 3;
-
- // private static final int CONNECT_TIMEOUT = 60000;
-
- 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";
-
- private static final BugzillaAttributeFactory attributeFactory = new BugzillaAttributeFactory();
-
- protected Proxy proxy = Proxy.NO_PROXY;
-
- protected String username;
-
- protected String password;
-
- protected URL repositoryUrl;
-
- protected String characterEncoding;
-
- private boolean authenticated;
-
- private String htAuthUser;
-
- private String htAuthPass;
-
- private Map<String, String> configParameters;
-
- private HttpClient httpClient = new HttpClient(new MultiThreadedHttpConnectionManager());
-
- private boolean isValidation = false;
-
- private class BugzillaRetryHandler extends DefaultHttpMethodRetryHandler {
- public BugzillaRetryHandler() {
- super(MAX_RETRY, false);
- }
-
- @Override
- public boolean retryMethod(HttpMethod method, IOException exception, int executionCount) {
- if (super.retryMethod(method, exception, executionCount)) {
- int soTimeout = httpClient.getHttpConnectionManager().getParams().getSoTimeout();
- httpClient.getHttpConnectionManager().getParams().setSoTimeout(soTimeout * 2);
- int connectTimeout = httpClient.getHttpConnectionManager().getParams().getConnectionTimeout();
- httpClient.getHttpConnectionManager().getParams().setConnectionTimeout(connectTimeout * 2);
- return true;
- }
- return false;
- }
- }
-
- public BugzillaClient(URL url, String username, String password, String htAuthUser, String htAuthPass,
- String characterEncoding) {
- this(url, username, password, htAuthUser, htAuthPass, characterEncoding, new HashMap<String, String>());
- }
-
- public BugzillaClient(URL url, String username, String password, String htAuthUser, String htAuthPass,
- String characterEncoding, Map<String, String> configParameters) {
- this.username = username;
- this.password = password;
- this.repositoryUrl = url;
- this.htAuthUser = htAuthUser;
- this.htAuthPass = htAuthPass;
- this.characterEncoding = characterEncoding;
- this.configParameters = configParameters;
- }
-
- public void validate() throws IOException, CoreException {
- GetMethod method = null;
- try {
- isValidation = true;
- logout();
- method = getConnect(repositoryUrl + "/");
- } finally {
- isValidation = false;
- if (method != null) {
- method.releaseConnection();
- }
- }
- }
-
- protected boolean hasAuthenticationCredentials() {
- return username != null && username.length() > 0;
- }
-
- private GetMethod getConnect(String serverURL) throws IOException, CoreException {
-
- return connectInternal(serverURL);
-
- }
-
- private GetMethod connectInternal(String requestURL) throws IOException, CoreException {
- WebClientUtil.setupHttpClient(httpClient, proxy, requestURL, htAuthUser, htAuthPass);
- for (int attempt = 0; attempt < 2; attempt++) {
- // force authentication
- if (!authenticated && hasAuthenticationCredentials()) {
- authenticate();
- }
-
- GetMethod getMethod = new GetMethod(WebClientUtil.getRequestPath(requestURL));
- 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);
-
- if (!isValidation) {
- getMethod.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, new BugzillaRetryHandler());
- }
- getMethod.setDoAuthentication(true);
-
- int code;
- try {
- code = httpClient.executeMethod(getMethod);
- } catch (IOException e) {
- getMethod.getResponseBody();
- getMethod.releaseConnection();
- throw new CoreException(new BugzillaStatus(Status.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.getResponseBody();
- // login or reauthenticate due to an expired session
- getMethod.releaseConnection();
- authenticated = false;
- authenticate();
- } else if (code == HttpURLConnection.HTTP_PROXY_AUTH) {
- // throw new LoginException("Proxy Authentication Required");
- authenticated = false;
- getMethod.getResponseBody();
- getMethod.releaseConnection();
- throw new CoreException(new BugzillaStatus(Status.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_REPOSITORY_LOGIN, repositoryUrl.toString(),
- "Proxy authentication required"));
- } else {
- getMethod.getResponseBody();
- getMethod.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 logout() throws IOException, CoreException {
- authenticated = true;
- String loginUrl = repositoryUrl + "/relogin.cgi";
- GetMethod method = null;
- try {
- method = getConnect(loginUrl);
- BufferedReader responseReader = new BufferedReader(new InputStreamReader(method.getResponseBodyAsStream(),
- 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() == HtmlTag.Type.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(Status.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_NETWORK, repositoryUrl.toString(), "Logout unsuccessful."));
-
- } catch (ParseException e) {
- authenticated = false;
- throw new CoreException(new BugzillaStatus(Status.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_INTERNAL, "Unable to parse response from " + repositoryUrl.toString() + "."));
- } finally {
- if (method != null) {
- method.releaseConnection();
- }
- }
- }
-
- public void authenticate() throws CoreException {
- if (!hasAuthenticationCredentials()) {
- authenticated = false;
- throw new CoreException(new BugzillaStatus(Status.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_REPOSITORY_LOGIN, repositoryUrl.toString(),
- "Authentication credentials missing."));
- }
-
- PostMethod postMethod = null;
-
- try {
-
- WebClientUtil.setupHttpClient(httpClient, proxy, repositoryUrl.toString(), htAuthUser, htAuthPass);
-
- 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 PostMethod(WebClientUtil.getRequestPath(repositoryUrl.toString()
- + IBugzillaConstants.URL_POST_LOGIN));
-
- postMethod.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset="
- + characterEncoding);
- postMethod.setRequestBody(formData);
- postMethod.setDoAuthentication(true);
- if (!isValidation) {
- postMethod.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, new BugzillaRetryHandler());
- }
- // httpClient.getHttpConnectionManager().getParams().setConnectionTimeout(WebClientUtil.CONNNECT_TIMEOUT);
- postMethod.setFollowRedirects(false);
-
- httpClient.getParams().setAuthenticationPreemptive(true);
- int code = httpClient.executeMethod(postMethod);
- if (code == HttpURLConnection.HTTP_UNAUTHORIZED || code == HttpURLConnection.HTTP_FORBIDDEN) {
- authenticated = false;
- postMethod.getResponseBody();
- postMethod.releaseConnection();
- throw new CoreException(new BugzillaStatus(Status.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_REPOSITORY_LOGIN, repositoryUrl.toString(),
- "HTTP authentication failed."));
-
- } else if (code == HttpURLConnection.HTTP_PROXY_AUTH) {
- authenticated = false;
- postMethod.getResponseBody();
- postMethod.releaseConnection();
- throw new CoreException(new BugzillaStatus(Status.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_REPOSITORY_LOGIN, repositoryUrl.toString(),
- "Proxy authentication required"));
-
- } else if (code != HttpURLConnection.HTTP_OK) {
- authenticated = false;
- postMethod.getResponseBody();
- postMethod.releaseConnection();
- throw new CoreException(new BugzillaStatus(Status.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_NETWORK, "Http error: " + HttpStatus.getStatusText(code)));
- }
-
- if (hasAuthenticationCredentials()) {
- BufferedReader responseReader = new BufferedReader(new InputStreamReader(
- postMethod.getResponseBodyAsStream(), 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() == HtmlTag.Type.A) {
- String id = tag.getAttribute("href");
- if (id != null && id.toLowerCase(Locale.ENGLISH).contains(LOGIN_REQUIRED)) {
- // throw new
- // LoginException(IBugzillaConstants.INVALID_CREDENTIALS);
- responseReader.close();
- authenticated = false;
- throw new CoreException(new BugzillaStatus(Status.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_REPOSITORY_LOGIN, repositoryUrl.toString(),
- IBugzillaConstants.INVALID_CREDENTIALS));
- }
- }
- }
- }
- }
- authenticated = true;
- } catch (ParseException e) {
- authenticated = false;
- throw new CoreException(new BugzillaStatus(Status.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_INTERNAL, "Unable to parse response from " + repositoryUrl.toString() + "."));
-
- } catch (IOException e) {
- throw new CoreException(new BugzillaStatus(Status.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_IO, repositoryUrl.toString(), e));
- } finally {
- if (postMethod != null) {
- postMethod.releaseConnection();
- }
- httpClient.getParams().setAuthenticationPreemptive(false);
- }
- }
-
- public RepositoryTaskData getTaskData(int id) throws IOException, CoreException {
- final String idString = String.valueOf(id);
- Set<String> data = new HashSet<String>();
- data.add(idString);
-
- Map<String, RepositoryTaskData> returnedData = getTaskData(data);
-
- return returnedData.get(idString);
-
-// GetMethod method = null;
-// try {
-//
-// method = getConnect(repositoryUrl + IBugzillaConstants.URL_GET_SHOW_BUG_XML + id);
-// RepositoryTaskData taskData = null;
-// 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)) {
-// taskData = new RepositoryTaskData(new BugzillaAttributeFactory(),
-// BugzillaCorePlugin.REPOSITORY_KIND, repositoryUrl.toString(), "" + id,
-// IBugzillaConstants.BUGZILLA_TASK_KIND);
-// setupExistingBugAttributes(repositoryUrl.toString(), taskData);
-// RepositoryReportFactory reportFactory = new RepositoryReportFactory(
-// method.getResponseBodyAsStream(), characterEncoding);
-// reportFactory.populateReport(taskData);
-//
-// return taskData;
-// }
-// }
-// }
-//
-// parseHtmlError(new BufferedReader(
-// new InputStreamReader(method.getResponseBodyAsStream(), characterEncoding)));
-//
-// return null;
-// } finally {
-// if (method != null) {
-// method.releaseConnection();
-// }
-// }
- }
-
- public boolean getSearchHits(AbstractRepositoryQuery query, ITaskCollector collector) throws IOException,
- CoreException {
- GetMethod method = null;
- try {
- String queryUrl = query.getUrl();
- // Test that we don't specify content type twice.
- // Should only be specified here (not in passed in url if possible)
- if (!queryUrl.contains("ctype=rdf")) {
- queryUrl = queryUrl.concat(IBugzillaConstants.CONTENT_TYPE_RDF);
- }
-
- method = getConnect(queryUrl);
- 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)) {
- RepositoryQueryResultsFactory queryFactory = new RepositoryQueryResultsFactory(
- method.getResponseBodyAsStream(), characterEncoding);
- queryFactory.performQuery(repositoryUrl.toString(), collector, QueryHitCollector.MAX_HITS);
- return !collector.getTasks().isEmpty();
- }
- }
- }
- parseHtmlError(new BufferedReader(
- new InputStreamReader(method.getResponseBodyAsStream(), characterEncoding)));
- } finally {
- if (method != null) {
- method.releaseConnection();
- }
- }
- return false;
- }
-
-// /**
-// * Returns ids of bugs that match given query
-// */
-// public Set<String> getSearchHits(AbstractRepositoryQuery query) throws IOException, CoreException {
-// GetMethod method = null;
-// try {
-// String queryUrl = query.getUrl();
-// // Test that we don't specify content type twice.
-// // Should only be specified here (not in passed in url if possible)
-// if (!queryUrl.contains("ctype=rdf")) {
-// queryUrl = queryUrl.concat(IBugzillaConstants.CONTENT_TYPE_RDF);
-// }
-//
-// method = getConnect(queryUrl);
-// 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)) {
-// RepositoryQueryResultsFactory queryFactory = new RepositoryQueryResultsFactory(method
-// .getResponseBodyAsStream(), characterEncoding);
-// queryFactory.performQuery(repositoryUrl.toString(), QueryHitCollector.MAX_HITS);
-//
-// return queryFactory.getHits();
-// }
-// }
-// }
-// parseHtmlError(new BufferedReader(
-// new InputStreamReader(method.getResponseBodyAsStream(), characterEncoding)));
-// } finally {
-// if (method != null) {
-// method.releaseConnection();
-// }
-// }
-// return new HashSet<String>();
-// }
-
- public static void setupExistingBugAttributes(String serverUrl, RepositoryTaskData 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
- BugzillaReportElement[] reportElements = { BugzillaReportElement.SHORT_DESC, BugzillaReportElement.BUG_STATUS,
- BugzillaReportElement.RESOLUTION, BugzillaReportElement.BUG_ID, BugzillaReportElement.REP_PLATFORM,
- BugzillaReportElement.PRODUCT, BugzillaReportElement.OP_SYS, BugzillaReportElement.COMPONENT,
- BugzillaReportElement.VERSION, BugzillaReportElement.PRIORITY, BugzillaReportElement.BUG_SEVERITY,
- BugzillaReportElement.ASSIGNED_TO, BugzillaReportElement.TARGET_MILESTONE,
- BugzillaReportElement.REPORTER, BugzillaReportElement.DEPENDSON, BugzillaReportElement.BLOCKED,
- BugzillaReportElement.BUG_FILE_LOC, BugzillaReportElement.NEWCC, BugzillaReportElement.KEYWORDS,
- BugzillaReportElement.CC, BugzillaReportElement.NEW_COMMENT, BugzillaReportElement.QA_CONTACT,
- BugzillaReportElement.STATUS_WHITEBOARD, BugzillaReportElement.DEADLINE };
-
- for (BugzillaReportElement element : reportElements) {
- RepositoryTaskAttribute reportAttribute = BugzillaClient.makeNewAttribute(element);
- existingReport.addAttribute(element.getKeyString(), reportAttribute);
- }
- }
-
- 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;
- }
-
- protected static RepositoryTaskAttribute makeNewAttribute(
- org.eclipse.mylyn.internal.bugzilla.core.BugzillaReportElement tag) {
- return attributeFactory.createAttribute(tag.getKeyString());
- }
-
- public void setProxy(Proxy proxy) {
- this.proxy = proxy;
- }
-
- public Proxy getProxy() {
- return proxy;
- }
-
- public RepositoryConfiguration getRepositoryConfiguration() throws IOException, CoreException {
- GetMethod method = null;
- try {
- method = getConnect(repositoryUrl + IBugzillaConstants.URL_GET_CONFIG_RDF);
- RepositoryConfigurationFactory configFactory = new RepositoryConfigurationFactory(
- method.getResponseBodyAsStream(), characterEncoding);
- RepositoryConfiguration configuration = configFactory.getConfiguration();
- if (configuration != null) {
- configuration.setRepositoryUrl(repositoryUrl.toString());
- return configuration;
- }
- return null;
- } finally {
- if (method != null) {
- method.releaseConnection();
- }
- }
- }
-
- public InputStream getAttachmentData(String attachmentId) throws IOException, CoreException {
- String url = repositoryUrl + IBugzillaConstants.URL_GET_ATTACHMENT_DOWNLOAD + attachmentId;
- GetMethod method = getConnect(url);
- try {
- return method.getResponseBodyAsStream();
- } catch (IOException e) {
- method.releaseConnection();
- throw e;
- }
- }
-
- public void postAttachment(String bugReportID, String comment, ITaskAttachment attachment) throws HttpException,
- IOException, CoreException {
-
- // TODO: Throw IllegalArgumentException if passed null parameter
-
- WebClientUtil.setupHttpClient(httpClient, proxy, repositoryUrl.toString(), htAuthUser, htAuthPass);
- if (!authenticated && hasAuthenticationCredentials()) {
- authenticate();
- }
- PostMethod postMethod = null;
-
- try {
- postMethod = new PostMethod(WebClientUtil.getRequestPath(repositoryUrl
- + IBugzillaConstants.URL_POST_ATTACHMENT_UPLOAD));
- // 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 (attachment.getDescription() != null) {
- parts.add(new StringPart(IBugzillaConstants.POST_INPUT_DESCRIPTION, attachment.getDescription(),
- characterEncoding));
- }
- if (comment != null) {
- parts.add(new StringPart(IBugzillaConstants.POST_INPUT_COMMENT, comment, characterEncoding));
- }
- parts.add(new FilePart(IBugzillaConstants.POST_INPUT_DATA, new AttachmentPartSource(attachment)));
-
- if (attachment.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, attachment.getContentType()));
- }
-
- postMethod.setRequestEntity(new MultipartRequestEntity(parts.toArray(new Part[1]), postMethod.getParams()));
- postMethod.setDoAuthentication(true);
- // httpClient.getHttpConnectionManager().getParams().setConnectionTimeout(CONNECT_TIMEOUT);
- int status = httpClient.executeMethod(postMethod);
- if (status == HttpStatus.SC_OK) {
- InputStreamReader reader = new InputStreamReader(postMethod.getResponseBodyAsStream(),
- postMethod.getResponseCharSet());
- BufferedReader bufferedReader = new BufferedReader(reader);
-
- parseHtmlError(bufferedReader);
-
- } else {
- postMethod.getResponseBody();
- throw new CoreException(new BugzillaStatus(Status.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. TODO: refactor
- *
- * @throws CoreException
- */
- private PostMethod postFormData(String formUrl, NameValuePair[] formData) throws IOException, CoreException {
-
- PostMethod postMethod = null;
-
- WebClientUtil.setupHttpClient(httpClient, proxy, repositoryUrl.toString(), htAuthUser, htAuthPass);
- if (!authenticated && hasAuthenticationCredentials()) {
- authenticate();
- }
-
- postMethod = new PostMethod(WebClientUtil.getRequestPath(repositoryUrl.toString() + formUrl));
- postMethod.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=" + characterEncoding);
-
- // Up the timout on sockets for posts
- // Bug#175054
- httpClient.getHttpConnectionManager().getParams().setSoTimeout(WebClientUtil.CONNNECT_TIMEOUT);
-
- postMethod.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, new BugzillaRetryHandler());
- postMethod.setRequestBody(formData);
- postMethod.setDoAuthentication(true);
- // httpClient.getHttpConnectionManager().getParams().setConnectionTimeout(CONNECT_TIMEOUT);
- int status = httpClient.executeMethod(postMethod);
- if (status == HttpStatus.SC_OK) {
- return postMethod;
- } else {
- postMethod.getResponseBody();
- postMethod.releaseConnection();
- //StatusManager.log("Post failed: " + HttpStatus.getStatusText(status), this);
- throw new CoreException(new BugzillaStatus(Status.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 String postTaskData(RepositoryTaskData taskData) throws IOException, CoreException {
- NameValuePair[] formData = null;
- String prefix = null;
- String prefix2 = null;
- String postfix = null;
- String postfix2 = null;
-
- 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;
- PostMethod method = null;
- try {
- if (taskData.isNew()) {
- method = postFormData(POST_BUG_CGI, formData);
- } else {
- method = postFormData(PROCESS_BUG_CGI, formData);
- }
-
- if (method == null) {
- throw new IOException("Could not post form, client returned null method.");
- }
- BufferedReader in = new BufferedReader(new InputStreamReader(method.getResponseBodyAsStream(),
- method.getRequestCharSet()));
- 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() == HtmlTag.Type.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() == HtmlTag.Type.TITLE
- && ((HtmlTag) token.getValue()).isEndTag()) {
- if (!taskData.isNew() && (title.toLowerCase(Locale.ENGLISH).indexOf("processed") != -1)) {
- 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 {
- in.reset();
- } catch (IOException e) {
- // ignore
- }
- parseHtmlError(in);
- }
-
- return result;
- } catch (ParseException e) {
- authenticated = false;
- throw new CoreException(new BugzillaStatus(Status.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_INTERNAL, "Unable to parse response from " + repositoryUrl.toString() + "."));
- } finally {
- if (method != null) {
- method.releaseConnection();
- }
- }
-
- }
-
- private NameValuePair[] getPairsForNew(RepositoryTaskData taskData) {
- Map<String, NameValuePair> fields = new HashMap<String, NameValuePair>();
-
- // go through all of the attributes and add them to
- // the bug post
- Iterator<RepositoryTaskAttribute> itr = taskData.getAttributes().iterator();
- while (itr.hasNext()) {
- RepositoryTaskAttribute a = itr.next();
- if (a != null && a.getId() != null && a.getId().compareTo("") != 0) {
- String value = null;
- value = a.getValue();
- if (value == null)
- continue;
-
- cleanQAContact(a);
-
- fields.put(a.getId(), new NameValuePair(a.getId(), value));
- }
- }
-
- if (taskData.getDescription().length() != 0) {
- fields.put(KEY_COMMENT, new NameValuePair(KEY_COMMENT, taskData.getDescription()));
- }
-
- return fields.values().toArray(new NameValuePair[fields.size()]);
-
- }
-
- private void cleanQAContact(RepositoryTaskAttribute a) {
- if (a.getId().equals(BugzillaReportElement.QA_CONTACT.getKeyString())) {
- 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(RepositoryTaskData 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
- for (Iterator<RepositoryTaskAttribute> it = model.getAttributes().iterator(); it.hasNext();) {
-
- RepositoryTaskAttribute a = it.next();
- if (a == null) {
- continue;
- } else if (a.getId().equals(BugzillaReportElement.CC.getKeyString())
- || a.getId().equals(RepositoryTaskAttribute.REMOVE_CC)
- || a.getId().equals(BugzillaReportElement.REPORTER.getKeyString())
-// || a.getId().equals(BugzillaReportElement.ASSIGNED_TO.getKeyString())
- || a.getId().equals(BugzillaReportElement.CREATION_TS.getKeyString())) {
- continue;
- } else if (a.getId() != null && a.getId().compareTo("") != 0) {
- cleanQAContact(a);
- String value = a.getValue();
- if (a.getId().equals(BugzillaReportElement.DELTA_TS.getKeyString())) {
- 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'
- fields.put(KEY_ID, new NameValuePair(KEY_ID,
- model.getAttributeValue(BugzillaReportElement.BUG_ID.getKeyString())));
-
- // add the operation to the bug post
- RepositoryOperation o = model.getSelectedOperation();
- if (o == null)
- fields.put(KEY_KNOB, new NameValuePair(KEY_KNOB, VAL_NONE));
- else {
- fields.put(KEY_KNOB, new NameValuePair(KEY_KNOB, o.getKnobName()));
- if (o.hasOptions()) {
- String sel = o.getOptionValue(o.getOptionSelection());
- fields.put(o.getOptionName(), new NameValuePair(o.getOptionName(), sel));
- } else if (o.isInput()) {
- String sel = o.getInputValue();
- fields.put(o.getInputName(), new NameValuePair(o.getInputName(), sel));
- }
- }
-
- if (model.getAttribute(BugzillaReportElement.SHORT_DESC.getKeyString()) != null) {
- fields.put(KEY_SHORT_DESC, new NameValuePair(KEY_SHORT_DESC, model.getAttribute(
- BugzillaReportElement.SHORT_DESC.getKeyString()).getValue()));
- }
-
- if (model.getNewComment().length() != 0) {
- fields.put(KEY_COMMENT, new NameValuePair(KEY_COMMENT, model.getNewComment()));
- } else if (o != null && o.getKnobName().equals(IBugzillaConstants.BUGZILLA_OPERATION.duplicate.toString())) {
- // fix for bug#198677
- fields.put(KEY_COMMENT, new NameValuePair(KEY_COMMENT, ""));
- }
-
- List<String> removeCC = model.getAttributeValues(RepositoryTaskAttribute.REMOVE_CC);
- 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(KEY_REMOVECC, new NameValuePair(KEY_REMOVECC, 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
- */
- public 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() == HtmlTag.Type.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() == HtmlTag.Type.TITLE
- && ((HtmlTag) token.getValue()).isEndTag()) {
-
- if (title.indexOf("login") != -1 || title.indexOf("log in") != -1
- || (title.indexOf("invalid") != -1 && title.indexOf("password") != -1)
- || title.indexOf("check e-mail") != -1) {
- authenticated = false;
- throw new CoreException(new BugzillaStatus(Status.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_REPOSITORY_LOGIN, repositoryUrl.toString(), title));
- } else if (title.indexOf(IBugzillaConstants.ERROR_MIDAIR_COLLISION) != -1) {
- throw new CoreException(new BugzillaStatus(Status.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.REPOSITORY_COLLISION, repositoryUrl.toString()));
- } else if (title.indexOf(IBugzillaConstants.ERROR_COMMENT_REQUIRED) != -1) {
- throw new CoreException(new BugzillaStatus(Status.INFO, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.REPOSITORY_COMMENT_REQUIRED));
- } else if (title.indexOf(IBugzillaConstants.LOGGED_OUT) != -1) {
- authenticated = false;
- // throw new
- // BugzillaException(IBugzillaConstants.LOGGED_OUT);
- throw new CoreException(new BugzillaStatus(Status.INFO, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.REPOSITORY_LOGGED_OUT,
- "You have been logged out. Please retry operation."));
- } else if (title.indexOf(IBugzillaConstants.CHANGES_SUBMITTED) != -1) {
- return;
- }
- }
- }
- }
-
- 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(Status.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_INTERNAL, "Unable to parse response from " + repositoryUrl.toString() + "."));
- } finally {
- in.close();
- }
- }
-
- public TaskHistory getHistory(String taskId) throws IOException, CoreException {
- WebClientUtil.setupHttpClient(httpClient, proxy, repositoryUrl.toString(), htAuthUser, htAuthPass);
- if (!authenticated && hasAuthenticationCredentials()) {
- authenticate();
- }
- GetMethod method = null;
- try {
- String url = repositoryUrl + IBugzillaConstants.SHOW_ACTIVITY + taskId;
- method = getConnect(url);
- if (method != null) {
- BugzillaTaskHistoryParser parser = new BugzillaTaskHistoryParser(method.getResponseBodyAsStream(),
- characterEncoding);
- try {
- return parser.retrieveHistory();
- } catch (LoginException e) {
- authenticated = false;
- throw new CoreException(new BugzillaStatus(Status.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_REPOSITORY_LOGIN, repositoryUrl.toString(),
- IBugzillaConstants.INVALID_CREDENTIALS));
- } catch (ParseException e) {
- authenticated = false;
- throw new CoreException(new BugzillaStatus(Status.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_INTERNAL, "Unable to parse response from "
- + repositoryUrl.toString() + "."));
- }
- }
-
- } finally {
- if (method != null) {
- method.releaseConnection();
- }
- }
- return null;
- }
-
- public Map<String, RepositoryTaskData> getTaskData(Set<String> taskIds) throws IOException, CoreException {
- PostMethod method = null;
- HashMap<String, RepositoryTaskData> taskDataMap = new HashMap<String, RepositoryTaskData>();
- 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);
- RepositoryTaskData taskData = new RepositoryTaskData(new BugzillaAttributeFactory(),
- BugzillaCorePlugin.REPOSITORY_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);
-
- if (method == null) {
- throw new IOException("Could not post form, client returned null method.");
- }
-
- 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)) {
- MultiBugReportFactory factory = new MultiBugReportFactory(method.getResponseBodyAsStream(),
- characterEncoding);
- factory.populateReport(taskDataMap);
- taskIds.removeAll(idsToRetrieve);
- }
- }
- } else {
-
- parseHtmlError(new BufferedReader(new InputStreamReader(method.getResponseBodyAsStream(),
- characterEncoding)));
- }
- } finally {
- if (method != null) {
- method.releaseConnection();
- }
- }
- }
-
- return taskDataMap;
- }
-
- public String getConfigurationTimestamp() throws CoreException {
- String lastModified = null;
- HeadMethod method = null;
- try {
- method = connectHead(repositoryUrl + "/config.cgi?ctype=rdf");
-
- Header lastModifiedHeader = method.getResponseHeader("Last-Modified");
- if (lastModifiedHeader != null) {
- lastModified = lastModifiedHeader.getValue();
- }
-
- } catch (Exception e) {
- throw new CoreException(new Status(Status.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- "Error retrieving configuration timestamp", e));
- } finally {
- if (method != null) {
- method.releaseConnection();
- }
- }
- return lastModified;
- }
-
- private HeadMethod connectHead(String requestURL) throws IOException, CoreException {
- WebClientUtil.setupHttpClient(httpClient, proxy, requestURL, htAuthUser, htAuthPass);
- for (int attempt = 0; attempt < 2; attempt++) {
- // force authentication
- if (!authenticated && hasAuthenticationCredentials()) {
- authenticate();
- }
-
- HeadMethod headMethod = new HeadMethod(WebClientUtil.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 = httpClient.executeMethod(headMethod);
- } catch (IOException e) {
- headMethod.getResponseBody();
- headMethod.releaseConnection();
- throw new CoreException(new BugzillaStatus(Status.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();
- } else if (code == HttpURLConnection.HTTP_PROXY_AUTH) {
- authenticated = false;
- headMethod.getResponseBody();
- headMethod.releaseConnection();
- throw new CoreException(new BugzillaStatus(Status.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."));
- }
-
-}
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 e68b2a149..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClientFactory.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;
-
-import java.net.MalformedURLException;
-import java.net.Proxy;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * @author Steffen Pingel
- * @author Robert Elves (adaption for Bugzilla)
- */
-public class BugzillaClientFactory {
-
- public static BugzillaClient createClient(String hostUrl, String username, String password, String htAuthUser,
- String htAuthPass, Proxy proxy, String encoding) throws MalformedURLException {
- return createClient(hostUrl, username, password, htAuthUser, htAuthPass, proxy, encoding,
- new HashMap<String, String>());
- }
-
- public static BugzillaClient createClient(String hostUrl, String username, String password, String htAuthUser,
- String htAuthPass, Proxy proxy, String encoding, Map<String, String> configParameters)
- throws MalformedURLException {
- URL url = new URL(hostUrl);
-
- BugzillaClient client = new BugzillaClient(url, username, password, htAuthUser, htAuthPass, encoding,
- configParameters);
- client.setProxy(proxy);
- 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 7f42e14f0..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClientManager.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.bugzilla.core;
-
-import java.net.MalformedURLException;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.mylyn.tasks.core.ITaskRepositoryListener;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-/**
- * @author Steffen Pingel
- * @author Robert Elves (adaption for Bugzilla)
- */
-public class BugzillaClientManager implements ITaskRepositoryListener {
-
- private Map<String, BugzillaClient> clientByUrl = new HashMap<String, BugzillaClient>();
-
- public BugzillaClientManager() {
- }
-
- public synchronized BugzillaClient getClient(TaskRepository taskRepository) throws MalformedURLException {
- BugzillaClient client = clientByUrl.get(taskRepository.getUrl());
- if (client == null) {
-
- String htUser = taskRepository.getHttpUser() != null ? taskRepository.getHttpUser() : "";
- String htPass = taskRepository.getHttpPassword() != null ? taskRepository.getHttpPassword() : "";
-
- client = BugzillaClientFactory.createClient(taskRepository.getUrl(), taskRepository.getUserName(),
- taskRepository.getPassword(), htUser, htPass, taskRepository.getProxy(),
- taskRepository.getCharacterEncoding(), taskRepository.getProperties());
- clientByUrl.put(taskRepository.getUrl(), client);
- }
- return client;
- }
-
- 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.getUrl());
- }
-
- public synchronized void repositoryRemoved(TaskRepository repository) {
- clientByUrl.remove(repository.getUrl());
- }
-
- public synchronized void repositorySettingsChanged(TaskRepository repository) {
- clientByUrl.remove(repository.getUrl());
- }
-}
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 1ca3ba75b..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaCorePlugin.java
+++ /dev/null
@@ -1,365 +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 org.eclipse.core.runtime.CoreException;
-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.core.runtime.Status;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskAttribute;
-import org.eclipse.mylyn.tasks.core.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.";
-
- public static final String REPOSITORY_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 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) {
- return repositoryConfigurations.get(repositoryUrl);
- }
-
- /**
- * Retrieves the latest repository configuration from the server
- */
- public static RepositoryConfiguration getRepositoryConfiguration(TaskRepository repository, boolean forceRefresh)
- throws CoreException {
- try {
- if (!cacheFileRead) {
- readRepositoryConfigurationFile();
- cacheFileRead = true;
- }
- if (repositoryConfigurations.get(repository.getUrl()) == null || forceRefresh) {
- BugzillaClient client = connector.getClientManager().getClient(repository);
- RepositoryConfiguration config = client.getRepositoryConfiguration();
- if (config != null) {
- addRepositoryConfiguration(config);
- }
-
- }
- return repositoryConfigurations.get(repository.getUrl());
- } catch (Exception e) {
- throw new CoreException(new Status(Status.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(e);
- try {
- if (in != null) {
- in.close();
- }
- if (repositoryConfigurationFile != null && repositoryConfigurationFile.exists()) {
- if (repositoryConfigurationFile.delete()) {
- // successfully deleted
- } else {
- log(new Status(Status.ERROR, BugzillaCorePlugin.PLUGIN_ID, 0, ERROR_DELETING_CONFIGURATION, e));
- }
- }
-
- } catch (Exception ex) {
- log(new Status(Status.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(Status.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(BugzillaReportElement.OP_SYS.getKeyString());
- RepositoryTaskAttribute platformAttribute = newBugModel.getAttribute(BugzillaReportElement.REP_PLATFORM.getKeyString());
-
- // 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(BugzillaReportElement.OP_SYS.getKeyString());
- RepositoryTaskAttribute platformAttribute = newBugModel.getAttribute(BugzillaReportElement.REP_PLATFORM.getKeyString());
-
- 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.fail(e, "could not set platform options", false);
- }
- }
-}
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/BugzillaReportElement.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaReportElement.java
deleted file mode 100644
index e14712454..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaReportElement.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.bugzilla.core;
-
-/**
- * Bugzilla XML element enum. Each enum has the attribute name and associated xml element tag name.
- *
- * @author Rob Elves
- */
-public enum BugzillaReportElement {
- // Format: ENUM ( "pretty name", "xml key", <hidden: true/false>, <readonly: true/false>)
- // Hidden elements are not automatically displayed in ui
- STATUS_WHITEBOARD("Status Whiteboard:", "status_whiteboard", true, false), ACTUAL_TIME("Hours Worked:",
- "actual_time", true), ADD_COMMENT("Additional Comments:", "comment", true, false), ASSIGNED_TO(
- "Assigned to:", "assigned_to", true, true), ATTACHID("attachid", "attachid"), ATTACHMENT("attachment",
- "attachment"), BLOCKED("Bug blocks:", "blocked", true, false), BUG("bug", "bug", true), BUG_FILE_LOC(
- "URL:", "bug_file_loc", true, false), BUG_ID("Bug:", "bug_id", true), BUG_SEVERITY("Severity:",
- "bug_severity", false), BUG_STATUS("Status:", "bug_status", true, true), BUG_WHEN("bug_when", "bug_when",
- true, true), BUGZILLA("bugzilla", "bugzilla", true), CC("CC:", "cc", true, true), CCLIST_ACCESSIBLE(
- "CC List", "cclist_accessible", true), CLASSIFICATION("Classification:", "classification", true), CLASSIFICATION_ID(
- "Classification ID:", "classification_id", true), COMPONENT("Component:", "component", false), CREATION_TS(
- "Opened:", "creation_ts", true), CTYPE("Content Type", "ctype"), DATA("data", "data"), DATE("Date", "date"), DEADLINE(
- "Deadline:", "deadline", true, true), DELTA_TS("Modified:", "delta_ts", true), DEPENDSON("Bug depends on:",
- "dependson", true, false), DESC("desc", "desc", true, true), EVERCONFIRMED("everconfirmed",
- "everconfirmed", true), ESTIMATED_TIME("Estimated Time:", "estimated_time", true), FILENAME("filename",
- "filename"), GROUP("Group", "group", true, true), IS_OBSOLETE("Obsolete", "isobsolete", true), IS_PATCH(
- "Patch", "ispatch", true), KEYWORDS("Keywords:", "keywords", true), LONG_DESC("Description:", "long_desc"), LONGDESCLENGTH(
- "Number of comments", "longdesclength", true), NEWCC("Add CC:", "newcc", true), OP_SYS("OS:", "op_sys",
- false), PRIORITY("Priority:", "priority", false, false), PRODUCT("Product:", "product", false), REP_PLATFORM(
- "Platform:", "rep_platform", false), REPORTER("Reporter:", "reporter", true, true), REPORTER_ACCESSIBLE(
- "Reporter", "reporter_accessible", true), RESOLUTION("Resolution:", "resolution", false, true), // Exiting bug field, new cc
- REMAINING_TIME("Hours Left:", "remaining_time", true), SET_DEFAULT_ASSIGNEE("Reassign to default assignee", "set_default_assignee", false), SHORT_DESC("Summary:", "short_desc", true), TARGET_MILESTONE(
- "Target milestone:", "target_milestone", false), THETEXT("thetext", "thetext", false, true), TYPE("type",
- "type"), UNKNOWN("UNKNOWN", "UNKNOWN"), VERSION("Version:", "version", false), INSTALL_VERSION(
- "version of bugzilla installed", "install_version", true), VOTES("Votes:", "votes", true, true), WORK_TIME(
- "Add Time:", "work_time", true, false), WHO("who", "who"), QA_CONTACT("QA Contact", "qa_contact", false,
- false), ADDSELFCC("Add self to CC", "addselfcc", true, false),
- // Used by search engine
- LI("used by search engine", "li", true), ID("used by search engine", "id", true), SHORT_SHORT_DESC(
- "used by search engine", "short_short_desc", false), SEQ("used by search engine", "seq", false), RESULT(
- "used by search engine", "result", false), RDF("used by search engine", "rdf", false), INSTALLATION(
- "used by search engine", "installation", false), BUGS("used by search engine", "bugs", false), STATUS_OPEN(
- "open status values", "status_open", true, true), NEW_COMMENT("new comment", "new_comment", true, false);
-
- private final boolean isHidden;
-
- private final boolean isReadOnly;
-
- private final String keyString;
-
- private final String prettyName;
-
- BugzillaReportElement(String prettyName, String fieldName) {
- this(prettyName, fieldName, false, false);
- }
-
- BugzillaReportElement(String prettyName, String fieldName, boolean hidden) {
- this(prettyName, fieldName, hidden, false);
- }
-
- BugzillaReportElement(String prettyName, String fieldName, boolean hidden, boolean readonly) {
- this.prettyName = prettyName;
- this.keyString = fieldName;
- this.isHidden = hidden;
- this.isReadOnly = readonly;
- }
-
- public String getKeyString() {
- return keyString;
- }
-
- public boolean isHidden() {
- return isHidden;
- }
-
- public boolean isReadOnly() {
- return isReadOnly;
- }
-
- public String toString() {
- return prettyName;
- }
-}
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 fabbabe2f..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryConnector.java
+++ /dev/null
@@ -1,674 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public 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.SimpleDateFormat;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Locale;
-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.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractAttachmentHandler;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskDataHandler;
-import org.eclipse.mylyn.tasks.core.ITaskCollector;
-import org.eclipse.mylyn.tasks.core.ITaskFactory;
-import org.eclipse.mylyn.tasks.core.QueryHitCollector;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskAttribute;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.TaskComment;
-import org.eclipse.mylyn.tasks.core.TaskList;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.AbstractTask.PriorityLevel;
-
-/**
- * @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 BugzillaAttachmentHandler attachmentHandler;
-
- private BugzillaTaskDataHandler taskDataHandler;
-
- private BugzillaClientManager clientManager;
-
- @Override
- public void init(TaskList taskList) {
- super.init(taskList);
- this.taskDataHandler = new BugzillaTaskDataHandler(this);
- this.attachmentHandler = new BugzillaAttachmentHandler(this);
- BugzillaCorePlugin.setConnector(this);
- }
-
- @Override
- public String getLabel() {
- return CLIENT_LABEL;
- }
-
- @Override
- public AbstractAttachmentHandler getAttachmentHandler() {
- return attachmentHandler;
- }
-
- @Override
- public AbstractTaskDataHandler getTaskDataHandler() {
- return taskDataHandler;
- }
-
- @Override
- public String getConnectorKind() {
- return BugzillaCorePlugin.REPOSITORY_KIND;
- }
-
- @Override
- public AbstractTask createTask(String repositoryUrl, String id, String summary) {
- BugzillaTask task = new BugzillaTask(repositoryUrl, id, summary);
- task.setCreationDate(new Date());
- return task;
- }
-
- @Override
- public void updateTaskFromTaskData(TaskRepository repository, AbstractTask repositoryTask,
- RepositoryTaskData taskData) {
- BugzillaTask bugzillaTask = (BugzillaTask) repositoryTask;
- if (taskData != null) {
-
-//// // subtasks
-// repositoryTask.dropSubTasks();
-// Set<String> subTaskIds = taskDataHandler.getSubTaskIds(taskData);
-// if (subTaskIds != null && !subTaskIds.isEmpty()) {
-// for (String subId : subTaskIds) {
-// ITask subTask = taskList.getTask(repository.getUrl(), subId);
-//// if (subTask == null && retrieveSubTasks) {
-//// if (!subId.trim().equals(taskData.getId()) && !subId.equals("")) {
-//// try {
-//// subTask = createTaskFromExistingId(repository, subId, false, new NullProgressMonitor());
-//// } catch (CoreException e) {
-//// // ignore
-//// }
-//// }
-//// }
-// if (subTask != null) {
-// bugzillaTask.addSubTask(subTask);
-// }
-// }
-// }
-
- // Summary
- String summary = taskData.getSummary();
- bugzillaTask.setSummary(summary);
-
- // Owner
- String owner = taskData.getAssignedTo();
- if (owner != null && !owner.equals("")) {
- bugzillaTask.setOwner(owner);
- }
-
- // Completed
- boolean isComplete = false;
- // TODO: use repository configuration to determine what -completed-
- // states are
- if (taskData.getStatus() != null) {
- isComplete = taskData.getStatus().equals(IBugzillaConstants.VALUE_STATUS_RESOLVED)
- || taskData.getStatus().equals(IBugzillaConstants.VALUE_STATUS_CLOSED)
- || taskData.getStatus().equals(IBugzillaConstants.VALUE_STATUS_VERIFIED);
- }
- bugzillaTask.setCompleted(isComplete);
-
- // Completion Date
- if (isComplete) {
- Date completionDate = null;
- try {
-
- List<TaskComment> taskComments = taskData.getComments();
- if (taskComments != null && !taskComments.isEmpty()) {
- // TODO: fix not to be based on comment
- completionDate = new SimpleDateFormat(COMMENT_FORMAT).parse(taskComments.get(
- taskComments.size() - 1).getCreated());
-
- }
-
- } catch (Exception e) {
-
- }
-
- if (bugzillaTask.getCompletionDate() != null && completionDate != null) {
- // if changed:
- // TODO: get taskListManger.setDueDate(ITask task, Date
- // dueDate)
- }
- bugzillaTask.setCompletionDate(completionDate);
-
- }
-
- // Priority
- String priority = PriorityLevel.getDefault().toString();
- if (taskData.getAttribute(RepositoryTaskAttribute.PRIORITY) != null) {
- priority = taskData.getAttribute(RepositoryTaskAttribute.PRIORITY).getValue();
- }
- bugzillaTask.setPriority(priority);
-
- // Task Web Url
- String url = getTaskUrl(repository.getUrl(), taskData.getId());
- if (url != null) {
- bugzillaTask.setUrl(url);
- }
-
- // Bugzilla Specific Attributes
-
- // Product
- if (taskData.getProduct() != null) {
- bugzillaTask.setProduct(taskData.getProduct());
- }
-
- // Severity
- String severity = taskData.getAttributeValue(BugzillaReportElement.BUG_SEVERITY.getKeyString());
- if (severity != null && !severity.equals("")) {
- bugzillaTask.setSeverity(severity);
- }
-
- // Due Date
- if (taskData.getAttribute(BugzillaReportElement.ESTIMATED_TIME.getKeyString()) != null) {
- Date dueDate = null;
- // HACK: if estimated_time field exists, time tracking is
- // enabled
- try {
- String dueStr = taskData.getAttributeValue(BugzillaReportElement.DEADLINE.getKeyString());
- if (dueStr != null) {
- dueDate = new SimpleDateFormat(DEADLINE_FORMAT).parse(dueStr);
- }
- } catch (Exception e) {
- // ignore
- }
- bugzillaTask.setDueDate(dueDate);
- }
-
- }
- }
-
- @Override
- public boolean updateTaskFromQueryHit(TaskRepository repository, AbstractTask existingTask, AbstractTask newTask) {
- // these properties are not provided by Bugzilla queries
- newTask.setCompleted(existingTask.isCompleted());
-// newTask.setCompletionDate(existingTask.getCompletionDate());
-
- boolean changed = super.updateTaskFromQueryHit(repository, existingTask, newTask);
-
- if (existingTask instanceof BugzillaTask && newTask instanceof BugzillaTask) {
- BugzillaTask existingBugzillaTask = (BugzillaTask) existingTask;
- BugzillaTask newBugzillaTask = (BugzillaTask) newTask;
-
- if (hasTaskPropertyChanged(existingBugzillaTask.getSeverity(), newBugzillaTask.getSeverity())) {
- existingBugzillaTask.setSeverity(newBugzillaTask.getSeverity());
- changed = true;
- }
- if (hasTaskPropertyChanged(existingBugzillaTask.getProduct(), newBugzillaTask.getProduct())) {
- existingBugzillaTask.setProduct(newBugzillaTask.getProduct());
- changed = true;
- }
- }
-
- return changed;
- }
-
- @Override
- public boolean markStaleTasks(TaskRepository repository, Set<AbstractTask> tasks, IProgressMonitor monitor)
- throws CoreException {
- try {
- monitor.beginTask("Checking for changed tasks", IProgressMonitor.UNKNOWN);
-
- if (repository.getSynchronizationTimeStamp() == null) {
- for (AbstractTask task : tasks) {
- task.setStale(true);
- }
- return true;
- }
-
- String dateString = repository.getSynchronizationTimeStamp();
- if (dateString == null) {
- dateString = "";
- }
-
- String urlQueryBase = repository.getUrl() + CHANGED_BUGS_CGI_QUERY
- + URLEncoder.encode(dateString, repository.getCharacterEncoding()) + CHANGED_BUGS_CGI_ENDDATE;
-
- String urlQueryString = urlQueryBase + BUG_ID;
-
- // Need to replace this with query that would return list of tasks since last sync
- // the trouble is that bugzilla only have 1 hour granularity for "changed since" query
- // so, we can't say that no tasks has changed in repository
-
- Set<AbstractTask> changedTasks = new HashSet<AbstractTask>();
- int queryCounter = -1;
- Iterator<AbstractTask> itr = tasks.iterator();
- while (itr.hasNext()) {
- queryCounter++;
- AbstractTask task = itr.next();
- String newurlQueryString = URLEncoder.encode(task.getTaskId() + ",", repository.getCharacterEncoding());
- if ((urlQueryString.length() + newurlQueryString.length() + IBugzillaConstants.CONTENT_TYPE_RDF.length()) > IBugzillaConstants.MAX_URL_LENGTH) {
- queryForChanged(repository, changedTasks, urlQueryString);
- queryCounter = 0;
- urlQueryString = urlQueryBase + BUG_ID;
- }
- urlQueryString += newurlQueryString;
- if (!itr.hasNext()) {
- queryForChanged(repository, changedTasks, urlQueryString);
- }
- }
-
- for (AbstractTask task : tasks) {
- if (changedTasks.contains(task)) {
- task.setStale(true);
- }
- }
-
-// for (AbstractTask task : changedTasks) {
-// task.setStale(true);
-// }
-
- // FIXME check if new tasks were added
- //return changedTasks.isEmpty();
- return true;
- } catch (UnsupportedEncodingException e) {
- // XXX throw CoreException instead?
- StatusHandler.fail(e, "Repository configured with unsupported encoding: "
- + repository.getCharacterEncoding() + "\n\n Unable to determine changed tasks.", true);
- return false;
- } finally {
- monitor.done();
- }
- }
-
- private void queryForChanged(final TaskRepository repository, Set<AbstractTask> changedTasks, String urlQueryString)
- throws UnsupportedEncodingException, CoreException {
- QueryHitCollector collector = new QueryHitCollector(new ITaskFactory() {
-
- public AbstractTask createTask(RepositoryTaskData taskData, IProgressMonitor monitor) {
- // do not construct actual task objects here as query shouldn't result in new tasks
- return taskList.getTask(taskData.getRepositoryUrl(), taskData.getId());
- }
- });
-
- BugzillaRepositoryQuery query = new BugzillaRepositoryQuery(repository.getUrl(), urlQueryString, "");
-
- performQuery(query, repository, new NullProgressMonitor(), collector);
- changedTasks.addAll(collector.getTasks());
-
-// for (AbstractTask taskHit : collector.getTaskHits()) {
-// // String handle =
-// // AbstractTask.getHandle(repository.getUrl(),
-// // hit.getId());
-// if (taskHit != null && taskHit instanceof AbstractTask) {
-// AbstractTask repositoryTask = (AbstractTask) taskHit;
-// // Hack to avoid re-syncing last task from previous
-// // synchronization
-// // This can be removed once we are getting a query timestamp
-// // from the repository rather than
-// // using the last modified stamp of the last task modified in
-// // the return hits.
-// // (or the changeddate field in the hit rdf becomes consistent,
-// // currently it doesn't return a proper modified date string)
-// // if (repositoryTask.getTaskData() != null
-// // &&
-// // repositoryTask.getTaskData().getLastModified().equals(repository.getSyncTimeStamp()))
-// // {
-// // // String taskId =
-// // //
-// // RepositoryTaskHandleUtil.getTaskId(repositoryTask.getHandleIdentifier());
-// // RepositoryTaskData taskData =
-// // getTaskDataHandler().getTaskData(repository,
-// // repositoryTask.getTaskId());
-// // if (taskData != null &&
-// // taskData.getLastModified().equals(repository.getSyncTimeStamp()))
-// // {
-// // continue;
-// // }
-// // }
-// changedTasks.add(repositoryTask);
-// }
-// }
- }
-
- @Override
- public boolean canCreateTaskFromKey(TaskRepository repository) {
- return true;
- }
-
- @Override
- public boolean canCreateNewTask(TaskRepository repository) {
- return true;
- }
-
- @Override
- public IStatus performQuery(final AbstractRepositoryQuery query, TaskRepository repository,
- IProgressMonitor monitor, ITaskCollector resultCollector) {
- try {
- monitor.beginTask("Running query", IProgressMonitor.UNKNOWN);
- BugzillaClient client = getClientManager().getClient(repository);
- boolean hitsReceived = client.getSearchHits(query, resultCollector);
- if (!hitsReceived) {
- // XXX: HACK in case of ip change bugzilla can return 0 hits
- // due to invalid authorization token, forcing relogin fixes
- client.logout();
- client.getSearchHits(query, resultCollector);
- }
-
- return Status.OK_STATUS;
- } catch (UnrecognizedReponseException e) {
- return new Status(IStatus.ERROR, BugzillaCorePlugin.PLUGIN_ID, Status.INFO,
- "Unrecognized response from server", e);
- } catch (IOException e) {
- return new Status(IStatus.ERROR, BugzillaCorePlugin.PLUGIN_ID, Status.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 index = url.indexOf(IBugzillaConstants.URL_GET_SHOW_BUG);
- return index == -1 ? null : url.substring(index + IBugzillaConstants.URL_GET_SHOW_BUG.length());
- }
-
- @Override
- public String getTaskUrl(String repositoryUrl, String taskId) {
- try {
- return BugzillaClient.getBugUrlWithoutLogin(repositoryUrl, taskId);
- } catch (Exception ex) {
- StatusHandler.fail(ex, "Error constructing task url for " + repositoryUrl + " id:" + taskId, false);
- }
- return null;
- }
-
- @Override
- public void updateTaskFromRepository(TaskRepository repository, AbstractTask repositoryTask,
- IProgressMonitor monitor) {
- // ignore
- }
-
- @Override
- public String getTaskIdPrefix() {
- return "bug";
- }
-
- public BugzillaClientManager getClientManager() {
- if (clientManager == null) {
- clientManager = new BugzillaClientManager();
- }
- return clientManager;
- }
-
- @Override
- public void updateAttributes(TaskRepository repository, IProgressMonitor monitor) throws CoreException {
- if (repository != null) {
- BugzillaCorePlugin.getRepositoryConfiguration(repository, true);
- }
- }
-
- public boolean isRepositoryConfigurationStale(TaskRepository repository) throws CoreException {
- boolean result = true;
- try {
-
- String oldTimestamp = repository.getProperty(IBugzillaConstants.PROPERTY_CONFIGTIMESTAMP);
- if (oldTimestamp != null && oldTimestamp.equals(IBugzillaConstants.TIMESTAMP_NOT_AVAILABLE)) {
- result = true;
- } else {
- BugzillaClient client = getClientManager().getClient(repository);
- if (client != null) {
- String timestamp = client.getConfigurationTimestamp();
- if (timestamp == null) {
- repository.setProperty(IBugzillaConstants.PROPERTY_CONFIGTIMESTAMP,
- IBugzillaConstants.TIMESTAMP_NOT_AVAILABLE);
- result = true;
- } else {
- result = !timestamp.equals(oldTimestamp);
- repository.setProperty(IBugzillaConstants.PROPERTY_CONFIGTIMESTAMP, timestamp);
- }
- }
- }
- } catch (MalformedURLException e) {
- StatusHandler.fail(e, "Error retrieving configuration timestamp for " + repository.getUrl(), false);
- }
- return result;
- }
-
- public void updateAttributeOptions(TaskRepository taskRepository, RepositoryTaskData existingReport)
- throws CoreException {
- String product = existingReport.getAttributeValue(BugzillaReportElement.PRODUCT.getKeyString());
- for (RepositoryTaskAttribute attribute : existingReport.getAttributes()) {
- BugzillaReportElement element = BugzillaReportElement.valueOf(attribute.getId().trim().toUpperCase(
- Locale.ENGLISH));
- attribute.clearOptions();
- List<String> optionValues = BugzillaCorePlugin.getRepositoryConfiguration(taskRepository, false)
- .getOptionValues(element, product);
- if (element != BugzillaReportElement.OP_SYS && element != BugzillaReportElement.BUG_SEVERITY
- && element != BugzillaReportElement.PRIORITY && element != BugzillaReportElement.BUG_STATUS) {
- Collections.sort(optionValues);
- }
- if (element == BugzillaReportElement.TARGET_MILESTONE && optionValues.isEmpty()) {
-
- existingReport.removeAttribute(BugzillaReportElement.TARGET_MILESTONE);
- continue;
- }
- attribute.clearOptions();
- for (String option : optionValues) {
- attribute.addOption(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()
- // }
- // }
- }
-
- }
-
- /**
- * Adds bug attributes to new bug model and sets defaults
- *
- * @param proxySettings
- * TODO
- * @param characterEncoding
- * TODO
- *
- */
- public static void setupNewBugAttributes(TaskRepository taskRepository, RepositoryTaskData newTaskData)
- throws CoreException {
-
- String product = newTaskData.getProduct();
-
- newTaskData.removeAllAttributes();
-
- RepositoryConfiguration repositoryConfiguration = BugzillaCorePlugin.getRepositoryConfiguration(taskRepository,
- false);
-
- RepositoryTaskAttribute a = BugzillaClient.makeNewAttribute(BugzillaReportElement.PRODUCT);
- List<String> optionValues = repositoryConfiguration.getProducts();
- Collections.sort(optionValues);
- // for (String option : optionValues) {
- // a.addOptionValue(option, option);
- // }
- a.setValue(product);
- a.setReadOnly(true);
-
- newTaskData.addAttribute(BugzillaReportElement.PRODUCT.getKeyString(), a);
- // attributes.put(a.getName(), a);
-
- a = BugzillaClient.makeNewAttribute(BugzillaReportElement.BUG_STATUS);
- optionValues = repositoryConfiguration.getStatusValues();
- for (String option : optionValues) {
- a.addOption(option, option);
- }
- a.setValue(IBugzillaConstants.VALUE_STATUS_NEW);
-
- newTaskData.addAttribute(BugzillaReportElement.BUG_STATUS.getKeyString(), a);
-
- a = BugzillaClient.makeNewAttribute(BugzillaReportElement.SHORT_DESC);
- newTaskData.addAttribute(BugzillaReportElement.SHORT_DESC.getKeyString(), a);
-
- a = BugzillaClient.makeNewAttribute(BugzillaReportElement.VERSION);
- optionValues = repositoryConfiguration.getVersions(newTaskData.getProduct());
- Collections.sort(optionValues);
- for (String option : optionValues) {
- a.addOption(option, option);
- }
- if (optionValues.size() > 0) {
- a.setValue(optionValues.get(optionValues.size() - 1));
- }
-
- newTaskData.addAttribute(BugzillaReportElement.VERSION.getKeyString(), a);
- // attributes.put(a.getName(), a);
-
- a = BugzillaClient.makeNewAttribute(BugzillaReportElement.COMPONENT);
- optionValues = repositoryConfiguration.getComponents(newTaskData.getProduct());
- Collections.sort(optionValues);
- for (String option : optionValues) {
- a.addOption(option, option);
- }
- if (optionValues.size() == 1) {
- a.setValue(optionValues.get(0));
- }
-
- newTaskData.addAttribute(BugzillaReportElement.COMPONENT.getKeyString(), a);
-
- a = BugzillaClient.makeNewAttribute(BugzillaReportElement.REP_PLATFORM);
- optionValues = repositoryConfiguration.getPlatforms();
- for (String option : optionValues) {
- a.addOption(option, option);
- }
- if (optionValues.size() > 0) {
- // bug 159397 choose first platform: All
- a.setValue(optionValues.get(0));
- }
-
- newTaskData.addAttribute(BugzillaReportElement.REP_PLATFORM.getKeyString(), a);
- // attributes.put(a.getName(), a);
-
- a = BugzillaClient.makeNewAttribute(BugzillaReportElement.OP_SYS);
- optionValues = repositoryConfiguration.getOSs();
- for (String option : optionValues) {
- a.addOption(option, option);
- }
- if (optionValues.size() > 0) {
- // bug 159397 change to choose first op_sys All
- a.setValue(optionValues.get(0));
- }
-
- newTaskData.addAttribute(BugzillaReportElement.OP_SYS.getKeyString(), a);
- // attributes.put(a.getName(), a);
-
- a = BugzillaClient.makeNewAttribute(BugzillaReportElement.PRIORITY);
- optionValues = repositoryConfiguration.getPriorities();
- for (String option : optionValues) {
- a.addOption(option, option);
- }
- a.setValue(optionValues.get((optionValues.size() / 2))); // choose middle priority
-
- newTaskData.addAttribute(BugzillaReportElement.PRIORITY.getKeyString(), a);
- // attributes.put(a.getName(), a);
-
- a = BugzillaClient.makeNewAttribute(BugzillaReportElement.BUG_SEVERITY);
- optionValues = repositoryConfiguration.getSeverities();
- for (String option : optionValues) {
- a.addOption(option, option);
- }
- a.setValue(optionValues.get((optionValues.size() / 2))); // choose middle severity
-
- newTaskData.addAttribute(BugzillaReportElement.BUG_SEVERITY.getKeyString(), a);
- // attributes.put(a.getName(), a);
-
- // a = new
- // RepositoryTaskAttribute(BugzillaReportElement.TARGET_MILESTONE);
- // optionValues =
- // BugzillaCorePlugin.getDefault().getgetProductConfiguration(serverUrl).getTargetMilestones(
- // newReport.getProduct());
- // for (String option : optionValues) {
- // a.addOptionValue(option, option);
- // }
- // if(optionValues.size() > 0) {
- // // new bug posts will fail if target_milestone element is
- // included
- // // and there are no milestones on the server
- // newReport.addAttribute(BugzillaReportElement.TARGET_MILESTONE, a);
- // }
-
- a = BugzillaClient.makeNewAttribute(BugzillaReportElement.ASSIGNED_TO);
- a.setValue("");
- a.setReadOnly(false);
-
- newTaskData.addAttribute(BugzillaReportElement.ASSIGNED_TO.getKeyString(), a);
- // attributes.put(a.getName(), a);
-
- a = BugzillaClient.makeNewAttribute(BugzillaReportElement.BUG_FILE_LOC);
- a.setValue("http://");
- a.setHidden(false);
-
- newTaskData.addAttribute(BugzillaReportElement.BUG_FILE_LOC.getKeyString(), a);
- // attributes.put(a.getName(), a);
-
- // newReport.attributes = attributes;
- }
-
- 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));
- }
- }
-
-}
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 f899cae2c..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.tasks.core.AbstractRepositoryQuery;
-
-/**
- * @author Shawn Minto
- * @author Mik Kersten
- */
-public class BugzillaRepositoryQuery extends AbstractRepositoryQuery {
-
- private boolean customQuery = false;
-
- public BugzillaRepositoryQuery(String repositoryUrl, String queryUrl, String description) {
- super(description);
- this.url = queryUrl;
- this.repositoryUrl = repositoryUrl;
- }
-
- @Override
- public String getRepositoryKind() {
- return BugzillaCorePlugin.REPOSITORY_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/BugzillaStatus.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaStatus.java
deleted file mode 100644
index d23ef3975..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;
-
-/**
- * @author Rob Elves
- */
-public class BugzillaStatus extends Status {
-
- private 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 BugzillaMessages.bind(BugzillaMessages.repositoryLoginFailure, this.getRepositoryUrl(),
- this.errorMessage);
- case RepositoryStatus.ERROR_REPOSITORY_NOT_FOUND:
- return BugzillaMessages.bind(BugzillaMessages.repositoryNotFound, this.errorMessage);
- case RepositoryStatus.ERROR_REPOSITORY:
- return BugzillaMessages.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 BugzillaMessages.bind(BugzillaMessages.errorIo, strings);
- case RepositoryStatus.ERROR_INTERNAL:
- return BugzillaMessages.bind(BugzillaMessages.errorInternal, this.errorMessage);
- case RepositoryStatus.OPERATION_CANCELLED:
- return BugzillaMessages.bind(BugzillaMessages.operationCancelled, this.errorMessage);
- case RepositoryStatus.REPOSITORY_COLLISION:
- return BugzillaMessages.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 5b0a6d9db..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTask.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
- *******************************************************************************/
-/*
- * Created on 14-Jan-2005
- */
-package org.eclipse.mylyn.internal.bugzilla.core;
-
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-
-/**
- * @author Mik Kersten
- * @author Rob Elves
- */
-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.REPOSITORY_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/BugzillaTaskDataHandler.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java
deleted file mode 100644
index e26f48a49..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java
+++ /dev/null
@@ -1,342 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public 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.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.mylyn.internal.bugzilla.core.IBugzillaConstants.BUGZILLA_OPERATION;
-import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants.BUGZILLA_REPORT_STATUS;
-import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants.BUGZILLA_RESOLUTION_2_0;
-import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants.BUGZILLA_RESOLUTION_3_0;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractAttributeFactory;
-import org.eclipse.mylyn.tasks.core.AbstractTaskDataHandler;
-import org.eclipse.mylyn.tasks.core.RepositoryOperation;
-import org.eclipse.mylyn.tasks.core.RepositoryStatus;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskAttribute;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-/**
- * @author Mik Kersten
- * @author Rob Elves
- */
-public class BugzillaTaskDataHandler extends AbstractTaskDataHandler {
-
- private static final String OPERATION_INPUT_ASSIGNED_TO = "assigned_to";
-
- private static final String OPERATION_INPUT_DUP_ID = "dup_id";
-
- private static final String OPERATION_OPTION_RESOLUTION = "resolution";
-
- private static final String OPERATION_LABEL_CLOSE = "Mark as CLOSED";
-
- private static final String OPERATION_LABEL_VERIFY = "Mark as VERIFIED";
-
- private static final String OPERATION_LABEL_REOPEN = "Reopen bug";
-
- private static final String OPERATION_LABEL_REASSIGN_DEFAULT = "Reassign to default assignee";
-
- private static final String OPERATION_LABEL_REASSIGN = "Reassign to";
-
- private static final String OPERATION_LABEL_DUPLICATE = "Mark as duplicate of #";
-
- private static final String OPERATION_LABEL_RESOLVE = "Resolve as";
-
- private static final String OPERATION_LABEL_ACCEPT = "Accept (change status to ASSIGNED)";
-
- private AbstractAttributeFactory attributeFactory = new BugzillaAttributeFactory();
-
- private BugzillaRepositoryConnector connector;
-
- public BugzillaTaskDataHandler(BugzillaRepositoryConnector connector) {
- this.connector = connector;
- }
-
- @Override
- public RepositoryTaskData getTaskData(TaskRepository repository, String taskId, IProgressMonitor monitor)
- throws CoreException {
- try {
- BugzillaClient client = connector.getClientManager().getClient(repository);
- int bugId = BugzillaRepositoryConnector.getBugId(taskId);
- RepositoryTaskData taskData;
- try {
- taskData = client.getTaskData(bugId);
- } catch (CoreException e) {
- // TODO: Move retry handling into client
- if (e.getStatus().getCode() == RepositoryStatus.ERROR_REPOSITORY_LOGIN) {
- taskData = client.getTaskData(bugId);
- } else {
- throw e;
- }
- }
- if (taskData != null) {
- try {
- configureTaskData(repository, taskData);
- } catch (CoreException ce) {
- // retry since data retrieved may be corrupt
- taskData = client.getTaskData(bugId);
- if (taskData != null) {
- configureTaskData(repository, taskData);
- }
- }
- return taskData;
- }
- return null;
-
- } catch (IOException e) {
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_IO, repository.getUrl(), e));
- }
- }
-
- @Override
- public Set<RepositoryTaskData> getMultiTaskData(TaskRepository repository, Set<String> taskIds,
- IProgressMonitor monitor) throws CoreException {
- try {
-
- Set<RepositoryTaskData> result = new HashSet<RepositoryTaskData>();
- BugzillaClient client = connector.getClientManager().getClient(repository);
- try {
- Map<String, RepositoryTaskData> dataReturned = client.getTaskData(taskIds);
- for (RepositoryTaskData repositoryTaskData : dataReturned.values()) {
- result.add(repositoryTaskData);
- }
- } catch (CoreException e) {
- // TODO: Move retry handling into client
- if (e.getStatus().getCode() == RepositoryStatus.ERROR_REPOSITORY_LOGIN) {
- Map<String, RepositoryTaskData> dataReturned = client.getTaskData(taskIds);
- for (RepositoryTaskData repositoryTaskData : dataReturned.values()) {
- result.add(repositoryTaskData);
- }
- } else {
- throw e;
- }
- }
- for (RepositoryTaskData repositoryTaskData : result) {
- try {
- configureTaskData(repository, repositoryTaskData);
- } catch (CoreException ce) {
- // retry since data retrieved may be corrupt
- //taskData = client.getTaskData(bugId);
- //if (taskData != null) {
- configureTaskData(repository, repositoryTaskData);
- // }
- }
- }
- return result;
-
- } catch (IOException e) {
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_IO, repository.getUrl(), e));
- }
- }
-
- @Override
- public String postTaskData(TaskRepository repository, RepositoryTaskData taskData, IProgressMonitor monitor)
- throws CoreException {
- try {
- BugzillaClient client = connector.getClientManager().getClient(repository);
- try {
- return client.postTaskData(taskData);
- } catch (CoreException e) {
- // TODO: Move retry handling into client
- if (e.getStatus().getCode() == RepositoryStatus.ERROR_REPOSITORY_LOGIN) {
- return client.postTaskData(taskData);
- } else {
- throw e;
- }
-
- }
-
- } catch (IOException e) {
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_IO, repository.getUrl(), e));
- }
- }
-
- @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.getRepositoryKind(), taskData.getTaskKind());
- }
-
- public void configureTaskData(TaskRepository repository, RepositoryTaskData taskData) throws CoreException {
- connector.updateAttributeOptions(repository, taskData);
- addValidOperations(taskData, repository.getUserName(), repository);
- }
-
- private void addValidOperations(RepositoryTaskData bugReport, String userName, TaskRepository repository)
- throws CoreException {
- BUGZILLA_REPORT_STATUS status;
- try {
- status = BUGZILLA_REPORT_STATUS.valueOf(bugReport.getStatus());
- } catch (RuntimeException e) {
- StatusHandler.log(e, "Unrecognized status: " + bugReport.getStatus());
- status = BUGZILLA_REPORT_STATUS.NEW;
- }
- switch (status) {
- case UNCONFIRMED:
- case REOPENED:
- case NEW:
- addOperation(repository, bugReport, BUGZILLA_OPERATION.none, userName);
- addOperation(repository, bugReport, BUGZILLA_OPERATION.accept, userName);
- addOperation(repository, bugReport, BUGZILLA_OPERATION.resolve, userName);
- addOperation(repository, bugReport, BUGZILLA_OPERATION.duplicate, userName);
- break;
- case ASSIGNED:
- addOperation(repository, bugReport, BUGZILLA_OPERATION.none, userName);
- addOperation(repository, bugReport, BUGZILLA_OPERATION.resolve, userName);
- addOperation(repository, bugReport, BUGZILLA_OPERATION.duplicate, userName);
- break;
- case RESOLVED:
- addOperation(repository, bugReport, BUGZILLA_OPERATION.none, userName);
- addOperation(repository, bugReport, BUGZILLA_OPERATION.reopen, userName);
- addOperation(repository, bugReport, BUGZILLA_OPERATION.verify, userName);
- addOperation(repository, bugReport, BUGZILLA_OPERATION.close, userName);
- break;
- case CLOSED:
- addOperation(repository, bugReport, BUGZILLA_OPERATION.none, userName);
- addOperation(repository, bugReport, BUGZILLA_OPERATION.reopen, userName);
- break;
- case VERIFIED:
- addOperation(repository, bugReport, BUGZILLA_OPERATION.none, userName);
- addOperation(repository, bugReport, BUGZILLA_OPERATION.reopen, userName);
- addOperation(repository, bugReport, BUGZILLA_OPERATION.close, userName);
- }
- String bugzillaVersion;
- try {
- bugzillaVersion = BugzillaCorePlugin.getRepositoryConfiguration(repository, false).getInstallVersion();
- } catch (CoreException e1) {
- // ignore
- 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(repository, bugReport, BUGZILLA_OPERATION.reassign, userName);
- addOperation(repository, bugReport, BUGZILLA_OPERATION.reassignbycomponent, userName);
- }
- }
-
- private void addOperation(TaskRepository repository, RepositoryTaskData bugReport, BUGZILLA_OPERATION opcode,
- String userName) {
- RepositoryOperation newOperation = null;
- switch (opcode) {
- case none:
- newOperation = new RepositoryOperation(opcode.toString(), "Leave as " + bugReport.getStatus() + " "
- + bugReport.getResolution());
- newOperation.setChecked(true);
- break;
- case accept:
- newOperation = new RepositoryOperation(opcode.toString(), OPERATION_LABEL_ACCEPT);
- break;
- case resolve:
- newOperation = new RepositoryOperation(opcode.toString(), OPERATION_LABEL_RESOLVE);
- newOperation.setUpOptions(OPERATION_OPTION_RESOLUTION);
- RepositoryConfiguration config;
- try {
- config = BugzillaCorePlugin.getRepositoryConfiguration(repository, false);
- } catch (CoreException e) {
- config = null;
- }
- if (config != null) {
- for (String resolution : config.getResolutions()) {
- // DUPLICATE and MOVED have special meanings so do not show as resolution
- if (resolution.compareTo("DUPLICATE") != 0 && resolution.compareTo("MOVED") != 0)
- newOperation.addOption(resolution, resolution);
- }
- } else {
- // LATER and REMIND must not be there in Bugzilla >= 3.0 is used
- //If getVersion() returns "Automatic (Use Validate Settings)" we use the Version 3 Resolution
- if (repository.getVersion().compareTo("3.0") >= 0) {
- for (BUGZILLA_RESOLUTION_3_0 resolution : BUGZILLA_RESOLUTION_3_0.values()) {
- newOperation.addOption(resolution.toString(), resolution.toString());
- }
- } else {
- for (BUGZILLA_RESOLUTION_2_0 resolution : BUGZILLA_RESOLUTION_2_0.values()) {
- newOperation.addOption(resolution.toString(), resolution.toString());
- }
- }
- }
- break;
- case duplicate:
- newOperation = new RepositoryOperation(opcode.toString(), OPERATION_LABEL_DUPLICATE);
- newOperation.setInputName(OPERATION_INPUT_DUP_ID);
- newOperation.setInputValue("");
- break;
- case reassign:
- String localUser = userName;
- newOperation = new RepositoryOperation(opcode.toString(), OPERATION_LABEL_REASSIGN);
- newOperation.setInputName(OPERATION_INPUT_ASSIGNED_TO);
- newOperation.setInputValue(localUser);
- break;
- case reassignbycomponent:
- newOperation = new RepositoryOperation(opcode.toString(), OPERATION_LABEL_REASSIGN_DEFAULT);
- break;
- case reopen:
- newOperation = new RepositoryOperation(opcode.toString(), OPERATION_LABEL_REOPEN);
- break;
- case verify:
- newOperation = new RepositoryOperation(opcode.toString(), OPERATION_LABEL_VERIFY);
- break;
- case close:
- newOperation = new RepositoryOperation(opcode.toString(), OPERATION_LABEL_CLOSE);
- break;
- default:
- break;
- }
- if (newOperation != null) {
- bugReport.addOperation(newOperation);
- }
- }
-
- @Override
- public boolean initializeTaskData(TaskRepository repository, RepositoryTaskData data, IProgressMonitor monitor)
- throws CoreException {
- // Bugzilla needs a product to create task data
- return false;
- }
-
- // TODO: Move to AbstractTaskDataHandler
- @Override
- public Set<String> getSubTaskIds(RepositoryTaskData taskData) {
- Set<String> result = new HashSet<String>();
- RepositoryTaskAttribute attribute = taskData.getAttribute(BugzillaReportElement.DEPENDSON.getKeyString());
- if (attribute != null) {
- String[] ids = attribute.getValue().split(",");
- for (String id : ids) {
- id = id.trim();
- if (id.length() == 0)
- continue;
- result.add(id);
- }
- }
- return result;
-
- }
-
- @Override
- public boolean canGetMultiTaskData() {
- return true;
- }
-
-}
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 807becb3d..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/IBugzillaConstants.java
+++ /dev/null
@@ -1,277 +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_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 VALUSE_STATUS_PRESELECTED = "org.eclipse.mylyn.bugzilla.values.status.preselected";
-
- static final String VALUES_RESOLUTION = "org.eclipse.mylyn.bugzilla.values.resolution";
-
- static final String VALUES_SEVERITY = "org.eclipse.mylyn.bugzilla.values.severity";
-
- static final String VALUES_PRIORITY = "org.eclipse.mylyn.bugzilla.values.priority";
-
- static final String VALUES_HARDWARE = "org.eclipse.mylyn.bugzilla.values.hardware";
-
- static final String VALUES_OS = "org.eclipse.mylyn.bugzilla.values.os";
-
- static final String VALUES_PRODUCT = "org.eclipse.mylyn.bugzilla.values.product";
-
- 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 VALUES_KEYWORDS = "org.eclipse.mylyn.bugzilla.values.keywords";
-
- static final String ECLIPSE_BUGZILLA_URL = "https://bugs.eclipse.org/bugs";
-
- static final String TEST_BUGZILLA_216_URL = "http://mylyn.eclipse.org/bugs216";
-
- 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_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_OPERATION {
- none, accept, resolve, duplicate, reassign, reassignbycomponent, reopen, verify, close;
- }
-
- 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 CHANGES_SUBMITTED = "changes submitted";
-
- 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";
-
-}
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 31ad91ea5..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/MultiBugReportFactory.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.bugzilla.core;
-
-import java.io.IOException;
-import java.io.InputStream;
-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.RepositoryTaskData;
-
-/**
- * Reads bug reports from repository.
- *
- * @author Rob Elves
- */
-public class MultiBugReportFactory extends AbstractReportFactory {
-
- public MultiBugReportFactory(InputStream inStream, String encoding) {
- super(inStream, encoding);
- }
-
- private static BugzillaAttributeFactory bugzillaAttributeFactory = new BugzillaAttributeFactory();
-
- public void populateReport(Map<String, RepositoryTaskData> bugMap) throws IOException, CoreException {
-
- SaxMultiBugReportContentHandler contentHandler = new SaxMultiBugReportContentHandler(bugzillaAttributeFactory,
- bugMap);
- 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));
- }
- 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));
- }
- }
- }
-}
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 270a48ed2..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/RepositoryConfiguration.java
+++ /dev/null
@@ -1,382 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public 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.List;
-import java.util.Map;
-
-/**
- * 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 = -3623617786905114255L;
-
- private static final String VERSION_UNKNOWN = "unknown";
-
- private String repositoryUrl = "<unknown>";
-
- private Map<String, ProductEntry> products = new HashMap<String, ProductEntry>();
-
- private List<String> platforms = new ArrayList<String>();
-
- private List<String> operatingSystems = new ArrayList<String>();
-
- private List<String> priorities = new ArrayList<String>();
-
- private List<String> severities = new ArrayList<String>();
-
- private List<String> bugStatus = new ArrayList<String>();
-
- private List<String> openStatusValues = new ArrayList<String>();
-
- private List<String> resolutionValues = new ArrayList<String>();
-
- private List<String> keywords = new ArrayList<String>();
-
- // master lists
-
- private List<String> versions = new ArrayList<String>();
-
- private List<String> components = new ArrayList<String>();
-
- private List<String> milestones = new ArrayList<String>();
-
- 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(BugzillaReportElement 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>();
- }
- }
-
-}
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 94be302ec..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/RepositoryQueryResultsFactory.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.bugzilla.core;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.security.GeneralSecurityException;
-
-import org.eclipse.mylyn.tasks.core.ITaskCollector;
-
-/**
- * @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 void performQuery(String repositoryUrl, ITaskCollector collector, int maxHits) throws IOException {
- SaxBugzillaQueryContentHandler contentHandler = new SaxBugzillaQueryContentHandler(repositoryUrl, collector);
- collectResults(contentHandler, false);
- }
-}
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 9e452032a..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxBugzillaQueryContentHandler.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.bugzilla.core;
-
-import java.util.Locale;
-
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.ITaskCollector;
-import org.eclipse.mylyn.web.core.HtmlStreamTokenizer;
-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 {
-
- /** The bug id */
- private String id;
-
- /** The summary of the bug */
- private String description = "";
-
- /** The priority of the bug */
- private String priority = AbstractTask.PriorityLevel.getDefault().toString();
-
- private StringBuffer characters;
-
- private ITaskCollector collector;
-
- private String repositoryUrl;
-
- public SaxBugzillaQueryContentHandler(String repositoryUrl, ITaskCollector collector) {
- this.repositoryUrl = repositoryUrl;
- this.collector = collector;
- }
-
- @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();
- BugzillaReportElement tag = BugzillaReportElement.UNKNOWN;
- try {
- tag = BugzillaReportElement.valueOf(localName.trim().toUpperCase(Locale.ENGLISH));
- switch (tag) {
- case LI:
-// hit = new BugzillaQueryHit();
-// hit.setRepository(repositoryUrl);
-// break;
- }
- } catch (RuntimeException e) {
- if (e instanceof IllegalArgumentException) {
- // ignore unrecognized tags
- return;
- }
- throw e;
- }
-
- }
-
- @Override
- public void endElement(String uri, String localName, String qName) throws SAXException {
-
- String parsedText = HtmlStreamTokenizer.unescape(characters.toString());
-
- BugzillaReportElement tag = BugzillaReportElement.UNKNOWN;
- try {
- tag = BugzillaReportElement.valueOf(localName.trim().toUpperCase(Locale.ENGLISH));
- switch (tag) {
- case ID:
- id = parsedText;
- break;
- // case BUG_SEVERITY:
- // severity = parsedText;
- // break;
- case PRIORITY:
- priority = parsedText;
- break;
- // case REP_PLATFORM:
- // platform = parsedText;
- // break;
- case ASSIGNED_TO:
- //hit.setOwner(parsedText);
- break;
- case BUG_STATUS:
- // state = parsedText;
- break;
- // case RESOLUTION:
- // resolution = parsedText;
- // break;
- case SHORT_DESC:
- description = parsedText;
- break;
- case SHORT_SHORT_DESC:
- description = parsedText;
- break;
- case LI:
- BugzillaTask task = new BugzillaTask(repositoryUrl, id, description);
- task.setPriority(priority);
- // TODO set state
- collector.accept(task);
- }
- } catch (RuntimeException e) {
- if (e instanceof IllegalArgumentException) {
- // ignore unrecognized tags
- return;
- }
- throw e;
- }
-
- }
-}
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 7da97353b..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxConfigurationContentHandler.java
+++ /dev/null
@@ -1,390 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public 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_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 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 int state = EXPECTING_ROOT;
-
- private String currentProduct = "";
-
- private StringBuffer characters = new StringBuffer();
-
- private String about;
-
- private RepositoryConfiguration configuration = new RepositoryConfiguration();
-
- private Map<String, List<String>> components = new HashMap<String, List<String>>();
-
- private Map<String, List<String>> versions = new HashMap<String, List<String>>();
-
- private Map<String, List<String>> milestones = new HashMap<String, List<String>>();
-
- private Map<String, String> componentNames = new HashMap<String, String>();
-
- private Map<String, String> versionNames = new HashMap<String, String>();
-
- private Map<String, String> milestoneNames = new HashMap<String, String>();
-
- 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;
- }
- }
-
- @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 (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 (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;
- }
- }
-
- 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;
-
- }
- }
-
- @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 9ecbf0a7f..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxMultiBugReportContentHandler.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.bugzilla.core;
-
-import java.util.HashMap;
-import java.util.Locale;
-import java.util.Map;
-
-import org.eclipse.mylyn.tasks.core.AbstractAttributeFactory;
-import org.eclipse.mylyn.tasks.core.RepositoryAttachment;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskAttribute;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.TaskComment;
-import org.eclipse.mylyn.web.core.HtmlStreamTokenizer;
-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 COMMENT_ATTACHMENT_STRING = "Created an attachment (id=";
-
- private StringBuffer characters;
-
- private TaskComment taskComment;
-
- private Map<String, TaskComment> attachIdToComment = new HashMap<String, TaskComment>();
-
- private int commentNum = 0;
-
- private RepositoryAttachment attachment;
-
- private Map<String, RepositoryTaskData> taskDataMap;
-
- private RepositoryTaskData repositoryTaskData;
-
- private String errorMessage = null;
-
- private AbstractAttributeFactory attributeFactory;
-
- //private int retrieved = 1;
-
- public SaxMultiBugReportContentHandler(AbstractAttributeFactory factory, Map<String, RepositoryTaskData> taskDataMap) {
- this.attributeFactory = factory;
- this.taskDataMap = taskDataMap;
- }
-
- public boolean errorOccurred() {
- return errorMessage != null;
- }
-
- public String getErrorMessage() {
- return errorMessage;
- }
-
-// public RepositoryTaskData getReport() {
-// return repositoryTaskData;
-// }
-
- @Override
- public void characters(char[] ch, int start, int length) throws SAXException {
- characters.append(ch, start, length);
- // if (monitor.isCanceled()) {
- // throw new OperationCanceledException("Search cancelled");
- // }
- }
-
- @Override
- public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
- characters = new StringBuffer();
- BugzillaReportElement tag = BugzillaReportElement.UNKNOWN;
- try {
- tag = BugzillaReportElement.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, TaskComment>();
- commentNum = 0;
- taskComment = null;
- break;
- case LONG_DESC:
- taskComment = new TaskComment(attributeFactory, commentNum++);
- break;
- case ATTACHMENT:
- attachment = new RepositoryAttachment(attributeFactory);
- if (attributes != null) {
- if ("1".equals(attributes.getValue(BugzillaReportElement.IS_OBSOLETE.getKeyString()))) {
- attachment.addAttribute(BugzillaReportElement.IS_OBSOLETE.getKeyString(),
- attributeFactory.createAttribute(BugzillaReportElement.IS_OBSOLETE.getKeyString()));
- attachment.setObsolete(true);
- }
- if ("1".equals(attributes.getValue(BugzillaReportElement.IS_PATCH.getKeyString()))) {
- attachment.setPatch(true);
- }
- }
- break;
- }
-
- }
-
- @Override
- public void endElement(String uri, String localName, String qName) throws SAXException {
-
- String parsedText = HtmlStreamTokenizer.unescape(characters.toString());
-
- BugzillaReportElement tag = BugzillaReportElement.UNKNOWN;
- try {
- tag = BugzillaReportElement.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.";
- }
-
- RepositoryTaskAttribute attr = repositoryTaskData.getAttribute(tag.getKeyString());
- if (attr == null) {
- attr = attributeFactory.createAttribute(tag.getKeyString());
- repositoryTaskData.addAttribute(tag.getKeyString(), attr);
- }
- attr.setValue(parsedText);
- break;
- }
-
- // Comment attributes
- case WHO:
- case BUG_WHEN:
- if (taskComment != null) {
- RepositoryTaskAttribute attr = attributeFactory.createAttribute(tag.getKeyString());
- attr.setValue(parsedText);
- taskComment.addAttribute(tag.getKeyString(), attr);
- }
- break;
- case THETEXT:
- if (taskComment != null) {
- RepositoryTaskAttribute attr = attributeFactory.createAttribute(tag.getKeyString());
- attr.setValue(parsedText);
- taskComment.addAttribute(tag.getKeyString(), attr);
-
- // Check for attachment
- parseAttachment(taskComment, parsedText);
- }
- break;
- case LONG_DESC:
- if (taskComment != null) {
- if (taskComment.getNumber() == 0) {
- repositoryTaskData.setAttributeValue(RepositoryTaskAttribute.DESCRIPTION, taskComment.getText());
- break;
- }
- repositoryTaskData.addComment(taskComment);
- }
- break;
-
- // Attachment attributes
- case ATTACHID:
- case DATE:
- case DESC:
- case FILENAME:
- case CTYPE:
- case TYPE:
- if (attachment != null) {
- RepositoryTaskAttribute attr = attributeFactory.createAttribute(tag.getKeyString());
- attr.setValue(parsedText);
- attachment.addAttribute(tag.getKeyString(), attr);
- }
- break;
- case DATA:
- break;
- case ATTACHMENT:
- if (attachment != null) {
- repositoryTaskData.addAttachment(attachment);
- }
- break;
-
- // IGNORED ELEMENTS
- // case REPORTER_ACCESSIBLE:
- // case CLASSIFICATION_ID:
- // case CLASSIFICATION:
- // case CCLIST_ACCESSIBLE:
- // case EVERCONFIRMED:
- case BUGZILLA:
- break;
-// Considering solution for bug#198714
-// case DELTA_TS:
-// RepositoryTaskAttribute delta_ts_attribute = repositoryTaskData.getAttribute(tag.getKeyString());
-// if (delta_ts_attribute == null) {
-// delta_ts_attribute = attributeFactory.createAttribute(tag.getKeyString());
-// repositoryTaskData.addAttribute(tag.getKeyString(), delta_ts_attribute);
-// }
-// delta_ts_attribute.setValue(BugzillaClient.stripTimeZone(parsedText));
-// break;
- case BUG:
- // Reached end of bug. Need to set LONGDESCLENGTH to number of
- // comments
- RepositoryTaskAttribute numCommentsAttribute = repositoryTaskData.getAttribute(BugzillaReportElement.LONGDESCLENGTH.getKeyString());
- if (numCommentsAttribute == null) {
- numCommentsAttribute = attributeFactory.createAttribute(BugzillaReportElement.LONGDESCLENGTH.getKeyString());
- numCommentsAttribute.setValue("" + repositoryTaskData.getComments().size());
- repositoryTaskData.addAttribute(BugzillaReportElement.LONGDESCLENGTH.getKeyString(),
- numCommentsAttribute);
- } else {
- numCommentsAttribute.setValue("" + repositoryTaskData.getComments().size());
- }
-
- // Set the creator name on all attachments
- for (RepositoryAttachment attachment : repositoryTaskData.getAttachments()) {
- TaskComment taskComment = attachIdToComment.get(attachment.getId());
- if (taskComment != null) {
- attachment.setCreator(taskComment.getAuthor());
- }
- attachment.setAttributeValue(RepositoryTaskAttribute.ATTACHMENT_URL,
- repositoryTaskData.getRepositoryUrl() + IBugzillaConstants.URL_GET_ATTACHMENT_SUFFIX
- + attachment.getId());
- attachment.setRepositoryKind(repositoryTaskData.getRepositoryKind());
- attachment.setRepositoryUrl(repositoryTaskData.getRepositoryUrl());
- attachment.setTaskId(repositoryTaskData.getId());
- }
- break;
-
- case BLOCKED:
- case DEPENDSON:
- RepositoryTaskAttribute dependancyAttribute = repositoryTaskData.getAttribute(tag.getKeyString());
- if (dependancyAttribute == null) {
- dependancyAttribute = attributeFactory.createAttribute(tag.getKeyString());
- dependancyAttribute.setValue(parsedText);
- repositoryTaskData.addAttribute(tag.getKeyString(), dependancyAttribute);
- } else {
- if (dependancyAttribute.getValue().equals("")) {
- dependancyAttribute.setValue(parsedText);
- } else {
- dependancyAttribute.setValue(dependancyAttribute.getValue() + ", " + parsedText);
- }
- }
- break;
- // All others added as report attribute
- default:
- RepositoryTaskAttribute attribute = repositoryTaskData.getAttribute(tag.getKeyString());
- if (attribute == null) {
- attribute = attributeFactory.createAttribute(tag.getKeyString());
- attribute.setValue(parsedText);
- repositoryTaskData.addAttribute(tag.getKeyString(), attribute);
- } else {
- attribute.addValue(parsedText);
- }
- break;
- }
-
- }
-
- /** determines attachment id from comment */
- private void parseAttachment(TaskComment taskComment, String commentText) {
-
- String attachmentID = "";
-
- 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("")) {
- taskComment.setHasAttachment(true);
- taskComment.setAttachmentId(attachmentID);
- attachIdToComment.put(attachmentID, taskComment);
- }
- }
- }
- }
-}
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 a6f28adc4..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.web.core.HtmlStreamTokenizer;
-import org.eclipse.mylyn.web.core.HtmlTag;
-import org.eclipse.mylyn.web.core.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 ba93c8dd2..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AttachmentEvent.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.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 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 (int i = 0; i < flagToken.length; i++) {
- String token = flagToken[i];
- 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 06fa6d8aa..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/BugzillaTaskHistoryParser.java
+++ /dev/null
@@ -1,220 +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 javax.security.auth.login.LoginException;
-
-import org.eclipse.mylyn.web.core.HtmlStreamTokenizer;
-import org.eclipse.mylyn.web.core.HtmlTag;
-import org.eclipse.mylyn.web.core.HtmlStreamTokenizer.Token;
-
-/**
- * Parses Bugzilla bug activity page to fill in a BugActivity object
- *
- * @author John Anvik
- */
-
-public class BugzillaTaskHistoryParser {
-
- private InputStream inStream;
-
- private 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() 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() == HtmlTag.Type.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() == HtmlTag.Type.TITLE
- && ((HtmlTag) token.getValue()).isEndTag()) {
- // check if we may have a problem with login by looking
- // at
- // the title of the page
- if ((title.indexOf("login") != -1
- || (title.indexOf("invalid") != -1 && title.indexOf("password") != -1)
- || title.indexOf("check e-mail") != -1 || title.indexOf("error") != -1))
- 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() == HtmlTag.Type.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() == HtmlTag.Type.TR)
- || tag.getTagType() == HtmlTag.Type.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() == HtmlTag.Type.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() == HtmlTag.Type.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() == HtmlTag.Type.TD && tag.isEndTag()) {
- String data = HtmlStreamTokenizer.unescape(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 85a4bb4b4..000000000
--- a/org.eclipse.mylyn.bugzilla.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.pde.core.requiredPlugins"/>
- <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 003d9ae61..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.mylyn.bugzilla.test</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>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</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 888de1277..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,316 +0,0 @@
-#Sun Jun 24 11:52:58 EDT 2007
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.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=disabled
-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.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.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
-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=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-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.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.5
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=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_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 \ No newline at end of file
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 1e4caec9f..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,6 +0,0 @@
-#Mon Jul 09 18:11:45 PDT 2007
-eclipse.preferences.version=1
-formatter_profile=_Mylar based on Eclipse [built-in]
-formatter_settings_version=11
-internal.default.compliance=default
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return the ${bare_field_name}\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} the ${bare_field_name} to set\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\r\n * \r\n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author ${user}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*******************************************************************************\r\n * Copyright (c) 2004, 2007 Mylyn project committers and others.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n *******************************************************************************/\r\n\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ignore\r\n${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ignore</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template></templates>
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.mylar.tasklist.prefs b/org.eclipse.mylyn.bugzilla.tests/.settings/org.eclipse.mylar.tasklist.prefs
deleted file mode 100644
index a6cf96a98..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/.settings/org.eclipse.mylar.tasklist.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Fri Oct 20 16:54:30 PDT 2006
-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.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.prefs b/org.eclipse.mylyn.bugzilla.tests/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index 769b229ff..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/.settings/org.eclipse.pde.prefs
+++ /dev/null
@@ -1,12 +0,0 @@
-#Thu Nov 03 15:45:55 PST 2005
-compilers.p.deprecated=2
-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-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 f97945062..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,30 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Bugzilla Tests Plug-in
-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.web.core
-Eclipse-AutoStart: true
-Bundle-Vendor: Eclipse.org
-Bundle-ClassPath: bugzilla-test.jar
-Export-Package: org.eclipse.mylyn.bugzilla.tests
-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 f10e5a80c..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2004, 2007 Mylyn project committers and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the 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
-jars.compile.order = bugzilla-test.jar
-source.bugzilla-test.jar = src/
-output.bugzilla-test.jar = bin/
-src.includes = src/,\
- about.html,\
- META-INF/
-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 bdaf58b88..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AbstractBugzillaTest.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse 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.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.BugzillaTask;
-import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.ITaskFactory;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.TaskList;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.tasks.core.AbstractTask.RepositoryTaskSyncState;
-import org.eclipse.mylyn.tasks.ui.TaskFactory;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @author Mik Kersten
- * @author Rob Elves
- * @author Nathan Hapke
- */
-public abstract class AbstractBugzillaTest extends TestCase {
-
- static final String DEFAULT_KIND = BugzillaCorePlugin.REPOSITORY_KIND;
-
- protected BugzillaRepositoryConnector connector;
-
- protected TaskRepositoryManager manager;
-
- protected TaskRepository repository;
-
- protected TaskList taskList;
-
- protected ITaskFactory taskFactory;
-
- public AbstractBugzillaTest() {
- super();
- }
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- TasksUiPlugin.getTaskDataManager().clear();
- manager = TasksUiPlugin.getRepositoryManager();
- TasksUiPlugin.getTaskListManager().getTaskList().reset();
- 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.setAuthenticationCredentials(credentials.username, credentials.password);
-
- repository.setTimeZoneId("Canada/Eastern");
- assertNotNull(manager);
- manager.addRepository(repository, TasksUiPlugin.getDefault().getRepositoriesFilePath());
-
- taskList = TasksUiPlugin.getTaskListManager().getTaskList();
-
- AbstractRepositoryConnector abstractRepositoryClient = manager.getRepositoryConnector(DEFAULT_KIND);
-
- assertEquals(abstractRepositoryClient.getConnectorKind(), DEFAULT_KIND);
-
- connector = (BugzillaRepositoryConnector) abstractRepositoryClient;
-
- taskFactory = new TaskFactory(repository);
-// connector.setForceSynchExecForTesting(true);
- TasksUiPlugin.getSynchronizationManager().setForceSyncExec(true);
- }
-
- protected BugzillaTask generateLocalTaskAndDownload(String taskNumber) throws CoreException {
- BugzillaTask task = (BugzillaTask) connector.createTaskFromExistingId(repository, taskNumber,
- new NullProgressMonitor());
- TasksUiPlugin.getSynchronizationManager().setTaskRead(task, true);
- assertNotNull(task);
- TasksUiPlugin.getTaskListManager().getTaskList().moveToContainer(task,
- TasksUiPlugin.getTaskListManager().getTaskList().getDefaultCategory());
-
- return task;
- }
-
- protected void submit(AbstractTask task, RepositoryTaskData taskData) throws CoreException {
- connector.getTaskDataHandler().postTaskData(repository, taskData, new NullProgressMonitor());
- task.setSubmitting(true);
- }
-
- // protected BugzillaReportSubmitForm makeExistingBugPost(RepositoryTaskData
- // taskData)
- // throws UnsupportedEncodingException {
- // return BugzillaReportSubmitForm.makeExistingBugPost(taskData,
- // repository.getUrl(), repository.getUserName(),
- // repository.getPassword(), repository.getCharacterEncoding());
- // }
-
- protected void synchAndAssertState(Set<AbstractTask> tasks, RepositoryTaskSyncState state) {
- for (AbstractTask task : tasks) {
- TasksUiPlugin.getSynchronizationManager().synchronize(connector, task, true, null);
- assertEquals(task.getSynchronizationState(), state);
- }
- }
-
- // class MockBugzillaReportSubmitForm extends BugzillaReportSubmitForm {
- //
- // public MockBugzillaReportSubmitForm() {
- // super();
- // }
- //
- // @Override
- // public String submitReportToRepository(BugzillaClient client) throws
- // BugzillaException, LoginException,
- // PossibleBugzillaFailureException {
- // return "test-submit";
- // }
- //
- // }
-}
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 a5c869b95..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(TaskReportGeneratorTest.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 c3ae16f7e..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaConfigurationTest.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.bugzilla.tests;
-
-import java.io.BufferedReader;
-import java.io.FileInputStream;
-import java.io.InputStreamReader;
-import java.io.StringReader;
-import java.net.URL;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.FileLocator;
-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.core.RepositoryConfiguration;
-import org.eclipse.mylyn.internal.bugzilla.core.SaxConfigurationContentHandler;
-import org.eclipse.mylyn.internal.bugzilla.core.XmlCleaner;
-import org.eclipse.mylyn.web.core.WebClientUtil;
-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 {
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- public void test222RDFProductConfig() throws Exception {
-
- BugzillaClient client = BugzillaClientFactory.createClient(IBugzillaConstants.TEST_BUGZILLA_222_URL, "", "",
- "", "", WebClientUtil.getPlatformProxy(), "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 = BugzillaClientFactory.createClient(IBugzillaConstants.TEST_BUGZILLA_2201_URL, "", "",
- "", "", WebClientUtil.getPlatformProxy(), "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 = BugzillaClientFactory.createClient(IBugzillaConstants.TEST_BUGZILLA_220_URL, "", "",
- "", "", WebClientUtil.getPlatformProxy(), "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 = BugzillaClientFactory.createClient(IBugzillaConstants.TEST_BUGZILLA_218_URL, "", "",
- "", "", WebClientUtil.getPlatformProxy(), "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 = BugzillaClientFactory.createClient(IBugzillaConstants.ECLIPSE_BUGZILLA_URL, "", "",
- "", "", WebClientUtil.getPlatformProxy(), "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(28, 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(26, 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 755d0ee66..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.REPOSITORY_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).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).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).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).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 d9086d061..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaRepositoryConnectorTest.java
+++ /dev/null
@@ -1,803 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse 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.BufferedWriter;
-import java.io.File;
-import java.io.FileWriter;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.mylyn.context.core.ContextCorePlugin;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaClient;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaReportElement;
-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.tasks.core.LocalAttachment;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.RepositoryAttachment;
-import org.eclipse.mylyn.tasks.core.RepositoryOperation;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskAttribute;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.AbstractTask.RepositoryTaskSyncState;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.ui.search.RepositorySearchResult;
-import org.eclipse.mylyn.tasks.ui.search.SearchHitCollector;
-
-/**
- * @author Mik Kersten
- * @author Rob Elves
- * @author Nathan Hapke
- */
-public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
-
-// 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
-
- 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.getTaskDataManager().clear();
-
- // Get the task
- BugzillaTask task = generateLocalTaskAndDownload(taskNumber);
-
- RepositoryTaskData taskData = TasksUiPlugin.getTaskDataManager().getEditableCopy(task.getRepositoryUrl(),
- task.getTaskId());
- assertNotNull(taskData);
-
- TasksUiPlugin.getTaskListManager().getTaskList().moveToContainer(task,
- TasksUiPlugin.getTaskListManager().getTaskList().getDefaultCategory());
-
- assertEquals("rob.elves@eclipse.org", taskData.getAssignedTo());
- // Modify it (reassign to tests2@mylyn.eclipse.org)
- String newCommentText = "BugzillaRepositoryClientTest.testReassign31(): reassign " + (new Date()).toString();
- taskData.setNewComment(newCommentText);
- Set<RepositoryTaskAttribute> changed = new HashSet<RepositoryTaskAttribute>();
- changed.add(taskData.getAttribute(RepositoryTaskAttribute.COMMENT_NEW));
-
- taskData.setAttributeValue(RepositoryTaskAttribute.USER_ASSIGNED, "tests2@mylyn.eclipse.org");
- changed.add(taskData.getAttribute(RepositoryTaskAttribute.USER_ASSIGNED));
- TasksUiPlugin.getTaskDataManager().saveEdits(task.getRepositoryUrl(), task.getTaskId(), changed);
-
- // Submit changes
- submit(task, taskData);
-
- TasksUiPlugin.getSynchronizationManager().synchronize(connector, task, true, null);
- taskData = TasksUiPlugin.getTaskDataManager().getNewTaskData(task.getRepositoryUrl(), task.getTaskId());
- assertEquals("tests2@mylyn.eclipse.org", taskData.getAssignedTo());
-
- // Modify it (reassignbycomponent)
- newCommentText = "BugzillaRepositoryClientTest.testReassign31(): reassignbycomponent "
- + (new Date()).toString();
- taskData.setNewComment(newCommentText);
- changed = new HashSet<RepositoryTaskAttribute>();
- changed.add(taskData.getAttribute(RepositoryTaskAttribute.COMMENT_NEW));
-
- taskData.setAttributeValue(BugzillaReportElement.SET_DEFAULT_ASSIGNEE.getKeyString(), "1");
- changed.add(taskData.getAttribute(BugzillaReportElement.SET_DEFAULT_ASSIGNEE.getKeyString()));
-
- TasksUiPlugin.getTaskDataManager().saveEdits(task.getRepositoryUrl(), task.getTaskId(), changed);
-
- // Submit changes
- submit(task, taskData);
- TasksUiPlugin.getSynchronizationManager().synchronize(connector, task, true, null);
- taskData = TasksUiPlugin.getTaskDataManager().getNewTaskData(task.getRepositoryUrl(), task.getTaskId());
- assertEquals("rob.elves@eclipse.org", taskData.getAssignedTo());
- }
-
- private void doReassignOld(String taskNumber, String defaultAssignee) throws CoreException {
- TasksUiPlugin.getTaskDataManager().clear();
-
- // Get the task
- BugzillaTask task = generateLocalTaskAndDownload(taskNumber);
-
- RepositoryTaskData taskData = TasksUiPlugin.getTaskDataManager().getEditableCopy(task.getRepositoryUrl(),
- task.getTaskId());
- assertNotNull(taskData);
-
- TasksUiPlugin.getTaskListManager().getTaskList().moveToContainer(task,
- TasksUiPlugin.getTaskListManager().getTaskList().getDefaultCategory());
-
- assertEquals(defaultAssignee, taskData.getAssignedTo());
- // Modify it (reassign to tests2@mylyn.eclipse.org)
- String newCommentText = "BugzillaRepositoryClientTest.testReassignOld(): reassign " + (new Date()).toString();
- taskData.setNewComment(newCommentText);
- Set<RepositoryTaskAttribute> changed = new HashSet<RepositoryTaskAttribute>();
- changed.add(taskData.getAttribute(RepositoryTaskAttribute.COMMENT_NEW));
- for (Iterator<RepositoryOperation> it = taskData.getOperations().iterator(); it.hasNext();) {
- RepositoryOperation o = it.next();
- 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.getTaskDataManager().saveEdits(task.getRepositoryUrl(), task.getTaskId(), changed);
-
- // Submit changes
- submit(task, taskData);
-
- TasksUiPlugin.getSynchronizationManager().synchronize(connector, task, true, null);
- taskData = TasksUiPlugin.getTaskDataManager().getNewTaskData(task.getRepositoryUrl(), task.getTaskId());
- assertEquals("tests2@mylyn.eclipse.org", taskData.getAssignedTo());
-
- // Modify it (reassignbycomponent)
- newCommentText = "BugzillaRepositoryClientTest.testReassignOld(): reassignbycomponent "
- + (new Date()).toString();
- taskData.setNewComment(newCommentText);
- changed = new HashSet<RepositoryTaskAttribute>();
- changed.add(taskData.getAttribute(RepositoryTaskAttribute.COMMENT_NEW));
- for (Iterator<RepositoryOperation> it = taskData.getOperations().iterator(); it.hasNext();) {
- RepositoryOperation o = it.next();
- if (o.isChecked())
- o.setChecked(false);
- if (o.getKnobName().compareTo("reassignbycomponent") == 0) {
- o.setChecked(true);
- taskData.setSelectedOperation(o);
- }
- }
- TasksUiPlugin.getTaskDataManager().saveEdits(task.getRepositoryUrl(), task.getTaskId(), changed);
-
- // Submit changes
- submit(task, taskData);
- TasksUiPlugin.getSynchronizationManager().synchronize(connector, task, true, null);
- taskData = TasksUiPlugin.getTaskDataManager().getNewTaskData(task.getRepositoryUrl(), task.getTaskId());
- assertEquals(defaultAssignee, taskData.getAssignedTo());
- }
-
- public void testSubTaskHasIncoming() throws CoreException {
- init30();
- String taskNumber = "6";
- BugzillaTask task = generateLocalTaskAndDownload(taskNumber);
- assertNotNull(task);
- assertEquals(1, task.getChildren().size());
- AbstractTask child = task.getChildren().iterator().next();
- assertEquals(RepositoryTaskSyncState.INCOMING, child.getSynchronizationState());
- }
-
- public void testFocedQuerySynchronization() throws CoreException {
- init222();
- TasksUiPlugin.getSynchronizationManager().setForceSyncExec(true);
- TasksUiPlugin.getTaskDataManager().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);
-
- TasksUiPlugin.getSynchronizationManager().synchronize(connector, bugQuery, null, false);
-
- assertEquals(1, bugQuery.getChildren().size());
- AbstractTask hit = (AbstractTask) bugQuery.getChildren().toArray()[0];
- assertTrue(TasksUiPlugin.getTaskDataManager().getNewTaskData(hit.getRepositoryUrl(), hit.getTaskId()) != null);
- TasksUiPlugin.getTaskDataManager().remove(hit.getRepositoryUrl(), hit.getTaskId());
-
- TasksUiPlugin.getSynchronizationManager().synchronize(connector, bugQuery, null, true);
- assertEquals(1, bugQuery.getChildren().size());
- hit = (AbstractTask) bugQuery.getChildren().toArray()[0];
- assertTrue(TasksUiPlugin.getTaskDataManager().getNewTaskData(hit.getRepositoryUrl(), hit.getTaskId()) != null);
-
- }
-
- public void testCreateTaskFromExistingId() throws Exception {
- init222();
- try {
- connector.createTaskFromExistingId(repository, "9999", new NullProgressMonitor());
- fail();
- } catch (CoreException ce) {
-
- }
-
- BugzillaTask task = generateLocalTaskAndDownload("1");
- assertNotNull(task);
- assertNotNull(TasksUiPlugin.getTaskDataManager().getNewTaskData(task.getRepositoryUrl(), task.getTaskId()));
- assertEquals(RepositoryTaskSyncState.SYNCHRONIZED, task.getSynchronizationState());
-
- BugzillaTask retrievedTask = (BugzillaTask) 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
- BugzillaTask 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.getUrl(), queryUrl, "search");
-
- SearchHitCollector collector = new SearchHitCollector(taskList, repository, bugzillaQuery, taskFactory);
- RepositorySearchResult result = (RepositorySearchResult) collector.getSearchResult();
-
- // operation.run(new NullProgressMonitor());
- // BugzillaSearchQuery searchQuery = new BugzillaSearchQuery(collector);
- collector.run(new NullProgressMonitor());
- assertEquals(2, result.getElements().length);
-
- for (AbstractTask hit : collector.getTasks()) {
- assertTrue(hit.getSummary().contains("search-match-test"));
- }
-
- // test anonymous update of configuration
- RepositoryConfiguration config = BugzillaCorePlugin.getRepositoryConfiguration(repository, false);
- assertNotNull(config);
- assertTrue(config.getComponents().size() > 0);
- }
-
- public void testUpdate() throws Exception {
- init222();
- String taskNumber = "3";
- TasksUiPlugin.getTaskDataManager().clear();
- assertEquals(0, TasksUiPlugin.getTaskListManager().getTaskList().getAllTasks().size());
- BugzillaTask task = this.generateLocalTaskAndDownload(taskNumber);
- assertEquals("search-match-test 2", task.getSummary());
- assertEquals("TestProduct", task.getProduct());
- assertEquals("P1", task.getPriority());
- assertEquals("blocker", task.getSeverity());
- 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.getTaskDataManager().clear();
- assertEquals(0, TasksUiPlugin.getTaskListManager().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.getTaskDataManager().getNewTaskData(task.getRepositoryUrl(), task.getTaskId()));
- TasksUiPlugin.getTaskListManager().activateTask(task);
- File sourceContextFile = ContextCorePlugin.getContextManager().getFileForContext(task.getHandleIdentifier());
- assertEquals(RepositoryTaskSyncState.SYNCHRONIZED, task.getSynchronizationState());
- sourceContextFile.createNewFile();
- sourceContextFile.deleteOnExit();
- repository.setAuthenticationCredentials("wrong", "wrong");
- try {
- connector.getAttachmentHandler().attachContext(repository, task, "", new NullProgressMonitor());
- } catch (CoreException e) {
- assertEquals(RepositoryTaskSyncState.SYNCHRONIZED, task.getSynchronizationState());
- return;
- }
- fail("Should have failed due to invalid userid and password.");
- }
-
- public void testSynchronize() throws CoreException {
- init222();
-
- TasksUiPlugin.getTaskDataManager().clear();
-
- // Get the task
- BugzillaTask task = generateLocalTaskAndDownload("3");
-
- RepositoryTaskData taskData = TasksUiPlugin.getTaskDataManager().getEditableCopy(task.getRepositoryUrl(),
- task.getTaskId());
- assertNotNull(taskData);
-
- TasksUiPlugin.getTaskListManager().getTaskList().moveToContainer(task,
- TasksUiPlugin.getTaskListManager().getTaskList().getDefaultCategory());
- int numComments = taskData.getComments().size();
-
- // Modify it
- String newCommentText = "BugzillaRepositoryClientTest.testSynchronize(): " + (new Date()).toString();
- taskData.setNewComment(newCommentText);
- Set<RepositoryTaskAttribute> changed = new HashSet<RepositoryTaskAttribute>();
- changed.add(taskData.getAttribute(RepositoryTaskAttribute.COMMENT_NEW));
- TasksUiPlugin.getTaskDataManager().saveEdits(task.getRepositoryUrl(), task.getTaskId(), changed);
-
- // Submit changes
- submit(task, taskData);
-
- TasksUiPlugin.getSynchronizationManager().synchronize(connector, task, true, null);
- // After submit task should be in SYNCHRONIZED state
- assertEquals(RepositoryTaskSyncState.SYNCHRONIZED, task.getSynchronizationState());
- RepositoryTaskData taskData2 = TasksUiPlugin.getTaskDataManager().getNewTaskData(task.getRepositoryUrl(),
- task.getTaskId());
- assertFalse(taskData2.getLastModified().equals(taskData.getLastModified()));
- // Still not read
- assertFalse(taskData2.getLastModified().equals(task.getLastReadTimeStamp()));
- TasksUiPlugin.getSynchronizationManager().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(RepositoryTaskSyncState.SYNCHRONIZED);
- TasksUiPlugin.getTaskDataManager().remove(task.getRepositoryUrl(), task.getTaskId());
- TasksUiPlugin.getSynchronizationManager().synchronize(connector, task, false, null);
- assertEquals(RepositoryTaskSyncState.SYNCHRONIZED, task.getSynchronizationState());
- RepositoryTaskData bugReport2 = null;
- bugReport2 = TasksUiPlugin.getTaskDataManager().getNewTaskData(task.getRepositoryUrl(), task.getTaskId());
- assertNotNull(bugReport2);
- assertEquals(task.getTaskId(), bugReport2.getId());
-
- 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 (AbstractTask hit : query1.getChildren()) {
- for (AbstractTask 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.getTaskDataManager().getNewTaskData(task.getRepositoryUrl(),
- task.getTaskId());
-
- assertNotNull(task);
- assertNotNull(taskData);
- TasksUiPlugin.getSynchronizationManager().setTaskRead(task, true);
- assertEquals(RepositoryTaskSyncState.SYNCHRONIZED, task.getSynchronizationState());
- assertEquals(taskNumber, taskData.getId());
- 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);
- try {
- client.postAttachment(attachment.getReport().getId(), attachment.getComment(), attachment);
- 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(RepositoryTaskSyncState.SYNCHRONIZED, task.getSynchronizationState());
- task = (BugzillaTask) connector.createTaskFromExistingId(repository, taskNumber, new NullProgressMonitor());
- TasksUiPlugin.getSynchronizationManager().synchronize(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().getId(), attachment.getComment(), attachment);
- fail();
- } catch (Exception e) {
- }
- task = (BugzillaTask) connector.createTaskFromExistingId(repository, taskNumber, new NullProgressMonitor());
- TasksUiPlugin.getSynchronizationManager().synchronize(connector, task, true, null);
- taskData = TasksUiPlugin.getTaskDataManager().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().getId(), attachment.getComment(), attachment);
-
- task = (BugzillaTask) connector.createTaskFromExistingId(repository, taskNumber, new NullProgressMonitor());
- TasksUiPlugin.getSynchronizationManager().synchronize(connector, task, true, null);
- taskData = TasksUiPlugin.getTaskDataManager().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.getTaskDataManager().getEditableCopy(task4.getRepositoryUrl(),
- task4.getTaskId());
- assertNotNull(task4);
- assertNotNull(taskData4);
- assertEquals(RepositoryTaskSyncState.SYNCHRONIZED, task4.getSynchronizationState());
- assertEquals(taskID, taskData4.getId());
-
- BugzillaTask task5 = generateLocalTaskAndDownload("5");
- RepositoryTaskData taskData5 = TasksUiPlugin.getTaskDataManager().getEditableCopy(task5.getRepositoryUrl(),
- task5.getTaskId());
- assertNotNull(task5);
- assertNotNull(taskData5);
- assertEquals(RepositoryTaskSyncState.SYNCHRONIZED, task5.getSynchronizationState());
- assertEquals("5", taskData5.getId());
-
- Set<AbstractTask> tasks = new HashSet<AbstractTask>();
- 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());
-
- boolean changed = connector.markStaleTasks(repository, tasks, new NullProgressMonitor());
- assertTrue(changed);
- // 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);
-
- changed = connector.markStaleTasks(repository, tasks, new NullProgressMonitor());
-
- assertTrue(task4.isStale());
- assertTrue(task5.isStale());
-
- TasksUiPlugin.getSynchronizationManager().synchronize(connector, tasks, true, null);
-
- for (AbstractTask 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.getTaskDataManager().getNewTaskData(task7.getRepositoryUrl(),
- task7.getTaskId());
- assertNotNull(recentTaskData);
- TasksUiPlugin.getSynchronizationManager().setTaskRead(task7, true);
- assertEquals(RepositoryTaskSyncState.SYNCHRONIZED, task7.getSynchronizationState());
- assertEquals("7", recentTaskData.getId());
-
- Set<AbstractTask> tasks = new HashSet<AbstractTask>();
- tasks.add(task7);
-
- TasksUiPlugin.getRepositoryManager().setSynchronizationTime(repository, task7.getLastReadTimeStamp(),
- TasksUiPlugin.getDefault().getRepositoriesFilePath());
-
- assertNotNull(TasksUiPlugin.getTaskDataManager().getNewTaskData(IBugzillaConstants.TEST_BUGZILLA_222_URL, "7"));
- TasksUiPlugin.getTaskDataManager().remove(task7.getRepositoryUrl(), task7.getTaskId());
-
- assertNull(TasksUiPlugin.getTaskDataManager().getNewTaskData(IBugzillaConstants.TEST_BUGZILLA_222_URL, "7"));
-
- assertEquals(RepositoryTaskSyncState.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);
- }
- // REMOVE ALL TASK DATA
- TasksUiPlugin.getTaskDataManager().clear();
- connector.getTaskDataHandler().postTaskData(repository, recentTaskData, new NullProgressMonitor());
- TasksUiPlugin.getSynchronizationManager().synchronizeChanged(connector, repository);
- assertEquals(RepositoryTaskSyncState.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.getTaskDataManager().getNewTaskData(bugtask.getRepositoryUrl(),
- bugtask.getTaskId());
- assertNotNull(bugtaskdata);
- assertEquals(taskid + "", bugtaskdata.getId());
- assertEquals(RepositoryTaskSyncState.SYNCHRONIZED, bugtask.getSynchronizationState());
-
- Set<AbstractTask> tasks = new HashSet<AbstractTask>();
- tasks.add(bugtask);
-
- // synchAndAssertState(tasks, RepositoryTaskSyncState.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, RepositoryTaskSyncState.SYNCHRONIZED);
-
- bugtaskdata = TasksUiPlugin.getTaskDataManager()
- .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.getTaskDataManager().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.getTaskListManager().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/BugzillaSearchDialogTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaSearchDialogTest.java
deleted file mode 100644
index b7c742a27..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.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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.REPOSITORY_KIND,
- IBugzillaConstants.TEST_BUGZILLA_222_URL,
- IBugzillaConstants.BugzillaServerVersion.SERVER_222.toString());
- manager.addRepository(repo, TasksUiPlugin.getDefault().getRepositoriesFilePath());
- 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 c501be6bf..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaSearchEngineTest.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.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.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.QueryHitCollector;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TaskFactory;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @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.REPOSITORY_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.REPOSITORY_KIND,
- IBugzillaConstants.TEST_BUGZILLA_218_URL,
- IBugzillaConstants.BugzillaServerVersion.SERVER_218.toString());
- TasksUiPlugin.getRepositoryManager().addRepository(repository,
- TasksUiPlugin.getDefault().getRepositoriesFilePath());
- assertEquals(NUM_EXPECTED_HITS, runQuery(IBugzillaConstants.TEST_BUGZILLA_218_URL, SEARCH_DESCRIPTION).size());
- }
-
- public void testSearching220() throws Exception {
- TaskRepository repository = new TaskRepository(BugzillaCorePlugin.REPOSITORY_KIND,
- IBugzillaConstants.TEST_BUGZILLA_220_URL,
- IBugzillaConstants.BugzillaServerVersion.SERVER_220.toString());
- TasksUiPlugin.getRepositoryManager().addRepository(repository,
- TasksUiPlugin.getDefault().getRepositoriesFilePath());
- assertEquals(NUM_EXPECTED_HITS, runQuery(IBugzillaConstants.TEST_BUGZILLA_220_URL, SEARCH_DESCRIPTION).size());
- }
-
- public void testSearching2201() throws Exception {
- TaskRepository repository = new TaskRepository(BugzillaCorePlugin.REPOSITORY_KIND,
- IBugzillaConstants.TEST_BUGZILLA_2201_URL,
- IBugzillaConstants.BugzillaServerVersion.SERVER_220.toString());
- TasksUiPlugin.getRepositoryManager().addRepository(repository,
- TasksUiPlugin.getDefault().getRepositoriesFilePath());
- assertEquals(NUM_EXPECTED_HITS, runQuery(IBugzillaConstants.TEST_BUGZILLA_2201_URL, SEARCH_DESCRIPTION).size());
- }
-
- public void testSearching222() throws Exception {
- TaskRepository repository = new TaskRepository(BugzillaCorePlugin.REPOSITORY_KIND,
- IBugzillaConstants.TEST_BUGZILLA_222_URL,
- IBugzillaConstants.BugzillaServerVersion.SERVER_222.toString());
- TasksUiPlugin.getRepositoryManager().addRepository(repository,
- TasksUiPlugin.getDefault().getRepositoriesFilePath());
- 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.REPOSITORY_KIND, repositoryURL);
- assertNotNull(repository);
-
- final BugzillaRepositoryQuery repositoryQuery = new BugzillaRepositoryQuery(repository.getUrl(),
- repository.getUrl() + BUG_DESC_SUBSTRING_SEARCH + SearchString, QUERY_NAME);
-
- AbstractRepositoryConnector connector = TasksUiPlugin.getRepositoryManager().getRepositoryConnector(
- BugzillaCorePlugin.REPOSITORY_KIND);
-// TaskList taskList = TasksUiPlugin.getTaskListManager().getTaskList();
- QueryHitCollector collector = new QueryHitCollector(new TaskFactory(repository));
-
- connector.performQuery(repositoryQuery, repository, new NullProgressMonitor(), collector);
-
- // 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/BugzillaTaskHyperlinkDetectorTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskHyperlinkDetectorTest.java
deleted file mode 100644
index a4dfe3d9e..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskHyperlinkDetectorTest.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse 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.ui.editors.RepositoryTextViewer;
-import org.eclipse.mylyn.internal.tasks.ui.editors.TaskHyperlinkDetector;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * @author Rob Elves
- */
-public class BugzillaTaskHyperlinkDetectorTest extends TestCase {
-
- private static final String DUPLICATE_NUMBER = "112233";
-
- private static final String DUPLICATE = "duplicate of " + DUPLICATE_NUMBER;
-
- private String TASK_FORMAT_1 = "task#1";
-
- private String TASK_FORMAT_2 = "task# 1";
-
- private String TASK_FORMAT_3 = "task1";
-
- private String TASK_FORMAT_4 = "task #1";
-
- private String BUG_FORMAT_1 = "bug# 1";
-
- private String BUG_FORMAT_2 = "bug # 1";
-
- private String BUG_FORMAT_3 = "bug1";
-
- private String BUG_FORMAT_4 = "bug #1";
-
- private String BUG_FORMAT_1_2 = "bug# 2";
-
- //private BugzillaTaskHyperlinkDetector detector = new BugzillaTaskHyperlinkDetector();
- private TaskHyperlinkDetector detector = new TaskHyperlinkDetector();
-
- private TaskRepository dummyRepository = new TaskRepository(BugzillaCorePlugin.REPOSITORY_KIND, "repository_url");
-
- private RepositoryTextViewer viewer = new RepositoryTextViewer(dummyRepository, new Shell(), SWT.NONE);
-
- private String[] formats = { 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 setUp() throws Exception {
- super.setUp();
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- 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());
- }
-}
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 98716236f..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskListManagerTest.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.bugzilla.tests;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Collection;
-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.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.TaskRepository;
-import org.eclipse.mylyn.tasks.core.TaskList;
-import org.eclipse.mylyn.tasks.ui.TaskListManager;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @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.REPOSITORY_KIND, IBugzillaConstants.ECLIPSE_BUGZILLA_URL);
- TasksUiPlugin.getRepositoryManager().addRepository(repository,
- TasksUiPlugin.getDefault().getRepositoriesFilePath());
- 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<AbstractTask> tasksReturned = taskList.getRepositoryTasks(repositoryUrl);
- assertNotNull(tasksReturned);
- assertEquals(1, tasksReturned.size());
- for (AbstractTask task : tasksReturned) {
- assertTrue(task.isReminded());
- }
- }
-
- public void testRepositoryTaskExternalization() {
- BugzillaTask repositoryTask = new BugzillaTask("repo", "1", "label");
- repositoryTask.setTaskKind("kind");
- manager.getTaskList().moveToContainer(repositoryTask,
- TasksUiPlugin.getTaskListManager().getTaskList().getDefaultCategory());
- manager.saveTaskList();
-
- manager.resetTaskList();
- // manager.getTaskList().clear();
- // TaskList list = new TaskList();
- // manager.setTaskList(list);
- manager.readExistingOrCreateNewList();
- assertEquals(1, manager.getTaskList().getDefaultCategory().getChildren().size());
- AbstractTask readTask = manager.getTaskList().getDefaultCategory().getChildren().iterator().next();
-
- assertEquals(repositoryTask.getHandleIdentifier(), readTask.getHandleIdentifier());
- assertEquals(repositoryTask.getSummary(), readTask.getSummary());
- assertEquals(repositoryTask.getTaskKind(), readTask.getTaskKind());
- }
-
- public void testQueryExternalization() {
- AbstractRepositoryQuery 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());
- AbstractRepositoryQuery 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 testLegacyTaskListReading() throws IOException {
- File originalFile = manager.getTaskListFile();
- File legacyListFile = new File("temptasklist.xml");
- legacyListFile.deleteOnExit();
- BugzillaTestUtil.copy(BugzillaTestUtil.getLocalFile("testdata/legacy/tasklist_0_4_8.xml"), legacyListFile);
-
- assertEquals(362451, legacyListFile.length());
- assertTrue(legacyListFile.exists());
-
- manager.setTaskListFile(legacyListFile);
- manager.readExistingOrCreateNewList();
- manager.setTaskListFile(originalFile);
-
- Collection<AbstractTask> allTasks = manager.getTaskList().getAllTasks();
- Set<AbstractTask> allRootTasks = manager.getTaskList().getDefaultCategory().getChildren();
- Set<AbstractTaskCategory> allCategories = manager.getTaskList().getCategories();
- Set<AbstractTaskContainer> allRoots = manager.getTaskList().getRootElements();
- assertEquals(0, allRootTasks.size());
-
- manager.saveTaskList();
- // manager.getTaskList().clear();
- manager.resetTaskList();
- // TaskList list = new TaskList();
- // manager.setTaskList(list);
- manager.readExistingOrCreateNewList();
-
- assertEquals(allRootTasks.size(), manager.getTaskList().getDefaultCategory().getChildren().size());
- assertEquals(allCategories, manager.getTaskList().getCategories());
- assertEquals(allRoots.size(), manager.getTaskList().getRootElements().size());
- assertEquals(allTasks.size(), manager.getTaskList().getAllTasks().size());
-
- // rewrite and test again
- manager.saveTaskList();
- // manager.getTaskList().clear();
- manager.resetTaskList();
- // list = new TaskList();
- // manager.setTaskList(list);
- manager.readExistingOrCreateNewList();
-
- assertEquals(allRootTasks.size(), manager.getTaskList().getDefaultCategory().getChildren().size());
- assertEquals(allCategories, manager.getTaskList().getCategories());
- assertEquals(allRoots.size(), manager.getTaskList().getRootElements().size());
- assertEquals(allTasks.size(), manager.getTaskList().getAllTasks().size());
-
- manager.deactivateTask(manager.getTaskList().getActiveTask());
- }
-
- public void testDeleteQuery() {
- AbstractRepositoryQuery query = new BugzillaRepositoryQuery("repositoryUrl", "queryUrl", "label");
- manager.getTaskList().addQuery(query);
-
- AbstractRepositoryQuery readQuery = manager.getTaskList().getQueries().iterator().next();
- assertEquals(query, readQuery);
-
- manager.getTaskList().deleteQuery(query);
- assertEquals(0, manager.getTaskList().getQueries().size());
- }
-
- public void testDeleteQueryAfterRename() {
- AbstractRepositoryQuery query = new BugzillaRepositoryQuery("repositoryUrl", "queryUrl", "label");
- manager.getTaskList().addQuery(query);
-
- AbstractRepositoryQuery 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() {
- AbstractRepositoryQuery query = new BugzillaRepositoryQuery("repositoryUrl", "queryUrl", "label");
- manager.getTaskList().addQuery(query);
- assertEquals(1, manager.getTaskList().getQueries().size());
- AbstractRepositoryQuery 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 27916eebd..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.BugzillaReportElement;
-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.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskAttribute;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.TaskComment;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @author Mik Kersten
- */
-public class BugzillaTaskTest extends TestCase {
-
- private BugzillaAttributeFactory attributeFactory = new BugzillaAttributeFactory();
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- new BugzillaTaskDataHandler((BugzillaRepositoryConnector) TasksUiPlugin.getRepositoryManager()
- .getRepositoryConnector(BugzillaCorePlugin.REPOSITORY_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.REPOSITORY_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(BugzillaReportElement.BUG_WHEN.getKeyString());
- attribute.setValue(nowTimeStamp);
- taskComment.addAttribute(BugzillaReportElement.BUG_WHEN.getKeyString(), attribute);
- taskData.addComment(taskComment);
- assertNull(task.getCompletionDate());
-
- RepositoryTaskAttribute resolvedAttribute = attributeFactory.createAttribute(BugzillaReportElement.BUG_STATUS.getKeyString());
- resolvedAttribute.setValue(IBugzillaConstants.VALUE_STATUS_RESOLVED);
- taskData.addAttribute(BugzillaReportElement.BUG_STATUS.getKeyString(), resolvedAttribute);
- AbstractRepositoryConnector connector = TasksUiPlugin.getRepositoryManager().getRepositoryConnector(
- BugzillaCorePlugin.REPOSITORY_KIND);
- connector.updateTaskFromTaskData(new TaskRepository(BugzillaCorePlugin.REPOSITORY_KIND, "http://eclipse.org"),
- task, taskData);
- assertNotNull(task.getCompletionDate());
- assertEquals(taskData.getAttributeFactory().getDateForAttributeType(
- BugzillaReportElement.BUG_WHEN.getKeyString(), 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 0b9aa30cd..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTestPlugin.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.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 161147940..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/DuplicateDetetionTest.java
+++ /dev/null
@@ -1,271 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse 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.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractNewRepositoryTaskEditor;
-import org.eclipse.mylyn.tasks.ui.editors.NewTaskEditorInput;
-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.REPOSITORY_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.REPOSITORY_KIND, repository.getUrl(), TasksUiPlugin.getTaskDataManager()
- .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.REPOSITORY_KIND, repository.getUrl(), TasksUiPlugin.getTaskDataManager()
- .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(AbstractNewRepositoryTaskEditor.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.REPOSITORY_KIND, repository.getUrl(), TasksUiPlugin.getTaskDataManager()
- .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, AbstractNewRepositoryTaskEditor.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.REPOSITORY_KIND, repository.getUrl(), TasksUiPlugin.getTaskDataManager()
- .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, AbstractNewRepositoryTaskEditor.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.REPOSITORY_KIND, repository.getUrl(), TasksUiPlugin.getTaskDataManager()
- .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, AbstractNewRepositoryTaskEditor.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.REPOSITORY_KIND, repository.getUrl(), TasksUiPlugin.getTaskDataManager()
- .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, AbstractNewRepositoryTaskEditor.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.REPOSITORY_KIND, repository.getUrl(), TasksUiPlugin.getTaskDataManager()
- .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, AbstractNewRepositoryTaskEditor.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.REPOSITORY_KIND, repository.getUrl(), TasksUiPlugin.getTaskDataManager()
- .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, AbstractNewRepositoryTaskEditor.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.REPOSITORY_KIND, repository.getUrl(), TasksUiPlugin.getTaskDataManager()
- .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, AbstractNewRepositoryTaskEditor.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 b3e8c7e7f..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/EncodingTest.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.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.BugzillaReportElement;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaTask;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @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) connector.createTaskFromExistingId(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) connector.createTaskFromExistingId(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");
- BugzillaTask task = (BugzillaTask) connector.createTaskFromExistingId(repository, "57",
- new NullProgressMonitor());
- RepositoryTaskData taskData = TasksUiPlugin.getTaskDataManager().getNewTaskData(task.getRepositoryUrl(),
- task.getTaskId());
- assertNotNull(task);
- assertTrue(task.getSummary().equals("\u00E6"));//"\u05D0"));
- String priority = null;
- if (task.getPriority().equals("P1")) {
- priority = "P2";
- taskData.setAttributeValue(BugzillaReportElement.PRIORITY.getKeyString(), priority);
- } else {
- priority = "P1";
- taskData.setAttributeValue(BugzillaReportElement.PRIORITY.getKeyString(), priority);
- }
-
- submit(task, taskData);
- taskList.deleteTask(task);
- task = (BugzillaTask) connector.createTaskFromExistingId(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 12bea4912..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/NewBugWizardTest.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.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.BugzillaReportElement;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaRepositoryConnector;
-import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-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.REPOSITORY_KIND, IBugzillaConstants.TEST_BUGZILLA_220_URL, "1");
-
- TaskRepository repository = new TaskRepository(BugzillaCorePlugin.REPOSITORY_KIND,
- IBugzillaConstants.TEST_BUGZILLA_220_URL);
- BugzillaRepositoryConnector.setupNewBugAttributes(repository, newReport);
- BugzillaCorePlugin.getDefault().setPlatformOptions(newReport);
-
- String os = Platform.getOS();
- if (os.equals("win32"))
- assertEquals("Windows", newReport.getAttribute(BugzillaReportElement.OP_SYS.getKeyString()).getValue());
- else if (os.equals("solaris"))
- assertEquals("Solaris", newReport.getAttribute(BugzillaReportElement.OP_SYS.getKeyString()).getValue());
- else if (os.equals("qnx"))
- assertEquals("QNX-Photon", newReport.getAttribute(BugzillaReportElement.OP_SYS.getKeyString()).getValue());
- else if (os.equals("macosx"))
- assertEquals("Mac OS", newReport.getAttribute(BugzillaReportElement.OP_SYS.getKeyString()).getValue());
- else if (os.equals("linux"))
- assertEquals("Linux", newReport.getAttribute(BugzillaReportElement.OP_SYS.getKeyString()).getValue());
- else if (os.equals("hpux"))
- assertEquals("HP-UX", newReport.getAttribute(BugzillaReportElement.OP_SYS.getKeyString()).getValue());
- else if (os.equals("aix"))
- assertEquals("AIX", newReport.getAttribute(BugzillaReportElement.OP_SYS.getKeyString()).getValue());
-
- String platform = Platform.getOSArch();
- if (platform.equals("x86")) {
- if (os.equals("macosx"))
- assertEquals("Macintosh", newReport.getAttribute(BugzillaReportElement.REP_PLATFORM.getKeyString())
- .getValue());
- else
- assertEquals("PC", newReport.getAttribute(BugzillaReportElement.REP_PLATFORM.getKeyString()).getValue());
- } else if (platform.equals("x86_64"))
- assertEquals("PC", newReport.getAttribute(BugzillaReportElement.REP_PLATFORM.getKeyString()).getValue());
- else if (platform.equals("ia64"))
- assertEquals("PC", newReport.getAttribute(BugzillaReportElement.REP_PLATFORM.getKeyString()).getValue());
- else if (platform.equals("ia64_32"))
- assertEquals("PC", newReport.getAttribute(BugzillaReportElement.REP_PLATFORM.getKeyString()).getValue());
- else if (platform.equals("sparc"))
- assertEquals("Sun", newReport.getAttribute(BugzillaReportElement.REP_PLATFORM.getKeyString()).getValue());
- else if (platform.equals("ppc")) {
- if (os.equals("macosx"))
- assertEquals("Macintosh", newReport.getAttribute(BugzillaReportElement.REP_PLATFORM.getKeyString())
- .getValue());
- else
- assertEquals("Power", newReport.getAttribute(BugzillaReportElement.REP_PLATFORM.getKeyString())
- .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 0a3b33989..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryEditorWizardTest.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.bugzilla.tests;
-
-import java.net.UnknownHostException;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.wizard.WizardDialog;
-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.ui.wizards.EditRepositoryWizard;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.web.core.WebClientUtil;
-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.REPOSITORY_KIND, IBugzillaConstants.TEST_BUGZILLA_222_URL);
- Credentials credentials = TestUtil.readCredentials();
- repository.setAuthenticationCredentials(credentials.username, credentials.password);
- repository.setAnonymous(false);
- TasksUiPlugin.getRepositoryManager().addRepository(repository,
- TasksUiPlugin.getDefault().getRepositoriesFilePath());
- }
-
- 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 = BugzillaClientFactory.createClient(page.getServerUrl(), page.getUserName(),
- page.getPassword(), page.getHttpAuthUserId(), page.getHttpAuthPassword(),
- WebClientUtil.getPlatformProxy(), page.getCharacterEncoding());
- client.validate();
- } 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 = BugzillaClientFactory.createClient(page.getServerUrl(), page.getUserName(),
- page.getPassword(), page.getHttpAuthUserId(), page.getHttpAuthPassword(),
- WebClientUtil.getPlatformProxy(), page.getCharacterEncoding());
- client.validate();
- } 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://invalid");
- try {
- BugzillaClient client = BugzillaClientFactory.createClient(page.getServerUrl(), page.getUserName(),
- page.getPassword(), page.getHttpAuthUserId(), page.getHttpAuthPassword(),
- WebClientUtil.getPlatformProxy(), page.getCharacterEncoding());
- client.validate();
- } 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 = BugzillaClientFactory.createClient(page.getServerUrl(), page.getUserName(),
- page.getPassword(), page.getHttpAuthUserId(), page.getHttpAuthPassword(),
- WebClientUtil.getPlatformProxy(), page.getCharacterEncoding());
- client.validate();
- page.setUrl(IBugzillaConstants.TEST_BUGZILLA_218_URL);
- wizard.performFinish();
- assertEquals(1, manager.getAllRepositories().size());
- TaskRepository repositoryTest = manager.getRepository(BugzillaCorePlugin.REPOSITORY_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 = BugzillaClientFactory.createClient(page.getServerUrl(), page.getUserName(),
- page.getPassword(), page.getHttpAuthUserId(), page.getHttpAuthPassword(),
- WebClientUtil.getPlatformProxy(), page.getCharacterEncoding());
- client.validate();
- page.setUserId("bogus");
- wizard.performFinish();
- assertEquals(1, manager.getAllRepositories().size());
- TaskRepository repositoryTest = manager.getRepository(BugzillaCorePlugin.REPOSITORY_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 = BugzillaClientFactory.createClient(page.getServerUrl(), page.getUserName(), page.getPassword(),
- page.getHttpAuthUserId(), page.getHttpAuthPassword(), WebClientUtil.getPlatformProxy(),
- page.getCharacterEncoding());
- client.validate();
- } 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 84587230f..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryReportFactoryTest.java
+++ /dev/null
@@ -1,452 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse 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.BugzillaAttributeFactory;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaClient;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaReportElement;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaRepositoryConnector;
-import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants;
-import org.eclipse.mylyn.tasks.core.AbstractTaskDataHandler;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskAttribute;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @author Rob Elves
- * @author Mik Kersten
- */
-public class RepositoryReportFactoryTest extends TestCase {
-
- BugzillaAttributeFactory attributeFactory = new BugzillaAttributeFactory();
-
- TaskRepository repository;
-
- BugzillaRepositoryConnector connector;
-
- private RepositoryTaskData init(String taskId) throws CoreException {
- AbstractTaskDataHandler handler = connector.getTaskDataHandler();
- RepositoryTaskData taskData = handler.getTaskData(repository, taskId, new NullProgressMonitor());
- return taskData;
- }
-
- private TaskRepository setRepository(String kind, String url) {
- connector = (BugzillaRepositoryConnector) TasksUiPlugin.getRepositoryManager().getRepositoryConnector(
- BugzillaCorePlugin.REPOSITORY_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.REPOSITORY_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.REPOSITORY_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.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("search-match-test 1", report.getSummary());
- assertEquals("search-match-test 1", report.getDescription());
- assertEquals("TestProduct", report.getAttribute(BugzillaReportElement.PRODUCT.getKeyString()).getValue());
- assertEquals("TestProduct", report.getProduct());
- 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("P1", report.getAttribute(BugzillaReportElement.PRIORITY.getKeyString()).getValue());
- assertEquals("normal", report.getAttribute(BugzillaReportElement.BUG_SEVERITY.getKeyString()).getValue());
- assertEquals("" + bugid, report.getAttribute(BugzillaReportElement.BUG_ID.getKeyString()).getValue());
- assertEquals("NEW", report.getAttribute(BugzillaReportElement.BUG_STATUS.getKeyString()).getValue());
- assertEquals("2006-05-23 17:46", report.getAttribute(BugzillaReportElement.CREATION_TS.getKeyString())
- .getValue());
- assertEquals("2007-05-08 12:44:41", 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("nhapke@cs.ubc.ca", report.getAttribute(BugzillaReportElement.ASSIGNED_TO.getKeyString())
- .getValue());
- assertEquals(2, report.getComments().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.REPOSITORY_KIND, IBugzillaConstants.TEST_BUGZILLA_2201_URL);
- RepositoryTaskData report = init(bugid);
-
- assertNotNull(report);
- assertEquals("1", report.getAttribute(BugzillaReportElement.BUG_ID.getKeyString()).getValue());
- assertEquals("search-match-test 1", 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 18:13", report.getAttribute(BugzillaReportElement.CREATION_TS.getKeyString())
- .getValue());
- assertEquals("2006-05-03 13:06:11", report.getAttribute(BugzillaReportElement.DELTA_TS.getKeyString())
- .getValue());
- assertEquals("---", report.getAttribute(BugzillaReportElement.TARGET_MILESTONE.getKeyString()).getValue());
- RepositoryTaskAttribute attribute = report.getAttribute(BugzillaReportElement.BLOCKED.getKeyString());
- assertEquals("2, 9", attribute.getValue());
- attribute = report.getAttribute(BugzillaReportElement.CC.getKeyString());
- 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.getAttribute(BugzillaReportElement.REPORTER.getKeyString()).getValue());
- assertEquals("relves@cs.ubc.ca", report.getAttribute(BugzillaReportElement.ASSIGNED_TO.getKeyString())
- .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.REPOSITORY_KIND, IBugzillaConstants.TEST_BUGZILLA_218_URL);
- RepositoryTaskData report = init(bugid);
- assertNotNull(report);
- assertEquals("1", report.getAttribute(BugzillaReportElement.BUG_ID.getKeyString()).getValue());
- assertEquals("search-match-test 1", 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 XP", 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 18:09", report.getAttribute(BugzillaReportElement.CREATION_TS.getKeyString())
- .getValue());
- assertEquals("2006-05-05 17:45:24", 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(0, report.getAttachments().size());
- }
-
- public void testTimeTracking222() throws Exception {
- setRepository(BugzillaCorePlugin.REPOSITORY_KIND, IBugzillaConstants.TEST_BUGZILLA_222_URL);
- RepositoryTaskData report = init("11");
- assertEquals("7.50", report.getAttribute(BugzillaReportElement.ESTIMATED_TIME.getKeyString()).getValue());
- assertEquals("4.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 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.REPOSITORY_KIND, IBugzillaConstants.TEST_BUGZILLA_218_URL);
- RepositoryTaskData report = init("19");
- 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());
- }
-
- public void testMultipleDepensOn() throws Exception {
- String bugid = "5";
- setRepository(BugzillaCorePlugin.REPOSITORY_KIND, IBugzillaConstants.TEST_BUGZILLA_218_URL);
- RepositoryTaskData report = init(bugid);
- assertNotNull(report);
- assertEquals("5", report.getAttribute(BugzillaReportElement.BUG_ID.getKeyString()).getValue());
- assertEquals("6, 7", report.getAttribute(BugzillaReportElement.DEPENDSON.getKeyString()).getValue());
- assertEquals("13, 14", report.getAttribute(BugzillaReportElement.BLOCKED.getKeyString()).getValue());
- }
-
- public void testBugReportAPI() throws Exception {
- String bugid = "3";
- setRepository(BugzillaCorePlugin.REPOSITORY_KIND, IBugzillaConstants.TEST_BUGZILLA_222_URL);
- RepositoryTaskData report = init(bugid);
- assertNotNull(report);
- assertTrue(report != null);
- RepositoryTaskData bugReport = report;
- assertEquals("search-match-test 2", bugReport.getSummary());
- assertEquals("search-match-test 2", bugReport.getDescription());
- assertEquals("TestProduct", bugReport.getProduct());
- assertEquals("nhapke@cs.ubc.ca", bugReport.getAssignedTo());
- }
-
- 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 a21eaf6c7..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryTaskHandleTest.java
+++ /dev/null
@@ -1,74 +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.tasks.ui.TaskListManager;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @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 repository = IBugzillaConstants.ECLIPSE_BUGZILLA_URL;
- String id = "123";
- BugzillaTask bugTask = new BugzillaTask(repository, id, "label 124");
- assertEquals(repository, bugTask.getRepositoryUrl());
-
- manager.getTaskList().moveToContainer(bugTask,
- TasksUiPlugin.getTaskListManager().getTaskList().getDefaultCategory());
- manager.saveTaskList();
- manager.resetTaskList();
- manager.readExistingOrCreateNewList();
-
- BugzillaTask readReport = (BugzillaTask) manager.getTaskList()
- .getDefaultCategory()
- .getChildren()
- .iterator()
- .next();
- assertEquals(readReport.getSummary(), readReport.getSummary());
- assertEquals(readReport.getRepositoryUrl(), readReport.getRepositoryUrl());
- }
-}
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 73b543e75..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskEditorTest.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.BugzillaAttributeFactory;
-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.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractRepositoryTaskEditor;
-import org.eclipse.mylyn.tasks.ui.editors.NewTaskEditorInput;
-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.REPOSITORY_KIND,
- IBugzillaConstants.TEST_BUGZILLA_222_URL);
-
- RepositoryTaskData model = new RepositoryTaskData(new BugzillaAttributeFactory(),
- BugzillaCorePlugin.REPOSITORY_KIND, repository.getUrl(), TasksUiPlugin.getTaskDataManager()
- .getNewRepositoryTaskId());
- model.setNew(true);
- BugzillaRepositoryConnector.setupNewBugAttributes(repository, model);
- 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());
- }
-
-}
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 4278863b9..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskListNotificationManagerTest.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.bugzilla.tests;
-
-import java.util.Date;
-
-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.tasks.core.LocalTask;
-import org.eclipse.mylyn.internal.tasks.ui.ITaskListNotification;
-import org.eclipse.mylyn.internal.tasks.ui.TaskListNotificationIncoming;
-import org.eclipse.mylyn.internal.tasks.ui.TaskListNotificationManager;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.AbstractTask.RepositoryTaskSyncState;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @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 {
-
- Date now = new Date();
-
- 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(new Date(now.getTime() - 2000));
- task1.setScheduledForDate(new Date(now.getTime() - 2000));
- task2.setScheduledForDate(new Date(now.getTime() - 2000));
-
- TasksUiPlugin.getTaskListManager().getTaskList().addTask(task0);
- TasksUiPlugin.getTaskListManager().getTaskList().addTask(task1);
- TasksUiPlugin.getTaskListManager().getTaskList().addTask(task2);
-
- TaskListNotificationManager notificationManager = TasksUiPlugin.getTaskListNotificationManager();
- notificationManager.collectNotifications();
-
- task0 = TasksUiPlugin.getTaskListManager().getTaskList().getTask("local-0");
- assertNotNull(task0);
- assertTrue(task0.isReminded());
- task1 = TasksUiPlugin.getTaskListManager().getTaskList().getTask("local-1");
- assertNotNull(task1);
- assertTrue(task1.isReminded());
- task2 = TasksUiPlugin.getTaskListManager().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,
- TasksUiPlugin.getDefault().getRepositoriesFilePath());
- AbstractTask task = new BugzillaTask("https://bugs.eclipse.org/bugs", "142891", "label");
- assertEquals(RepositoryTaskSyncState.SYNCHRONIZED, task.getSynchronizationState());
- assertFalse(task.isNotified());
- TasksUiPlugin.getTaskListManager().getTaskList().addTask(task);
- TaskListNotificationManager notificationManager = TasksUiPlugin.getTaskListNotificationManager();
- notificationManager.collectNotifications();
- assertTrue(notificationManager.getNotifications().contains(new TaskListNotificationIncoming(task)));
- task = TasksUiPlugin.getTaskListManager().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.getTaskListManager().getTaskList().addQuery(query);
- TasksUiPlugin.getTaskListManager().getTaskList().addTask(hit, query);
-
- TaskListNotificationManager notificationManager = TasksUiPlugin.getTaskListNotificationManager();
- assertFalse(hit.isNotified());
- notificationManager.collectNotifications();
- for (ITaskListNotification 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.getTaskListManager().getTaskList().addQuery(query);
- TasksUiPlugin.getTaskListManager().getTaskList().addTask(hit, query);
- TaskListNotificationManager notificationManager = TasksUiPlugin.getTaskListNotificationManager();
- notificationManager.collectNotifications();
- for (ITaskListNotification 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.getTaskListManager().getTaskList().getQueries().size());
- assertTrue(TasksUiPlugin.getTaskListManager().readExistingOrCreateNewList());
- assertEquals(1, TasksUiPlugin.getTaskListManager().getTaskList().getQueries().size());
- BugzillaTask hitLoaded = (BugzillaTask) TasksUiPlugin.getTaskListManager().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 e43e3d3d4..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskListStandaloneTest.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.bugzilla.tests;
-
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.List;
-import java.util.Set;
-
-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.LocalTask;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskListFactory;
-import org.eclipse.mylyn.tasks.ui.TaskListManager;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @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().moveToContainer(task, manager.getTaskList().getDefaultCategory());
- assertEquals(1, manager.getTaskList().getAllTasks().size());
-
- manager.saveTaskList();
- manager.resetTaskList();
- manager.readExistingOrCreateNewList();
- assertEquals(1, manager.getTaskList().getAllTasks().size());
- Set<AbstractTask> readList = manager.getTaskList().getDefaultCategory().getChildren();
- AbstractTask readTask = readList.iterator().next();
- assertTrue(readTask.getSummary().equals("task 1"));
- assertTrue(readTask.getDueDate().compareTo(dueDate) == 0);
- }
-
- public void testPastReminder() {
- AbstractTask task = new LocalTask("1", "1");
- long now = new Date().getTime();
- task.setScheduledForDate(new Date(now - 1000));
- assertTrue(task.isPastReminder());
-
- task.setScheduledForDate(new Date(now + 1000));
- assertFalse(task.isPastReminder());
-
- task.setScheduledForDate(new Date(now - 1000));
- task.setCompleted(true);
- assertTrue(task.isPastReminder());
- }
-
- public void testDates() {
- Date start = Calendar.getInstance().getTime();
- Date creation = new Date();
- AbstractTask task = new LocalTask("1", "task 1");
-
- manager.getTaskList().moveToContainer(task, manager.getTaskList().getDefaultCategory());
- assertDatesCloseEnough(task.getCreationDate(), start);
-
- task.setCompleted(true);
- assertDatesCloseEnough(task.getCompletionDate(), start);
-
- task.setScheduledForDate(start);
- assertDatesCloseEnough(task.getScheduledForDate(), start);
-
- assertEquals(2, 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());
-
- Set<AbstractTask> readList = manager.getTaskList().getDefaultCategory().getChildren();
- AbstractTask readTask = 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/TaskReportGeneratorTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskReportGeneratorTest.java
deleted file mode 100644
index 36ce50e9e..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskReportGeneratorTest.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse 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.lang.reflect.InvocationTargetException;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.Set;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaRepositoryQuery;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaTask;
-import org.eclipse.mylyn.internal.tasks.core.TaskCategory;
-import org.eclipse.mylyn.internal.tasks.ui.planner.CompletedTaskCollector;
-import org.eclipse.mylyn.internal.tasks.ui.planner.TaskReportGenerator;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.tasks.ui.TaskListManager;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @author Mik Kersten
- * @author Rob Elves
- */
-public class TaskReportGeneratorTest extends TestCase {
-
- private TaskListManager manager;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- manager = TasksUiPlugin.getTaskListManager();
- manager.resetTaskList();
- assertEquals(0, manager.getTaskList().getAllTasks().size());
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
- manager.resetTaskList();
- TasksUiPlugin.getTaskListManager().saveTaskList();
-// TasksUiPlugin.getDefault().getTaskListSaveManager().saveTaskList(true);
- assertEquals(0, manager.getTaskList().getAllTasks().size());
- }
-
- public void testCompletedTasksRetrieved() throws InvocationTargetException, InterruptedException {
- AbstractTask task1 = manager.createNewLocalTask("task 1");
- manager.getTaskList().moveToContainer(task1, manager.getTaskList().getDefaultCategory());
-
- CompletedTaskCollector collector = new CompletedTaskCollector(new Date(0), new Date());
- TaskReportGenerator generator = new TaskReportGenerator(manager.getTaskList());
- generator.addCollector(collector);
- generator.run(new NullProgressMonitor());
- assertEquals(0, generator.getAllCollectedTasks().size());
-
- task1.setCompleted(true);
- collector = new CompletedTaskCollector(new Date(0), new Date());
- generator = new TaskReportGenerator(manager.getTaskList());
- generator.addCollector(collector);
- generator.run(new NullProgressMonitor());
- assertEquals(1, generator.getAllCollectedTasks().size());
- assertEquals(task1, generator.getAllCollectedTasks().get(0));
- }
-
- public void testCompletedTasksDateBoundsRetrieved() throws InvocationTargetException, InterruptedException {
- AbstractTask task1 = manager.createNewLocalTask("task 1");
- manager.getTaskList().moveToContainer(task1, manager.getTaskList().getDefaultCategory());
- task1.setCompleted(true);
- Thread.sleep(1000);
- long now = new Date().getTime();
-
- CompletedTaskCollector collector = new CompletedTaskCollector(new Date(now), new Date());
- TaskReportGenerator generator = new TaskReportGenerator(manager.getTaskList());
- generator.addCollector(collector);
- generator.run(new NullProgressMonitor());
- assertEquals(0, generator.getAllCollectedTasks().size());
-
- generator = new TaskReportGenerator(manager.getTaskList());
- collector = new CompletedTaskCollector(new Date(now - 8000), new Date());
- generator.addCollector(collector);
- generator.run(new NullProgressMonitor());
- assertEquals(1, generator.getAllCollectedTasks().size());
- assertEquals(task1, generator.getAllCollectedTasks().get(0));
- }
-
- public void testCompletedBugzillaTasksRetrieved() throws InvocationTargetException, InterruptedException {
- BugzillaTask task1 = new BugzillaTask("repo", "1", "bugzillatask 1");
- manager.getTaskList().moveToContainer(task1, manager.getTaskList().getDefaultCategory());
-
- CompletedTaskCollector collector = new CompletedTaskCollector(new Date(0), new Date());
- TaskReportGenerator generator = new TaskReportGenerator(manager.getTaskList());
- generator.addCollector(collector);
- generator.run(new NullProgressMonitor());
- assertEquals(0, generator.getAllCollectedTasks().size());
-
- task1.setCompleted(true);
- generator.run(new NullProgressMonitor());
- assertEquals(1, generator.getAllCollectedTasks().size());
- assertEquals(task1, generator.getAllCollectedTasks().get(0));
- }
-
- public void testCompletedTasksInCategoryRetrieved() throws InvocationTargetException, InterruptedException {
- AbstractTask task1 = manager.createNewLocalTask("task 1");
- manager.getTaskList().moveToContainer(task1, manager.getTaskList().getDefaultCategory());
- task1.setCompleted(true);
- TaskCategory cat1 = new TaskCategory("TaskReportGeneratorTest Category");
- manager.getTaskList().addCategory(cat1);
-
- Set<AbstractTaskContainer> catagories = new HashSet<AbstractTaskContainer>();
- catagories.add(cat1);
-
- CompletedTaskCollector collector = new CompletedTaskCollector(new Date(0), new Date());
- TaskReportGenerator generator = new TaskReportGenerator(manager.getTaskList(), catagories);
- generator.addCollector(collector);
- generator.run(new NullProgressMonitor());
- assertEquals(0, generator.getAllCollectedTasks().size());
-
- manager.getTaskList().moveToContainer(task1, cat1);
-
- generator.run(new NullProgressMonitor());
- assertEquals(1, generator.getAllCollectedTasks().size());
- assertEquals(task1, generator.getAllCollectedTasks().get(0));
- }
-
- public void testCompletedBugzillaTasksInCategoryRetrieved() throws InvocationTargetException, InterruptedException {
- BugzillaTask task1 = new BugzillaTask("repo", "1", "task 1");
- manager.getTaskList().moveToContainer(task1,
- TasksUiPlugin.getTaskListManager().getTaskList().getDefaultCategory());
- task1.setCompleted(true);
- TaskCategory cat1 = new TaskCategory("TaskReportGeneratorTest Category");
- manager.getTaskList().addCategory(cat1);
-
- Set<AbstractTaskContainer> catagories = new HashSet<AbstractTaskContainer>();
- catagories.add(cat1);
-
- CompletedTaskCollector collector = new CompletedTaskCollector(new Date(0), new Date());
- TaskReportGenerator generator = new TaskReportGenerator(manager.getTaskList(), catagories);
- generator.addCollector(collector);
- generator.run(new NullProgressMonitor());
- assertEquals(0, generator.getAllCollectedTasks().size());
-
- manager.getTaskList().moveToContainer(task1, cat1);
-
- generator.run(new NullProgressMonitor());
- assertEquals(1, generator.getAllCollectedTasks().size());
- assertEquals(task1, generator.getAllCollectedTasks().get(0));
- }
-
- public void testCompletedBugzillaTasksInQueryRetrieved() throws InvocationTargetException, InterruptedException {
- BugzillaTask task1 = new BugzillaTask("repo", "1", "task 1");
- manager.getTaskList().moveToContainer(task1,
- TasksUiPlugin.getTaskListManager().getTaskList().getDefaultCategory());
- task1.setCompleted(false);
-
- BugzillaRepositoryQuery bugQuery = new BugzillaRepositoryQuery("repositoryUrl", "queryUrl",
- "TaskReportGeneratorBugzillaQueryCategory");
-
- manager.getTaskList().addQuery(bugQuery);
-
- Set<AbstractTaskContainer> catagories = new HashSet<AbstractTaskContainer>();
- catagories.add(bugQuery);
-
- CompletedTaskCollector collector = new CompletedTaskCollector(new Date(0), new Date());
- TaskReportGenerator generator = new TaskReportGenerator(manager.getTaskList(), catagories);
- generator.addCollector(collector);
- generator.run(new NullProgressMonitor());
- assertEquals(0, generator.getAllCollectedTasks().size());
-
- manager.getTaskList().addTask(task1, bugQuery);
-
- generator.run(new NullProgressMonitor());
- assertEquals(0, generator.getAllCollectedTasks().size());
-
- task1.setCompleted(true);
-
- generator.run(new NullProgressMonitor());
- assertEquals(1, generator.getAllCollectedTasks().size());
- assertEquals(task1, generator.getAllCollectedTasks().get(0));
- }
-
-}
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 b26e79e87..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/headless/BugzillaQueryTest.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.bugzilla.tests.headless;
-
-import junit.framework.TestCase;
-
-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.BugzillaCorePlugin;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaReportElement;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaRepositoryConnector;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaRepositoryQuery;
-import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskDataHandler;
-import org.eclipse.mylyn.tasks.core.QueryHitCollector;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.TaskList;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TaskFactory;
-
-// 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 BugzillaRepositoryConnector connector;
-
- private AbstractTaskDataHandler handler;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- //
- // connector = (BugzillaRepositoryConnector)
- // TasksUiPlugin.getRepositoryManager().getRepositoryConnector(
- // BugzillaCorePlugin.REPOSITORY_KIND);
-
- connector = new BugzillaRepositoryConnector();
- connector.init(new TaskList());
- handler = connector.getTaskDataHandler();
- repository = new TaskRepository(BugzillaCorePlugin.REPOSITORY_KIND, IBugzillaConstants.TEST_BUGZILLA_222_URL);
- Credentials credentials = TestUtil.readCredentials();
- repository.setAuthenticationCredentials(credentials.username, credentials.password);
- }
-
- /**
- * 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());
- }
- }
-
- public void testGetBug() throws Exception {
- RepositoryTaskData 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.getKeyString()));
- }
-
- // 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()));
- // }
-
- @SuppressWarnings("deprecation")
- public void testQueryViaConnector() throws Exception {
- String queryUrlString = repository.getUrl()
- + "/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
- TaskList taskList = new TaskList();
- QueryHitCollector collector = new QueryHitCollector(new TaskFactory(repository));
- BugzillaRepositoryConnector connector = new BugzillaRepositoryConnector();
- connector.init(taskList);
- BugzillaRepositoryQuery query = new BugzillaRepositoryQuery(repository.getUrl(), queryUrlString, "summary");
- connector.performQuery(query, repository, new NullProgressMonitor(), collector);
- assertEquals(2, collector.getTasks().size());
- for (AbstractTask 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 b4b810753..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/headless/BugzillaTaskHistoryTest.java
+++ /dev/null
@@ -1,161 +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.TaskList;
-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();
- connector.init(new TaskList());
- repository = new TaskRepository(BugzillaCorePlugin.REPOSITORY_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);
- assertNotNull(client);
- TaskHistory history = client.getHistory("1");
- 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);
- assertNotNull(client);
- TaskHistory history = client.getHistory("1");
- 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);
- assertNotNull(client);
- TaskHistory history = client.getHistory("1");
- 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);
- assertNotNull(client);
- TaskHistory history = client.getHistory(REPORT_ID);
- 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);
- assertNotNull(client);
- TaskHistory history = client.getHistory(REPORT_ID);
- 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/test-attach-1181009324093.txt b/org.eclipse.mylyn.bugzilla.tests/test-attach-1181009324093.txt
deleted file mode 100644
index bdf08de0f..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/test-attach-1181009324093.txt
+++ /dev/null
@@ -1 +0,0 @@
-test file \ No newline at end of file
diff --git a/org.eclipse.mylyn.bugzilla.tests/test-attach-1182233735875.txt b/org.eclipse.mylyn.bugzilla.tests/test-attach-1182233735875.txt
deleted file mode 100644
index bdf08de0f..000000000
--- a/org.eclipse.mylyn.bugzilla.tests/test-attach-1182233735875.txt
+++ /dev/null
@@ -1 +0,0 @@
-test file \ No newline at end of file
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 a01a39733..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/.classpath
+++ /dev/null
@@ -1,20 +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"/>
- <accessrule kind="accessible" pattern="**/mylyn/internal/bugzilla/**"/>
- <accessrule kind="discouraged" pattern="**/mylyn/**/internal/**"/>
- <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.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 2ef9c27a9..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/.project
+++ /dev/null
@@ -1,28 +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>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</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 888de1277..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,316 +0,0 @@
-#Sun Jun 24 11:52:58 EDT 2007
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.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=disabled
-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.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.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
-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=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-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.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.5
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=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_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 \ No newline at end of file
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 1e4caec9f..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,6 +0,0 @@
-#Mon Jul 09 18:11:45 PDT 2007
-eclipse.preferences.version=1
-formatter_profile=_Mylar based on Eclipse [built-in]
-formatter_settings_version=11
-internal.default.compliance=default
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return the ${bare_field_name}\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} the ${bare_field_name} to set\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\r\n * \r\n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author ${user}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*******************************************************************************\r\n * Copyright (c) 2004, 2007 Mylyn project committers and others.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n *******************************************************************************/\r\n\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ignore\r\n${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ignore</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template></templates>
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.mylar.tasklist.prefs b/org.eclipse.mylyn.bugzilla.ui/.settings/org.eclipse.mylar.tasklist.prefs
deleted file mode 100644
index a6cf96a98..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/.settings/org.eclipse.mylar.tasklist.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Fri Oct 20 16:54:30 PDT 2006
-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.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 769b229ff..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/.settings/org.eclipse.pde.prefs
+++ /dev/null
@@ -1,12 +0,0 @@
-#Thu Nov 03 15:45:55 PST 2005
-compilers.p.deprecated=2
-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-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 02c968a86..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,31 +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: 2.1.0.v20070924-2200
-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.search,
- org.eclipse.ui.views,
- org.eclipse.ui.ide,
- org.eclipse.ui.forms,
- org.eclipse.jface.text,
- org.eclipse.ui.editors,
- org.eclipse.ui.workbench.texteditor,
- org.eclipse.update.ui,
- org.eclipse.mylyn.bugzilla.core,
- org.eclipse.mylyn.tasks.ui,
- org.eclipse.mylyn.tasks.core,
- org.eclipse.mylyn.monitor.core
-Eclipse-AutoStart: true
-Export-Package: org.eclipse.mylyn.internal.bugzilla.ui,
- org.eclipse.mylyn.internal.bugzilla.ui.editor,
- org.eclipse.mylyn.internal.bugzilla.ui.search,
- org.eclipse.mylyn.internal.bugzilla.ui.tasklist,
- org.eclipse.mylyn.internal.bugzilla.ui.wizard
-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 6fa9af36b..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/build.properties
+++ /dev/null
@@ -1,19 +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 = src/,\
- plugin.xml,\
- META-INF/,\
- about.html,\
- icons/
-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 b7fe62a0d..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/plugin.xml
+++ /dev/null
@@ -1,39 +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"
- type="bugzilla"/>
-
- <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"/>
-
- <taskListFactory
- class="org.eclipse.mylyn.internal.bugzilla.ui.tasklist.BugzillaTaskListFactory"
- id="org.eclipse.mylyn.bugzilla.tasklist.factory"/>
- </extension>
-
- <extension
- point="org.eclipse.mylyn.tasks.ui.editors">
- <editorFactory class="org.eclipse.mylyn.internal.bugzilla.ui.tasklist.BugzillaTaskEditorFactory"/>
- </extension>
-
- <extension
- point="org.eclipse.ui.perspectiveExtensions">
- <perspectiveExtension targetID="org.eclipse.jdt.ui.JavaPerspective">
- <newWizardShortcut id="org.eclipse.mylyn.bugzilla.bugWizard"/>
- </perspectiveExtension>
- </extension>
-
-</plugin>
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaAuthenticator.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaAuthenticator.java
deleted file mode 100644
index 239b727ef..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaAuthenticator.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.bugzilla.ui;
-
-import java.net.Authenticator;
-import java.net.InetAddress;
-import java.net.PasswordAuthentication;
-
-import org.eclipse.update.internal.ui.security.Authentication;
-import org.eclipse.update.internal.ui.security.UserValidationDialog;
-
-/**
- * Update Manager Authenticator Sadly there can only be one registered per VM
- */
-public class BugzillaAuthenticator extends Authenticator {
- // private Authentication savedPasswordAuthentication;
-
- /*
- * @see Authenticator#getPasswordAuthentication()
- */
- @Override
- protected PasswordAuthentication getPasswordAuthentication() {
- // String protocol = getRequestingProtocol();
- String host = getRequestingHost(); // can be null;
- InetAddress address = getRequestingSite(); // can be null;
- // int port = getRequestingPort();
- String prompt = getRequestingPrompt(); // realm or message, not
- // documented that can be null
- // String scheme = getRequestingScheme(); // not documented that can be
- // null
-
- String hostString = host;
- if (hostString == null && address != null) {
- address.getHostName();
- }
- if (hostString == null) {
- hostString = ""; //$NON-NLS-1$
- }
- String promptString = prompt;
- if (prompt == null) {
- promptString = ""; //$NON-NLS-1$
- }
-
- Authentication auth = UserValidationDialog.getAuthentication(hostString, promptString);
- if (auth != null)
- return new PasswordAuthentication(auth.getUser(), auth.getPassword().toCharArray());
- else
- return null;
- }
-}
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 f1758d48a..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.tasks.core.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 1560ebdf9..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaCompareNode.java
+++ /dev/null
@@ -1,283 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public 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 java.util.Iterator;
-
-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.BugzillaReportElement;
-import org.eclipse.mylyn.tasks.core.TaskComment;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskAttribute;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-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.getId(), 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 (Iterator<TaskComment> iter = bug.getComments().iterator(); iter.hasNext();) {
- TaskComment taskComment = iter.next();
- String bodyString = "Comment from " + taskComment.getAuthorName() + ":\n\n" + taskComment.getText();
- comments.addChild(new BugzillaCompareNode(
- taskComment.getAttributeValue(BugzillaReportElement.BUG_WHEN.getKeyString()), 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;
- }
-
-// 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 dc28e5af3..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaCompareStructureCreator.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.bugzilla.ui;
-
-import org.eclipse.compare.structuremergeviewer.IStructureComparator;
-import org.eclipse.compare.structuremergeviewer.IStructureCreator;
-import org.eclipse.mylyn.tasks.core.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 7f2ec6e0b..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaImages.java
+++ /dev/null
@@ -1,94 +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/BugzillaUiPlugin.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiPlugin.java
deleted file mode 100644
index b1d4757c9..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiPlugin.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.bugzilla.ui;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.preference.IPreferenceStore;
-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.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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 = ':';
-
- 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) TasksUiPlugin.getRepositoryManager()
- .getRepositoryConnector(BugzillaCorePlugin.REPOSITORY_KIND);
-
- TasksUiPlugin.getRepositoryManager().addListener(bugzillaConnector.getClientManager());
- }
-
- /**
- * 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) TasksUiPlugin.getRepositoryManager()
- .getRepositoryConnector(BugzillaCorePlugin.REPOSITORY_KIND);
-
- TasksUiPlugin.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, String repositoryUrl) {
- IPreferenceStore prefs = BugzillaUiPlugin.getDefault().getPreferenceStore();
- if ((prefId.equals(IBugzillaConstants.VALUES_COMPONENT) || prefId.equals(IBugzillaConstants.VALUES_VERSION) || prefId.equals(IBugzillaConstants.VALUES_TARGET))
- && selectedProducts != null) {
- List<String> options = new ArrayList<String>();
- for (String product : selectedProducts) {
- for (String option : convertQueryOptionsToArray(prefs.getString(prefId + PREF_DELIM_REPOSITORY
- + repositoryUrl + PREF_DELIM_REPOSITORY + product))) {
- if (!options.contains(option))
- options.add(option);
- }
- }
- return options.toArray(new String[options.size()]);
- } else {
- return convertQueryOptionsToArray(prefs.getString(prefId + PREF_DELIM_REPOSITORY + repositoryUrl));
- }
- }
-
- private static String queryOptionsToString(List<String> array) {
-
- StringBuffer buffer = new StringBuffer();
- for (String string : array) {
- buffer.append(string);
- buffer.append("!");
- }
-
- return buffer.toString();
- }
-
- private static String[] convertQueryOptionsToArray(String values) {
- // create a new string buffer and array list
- StringBuffer buffer = new StringBuffer();
- List<String> options = new ArrayList<String>();
-
- char[] chars = values.toCharArray();
- for (int i = 0; i < chars.length; i++) {
- if (chars[i] == '!') {
- options.add(buffer.toString());
- buffer = new StringBuffer();
- } else {
- buffer.append(chars[i]);
- }
- }
-
- // create a new string array with the same size as the array list
- String[] array = new String[options.size()];
-
- // put each element from the list into the array
- for (int j = 0; j < options.size(); j++)
- array[j] = options.get(j);
- return array;
- }
-
- public static String getMostRecentQuery() {
- return plugin.getPreferenceStore().getString(IBugzillaConstants.MOST_RECENT_QUERY);
- }
-
- /**
- * Update all of the query options for the bugzilla search page TODO: unify update of search options with update of
- * bug attributes (BugzillaServerFacade.updateBugAttributeOptions)
- */
- public static void updateQueryOptions(TaskRepository repository, IProgressMonitor monitor) {
-
- String repositoryUrl = repository.getUrl();
-
- if (monitor.isCanceled())
- throw new OperationCanceledException();
-
- // TODO: pass monitor along since it is this call that does the work and
- // can hang due to network IO
- RepositoryConfiguration config = null;
- try {
- config = BugzillaCorePlugin.getRepositoryConfiguration(repository, false);
- } catch (Exception e) {
- StatusHandler.fail(e, "Could not retrieve repository configuration for: " + repository, true);
- return;
- }
-
- if (monitor.isCanceled())
- throw new OperationCanceledException();
-
- // get the preferences store so that we can change the data in it
- IPreferenceStore prefs = BugzillaUiPlugin.getDefault().getPreferenceStore();
-
- prefs.setValue(IBugzillaConstants.VALUES_STATUS + PREF_DELIM_REPOSITORY + repositoryUrl,
- queryOptionsToString(config.getStatusValues()));
- monitor.worked(1);
-
- prefs.setValue(IBugzillaConstants.VALUSE_STATUS_PRESELECTED + PREF_DELIM_REPOSITORY + repositoryUrl,
- queryOptionsToString(config.getOpenStatusValues()));
- monitor.worked(1);
-
- prefs.setValue(IBugzillaConstants.VALUES_RESOLUTION + PREF_DELIM_REPOSITORY + repositoryUrl,
- queryOptionsToString(config.getResolutions()));
- monitor.worked(1);
-
- prefs.setValue(IBugzillaConstants.VALUES_SEVERITY + PREF_DELIM_REPOSITORY + repositoryUrl,
- queryOptionsToString(config.getSeverities()));
- monitor.worked(1);
-
- prefs.setValue(IBugzillaConstants.VALUES_PRIORITY + PREF_DELIM_REPOSITORY + repositoryUrl,
- queryOptionsToString(config.getPriorities()));
- monitor.worked(1);
-
- prefs.setValue(IBugzillaConstants.VALUES_HARDWARE + PREF_DELIM_REPOSITORY + repositoryUrl,
- queryOptionsToString(config.getPlatforms()));
- monitor.worked(1);
-
- prefs.setValue(IBugzillaConstants.VALUES_OS + PREF_DELIM_REPOSITORY + repositoryUrl,
- queryOptionsToString(config.getOSs()));
- monitor.worked(1);
-
- prefs.setValue(IBugzillaConstants.VALUES_PRODUCT + PREF_DELIM_REPOSITORY + repositoryUrl,
- queryOptionsToString(config.getProducts()));
- monitor.worked(1);
-
- prefs.setValue(IBugzillaConstants.VALUES_COMPONENT + PREF_DELIM_REPOSITORY + repositoryUrl,
- queryOptionsToString(config.getComponents()));
- monitor.worked(1);
-
- prefs.setValue(IBugzillaConstants.VALUES_VERSION + PREF_DELIM_REPOSITORY + repositoryUrl,
- queryOptionsToString(config.getVersions()));
- monitor.worked(1);
-
- prefs.setValue(IBugzillaConstants.VALUES_TARGET + PREF_DELIM_REPOSITORY + repositoryUrl,
- queryOptionsToString(config.getTargetMilestones()));
- monitor.worked(1);
-
- prefs.setValue(IBugzillaConstants.VALUES_KEYWORDS + PREF_DELIM_REPOSITORY + repositoryUrl,
- queryOptionsToString(config.getKeywords()));
- monitor.worked(1);
-
- for (String product : config.getProducts()) {
- prefs.setValue(IBugzillaConstants.VALUES_COMPONENT + PREF_DELIM_REPOSITORY + repositoryUrl
- + PREF_DELIM_REPOSITORY + product, queryOptionsToString(config.getComponents(product)));
- monitor.worked(1);
-
- prefs.setValue(IBugzillaConstants.VALUES_VERSION + PREF_DELIM_REPOSITORY + repositoryUrl
- + PREF_DELIM_REPOSITORY + product, queryOptionsToString(config.getVersions(product)));
- monitor.worked(1);
-
- prefs.setValue(IBugzillaConstants.VALUES_TARGET + PREF_DELIM_REPOSITORY + repositoryUrl
- + PREF_DELIM_REPOSITORY + product, queryOptionsToString(config.getTargetMilestones(product)));
- monitor.worked(1);
- }
- }
-}
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 0de49876c..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditor.java
+++ /dev/null
@@ -1,685 +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.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Calendar;
-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.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaReportElement;
-import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants;
-import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants.BUGZILLA_OPERATION;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.RepositoryOperation;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskAttribute;
-import org.eclipse.mylyn.tasks.ui.AbstractDuplicateDetector;
-import org.eclipse.mylyn.tasks.ui.DatePicker;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractRepositoryTaskEditor;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;
-import org.eclipse.mylyn.tasks.ui.search.SearchHitCollector;
-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.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.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";
-
- 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 void createCustomAttributeLayout(Composite composite) {
-
- RepositoryTaskAttribute attribute = this.taskData.getAttribute(BugzillaReportElement.DEPENDSON.getKeyString());
- 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(BugzillaReportElement.BLOCKED.getKeyString());
- 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(BugzillaReportElement.DEPENDSON.getKeyString());
- String blocked = taskData.getAttributeValue(BugzillaReportElement.BLOCKED.getKeyString());
- boolean addHyperlinks = (dependson != null && dependson.length() > 0)
- || (blocked != null && blocked.length() > 0);
-
- if (addHyperlinks) {
- getManagedForm().getToolkit().createLabel(composite, "");
- addBugHyperlinks(composite, BugzillaReportElement.DEPENDSON.getKeyString());
- }
-
- if (addHyperlinks) {
- getManagedForm().getToolkit().createLabel(composite, "");
- addBugHyperlinks(composite, BugzillaReportElement.BLOCKED.getKeyString());
- }
-
- attribute = this.taskData.getAttribute(BugzillaReportElement.BUG_FILE_LOC.getKeyString());
- if (attribute != null && !attribute.isReadOnly()) {
- Label label = createLabel(composite, attribute);
- GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(label);
- Text urlField = createTextField(composite, attribute, SWT.FLAT);
- GridDataFactory.fillDefaults().hint(135, SWT.DEFAULT).applyTo(urlField);
- }
-
- attribute = this.taskData.getAttribute(BugzillaReportElement.STATUS_WHITEBOARD.getKeyString());
- if (attribute == null) {
- this.taskData.setAttributeValue(BugzillaReportElement.STATUS_WHITEBOARD.getKeyString(), "");
- attribute = this.taskData.getAttribute(BugzillaReportElement.STATUS_WHITEBOARD.getKeyString());
- }
- 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(BugzillaReportElement.GROUP.getKeyString()) != null) {
- addRoles(composite);
- }
-
- if (taskData.getAttribute(BugzillaReportElement.ESTIMATED_TIME.getKeyString()) != null)
- addBugzillaTimeTracker(getManagedForm().getToolkit(), composite);
-
- }
-
- private boolean hasCustomAttributeChanges() {
- if (taskData == null)
- return false;
- String customAttributeKeys[] = { BugzillaReportElement.BUG_FILE_LOC.getKeyString(),
- BugzillaReportElement.DEPENDSON.getKeyString(), BugzillaReportElement.BLOCKED.getKeyString(),
- BugzillaReportElement.KEYWORDS.getKeyString(), BugzillaReportElement.VOTES.getKeyString(),
- BugzillaReportElement.REPORTER_ACCESSIBLE.getKeyString(),
- BugzillaReportElement.CCLIST_ACCESSIBLE.getKeyString(),
- BugzillaReportElement.ESTIMATED_TIME.getKeyString(),
- BugzillaReportElement.REMAINING_TIME.getKeyString(), BugzillaReportElement.ACTUAL_TIME.getKeyString(),
- BugzillaReportElement.DEADLINE.getKeyString(), BugzillaReportElement.STATUS_WHITEBOARD.getKeyString() };
- 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();
- Hyperlink hyperlink = getManagedForm().getToolkit().createHyperlink(hyperlinksComposite, bugId,
- SWT.NONE);
- final AbstractTask task = TasksUiPlugin.getTaskListManager().getTaskList().getTask(repository.getUrl(),
- bugId);
- if (task != null) {
- hyperlink.setToolTipText(task.getSummary());
- }
- hyperlink.addHyperlinkListener(new HyperlinkAdapter() {
- @Override
- public void linkActivated(HyperlinkEvent e) {
- if (task != null) {
- TasksUiUtil.refreshAndOpenTaskListElement(task);
- } else {
- TasksUiUtil.openRepositoryTask(repository.getUrl(), bugId, repository.getUrl()
- + IBugzillaConstants.URL_GET_SHOW_BUG + bugId);
- }
- }
- });
- }
- }
- }
-
- 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(BugzillaReportElement.REPORTER_ACCESSIBLE.getKeyString());
- if (attribute == null) {
- taskData.setAttributeValue(BugzillaReportElement.REPORTER_ACCESSIBLE.getKeyString(), "0");
- attribute = taskData.getAttribute(BugzillaReportElement.REPORTER_ACCESSIBLE.getKeyString());
- }
- Button button = addButtonField(rolesComposite, attribute, SWT.CHECK);
- if (hasChanged(attribute)) {
- button.setBackground(getColorIncoming());
- }
-
- attribute = null;
- attribute = taskData.getAttribute(BugzillaReportElement.CCLIST_ACCESSIBLE.getKeyString());
- if (attribute == null) {
- taskData.setAttributeValue(BugzillaReportElement.CCLIST_ACCESSIBLE.getKeyString(), "0");
- attribute = taskData.getAttribute(BugzillaReportElement.CCLIST_ACCESSIBLE.getKeyString());
- }
- button = addButtonField(rolesComposite, attribute, SWT.CHECK);
- if (hasChanged(attribute)) {
- button.setBackground(getColorIncoming());
- }
- }
-
- @Override
- protected boolean hasContentAssist(RepositoryTaskAttribute attribute) {
- return BugzillaReportElement.NEWCC.getKeyString().equals(attribute.getId());
- }
-
- @Override
- protected boolean hasContentAssist(RepositoryOperation repositoryOperation) {
- BUGZILLA_OPERATION operation;
- try {
- operation = BUGZILLA_OPERATION.valueOf(repositoryOperation.getKnobName());
- } catch (RuntimeException e) {
- StatusHandler.log(e, "Unrecognized operation: " + repositoryOperation.getKnobName());
- operation = null;
- }
-
- if (operation != null && operation == BUGZILLA_OPERATION.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(BugzillaReportElement.ESTIMATED_TIME.getKeyString());
- 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));
-
- Text currentEstimate = toolkit.createText(
- timeComposite,
- ""
- + (Float.parseFloat(taskData.getAttributeValue(BugzillaReportElement.ACTUAL_TIME.getKeyString())) + Float.parseFloat(taskData.getAttributeValue(BugzillaReportElement.REMAINING_TIME.getKeyString()))));
- currentEstimate.setFont(TEXT_FONT);
- currentEstimate.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
- currentEstimate.setEditable(false);
-
- attribute = this.taskData.getAttribute(BugzillaReportElement.ACTUAL_TIME.getKeyString());
- 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(BugzillaReportElement.WORK_TIME.getKeyString(), "0");
- final RepositoryTaskAttribute addTimeAttribute = this.taskData.getAttribute(BugzillaReportElement.WORK_TIME.getKeyString());
- if (addTimeAttribute != null) {
-
- createLabel(timeComposite, addTimeAttribute);
- addTimeText = toolkit.createText(timeComposite,
- taskData.getAttributeValue(BugzillaReportElement.WORK_TIME.getKeyString()), 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(BugzillaReportElement.REMAINING_TIME.getKeyString());
- if (attribute != null) {
- createLabel(timeComposite, attribute);
- createTextField(timeComposite, attribute, SWT.FLAT);
- }
-
- attribute = this.taskData.getAttribute(BugzillaReportElement.DEADLINE.getKeyString());
- 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(BugzillaReportElement.DEADLINE.getKeyString()));
- 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) SimpleDateFormat.getDateInstance();
- f.applyPattern("yyyy-MM-dd");
-
- taskData.setAttributeValue(BugzillaReportElement.DEADLINE.getKeyString(), f.format(d));
- attributeChanged(taskData.getAttribute(BugzillaReportElement.DEADLINE.getKeyString()));
- // TODO goes dirty even if user presses cancel
- // markDirty(true);
- } else {
- taskData.setAttributeValue(BugzillaReportElement.DEADLINE.getKeyString(), "");
- attributeChanged(taskData.getAttribute(BugzillaReportElement.DEADLINE.getKeyString()));
- deadlinePicker.setDate(null);
- }
- }
- });
-
- ImageHyperlink clearDeadlineDate = toolkit.createImageHyperlink(dateWithClear, SWT.NONE);
- clearDeadlineDate.setImage(TasksUiImages.getImage(TasksUiImages.REMOVE));
- clearDeadlineDate.setToolTipText("Clear");
- clearDeadlineDate.addHyperlinkListener(new HyperlinkAdapter() {
-
- @Override
- public void linkActivated(HyperlinkEvent e) {
- taskData.setAttributeValue(BugzillaReportElement.DEADLINE.getKeyString(), "");
- attributeChanged(taskData.getAttribute(BugzillaReportElement.DEADLINE.getKeyString()));
- 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).getKeywords();
- } catch (Exception ex) {
- // ignore
- }
-
- KeywordsDialog keywordsDialog = new KeywordsDialog(shell, keywords, validKeywords);
- int responseCode = keywordsDialog.open();
-
- String newKeywords = keywordsDialog.getSelectedKeywordsString();
- if (responseCode == Dialog.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(BugzillaReportElement.VOTES.getKeyString());
-
- 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.getUrl() + IBugzillaConstants.URL_SHOW_VOTES + taskData.getId(),
- false);
- }
- }
- });
-
- 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.getUrl() + IBugzillaConstants.URL_VOTE + taskData.getId(), false);
- }
- }
- });
- }
-
- @Override
- protected void validateInput() {
-
- }
-
- @Override
- protected String getHistoryUrl() {
- if (repository != null && taskData != null) {
- return repository.getUrl() + IBugzillaConstants.URL_BUG_ACTIVITY + taskData.getId();
- } else {
- return null;
- }
- }
-
- /**
- * This method is duplicated in NewBugzillaTaskEditor for now.
- */
- @Override
- public SearchHitCollector getDuplicateSearchCollector(String name) {
- String duplicateDetectorName = name.equals("default") ? "Stack Trace" : name;
- Set<AbstractDuplicateDetector> allDetectors = getDuplicateSearchCollectorsList();
-
- for (AbstractDuplicateDetector detector : allDetectors) {
- if (detector.getName().equals(duplicateDetectorName)) {
- return detector.getSearchHitCollector(repository, taskData);
- }
- }
- // didn't find it
- return null;
- }
-
- /**
- * This method is duplicated in BugzillaTaskEditor for now.
- */
- @Override
- protected Set<AbstractDuplicateDetector> getDuplicateSearchCollectorsList() {
- Set<AbstractDuplicateDetector> bugzillaDuplicateDetectors = new HashSet<AbstractDuplicateDetector>();
- for (AbstractDuplicateDetector abstractDuplicateDetector : TasksUiPlugin.getDefault()
- .getDuplicateSearchCollectorsList()) {
- if (abstractDuplicateDetector.getKind() == null
- || abstractDuplicateDetector.getKind().equals(getConnector().getConnectorKind())) {
- bugzillaDuplicateDetectors.add(abstractDuplicateDetector);
- }
- }
- return bugzillaDuplicateDetectors;
- }
-
- /**
- * @author Frank Becker (bug 198027)
- */
- @Override
- protected void addAssignedTo(Composite peopleComposite) {
- RepositoryTaskAttribute assignedAttribute = taskData.getAttribute(RepositoryTaskAttribute.USER_ASSIGNED);
- if (assignedAttribute != null) {
- String bugzillaVersion;
- try {
- bugzillaVersion = BugzillaCorePlugin.getRepositoryConfiguration(repository, false).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);
- }
- }
- });
- FormToolkit toolkit = getManagedForm().getToolkit();
- Label dummylabel = toolkit.createLabel(peopleComposite, "");
- GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(dummylabel);
- RepositoryTaskAttribute attribute = taskData.getAttribute(BugzillaReportElement.SET_DEFAULT_ASSIGNEE.getKeyString());
- if (attribute == null) {
- taskData.setAttributeValue(BugzillaReportElement.SET_DEFAULT_ASSIGNEE.getKeyString(), "0");
- attribute = taskData.getAttribute(BugzillaReportElement.SET_DEFAULT_ASSIGNEE.getKeyString());
- }
- addButtonField(peopleComposite, attribute, SWT.CHECK);
- }
- }
-}
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 a7733b2ac..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.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.ITaskFactory;
-import org.eclipse.mylyn.tasks.core.QueryHitCollector;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.TaskList;
-
-public class DummySearchHitProvider extends QueryHitCollector {
-
- public DummySearchHitProvider(TaskList 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 50f7d996d..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/KeywordsDialog.java
+++ /dev/null
@@ -1,154 +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 List<String> selectedKeywords;
-
- private 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 4322b00f8..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/NewBugzillaTaskEditor.java
+++ /dev/null
@@ -1,199 +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.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-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.BugzillaReportElement;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskAttribute;
-import org.eclipse.mylyn.tasks.ui.AbstractDuplicateDetector;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractNewRepositoryTaskEditor;
-import org.eclipse.mylyn.tasks.ui.search.SearchHitCollector;
-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.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 {
-
- private static final int WRAP_LENGTH = 90;
-
- 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 = 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);
-
- Label label = toolkit.createLabel(peopleComposite, "Assign to:");
- GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(label);
- Composite textFieldComposite = toolkit.createComposite(peopleComposite);
- 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().hint(150, SWT.DEFAULT).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);
- }
-
- @Override
- /**
- * This method is duplicated in BugzillaTaskEditor for now.
- */
- public SearchHitCollector getDuplicateSearchCollector(String name) {
- String duplicateDetectorName = name.equals("default") ? "Stack Trace" : name;
- Set<AbstractDuplicateDetector> allDetectors = getDuplicateSearchCollectorsList();
-
- for (AbstractDuplicateDetector detector : allDetectors) {
- if (detector.getName().equals(duplicateDetectorName)) {
- return detector.getSearchHitCollector(repository, taskData);
- }
- }
- // didn't find it
- return null;
- }
-
- @Override
- /**
- * This method is duplicated in BugzillaTaskEditor for now.
- */
- protected Set<AbstractDuplicateDetector> getDuplicateSearchCollectorsList() {
- Set<AbstractDuplicateDetector> bugzillaDuplicateDetectors = new HashSet<AbstractDuplicateDetector>();
- for (AbstractDuplicateDetector abstractDuplicateDetector : TasksUiPlugin.getDefault()
- .getDuplicateSearchCollectorsList()) {
-
- if (abstractDuplicateDetector.getKind() == null
- || abstractDuplicateDetector.getKind().equals(getConnector().getConnectorKind())) {
- bugzillaDuplicateDetectors.add(abstractDuplicateDetector);
- }
- }
- return bugzillaDuplicateDetectors;
- }
-
- @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 summary with new reports");
- descriptionTextViewer.getTextWidget().setFocus();
- return;
- }
- RepositoryTaskAttribute attribute = taskData.getAttribute(BugzillaReportElement.COMPONENT.getKeyString());
- 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();
- }
-
- /**
- * Break text up into lines so that it is displayed properly in bugzilla
- */
- private 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 (int i = 0; i < textArray.length; i++) {
- if (textArray[i] == null)
- break;
- newText += textArray[i] + "\n";
- }
- return newText;
- }
- }
-}
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 076521775..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java
+++ /dev/null
@@ -1,1592 +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.NullProgressMonitor;
-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.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.bugzilla.ui.BugzillaUiPlugin;
-import org.eclipse.mylyn.internal.bugzilla.ui.editor.KeywordsDialog;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.ui.search.AbstractRepositoryQueryPage;
-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.Text;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.internal.help.WorkbenchHelpSystem;
-import org.eclipse.ui.progress.IProgressService;
-
-/**
- * Bugzilla search page
- *
- * @author Mik Kersten (hardening of prototype)
- */
-public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements Listener {
-
- 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> 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" };
-
- private static final String[] patternOperationValues = { "allwordssubstr", "anywordssubstr", "regexp" };
-
- private static final String[] emailOperationText = { "substring", "exact", "regexp" };
-
- private static final String[] emailOperationValues = { "substring", "exact", "regexp" };
-
- 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" };
-
- // protected IPreferenceStore prefs = BugzillaUiPlugin.getDefault().getPreferenceStore();
-
- private BugzillaRepositoryQuery originalQuery = null;
-
- protected boolean restoring = false;
-
- private boolean restoreQueryOptions = true;
-
- private SelectionAdapter updateActionSelectionAdapter = new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (scontainer != null) {
- scontainer.setPerformActionEnabled(canQuery());
- }
- }
- };
-
- // private TaskRepository selectedRepository = null;
-
- private final class ModifyListenerImplementation implements ModifyListener {
- public void modifyText(ModifyEvent e) {
- if (scontainer != null) {
- scontainer.setPerformActionEnabled(canQuery());
- }
- }
- }
-
- 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() {
- super(TITLE_BUGZILLA_QUERY);
- // setTitle(TITLE);
- // setDescription(DESCRIPTION);
- // setPageComplete(false);
- }
-
- public BugzillaSearchPage(TaskRepository repository) {
- super(TITLE_BUGZILLA_QUERY);
- this.repository = repository;
- // setTitle(TITLE);
- // setDescription(DESCRIPTION);
- // setImageDescriptor(TaskListImages.BANNER_REPOSITORY);
- // setPageComplete(false);
- }
-
- public BugzillaSearchPage(TaskRepository repository, BugzillaRepositoryQuery origQuery) {
- super(TITLE_BUGZILLA_QUERY, origQuery.getSummary());
- originalQuery = origQuery;
- this.repository = repository;
- setDescription("Select the Bugzilla query parameters. Use the Update Attributes button to retrieve "
- + "updated values from the repository.");
- // setTitle(TITLE);
- // setDescription(DESCRIPTION);
- // setPageComplete(false);
- }
-
- 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 = 3;
- composite.setLayout(gridLayout);
-
- if (!inSearchContainer()) {
- final Label queryTitleLabel = new Label(composite, SWT.NONE);
- queryTitleLabel.setText("&Query Title:");
-
- Text queryTitle = new Text(composite, SWT.BORDER);
- queryTitle.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
- queryTitle.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- setPageComplete(isPageComplete());
- }
- });
- if (originalQuery != null) {
- queryTitle.setText(originalQuery.getSummary());
- }
- title = queryTitle;
- title.setFocus();
- }
-
- final Label label = new Label(composite, SWT.NONE);
- final GridData gd_label = new GridData(SWT.LEFT, SWT.CENTER, false, false, 3, 1);
- gd_label.heightHint = 3;
- label.setLayoutData(gd_label);
-
- // Info text
- Label labelSummary = new Label(composite, SWT.LEFT);
- labelSummary.setText("&Summary:");
- //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));
- 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));
- 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, false, false));
- emailPattern.addModifyListener(new ModifyListenerImplementation());
- emailPattern.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- handleWidgetSelected(emailPattern, emailOperation, previousEmailPatterns);
- }
- });
-
- // operation combo
- emailOperation = new Combo(composite, SWT.SINGLE | SWT.READ_ONLY | SWT.BORDER);
- emailOperation.setItems(emailOperationText);
- emailOperation.setText(emailOperationText[0]);
- emailOperation.select(0);
- new Label(composite, SWT.NONE);
-
- Composite emailComposite = new Composite(composite, SWT.NONE);
- emailComposite.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1));
- GridLayout emailLayout = new GridLayout();
- emailLayout.marginWidth = 0;
- emailLayout.marginHeight = 0;
- emailLayout.numColumns = 4;
- emailComposite.setLayout(emailLayout);
-
- // Composite buttons = new Composite(group, SWT.NONE);
- // layout = new GridLayout(4, false);
- // buttons.setLayout(layout);
- // buttons.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- // gd = new GridData(GridData.BEGINNING);
- // gd.horizontalSpan = 3;
- // buttons.setLayoutData(gd);
-
- 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 };
-
- Label labelKeywords = new Label(composite, SWT.NONE);
- labelKeywords.setText("&Keywords:");
- //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, 2, 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() {
- public void widgetSelected(SelectionEvent e) {
- KeywordsDialog dialog = new KeywordsDialog(getShell(), keywords.getText(), //
- Arrays.asList(BugzillaUiPlugin.getQueryOptions(IBugzillaConstants.VALUES_KEYWORDS, //
- null, repository.getUrl())));
- 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();
- updateAttributesFromRepository(repository.getUrl(), selectedProducts, false);
- } else {
- updateAttributesFromRepository(repository.getUrl(), null, false);
- }
- if (restoring) {
- restoring = false;
- restoreWidgetValues();
- }
- if (scontainer != null) {
- scontainer.setPerformActionEnabled(canQuery());
- }
- }
- });
-
- 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 (repository != null) {
- updateAttributesFromRepository(repository.getUrl(), null, true);
- } 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?
- public boolean performAction() {
- if (restoreQueryOptions) {
- saveState();
- }
-
- getPatternData(summaryPattern, summaryOperation, previousSummaryPatterns);
- getPatternData(commentPattern, commentOperation, previousCommentPatterns);
- getPatternData(emailPattern, emailOperation, previousEmailPatterns);
- getPatternData(keywords, keywordsOperation, previousKeywords);
-
- String summaryText = summaryPattern.getText();
- BugzillaUiPlugin.getDefault().getPreferenceStore().setValue(IBugzillaConstants.MOST_RECENT_QUERY, summaryText);
-
- return super.performAction();
- }
-
- @Override
- public void setVisible(boolean visible) {
- if (visible && summaryPattern != null) {
- if (firstTime) {
- if (repository == null) {
- repository = TasksUiPlugin.getRepositoryManager().getDefaultRepository(
- BugzillaCorePlugin.REPOSITORY_KIND);
- }
- // 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);
- }
- // emailPattern.setItems(getPreviousPatterns(previousEmailPatterns));
- for (String keyword : getPreviousPatterns(previousKeywords)) {
- keywords.add(keyword);
- }
-
- // TODO: update status, resolution, severity etc if possible...
- if (repository != null) {
- updateAttributesFromRepository(repository.getUrl(), null, false);
- if (product.getItemCount() == 0) {
- updateAttributesFromRepository(repository.getUrl(), null, true);
- }
- }
- 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 (repository != null) {
- IDialogSettings settings = getDialogSettings();
- String repoId = "." + repository.getUrl();
- 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) {
- updateAttributesFromRepository(repository.getUrl(), product.getSelection(), false);
- }
- restoreWidgetValues();
- }
- }
-
- if (scontainer != null) {
- scontainer.setPerformActionEnabled(canQuery());
- }
- 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() {
- 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 || keywords.getText().length() > 0;
- }
-
- /**
- * 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) {
- try {
- // if (rememberedQuery) {
- // return getQueryURL(repository, new StringBuffer(input.getQueryParameters(selIndex)));
- // } else {
- return getQueryURL(repository, getQueryParameters());
- // }
- } catch (UnsupportedEncodingException e) {
- // ignore
- }
- return "";
- }
-
- protected String getQueryURL(TaskRepository repository, StringBuffer params) {
- StringBuffer url = new StringBuffer(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 StringBuffer getQueryURLStart(TaskRepository repository) {
- StringBuffer sb = new StringBuffer(repository.getUrl());
-
- 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 StringBuffer getQueryParameters() throws UnsupportedEncodingException {
- StringBuffer sb = new StringBuffer();
-
- sb.append("short_desc_type=");
- sb.append(patternOperationValues[summaryOperation.getSelectionIndex()]);
-
- sb.append("&short_desc=");
- sb.append(URLEncoder.encode(summaryPattern.getText(), repository.getCharacterEncoding()));
-
- int[] selected = product.getSelectionIndices();
- for (int i = 0; i < selected.length; i++) {
- sb.append("&product=");
- sb.append(URLEncoder.encode(product.getItem(selected[i]), repository.getCharacterEncoding()));
- }
-
- selected = component.getSelectionIndices();
- for (int i = 0; i < selected.length; i++) {
- sb.append("&component=");
- sb.append(URLEncoder.encode(component.getItem(selected[i]), repository.getCharacterEncoding()));
- }
-
- selected = version.getSelectionIndices();
- for (int i = 0; i < selected.length; i++) {
- sb.append("&version=");
- sb.append(URLEncoder.encode(version.getItem(selected[i]), repository.getCharacterEncoding()));
- }
-
- selected = target.getSelectionIndices();
- for (int i = 0; i < selected.length; i++) {
- sb.append("&target_milestone=");
- sb.append(URLEncoder.encode(target.getItem(selected[i]), repository.getCharacterEncoding()));
- }
-
- sb.append("&long_desc_type=");
- sb.append(patternOperationValues[commentOperation.getSelectionIndex()]);
- sb.append("&long_desc=");
- sb.append(URLEncoder.encode(commentPattern.getText(), repository.getCharacterEncoding()));
-
- selected = status.getSelectionIndices();
- for (int i = 0; i < selected.length; i++) {
- sb.append("&bug_status=");
- sb.append(URLEncoder.encode(status.getItem(selected[i]), repository.getCharacterEncoding()));
- }
-
- selected = resolution.getSelectionIndices();
- for (int i = 0; i < selected.length; i++) {
- sb.append("&resolution=");
- sb.append(URLEncoder.encode(resolution.getItem(selected[i]), repository.getCharacterEncoding()));
- }
-
- selected = severity.getSelectionIndices();
- for (int i = 0; i < selected.length; i++) {
- sb.append("&bug_severity=");
- sb.append(URLEncoder.encode(severity.getItem(selected[i]), repository.getCharacterEncoding()));
- }
-
- selected = priority.getSelectionIndices();
- for (int i = 0; i < selected.length; i++) {
- sb.append("&priority=");
- sb.append(URLEncoder.encode(priority.getItem(selected[i]), repository.getCharacterEncoding()));
- }
-
- selected = hardware.getSelectionIndices();
- for (int i = 0; i < selected.length; i++) {
- sb.append("&ref_platform=");
- sb.append(URLEncoder.encode(hardware.getItem(selected[i]), repository.getCharacterEncoding()));
- }
-
- selected = os.getSelectionIndices();
- for (int i = 0; i < selected.length; i++) {
- sb.append("&op_sys=");
- sb.append(URLEncoder.encode(os.getItem(selected[i]), repository.getCharacterEncoding()));
- }
-
- 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()]);
- sb.append("&email1=");
- sb.append(URLEncoder.encode(emailPattern.getText(), repository.getCharacterEncoding()));
- }
- }
-
- if (daysText.getText() != null && !daysText.getText().equals("")) {
- try {
- Integer.parseInt(daysText.getText());
- sb.append("&changedin=");
- sb.append(URLEncoder.encode(daysText.getText(), repository.getCharacterEncoding()));
- } 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()]);
- sb.append("&keywords=");
- sb.append(URLEncoder.encode(keywords.getText().replace(',', ' '), repository.getCharacterEncoding()));
- }
-
- return sb;
- }
-
- // --------------- 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_EMAILBUTTON_ID = PAGE_NAME + ".EMAILATTR";
-
- 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_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";
-
- 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 emailPattern;
-
- protected Button[] emailButtons;
-
- 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;
-
- 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 updateAttributesFromRepository(String repositoryUrl, String[] selectedProducts, boolean connect) {
-
- if (connect) {
- final AbstractRepositoryConnector connector = TasksUiPlugin.getRepositoryManager().getRepositoryConnector(
- repository.getConnectorKind());
-
- 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);
- connector.updateAttributes(repository, monitor);
- BugzillaUiPlugin.updateQueryOptions(repository, monitor);
- } catch (final CoreException ce) {
- StatusHandler.displayStatus("Update failed", ce.getStatus());
- } finally {
- monitor.done();
- }
- }
- };
-
- try {
- // TODO: make cancelable (bug 143011)
- if (getContainer() != null) {
- getContainer().run(true, false, updateRunnable);
- } else {
- IProgressService service = PlatformUI.getWorkbench().getProgressService();
- service.run(true, false, updateRunnable);
- }
-
- } catch (InvocationTargetException e) {
- MessageDialog.openError(null, "Error updating search options", "Error was : "
- + e.getCause().getMessage());
- } catch (InterruptedException e) {
- // Was cancelled...
- }
- }
-
- if (selectedProducts == null) {
- String[] productsList = BugzillaUiPlugin.getQueryOptions(IBugzillaConstants.VALUES_PRODUCT, null,
- repositoryUrl);
- Arrays.sort(productsList, String.CASE_INSENSITIVE_ORDER);
- product.setItems(productsList);
- }
-
- String[] componentsList = BugzillaUiPlugin.getQueryOptions(IBugzillaConstants.VALUES_COMPONENT,
- selectedProducts, repositoryUrl);
- Arrays.sort(componentsList, String.CASE_INSENSITIVE_ORDER);
- component.setItems(componentsList);
-
- version.setItems(BugzillaUiPlugin.getQueryOptions(IBugzillaConstants.VALUES_VERSION, selectedProducts,
- repositoryUrl));
-
- target.setItems(BugzillaUiPlugin.getQueryOptions(IBugzillaConstants.VALUES_TARGET, selectedProducts,
- repositoryUrl));
-
- if (selectedProducts == null) {
- status.setItems(BugzillaUiPlugin.getQueryOptions(IBugzillaConstants.VALUES_STATUS, selectedProducts,
- repositoryUrl));
-
- // status.setSelection(BugzillaRepositoryUtil.getQueryOptions(IBugzillaConstants.VALUSE_STATUS_PRESELECTED,
- // repositoryUrl));
-
- resolution.setItems(BugzillaUiPlugin.getQueryOptions(IBugzillaConstants.VALUES_RESOLUTION,
- selectedProducts, repositoryUrl));
-
- severity.setItems(BugzillaUiPlugin.getQueryOptions(IBugzillaConstants.VALUES_SEVERITY, selectedProducts,
- repositoryUrl));
-
- priority.setItems(BugzillaUiPlugin.getQueryOptions(IBugzillaConstants.VALUES_PRIORITY, selectedProducts,
- repositoryUrl));
-
- hardware.setItems(BugzillaUiPlugin.getQueryOptions(IBugzillaConstants.VALUES_HARDWARE, selectedProducts,
- repositoryUrl));
-
- os.setItems(BugzillaUiPlugin.getQueryOptions(IBugzillaConstants.VALUES_OS, selectedProducts, repositoryUrl));
- }
- }
-
- public TaskRepository getRepository() {
- return repository;
- }
-
- public void setRepository(TaskRepository repository) {
- this.repository = repository;
- }
-
- public boolean canFlipToNextPage() {
- // if (getErrorMessage() != null)
- // return false;
- //
- // return true;
- return false;
- }
-
- public void handleEvent(Event event) {
- String message = null;
- if (event.widget == daysText) {
- String days = daysText.getText();
- if (days.length() > 0) {
- try {
- if (Integer.parseInt(days) < 0) {
- message = NUM_DAYS_POSITIVE + days + " is invalid.";
- }
- } catch (NumberFormatException ex) {
- message = NUM_DAYS_POSITIVE + days + " is invalid.";
- }
- }
- }
-
- setPageComplete(message == null);
- setErrorMessage(message);
- 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),
- repository.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));
- updateAttributesFromRepository(repository.getUrl(), selList.toArray(sel), false);
- } 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("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++;
- }
- }
- }
- }
-
- @Override
- public BugzillaRepositoryQuery getQuery() {
- if (originalQuery == null) {
- try {
- originalQuery = new BugzillaRepositoryQuery(repository.getUrl(), getQueryURL(repository,
- getQueryParameters()), getQueryTitle());
- } catch (UnsupportedEncodingException e) {
- return null;
- }
-
- } else {
- try {
- originalQuery.setUrl(getQueryURL(repository, getQueryParameters()));
- // originalQuery.setMaxHits(Integer.parseInt(getMaxHits()));
- originalQuery.setHandleIdentifier(getQueryTitle());
- } catch (UnsupportedEncodingException e) {
- return null;
- }
- }
- return originalQuery;
- }
-
- private String[] nonNullArray(IDialogSettings settings, String id) {
- String[] value = settings.getArray(id);
- if (value == null) {
- return new String[] {};
- }
- return value;
- }
-
- private void restoreWidgetValues() {
- IDialogSettings settings = getDialogSettings();
- String repoId = "." + repository.getUrl();
- 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));
- if (settings.get(STORE_KEYWORDS_ID + repoId) != null) {
- keywords.setText(settings.get(STORE_KEYWORDS_ID + repoId));
- keywordsOperation.select(settings.getInt(STORE_KEYWORDSMATCH_ID + repoId));
- }
- }
-
- public void saveState() {
- String repoId = "." + repository.getUrl();
- 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_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;
- }
-}
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 4cac47653..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 6b4c54d1d..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/search/IBugzillaResultEditorMatchAdapter.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/IBugzillaResultEditorMatchAdapter.java
deleted file mode 100644
index 5c65bb76e..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/IBugzillaResultEditorMatchAdapter.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.bugzilla.ui.search;
-
-import org.eclipse.mylyn.tasks.ui.search.RepositorySearchResult;
-import org.eclipse.search.ui.text.AbstractTextSearchResult;
-import org.eclipse.search.ui.text.IEditorMatchAdapter;
-import org.eclipse.search.ui.text.Match;
-import org.eclipse.ui.IEditorPart;
-
-/**
- * @author Mik Kersten (clean-up)
- */
-public interface IBugzillaResultEditorMatchAdapter extends IEditorMatchAdapter {
-
- public boolean isShownInEditor(Match match, IEditorPart editor);
-
- public Match[] computeContainedMatches(AbstractTextSearchResult result, IEditorPart editor);
-
- public void setResult(RepositorySearchResult result);
-}
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 2feff48b5..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaConnectorUi.java
+++ /dev/null
@@ -1,216 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public 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.BugzillaReportElement;
-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.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.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.TaskHyperlink;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.ui.search.AbstractRepositoryQueryPage;
-import org.eclipse.mylyn.tasks.ui.wizards.AbstractRepositorySettingsPage;
-
-/**
- * @author Mik Kersten
- * @author Eugene Kuleshov
- */
-public class BugzillaConnectorUi extends AbstractRepositoryConnectorUi {
-
- @Override
- public String getAccountCreationUrl(TaskRepository taskRepository) {
- return taskRepository.getUrl() + "/createaccount.cgi";
- }
-
- @Override
- public String getAccountManagementUrl(TaskRepository taskRepository) {
- return taskRepository.getUrl() + "/userprefs.cgi";
- }
-
- @Override
- public List<AbstractTaskContainer> getLegendItems() {
- List<AbstractTaskContainer> legendItems = new ArrayList<AbstractTaskContainer>();
-
- BugzillaTask blocker = new BugzillaTask("", "critical", "Critical, Blocker");
- blocker.setSeverity("critical");
- legendItems.add(blocker);
-
- BugzillaTask major = new BugzillaTask("", "major", "Major");
- major.setSeverity("major");
- legendItems.add(major);
-
- BugzillaTask enhancement = new BugzillaTask("", "enhancement", "Enhancement");
- enhancement.setSeverity("enhancement");
- legendItems.add(enhancement);
-
- BugzillaTask trivial = new BugzillaTask("", "trivial", "Trivial, Minor");
- trivial.setSeverity("trivial");
- legendItems.add(trivial);
-
- return legendItems;
- }
-
- private static final int TASK_NUM_GROUP = 3;
-
- @Override
- public ImageDescriptor getTaskKindOverlay(AbstractTask task) {
- if (task instanceof BugzillaTask) {
- BugzillaTask bugzillaTask = (BugzillaTask) task;
- String severity = bugzillaTask.getSeverity();
-
- 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);
- }
-
- 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 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;
- }
-
- 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;
- }
- }
-
- @Override
- public String getTaskKindLabel(AbstractTask repositoryTask) {
- return IBugzillaConstants.BUGZILLA_TASK_KIND;
- }
-
- @Override
- public String getTaskKindLabel(RepositoryTaskData taskData) {
- return IBugzillaConstants.BUGZILLA_TASK_KIND;
- }
-
- @Override
- public AbstractRepositorySettingsPage getSettingsPage() {
- return new BugzillaRepositorySettingsPage(this);
- }
-
- @Override
- public AbstractRepositoryQueryPage getSearchPage(TaskRepository repository, IStructuredSelection selection) {
- return new BugzillaSearchPage(repository);
- }
-
- @Override
- public IWizard getNewTaskWizard(TaskRepository taskRepository) {
- return new NewBugzillaTaskWizard(taskRepository);
- }
-
- @Override
- public IWizard getQueryWizard(TaskRepository repository, AbstractRepositoryQuery query) {
- if (query instanceof BugzillaRepositoryQuery) {
- return new EditBugzillaQueryWizard(repository, (BugzillaRepositoryQuery) query);
- } else {
- return new NewBugzillaQueryWizard(repository);
- }
- }
-
- @Override
- public boolean hasSearchPage() {
- return true;
- }
-
- @Override
- public String getConnectorKind() {
- return BugzillaCorePlugin.REPOSITORY_KIND;
- }
-
- @SuppressWarnings("restriction")
- @Override
- public boolean supportsDueDates(AbstractTask task) {
- if (task instanceof BugzillaTask) {
- // XXX This is only used in the planning editor, and if its input was set correctly as a RepositoryTaskEditorInput
- // we wouldn't have to get the task data this way from here
- RepositoryTaskData taskData = TasksUiPlugin.getTaskDataManager().getNewTaskData(task.getRepositoryUrl(),
- task.getTaskId());
- if (taskData != null && taskData.getAttribute(BugzillaReportElement.ESTIMATED_TIME.getKeyString()) != null)
- return true;
- }
- return super.supportsDueDates(task);
- }
-
-}
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 acee94b59..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaCustomQueryDialog.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.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 40cce2215..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaCustomQueryWizardPage.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.bugzilla.ui.tasklist;
-
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaRepositoryQuery;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.search.AbstractRepositoryQueryPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.KeyListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * @author Rob Elves
- * @author Mik Kersten
- */
-public class BugzillaCustomQueryWizardPage extends AbstractRepositoryQueryPage {
-
- private static final String LABEL_CUSTOM_QUERY = "&Enter 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 Composite composite;
-
- private BugzillaRepositoryQuery query;
-
- public BugzillaCustomQueryWizardPage(TaskRepository repository, BugzillaRepositoryQuery query) {
- super(TITLE, query.getSummary());
- this.query = query;
- this.repository = repository;
- setTitle(LABEL_CUSTOM_QUERY);
- setDescription(DESCRIPTION);
- setImageDescriptor(TasksUiImages.BANNER_REPOSITORY);
- }
-
- public BugzillaCustomQueryWizardPage(TaskRepository repository) {
- super(TITLE);
- this.repository = repository;
- setTitle(LABEL_CUSTOM_QUERY);
- setDescription(DESCRIPTION);
- setImageDescriptor(TasksUiImages.BANNER_REPOSITORY);
- }
-
- @Override
- public void createControl(Composite parent) {
- composite = new Composite(parent, SWT.NONE);
- composite.setLayout(new GridLayout());
-
- super.createControl(composite);
- createCustomQueryGroup(composite);
- composite.pack();
- setControl(composite);
- }
-
- private void createCustomQueryGroup(Composite composite) {
- Group group = new Group(composite, SWT.NONE);
- group.setText(LABEL_CUSTOM_QUERY);
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- group.setLayout(layout);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 2;
- gd.widthHint = 300;
- group.setLayoutData(gd);
-
- queryText = new Text(group, SWT.BORDER);
- gd = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
- queryText.setLayoutData(gd);
-
- if (query != null) {
- queryText.setText(query.getUrl());
- }
-
- queryText.addKeyListener(new KeyListener() {
-
- public void keyPressed(KeyEvent e) {
- // ignore
-
- }
-
- public void keyReleased(KeyEvent e) {
- setPageComplete(canFlipToNextPage());
-
- }
- });
-
- }
-
- @Override
- public boolean canFlipToNextPage() {
- return false;
- }
-
-// @Override
-// public boolean isPageComplete() {
-// return super.canFlipToNextPage();
-// }
-
-// @Override
-// public IWizardPage getNextPage() {
-// return null;
-// }
-
- @Override
- public BugzillaRepositoryQuery getQuery() {
- if (query == null) {
- query = new BugzillaRepositoryQuery(repository.getUrl(), queryText.getText(), this.getQueryTitle());
- query.setCustomQuery(true);
- } else {
- query.setHandleIdentifier(this.getQueryTitle());
- query.setUrl(queryText.getText());
- }
- return query;
- }
-
-}
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 6d94ff58e..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.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-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 BugzillaCustomQueryWizardPage customPage;
-
- private 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 5ae93f6c3..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositorySettingsPage.java
+++ /dev/null
@@ -1,516 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public 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.Proxy;
-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.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.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.monitor.core.StatusHandler;
-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.AbstractRepositoryConnectorUi;
-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;
-
- public BugzillaRepositorySettingsPage(AbstractRepositoryConnectorUi repositoryUi) {
- super(TITLE, DESCRIPTION, repositoryUi);
- setNeedsAnonymousLogin(true);
- setNeedsEncoding(true);
- setNeedsTimeZone(false);
- setNeedsHttpAuth(true);
- }
-
- @Override
- protected void createAdditionalControls(Composite parent) {
-
- for (RepositoryTemplate template : connector.getTemplates()) {
- serverUrlCombo.add(template.label);
- }
- serverUrlCombo.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- String text = serverUrlCombo.getText();
- RepositoryTemplate template = connector.getTemplate(text);
- if (template != null) {
- repositoryLabelEditor.setStringValue(template.label);
- setUrl(template.repositoryUrl);
- // setAnonymous(info.anonymous);
- setBugzillaVersion(template.version);
- if (template.characterEncoding != null) {
- setEncoding(template.characterEncoding);
- }
- getContainer().updateButtons();
- return;
- }
- }
- });
-
- 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.getUrl());
- 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);
- 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();
-
- }
-
- 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("Could not resolve repository version: " + version, this);
- i = repositoryVersionCombo.indexOf(IBugzillaConstants.SERVER_VERSION_DEFAULT.toString());
- if (i != -1) {
- repositoryVersionCombo.select(i);
- setVersion(IBugzillaConstants.SERVER_VERSION_DEFAULT.toString());
- }
- }
- }
- }
- }
-
- @Override
- public void updateProperties(TaskRepository repository) {
- repository.setProperty(IBugzillaConstants.REPOSITORY_SETTING_SHORT_LOGIN,
- String.valueOf(cleanQAContact.getSelection()));
- 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;
-
- private 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;
- }
-
- @Override
- public void run(IProgressMonitor monitor) throws CoreException {
- try {
- validate(monitor);
- } catch (Exception e) {
- displayError(serverUrl, e);
- }
- }
-
- private void displayError(final String serverUrl, Throwable e) {
- IStatus status;
- if (e instanceof MalformedURLException) {
- status = new BugzillaStatus(Status.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(Status.WARNING, BugzillaCorePlugin.PLUGIN_ID, RepositoryStatus.ERROR_IO,
- serverUrl, e.getMessage());
- } else {
- status = new BugzillaStatus(Status.WARNING, BugzillaCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_NETWORK, serverUrl, e.getMessage());
- }
- StatusHandler.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(serverUrl, newUserId, newPassword, httpAuthUser,
- httpAuthPass, proxy, newEncoding);
- client.validate();
- }
- if (checkVersion && client != null) {
- RepositoryConfiguration config = client.getRepositoryConfiguration();
- if (config != null) {
- versions[0] = config.getInstallVersion();
- }
- }
-
- } finally {
- monitor.done();
- }
- }
-
- public String getResult() {
- return versions[0];
- }
-
- }
-
-}
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 6d8e518cf..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.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractRepositoryTaskEditor;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorFactory;
-import org.eclipse.mylyn.tasks.ui.editors.RepositoryTaskEditorInput;
-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(AbstractTask task) {
- if (task instanceof BugzillaTask) {
- BugzillaTask bugzillaTask = (BugzillaTask) task;
- final TaskRepository repository = TasksUiPlugin.getRepositoryManager().getRepository(
- BugzillaCorePlugin.REPOSITORY_KIND, bugzillaTask.getRepositoryUrl());
- BugzillaTaskEditorInput input = new BugzillaTaskEditorInput(repository, bugzillaTask, true);
- return input;
- }
- return null;
- }
-
- @Override
- public String getTitle() {
- return TITLE;
- }
-
- @Override
- public boolean canCreateEditorFor(AbstractTask task) {
- return task instanceof BugzillaTask;
- }
-
- @Override
- public boolean providesOutline() {
- return true;
- }
-
- @Override
- public boolean canCreateEditorFor(IEditorInput input) {
- if (input instanceof RepositoryTaskEditorInput) {
- return BugzillaCorePlugin.REPOSITORY_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 7d3a7ba36..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskEditorInput.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
- *******************************************************************************/
-/*
- * Created on 1-Feb-2005
- */
-package org.eclipse.mylyn.internal.bugzilla.ui.tasklist;
-
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaRepositoryConnector;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaTask;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.ui.editors.RepositoryTaskEditorInput;
-import org.eclipse.ui.IPersistableElement;
-
-/**
- * @author Eric Booth
- * @author Mik Kersten
- * @author Rob Elves
- */
-public class BugzillaTaskEditorInput extends RepositoryTaskEditorInput {
-
- private String bugTitle = "";
-
- private 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 ImageDescriptor getImageDescriptor() {
-// return null;
-// }
-
- @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;
- }
-
- // TODO: repository configuration update (remove at some point)
- private void updateOptions(RepositoryTaskData taskData) {
- try {
- if (taskData != null) {
- BugzillaRepositoryConnector bugzillaConnector = (BugzillaRepositoryConnector) TasksUiPlugin.getRepositoryManager()
- .getRepositoryConnector(BugzillaCorePlugin.REPOSITORY_KIND);
- bugzillaConnector.updateAttributeOptions(repository, 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 cdab6c082..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskListFactory.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.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.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskListFactory;
-import org.w3c.dom.Element;
-
-/**
- * @author Mik Kersten
- */
-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(AbstractRepositoryQuery category) {
- return category instanceof BugzillaRepositoryQuery;
- }
-
- @Override
- public boolean canCreate(AbstractTask task) {
- return task instanceof BugzillaTask;
- }
-
- @Override
- public String getQueryElementName(AbstractRepositoryQuery query) {
- if (query instanceof BugzillaRepositoryQuery) {
- if (((BugzillaRepositoryQuery) query).isCustomQuery()) {
- return TAG_BUGZILLA_CUSTOM_QUERY;
- } else {
- return TAG_BUGZILLA_QUERY;
- }
- }
- return null;
- }
-
- @Override
- public AbstractRepositoryQuery 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(AbstractTask 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/EditBugzillaQueryWizard.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/EditBugzillaQueryWizard.java
deleted file mode 100644
index 6d7c18f9b..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/EditBugzillaQueryWizard.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.bugzilla.ui.tasklist;
-
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaRepositoryQuery;
-import org.eclipse.mylyn.internal.bugzilla.ui.search.BugzillaSearchPage;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.wizards.AbstractEditQueryWizard;
-
-/**
- * @author Rob Elves
- */
-public class EditBugzillaQueryWizard extends AbstractEditQueryWizard {
-
- public EditBugzillaQueryWizard(TaskRepository repository, BugzillaRepositoryQuery query) {
- super(repository, query);
- }
-
- @Override
- public void addPages() {
- if (((BugzillaRepositoryQuery) query).isCustomQuery()) {
- page = new BugzillaCustomQueryWizardPage(repository, (BugzillaRepositoryQuery) query);
- } else {
- page = new BugzillaSearchPage(repository, (BugzillaRepositoryQuery) query);
- }
- addPage(page);
- }
-
- @Override
- public boolean canFinish() {
- if (page != null && page.isPageComplete()) {
- return true;
- }
- return false;
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/NewBugzillaQueryWizard.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/NewBugzillaQueryWizard.java
deleted file mode 100644
index 5bd2c9bf3..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/NewBugzillaQueryWizard.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.bugzilla.ui.tasklist;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaRepositoryQuery;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.ui.search.AbstractRepositoryQueryPage;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-
-/**
- * @author Mik Kersten
- * @author Brock Janiczak
- */
-public class NewBugzillaQueryWizard extends Wizard {
-
- private static final String TITLE = "New Bugzilla Query";
-
- private final TaskRepository repository;
-
- BugzillaQueryTypeWizardPage page1;
-
- public NewBugzillaQueryWizard(TaskRepository repository) {
- this.repository = repository;
- setNeedsProgressMonitor(true);
- setWindowTitle(TITLE);
- }
-
- @Override
- public void addPages() {
- page1 = new BugzillaQueryTypeWizardPage(repository);
- page1.setWizard(this);
- addPage(page1);
-
- }
-
- @Override
- public boolean performFinish() {
-
- AbstractRepositoryQueryPage page;
-
- if (page1.getNextPage() != null && page1.getNextPage() instanceof AbstractRepositoryQueryPage) {
- page = (AbstractRepositoryQueryPage) page1.getNextPage();
- } else {
- return false;
- }
-
- final BugzillaRepositoryQuery queryCategory = (BugzillaRepositoryQuery) page.getQuery();
-
- TasksUiPlugin.getTaskListManager().getTaskList().addQuery(queryCategory);
- WorkspaceModifyOperation op = new WorkspaceModifyOperation() {
- @Override
- protected void execute(IProgressMonitor monitor) throws CoreException {
- monitor.beginTask("Executing query", 50);
- try {
- AbstractRepositoryConnector connector = TasksUiPlugin.getRepositoryManager()
- .getRepositoryConnector(BugzillaCorePlugin.REPOSITORY_KIND);
- TasksUiPlugin.getSynchronizationManager().synchronize(connector, queryCategory, null, true);
- } finally {
- monitor.done();
- }
- }
- };
-
- try {
- getContainer().run(true, false, op);
- } catch (Exception e) {
- StatusHandler.log(e, "There was a problem executing the query refresh");
- }
-
- return true;
- }
-
- @Override
- public boolean canFinish() {
- if (page1.getNextPage() != null && page1.getNextPage().isPageComplete()) {
- return true;
- }
- return false;
- }
-
-}
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 72e27e57c..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/StackTrace.java
+++ /dev/null
@@ -1,367 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public 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 int length;
-
- /** The offset of the stack trace in the orignal string */
- private int offset;
-
- /** The string of the stack trace */
- private String stackTrace;
-
- /**
- * This is the comment that the stack trace appeared in. String if desciption else Comment
- */
- private 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 a2a02675f..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/BugzillaProductPage.java
+++ /dev/null
@@ -1,404 +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.Status;
-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.BugzillaReportElement;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaRepositoryConnector;
-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.BugzillaUiPlugin;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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.IWorkbench;
-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.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 NewBugzillaTaskWizard bugWizard;
-
- /** The instance of the workbench */
- protected IWorkbench workbench;
-
- /**
- * 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(IWorkbench workbench, NewBugzillaTaskWizard bugWiz, TaskRepository repository) {
- super("Page1");
- setTitle(IBugzillaConstants.TITLE_NEW_BUG);
- setDescription(DESCRIPTION);
- this.workbench = workbench;
- this.bugWizard = bugWiz;
- this.repository = repository;
- setImageDescriptor(BugzillaUiPlugin.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) {
- 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 = TasksUiPlugin.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.updateAttributes(repository, monitor);
- } catch (CoreException ce) {
- if (ce.getStatus().getException() instanceof GeneralSecurityException) {
- StatusHandler.fail(ce,
- "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 + ". ", true);
- } else if (ce.getStatus().getException() instanceof IOException) {
- StatusHandler.fail(ce, "Connection Error, please ensure proper configuration in "
- + TasksUiPlugin.LABEL_VIEW_REPOSITORIES + ".", true);
- } else {
- StatusHandler.fail(ce, "Error updating repository attributes for "
- + repository.getUrl(), true);
- }
- return;
- }
- BugzillaUiPlugin.updateQueryOptions(repository, monitor);
-
- products = new ArrayList<String>();
- for (String product : BugzillaUiPlugin.getQueryOptions(IBugzillaConstants.VALUES_PRODUCT,
- null, repository.getUrl())) {
- 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).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;
- AbstractTask task = (AbstractTask) 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, WizardPage.WARNING);
- break;
- case IStatus.INFO:
- setErrorMessage(null);
- setMessage(message, WizardPage.INFORMATION);
- break;
- default:
- setErrorMessage(null);
- setMessage(message, WizardPage.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.getKeyString(),
- (String) ((IStructuredSelection) productList.getViewer().getSelection()).getFirstElement());
- BugzillaRepositoryConnector.setupNewBugAttributes(repository, model);
- // platform/os are now set to All/All
- BugzillaCorePlugin.getDefault().setPlatformDefaultsOrGuess(repository, model);
- }
-
- @Override
- public boolean isPageComplete() {
- bugWizard.completed = !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 85bbd8855..000000000
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/NewBugzillaTaskWizard.java
+++ /dev/null
@@ -1,100 +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.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.internal.bugzilla.core.BugzillaAttributeFactory;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin;
-import org.eclipse.mylyn.internal.bugzilla.ui.BugzillaUiPlugin;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.mylyn.tasks.ui.editors.NewTaskEditorInput;
-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;
-
-/**
- * @author Mik Kersten
- * @author Rob Elves
- */
-public class NewBugzillaTaskWizard extends Wizard implements INewWizard {
-
- 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;
-
- // TODO: Change taskData to a RepositoryTaskData
- // protected RepositoryTaskData taskData;
-
- public NewBugzillaTaskWizard(TaskRepository repository) {
- this(false, repository);
- taskData = new RepositoryTaskData(new BugzillaAttributeFactory(), BugzillaCorePlugin.REPOSITORY_KIND,
- repository.getUrl(), TasksUiPlugin.getDefault().getNextNewRepositoryTaskId());
- taskData.setNew(true);
- super.setDefaultPageImageDescriptor(BugzillaUiPlugin.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);
- }
-
- 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();
- NewTaskEditorInput editorInput = new NewTaskEditorInput(repository, taskData);
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- TasksUiUtil.openEditor(editorInput, TaskEditor.ID_EDITOR, page);
- return true;
- } catch (Exception e) {
- productPage.applyToStatusLine(new Status(IStatus.ERROR, "not_used", 0,
- "Problem occurred retrieving repository configuration from " + repository.getUrl(), null));
- }
- return false;
- }
-}
diff --git a/org.eclipse.mylyn.help.ui/.classpath b/org.eclipse.mylyn.help.ui/.classpath
deleted file mode 100644
index 5db8238ab..000000000
--- a/org.eclipse.mylyn.help.ui/.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="**/internal/**"/>
- </accessrules>
- </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 4163d19d9..000000000
--- a/org.eclipse.mylyn.help.ui/.project
+++ /dev/null
@@ -1,28 +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>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</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 888de1277..000000000
--- a/org.eclipse.mylyn.help.ui/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,316 +0,0 @@
-#Sun Jun 24 11:52:58 EDT 2007
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.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=disabled
-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.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.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
-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=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-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.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.5
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=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_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 \ No newline at end of file
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 1e4caec9f..000000000
--- a/org.eclipse.mylyn.help.ui/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,6 +0,0 @@
-#Mon Jul 09 18:11:45 PDT 2007
-eclipse.preferences.version=1
-formatter_profile=_Mylar based on Eclipse [built-in]
-formatter_settings_version=11
-internal.default.compliance=default
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return the ${bare_field_name}\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} the ${bare_field_name} to set\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\r\n * \r\n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author ${user}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*******************************************************************************\r\n * Copyright (c) 2004, 2007 Mylyn project committers and others.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n *******************************************************************************/\r\n\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ignore\r\n${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ignore</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template></templates>
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.mylar.tasklist.prefs b/org.eclipse.mylyn.help.ui/.settings/org.eclipse.mylar.tasklist.prefs
deleted file mode 100644
index a6cf96a98..000000000
--- a/org.eclipse.mylyn.help.ui/.settings/org.eclipse.mylar.tasklist.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Fri Oct 20 16:54:30 PDT 2006
-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.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 769b229ff..000000000
--- a/org.eclipse.mylyn.help.ui/.settings/org.eclipse.pde.prefs
+++ /dev/null
@@ -1,12 +0,0 @@
-#Thu Nov 03 15:45:55 PST 2005
-compilers.p.deprecated=2
-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-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 74f49026a..000000000
--- a/org.eclipse.mylyn.help.ui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,15 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Mylyn Help
-Bundle-SymbolicName: org.eclipse.mylyn.help.ui;singleton:=true
-Bundle-Version: 2.1.0.v20070924-2200
-Eclipse-AutoStart: true
-Bundle-Vendor: Eclipse.org
-Require-Bundle: org.eclipse.ui,
- org.eclipse.ui.forms,
- org.eclipse.mylyn.tasks.core,
- org.eclipse.mylyn.tasks.ui,
- org.eclipse.core.runtime
-Export-Package: org.eclipse.mylyn.internal.help.ui.actions,
- org.eclipse.mylyn.internal.help.ui.dialogs
-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 92abd7bc0..000000000
--- a/org.eclipse.mylyn.help.ui/build.properties
+++ /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
-###############################################################################
-bin.includes = plugin.xml,\
- META-INF/,\
- doc/,\
- about.html,\
- .,\
- icons/,\
- intro/,\
- images/,\
- cheatsheets/
-src.includes = META-INF/,\
- plugin.xml,\
- about.html,\
- doc/,\
- src/,\
- icons/
-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 e7ee6c9ee..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 Tasks</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 f99423890..000000000
--- a/org.eclipse.mylyn.help.ui/doc/new.html
+++ /dev/null
@@ -1,260 +0,0 @@
-<html>
-<body bgcolor="FFFFFF">
-
-<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="#FAF7FB"><font size="1">2.1M1<br>
- <i>Aug 27</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 R�mer, 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.1M1.</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>
-
-<h2><a name="task-list">Task List</a></h2>
-
-<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 Search (Ctrl+H)
- dialog.&nbsp; This facilitates opening tasks that are not in the <i>
- Task List</i> by either key/ID or by searching for their summary or
- contents.&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.&nbsp;
- If the <i>Find</i> text looks like a key/ID, the value will populate
- the <i>Search</i> dialog.&nbsp; Ctrl+Shift+F12 can be used as a
- shortcut for this action, and will additionally use the contents of
- the clipboard to look for a task key/ID to populate the <i>Search</i>
- dialog with.&nbsp; The Ctrl+F12 <i>Open Task</i> dialog also
- provides a link to the <i>Task Search </i>page. 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.<p class="MsoPlainText">
- <img border="0" src="images/2.1M1/tasklist-search.png" width="531" height="341"><p class="MsoPlainText">
- 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><a name="task-list2">Task Editor</a></h2>
-
-<table cellpadding="10" cellspacing="0" id="table353">
- <tr>
- <td align="left" valign="top" width="15%" bgcolor=#FAF7FB>
- <p align="right"><b>Attach Screenshots</b></p>
- </td>
- <td valign="top" width="70%">
- <p class="MsoPlainText">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 class="MsoPlainText">
- <img border="0" src="images/2.1M1/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="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="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="task-list1">Bugzilla Connector (Incubation)</a></h2>
-
-<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="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="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">This option can reduce network bandwidth for
- very repositories that provide the configuration caching mechanism
- (currently only bugs.eclipse.org).&nbsp; This option is recommended
- for bugs.eclipse.org users.<p class="MsoPlainText">
- <img border="0" src="images/2.1M1/bugzilla-cached-config.png"></td>
- </tr>
- <tr>
- <td colspan="2">
- <hr>
- </td>
- </tr>
-</table>
-
-<p class="MsoPlainText">&nbsp; </p>
-<h2><a name="task-list0">XPlanner Connector (Incubation)</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.</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 db00a5aa2..000000000
--- a/org.eclipse.mylyn.help.ui/doc/overview.html
+++ /dev/null
@@ -1,61 +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>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> \ No newline at end of file
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 3612d279b..000000000
--- a/org.eclipse.mylyn.help.ui/doc/toc.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?NLS TYPE="org.eclipse.help.toc"?>
-
-<toc label="Mylyn">
- <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/icons/etool16/report-bug.gif b/org.eclipse.mylyn.help.ui/icons/etool16/report-bug.gif
deleted file mode 100644
index f88ff0a0c..000000000
--- a/org.eclipse.mylyn.help.ui/icons/etool16/report-bug.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 74bd42596..000000000
--- a/org.eclipse.mylyn.help.ui/plugin.xml
+++ /dev/null
@@ -1,118 +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.actionSets">
- <actionSet
- id="org.eclipse.mylyn.doc.actionSet"
- label="Mylyn Help"
- visible="true">
- <action
- class="org.eclipse.mylyn.internal.tasks.ui.actions.ReportBugAction"
- icon="icons/etool16/report-bug.gif"
- id="org.eclipse.mylyn.tasks.ui.bug.report"
- label="Report Bug or Enhancement"
- menubarPath="help/helpStart"
- style="push"
- tooltip="Report Bug or Enhancement"/>
- <action
- class="org.eclipse.mylyn.internal.help.ui.actions.ShowMylynLegendAction"
- definitionId="org.eclipse.mylyn.doc.legend.show"
- icon="icons/etool16/icons-legend.gif"
- id="org.eclipse.mylyn.doc.legend.show.action"
- label="Mylyn UI Legend"
- style="push"
- tooltip="Mylyn UI Legend"/>
- </actionSet>
- </extension>
-
- <extension point="org.eclipse.ui.commands">
- <category
- id="org.eclipse.mylyn.doc.commands"
- name="Mylyn Help">
- </category>
- <command
- category="org.eclipse.mylyn.doc.commands"
- categoryId="org.eclipse.mylyn.doc.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+?"
- contextId="org.eclipse.ui.globalScope"
- 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 f35cd3029..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.internal.tasks.ui.views.TaskListView;
-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);
- }
-
- TaskListView.openInActivePerspective();
- 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 23fe8aba5..000000000
--- a/org.eclipse.mylyn.help.ui/src/org/eclipse/mylyn/internal/help/ui/dialogs/UiLegendDialog.java
+++ /dev/null
@@ -1,405 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public 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.Collection;
-import java.util.List;
-
-import org.eclipse.jface.dialogs.PopupDialog;
-import org.eclipse.jface.preference.PreferenceDialog;
-import org.eclipse.mylyn.internal.tasks.ui.TaskListColorsAndFonts;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskElementLabelProvider;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.tasks.core.AbstractTask.PriorityLevel;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-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.ui.PlatformUI;
-import org.eclipse.ui.dialogs.PreferencesUtil;
-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.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.themes.IThemeManager;
-
-/**
- * @author Mik Kersten
- */
-public class UiLegendDialog extends PopupDialog {
-
- public static final String TITLE = " Mylyn UI Overview";
-
- private FormToolkit toolkit;
-
- private ScrolledForm form;
-
- private TaskElementLabelProvider labelProvider = new TaskElementLabelProvider(false);
-
- private IThemeManager themeManager = PlatformUI.getWorkbench().getThemeManager();
-
- 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() {
- if (toolkit != null) {
- if (toolkit.getColors() != null) {
- toolkit.dispose();
- }
- }
- return super.close();
- }
-
- @Override
- protected final Control createDialogArea(final Composite parent) {
-
- getShell().setText(TITLE);
-
- toolkit = new FormToolkit(parent.getDisplay());
- form = toolkit.createScrolledForm(parent);
- GridLayout formLayout = new GridLayout();
- formLayout.numColumns = 1;
- form.getBody().setLayout(formLayout);
- Label image = null;
-
- Section section = toolkit.createSection(form.getBody(), Section.DESCRIPTION);
- section.setText(TITLE + " ");
- Composite sectionClient = toolkit.createComposite(section);
- GridLayout layout = new GridLayout();
- layout.verticalSpacing = 0;
- layout.horizontalSpacing = 0;
- layout.verticalSpacing = 0;
- layout.marginHeight = 0;
- layout.marginTop = 0;
- sectionClient.setLayout(layout);
-
- Composite buttonsComposite = toolkit.createComposite(section);
- GridLayout buttonsLayout = new GridLayout();
- buttonsLayout.verticalSpacing = 0;
- buttonsLayout.verticalSpacing = 0;
- buttonsLayout.marginHeight = 0;
- buttonsLayout.marginWidth = 0;
- buttonsComposite.setLayout(buttonsLayout);
- section.setTextClient(buttonsComposite);
- final ImageHyperlink closeHyperlink = toolkit.createImageHyperlink(buttonsComposite, SWT.NONE);
- closeHyperlink.setLayout(buttonsLayout);
- closeHyperlink.setImage(TasksUiImages.getImage(TasksUiImages.NOTIFICATION_CLOSE));
- closeHyperlink.addHyperlinkListener(new HyperlinkAdapter() {
- @Override
- public void linkActivated(HyperlinkEvent e) {
- close();
- }
- });
-
- // TODO: get rid of ridiculous space-based padding
-
- Composite tasksComposite = toolkit.createComposite(form.getBody());
- tasksComposite.setLayout(new GridLayout(2, false));
-
- section = toolkit.createSection(tasksComposite, Section.TITLE_BAR);
- section.setText("Tasks");
- sectionClient = toolkit.createComposite(section);
- setSectionLayout(sectionClient, section, false);
-
- image = toolkit.createLabel(sectionClient, "");
- image.setImage(TasksUiImages.getImage(TasksUiImages.TASK));
- toolkit.createLabel(sectionClient, "Task ");
-
- image = toolkit.createLabel(sectionClient, "");
- image.setImage(TasksUiImages.getImage(TasksUiImages.CATEGORY));
- toolkit.createLabel(sectionClient, "Category");
-
- image = toolkit.createLabel(sectionClient, "");
- image.setImage(TasksUiImages.getImage(TasksUiImages.QUERY));
- toolkit.createLabel(sectionClient, "Query");
-
- image = toolkit.createLabel(sectionClient, "");
- image.setImage(TasksUiImages.getImage(TasksUiImages.CALENDAR));
- toolkit.createLabel(sectionClient, "Date range");
-
- image = toolkit.createLabel(sectionClient, "");
- image.setImage(TasksUiImages.getImage(TasksUiImages.BLANK));
-
-
- Hyperlink openView = toolkit.createHyperlink(sectionClient, "Open Task List...", SWT.NULL);
- openView.addHyperlinkListener(new IHyperlinkListener() {
-
- public void linkActivated(HyperlinkEvent e) {
- close();
- TaskListView.openInActivePerspective();
- }
-
- public void linkEntered(HyperlinkEvent e) {
- // ignore
- }
-
- public void linkExited(HyperlinkEvent e) {
- // ignore
- }
- });
-
-// image = toolkit.createLabel(sectionClient, "");
-
-
-
- section = toolkit.createSection(tasksComposite, Section.TITLE_BAR);
- section.setText("Priorities ");
- sectionClient = toolkit.createComposite(section);
- setSectionLayout(sectionClient, section, false);
-
- image = toolkit.createLabel(sectionClient, "");
- image.setImage(TasksUiImages.getImage(TasksUiImages.PRIORITY_1));
- toolkit.createLabel(sectionClient, PriorityLevel.P1.getDescription());
-
- image = toolkit.createLabel(sectionClient, "");
- image.setImage(TasksUiImages.getImage(TasksUiImages.PRIORITY_2));
- toolkit.createLabel(sectionClient, PriorityLevel.P2.getDescription());
-
- image = toolkit.createLabel(sectionClient, "");
- image.setImage(TasksUiImages.getImage(TasksUiImages.PRIORITY_3));
- toolkit.createLabel(sectionClient, PriorityLevel.P3.getDescription() + " (default)");
-
- image = toolkit.createLabel(sectionClient, "");
- image.setImage(TasksUiImages.getImage(TasksUiImages.PRIORITY_4));
- toolkit.createLabel(sectionClient, PriorityLevel.P4.getDescription());
-
- image = toolkit.createLabel(sectionClient, "");
- image.setImage(TasksUiImages.getImage(TasksUiImages.PRIORITY_5));
- toolkit.createLabel(sectionClient, PriorityLevel.P5.getDescription());
-
- section = toolkit.createSection(form.getBody(), Section.TITLE_BAR);
- section.setText("Task Activity ");
- sectionClient = toolkit.createComposite(section);
- setSectionLayout(sectionClient, section, false);
-
- image = toolkit.createLabel(sectionClient, "");
- image.setImage(TasksUiImages.getImage(TasksUiImages.TASK));
- Label labelOverdue = toolkit.createLabel(sectionClient, "Past scheduled date");
- labelOverdue.setForeground(themeManager.getCurrentTheme().getColorRegistry().get(
- TaskListColorsAndFonts.THEME_COLOR_TASK_OVERDUE));
-
- image = toolkit.createLabel(sectionClient, "");
- image.setImage(TasksUiImages.getImage(TasksUiImages.TASK));
- Label labelToday = toolkit.createLabel(sectionClient, "Scheduled for today");
- labelToday.setForeground(themeManager.getCurrentTheme().getColorRegistry().get(
- TaskListColorsAndFonts.THEME_COLOR_TASK_TODAY_SCHEDULED));
-
-// image = toolkit.createLabel(sectionClient, "");
-// image.setImage(TasksUiImages.getImage(TasksUiImages.TASK));
-// Label labelThisWeek = toolkit.createLabel(sectionClient, "Scheduled for this
-// week");
-// labelThisWeek.setForeground(themeManager.getCurrentTheme().getColorRegistry().get(
-// TaskListColorsAndFonts.THEME_COLOR_TASK_THISWEEK_SCHEDULED));
-
- image = toolkit.createLabel(sectionClient, "");
- image.setImage(TasksUiImages.getImage(TasksUiImages.TASK));
- Label labelCompleted = toolkit.createLabel(sectionClient, "Completed");
- labelCompleted.setFont(TaskListColorsAndFonts.STRIKETHROUGH);
-// labelCompleted.setForeground(TaskListColorsAndFonts.COLOR_TASK_COMPLETED);
- labelCompleted.setForeground(themeManager.getCurrentTheme().getColorRegistry().get(
- TaskListColorsAndFonts.THEME_COLOR_COMPLETED));
-
- image = toolkit.createLabel(sectionClient, "");
- image.setImage(TasksUiImages.getImage(TasksUiImages.TASK));
- Label labelCompletedToday = toolkit.createLabel(sectionClient, "Completed today");
- labelCompletedToday.setFont(TaskListColorsAndFonts.STRIKETHROUGH);
- labelCompletedToday.setForeground(themeManager.getCurrentTheme().getColorRegistry().get(
- TaskListColorsAndFonts.THEME_COLOR_TASK_TODAY_COMPLETED));
-
- image = toolkit.createLabel(sectionClient, "");
- image.setImage(TasksUiImages.getImage(TasksUiImages.OVERLAY_HAS_DUE));
- toolkit.createLabel(sectionClient, "Due date set");
-
- image = toolkit.createLabel(sectionClient, "");
- image.setImage(TasksUiImages.getImage(TasksUiImages.OVERLAY_OVER_DUE));
- toolkit.createLabel(sectionClient, "Due date past");
-
- image = toolkit.createLabel(sectionClient, "");
- image.setImage(TasksUiImages.getImage(TasksUiImages.BLANK));
- Hyperlink adjust = toolkit.createHyperlink(sectionClient, "Adjust Colors and Fonts...", SWT.NULL);
- adjust.addHyperlinkListener(new IHyperlinkListener() {
-
- public void linkActivated(HyperlinkEvent e) {
- PreferenceDialog dlg = PreferencesUtil.createPreferenceDialogOn(PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow()
- .getShell(), TasksUiUtil.PREFS_PAGE_ID_COLORS_AND_FONTS,
- new String[] { TasksUiUtil.PREFS_PAGE_ID_COLORS_AND_FONTS }, null);
- dlg.open();
- }
-
- public void linkEntered(HyperlinkEvent e) {
- // ignore
- }
-
- public void linkExited(HyperlinkEvent e) {
- // ignore
- }
- });
-
- section = toolkit.createSection(form.getBody(), Section.TITLE_BAR);
- section.setText("Task Context ");
- sectionClient = toolkit.createComposite(section);
- setSectionLayout(sectionClient, section, false);
-
- image = toolkit.createLabel(sectionClient, "");
- image.setImage(TasksUiImages.getImage(TasksUiImages.CONTEXT_FOCUS));
- toolkit.createLabel(sectionClient, "Focus view on active task");
-
- image = toolkit.createLabel(sectionClient, "");
- image.setImage(TasksUiImages.getImage(TasksUiImages.TASK_INACTIVE));
- toolkit.createLabel(sectionClient, "Inactive task with no context");
-
- image = toolkit.createLabel(sectionClient, "");
- image.setImage(TasksUiImages.getImage(TasksUiImages.TASK_INACTIVE_CONTEXT));
- toolkit.createLabel(sectionClient, "Inactive task with context");
-
- image = toolkit.createLabel(sectionClient, "");
- image.setImage(TasksUiImages.getImage(TasksUiImages.TASK_ACTIVE));
- toolkit.createLabel(sectionClient, "Active task");
-
- section = toolkit.createSection(form.getBody(), Section.TITLE_BAR);
- section.setText("Synchronization ");
- sectionClient = toolkit.createComposite(section);
- setSectionLayout(sectionClient, section, true);
-
- image = toolkit.createLabel(sectionClient, "");
- image.setImage(TasksUiImages.getImage(TasksUiImages.OVERLAY_INCOMMING_NEW));
- toolkit.createLabel(sectionClient, "New task, open to view");
-
- image = toolkit.createLabel(sectionClient, "");
- image.setImage(TasksUiImages.getImage(TasksUiImages.OVERLAY_INCOMMING));
- toolkit.createLabel(sectionClient, "Incoming changes, open to view");
-
- image = toolkit.createLabel(sectionClient, "");
- image.setImage(TasksUiImages.getImage(TasksUiImages.OVERLAY_OUTGOING));
- toolkit.createLabel(sectionClient, "Outgoing changes");
-
- image = toolkit.createLabel(sectionClient, "");
- image.setImage(TasksUiImages.getImage(TasksUiImages.OVERLAY_WARNING));
- toolkit.createLabel(sectionClient, "Synchronization failed, mouse over for details");
-
- image = toolkit.createLabel(sectionClient, "");
- image.setImage(TasksUiImages.getImage(TasksUiImages.OVERLAY_CONFLICT));
- toolkit.createLabel(sectionClient, "Conflicting changes, need to synchronize");
-
- // Connector specifics
- Composite connectorComposite = toolkit.createComposite(form.getBody());
- connectorComposite.setLayout(new GridLayout(3, false));
-
- GridData gridData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING, GridData.VERTICAL_ALIGN_BEGINNING, false, false);
- gridData.verticalIndent = 0;
- connectorComposite.setData(gridData);
-
- Collection<AbstractRepositoryConnector> connectors = TasksUiPlugin.getRepositoryManager()
- .getRepositoryConnectors();
- for (AbstractRepositoryConnector connector : connectors) {
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(connector.getConnectorKind());
- if (connectorUi != null) {
- List<AbstractTaskContainer> elements = connectorUi.getLegendItems();
-
- if (!elements.isEmpty()) {
- section = toolkit.createSection(connectorComposite, Section.TITLE_BAR | SWT.TOP);
- String label = connector.getLabel();
- int parenIndex = label.indexOf('(');
- if (parenIndex != -1) {
- label = label.substring(0, parenIndex);
- }
-
- section.setText(label);
- sectionClient = toolkit.createComposite(section);
- setSectionLayout(sectionClient, section, false);
-
- for (AbstractTaskContainer taskListElement : elements) {
- image = toolkit.createLabel(sectionClient, "");
- image.setImage(labelProvider.getImage(taskListElement));
- toolkit.createLabel(sectionClient, taskListElement.getSummary());
- }
- if (elements.size() < 4) {
- image = toolkit.createLabel(sectionClient, "");
- toolkit.createLabel(sectionClient, "");
- }
- }
- }
- }
-
- Hyperlink gettingStartedLink = toolkit.createHyperlink(form.getBody(), "Also see the Getting Started documentation online", SWT.NULL);
- gettingStartedLink.addHyperlinkListener(new IHyperlinkListener() {
-
- public void linkActivated(HyperlinkEvent e) {
- close();
- TasksUiUtil.openUrl("http://www.eclipse.org/mylyn/start/", false);
- }
-
- public void linkEntered(HyperlinkEvent e) {
- // ignore
- }
-
- public void linkExited(HyperlinkEvent e) {
- // ignore
- }
- });
-
- form.pack();
- return parent;
- }
-
- private GridLayout setSectionLayout(Composite sectionClient, Section section, boolean extraPadding) {
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.makeColumnsEqualWidth = false;
- layout.verticalSpacing = 0;
- if (extraPadding) {
- layout.verticalSpacing = 5;
- layout.horizontalSpacing = 8;
- } else {
- layout.horizontalSpacing = 5;
- layout.verticalSpacing = 1;
- }
- layout.marginHeight = 0;
- layout.marginTop = 0;
- sectionClient.setLayout(layout);
- section.setClient(sectionClient);
-
- GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
- gridData.grabExcessHorizontalSpace = true;
- gridData.verticalSpan = 2;
- sectionClient.setLayoutData(gridData);
-
- return layout;
- }
-}
diff --git a/org.eclipse.mylyn.tasks.core/.classpath b/org.eclipse.mylyn.tasks.core/.classpath
deleted file mode 100644
index a4c8de8d9..000000000
--- a/org.eclipse.mylyn.tasks.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.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="con" path="org.eclipse.pde.core.requiredPlugins">
- <accessrules>
- <accessrule kind="accessible" pattern="**/internal/**"/>
- </accessrules>
- </classpathentry>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/org.eclipse.mylyn.tasks.core/.cvsignore b/org.eclipse.mylyn.tasks.core/.cvsignore
deleted file mode 100644
index 4a98758e6..000000000
--- a/org.eclipse.mylyn.tasks.core/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-bin
-.fbwarnings
diff --git a/org.eclipse.mylyn.tasks.core/.project b/org.eclipse.mylyn.tasks.core/.project
deleted file mode 100644
index d1d3e6eed..000000000
--- a/org.eclipse.mylyn.tasks.core/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.mylyn.tasks.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>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
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 888de1277..000000000
--- a/org.eclipse.mylyn.tasks.core/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,316 +0,0 @@
-#Sun Jun 24 11:52:58 EDT 2007
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.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=disabled
-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.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.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
-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=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-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.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.5
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=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_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 \ No newline at end of file
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 1e4caec9f..000000000
--- a/org.eclipse.mylyn.tasks.core/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,6 +0,0 @@
-#Mon Jul 09 18:11:45 PDT 2007
-eclipse.preferences.version=1
-formatter_profile=_Mylar based on Eclipse [built-in]
-formatter_settings_version=11
-internal.default.compliance=default
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return the ${bare_field_name}\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} the ${bare_field_name} to set\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\r\n * \r\n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author ${user}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*******************************************************************************\r\n * Copyright (c) 2004, 2007 Mylyn project committers and others.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n *******************************************************************************/\r\n\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ignore\r\n${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ignore</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template></templates>
diff --git a/org.eclipse.mylyn.tasks.core/.settings/org.eclipse.ltk.core.refactoring.prefs b/org.eclipse.mylyn.tasks.core/.settings/org.eclipse.ltk.core.refactoring.prefs
deleted file mode 100644
index 7ab03bdac..000000000
--- a/org.eclipse.mylyn.tasks.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.tasks.core/.settings/org.eclipse.mylar.tasklist.prefs b/org.eclipse.mylyn.tasks.core/.settings/org.eclipse.mylar.tasklist.prefs
deleted file mode 100644
index a6cf96a98..000000000
--- a/org.eclipse.mylyn.tasks.core/.settings/org.eclipse.mylar.tasklist.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Fri Oct 20 16:54:30 PDT 2006
-eclipse.preferences.version=1
-project.repository.kind=bugzilla
-project.repository.url=https\://bugs.eclipse.org/bugs
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/.settings/org.eclipse.mylyn.tasks.ui.prefs b/org.eclipse.mylyn.tasks.core/.settings/org.eclipse.mylyn.tasks.ui.prefs
deleted file mode 100644
index d8c6d26af..000000000
--- a/org.eclipse.mylyn.tasks.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.tasks.core/.settings/org.eclipse.pde.prefs b/org.eclipse.mylyn.tasks.core/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index 769b229ff..000000000
--- a/org.eclipse.mylyn.tasks.core/.settings/org.eclipse.pde.prefs
+++ /dev/null
@@ -1,12 +0,0 @@
-#Thu Nov 03 15:45:55 PST 2005
-compilers.p.deprecated=2
-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-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.core/META-INF/MANIFEST.MF b/org.eclipse.mylyn.tasks.core/META-INF/MANIFEST.MF
deleted file mode 100644
index d507fa3a0..000000000
--- a/org.eclipse.mylyn.tasks.core/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,15 +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: 2.1.0.v20070924-2200
-Eclipse-AutoStart: true
-Bundle-Vendor: Eclipse.org
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.mylyn.context.core,
- org.eclipse.mylyn,
- org.eclipse.mylyn.monitor.core,
- org.eclipse.mylyn.web.core
-Export-Package: org.eclipse.mylyn.internal.tasks.core,
- org.eclipse.mylyn.tasks.core
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-user.xml b/org.eclipse.mylyn.tasks.core/build-user.xml
deleted file mode 100644
index 6097713f2..000000000
--- a/org.eclipse.mylyn.tasks.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.tasks.core/build.properties b/org.eclipse.mylyn.tasks.core/build.properties
deleted file mode 100644
index 845e84a96..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,\
- .
-src.includes = plugin.xml,\
- src/,\
- META-INF/
-jre.compilation.profile = J2SE-1.5
-source.. = src/
diff --git a/org.eclipse.mylyn.tasks.core/icons/elcl16/edge-ref-bug.gif b/org.eclipse.mylyn.tasks.core/icons/elcl16/edge-ref-bug.gif
deleted file mode 100644
index 9cfd7ec58..000000000
--- a/org.eclipse.mylyn.tasks.core/icons/elcl16/edge-ref-bug.gif
+++ /dev/null
Binary files differ
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/pom.xml b/org.eclipse.mylyn.tasks.core/pom.xml
deleted file mode 100644
index 97adc8cfb..000000000
--- a/org.eclipse.mylyn.tasks.core/pom.xml
+++ /dev/null
@@ -1,137 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.eclipse.mylyn.tasks</groupId>
- <artifactId>core</artifactId>
- <version>2.0.0-v20070706-2000</version>
- <packaging>jar</packaging>
- <name>Mylyn Tasks Core</name>
- <url>http://www.eclipse.org/mylyn</url>
- <description>
- Eclipse Mylyn is a task-focused UI that reduces information overload and
- makes multi-tasking easy.
- </description>
-
- <organization>
- <name>Eclipse Foundation</name>
- <url>http://www.eclipse.org</url>
- </organization>
-
- <licenses>
- <license>
- <name>Eclipse Public License</name>
- <url>http://www.eclipse.org/org/documents/epl-v10.html</url>
- <distribution>repo</distribution>
- </license>
- </licenses>
-
- <scm>
- <connection>
- scm:cvs:pserver:anonymous:@dev.eclipse.org:/cvsroot/tools:org.eclipse.mylyn/org.eclipse.mylyn.tasks.core
- </connection>
- <url>
- http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.mylyn/org.eclipse.mylyn.tasks.core/?root&#61;Tools_Project
- </url>
- </scm>
-
- <issueManagement>
- <system>Bugzilla</system>
- <url>https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Mylyn</url>
- </issueManagement>
-
- <repositories>
- <repository>
- <id>central-eclipse</id>
- <name>Central Eclipse Repository</name>
- <url>http://repo1.maven.org/eclipse</url>
- </repository>
- </repositories>
-
- <dependencies>
- <dependency>
- <groupId>org.eclipse</groupId>
- <artifactId>osgi</artifactId>
- <version>3.3.0-v20070530</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.eclipse.core</groupId>
- <artifactId>runtime</artifactId>
- <version>3.3.100-v20070530</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.eclipse.equinox</groupId>
- <artifactId>common</artifactId>
- <version>3.3.0-v20070426</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.eclipse.mylyn.context</groupId>
- <artifactId>core</artifactId>
- <version>2.0.0-v20070706-2000</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.eclipse.mylyn.monitor</groupId>
- <artifactId>core</artifactId>
- <version>2.0.0-v20070706-2000</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.eclipse.mylyn.web</groupId>
- <artifactId>core</artifactId>
- <version>2.0.0-v20070706-2000</version>
- <scope>compile</scope>
- </dependency>
- </dependencies>
-
- <build>
- <sourceDirectory>src</sourceDirectory>
- <resources>
- <resource>
- <directory>.</directory>
- <includes>
- <include>about.html</include>
- <include>plugin.xml</include>
- </includes>
- </resource>
- </resources>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <showDeprecation>true</showDeprecation>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <archive>
- <manifestFile>META-INF/MANIFEST.MF</manifestFile>
- </archive>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-changelog-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jxr-plugin</artifactId>
- </plugin>
- </plugins>
- </reporting>
-
-</project>
diff --git a/org.eclipse.mylyn.tasks.core/schema/templates.exsd b/org.eclipse.mylyn.tasks.core/schema/templates.exsd
deleted file mode 100644
index 9038e77bd..000000000
--- a/org.eclipse.mylyn.tasks.core/schema/templates.exsd
+++ /dev/null
@@ -1,194 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.mylyn.tasks.core">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.mylyn.tasks.core" id="templates" name="templates"/>
- </appInfo>
- <documentation>
- Templates describing default parameters for new repository configurations.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="repository" 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="repository">
- <complexType>
- <sequence>
- <element ref="attribute" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="label" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="urlRepository" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="repositoryKind" type="string" use="required">
- <annotation>
- <documentation>
- Connector Kind, as declared by the Connector (e.g. &quot;bugzilla&quot;).
- </documentation>
- </annotation>
- </attribute>
- <attribute name="version" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="urlNewAccount" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="characterEncoding" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="urlNewTask" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="urlTask" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="urlTaskQuery" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="addAutomatically" type="boolean">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="anonymous" type="boolean">
- <annotation>
- <documentation>
- True if an anonymous login is accepted for this repository.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="attribute">
- <complexType>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="value" 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>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
-</schema>
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 544b63f60..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 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/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/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/ITaskRepositoryFilter.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ITaskRepositoryFilter.java
deleted file mode 100644
index 75442e176..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ITaskRepositoryFilter.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;
-
-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();
- }
- };
-
- 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();
- }
- };
-
- boolean accept(TaskRepository repository, AbstractRepositoryConnector connector);
-
-}
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 bff9b3e85..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/LocalAttachment.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;
-
-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.tasks.core.ITaskAttachment;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-
-/**
- * A class representing a local attachment.
- *
- * @author Jeff Pound
- * @since 2.0
- */
-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 a7cd57ef5..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/LocalRepositoryConnector.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.internal.tasks.core;
-
-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.mylyn.tasks.core.AbstractAttachmentHandler;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskDataHandler;
-import org.eclipse.mylyn.tasks.core.ITaskCollector;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-/**
- * @author Rob Elves
- */
-public class LocalRepositoryConnector extends AbstractRepositoryConnector {
-
- public static final String REPOSITORY_LABEL = "Local Tasks";
-
- public static final String REPOSITORY_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 AbstractTask createTask(String repositoryUrl, String id, String summary) {
- return new LocalTask(id, summary);
- }
-
- @Override
- public AbstractAttachmentHandler getAttachmentHandler() {
- // TODO: Implement local attachments
- return null;
- }
-
- @Override
- public boolean markStaleTasks(TaskRepository repository, Set<AbstractTask> tasks, IProgressMonitor monitor) {
- return false;
- }
-
- @Override
- public String getLabel() {
- return "Local Task Repository";
- }
-
- @Override
- public String getConnectorKind() {
- return REPOSITORY_KIND;
- }
-
- @Override
- public String getRepositoryUrlFromTaskUrl(String taskFullUrl) {
- // ignore
- return null;
- }
-
- @Override
- public AbstractTaskDataHandler getTaskDataHandler() {
- // not currently needed
- 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(AbstractRepositoryQuery query, TaskRepository repository, IProgressMonitor monitor,
- ITaskCollector resultCollector) {
- // ignore
- return null;
- }
-
- @Override
- public void updateAttributes(TaskRepository repository, IProgressMonitor monitor) throws CoreException {
- // ignore
-
- }
-
- @Override
- public void updateTaskFromRepository(TaskRepository repository, AbstractTask repositoryTask,
- IProgressMonitor monitor) throws CoreException {
- // ignore
-
- }
-
- @Override
- public void updateTaskFromTaskData(TaskRepository repository, AbstractTask repositoryTask,
- RepositoryTaskData taskData) {
- // ignore
-
- }
-
- @Override
- public boolean isUserManaged() {
- return false;
- }
-
-}
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 d0dec629c..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/LocalTask.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;
-
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-
-/**
- * @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.REPOSITORY_KIND;
- }
-
- @Override
- public boolean isNotified() {
- return true;
- }
-
- @Override
- public String getLastReadTimeStamp() {
- return SYNC_DATE_NOW;
- }
-
- @Override
- public String getOwner() {
- return LocalRepositoryConnector.REPOSITORY_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 687637168..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.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskListFactory;
-import org.w3c.dom.Element;
-
-/**
- * @author Rob Elves
- */
-public class LocalTaskListFactory extends AbstractTaskListFactory {
-
- @Override
- public boolean canCreate(AbstractTask 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 8711bac95..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/OfflineDataStore.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.core;
-
-import java.io.Serializable;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.eclipse.mylyn.tasks.core.RepositoryTaskAttribute;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-
-/**
- * This object holds RepositoryTaskData and is serialized to disk for offline storage.
- *
- * @author Rob Elves
- */
-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 Map<String, Set<RepositoryTaskAttribute>> localEdits = new ConcurrentHashMap<String, Set<RepositoryTaskAttribute>>();
-
- /** Older version of Task Data */
- private Map<String, RepositoryTaskData> oldTaskDataMap = new ConcurrentHashMap<String, RepositoryTaskData>();
-
- /** Newest version of the task data */
- private Map<String, RepositoryTaskData> newTaskDataMap = new ConcurrentHashMap<String, RepositoryTaskData>();
-
- /** New unsubmitted repository task data */
- private 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 6db69e0a6..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/Person.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.core;
-
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-
-/**
- * @author Rob Elves
- */
-public class Person extends AbstractTaskContainer {
-
- private String connectorKind;
-
- private 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/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/SaxRepositoriesContentHandler.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/SaxRepositoriesContentHandler.java
deleted file mode 100644
index 60cc999b5..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.internal.monitor.core.util.XmlStringConverter;
-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 Set<TaskRepository> taskRepositories = new HashSet<TaskRepository>();
-
- @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 = XmlStringConverter.convertXmlToString(attributes.getValue(IRepositoryConstants.PROPERTY_CONNECTOR_KIND));
- String url = 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 = XmlStringConverter.convertXmlToString(attributes.getLocalName(index));
- String value = 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 6f8ea6715..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/SaxRepositoriesWriter.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.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.mylyn.internal.monitor.core.util.XmlStringConverter;
-import org.eclipse.mylyn.monitor.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.fail(e, "could not write repositories", false);
- throw new IOException(e.getMessage());
- }
-
- }
-
- private static class TaskRepositoriesInputSource extends InputSource {
- private 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;
- }
-
- 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, "",
- 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 d55cc7a92..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ScheduledTaskContainer.java
+++ /dev/null
@@ -1,226 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 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;
-import java.util.GregorianCalendar;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskCategory;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-
-/**
- * @author Rob Elves
- * @author Mik Kersten
- */
-public class ScheduledTaskContainer extends AbstractTaskCategory {
-
- private Set<ScheduledTaskDelegate> dateRangeDelegates = new HashSet<ScheduledTaskDelegate>();
-
- private Calendar startDate;
-
- private Calendar endDate;
-
- private TaskActivityManager activityManager;
-
- public ScheduledTaskContainer(TaskActivityManager activityManager, GregorianCalendar startDate,
- GregorianCalendar endDate, String description) {
- super(description);
- this.activityManager = activityManager;
- this.startDate = startDate;
- this.endDate = endDate;
- }
-
- public ScheduledTaskContainer(TaskActivityManager activityManager, Calendar startDate, Calendar endDate,
- String description) {
- super(description);
- this.activityManager = activityManager;
- this.startDate = startDate;
- this.endDate = endDate;
- }
-
- public ScheduledTaskContainer(TaskActivityManager activityManager, Date time, Date time2, String description) {
- super(description);
- this.activityManager = activityManager;
- startDate = new GregorianCalendar();
- startDate.setTime(time);
- endDate = new GregorianCalendar();
- endDate.setTime(time2);
- // this.description = summary;
- }
-
- public boolean includes(Calendar cal) {
- return (startDate.getTimeInMillis() <= cal.getTimeInMillis())
- && (endDate.getTimeInMillis() >= cal.getTimeInMillis());
- }
-
- public Calendar getStart() {
- return startDate;
- }
-
- public Calendar getEnd() {
- return endDate;
- }
-
- public long getTotalElapsed() {
- long elapsed = 0;
- for (AbstractTask task : getChildren()) {
- elapsed += activityManager.getElapsedTime(task, getStart(), getEnd());
- }
- return elapsed;
- }
-
- public long getElapsed(AbstractTask task) {
- return activityManager.getElapsedTime(task, getStart(), getEnd());
- }
-
- public long getTotalEstimated() {
- long totalEstimated = 0;
- for (AbstractTask task : dateRangeDelegates) {
- totalEstimated += task.getEstimateTimeHours();
- }
- return totalEstimated;
- }
-
- public boolean isArchive() {
- return false;
- }
-
- public void setIsArchive(boolean isArchive) {
- // ignore
- }
-
- @Override
- public String getPriority() {
- return "";
- }
-
- @Override
- public void setHandleIdentifier(String id) {
- // ignore
- }
-
- public Set<ScheduledTaskDelegate> getDateRangeDelegates() {
- return dateRangeDelegates;
- }
-
- public boolean isFuture() {
- return !isPresent() && getStart().after(Calendar.getInstance());
- }
-
- public boolean isPresent() {
- return getStart().before(Calendar.getInstance()) && getEnd().after(Calendar.getInstance());
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = super.hashCode();
- 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 (this == obj)
- return true;
- if (!super.equals(obj))
- return false;
- if (getClass() != obj.getClass())
- return false;
- ScheduledTaskContainer other = (ScheduledTaskContainer) 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;
- }
-
- /**
- * The handle for most containers is their summary. Override to specify a different natural ordering.
- */
- @Override
- public int compareTo(AbstractTaskContainer taskListElement) {
- return startDate.compareTo(((ScheduledTaskContainer) taskListElement).startDate);
- }
-
- @Override
- public boolean isUserDefined() {
- return false;
- }
-
- @Override
- public Set<AbstractTask> getChildren() {
- Set<AbstractTask> children = new HashSet<AbstractTask>();
- if (isPresent()) {
- // add all overdue
- Calendar beginning = Calendar.getInstance();
- beginning.setTimeInMillis(0);
- Calendar end = Calendar.getInstance();
- end.set(5000, 12, 1);
- for (AbstractTask task : activityManager.getDueTasks(beginning, getStart())) {
- if (activityManager.isOverdue(task)) {
- children.add(task);
- }
- }
-
- // add all over scheduled
- for (AbstractTask task : activityManager.getScheduledTasks(beginning, getStart())) {
- if (task.isPastReminder() && !task.isCompleted()) {
- children.add(task);
- }
- }
- children.addAll(activityManager.getActiveTasks(getStart(), getEnd()));
- children.addAll(activityManager.getScheduledTasks(getStart(), getEnd()));
- for (AbstractTask task : activityManager.getDueTasks(getStart(), getEnd())) {
- if (activityManager.isOwnedByUser(task)) {
- children.add(task);
- }
- }
-
- // if not scheduled or due in future, and is active, place in today bin
- AbstractTask activeTask = activityManager.getActiveTask();
- if (activeTask != null && !children.contains(activeTask)) {
- Set<AbstractTask> futureScheduled = activityManager.getScheduledTasks(getStart(), end);
- for (AbstractTask task : activityManager.getDueTasks(getStart(), end)) {
- if (activityManager.isOwnedByUser(task)) {
- futureScheduled.add(task);
- }
- }
- if (!futureScheduled.contains(activeTask)) {
- children.add(activeTask);
- }
- }
- return children;
- } else if (isFuture()) {
- children.addAll(activityManager.getScheduledTasks(getStart(), getEnd()));
- for (AbstractTask task : activityManager.getDueTasks(getStart(), getEnd())) {
- if (activityManager.isOwnedByUser(task)) {
- children.add(task);
- }
- }
- return children;
- } else {
- children.addAll(activityManager.getActiveTasks(getStart(), getEnd()));
- return children;
-
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ScheduledTaskDelegate.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ScheduledTaskDelegate.java
deleted file mode 100644
index 4429a2bad..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/ScheduledTaskDelegate.java
+++ /dev/null
@@ -1,288 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 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;
-import java.util.Set;
-
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-
-/**
- * @author Rob Elves
- * @author Mik Kersten
- */
-public class ScheduledTaskDelegate extends AbstractTask {
-
- private AbstractTask task = null;
-
- private ScheduledTaskContainer parent;
-
- private long startMili = 0;
-
- private long endMili = 0;
-
- private long activity = 0;
-
- public ScheduledTaskDelegate(ScheduledTaskContainer parent, AbstractTask task, Calendar start, Calendar end) {
- this(parent, task, start, end, 0);
- }
-
- public ScheduledTaskDelegate(ScheduledTaskContainer parent, AbstractTask task, Calendar start, Calendar end,
- long activity) {
- super(task.getRepositoryUrl(), task.getTaskId(), task.getSummary());
- this.task = task;
- if (start != null) {
- this.startMili = start.getTimeInMillis();
- }
- if (end != null) {
- this.endMili = end.getTimeInMillis();
- }
- this.parent = parent;
- this.activity = activity;
- }
-
- public long getEnd() {
- return endMili;
- }
-
- public long getStart() {
- return startMili;
- }
-
- public long getActivity() {
- return activity;
- }
-
- public AbstractTask getCorrespondingTask() {
- return task;
- }
-
- public ScheduledTaskContainer getDateRangeContainer() {
- return parent;
- }
-
- @Override
- public Set<AbstractTaskContainer> getParentContainers() {
- return task.getParentContainers();
- }
-
- @Override
- public Set<AbstractTask> getChildren() {
- return task.getChildren();
- }
-
- @Override
- public Date getCompletionDate() {
- return task.getCompletionDate();
- }
-
- @Override
- public Date getCreationDate() {
- return task.getCreationDate();
- }
-
- @Override
- public String getSummary() {
- return task.getSummary();
- }
-
- @Override
- public int getEstimateTimeHours() {
- return task.getEstimateTimeHours();
- }
-
- @Override
- public String getTaskKind() {
- return task.getTaskKind();
- }
-
- @Override
- public String getNotes() {
- return task.getNotes();
- }
-
- @Override
- public String getPriority() {
- return task.getPriority();
- }
-
- @Override
- public Date getScheduledForDate() {
- return task.getScheduledForDate();
- }
-
- @Override
- public String getUrl() {
- return task.getUrl();
- }
-
- @Override
- public boolean isReminded() {
- return task.isReminded();
- }
-
- @Override
- public boolean hasValidUrl() {
- return task.hasValidUrl();
- }
-
- @Override
- public boolean isActive() {
- return task.isActive();
- }
-
- @Override
- public boolean isCompleted() {
- return task.isCompleted();
- }
-
- @Override
- public boolean isPastReminder() {
- return task.isPastReminder();
- }
-
- @Override
- public void setActive(boolean active) {
- task.setActive(active);
- }
-
- @Override
- public void addParentContainer(AbstractTaskContainer container) {
- task.addParentContainer(container);
- }
-
- @Override
- public void removeParentContainer(AbstractTaskContainer container) {
- task.removeParentContainer(container);
- }
-
- @Override
- public void setCompleted(boolean completed) {
- task.setCompleted(completed);
- }
-
- @Override
- public void setCompletionDate(Date date) {
- task.setCompletionDate(date);
- }
-
- @Override
- public void setCreationDate(Date date) {
- task.setCreationDate(date);
- }
-
- @Override
- public void setEstimatedTimeHours(int estimated) {
- task.setEstimatedTimeHours(estimated);
- }
-
- // public void setHandleIdentifier(String taskId) {
- // task.setHandleIdentifier(taskId);
- // }
-
- @Override
- public void setTaskKind(String kind) {
- task.setTaskKind(kind);
- }
-
- @Override
- public void setNotes(String notes) {
- task.setNotes(notes);
- }
-
- @Override
- public void setPriority(String priority) {
- task.setPriority(priority);
- }
-
- @Override
- public void setReminded(boolean reminded) {
- task.setReminded(reminded);
- }
-
- @Override
- public void setScheduledForDate(Date date) {
- task.setScheduledForDate(date);
- }
-
- @Override
- public void setUrl(String url) {
- task.setUrl(url);
- }
-
- @Override
- public int compareTo(AbstractTaskContainer taskListElement) {
- return task.toString().compareTo(((AbstractTask) taskListElement).toString());
- }
-
- @Override
- public void setSummary(String description) {
- task.setSummary(description);
- }
-
- @Override
- public Date getDueDate() {
- return task.getDueDate();
- }
-
- @Override
- public void setDueDate(Date date) {
- task.setDueDate(date);
- }
-
- @Override
- public boolean isLocal() {
- return task.isLocal();
- }
-
- @Override
- public String getConnectorKind() {
- return task.getConnectorKind();
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = super.hashCode();
- result = prime * result + (int) (endMili ^ (endMili >>> 32));
- result = prime * result + ((parent == null) ? 0 : parent.hashCode());
- result = prime * result + (int) (startMili ^ (startMili >>> 32));
- result = prime * result + ((task == null) ? 0 : task.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (!super.equals(obj))
- return false;
- if (getClass() != obj.getClass())
- return false;
- ScheduledTaskDelegate other = (ScheduledTaskDelegate) obj;
- if (endMili != other.endMili)
- return false;
- if (parent == null) {
- if (other.parent != null)
- return false;
- } else if (!parent.equals(other.parent))
- return false;
- if (startMili != other.startMili)
- return false;
- if (task == null) {
- if (other.task != null)
- return false;
- } else if (!task.equals(other.task))
- return false;
- return true;
- }
-
-}
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 068a4b9d5..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskActivityManager.java
+++ /dev/null
@@ -1,757 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 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.Collections;
-import java.util.Date;
-import java.util.GregorianCalendar;
-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.mylyn.context.core.ContextCorePlugin;
-import org.eclipse.mylyn.context.core.IInteractionContext;
-import org.eclipse.mylyn.context.core.IInteractionContextListener;
-import org.eclipse.mylyn.context.core.IInteractionElement;
-import org.eclipse.mylyn.internal.context.core.InteractionContextManager;
-import org.eclipse.mylyn.monitor.core.InteractionEvent;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.TaskList;
-import org.eclipse.mylyn.tasks.core.TaskRepositoryManager;
-
-/**
- * Manager for Task timing, scheduling, due dates, and activation history
- *
- * TODO: Consider extracting a TaskPlanningManager to hold scheduling and calendar ranges
- *
- * @since 2.1
- * @author Rob Elves
- */
-public class TaskActivityManager {
-
- private static final int NUM_WEEKS_PREVIOUS_START = -1;
-
- private static final int NUM_WEEKS_PREVIOUS_END = -1;
-
- private static final int NUM_WEEKS_NEXT = 1;
-
- private static final int NUM_WEEKS_FUTURE_START = 2;
-
- private static final int NUM_WEEKS_PAST_END = -2;
-
- private static final String DESCRIPTION_THIS_WEEK = "This Week";
-
- private static final String DESCRIPTION_PREVIOUS_WEEK = "Previous Week";
-
- private static final String DESCRIPTION_NEXT_WEEK = "Next Week";
-
- private static final String DESCRIPTION_FUTURE = "Future";
-
- private static final String DESCRIPTION_PAST = "Past";
-
- private SortedMap<Calendar, Set<AbstractTask>> scheduledTasks = Collections.synchronizedSortedMap(new TreeMap<Calendar, Set<AbstractTask>>());
-
- private SortedMap<Calendar, Set<AbstractTask>> dueTasks = Collections.synchronizedSortedMap(new TreeMap<Calendar, Set<AbstractTask>>());
-
- private SortedMap<Calendar, Set<AbstractTask>> activeTasks = Collections.synchronizedSortedMap(new TreeMap<Calendar, Set<AbstractTask>>());
-
- private Map<AbstractTask, SortedMap<Calendar, Long>> taskElapsedTimeMap = new ConcurrentHashMap<AbstractTask, SortedMap<Calendar, Long>>();
-
- private List<ScheduledTaskContainer> scheduleWeekDays = new ArrayList<ScheduledTaskContainer>();
-
- private ArrayList<ScheduledTaskContainer> scheduleContainers = new ArrayList<ScheduledTaskContainer>();
-
- private ScheduledTaskContainer scheduledThisWeek;
-
- private ScheduledTaskContainer scheduledNextWeek;
-
- private ScheduledTaskContainer scheduledFuture;
-
- private ScheduledTaskContainer scheduledPast;
-
- private ScheduledTaskContainer scheduledPrevious;
-
- private int timeTicks;
-
- private int startHour = 9;
-
- private int endHour = 17;
-
- private boolean taskActivityHistoryInitialized = false;
-
- private TaskList taskList;
-
- private TaskRepositoryManager repositoryManager;
-
- private int startDay = Calendar.MONDAY;
-
- private int endDay = Calendar.SUNDAY;
-
- private Date startTime = new Date();
-
- private static TaskActivityManager INSTANCE;
-
- private TaskActivityManager() {
- // SINGLETON
- }
-
- public static synchronized TaskActivityManager getInstance() {
- if (INSTANCE == null) {
- INSTANCE = new TaskActivityManager();
- }
- return INSTANCE;
- }
-
- public void init(TaskRepositoryManager repositoryManager, TaskList taskList) {
- this.taskList = taskList;
- this.repositoryManager = repositoryManager;
- if (!isInitialized) {
- ContextCorePlugin.getContextManager().addActivityMetaContextListener(CONTEXT_LISTENER);
- }
- isInitialized = true;
- }
-
- public void dispose() {
- ContextCorePlugin.getContextManager().removeActivityMetaContextListener(CONTEXT_LISTENER);
- }
-
- public int getStartDay() {
- return startDay;
- }
-
- public void setStartDay(int startDay) {
- this.startDay = startDay;
- }
-
- public int getEndDay() {
- return endDay;
- }
-
- public void setEndDay(int endDay) {
- this.endDay = endDay;
- }
-
- public int getStartHour() {
- return startHour;
- }
-
- public void setStartHour(int startHour) {
- this.startHour = startHour;
- }
-
- public void setEndHour(int endHour) {
- this.endHour = endHour;
- }
-
- public int getEndHour() {
- return endHour;
- }
-
- private void clear() {
- dueTasks.clear();
- scheduledTasks.clear();
- activeTasks.clear();
- taskElapsedTimeMap.clear();
- }
-
- public void reloadTimingData(Date date) {
- startTime = date;
- taskActivityHistoryInitialized = false;
- clear();
- List<InteractionEvent> events = ContextCorePlugin.getContextManager()
- .getActivityMetaContext()
- .getInteractionHistory();
- for (InteractionEvent event : events) {
- parseInteractionEvent(event);
- }
- reloadScheduledData();
- setupCalendarRanges();
- taskActivityHistoryInitialized = true;
- }
-
- /** public for testing * */
- public void parseInteractionEvent(InteractionEvent event) {
- try {
- if (event.getKind().equals(InteractionEvent.Kind.ATTENTION)
- && (event.getDelta().equals(InteractionContextManager.ACTIVITY_DELTA_ADDED) || event.getDelta()
- .equals("add"))) {
- AbstractTask activatedTask = taskList.getTask(event.getStructureHandle());
-
- if (activatedTask != null) {
-
- addElapsedTimeForEvent(activatedTask, event);
-
- timeTicks++;
- if (taskActivityHistoryInitialized && timeTicks > 3) {
- // Save incase of system failure.
- // TODO: request asynchronous save
- ContextCorePlugin.getContextManager().saveActivityContext();
- timeTicks = 0;
- }
- }
- return;
- }
- } catch (Throwable t) {
- StatusHandler.fail(t, "Error parsing interaction event", false);
- }
- }
-
- private void addElapsedTimeForEvent(AbstractTask activatedTask, InteractionEvent event) {
- SortedMap<Calendar, Long> activityMap = taskElapsedTimeMap.get(activatedTask);
- if (activityMap == null) {
- activityMap = Collections.synchronizedSortedMap(new TreeMap<Calendar, Long>());
- taskElapsedTimeMap.put(activatedTask, activityMap);
- }
-
- long attentionSpan = event.getEndDate().getTime() - event.getDate().getTime();
-
- // Ignore any potential negative or zero times
- if (attentionSpan <= 0)
- return;
-
- // granularity to the hour
- Calendar hourOfDay = Calendar.getInstance();
- hourOfDay.setTime(event.getDate());
- 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(activatedTask);
- }
-
- private void addScheduledTask(AbstractTask task) {
- Calendar time = Calendar.getInstance();
- time.setTime(task.getScheduledForDate());
- snapToStartOfHour(time);
- Set<AbstractTask> tasks = scheduledTasks.get(time);
- if (tasks == null) {
- tasks = new CopyOnWriteArraySet<AbstractTask>();
- scheduledTasks.put(time, tasks);
- }
- tasks.add(task);
- }
-
- private void removeScheduledTask(AbstractTask task) {
- synchronized (scheduledTasks) {
- for (Set<AbstractTask> setOfTasks : scheduledTasks.values()) {
- setOfTasks.remove(task);
- }
- }
- }
-
- private void addDueTask(AbstractTask task) {
- Calendar time = Calendar.getInstance();
- time.setTime(task.getDueDate());
- snapToStartOfHour(time);
- Set<AbstractTask> tasks = dueTasks.get(time);
- if (tasks == null) {
- tasks = new CopyOnWriteArraySet<AbstractTask>();
- dueTasks.put(time, tasks);
- }
- tasks.add(task);
- }
-
- private void removeDueTask(AbstractTask task) {
- synchronized (dueTasks) {
- for (Set<AbstractTask> setOfTasks : dueTasks.values()) {
- setOfTasks.remove(task);
- }
- }
- }
-
- public Set<AbstractTask> getActiveTasks(Calendar start, Calendar end) {
- Set<AbstractTask> resultingTasks = new HashSet<AbstractTask>();
-
- SortedMap<Calendar, Set<AbstractTask>> result = activeTasks.subMap(start, end);
- synchronized (activeTasks) {
- for (Set<AbstractTask> set : result.values()) {
- resultingTasks.addAll(set);
- }
- }
- return resultingTasks;
- }
-
- public Set<AbstractTask> getScheduledTasks(Calendar start, Calendar end) {
- Set<AbstractTask> resultingTasks = new HashSet<AbstractTask>();
- SortedMap<Calendar, Set<AbstractTask>> result = scheduledTasks.subMap(start, end);
- synchronized (scheduledTasks) {
- for (Set<AbstractTask> set : result.values()) {
- resultingTasks.addAll(set);
- }
- }
- return resultingTasks;
- }
-
- public Set<AbstractTask> getDueTasks(Calendar start, Calendar end) {
- Set<AbstractTask> resultingTasks = new HashSet<AbstractTask>();
- SortedMap<Calendar, Set<AbstractTask>> result = dueTasks.subMap(start, end);
- synchronized (activeTasks) {
- for (Set<AbstractTask> set : result.values()) {
- resultingTasks.addAll(set);
- }
- }
- return resultingTasks;
- }
-
- /** total elapsed time based on activation history */
- public long getElapsedTime(AbstractTask task) {
- long result = 0;
- SortedMap<Calendar, Long> activityMap = taskElapsedTimeMap.get(task);
- 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 */
- public long getElapsedTime(AbstractTask task, Calendar start, Calendar end) {
- long result = 0;
-
- Calendar startRange = Calendar.getInstance();
- startRange.setTimeInMillis(start.getTimeInMillis());
- snapToStartOfHour(startRange);
-
- Calendar endRange = Calendar.getInstance();
- endRange.setTimeInMillis(end.getTimeInMillis());
- snapToEndOfHour(endRange);
-
- 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;
- }
-
- private final IInteractionContextListener CONTEXT_LISTENER = new IInteractionContextListener() {
-
- public void contextActivated(IInteractionContext context) {
- // ignore
- }
-
- public void contextDeactivated(IInteractionContext context) {
- // ignore
- }
-
- public void contextCleared(IInteractionContext context) {
- // ignore
- }
-
- public void interestChanged(List<IInteractionElement> elements) {
- List<InteractionEvent> events = ContextCorePlugin.getContextManager()
- .getActivityMetaContext()
- .getInteractionHistory();
- InteractionEvent event = events.get(events.size() - 1);
- parseInteractionEvent(event);
-
- }
-
- public void elementDeleted(IInteractionElement element) {
- // ignore
- }
-
- public void landmarkAdded(IInteractionElement element) {
- // ignore
- }
-
- public void landmarkRemoved(IInteractionElement element) {
- // ignore
- }
-
- public void relationsChanged(IInteractionElement element) {
- // ignore
- }
- };
-
- private boolean isInitialized = false;
-
- // TODO: remove, copied from TaskListManager
- private void snapToStartOfHour(Calendar cal) {
- cal.set(Calendar.MINUTE, 0);
- cal.set(Calendar.SECOND, 0);
- cal.set(Calendar.MILLISECOND, 0);
- cal.getTime();
- }
-
- // TODO: remove, copied from TaskListManager
- private void 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();
- }
-
- // TODO: copy from TaskListManager
- public void snapToNextDay(Calendar cal) {
- cal.add(Calendar.DAY_OF_MONTH, 1);
- TaskActivityUtil.snapStartOfDay(cal);
- }
-
- public AbstractTask getActiveTask() {
- return taskList.getActiveTask();
- }
-
- 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, Date reminderDate) {
- if (task == null)
- return;
- task.setScheduledForDate(reminderDate);
- task.setReminded(false);
- if (reminderDate == null) {
- removeScheduledTask(task);
- } else {
- removeScheduledTask(task);
- addScheduledTask(task);
- }
- taskList.notifyTaskChanged(task, false);
- }
-
- public void setDueDate(AbstractTask task, Date dueDate) {
- task.setDueDate(dueDate);
- if (dueDate == null) {
- removeDueTask(task);
- } else {
- removeDueTask(task);
- addDueTask(task);
- }
- taskList.notifyTaskChanged(task, false);
- }
-
- public boolean isInitialized() {
- return isInitialized;
- }
-
- /**
- * @return if a repository task, will only return true if the user is a
- */
- public boolean isCompletedToday(AbstractTask 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 isOverdue(AbstractTask task) {
- return (!task.isCompleted() && task.getDueDate() != null && new Date().after(task.getDueDate()))
- && repositoryManager.isOwnedByUser(task);
- }
-
- public boolean isOwnedByUser(AbstractTask task) {
- return repositoryManager.isOwnedByUser(task);
- }
-
- public boolean isActiveThisWeek(AbstractTask task) {
- Calendar calStart = Calendar.getInstance();
- TaskActivityUtil.snapStartOfWorkWeek(calStart);
- Calendar calEnd = Calendar.getInstance();
- TaskActivityUtil.snapEndOfWeek(calEnd);
- return getElapsedTime(task, calStart, calEnd) > 0;
- }
-
- public boolean isScheduledForToday(AbstractTask task) {
- if (task != null) {
- Date reminder = task.getScheduledForDate();
- if (reminder != null) {
- Calendar time = TaskActivityUtil.getCalendar();
- time.setTime(reminder);
- return TaskActivityUtil.isToday(time);
- }
- }
- return false;
- }
-
- public boolean isScheduledAfterThisWeek(AbstractTask task) {
- Calendar cal = TaskActivityUtil.getCalendar();
- if (task.getScheduledForDate() != null) {
- cal.setTime(task.getScheduledForDate());
- return TaskActivityUtil.isAfterCurrentWeek(cal);
- }
-
- return false;
- }
-
- public boolean isScheduledForFuture(AbstractTask task) {
- if (task != null) {
- Date reminder = task.getScheduledForDate();
- if (reminder != null) {
- Calendar cal = TaskActivityUtil.getCalendar();
- cal.setTime(reminder);
- return TaskActivityUtil.isFuture(cal);
- }
- }
- return false;
- }
-
- public boolean isScheduledForThisWeek(AbstractTask task) {
- if (task != null) {
- Date reminder = task.getScheduledForDate();
- if (reminder != null) {
- Calendar time = TaskActivityUtil.getCalendar();
- time.setTime(reminder);
- return TaskActivityUtil.isThisWeek(time);
- }
- }
- return false;
- }
-
- /**
- * TODO: move to activity manager
- */
- private void setupCalendarRanges() {
-
- scheduleContainers.clear();
- scheduleWeekDays.clear();
-
- int startDay = TaskActivityManager.getInstance().getStartDay();
- //int endDay = TaskActivityManager.getInstance().getEndDay();
- // scheduledStartHour =
- // TasksUiPlugin.getDefault().getPreferenceStore().getInt(
- // TaskListPreferenceConstants.PLANNING_STARTHOUR);
-
-// scheduledEndHour = TasksUiPlugin.getDefault().getPreferenceStore().getInt(
-// TasksUiPreferenceConstants.PLANNING_ENDHOUR);
-
- Calendar pastStart = GregorianCalendar.getInstance();
- pastStart.setTimeInMillis(0);
-// pastStart.setFirstDayOfWeek(startDay);
-// pastStart.setTime(startTime);
-// pastStart.add(Calendar.WEEK_OF_YEAR, NUM_WEEKS_PAST_START);
-// snapToStartOfWeek(pastStart);
- GregorianCalendar pastEnd = new GregorianCalendar();
- pastEnd.setFirstDayOfWeek(startDay);
- pastEnd.setTime(startTime);
- pastEnd.add(Calendar.WEEK_OF_YEAR, NUM_WEEKS_PAST_END);
- TaskActivityUtil.snapEndOfWeek(pastEnd);
- scheduledPast = new ScheduledTaskContainer(this, pastStart.getTime(), pastEnd.getTime(), DESCRIPTION_PAST);
- scheduleContainers.add(scheduledPast);
-
- scheduleWeekDays.clear();
- for (int x = startDay; x < (startDay + 7); x++) {
- GregorianCalendar dayStart = new GregorianCalendar();
- GregorianCalendar dayEnd = new GregorianCalendar();
- dayStart.setFirstDayOfWeek(startDay);
- dayEnd.setFirstDayOfWeek(startDay);
- 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);
- }
-
- dayStart.set(Calendar.HOUR_OF_DAY, 0);
- dayStart.set(Calendar.MINUTE, 0);
- dayStart.set(Calendar.SECOND, 0);
- dayStart.set(Calendar.MILLISECOND, 0);
- dayStart.getTime();
-
- dayEnd.set(Calendar.HOUR_OF_DAY, dayEnd.getMaximum(Calendar.HOUR_OF_DAY));
- dayEnd.set(Calendar.MINUTE, dayEnd.getMaximum(Calendar.MINUTE));
- dayEnd.set(Calendar.SECOND, dayEnd.getMaximum(Calendar.SECOND));
- dayEnd.set(Calendar.MILLISECOND, dayEnd.getMaximum(Calendar.MILLISECOND));
- dayEnd.getTime();
-
- String summary = "<unknown>";
- switch (dayStart.get(Calendar.DAY_OF_WEEK)) {
- case Calendar.MONDAY:
- summary = "Monday";
- break;
- case Calendar.TUESDAY:
- summary = "Tuesday";
- break;
- case Calendar.WEDNESDAY:
- summary = "Wednesday";
- break;
- case Calendar.THURSDAY:
- summary = "Thursday";
- break;
- case Calendar.FRIDAY:
- summary = "Friday";
- break;
- case Calendar.SATURDAY:
- summary = "Saturday";
- break;
- case Calendar.SUNDAY:
- summary = "Sunday";
- break;
- }
- ScheduledTaskContainer day = new ScheduledTaskContainer(this, dayStart, dayEnd, summary);
- scheduleWeekDays.add(day);
- scheduleContainers.add(day);
- }
-
- GregorianCalendar currentBegin = new GregorianCalendar();
- currentBegin.setFirstDayOfWeek(startDay);
- currentBegin.setTime(startTime);
- TaskActivityUtil.snapStartOfWorkWeek(currentBegin);
- GregorianCalendar currentEnd = new GregorianCalendar();
- currentEnd.setFirstDayOfWeek(startDay);
- currentEnd.setTime(startTime);
- TaskActivityUtil.snapEndOfWeek(currentEnd);
- scheduledThisWeek = new ScheduledTaskContainer(this, currentBegin, currentEnd, DESCRIPTION_THIS_WEEK);
- // dateRangeContainers.add(activityThisWeek);
-
- GregorianCalendar nextStart = new GregorianCalendar();
- nextStart.setFirstDayOfWeek(startDay);
- nextStart.setTime(startTime);
- nextStart.add(Calendar.WEEK_OF_YEAR, NUM_WEEKS_NEXT);
- TaskActivityUtil.snapStartOfWorkWeek(nextStart);
- GregorianCalendar nextEnd = new GregorianCalendar();
- nextEnd.setFirstDayOfWeek(startDay);
- nextEnd.setTime(startTime);
- nextEnd.add(Calendar.WEEK_OF_YEAR, NUM_WEEKS_NEXT);
- TaskActivityUtil.snapEndOfWeek(nextEnd);
- scheduledNextWeek = new ScheduledTaskContainer(this, nextStart.getTime(), nextEnd.getTime(),
- DESCRIPTION_NEXT_WEEK);
- scheduleContainers.add(scheduledNextWeek);
-
- GregorianCalendar futureStart = new GregorianCalendar();
- futureStart.setFirstDayOfWeek(startDay);
- futureStart.setTime(startTime);
- futureStart.add(Calendar.WEEK_OF_YEAR, NUM_WEEKS_FUTURE_START);
- TaskActivityUtil.snapStartOfWorkWeek(futureStart);
- GregorianCalendar futureEnd = new GregorianCalendar();
- futureEnd.setFirstDayOfWeek(startDay);
- futureEnd.setTime(startTime);
- futureEnd.add(Calendar.YEAR, 1);
- TaskActivityUtil.snapEndOfWeek(futureEnd);
- scheduledFuture = new ScheduledTaskContainer(this, futureStart.getTime(), futureEnd.getTime(),
- DESCRIPTION_FUTURE);
- scheduleContainers.add(scheduledFuture);
-
- GregorianCalendar previousStart = new GregorianCalendar();
- previousStart.setFirstDayOfWeek(startDay);
- previousStart.setTime(startTime);
- previousStart.add(Calendar.WEEK_OF_YEAR, NUM_WEEKS_PREVIOUS_START);
- TaskActivityUtil.snapStartOfWorkWeek(previousStart);
- GregorianCalendar previousEnd = new GregorianCalendar();
- previousEnd.setFirstDayOfWeek(startDay);
- previousEnd.setTime(startTime);
- previousEnd.add(Calendar.WEEK_OF_YEAR, NUM_WEEKS_PREVIOUS_END);
- TaskActivityUtil.snapEndOfWeek(previousEnd);
- scheduledPrevious = new ScheduledTaskContainer(this, previousStart.getTime(), previousEnd.getTime(),
- DESCRIPTION_PREVIOUS_WEEK);
- scheduleContainers.add(scheduledPrevious);
- }
-
- public List<ScheduledTaskContainer> getDateRanges() {
- return scheduleContainers;
- }
-
- public List<ScheduledTaskContainer> getActivityWeekDays() {
- return scheduleWeekDays;
- }
-
- public boolean isWeekDay(ScheduledTaskContainer dateRangeTaskContainer) {
- return scheduleWeekDays.contains(dateRangeTaskContainer);
- }
-
- /** public for testing */
- public ScheduledTaskContainer getActivityThisWeek() {
- return scheduledThisWeek;
- }
-
- /** public for testing * */
- public ScheduledTaskContainer getActivityPast() {
- return scheduledPast;
- }
-
- /** public for testing */
- public ScheduledTaskContainer getActivityFuture() {
- return scheduledFuture;
- }
-
- /** public for testing */
- public ScheduledTaskContainer getActivityNextWeek() {
- return scheduledNextWeek;
- }
-
- /** public for testing */
- public ScheduledTaskContainer getActivityPrevious() {
- return scheduledPrevious;
- }
-
- public Date getStartTime() {
- return startTime;
- }
-
- public void scheduleNewTask(AbstractTask newTask) {
- newTask.setCreationDate(new Date());
- Calendar newTaskSchedule = Calendar.getInstance();
- // If past scheduledEndHour set for following day
- if (newTaskSchedule.get(Calendar.HOUR_OF_DAY) >= getEndHour()) {
- TaskActivityUtil.snapForwardNumDays(newTaskSchedule, 1);
- } else {
- TaskActivityUtil.snapEndOfWorkDay(newTaskSchedule);
- }
- setScheduledFor(newTask, newTaskSchedule.getTime());
- }
-
- public boolean isDueThisWeek(AbstractTask task) {
- Date due = task.getDueDate();
- if (due != null && repositoryManager.isOwnedByUser(task)) {
- Calendar cal = TaskActivityUtil.getCalendar();
- cal.setTime(due);
- return TaskActivityUtil.isThisWeek(cal);
- }
- return false;
- }
-}
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 abf3eb6f1..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskActivityUtil.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.internal.tasks.core;
-
-import java.util.Calendar;
-
-/**
- * @author Rob Elves
- */
-public class TaskActivityUtil {
-
- 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.getMaximum(Calendar.MINUTE));
- cal.set(Calendar.SECOND, cal.getMaximum(Calendar.SECOND));
- cal.set(Calendar.MILLISECOND, cal.getMaximum(Calendar.MILLISECOND));
- cal.getTime();
- return cal;
- }
-
- public static Calendar snapEndOfDay(Calendar cal) {
- cal.set(Calendar.HOUR_OF_DAY, cal.getMaximum(Calendar.HOUR_OF_DAY));
- 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 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, TaskActivityManager.getInstance().getStartDay());
- 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 snapForwardNumDays(Calendar calendar, int days) {
- calendar.add(Calendar.DAY_OF_MONTH, days);
- calendar.set(Calendar.HOUR_OF_DAY, TaskActivityManager.getInstance().getEndHour());
- 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, TaskActivityManager.getInstance().getEndHour());
- 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);
- snapEndOfWorkDay(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 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 Calendar getCalendar() {
- Calendar cal = Calendar.getInstance();
- cal.setFirstDayOfWeek(TaskActivityManager.getInstance().getStartDay());
- cal.getTime();
- return cal;
- }
-
- public static Calendar getStartOfCurrentWeek() {
- Calendar cal = getCalendar();
- 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);
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskArchive.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskArchive.java
deleted file mode 100644
index f0ff1e091..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskArchive.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.tasks.core;
-
-import org.eclipse.mylyn.tasks.core.AbstractTaskCategory;
-import org.eclipse.mylyn.tasks.core.AbstractTask.PriorityLevel;
-
-/**
- * @author Mik Kersten
- */
-public class TaskArchive extends AbstractTaskCategory {
-
- public static final String HANDLE = "archive";
-
- public static final String LABEL_ARCHIVE = "Archive (all tasks)";
-
- public TaskArchive() {
- super(HANDLE);
- }
-
- @Override
- public String getPriority() {
- return PriorityLevel.P5.toString();
- }
-
- @Override
- public String getHandleIdentifier() {
- return HANDLE;
- }
-
- @Override
- public String getSummary() {
- return LABEL_ARCHIVE;
- }
-
- @Override
- public boolean isUserDefined() {
- return false;
- }
-}
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 f0668fe54..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskCategory.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 Dec 26, 2004
- */
-package org.eclipse.mylyn.internal.tasks.core;
-
-import org.eclipse.mylyn.tasks.core.AbstractTaskCategory;
-
-/**
- * NOTE: this class is likely to change or become API for 3.0
- *
- * @author Mik Kersten
- */
-public final class TaskCategory extends AbstractTaskCategory {
-
- public TaskCategory(String handleAndDescription) {
- super(handleAndDescription);
- }
-
- @Override
- public boolean isUserDefined() {
- return true;
- }
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskDataManager.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskDataManager.java
deleted file mode 100644
index 337631657..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskDataManager.java
+++ /dev/null
@@ -1,327 +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.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractAttributeFactory;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskAttribute;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.TaskRepositoryManager;
-
-/**
- * Manager for persisting RepositoryTaskData offline
- *
- * @author Rob Elves
- */
-public class TaskDataManager {
-
- private TaskRepositoryManager taskRepositoryManager;
-
- private ITaskDataStorage storage;
-
- private int nextNewId = 1;
-
- public TaskDataManager(TaskRepositoryManager 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.getId() == null) {
- return;
- }
-
- TaskDataState state = retrieveState(data);
- if (state != null) {
- state.setNewTaskData(data);
- } else {
- state = new TaskDataState(data.getRepositoryUrl(), data.getId());
- state.setNewTaskData(data);
- }
- saveState(state);
- }
-
- public void setOldTaskData(RepositoryTaskData data) {
- if (data == null || data.getRepositoryUrl() == null || data.getId() == null) {
- return;
- }
- TaskDataState state = retrieveState(data);
- if (state != null) {
- state.setOldTaskData(data);
- } else {
- StatusHandler.log("Attempt to save old data when no new data exists.", this);
- }
- 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.fail(e, "Error constructing modifiable task", false);
- 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;
-
- }
-
- 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) {
- StatusHandler.fail(e, "Error saving edits", false);
- }
- }
-
- }
-
- 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) {
- StatusHandler.fail(e, "Discard edits failed.", false);
- }
- }
- }
-
- 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;
- AbstractRepositoryConnector connector = taskRepositoryManager.getRepositoryConnector(taskData.getRepositoryKind());
- if (connector != null && connector.getTaskDataHandler() != null) {
- AbstractAttributeFactory factory = connector.getTaskDataHandler().getAttributeFactory(taskData);
- if (factory != null) {
- taskData.setAttributeFactory(factory);
- }
- }
- }
-
- // Reference:
- // http://www.javaworld.com/javaworld/javatips/jw-javatip76.html?page=2
- 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.fail(e, "Offline storage start failed", false);
- }
- }
-
- public void stop() {
- try {
- storage.stop();
- } catch (Exception e) {
- StatusHandler.fail(e, "Offline storage stop failed", false);
- }
- }
-
- public void saveNow() {
- storage.flush();
- }
-
- private TaskDataState retrieveState(RepositoryTaskData data) {
- return retrieveState(data.getRepositoryUrl(), data.getId());
- }
-
- 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) {
- e.printStackTrace();
- StatusHandler.fail(e, "Error saving offline data", false);
- }
- 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/TaskDataState.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskDataState.java
deleted file mode 100644
index fd84c11da..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskDataState.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.core;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.mylyn.tasks.core.RepositoryTaskAttribute;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-
-/**
- * @author Rob Elves
- */
-public class TaskDataState {
-
- private RepositoryTaskData newTaskData;
-
- private RepositoryTaskData oldTaskData;
-
- private Set<RepositoryTaskAttribute> edits = new HashSet<RepositoryTaskAttribute>();
-
- private String url;
-
- private 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/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 660dc7145..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;
-
-import org.eclipse.mylyn.tasks.core.AbstractTaskCategory;
-
-/**
- * NOTE: this class is likely to change or become API for 3.0
- *
- * @author Eugene Kuleshov
- * @since 2.1
- */
-public class TaskGroup extends AbstractTaskCategory {
-
- 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;
- }
-
- public boolean isUserDefined() {
- return false;
- }
-
- public String getGroupBy() {
- return groupBy;
- }
-
-}
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 cdcf22234..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskRepositoriesExternalizer.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;
-
-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.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.TaskRepositoryManager;
-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 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.fail(e, "Could not write: " + file.getAbsolutePath(), false);
- } finally {
- if (outputStream != null) {
- try {
- outputStream.close();
- } catch (IOException e) {
- StatusHandler.fail(e, "Unable to terminate output stream to repositories file.", false);
- }
- }
- }
- }
-
- /**
- * @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(e, "Error while reading context file");
- return null;
- } finally {
- if (inputStream != null) {
- try {
- inputStream.close();
- } catch (IOException e) {
- StatusHandler.fail(e, "Failed to close repositories input stream.", false);
- }
- }
- }
- }
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/UnfiledCategory.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/UnfiledCategory.java
deleted file mode 100644
index 0217afa14..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/UnfiledCategory.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.core;
-
-import org.eclipse.mylyn.tasks.core.AbstractTaskCategory;
-import org.eclipse.mylyn.tasks.core.AbstractTask.PriorityLevel;
-
-/**
- * Category created for the user to hold uncategorized tasks.
- *
- * @author Rob Elves
- */
-public class UnfiledCategory extends AbstractTaskCategory {
-
- public static final String LABEL = "Uncategorized";
-
- public static final String HANDLE = "uncategorized";
-
- public UnfiledCategory() {
- 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 isUserDefined() {
- // ignore
- return false;
- }
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractAttachmentHandler.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractAttachmentHandler.java
deleted file mode 100644
index b9be0a393..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractAttachmentHandler.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.tasks.core;
-
-import java.io.BufferedInputStream;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-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.OperationCanceledException;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.mylyn.context.core.ContextCorePlugin;
-import org.eclipse.mylyn.internal.tasks.core.TaskDataManager;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractTask.RepositoryTaskSyncState;
-
-/**
- * Extend to provide facility for downloading files from the task repository.
- *
- * @author Steffen Pingel
- * @since 2.0
- */
-public abstract class AbstractAttachmentHandler {
-
- protected static final int BUFFER_SIZE = 1024;
-
- private TaskDataManager taskDataManager = null;
-
- public static final String MESSAGE_ATTACHMENTS_NOT_SUPPORTED = "Attachments not supported by connector: ";
-
- public static final String MYLAR_CONTEXT_DESCRIPTION_LEGACY = "mylar/context/zip";
-
- public final static String MYLAR_CONTEXT_FILENAME = "mylyn-context.zip";
-
- // TODO: change name to Mylyn for 3.0
- public static final String MYLAR_CONTEXT_DESCRIPTION = "mylyn/context/zip";
-
- public abstract void uploadAttachment(TaskRepository repository, AbstractTask 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, AbstractTask task);
-
- public abstract boolean canDownloadAttachment(TaskRepository repository, AbstractTask 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.fail(e, "Error closing attachment stream", false);
- }
- }
- } finally {
- monitor.done();
- }
- }
-
- public final boolean hasRepositoryContext(TaskRepository repository, AbstractTask task) {
- if (repository == null || task == null) {
- return false;
- } else {
- Set<RepositoryAttachment> remoteContextAttachments = getContextAttachments(repository, task);
- return (remoteContextAttachments != null && remoteContextAttachments.size() > 0);
- }
- }
-
- /**
- * 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 final Set<RepositoryAttachment> getContextAttachments(TaskRepository repository, AbstractTask task) {
- 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(MYLAR_CONTEXT_DESCRIPTION)) {
- contextAttachments.add(attachment);
- } else if (attachment.getDescription().equals(MYLAR_CONTEXT_DESCRIPTION_LEGACY)) {
- contextAttachments.add(attachment);
- }
- }
- }
- }
- return contextAttachments;
- }
-
- /**
- * Attaches the associated context to <code>task</code>.
- *
- * @return false, if operation is not supported by repository
- */
- public final boolean attachContext(TaskRepository repository, AbstractTask task, String longComment,
- IProgressMonitor monitor) throws CoreException {
- ContextCorePlugin.getContextManager().saveContext(task.getHandleIdentifier());
- final File sourceContextFile = ContextCorePlugin.getContextManager().getFileForContext(
- task.getHandleIdentifier());
-
- RepositoryTaskSyncState previousState = task.getSynchronizationState();
-
- if (sourceContextFile != null && sourceContextFile.exists()) {
- try {
- task.setSubmitting(true);
- task.setSynchronizationState(RepositoryTaskSyncState.OUTGOING);
- FileAttachment attachment = new FileAttachment(sourceContextFile);
- attachment.setDescription(AbstractAttachmentHandler.MYLAR_CONTEXT_DESCRIPTION);
- attachment.setFilename(AbstractAttachmentHandler.MYLAR_CONTEXT_FILENAME);
- 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.
- task.setSynchronizationState(previousState);
- throw e;
- } catch (OperationCanceledException e) {
- return true;
- }
- }
- return true;
- }
-
- /**
- * Retrieves a context stored in <code>attachment</code> from <code>task</code>.
- *
- * @return false, if operation is not supported by repository
- */
- public final boolean retrieveContext(TaskRepository repository, AbstractTask task, RepositoryAttachment attachment,
- String destinationPath, IProgressMonitor monitor) throws CoreException {
-
- File destinationContextFile = ContextCorePlugin.getContextManager().getFileForContext(
- task.getHandleIdentifier());
-
- // TODO: add functionality for not overwriting previous context
- if (destinationContextFile.exists()) {
- if (!destinationContextFile.delete()) {
- return false;
- }
- }
- FileOutputStream out;
- try {
- out = new FileOutputStream(destinationContextFile);
- try {
- downloadAttachment(repository, attachment, out, monitor);
- } finally {
- try {
- out.close();
- } catch (IOException e) {
- StatusHandler.fail(e, "Could not close context file", false);
- }
- }
- } catch (FileNotFoundException e) {
- throw new CoreException(new RepositoryStatus(IStatus.ERROR, "org.eclipse.mylyn.tasks.core",
- RepositoryStatus.ERROR_INTERNAL, "Could not create context file", e));
- }
- return true;
- }
-
- public void setTaskDataManager(TaskDataManager taskDataManager) {
- this.taskDataManager = taskDataManager;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractAttributeFactory.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractAttributeFactory.java
deleted file mode 100644
index 8fe901b47..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractAttributeFactory.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;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * Extend to provide mapping between repository task attribute IDs and native repository IDs.
- *
- * @author Rob Elves
- * @since 2.0
- */
-@SuppressWarnings("serial")
-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/tasks/core/AbstractRepositoryConnector.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractRepositoryConnector.java
deleted file mode 100644
index 898ed6562..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractRepositoryConnector.java
+++ /dev/null
@@ -1,368 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse 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.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.IRepositoryConstants;
-import org.eclipse.mylyn.internal.tasks.core.TaskDataManager;
-import org.eclipse.mylyn.tasks.core.AbstractTask.RepositoryTaskSyncState;
-
-/**
- * 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
- * @since 2.0
- */
-public abstract class AbstractRepositoryConnector {
-
- protected Set<RepositoryTemplate> templates = new LinkedHashSet<RepositoryTemplate>();
-
- protected TaskList taskList;
-
- private boolean userManaged = true;
-
- private TaskDataManager taskDataManager;
-
- public void init(TaskList taskList) {
- this.taskList = taskList;
- }
-
- /**
- * Set upon construction
- */
- public void setTaskDataManager(TaskDataManager taskDataManager) {
- this.taskDataManager = taskDataManager;
- AbstractAttachmentHandler handler = getAttachmentHandler();
- if (handler != null) {
- handler.setTaskDataManager(taskDataManager);
- }
- }
-
- /**
- * @return null if not supported
- */
- public abstract AbstractAttachmentHandler getAttachmentHandler();
-
- /**
- * @return null if not supported
- */
- public abstract AbstractTaskDataHandler getTaskDataHandler();
-
- public abstract String getRepositoryUrlFromTaskUrl(String taskFullUrl);
-
- public abstract String getTaskIdFromTaskUrl(String taskFullUrl);
-
- public abstract String getTaskUrl(String repositoryUrl, String taskId);
-
- public String[] getTaskIdsFromComment(TaskRepository repository, String comment) {
- return null;
- }
-
- public abstract boolean canCreateTaskFromKey(TaskRepository repository);
-
- public abstract boolean canCreateNewTask(TaskRepository repository);
-
- /**
- * create task and necessary subtasks (1 level nesting)
- */
- public AbstractTask createTaskFromExistingId(TaskRepository repository, String id, IProgressMonitor monitor)
- throws CoreException {
- return createTaskFromExistingId(repository, id, true, monitor);
- }
-
- /**
- * Create new repository task, adding result to tasklist
- */
- public AbstractTask createTaskFromExistingId(TaskRepository repository, String id, boolean retrieveSubTasks,
- IProgressMonitor monitor) throws CoreException {
- AbstractTask repositoryTask = taskList.getTask(repository.getUrl(), id);
- if (repositoryTask == null && getTaskDataHandler() != null) {
- RepositoryTaskData taskData = null;
- taskData = getTaskDataHandler().getTaskData(repository, id, new SubProgressMonitor(monitor, 1));
- if (taskData != null) {
- repositoryTask = createTaskFromTaskData(repository, taskData, retrieveSubTasks, new SubProgressMonitor(
- monitor, 1));
- if (repositoryTask != null) {
- repositoryTask.setSynchronizationState(RepositoryTaskSyncState.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
- */
- 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.getUrl(), taskData.getId(), taskData.getId() + ": "
- + taskData.getDescription());
- updateTaskFromTaskData(repository, repositoryTask, taskData);
- getTaskDataManager().setNewTaskData(taskData);
-
- if (retrieveSubTasks) {
- monitor.beginTask("Creating task", getTaskDataHandler().getSubTaskIds(taskData).size());
- for (String subId : getTaskDataHandler().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 TODO: Move to 'task' factory
- *
- * @return instance of AbstractTask
- */
- public abstract AbstractTask createTask(String repositoryUrl, String id, String summary);
-
- /**
- * Implementors must execute query synchronously.
- *
- * @param query
- * @param repository
- * TODO
- * @param monitor
- * @param resultCollector
- * IQueryHitCollector that collects the hits found
- */
- public abstract IStatus performQuery(AbstractRepositoryQuery query, TaskRepository repository,
- IProgressMonitor monitor, ITaskCollector resultCollector);
-
- /**
- * The connector's summary i.e. "JIRA (supports 3.3.1 and later)"
- */
- public abstract String getLabel();
-
- /**
- * @return the unique kind of the repository, e.g. "bugzilla"
- */
- public abstract String getConnectorKind();
-
- /**
- * Updates the properties of <code>repositoryTask</code>. Invoked when on task synchronization if
- * {@link #getTaskDataHandler()} 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 #getTaskDataHandler()}
- */
- public abstract void updateTaskFromRepository(TaskRepository repository, AbstractTask repositoryTask,
- IProgressMonitor monitor) throws CoreException;
-
- /**
- * Updates task with latest information from {@code taskData}
- *
- * @since 2.0
- */
- public abstract void updateTaskFromTaskData(TaskRepository repository, AbstractTask repositoryTask,
- 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
- */
- public boolean updateTaskFromQueryHit(TaskRepository repository, AbstractTask existingTask, AbstractTask queryHit) {
- boolean changed = false;
- if (existingTask.isCompleted() != queryHit.isCompleted()) {
- 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;
- }
-
- 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 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.
- *
- * @param tasks
- * TODO
- *
- * @return null 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
- */
- public abstract boolean markStaleTasks(TaskRepository repository, Set<AbstractTask> tasks, IProgressMonitor monitor)
- throws CoreException;
-
- public void addTemplate(RepositoryTemplate template) {
- this.templates.add(template);
- }
-
- public Set<RepositoryTemplate> getTemplates() {
- return templates;
- }
-
- public void removeTemplate(RepositoryTemplate template) {
- this.templates.remove(template);
- }
-
- /** returns null if template not found */
- public RepositoryTemplate getTemplate(String label) {
- for (RepositoryTemplate template : getTemplates()) {
- if (template.label.equals(label)) {
- return template;
- }
- }
- return null;
- }
-
- /**
- * Used for referring to the task in the UI.
- *
- * @return
- */
- public String getTaskIdPrefix() {
- return "task";
- }
-
- /**
- * Reset and update the repository attributes from the server (e.g. products, components)
- *
- * TODO: remove?
- */
- public abstract void updateAttributes(TaskRepository repository, IProgressMonitor monitor) throws CoreException;
-
- /**
- * @return true to indicate that the repository configuration is stale and requires update
- * @throws CoreException
- */
- public boolean isRepositoryConfigurationStale(TaskRepository repository) throws CoreException {
- return true;
- }
-
- public void setUserManaged(boolean userManaged) {
- this.userManaged = userManaged;
- }
-
- public boolean isUserManaged() {
- return userManaged;
- }
-
- /**
- * 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.
- */
- public String getSynchronizationTimestamp(TaskRepository repository, Set<AbstractTask> changedTasks) {
- Date mostRecent = new Date(0);
- String mostRecentTimeStamp = repository.getSynchronizationTimeStamp();
- for (AbstractTask task : changedTasks) {
- Date taskModifiedDate;
-
- if (getTaskData(task) != null && getTaskDataHandler() != null
- && getTaskData(task).getLastModified() != null) {
- taskModifiedDate = getTaskData(task).getAttributeFactory().getDateForAttributeType(
- RepositoryTaskAttribute.DATE_MODIFIED, getTaskData(task).getLastModified());
- } else {
- continue;
- }
-
- if (taskModifiedDate != null && taskModifiedDate.after(mostRecent)) {
- mostRecent = taskModifiedDate;
- mostRecentTimeStamp = getTaskData(task).getLastModified();
- }
- }
- return mostRecentTimeStamp;
- }
-
- private RepositoryTaskData getTaskData(AbstractTask task) {
- if (taskDataManager != null) {
- return taskDataManager.getNewTaskData(task.getRepositoryUrl(), task.getTaskId());
- }
- return null;
- }
-
- private TaskDataManager getTaskDataManager() {
- return taskDataManager;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractRepositoryQuery.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractRepositoryQuery.java
deleted file mode 100644
index ce66df477..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractRepositoryQuery.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;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.mylyn.tasks.core.AbstractTask.PriorityLevel;
-
-/**
- * A container that stores tasks from a specific repository.
- *
- * @author Mik Kersten
- * @author Eugene Kuleshov
- * @author Rob Elves
- * @since 2.0
- */
-public abstract class AbstractRepositoryQuery extends AbstractTaskContainer {
-
- protected String repositoryUrl;
-
- protected String lastSynchronizedStamp = "<never>";
-
- private boolean synchronizing = false;
-
- protected IStatus status = null;
-
- public abstract String getRepositoryKind();
-
- public AbstractRepositoryQuery(String description) {
- super(description);
- }
-
- @Override
- public String getPriority() {
- if (super.isEmpty()) {
- return PriorityLevel.P1.toString();
- }
- String highestPriority = PriorityLevel.P5.toString();
- for (AbstractTask hit : getChildren()) {
- if (highestPriority.compareTo(hit.getPriority()) > 0) {
- highestPriority = hit.getPriority();
- }
- }
- return highestPriority;
- }
-
- public String getRepositoryUrl() {
- return repositoryUrl;
- }
-
- public void setRepositoryUrl(String newRepositoryUrl) {
- if (repositoryUrl != null && url != null) {
- // the repository url has changed, so change corresponding part of
- // query URL
- this.url = newRepositoryUrl + url.substring(repositoryUrl.length());
- }
- this.repositoryUrl = newRepositoryUrl;
- }
-
- public boolean isSynchronizing() {
- return synchronizing;
- }
-
- public void setSynchronizing(boolean synchronizing) {
- this.synchronizing = synchronizing;
- }
-
- public String getLastSynchronizedTimeStamp() {
- return lastSynchronizedStamp;
- }
-
- public void setLastSynchronizedStamp(String lastRefreshTimeStamp) {
- this.lastSynchronizedStamp = lastRefreshTimeStamp;
- }
-
- public IStatus getSynchronizationStatus() {
- return status;
- }
-
- public void setSynchronizationStatus(IStatus status) {
- this.status = status;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTask.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTask.java
deleted file mode 100644
index b77361e17..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTask.java
+++ /dev/null
@@ -1,469 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse 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.net.MalformedURLException;
-import java.net.URL;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryTaskHandleUtil;
-
-/**
- * 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 {
-
- public static final String DEFAULT_TASK_KIND = "task";
-
- private String repositoryUrl;
-
- private String taskKind = DEFAULT_TASK_KIND;
-
- private String taskId;
-
- private String owner;
-
- private boolean active = false;
-
- private String summary;
-
- private String priority = PriorityLevel.getDefault().toString();
-
- private boolean completed;
-
- private boolean isNotifiedIncoming = false;
-
- private boolean reminded = false;
-
- private String categoryHandle = "";
-
- private 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 RepositoryTaskSyncState synchronizationState = RepositoryTaskSyncState.SYNCHRONIZED;
-
- // transient
- private IStatus synchronizationStatus = null;
-
- private boolean stale = false;
-
- public enum RepositoryTaskSyncState {
- OUTGOING, SYNCHRONIZED, INCOMING, CONFLICT
- }
-
- // ************ Planning ****************
-
- private Date completionDate = null;
-
- private Date creationDate = null;
-
- private Date scheduledForDate = null;
-
- private Date dueDate = null;
-
- private String notes = "";
-
- private int estimatedTimeHours = 1;
-
- 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";
- }
- }
-
- 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 "";
- }
- }
-
- 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();
- }
-
- 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();
- }
-
- public static PriorityLevel getDefault() {
- return P3;
- }
- }
-
- public AbstractTask(String repositoryUrl, String taskId, String summary) {
- super(RepositoryTaskHandleUtil.getHandle(repositoryUrl, taskId));
- this.repositoryUrl = repositoryUrl;
- this.taskId = taskId;
- this.summary = summary;
- this.url = "";
- }
-
- /**
- * 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.
- */
- public abstract boolean isLocal();
-
- public abstract String getConnectorKind();
-
- public String getLastReadTimeStamp() {
- return lastReadTimeStamp;
- }
-
- public void setLastReadTimeStamp(String lastReadTimeStamp) {
- this.lastReadTimeStamp = lastReadTimeStamp;
- }
-
- public void setSynchronizationState(RepositoryTaskSyncState syncState) {
- this.synchronizationState = syncState;
- }
-
- public RepositoryTaskSyncState 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) {
- this.owner = owner;
- }
-
- public IStatus getSynchronizationStatus() {
- return synchronizationStatus;
- }
-
- public void setSynchronizationStatus(IStatus status) {
- this.synchronizationStatus = 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 taskId;
- }
-
- public boolean isSubmitting() {
- return submitting;
- }
-
- public void setSubmitting(boolean submitting) {
- this.submitting = submitting;
- }
-
- @Override
- public String toString() {
- return summary;
- }
-
- /**
- * Package visible in order to prevent sets that don't update the index.
- */
- 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(((AbstractTask) obj).getHandleIdentifier());
- } else {
- return false;
- }
- }
-
- @Override
- public int hashCode() {
- return this.getHandleIdentifier().hashCode();
- }
-
- public boolean isCompleted() {
- return completed;
- }
-
- public void setCompleted(boolean completed) {
- this.completed = completed;
- if (completed) {
- completionDate = new Date();
- } else {
- completionDate = null;
- }
- }
-
- @Override
- public String getPriority() {
- return priority;
- }
-
- public void setPriority(String priority) {
- this.priority = 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;
- }
-
- public int getEstimateTimeHours() {
- return estimatedTimeHours;
- }
-
- public void setEstimatedTimeHours(int estimated) {
- this.estimatedTimeHours = estimated;
- }
-
- /**
- * Limitation: can currently only add one container.
- */
- public void addParentContainer(AbstractTaskContainer container) {
- containers.clear();
- containers.add(container);
- }
-
- public void removeParentContainer(AbstractTaskContainer container) {
- containers.remove(container);
- }
-
- public Set<AbstractTaskContainer> getParentContainers() {
- return containers;
- }
-
- @Override
- public String getSummary() {
- return summary;
- }
-
- public Date getCompletionDate() {
- return completionDate;
- }
-
- public void setScheduledForDate(Date date) {
- scheduledForDate = date;
- }
-
- public Date 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 date) {
- this.creationDate = date;
- }
-
- public void setSummary(String summary) {
- this.summary = summary;
- }
-
- public void setCompletionDate(Date completionDate) {
- this.completionDate = completionDate;
- }
-
- public boolean isPastReminder() {
- if (scheduledForDate == null) {
- return false;
- } else {
- Date now = new Date();
- if (scheduledForDate.compareTo(now) < 0) {
- return true;
- } else {
- return false;
- }
- }
- }
-
- public boolean hasValidUrl() {
- String taskUrl = getUrl();
- if (taskUrl != null && !taskUrl.equals("") && !taskUrl.equals("http://") && !taskUrl.equals("https://")) {
- try {
- new URL(taskUrl);
- return true;
- } catch (MalformedURLException e) {
- return false;
- }
- }
- return false;
- }
-
- public String getTaskKind() {
- return taskKind;
- }
-
- public void setTaskKind(String kind) {
- this.taskKind = kind;
- }
-
- @Override
- public int compareTo(AbstractTaskContainer taskListElement) {
- return summary.compareTo(((AbstractTask) taskListElement).summary);
- }
-
- public Date getDueDate() {
- return dueDate;
- }
-
- public void setDueDate(Date date) {
- this.dueDate = date;
- }
-
- public boolean isStale() {
- return stale;
- }
-
- public void setStale(boolean stale) {
- this.stale = stale;
- }
-
- /**
- * deprecated
- */
- public String getCategoryHandle() {
- return categoryHandle;
- }
-
- /**
- * deprecated
- */
- public void setCategoryHandle(String categoryHandle) {
- this.categoryHandle = categoryHandle;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskCategory.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskCategory.java
deleted file mode 100644
index 7c698cb97..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskCategory.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;
-
-/**
- * A container that stores tasks from any repository.
- *
- * @author Mik Kersten
- * @since 2.0
- */
-public abstract class AbstractTaskCategory extends AbstractTaskContainer {
-
- public AbstractTaskCategory(String handleAndDescription) {
- super(handleAndDescription);
- }
-
- /**
- * Override to return true for categories that the user creates, deletes, and renames. Return false for categories
- * that are managed
- */
- public abstract boolean isUserDefined();
-
- @Override
- public boolean equals(Object object) {
- return super.equals(object);
- }
-
- @Override
- public int hashCode() {
- return super.hashCode();
- }
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskContainer.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskContainer.java
deleted file mode 100644
index 2f49438a6..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskContainer.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse 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.Collections;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.concurrent.CopyOnWriteArraySet;
-
-import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.mylyn.tasks.core.AbstractTask.PriorityLevel;
-
-/**
- * Top-level Task List element that can contain other Task List elements.
- *
- * @author Mik Kersten
- * @since 2.0
- */
-public abstract class AbstractTaskContainer extends PlatformObject implements Comparable<AbstractTaskContainer> {
-
- /**
- * TODO: consider removing in 3.0 if handled by content provider
- */
- private static final int MAX_SUBTASK_DEPTH = 10;
-
- private String handleIdentifier = "";
-
- private Set<AbstractTask> children = new CopyOnWriteArraySet<AbstractTask>();
-
- /**
- * Optional URL corresponding to the web resource associated with this container.
- */
- protected String url = null;
-
- public AbstractTaskContainer(String handleAndDescription) {
- assert handleIdentifier != null;
- this.handleIdentifier = handleAndDescription;
- }
-
- /**
- * Use {@link TaskList} methods instead.
- */
- public void internalAddChild(AbstractTask task) {
- children.add(task);
- }
-
- /**
- * Use {@link TaskList} methods instead.
- */
- public void internalRemoveChild(AbstractTask task) {
- children.remove(task);
- }
-
- /**
- * Does not delete tasks from TaskList
- */
- public void clear() {
- children.clear();
- }
-
- /**
- * Removes any cyclic dependencies in children.
- *
- * TODO: review to make sure that this is too expensive, or move to creation.
- */
- public Set<AbstractTask> getChildren() {
- Set<AbstractTask> childrenWithoutCycles = new HashSet<AbstractTask>();
- for (AbstractTask child : children) {
- if (!child.contains(this.getHandleIdentifier())) {
- childrenWithoutCycles.add(child);
- }
- }
- return Collections.unmodifiableSet(childrenWithoutCycles);
-// return Collections.unmodifiableSet(children);
- }
-
- /**
- * Maxes out at a depth of 10.
- *
- * TODO: review policy
- */
- public boolean contains(String handle) {
- return containsHelper(handle, 0);
- }
-
- private boolean containsHelper(String handle, int depth) {
- if (depth >= MAX_SUBTASK_DEPTH) {
- return false;
- } else {
- depth++;
- for (AbstractTask child : children) {
- if (handle.equals(child.getHandleIdentifier())) {
- return true;
- } else if (child.getChildren() != null && child.getChildren().size() > 0) {
- if (((AbstractTaskContainer)child).containsHelper(handle, depth)) {
- 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) {
- AbstractTaskContainer compare = (AbstractTaskContainer) 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();
- Set<AbstractTask> tasks = getChildren();
- if (tasks.isEmpty()) {
- return PriorityLevel.P1.toString();
- }
- for (AbstractTask 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(AbstractTaskContainer taskListElement) {
- return getHandleIdentifier().compareTo(taskListElement.getHandleIdentifier());
- }
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskDataHandler.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskDataHandler.java
deleted file mode 100644
index 65640c4fe..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskDataHandler.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.core;
-
-import java.util.Set;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * Responsible for retrieving and posting task data to a repository.
- *
- * @author Mik Kersten
- * @author Rob Elves
- * @since 2.0
- */
-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.
- */
- public Set<RepositoryTaskData> getMultiTaskData(TaskRepository repository, Set<String> taskIds,
- 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;
-
- public abstract AbstractAttributeFactory getAttributeFactory(RepositoryTaskData taskData);
-
- /**
- * @return Task id for any sub tasks referenced by the provided task data
- */
- public abstract Set<String> getSubTaskIds(RepositoryTaskData taskData);
-
- /**
- * @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;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskListFactory.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskListFactory.java
deleted file mode 100644
index 905ccb5f7..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskListFactory.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.tasks.core;
-
-import java.util.Collections;
-import java.util.Set;
-
-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";
-
- public abstract boolean canCreate(AbstractTask task);
-
- public boolean canCreate(AbstractRepositoryQuery query) {
- return false;
- }
-
- public AbstractRepositoryQuery createQuery(String repositoryUrl, String queryString, String label, Element element) {
- return null;
- }
-
- public abstract AbstractTask createTask(String repositoryUrl, String taskId, String label, Element element);
-
- public String getQueryElementName(AbstractRepositoryQuery query) {
- return "";
- }
-
- public Set<String> getQueryElementNames() {
- return Collections.emptySet();
- }
-
- public abstract String getTaskElementName();
-
- public void setAdditionalAttributes(AbstractRepositoryQuery query, Element node) {
- // ignore
- }
-
- public void setAdditionalAttributes(AbstractTask task, Element element) {
- // ignore
- }
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AttributeContainer.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AttributeContainer.java
deleted file mode 100644
index 5659a7f29..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AttributeContainer.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse 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.io.Serializable;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-
-/**
- * Encapsulates attributes for task data.
- *
- * @author Rob Elves
- * @since 2.0
- */
-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 ArrayList<String> attributeKeys;
-
- /** report attributes (status, resolution, etc.) */
- private HashMap<String, RepositoryTaskAttribute> attributes;
-
- private transient AbstractAttributeFactory attributeFactory;
-
- 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(ERROR_NO_ATTRIBUTE_FACTORY, this);
- return;
- }
- String mapped = attributeFactory.mapCommonAttributeKey(key);
- if (mapped == null) {
- StatusHandler.log("Mapped value for " + key + " returned null.", this);
- return;
- }
- if (!attributes.containsKey(mapped)) {
- attributeKeys.add(mapped);
- }
- attributes.put(mapped, attribute);
- }
-
- public RepositoryTaskAttribute getAttribute(String key) {
- if (attributeFactory == null) {
- StatusHandler.log(ERROR_NO_ATTRIBUTE_FACTORY, this);
- 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 (Iterator<String> it = attributeKeys.iterator(); it.hasNext();) {
- String key = it.next();
- 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(ERROR_NO_ATTRIBUTE_FACTORY, this);
- 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(ERROR_NO_ATTRIBUTE_FACTORY, this);
- 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(ERROR_NO_ATTRIBUTE_FACTORY, this);
- 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(ERROR_NO_ATTRIBUTE_FACTORY, this);
- return returnValue;
- }
- RepositoryTaskAttribute attrib = getAttribute(key);
- if (attrib != null) {
- returnValue = attrib.getValues();
- }
- return returnValue;
- }
-
- public AbstractAttributeFactory getAttributeFactory() {
- return attributeFactory;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/FileAttachment.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/FileAttachment.java
deleted file mode 100644
index a4127701e..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/FileAttachment.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.tasks.core;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * Proxy for a file attachment.
- *
- * @author Steffen Pingel
- * @since 2.0
- */
-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 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/tasks/core/ILinkedTaskInfo.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ILinkedTaskInfo.java
deleted file mode 100644
index 3783ee072..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ILinkedTaskInfo.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;
-
-/**
- * Task information linking tasks to resources.
- *
- * @author Eugene Kuleshov
- * @since 2.0
- */
-public interface ILinkedTaskInfo {
-
- public abstract String getTaskId();
-
- public abstract String getTaskUrl();
-
- public abstract String getRepositoryUrl();
-
- public abstract AbstractTask getTask();
-
- public abstract String getComment();
-
-}
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 d48d418a0..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;
-
-import org.eclipse.mylyn.internal.tasks.core.ScheduledTaskContainer;
-
-/**
- * Notified of task activity changes.
- *
- * @author Mik Kersten
- * @author Rob Elves
- * @since 2.0
- */
-public interface ITaskActivityListener {
-
- public abstract void taskActivated(AbstractTask task);
-
- public abstract void taskDeactivated(AbstractTask task);
-
- public abstract void taskListRead();
-
- /**
- * @param week
- * can be null
- */
- public abstract void activityChanged(ScheduledTaskContainer week);
-
-}
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 73751676a..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskAttachment.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;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * Encapsualtes resources that can be attached to a task.
- *
- * @author Steffen Pingel
- * @since 2.0
- */
-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/tasks/core/ITaskCollector.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskCollector.java
deleted file mode 100644
index 45e5957a4..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskCollector.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.core;
-
-import java.util.Set;
-
-import org.eclipse.core.runtime.CoreException;
-
-/**
- * Abstraction used for collecting tasks, e.g. when performing queries on the repository.
- *
- * @author Rob Elves
- * @since 2.0
- */
-public interface ITaskCollector {
-
- public void accept(AbstractTask task);
-
- public void accept(RepositoryTaskData taskData) throws CoreException;
-
- public Set<AbstractTask> getTasks();
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskFactory.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskFactory.java
deleted file mode 100644
index e14070fae..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskFactory.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.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * Used for creating tasks from repository task data.
- *
- * NOTE: likely to change for 3.0.
- *
- * @author Rob Elves
- * @since 2.0
- */
-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/tasks/core/ITaskListChangeListener.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskListChangeListener.java
deleted file mode 100644
index 8cf819f9a..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskListChangeListener.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;
-
-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/tasks/core/ITaskRepositoryListener.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskRepositoryListener.java
deleted file mode 100644
index d3d7f2f92..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/ITaskRepositoryListener.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;
-
-/**
- * Notified of change to task repositories.
- *
- * @author Mik Kersten
- * @since 2.0
- */
-public interface ITaskRepositoryListener {
-
- public abstract void repositoriesRead();
-
- public abstract void repositoryAdded(TaskRepository repository);
-
- public abstract void repositoryRemoved(TaskRepository repository);
-
- public abstract void repositorySettingsChanged(TaskRepository repository);
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/QueryHitCollector.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/QueryHitCollector.java
deleted file mode 100644
index b94717516..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/QueryHitCollector.java
+++ /dev/null
@@ -1,62 +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.core;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-
-/**
- * Collects QueryHits resulting from repository search.
- *
- * @author Shawn Minto
- * @author Rob Elves (generalized from bugzilla)
- * @author Steffen Pingel
- * @since 2.0
- */
-public class QueryHitCollector implements ITaskCollector {
-
- public static final int MAX_HITS = 5000;
-
- 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 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);
- }
- }
-
- public void accept(RepositoryTaskData taskData) throws CoreException {
- if (taskData == null) {
- throw new IllegalArgumentException();
- }
-
- AbstractTask task = taskFactory.createTask(taskData, new NullProgressMonitor());
- if (taskResults.size() < MAX_HITS) {
- taskResults.add(task);
- }
- }
-
- public Set<AbstractTask> getTasks() {
- return taskResults;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/RepositoryAttachment.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/RepositoryAttachment.java
deleted file mode 100644
index fc933d11d..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/RepositoryAttachment.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse 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.io.Serializable;
-
-/**
- * Encapsulates a file or other resource attached to a task.
- *
- * @author Rob Elves
- * @author Mik Kersten
- * @since 2.0
- */
-public 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;
- }
-
- 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 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/tasks/core/RepositoryOperation.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/RepositoryOperation.java
deleted file mode 100644
index 3cf2bf65d..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/RepositoryOperation.java
+++ /dev/null
@@ -1,216 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse 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.io.Serializable;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 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
- */
-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 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 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/tasks/core/RepositoryStatus.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/RepositoryStatus.java
deleted file mode 100644
index c68d0c672..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/RepositoryStatus.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse 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.getUrl(), severity, pluginId, code, message, null);
- }
-
- public RepositoryStatus(TaskRepository repository, int severity, String pluginId, int code, String message,
- Throwable e) {
- this(repository.getUrl(), 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.getUrl(), 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, Status.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, Status.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,
- Status.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, Status.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/RepositoryTaskAttribute.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/RepositoryTaskAttribute.java
deleted file mode 100644
index 7c429626f..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/RepositoryTaskAttribute.java
+++ /dev/null
@@ -1,285 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse 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.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
- */
-public 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 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 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 USER_ASSIGNED = "task.common.user.assigned";
-
- 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";
-
- 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";
-
- private boolean hidden = false;
-
- private boolean isReadOnly = false;
-
- /** Attribute pretty printing name */
- private String name;
-
- /** ID of the option used when updating the attribute on the server */
- private String id;
-
- /** Option parameters */
- private Map<String, String> optionParameters;
-
- /** Ordered list of legal attribute values */
- private List<String> options;
-
- /**
- * Attribute's values (selected or added)
- */
- private List<String> values = new ArrayList<String>();
-
- private Map<String, String> metaData = new HashMap<String, String>();
-
- 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);
- }
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/RepositoryTaskData.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/RepositoryTaskData.java
deleted file mode 100644
index d57a2d337..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/RepositoryTaskData.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.tasks.core;
-
-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.RepositoryTaskHandleUtil;
-
-/**
- * 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
- */
-public final class RepositoryTaskData extends AttributeContainer implements Serializable {
-
- private static final long serialVersionUID = 2304501248225237699L;
-
- private boolean isNew = false;
-
- private String reportID;
-
- private String repositoryURL;
-
- private String repositoryKind;
-
- private String taskKind;
-
- private List<TaskComment> taskComments = new ArrayList<TaskComment>();
-
- private 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 List<RepositoryOperation> repositoryOperations = new ArrayList<RepositoryOperation>();
-
- 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);
- }
-
- public List<RepositoryAttachment> getAttachments() {
- return attachments;
- }
-
- public String getId() {
- return reportID;
- }
-
- public String getTaskKey() {
- RepositoryTaskAttribute attr = getAttribute(RepositoryTaskAttribute.TASK_KEY);
- if (attr != null) {
- return attr.getValue();
- }
- return getId();
- }
-
- 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);
- }
- }
-
- public String getRepositoryKind() {
- 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;
- }
-
- public void setRepositoryURL(String repositoryURL) {
- this.repositoryURL = repositoryURL;
- for (RepositoryAttachment attachment : attachments) {
- attachment.setRepositoryUrl(repositoryURL);
- }
- }
-
- public final String getHandleIdentifier() {
- return RepositoryTaskHandleUtil.getHandle(getRepositoryUrl(), getId());
- }
-}
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/TaskComment.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskComment.java
deleted file mode 100644
index 095659e30..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskComment.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.tasks.core;
-
-import java.io.Serializable;
-
-/**
- * A comment posted by a user on a task.
- *
- * @author Rob Elves
- * @since 2.0
- */
-public class TaskComment extends AttributeContainer implements Serializable {
-
- private static final long serialVersionUID = 1076016406335550318L;
-
- /** Comment's number */
- private final 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;
- }
-
- /**
- * 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 <code>null</code> if not known
- */
- public String getAuthorName() {
- // TODO: Currently we don't get the real name from the xml.
- // Need retrieve these names somehow
- return getAuthor();
- }
-
- /**
- * 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/tasks/core/TaskContainerDelta.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskContainerDelta.java
deleted file mode 100644
index 591a81127..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskContainerDelta.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.core;
-
-/**
- * Immutable. Defines changes to Task List elements.
- *
- * @author Mik Kersten
- * @since 2.0
- */
-public final class TaskContainerDelta {
-
- public enum Kind {
- /**
- * One container added to another or to the root.
- */
- ADDED,
-
- /**
- * One container removed from another or from the root.
- */
- REMOVED,
-
- /**
- * Container has changed, e.g. has new children, a task's priority or planning info. For tasks changed state
- * tends to be show in a view.
- */
- CHANGED,
-
- /**
- * The content of the container has changed, e.g. new data has been downloaded for a task from the repository.
- * For tasks content tends to be show in an editor.
- */
- CONTENT,
-
- /**
- * The root of the data structure has changed.
- */
- ROOT
- }
-
- private final AbstractTaskContainer container;
-
- private final Kind kind;
-
- public TaskContainerDelta(AbstractTaskContainer container, Kind kind) {
- this.container = container;
- this.kind = kind;
- }
-
- public AbstractTaskContainer getContainer() {
- return container;
- }
-
- public Kind getKind() {
- return kind;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskList.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskList.java
deleted file mode 100644
index fbe26163d..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskList.java
+++ /dev/null
@@ -1,763 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse 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.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.CopyOnWriteArrayList;
-import java.util.concurrent.CopyOnWriteArraySet;
-
-import org.eclipse.mylyn.internal.tasks.core.LocalTask;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryTaskHandleUtil;
-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.monitor.core.StatusHandler;
-
-/**
- * Stores and manages task list elements and their containment hierarchy.
- *
- * @author Mik Kersten
- * @since 2.0
- */
-public class TaskList {
-
- private int lastLocalTaskId = 0;
-
- private Set<ITaskListChangeListener> changeListeners = new CopyOnWriteArraySet<ITaskListChangeListener>();
-
- private Map<String, AbstractTask> tasks;
-
- private Map<String, AbstractTaskCategory> categories;
-
- private Map<String, AbstractRepositoryQuery> queries;
-
- private TaskArchive archiveContainer;
-
- private UnfiledCategory defaultCategory;
-
- private List<AbstractTask> activeTasks;
-
- public TaskList() {
- reset();
- }
-
- /**
- * Public for testing.
- */
- public void reset() {
- tasks = new ConcurrentHashMap<String, AbstractTask>();
-
- categories = new ConcurrentHashMap<String, AbstractTaskCategory>();
- queries = new ConcurrentHashMap<String, AbstractRepositoryQuery>();
-
- archiveContainer = new TaskArchive();
- defaultCategory = new UnfiledCategory();
-
- activeTasks = new CopyOnWriteArrayList<AbstractTask>();
- lastLocalTaskId = 0;
- categories.put(defaultCategory.getHandleIdentifier(), defaultCategory);
- categories.put(archiveContainer.getHandleIdentifier(), archiveContainer);
- }
-
- public void addTask(AbstractTask task) throws IllegalArgumentException {
- addTask(task, archiveContainer);
- }
-
- /**
- * Returns an ITask for each of the given handles
- *
- * @since 2.0
- */
- public Set<AbstractTask> getTasks(Set<String> handles) {
- HashSet<AbstractTask> result = new HashSet<AbstractTask>();
- Map<String, AbstractTask> tempTasks = Collections.unmodifiableMap(tasks);
- for (String handle : handles) {
- AbstractTask tempTask = tempTasks.get(handle);
- if (tempTask != null) {
- result.add(tempTask);
- }
- }
- return result;
- }
-
- /**
- * Precondition: {@code container} already exists in tasklist (be it a parent task, category, or query)
- *
- * @param task
- * to be added (hit, subtask, etc)
- * @param container
- * task container, query or parent task
- */
- public void addTask(AbstractTask task, AbstractTaskContainer parentContainer) throws IllegalArgumentException {
- if (task == null) {
- throw new IllegalArgumentException("Task cannot be null");
- }
-
- AbstractTask newTask = tasks.get(task.getHandleIdentifier());
-
- if (newTask == null) {
- newTask = task;
- tasks.put(newTask.getHandleIdentifier(), newTask);
-// archiveContainer.addChild(newTask);
-// newTask.addParentContainer(archiveContainer);
-
- // NOTE: only called for newly-created tasks
- Set<TaskContainerDelta> delta = new HashSet<TaskContainerDelta>();
- delta.add(new TaskContainerDelta(newTask, TaskContainerDelta.Kind.ADDED));
- if (parentContainer != null) {
- delta.add(new TaskContainerDelta(parentContainer, TaskContainerDelta.Kind.CHANGED));
- }
- for (ITaskListChangeListener listener : changeListeners) {
- listener.containersChanged(delta);
- }
- }
-
- if (parentContainer != null) {
- parentContainer.internalAddChild(newTask);
- if (!(parentContainer instanceof AbstractTask) && !(parentContainer instanceof AbstractRepositoryQuery)) {
- newTask.addParentContainer(parentContainer);
- }
- } else {
- defaultCategory.internalAddChild(newTask);
- newTask.addParentContainer(defaultCategory);
- }
- }
-
- public void moveToContainer(AbstractTask task, AbstractTaskCategory container) {
- if (!tasks.containsKey(task.getHandleIdentifier())) {
- tasks.put(task.getHandleIdentifier(), task);
- }
- Set<TaskContainerDelta> delta = new HashSet<TaskContainerDelta>();
- delta.add(new TaskContainerDelta(container, TaskContainerDelta.Kind.CHANGED));
-
- Set<AbstractTaskContainer> currentContainers = task.getParentContainers();
- for (AbstractTaskContainer taskContainer : currentContainers) {
- if (taskContainer instanceof AbstractTaskCategory) {
- if (!(taskContainer instanceof TaskArchive)) {
- (taskContainer).internalRemoveChild(task);
- }
- task.removeParentContainer(taskContainer);
- delta.add(new TaskContainerDelta(taskContainer, TaskContainerDelta.Kind.CHANGED));
- }
- }
- if (container != null) {
- internalAddTask(task, container);
- delta.add(new TaskContainerDelta(container, TaskContainerDelta.Kind.CHANGED));
- if (archiveContainer.contains(task.getHandleIdentifier())) {
- archiveContainer.internalRemoveChild(task);
- delta.add(new TaskContainerDelta(archiveContainer, TaskContainerDelta.Kind.CHANGED));
- }
- } else {
- internalAddTask(task, archiveContainer);
- }
- for (ITaskListChangeListener listener : changeListeners) {
- listener.containersChanged(delta);
- }
- }
-
- public void refactorRepositoryUrl(String oldRepositoryUrl, String newRepositoryUrl) {
- 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()));
- }
- }
- }
-
- Set<TaskContainerDelta> delta = new HashSet<TaskContainerDelta>();
- for (AbstractRepositoryQuery query : queries.values()) {
- if (query.getRepositoryUrl().equals(oldRepositoryUrl)) {
- query.setRepositoryUrl(newRepositoryUrl);
- delta.add(new TaskContainerDelta(query, TaskContainerDelta.Kind.CHANGED));
- }
- }
- for (ITaskListChangeListener listener : changeListeners) {
- listener.containersChanged(delta);
- }
- }
-
- public void addCategory(TaskCategory category) throws IllegalArgumentException {
- if (category == null) {
- throw new IllegalArgumentException("Category cannot be null");
- }
-
- categories.put(category.getHandleIdentifier(), category);
-
- Set<TaskContainerDelta> delta = new HashSet<TaskContainerDelta>();
- delta.add(new TaskContainerDelta(category, TaskContainerDelta.Kind.ADDED));
- for (ITaskListChangeListener listener : changeListeners) {
- listener.containersChanged(delta);
- }
- }
-
- public void removeFromCategory(TaskCategory category, AbstractTask task) {
- moveToContainer(task, archiveContainer);
- }
-
- /**
- * TODO: merge this and removeFromCategory() into single removeFromContainer?
- *
- * @since 2.1
- */
- public void removeFromQuery(AbstractRepositoryQuery query, AbstractTask task) {
- query.internalRemoveChild(task);
- if (task.getParentContainers().size() == 0 && task.getLastReadTimeStamp() != null) {
- task.addParentContainer(archiveContainer);
- archiveContainer.internalAddChild(task);
- }
- }
-
- public void renameTask(AbstractTask task, String description) {
- task.setSummary(description);
-
- Set<TaskContainerDelta> delta = new HashSet<TaskContainerDelta>();
- delta.add(new TaskContainerDelta(task, TaskContainerDelta.Kind.CHANGED));
-
- for (ITaskListChangeListener listener : changeListeners) {
- listener.containersChanged(delta);
- }
- }
-
- /**
- * Use renameTask(..) for renaming tasks.
- */
- public void renameContainer(AbstractTaskContainer container, String newDescription) {
- if (container instanceof AbstractTask) {
- return;
- } else if (!(container instanceof TaskArchive) && !(container instanceof UnfiledCategory)) {
- if (queries.remove(container.getHandleIdentifier()) != null) {
- if (container instanceof AbstractTaskCategory) {
- ((AbstractTaskCategory) container).setHandleIdentifier(newDescription);
- } else if (container instanceof AbstractRepositoryQuery) {
- ((AbstractRepositoryQuery) container).setHandleIdentifier(newDescription);
- queries.put(((AbstractRepositoryQuery) container).getHandleIdentifier(),
- ((AbstractRepositoryQuery) container));
- }
- } else if (container instanceof TaskCategory && categories.remove(container.getHandleIdentifier()) != null) {
- ((TaskCategory) container).setHandleIdentifier(newDescription);
- categories.put(((TaskCategory) container).getHandleIdentifier(), (TaskCategory) container);
- }
- }
- // TODO: make this delta policy symmetrical with tasks
- Set<TaskContainerDelta> delta = new HashSet<TaskContainerDelta>();
- delta.add(new TaskContainerDelta(container, TaskContainerDelta.Kind.REMOVED));
- delta.add(new TaskContainerDelta(container, TaskContainerDelta.Kind.ADDED));
- for (ITaskListChangeListener listener : changeListeners) {
- listener.containersChanged(delta);
- }
- }
-
- public void addQuery(AbstractRepositoryQuery query) throws IllegalArgumentException {
- if (query == null) {
- throw new IllegalArgumentException("Query cannot be null");
- }
- queries.put(query.getHandleIdentifier(), query);
- Set<TaskContainerDelta> delta = new HashSet<TaskContainerDelta>();
- delta.add(new TaskContainerDelta(query, TaskContainerDelta.Kind.ADDED));
- for (ITaskListChangeListener listener : changeListeners) {
- listener.containersChanged(delta);
- }
- }
-
- /**
- * TODO: refactor around querying containers for their tasks
- *
- * Task is removed from all containers: root, archive, category, and tasks catchall (Currently no support for
- * deletion of subtasks)
- */
- public void deleteTask(AbstractTask task) {
- archiveContainer.internalRemoveChild(task);
- defaultCategory.internalRemoveChild(task);
-
- for (AbstractTaskContainer container : task.getParentContainers()) {
- container.internalRemoveChild(task);
- task.removeParentContainer(container);
- }
- tasks.remove(task.getHandleIdentifier());
-
- Set<TaskContainerDelta> delta = new HashSet<TaskContainerDelta>();
- delta.add(new TaskContainerDelta(task, TaskContainerDelta.Kind.REMOVED));
- for (ITaskListChangeListener listener : changeListeners) {
- listener.containersChanged(delta);
- }
- }
-
- public void deleteCategory(AbstractTaskCategory category) {
- for (AbstractTask task : category.getChildren()) {
- defaultCategory.internalAddChild(task);
- }
- categories.remove(category.getHandleIdentifier());
-
- Set<TaskContainerDelta> delta = new HashSet<TaskContainerDelta>();
- delta.add(new TaskContainerDelta(defaultCategory, TaskContainerDelta.Kind.CHANGED));
- delta.add(new TaskContainerDelta(category, TaskContainerDelta.Kind.REMOVED));
-
- for (ITaskListChangeListener listener : changeListeners) {
- listener.containersChanged(delta);
- }
- }
-
- public void deleteQuery(AbstractRepositoryQuery query) {
- queries.remove(query.getHandleIdentifier());
-
- for (AbstractTask task : query.getChildren()) {
- if (task.getParentContainers().size() == 0 && task.getLastReadTimeStamp() != null) {
- task.addParentContainer(archiveContainer);
- archiveContainer.internalAddChild(task);
- }
- }
-
- Set<TaskContainerDelta> delta = new HashSet<TaskContainerDelta>();
- delta.add(new TaskContainerDelta(query, TaskContainerDelta.Kind.REMOVED));
- for (ITaskListChangeListener listener : changeListeners) {
- listener.containersChanged(delta);
- }
- }
-
- public void markComplete(AbstractTask task, boolean complete) {
- task.setCompleted(complete);
-
- Set<TaskContainerDelta> delta = new HashSet<TaskContainerDelta>();
- delta.add(new TaskContainerDelta(task, TaskContainerDelta.Kind.CHANGED));
- for (ITaskListChangeListener listener : new ArrayList<ITaskListChangeListener>(changeListeners)) {
- listener.containersChanged(delta);
- }
- }
-
- public void addChangeListener(ITaskListChangeListener listener) {
- changeListeners.add(listener);
- }
-
- public void removeChangeListener(ITaskListChangeListener listener) {
- changeListeners.remove(listener);
- }
-
- /**
- * NOTE: Only public so that other externalizers can use it
- */
- public void internalAddCategory(TaskCategory category) {
- categories.put(category.getHandleIdentifier(), category);
- }
-
- public void internalAddTask(AbstractTask task, AbstractTaskCategory container) {
- tasks.put(task.getHandleIdentifier(), task);
- if (container != null) {
- container.internalAddChild(task);
- if (container instanceof TaskCategory || container instanceof UnfiledCategory) {
- task.addParentContainer(container);
- }
- } else {
- defaultCategory.internalAddChild(task);
- task.addParentContainer(defaultCategory);
- }
- }
-
- public void internalAddRootTask(AbstractTask task) {
- internalAddTask(task, defaultCategory);
- }
-
- public void internalAddQuery(AbstractRepositoryQuery query) {
- queries.put(query.getHandleIdentifier(), query);
- }
-
- public void setActive(AbstractTask task, boolean active) {
- task.setActive(active);
- if (active && !activeTasks.contains(task)) {
- activeTasks.add(task);
- } else if (!active) {
- activeTasks.remove(task);
- }
- }
-
- /**
- * For normal user operation getActiveTask() should be used instead.
- */
- public List<AbstractTask> getActiveTasks() {
- return activeTasks;
- }
-
- /**
- * @return First in set of all active tasks. Normal user operations only supports a single active task.
- */
- public AbstractTask getActiveTask() {
- if (activeTasks.size() > 0) {
- return activeTasks.get(0);
- } else {
- return null;
- }
- }
-
- public Set<AbstractTaskCategory> getCategories() {
- return Collections.unmodifiableSet(new HashSet<AbstractTaskCategory>(categories.values()));
- }
-
- public List<AbstractTaskCategory> getUserCategories() {
- List<AbstractTaskCategory> included = new ArrayList<AbstractTaskCategory>();
- for (AbstractTaskCategory category : categories.values()) {
- if (!(category instanceof TaskArchive)) {
- included.add(category);
- }
- }
- return included;
- }
-
- public Set<AbstractRepositoryQuery> getQueries() {
- // TODO: remove wrapping once API can change
- return Collections.unmodifiableSet(new HashSet<AbstractRepositoryQuery>(queries.values()));
- }
-
- public Set<AbstractTaskContainer> getRootElements() {
- Set<AbstractTaskContainer> roots = new HashSet<AbstractTaskContainer>();
- roots.add(defaultCategory);
- for (AbstractTaskCategory cat : categories.values())
- roots.add(cat);
- for (AbstractRepositoryQuery query : queries.values())
- roots.add(query);
- return roots;
- }
-
- public Collection<AbstractTask> getAllTasks() {
- return Collections.unmodifiableCollection(tasks.values());
- }
-
- public Set<AbstractTaskCategory> getTaskContainers() {
- Set<AbstractTaskCategory> containers = new HashSet<AbstractTaskCategory>();
- for (AbstractTaskCategory container : categories.values()) {
- if (container instanceof TaskCategory || container instanceof TaskArchive) {
- containers.add(container);
- }
- }
- return containers;
- }
-
- public AbstractRepositoryQuery getQueryForHandle(String handle) {
- if (handle == null) {
- return null;
- }
- for (AbstractRepositoryQuery query : queries.values()) {
- if (query.contains(handle)) {
- return query;
- }
- }
- return null;
- }
-
- public boolean isEmpty() {
- boolean archiveIsEmpty = getCategories().size() == 2 && getCategories().contains(archiveContainer)
- && getCategories().contains(defaultCategory) && archiveContainer.getChildren().isEmpty();
- return getAllTasks().size() == 0 && archiveIsEmpty && getQueries().size() == 0;
- }
-
- /**
- * 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);
- }
- }
-
- /**
- * @since 2.0
- */
- public AbstractTask getTask(String repositoryUrl, String taskId) {
- if (!RepositoryTaskHandleUtil.isValidTaskId(taskId)) {
- return null;
- }
-
- String handle = RepositoryTaskHandleUtil.getHandle(repositoryUrl, taskId);
- AbstractTask task = getTask(handle);
- return task;
- }
-
- /**
- * Searches for a task whose URL matches
- *
- * @return first task with a matching URL.
- * @since 2.0
- */
- public AbstractTask getRepositoryTask(String taskUrl) {
- for (AbstractTask currTask : tasks.values()) {
- String currUrl = currTask.getUrl();
- if (currUrl != null && !currUrl.equals("") && currUrl.equals(taskUrl)) {
- return currTask;
- }
- }
- return null;
- }
-
- /**
- * Searches for a task whose key matches.
- *
- * @return first task with a key, null if no matching task is found
- * @since 2.0
- */
- 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 AbstractTaskCategory getContainerForHandle(String categoryHandle) {
- for (AbstractTaskCategory cat : categories.values()) {
- if (cat != null) {
- if (cat.getHandleIdentifier().equals(categoryHandle)) {
- return cat;
- }
- }
- }
- return null;
- }
-
- public AbstractTaskCategory getDefaultCategory() {
- return defaultCategory;
- }
-
- public TaskArchive getArchiveContainer() {
- return archiveContainer;
- }
-
- /** if handle == null or no queries found an empty set is returned * */
- public Set<AbstractRepositoryQuery> getQueriesForHandle(String handle) {
- if (handle == null) {
- return Collections.emptySet();
- }
- Set<AbstractRepositoryQuery> queriesForHandle = new HashSet<AbstractRepositoryQuery>();
- for (AbstractRepositoryQuery query : queries.values()) {
- if (query.contains(handle)) {
- queriesForHandle.add(query);
- }
- }
- return queriesForHandle;
- }
-
-// /** if handle == null or no query hits found an empty set is returned * */
-// public Set<AbstractQueryHit> getQueryHits(Set<String> handles) {
-// if (handles == null) {
-// return Collections.emptySet();
-// }
-// HashSet<AbstractQueryHit> result = new HashSet<AbstractQueryHit>();
-// for (String handle : handles) {
-// AbstractQueryHit hit = queryHits.get(handle);
-// if (hit != null) {
-// result.add(hit);
-// }
-// }
-// return result;
-// }
-//
-// public AbstractQueryHit getQueryHit(String handle) {
-// if (handle != null) {
-// return queryHits.get(handle);
-// }
-// return null;
-// }
-
-// /** for testing */
-// public Set<AbstractQueryHit> getQueryHits() {
-// // TODO: remove wrapping once API can change
-// return new HashSet<AbstractQueryHit>(queryHits.values());
-// }
-//
-// /** called by AbstractRepositoryQuery */
-// public void addQueryHit(AbstractQueryHit hit) {
-// queryHits.put(hit.getHandleIdentifier(), hit);
-// }
-
- /**
- * return all queries for the given repository url
- */
- public Set<AbstractRepositoryQuery> getRepositoryQueries(String repositoryUrl) {
- Set<AbstractRepositoryQuery> repositoryQueries = new HashSet<AbstractRepositoryQuery>();
- if (repositoryUrl != null) {
- for (AbstractRepositoryQuery query : queries.values()) {
- if (query.getRepositoryUrl().equals(repositoryUrl)) {
- repositoryQueries.add(query);
- }
- }
- }
- return repositoryQueries;
- }
-
- /**
- * return all tasks for the given repository url
- */
- public Set<AbstractTask> getRepositoryTasks(String repositoryUrl) {
- Set<AbstractTask> repositoryTasks = new HashSet<AbstractTask>();
- if (repositoryUrl != null) {
- for (AbstractTask task : tasks.values()) {
- if (task.getRepositoryUrl().equals(repositoryUrl)) {
- repositoryTasks.add(task);
- }
- }
- }
- return repositoryTasks;
- }
-
- /**
- * Exposed for unit testing
- *
- * @return unmodifiable collection of ITaskActivityListeners
- */
- public Set<ITaskListChangeListener> getChangeListeners() {
- return Collections.unmodifiableSet(changeListeners);
- }
-
- /**
- * @param task
- * @param content
- * true if the content for the task (e.g. repository task data) has changed
- */
- public void notifyTaskChanged(AbstractTask task, boolean content) {
- for (ITaskListChangeListener listener : new ArrayList<ITaskListChangeListener>(changeListeners)) {
- try {
- Set<TaskContainerDelta> delta = new HashSet<TaskContainerDelta>();
- TaskContainerDelta.Kind kind;
- if (content) {
- kind = TaskContainerDelta.Kind.CONTENT;
- } else {
- kind = TaskContainerDelta.Kind.CHANGED;
- }
- delta.add(new TaskContainerDelta(task, kind));
- listener.containersChanged(delta);
- } catch (Throwable t) {
- StatusHandler.fail(t, "Notification failed for: " + listener, false);
- }
- }
- }
-
- public void notifyContainersUpdated(Set<? extends AbstractTaskContainer> containers) {
- if (containers == null) {
- Set<TaskContainerDelta> rootDelta = new HashSet<TaskContainerDelta>();
- rootDelta.add(new TaskContainerDelta(null, TaskContainerDelta.Kind.ROOT));
- } else {
- Set<TaskContainerDelta> delta = new HashSet<TaskContainerDelta>();
- for (AbstractTaskContainer abstractTaskContainer : containers) {
- delta.add(new TaskContainerDelta(abstractTaskContainer, TaskContainerDelta.Kind.CHANGED));
- }
- for (ITaskListChangeListener listener : new ArrayList<ITaskListChangeListener>(changeListeners)) {
- try {
- listener.containersChanged(delta);
- } catch (Throwable t) {
- StatusHandler.fail(t, "notification failed for: " + listener, false);
- }
- }
- }
- }
-
- public int getNextLocalTaskId() {
- return ++lastLocalTaskId;
- }
-
- public void setLastLocalTaskId(int lastTaskNum) {
- this.lastLocalTaskId = lastTaskNum;
- }
-
- /** For tasklist persistence. Use getNextTaskNum for task construction */
- public int getLastLocalTaskId() {
- return lastLocalTaskId;
- }
-
- /** Note: use getNextTaskNum for new task construction */
- public int findLargestTaskId() {
- int max = 0;
- max = Math.max(largestTaskIdHelper(tasks.values(), 0, 0), max);
- for (AbstractTaskCategory cat : getTaskContainers()) {
- max = Math.max(largestTaskIdHelper(cat.getChildren(), 0, 0), max);
- }
- return max;
- }
-
- /**
- * Maxes out at 20 recursions for safety.
- */
- private int largestTaskIdHelper(Collection<AbstractTask> tasks, int lastMax, int depth) {
- if (depth >= 20) {
- return lastMax;
- } else {
- depth++;
- int ihandle = 0;
- int max = 0;
- for (AbstractTask task : tasks) {
- if (task instanceof LocalTask) {
- String string = task.getHandleIdentifier().substring(task.getHandleIdentifier().lastIndexOf('-') + 1,
- task.getHandleIdentifier().length());
- try {
- ihandle = Integer.parseInt(string);
- } catch (NumberFormatException nfe) {
- // ignore
- }
- max = Math.max(ihandle, max);
- ihandle = largestTaskIdHelper(task.getChildren(), max, depth);
- max = Math.max(ihandle, max);
- }
- }
- return max;
- }
- }
-
- /**
- * @since 2.1
- */
- public final void insertTask(AbstractTask task, AbstractTaskCategory legacyCategory, AbstractTask parent) {
- if (task.getCategoryHandle().length() > 0) {
- AbstractTaskCategory category = this.getContainerForHandle(task.getCategoryHandle());
-
- if (category != null) {
- this.internalAddTask(task, category);
- } else if (parent == null) {
- this.internalAddRootTask(task);
- }
- } else if (legacyCategory != null && !(legacyCategory instanceof TaskArchive)
- && getCategories().contains(legacyCategory)) {
- task.addParentContainer(legacyCategory);
- legacyCategory.internalAddChild(task);
- } else {
- this.internalAddTask(task, this.getArchiveContainer());
- }
-
- this.setActive(task, task.isActive());
- }
-
-// /**
-// * Orphaned hits arise when no query in the tasklist references a hit in the
-// * master list maintained by the tasklist. Orphaned hits don't span
-// * workbench re-start but this just helps maintain the list in case of
-// * prolonged workbench uptime.
-// */
-// public void removeOrphanedHits() {
-// for (String handle : new HashSet<String>(queryHits.keySet())) {
-// Set<AbstractRepositoryQuery> queries = getQueriesForHandle(handle);
-// if (queries == null || queries.isEmpty()) {
-// queryHits.remove(handle);
-// }
-// }
-// }
-}
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 c0270cf88..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepository.java
+++ /dev/null
@@ -1,470 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse 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.net.MalformedURLException;
-import java.net.Proxy;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.LinkedHashMap;
-import java.util.Map;
-import java.util.TimeZone;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.mylyn.internal.tasks.core.IRepositoryConstants;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.web.core.WebClientUtil;
-
-/**
- * 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
- * @since 2.0
- */
-public class TaskRepository {
-
- public static final String DEFAULT_CHARACTER_ENCODING = "UTF-8";
-
- public static final String AUTH_PASSWORD = "org.eclipse.mylyn.tasklist.repositories.password"; //$NON-NLS-1$
-
- public static final String AUTH_USERNAME = "org.eclipse.mylyn.tasklist.repositories.username"; //$NON-NLS-1$
-
- public static final String ANONYMOUS_LOGIN = "org.eclipse.mylyn.tasklist.repositories.anonymous";
-
- public static final String AUTH_HTTP_PASSWORD = "org.eclipse.mylyn.tasklist.repositories.httpauth.password"; //$NON-NLS-1$
-
- public static final String AUTH_HTTP_USERNAME = "org.eclipse.mylyn.tasklist.repositories.httpauth.username"; //$NON-NLS-1$
-
- 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;
-
- 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";
-
- public static final String PROXY_USERNAME = "org.eclipse.mylyn.tasklist.repositories.proxy.username";
-
- public static final String PROXY_PASSWORD = "org.eclipse.mylyn.tasklist.repositories.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();
-
- // HACK: private credentials for headless operation
- private static Map<String, Map<String, String>> credentials = new HashMap<String, Map<String, String>>();
-
- private boolean isCachedUserName;
-
- private String cachedUserName;
-
- static {
- URL url = null;
- try {
- url = new URL("http://eclipse.org/mylyn");
- } catch (Exception ex) {
- // TODO ?
- }
- DEFAULT_URL = url;
- }
-
- private Map<String, String> properties = new LinkedHashMap<String, String>();
-
- /*
- * TODO: should be externalized and added to extension point, see bug 183606
- */
- private boolean isBugRepository = false;
-
- /**
- * for testing purposes
- */
- public TaskRepository(String kind, String serverUrl) {
- this(kind, serverUrl, NO_VERSION_SPECIFIED);
- }
-
- /**
- * for testing purposes sets repository time zone to local default time zone sets character encoding to
- * DEFAULT_CHARACTER_ENCODING
- */
- public TaskRepository(String kind, String serverUrl, String version) {
- this(kind, serverUrl, version, DEFAULT_CHARACTER_ENCODING, TimeZone.getDefault().getID());
- }
-
- public TaskRepository(String kind, String serverUrl, String version, String encoding, String timeZoneId) {
- this.properties.put(IRepositoryConstants.PROPERTY_CONNECTOR_KIND, kind);
- this.properties.put(IRepositoryConstants.PROPERTY_URL, serverUrl);
- this.properties.put(IRepositoryConstants.PROPERTY_VERSION, version);
- this.properties.put(IRepositoryConstants.PROPERTY_ENCODING, encoding);
- this.properties.put(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());
- }
-
- public TaskRepository(String kind, String serverUrl, Map<String, String> properties) {
- this.properties.put(IRepositoryConstants.PROPERTY_CONNECTOR_KIND, kind);
- this.properties.put(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());
- }
-
- public String getUrl() {
- return properties.get(IRepositoryConstants.PROPERTY_URL);
- }
-
- // private String getProxyHostname() {
- // return properties.get(PROXY_HOSTNAME);
- // }
-
- public void setUrl(String newUrl) {
- properties.put(IRepositoryConstants.PROPERTY_URL, newUrl);
- }
-
- public boolean hasCredentials() {
- String username = getUserName();
- String password = getPassword();
- return username != null && username.length() > 0 && password != null && password.length() > 0;
- }
-
- /**
- * 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 = getUserNameFromKeyRing();
- isCachedUserName = true;
- }
- return cachedUserName;
- }
-
- private String getUserNameFromKeyRing() {
- return getAuthInfo(AUTH_USERNAME);
- }
-
- public String getPassword() {
- return getAuthInfo(AUTH_PASSWORD);
- }
-
- public String getProxyUsername() {
- return getAuthInfo(PROXY_USERNAME);
- }
-
- public String getProxyPassword() {
- return getAuthInfo(PROXY_PASSWORD);
- }
-
- public String getHttpUser() {
- return getAuthInfo(AUTH_HTTP_USERNAME);
- }
-
- public String getHttpPassword() {
- return getAuthInfo(AUTH_HTTP_PASSWORD);
- }
-
- public void setAuthenticationCredentials(String username, String password) {
- setCredentials(username, password, AUTH_USERNAME, AUTH_PASSWORD);
- cachedUserName = username;
- isCachedUserName = true;
- }
-
- public void setProxyAuthenticationCredentials(String username, String password) {
- setCredentials(username, password, PROXY_USERNAME, PROXY_PASSWORD);
- }
-
- public void setHttpAuthenticationCredentials(String username, String password) {
- setCredentials(username, password, AUTH_HTTP_USERNAME, AUTH_HTTP_PASSWORD);
- }
-
- private void setCredentials(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);
- }
-
- public void flushAuthenticationCredentials() {
- synchronized (LOCK) {
- try {
- if (Platform.isRunning()) {
- try {
- Platform.flushAuthorizationInfo(new URL(getUrl()), AUTH_REALM, AUTH_SCHEME);
- } catch (MalformedURLException ex) {
- Platform.flushAuthorizationInfo(DEFAULT_URL, getUrl(), AUTH_SCHEME);
- }
- } else {
- Map<String, String> headlessCreds = getAuthInfo();
- headlessCreds.clear();
- }
- isCachedUserName = false;
- } catch (CoreException e) {
- StatusHandler.fail(e, "could not flush authorization credentials", true);
- }
- }
- }
-
- private void addAuthInfo(Map<String, String> map) {
- synchronized (LOCK) {
- try {
- if (Platform.isRunning()) {
- // write the map to the keyring
- try {
- Platform.addAuthorizationInfo(new URL(getUrl()), AUTH_REALM, AUTH_SCHEME, map);
- } catch (MalformedURLException ex) {
- Platform.addAuthorizationInfo(DEFAULT_URL, getUrl(), AUTH_SCHEME, map);
- }
- } else {
- Map<String, String> headlessCreds = getAuthInfo();
- headlessCreds.putAll(map);
- }
- } catch (CoreException e) {
- StatusHandler.fail(e, "Could not set authorization credentials", true);
- }
- }
- }
-
- @SuppressWarnings("unchecked")
- private Map<String, String> getAuthInfo() {
- synchronized (LOCK) {
- if (Platform.isRunning()) {
- try {
- return Platform.getAuthorizationInfo(new URL(getUrl()), AUTH_REALM, AUTH_SCHEME);
- } catch (MalformedURLException ex) {
- return Platform.getAuthorizationInfo(DEFAULT_URL, getUrl(), AUTH_SCHEME);
- } catch (Exception e) {
- StatusHandler.fail(e, "Could not retrieve authentication credentials", false);
- }
- } else {
- Map<String, String> headlessCreds = credentials.get(getUrl());
- if (headlessCreds == null) {
- headlessCreds = new HashMap<String, String>();
- credentials.put(getUrl(), headlessCreds);
- }
- return headlessCreds;
- }
- return null;
- }
- }
-
- private String getAuthInfo(String property) {
- Map<String, String> map = getAuthInfo();
- return map == null ? null : map.get(property);
- }
-
- public void clearCredentials() {
-
- }
-
- @Override
- public boolean equals(Object object) {
- if (object instanceof TaskRepository) {
- TaskRepository repository = (TaskRepository) object;
- if (getUrl() == null) {
- if (repository.getUrl() != null) {
- return false;
- }
- } else {
- if (!getUrl().equals(repository.getUrl())) {
- return false;
- }
- }
- if (getConnectorKind() == null) {
- return repository.getConnectorKind() == null;
- } else {
- return getConnectorKind().equals(repository.getConnectorKind());
- }
-
- } else {
- return super.equals(object);
- }
- }
-
- @Override
- public int hashCode() {
- int res = getUrl() == null ? 1 : getUrl().hashCode();
- return res * 31 + (getConnectorKind() == null ? 1 : getConnectorKind().hashCode());
- }
-
- @Override
- public String toString() {
- return getUrl();
- }
-
- /**
- * @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;
- }
- }
-
- public String getVersion() {
- final String version = properties.get(IRepositoryConstants.PROPERTY_VERSION);
- return version == null || "".equals(version) ? NO_VERSION_SPECIFIED : version;
- }
-
- public void setVersion(String ver) {
- properties.put(IRepositoryConstants.PROPERTY_VERSION, ver == null ? NO_VERSION_SPECIFIED : ver);
- }
-
- public String getCharacterEncoding() {
- final String encoding = properties.get(IRepositoryConstants.PROPERTY_ENCODING);
- return encoding == null || "".equals(encoding) ? DEFAULT_CHARACTER_ENCODING : encoding;
- }
-
- /**
- * for testing purposes
- */
- public void setCharacterEncoding(String characterEncoding) {
- properties.put(IRepositoryConstants.PROPERTY_ENCODING, characterEncoding == null ? DEFAULT_CHARACTER_ENCODING
- : characterEncoding);
- }
-
- public String getTimeZoneId() {
- final String timeZoneId = properties.get(IRepositoryConstants.PROPERTY_TIMEZONE);
- return timeZoneId == null || "".equals(timeZoneId) ? TimeZone.getDefault().getID() : timeZoneId;
- }
-
- public void setTimeZoneId(String timeZoneId) {
- this.properties.put(IRepositoryConstants.PROPERTY_TIMEZONE, timeZoneId == null ? TimeZone.getDefault().getID()
- : timeZoneId);
- }
-
- public String getSynchronizationTimeStamp() {
- return this.properties.get(IRepositoryConstants.PROPERTY_SYNCTIMESTAMP);
- }
-
- /**
- * ONLY for use by IRepositoryConstants. To set the sync time call IRepositoryConstants.setSyncTime(repository,
- * date);
- */
- public void setSynchronizationTimeStamp(String syncTime) {
- this.properties.put(IRepositoryConstants.PROPERTY_SYNCTIMESTAMP, syncTime);
- }
-
- public void setRepositoryLabel(String repositoryLabel) {
- this.properties.put(IRepositoryConstants.PROPERTY_LABEL, repositoryLabel);
- }
-
- /**
- * @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 getUrl();
- }
- }
-
- public Map<String, String> getProperties() {
- return new LinkedHashMap<String, String>(this.properties);
- }
-
- public String getProperty(String name) {
- return this.properties.get(name);
- }
-
- public void setProperty(String name, String value) {
- this.properties.put(name, value);
- }
-
- public boolean hasProperty(String name) {
- String value = getProperty(name);
- return value != null && value.trim().length() > 0;
- }
-
- public void removeProperty(String key) {
- this.properties.remove(key);
- }
-
- public Proxy getProxy() {
- Proxy proxy = Proxy.NO_PROXY;
- if (isDefaultProxyEnabled()) {
- proxy = WebClientUtil.getPlatformProxy(getUrl());
- } 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;
- }
-
- /**
- * Use platform proxy settings
- */
- public boolean isDefaultProxyEnabled() {
- return "true".equals(getProperty(PROXY_USEDEFAULT));
- }
-
- public void setAnonymous(boolean b) {
- properties.put(ANONYMOUS_LOGIN, String.valueOf(b));
- }
-
- public boolean isAnonymous() {
- return getProperty(ANONYMOUS_LOGIN) == null || "true".equals(getProperty(ANONYMOUS_LOGIN));
- }
-
- public boolean isBugRepository() {
- return isBugRepository;
- }
-
- public void setBugRepository(boolean isBugRepository) {
- this.isBugRepository = isBugRepository;
- }
-
- public void setOffline(boolean offline) {
- properties.put(OFFLINE, String.valueOf(offline));
- }
-
- public boolean isOffline() {
- return getProperty(OFFLINE) != null && "true".equals(getProperty(OFFLINE));
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepositoryManager.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepositoryManager.java
deleted file mode 100644
index 3757baeb3..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepositoryManager.java
+++ /dev/null
@@ -1,401 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse 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.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.Platform;
-import org.eclipse.mylyn.internal.tasks.core.TaskRepositoriesExternalizer;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-
-/**
- * Provides facilities for managing the lifecycle of and access to task repositories.
- *
- * @author Mik Kersten
- * @author Rob Elves
- * @author Jevgeni Holodkov
- * @since 2.0
- */
-public class TaskRepositoryManager {
-
- 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 Map<String, AbstractRepositoryConnector> repositoryConnectors = new HashMap<String, AbstractRepositoryConnector>();
-
- private Map<String, Set<TaskRepository>> repositoryMap = new HashMap<String, Set<TaskRepository>>();
-
- private Set<ITaskRepositoryListener> listeners = new HashSet<ITaskRepositoryListener>();
-
- private 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 TaskRepositoriesExternalizer externalizer = new TaskRepositoriesExternalizer();
-
- private TaskList taskList;
-
- public TaskRepositoryManager(TaskList taskList) {
- this.taskList = taskList;
- }
-
- public Collection<AbstractRepositoryConnector> getRepositoryConnectors() {
- return Collections.unmodifiableCollection(repositoryConnectors.values());
- }
-
- public AbstractRepositoryConnector getRepositoryConnector(String connectorKind) {
- return repositoryConnectors.get(connectorKind);
- }
-
- public AbstractRepositoryConnector getRepositoryConnector(AbstractTask task) {
- return getRepositoryConnector(task.getConnectorKind());
- }
-
- public void addRepositoryConnector(AbstractRepositoryConnector repositoryConnector) {
- if (!repositoryConnectors.values().contains(repositoryConnector)) {
- repositoryConnector.init(taskList);
- 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, String repositoryFilePath) {
- 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);
- saveRepositories(repositoryFilePath);
- for (ITaskRepositoryListener 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);
- }
- saveRepositories(repositoryFilePath);
- for (ITaskRepositoryListener listener : listeners) {
- listener.repositoryRemoved(repository);
- }
- }
-
- public void addListener(ITaskRepositoryListener listener) {
- listeners.add(listener);
- }
-
- public void removeListener(ITaskRepositoryListener listener) {
- listeners.remove(listener);
- }
-
- /* Public for testing. */
- public static String stripSlashes(String 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) {
- urlString = stripSlashes(urlString);
- if (repositoryMap.containsKey(kind)) {
- for (TaskRepository repository : repositoryMap.get(kind)) {
- if (repository.getUrl().equals(urlString)) {
- return repository;
- }
- }
- }
- return null;
- }
-
- /**
- * @return first repository that matches the given url
- */
- public TaskRepository getRepository(String urlString) {
- urlString = stripSlashes(urlString);
- for (String kind : repositoryMap.keySet()) {
- for (TaskRepository repository : repositoryMap.get(kind)) {
- if (repository.getUrl().equals(urlString)) {
- return repository;
- }
- }
- }
- return null;
- }
-
- /**
- * @return the first connector to accept the URL
- */
- public AbstractRepositoryConnector getConnectorForRepositoryTaskUrl(String url) {
- for (AbstractRepositoryConnector connector : getRepositoryConnectors()) {
- if (connector.getRepositoryUrlFromTaskUrl(url) != null) {
- for (TaskRepository repository : getRepositories(connector.getConnectorKind())) {
- if (url.startsWith(repository.getUrl())) {
- return connector;
- }
- }
- }
- }
- return null;
- }
-
- public Set<TaskRepository> getRepositories(String 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;
- }
-
- public TaskRepository getRepositoryForActiveTask(String repositoryKind, TaskList taskList) {
- AbstractTask activeTask = taskList.getActiveTask();
- if (activeTask != null) {
- String repositoryUrl = activeTask.getRepositoryUrl();
- for (TaskRepository repository : getRepositories(repositoryKind)) {
- if (repository.getUrl().equals(repositoryUrl)) {
- return repository;
- }
- }
- }
- return null;
- }
-
- /**
- * 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;
- }
-
- public Map<String, Set<TaskRepository>> readRepositories(String repositoriesFilePath) {
-
- repositoryMap.clear();
- orphanedRepositories.clear();
-
- loadRepositories(repositoriesFilePath);
-
- for (ITaskRepositoryListener listener : listeners) {
- try {
- listener.repositoriesRead();
- } catch (Throwable t) {
- StatusHandler.fail(t, "repository listener failed", false);
- }
- }
- return repositoryMap;
- }
-
- private void loadRepositories(String repositoriesFilePath) {
- try {
- 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);
- } else {
- orphanedRepositories.add(repository);
- }
- }
- }
- if (migration) {
- saveRepositories(repositoriesFilePath);
- }
- }
- } catch (Throwable t) {
- StatusHandler.fail(t, "could not load repositories", false);
- }
- }
-
- 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;
- }
-
- /**
- * for testing purposes
- */
- public void setVersion(TaskRepository repository, String version, String repositoriesFilePath) {
- repository.setVersion(version);
- saveRepositories(repositoriesFilePath);
- }
-
- /**
- * for testing purposes
- */
- public void setEncoding(TaskRepository repository, String encoding, String repositoriesFilePath) {
- repository.setCharacterEncoding(encoding);
- saveRepositories(repositoriesFilePath);
- }
-
- /**
- * for testing purposes
- */
- public void setTimeZoneId(TaskRepository repository, String timeZoneId, String repositoriesFilePath) {
- repository.setTimeZoneId(timeZoneId);
- saveRepositories(repositoriesFilePath);
- }
-
- public void setSynchronizationTime(TaskRepository repository, String syncTime, String repositoriesFilePath) {
- repository.setSynchronizationTimeStamp(syncTime);
- saveRepositories(repositoriesFilePath);
- }
-
- // TODO: Passing path here seems a little odd
- public 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.fail(t, "could not save repositories", false);
- return false;
- }
- return true;
- }
-
- /**
- * For testing.
- */
- public void clearRepositories(String repositoriesFilePath) {
- repositoryMap.clear();
- orphanedRepositories.clear();
- saveRepositories(repositoriesFilePath);
- }
-
- public void notifyRepositorySettingsChanged(TaskRepository repository) {
- for (ITaskRepositoryListener listener : listeners) {
- listener.repositorySettingsChanged(repository);
- }
- }
-
- public void insertRepositories(Set<TaskRepository> repositories, String repositoryFilePath) {
- for (TaskRepository repository : repositories) {
- if (getRepository(repository.getConnectorKind(), repository.getUrl()) == null) {
- addRepository(repository, repositoryFilePath);
- }
- }
- }
-
- public boolean isOwnedByUser(AbstractTask task) {
- if (task.isLocal()) {
- return true;
- }
-
- AbstractTask repositoryTask = task;
- TaskRepository repository = getRepository(repositoryTask.getConnectorKind(), repositoryTask.getRepositoryUrl());
- if (repository != null && repositoryTask.getOwner() != null) {
- return repositoryTask.getOwner().equals(repository.getUserName());
- }
-
- return false;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.tests/.classpath b/org.eclipse.mylyn.tasks.tests/.classpath
deleted file mode 100644
index c9c6503f7..000000000
--- a/org.eclipse.mylyn.tasks.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="**/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 63df12cbd..000000000
--- a/org.eclipse.mylyn.tasks.tests/.project
+++ /dev/null
@@ -1,28 +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>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</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 888de1277..000000000
--- a/org.eclipse.mylyn.tasks.tests/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,316 +0,0 @@
-#Sun Jun 24 11:52:58 EDT 2007
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.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=disabled
-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.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.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
-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=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-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.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.5
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=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_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 \ No newline at end of file
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 1e4caec9f..000000000
--- a/org.eclipse.mylyn.tasks.tests/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,6 +0,0 @@
-#Mon Jul 09 18:11:45 PDT 2007
-eclipse.preferences.version=1
-formatter_profile=_Mylar based on Eclipse [built-in]
-formatter_settings_version=11
-internal.default.compliance=default
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return the ${bare_field_name}\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} the ${bare_field_name} to set\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\r\n * \r\n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author ${user}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*******************************************************************************\r\n * Copyright (c) 2004, 2007 Mylyn project committers and others.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n *******************************************************************************/\r\n\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ignore\r\n${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ignore</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template></templates>
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.mylar.tasklist.prefs b/org.eclipse.mylyn.tasks.tests/.settings/org.eclipse.mylar.tasklist.prefs
deleted file mode 100644
index a6cf96a98..000000000
--- a/org.eclipse.mylyn.tasks.tests/.settings/org.eclipse.mylar.tasklist.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Fri Oct 20 16:54:30 PDT 2006
-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.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.prefs b/org.eclipse.mylyn.tasks.tests/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index 769b229ff..000000000
--- a/org.eclipse.mylyn.tasks.tests/.settings/org.eclipse.pde.prefs
+++ /dev/null
@@ -1,12 +0,0 @@
-#Thu Nov 03 15:45:55 PST 2005
-compilers.p.deprecated=2
-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-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 ea3cf9870..000000000
--- a/org.eclipse.mylyn.tasks.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,29 +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.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,
- org.eclipse.mylyn.web.core
-Eclipse-AutoStart: true
-Bundle-ClassPath: mylyn-tasklist-tests.jar
-Export-Package: org.eclipse.mylyn.tasks.tests,
- org.eclipse.mylyn.tasks.tests.connector
-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 80f994373..000000000
--- a/org.eclipse.mylyn.tasks.tests/build.properties
+++ /dev/null
@@ -1,18 +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
-jars.compile.order = mylyn-tasklist-tests.jar
-source.mylyn-tasklist-tests.jar = src/
-output.mylyn-tasklist-tests.jar = bin/
-src.includes = about.html,\
- src/,\
- META-INF/
-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 a7e57d273..000000000
--- a/org.eclipse.mylyn.tasks.tests/plugin.xml
+++ /dev/null
@@ -1,27 +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"
- type="mock"/>
-
- <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"
- customNotifications="false"
- 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/AllTasksTests.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AllTasksTests.java
deleted file mode 100644
index 40592241c..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AllTasksTests.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.tasks.tests;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-/**
- * @author Mik Kersten
- */
-public class AllTasksTests {
-
- public static Test suite() {
- TestSuite suite = new TestSuite("Test for org.eclipse.mylyn.tasks.tests");
-
- // $JUnit-BEGIN$
- suite.addTestSuite(TaskActivationActionTest.class);
- suite.addTestSuite(TaskListPresentationTest.class);
- suite.addTestSuite(TaskRepositoryTest.class);
- suite.addTestSuite(TaskRepositorySorterTest.class);
- suite.addTestSuite(TaskDataManagerTest.class);
- suite.addTestSuite(CopyDetailsActionTest.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(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(UrlConnectionUtilTest.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);
- // $JUnit-END$
-
- // suite.addTestSuite(BackgroundSaveTest.class);
- // suite.addTestSuite(RetrieveTitleFromUrlTest.class);
-
- suite.addTestSuite(org.eclipse.mylyn.tasks.tests.web.NamedPatternTest.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 8407e8141..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AttachmentJobTest.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 java.io.File;
-import java.io.RandomAccessFile;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.Status;
-import org.eclipse.mylyn.internal.tasks.ui.actions.CopyAttachmentToClipboardJob;
-import org.eclipse.mylyn.internal.tasks.ui.actions.DownloadAttachmentJob;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.RepositoryAttachment;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.tasks.tests.connector.MockAttachmentHandler;
-import org.eclipse.mylyn.tasks.tests.connector.MockRepositoryConnector;
-import org.eclipse.mylyn.tasks.tests.connector.MockStatusHandler;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Test task attachment jobs.
- *
- * @author Steffen Pingel
- */
-public class AttachmentJobTest extends TestCase {
-
- private TaskRepositoryManager manager;
-
- private MockRepositoryConnector connector;
-
- private MockAttachmentHandler attachmentHandler;
-
- private MockStatusHandler statusHandler;
-
- private TaskRepository repository;
-
- private RepositoryAttachment attachment;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
-
- manager = TasksUiPlugin.getRepositoryManager();
-
- repository = new TaskRepository(MockRepositoryConnector.REPOSITORY_KIND, MockRepositoryConnector.REPOSITORY_URL);
- manager.addRepository(repository, TasksUiPlugin.getDefault().getRepositoriesFilePath());
-
- attachmentHandler = new MockAttachmentHandler();
-
- connector = new MockRepositoryConnector();
- connector.setAttachmentHandler(attachmentHandler);
- manager.addRepositoryConnector(connector);
-
- statusHandler = new MockStatusHandler();
- StatusHandler.addStatusHandler(statusHandler);
-
- attachment = new RepositoryAttachment(null);
- attachment.setRepositoryKind(repository.getConnectorKind());
- attachment.setRepositoryUrl(repository.getUrl());
- }
-
- @Override
- protected void tearDown() throws Exception {
- if (statusHandler != null) {
- StatusHandler.removeStatusHandler(statusHandler);
- }
- }
-
- 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());
- statusHandler.assertNoStatus();
-
- 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/BackgroundSaveTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/BackgroundSaveTest.java
deleted file mode 100644
index 9fa82db1d..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/BackgroundSaveTest.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.tasks.tests;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Locale;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.internal.tasks.ui.util.BackgroundSaveTimer;
-import org.eclipse.mylyn.internal.tasks.ui.util.TaskListSaveManager;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * Tests the mechanism for saving the task data periodically. If this test fails unexpectedly, try adjusting the timing.
- *
- * @author Wesley Coelho
- * @author Mik Kersten (rewrite)
- */
-public class BackgroundSaveTest extends TestCase {
-
- private BackgroundSaveTimer saveTimer;
-
- private TaskListSaveManager saveManager;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- TasksUiPlugin.getTaskListManager().saveTaskList();
- saveManager = new TaskListSaveManager();
-// saveManager = TasksUiPlugin.getDefault().getTaskListSaveManager();
-
- saveTimer = new BackgroundSaveTimer(saveManager);
- saveTimer.setSaveIntervalMillis(50);
- saveTimer.start();
-// saveManager.setForceBackgroundSave(true);
- }
-
- @Override
- protected void tearDown() throws Exception {
- saveTimer.stop();
- super.tearDown();
-// saveManager.setForceBackgroundSave(false);
- }
-
- 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 {
- File file = TasksUiPlugin.getTaskListManager().getTaskListFile();
- long previouslyModified = file.lastModified();
-// TasksUiPlugin.getTaskListManager().saveTaskList();
- saveManager.saveTaskList(true, false);
- assertTrue(file.lastModified() > previouslyModified);
- }
- }
-}
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 c53783616..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.MockRepositoryTask;
-
-/**
- * @author Mik Kersten
- */
-public class CopyDetailsActionTest extends TestCase {
-
- public void testIdLabelIncluded() {
- MockRepositoryTask task = new MockRepositoryTask("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/NewTaskWizardRepositorySelectionTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/NewTaskWizardRepositorySelectionTest.java
deleted file mode 100644
index 73c228ccd..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/NewTaskWizardRepositorySelectionTest.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.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.views.TaskListView;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.NewTaskWizard;
-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.MockRepositoryTask;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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,
- TasksUiPlugin.getDefault().getRepositoriesFilePath());
-
- Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- TaskListView view = TaskListView.openInActivePerspective();
- MockRepositoryTask mockTask = new MockRepositoryTask("mock.task");
- TasksUiPlugin.getTaskActivityManager().scheduleNewTask(mockTask);
- TasksUiPlugin.getTaskListManager().getTaskList().addTask(mockTask,
- TasksUiPlugin.getTaskListManager().getTaskList().getDefaultCategory());
-
- view.setFocusedMode(true);
- view.refreshAndFocus(true);
- view.getViewer().setSelection(new StructuredSelection(mockTask), true);
- assertEquals(mockTask, ((StructuredSelection) view.getViewer().getSelection()).getFirstElement());
-
- NewTaskWizard wizard = new NewTaskWizard();
- 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.getTaskListManager().getTaskList().deleteTask(mockTask);
- wizard.dispose();
- dialog.close();
- }
-
- // see bug bug 202184
- public void testDefaultWithNoTaskListSelection() {
- TaskListView view = TaskListView.openInActivePerspective();
- view.getViewer().setSelection(new StructuredSelection());
-
- NewTaskWizard wizard = new NewTaskWizard();
- 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.REPOSITORY_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 2ee9739b0..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/OfflineCachingStorageTest.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.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.ui.OfflineCachingStorage;
-import org.eclipse.mylyn.internal.tasks.ui.OfflineFileStorage;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskAttribute;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.tests.connector.MockAttributeFactory;
-import org.eclipse.mylyn.tasks.tests.connector.MockRepositoryConnector;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @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.getRepositoryKind());
- 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());
- }
-}
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 b8d36be8f..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.ui.OfflineFileStorage;
-import org.eclipse.mylyn.tasks.core.RepositoryAttachment;
-import org.eclipse.mylyn.tasks.core.RepositoryOperation;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskAttribute;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.TaskComment;
-import org.eclipse.mylyn.tasks.tests.connector.MockAttributeFactory;
-import org.eclipse.mylyn.tasks.tests.connector.MockRepositoryConnector;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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.getRepositoryKind());
- 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/PersonProposalProviderTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/PersonProposalProviderTest.java
deleted file mode 100644
index f8ae44d37..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/PersonProposalProviderTest.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.tasks.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jface.fieldassist.IContentProposal;
-import org.eclipse.mylyn.internal.tasks.ui.PersonProposalProvider;
-import org.eclipse.mylyn.tasks.tests.connector.MockRepositoryTask;
-
-public class PersonProposalProviderTest extends TestCase {
-
- public void testGetProposalsNullParameters() {
- PersonProposalProvider provider = new PersonProposalProvider(null, 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() {
- MockRepositoryTask task = new MockRepositoryTask(null, "1", null);
- task.setOwner("foo");
- PersonProposalProvider provider = new PersonProposalProvider(task, 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());
- }
-
-}
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 4b00a5a62..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ProjectRepositoryAssociationTest.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.core.resources.IFolder;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.mylyn.resources.tests.ResourceTestUtil;
-import org.eclipse.mylyn.resources.tests.TestProject;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @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(), true));
- TaskRepository repository = new TaskRepository(REPOSITORY_KIND, REPOSITORY_URL);
- TasksUiPlugin.getRepositoryManager().addRepository(repository,
- TasksUiPlugin.getDefault().getRepositoriesFilePath());
- TasksUiPlugin.getDefault().setRepositoryForResource(projectWrapper.getProject(), repository);
- TaskRepository returnedRepository = TasksUiPlugin.getDefault().getRepositoryForResource(
- projectWrapper.getProject(), true);
- assertNotNull(returnedRepository);
- assertEquals(REPOSITORY_KIND, returnedRepository.getConnectorKind());
- assertEquals(REPOSITORY_URL, returnedRepository.getUrl());
- }
-
- public void testRepositoryForFolder() throws CoreException {
- IFolder folder = projectWrapper.createFolder("testFolder");
- assertTrue(folder.exists());
- assertNull(TasksUiPlugin.getDefault().getRepositoryForResource(folder, true));
- TaskRepository repository = new TaskRepository(REPOSITORY_KIND, REPOSITORY_URL);
- TasksUiPlugin.getRepositoryManager().addRepository(repository,
- TasksUiPlugin.getDefault().getRepositoriesFilePath());
- TasksUiPlugin.getDefault().setRepositoryForResource(folder, repository);
- TaskRepository returnedRepository = TasksUiPlugin.getDefault().getRepositoryForResource(folder, true);
- assertNotNull(returnedRepository);
- assertEquals(REPOSITORY_KIND, returnedRepository.getConnectorKind());
- assertEquals(REPOSITORY_URL, returnedRepository.getUrl());
- }
-}
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 0de339b03..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/QueryExportImportTest.java
+++ /dev/null
@@ -1,338 +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.ui.ITasksUiConstants;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.AbstractTaskListFactory;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.tasks.tests.connector.MockRepositoryConnector;
-import org.eclipse.mylyn.tasks.tests.connector.MockRepositoryQuery;
-import org.eclipse.mylyn.tasks.tests.connector.MockTaskListFactory;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @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());
- TasksUiPlugin.getSynchronizationManager().setForceSyncExec(true);
- }
-
- @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() {
- List<AbstractTaskListFactory> oldExternalizers = TasksUiPlugin.getTaskListManager()
- .getTaskListWriter()
- .getExternalizers();
- List<AbstractTaskListFactory> externalizers = new ArrayList<AbstractTaskListFactory>();
- externalizers.add(new MockTaskListFactory());
- TasksUiPlugin.getTaskListManager().getTaskListWriter().setDelegateExternalizers(externalizers);
-
- List<AbstractRepositoryQuery> queries = new ArrayList<AbstractRepositoryQuery>();
-
- 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<AbstractRepositoryQuery> 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,
- TasksUiPlugin.getDefault().getRepositoriesFilePath());
-
- // create test data
- List<AbstractRepositoryQuery> queries = new ArrayList<AbstractRepositoryQuery>();
-
- MockRepositoryQuery query1 = new MockRepositoryQuery("Test Query");
- query1.setRepositoryUrl(repository.getUrl());
- MockRepositoryQuery query2 = new MockRepositoryQuery("Test Query");
- query2.setRepositoryUrl(repository.getUrl());
- MockRepositoryQuery query3 = new MockRepositoryQuery("Test Query");
- query3.setRepositoryUrl(repository.getUrl());
-
- queries.add(query1);
- queries.add(query2);
- queries.add(query3);
-
- // run tested functionality
- TasksUiPlugin.getTaskListManager().insertQueries(queries);
-
- // extract results
- Set<AbstractRepositoryQuery> queriesSet = TasksUiPlugin.getTaskListManager().getTaskList().getQueries();
- Map<String, AbstractRepositoryQuery> queriesMap = new HashMap<String, AbstractRepositoryQuery>();
- for (AbstractRepositoryQuery 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,
- TasksUiPlugin.getDefault().getRepositoriesFilePath());
-
- // create test data
- List<AbstractRepositoryQuery> queries = new ArrayList<AbstractRepositoryQuery>();
-
- MockRepositoryQuery query1 = new MockRepositoryQuery("Test2");
- query1.setRepositoryUrl(repository.getUrl());
- MockRepositoryQuery query2 = new MockRepositoryQuery("Test2[1]");
- query2.setRepositoryUrl(repository.getUrl());
- MockRepositoryQuery query3 = new MockRepositoryQuery("Test2");
- query3.setRepositoryUrl(repository.getUrl());
-
- queries.add(query1);
- queries.add(query2);
- queries.add(query3);
-
- // run tested functionality
- TasksUiPlugin.getTaskListManager().insertQueries(queries);
-
- // extract results
- Set<AbstractRepositoryQuery> queriesSet = TasksUiPlugin.getTaskListManager().getTaskList().getQueries();
- Map<String, AbstractRepositoryQuery> queriesMap = new HashMap<String, AbstractRepositoryQuery>();
- for (AbstractRepositoryQuery 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,
- TasksUiPlugin.getDefault().getRepositoriesFilePath());
-
- // create test data
- List<AbstractRepositoryQuery> queries = new ArrayList<AbstractRepositoryQuery>();
-
- MockRepositoryQuery query1 = new MockRepositoryQuery("Test[-10]");
- query1.setRepositoryUrl(repository.getUrl());
- MockRepositoryQuery query2 = new MockRepositoryQuery("Test[ABC]");
- query2.setRepositoryUrl(repository.getUrl());
- MockRepositoryQuery query3 = new MockRepositoryQuery("Test[1]");
- query3.setRepositoryUrl(repository.getUrl());
- MockRepositoryQuery query4 = new MockRepositoryQuery("Test");
- query4.setRepositoryUrl(repository.getUrl());
- MockRepositoryQuery query5 = new MockRepositoryQuery("Test");
- query5.setRepositoryUrl(repository.getUrl());
-
- queries.add(query1);
- queries.add(query2);
- queries.add(query3);
- queries.add(query4);
- queries.add(query5);
-
- // run tested functionality
- TasksUiPlugin.getTaskListManager().insertQueries(queries);
-
- // extract results
- Set<AbstractRepositoryQuery> queriesSet = TasksUiPlugin.getTaskListManager().getTaskList().getQueries();
- Map<String, AbstractRepositoryQuery> queriesMap = new HashMap<String, AbstractRepositoryQuery>();
- for (AbstractRepositoryQuery 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,
- TasksUiPlugin.getDefault().getRepositoriesFilePath());
-
- // create test data
- List<AbstractRepositoryQuery> queries = new ArrayList<AbstractRepositoryQuery>();
-
- MockRepositoryQuery query1 = new MockRepositoryQuery("Test Query");
- query1.setRepositoryUrl(repository.getUrl());
- MockRepositoryQuery query2 = new MockRepositoryQuery("Bad Query");
- query2.setRepositoryUrl("bad url");
-
- queries.add(query1);
- queries.add(query2);
-
- // run tested functionality
- List<AbstractRepositoryQuery> badQueries = TasksUiPlugin.getTaskListManager().insertQueries(queries);
-
- // extract results
- Set<AbstractRepositoryQuery> queriesSet = TasksUiPlugin.getTaskListManager().getTaskList().getQueries();
- Map<String, AbstractRepositoryQuery> queriesMap = new HashMap<String, AbstractRepositoryQuery>();
- for (AbstractRepositoryQuery 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,
- TasksUiPlugin.getDefault().getRepositoriesFilePath());
-
- // create test data
- List<AbstractRepositoryQuery> queries = new ArrayList<AbstractRepositoryQuery>();
- MockRepositoryQuery query1 = new MockRepositoryQuery("Test Query");
- query1.setRepositoryUrl(repository.getUrl());
- 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(ITasksUiConstants.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<AbstractRepositoryQuery> resultQueries = TasksUiPlugin.getTaskListManager()
- .getTaskListWriter()
- .readQueries(outFile);
- Set<TaskRepository> repositories = TasksUiPlugin.getTaskListManager().getTaskListWriter().readRepositories(
- outFile);
-
- TasksUiPlugin.getRepositoryManager().insertRepositories(repositories,
- TasksUiPlugin.getDefault().getRepositoriesFilePath());
- TasksUiPlugin.getTaskListManager().insertQueries(resultQueries);
-
- // extract results
- Set<AbstractRepositoryQuery> queriesSet = TasksUiPlugin.getTaskListManager().getTaskList().getQueries();
- Map<String, AbstractRepositoryQuery> queriesMap = new HashMap<String, AbstractRepositoryQuery>();
- for (AbstractRepositoryQuery 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 0b1df6b2b..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/RepositorySettingsPageTest.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse 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.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.tests.connector.MockRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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(new MockRepositoryConnectorUi());
- 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(new MockRepositoryConnectorUi());
- page.setNeedsEncoding(false);
-
- Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- page.createControl(shell);
- page.setVisible(true);
-
- page.createTaskRepository();
- }
-
- public void testNeedsAnonyoumousLoginFalse() {
- MockRepositorySettingsPage page = new MockRepositorySettingsPage(new MockRepositoryConnectorUi());
- 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(new MockRepositoryConnectorUi());
- 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(new MockRepositoryConnectorUi());
- 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());
- }
-
- private class MockRepositorySettingsPage extends AbstractRepositorySettingsPage {
-
- public MockRepositorySettingsPage(AbstractRepositoryConnectorUi repositoryUi) {
- super("title", "summary", repositoryUi);
- }
-
- @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;
- }
- }
-
-}
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 9c10206f7..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/RepositoryTaskSynchronizationTest.java
+++ /dev/null
@@ -1,454 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse 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 junit.framework.TestCase;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.mylyn.tasks.core.AbstractAttributeFactory;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskDataHandler;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskAttribute;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.AbstractTask.RepositoryTaskSyncState;
-import org.eclipse.mylyn.tasks.tests.connector.MockAttributeFactory;
-import org.eclipse.mylyn.tasks.tests.connector.MockRepositoryConnector;
-import org.eclipse.mylyn.tasks.tests.connector.MockRepositoryTask;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @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 TestRepositoryConnector connector = new TestRepositoryConnector();
-
- private TestOfflineTaskHandler handler = new TestOfflineTaskHandler();
-
- private RepositoryTaskData newData;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- TasksUiPlugin.getSynchronizationManager().setForceSyncExec(true);
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- public void testHasIncoming() {
- AbstractTask task = new MockRepositoryTask(MOCCK_ID);
- RepositoryTaskData taskData = new RepositoryTaskData(new MockAttributeFactory(), connector.getConnectorKind(),
- MockRepositoryConnector.REPOSITORY_URL, MOCCK_ID);
- task.setLastReadTimeStamp("never");
-
- assertTrue(TasksUiPlugin.getSynchronizationManager().checkHasIncoming(task, taskData));
- taskData.setAttributeValue(RepositoryTaskAttribute.DATE_MODIFIED, "2006-06-21 15:29:39");
- assertTrue(TasksUiPlugin.getSynchronizationManager().checkHasIncoming(task, taskData));
- taskData.setAttributeValue(RepositoryTaskAttribute.DATE_MODIFIED, DATE_STAMP_1);
- assertTrue(TasksUiPlugin.getSynchronizationManager().checkHasIncoming(task, taskData));
- task.setLastReadTimeStamp("2006-06-21 15:29:39");
- assertTrue(TasksUiPlugin.getSynchronizationManager().checkHasIncoming(task, taskData));
- task.setLastReadTimeStamp(DATE_STAMP_1);
- assertFalse(TasksUiPlugin.getSynchronizationManager().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(RepositoryTaskSyncState.INCOMING, RepositoryTaskSyncState.INCOMING);
- RepositoryTaskData taskData = TasksUiPlugin.getTaskDataManager().getNewTaskData(task.getRepositoryUrl(),
- task.getTaskId());
- assertEquals(DATE_STAMP_1, task.getLastReadTimeStamp());
- assertEquals(RepositoryTaskSyncState.INCOMING, task.getSynchronizationState());
- assertEquals(DATE_STAMP_2, newData.getLastModified());
- TasksUiPlugin.getSynchronizationManager().saveIncoming(task, newData, false);
- assertEquals(DATE_STAMP_1, task.getLastReadTimeStamp());
- assertEquals(RepositoryTaskSyncState.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.getSynchronizationManager().saveIncoming(task, taskData3, false);
- // last modified stamp not updated until user synchronizes (newdata ==
- // olddata)
- assertEquals(RepositoryTaskSyncState.INCOMING, task.getSynchronizationState());
- assertEquals(DATE_STAMP_1, task.getLastReadTimeStamp());
- taskData = TasksUiPlugin.getTaskDataManager().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.getSynchronizationManager().saveIncoming(task, taskData3, false);
- assertEquals(RepositoryTaskSyncState.INCOMING, task.getSynchronizationState());
- assertEquals(DATE_STAMP_1, task.getLastReadTimeStamp());
- taskData = TasksUiPlugin.getTaskDataManager().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(RepositoryTaskSyncState.INCOMING,
- RepositoryTaskSyncState.SYNCHRONIZED);
- assertEquals(DATE_STAMP_1, task.getLastReadTimeStamp());
- TasksUiPlugin.getSynchronizationManager().saveIncoming(task, newData, false);
- assertEquals(RepositoryTaskSyncState.INCOMING, task.getSynchronizationState());
- assertEquals(DATE_STAMP_1, task.getLastReadTimeStamp());
-
- task = primeTaskAndRepository(RepositoryTaskSyncState.INCOMING, RepositoryTaskSyncState.SYNCHRONIZED);
- assertEquals(DATE_STAMP_1, task.getLastReadTimeStamp());
- TasksUiPlugin.getSynchronizationManager().saveIncoming(task, newData, true);
- assertEquals(RepositoryTaskSyncState.INCOMING, task.getSynchronizationState());
- // assertEquals(RepositoryTaskSyncState.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(RepositoryTaskSyncState.INCOMING, RepositoryTaskSyncState.INCOMING);
- assertEquals(DATE_STAMP_1, task.getLastReadTimeStamp());
- TasksUiPlugin.getSynchronizationManager().saveIncoming(task, newData, true);
- assertEquals(RepositoryTaskSyncState.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(RepositoryTaskSyncState.INCOMING,
- // RepositoryTaskSyncState.SYNCHRONIZED);
- // assertEquals(DATE_STAMP_1, task.getLastSyncDateStamp());
- // task.setLastSyncDateStamp(null);
- // TasksUiPlugin.getSynchronizationManager().updateOfflineState(task,
- // newData, false);
- // assertEquals(RepositoryTaskSyncState.INCOMING, task.getSyncState());
- // assertEquals(DATE_STAMP_1, task.getLastSyncDateStamp());
- //
- // TasksUiPlugin.getSynchronizationManager().updateOfflineState(task,
- // newData, false);
- // assertEquals(RepositoryTaskSyncState.SYNCHRONIZED, task.getSyncState());
- // assertEquals(DATE_STAMP_1, task.getLastSyncDateStamp());
- // }
-
- /*
- * public void testIncomingToConflict() { // invalid }
- */
-
- /*
- * public void testIncomingToOutgoing() { // invalid }
- */
-
- public void testSynchronizedToIncoming() {
- AbstractTask task = primeTaskAndRepository(RepositoryTaskSyncState.SYNCHRONIZED,
- RepositoryTaskSyncState.INCOMING);
- assertEquals(DATE_STAMP_1, task.getLastReadTimeStamp());
- TasksUiPlugin.getSynchronizationManager().saveIncoming(task, newData, false);
- assertEquals(RepositoryTaskSyncState.INCOMING, task.getSynchronizationState());
- RepositoryTaskData taskData = TasksUiPlugin.getTaskDataManager().getNewTaskData(task.getRepositoryUrl(),
- task.getTaskId());
- assertEquals(DATE_STAMP_2, taskData.getLastModified());
- // assertEquals(DATE_STAMP_2, task.getLastModifiedDateStamp());
- }
-
- public void testSynchronizedToSynchronized() {
- AbstractTask task = primeTaskAndRepository(RepositoryTaskSyncState.SYNCHRONIZED,
- RepositoryTaskSyncState.SYNCHRONIZED);
- assertEquals(DATE_STAMP_1, task.getLastReadTimeStamp());
- TasksUiPlugin.getSynchronizationManager().saveIncoming(task, newData, false);
- assertEquals(RepositoryTaskSyncState.SYNCHRONIZED, task.getSynchronizationState());
- assertEquals(DATE_STAMP_1, task.getLastReadTimeStamp());
- }
-
- /*
- * public void testSynchronizedToConflict() { // invalid }
- */
-
- public void testSynchronizedToOutgoing() {
- AbstractTask task = primeTaskAndRepository(RepositoryTaskSyncState.SYNCHRONIZED,
- RepositoryTaskSyncState.SYNCHRONIZED);
- assertEquals(DATE_STAMP_1, task.getLastReadTimeStamp());
-
- RepositoryTaskData taskData = TasksUiPlugin.getTaskDataManager().getEditableCopy(task.getRepositoryUrl(),
- task.getTaskId());
-
- taskData.setNewComment("new comment");
-
- HashSet<RepositoryTaskAttribute> changed = new HashSet<RepositoryTaskAttribute>();
- changed.add(taskData.getAttribute(RepositoryTaskAttribute.COMMENT_NEW));
- TasksUiPlugin.getSynchronizationManager().saveOutgoing(task, changed);
- assertEquals(RepositoryTaskSyncState.OUTGOING, task.getSynchronizationState());
- assertEquals(DATE_STAMP_1, task.getLastReadTimeStamp());
- }
-
- public void testConflictToConflict() {
- AbstractTask task = primeTaskAndRepository(RepositoryTaskSyncState.CONFLICT, RepositoryTaskSyncState.INCOMING);
- assertEquals(DATE_STAMP_1, task.getLastReadTimeStamp());
- TasksUiPlugin.getSynchronizationManager().saveIncoming(task, newData, true);
- assertEquals(RepositoryTaskSyncState.CONFLICT, task.getSynchronizationState());
- RepositoryTaskData taskData = TasksUiPlugin.getTaskDataManager().getNewTaskData(task.getRepositoryUrl(),
- task.getTaskId());
-
- assertEquals(DATE_STAMP_2, taskData.getLastModified());
- TasksUiPlugin.getSynchronizationManager().saveIncoming(task, newData, true);
- assertEquals(RepositoryTaskSyncState.CONFLICT, task.getSynchronizationState());
- taskData = TasksUiPlugin.getTaskDataManager().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(RepositoryTaskSyncState.OUTGOING, RepositoryTaskSyncState.INCOMING);
- RepositoryTaskData taskData = TasksUiPlugin.getTaskDataManager().getNewTaskData(task.getRepositoryUrl(),
- task.getTaskId());
-
- assertEquals(DATE_STAMP_1, task.getLastReadTimeStamp());
- assertEquals(RepositoryTaskSyncState.OUTGOING, task.getSynchronizationState());
- TasksUiPlugin.getSynchronizationManager().saveIncoming(task, newData, true);
- assertEquals(RepositoryTaskSyncState.CONFLICT, task.getSynchronizationState());
- taskData = TasksUiPlugin.getTaskDataManager().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(RepositoryTaskSyncState.OUTGOING,
- RepositoryTaskSyncState.SYNCHRONIZED);
- assertEquals(DATE_STAMP_1, task.getLastReadTimeStamp());
-
- TasksUiPlugin.getSynchronizationManager().saveIncoming(task, newData, true);
- assertEquals(RepositoryTaskSyncState.OUTGOING, task.getSynchronizationState());
- assertEquals(DATE_STAMP_1, task.getLastReadTimeStamp());
- }
-
- public void testOutgoingToOutgoing() {
- AbstractTask task = primeTaskAndRepository(RepositoryTaskSyncState.OUTGOING,
- RepositoryTaskSyncState.SYNCHRONIZED);
- assertEquals(DATE_STAMP_1, task.getLastReadTimeStamp());
- TasksUiPlugin.getSynchronizationManager().saveIncoming(task, newData, false);
- assertEquals(RepositoryTaskSyncState.OUTGOING, task.getSynchronizationState());
- assertEquals(DATE_STAMP_1, task.getLastReadTimeStamp());
- }
-
- public void testMarkRead() {
- AbstractTask task = primeTaskAndRepository(RepositoryTaskSyncState.INCOMING,
- RepositoryTaskSyncState.SYNCHRONIZED);
- task.setLastReadTimeStamp(null);
- assertEquals(RepositoryTaskSyncState.INCOMING, task.getSynchronizationState());
- TasksUiPlugin.getSynchronizationManager().setTaskRead(task, true);
- assertEquals(DATE_STAMP_1, task.getLastReadTimeStamp());
- assertEquals(RepositoryTaskSyncState.SYNCHRONIZED, task.getSynchronizationState());
- }
-
- public void testMarkUnread() {
- AbstractTask task = primeTaskAndRepository(RepositoryTaskSyncState.SYNCHRONIZED,
- RepositoryTaskSyncState.SYNCHRONIZED);
- task.setLastReadTimeStamp(null);
- assertEquals(RepositoryTaskSyncState.SYNCHRONIZED, task.getSynchronizationState());
- TasksUiPlugin.getSynchronizationManager().setTaskRead(task, false);
- assertEquals(RepositoryTaskSyncState.INCOMING, task.getSynchronizationState());
- }
-
- public void testClearOutgoing() {
- AbstractTask task = primeTaskAndRepository(RepositoryTaskSyncState.SYNCHRONIZED,
- RepositoryTaskSyncState.SYNCHRONIZED);
- RepositoryTaskData taskData1 = new RepositoryTaskData(new MockAttributeFactory(),
- MockRepositoryConnector.REPOSITORY_KIND, MockRepositoryConnector.REPOSITORY_URL, "1");
- TasksUiPlugin.getTaskDataManager().setNewTaskData(taskData1);
- taskData1 = TasksUiPlugin.getTaskDataManager().getEditableCopy(task.getRepositoryUrl(), task.getTaskId());
-
- taskData1.setNewComment("Testing");
- Set<RepositoryTaskAttribute> edits = new HashSet<RepositoryTaskAttribute>();
- edits.add(taskData1.getAttribute(RepositoryTaskAttribute.COMMENT_NEW));
- TasksUiPlugin.getTaskDataManager().saveEdits(task.getRepositoryUrl(), task.getTaskId(), edits);
-
- RepositoryTaskData editedData = TasksUiPlugin.getTaskDataManager().getEditableCopy(task.getRepositoryUrl(),
- task.getTaskId());
- assertEquals("Testing", editedData.getNewComment());
-
- TasksUiPlugin.getSynchronizationManager().discardOutgoing(task);
-
- assertTrue(task.getSynchronizationState().equals(RepositoryTaskSyncState.SYNCHRONIZED));
- RepositoryTaskData taskData = TasksUiPlugin.getTaskDataManager().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 getTaskDataHandler() {
- 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(RepositoryTaskSyncState localState, RepositoryTaskSyncState remoteState) {
- RepositoryTaskData taskData = null;
- AbstractTask task = new MockRepositoryTask(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.getTaskDataManager().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/RetrieveTitleFromUrlTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/RetrieveTitleFromUrlTest.java
deleted file mode 100644
index 025ce3849..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/RetrieveTitleFromUrlTest.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.tasks.tests;
-
-import java.lang.reflect.InvocationTargetException;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.mylyn.internal.tasks.ui.RetrieveTitleFromUrlJob;
-
-/**
- * @author Mik Kersten
- */
-public class RetrieveTitleFromUrlTest extends TestCase {
-
- // XXX broken due to hang that causes the scheduled job to never complete
- public void testRetrieve() throws InterruptedException, InvocationTargetException {
- final String url = "http://eclipse.org/mylyn";
- final String knownTitle = "Mylar Technology Project";
-
- RetrieveTitleFromUrlJob job = new RetrieveTitleFromUrlJob(url) {
-
- @Override
- public void setTitle(String title) {
- assertEquals(knownTitle, title);
- }
- };
- job.run(new NullProgressMonitor());
-
- assertTrue(job.isTitleRetrieved());
- assertEquals(knownTitle, job.getPageTitle());
- }
-}
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 0a516bd86..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ScheduledPresentationTest.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.tasks.tests;
-
-import java.util.Calendar;
-import java.util.Date;
-import java.util.GregorianCalendar;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.context.core.ContextCorePlugin;
-import org.eclipse.mylyn.internal.context.core.InteractionContextManager;
-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.monitor.core.InteractionEvent;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @author Rob Elves
- */
-public class ScheduledPresentationTest extends TestCase {
-
- protected void setUp() throws Exception {
- ContextCorePlugin.getContextManager().getActivityMetaContext().reset();
- ContextCorePlugin.getContextManager().saveActivityContext();
- TasksUiPlugin.getTaskListManager().resetTaskList();
- TasksUiPlugin.getTaskListManager().saveTaskList();
- }
-
- protected void tearDown() throws Exception {
- TasksUiPlugin.getTaskListManager().resetTaskList();
- TasksUiPlugin.getTaskListManager().saveTaskList();
- }
-
- // TODO: Test scheduling into day bins
- public void testDaysOfWeek() {
- List<ScheduledTaskContainer> days = TasksUiPlugin.getTaskActivityManager().getActivityWeekDays();
- assertNotNull(days);
- assertEquals(7, days.size());
- }
-
- 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.getTaskListManager().getTaskList().addTask(task1);
-
- assertEquals(0, TaskActivityManager.getInstance()
- .getScheduledTasks(thisWeek.getStart(), thisWeek.getEnd())
- .size());
-
- TaskActivityManager.getInstance().setScheduledFor(task1, thisWeek.getStart().getTime());
-
-// TasksUiPlugin.getTaskListManager().parseInteractionEvent(event2);
- assertEquals(1, TaskActivityManager.getInstance()
- .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.getTaskListManager().resetAndRollOver(newStart.getTime());
-
- //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, TaskActivityManager.getInstance().getScheduledTasks(newThisWeek.getStart(),
- newThisWeek.getEnd()).size());
- assertEquals(1, TaskActivityManager.getInstance().getScheduledTasks(newPreviousWeek.getStart(),
- newPreviousWeek.getEnd()).size());
-
- TasksUiPlugin.getTaskListManager().resetAndRollOver(oldStart);
- }
-
- public void testScheduledTaskContainer() {
-
- Calendar startDate = GregorianCalendar.getInstance();
- startDate.setTimeInMillis(1000);
- Calendar endDate = GregorianCalendar.getInstance();
- endDate.setTimeInMillis(2000);
-
- AbstractTask task1 = new LocalTask("task 1", "Task 1");
- AbstractTask task2 = new LocalTask("task 2", "Task 2");
- TasksUiPlugin.getTaskListManager().getTaskList().addTask(task1);
- TasksUiPlugin.getTaskListManager().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());
-
- TaskActivityManager.getInstance().parseInteractionEvent(event1);
- TaskActivityManager.getInstance().parseInteractionEvent(event2);
-
- ScheduledTaskContainer container = TasksUiPlugin.getTaskActivityManager().getActivityPast();
- assertEquals(2, container.getChildren().size());
- assertEquals(1000, container.getElapsed(task1));
- assertEquals(1000, container.getElapsed(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 ffe743c70..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TableSorterTest.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.tests;
-
-import junit.framework.TestCase;
-
-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.AbstractTask;
-
-/**
- * @author Mik Kersten
- */
-public class TableSorterTest extends TestCase {
-
- public void testRootTaskSorting() {
- TaskListTableSorter sorter = new TaskListTableSorter(TaskListView.getFromActivePerspective(),
- TaskListTableSorter.SortByIndex.SUMMARY);
-
- AbstractTask task = new LocalTask("1", "");
- TaskCategory category = new TaskCategory("cat");
-
- assertEquals(-1, sorter.compare(null, task, category));
- assertEquals(1, sorter.compare(null, category, task));
- }
-}
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 6bb1a79c4..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.actions.ToggleTaskActivationAction;
-import org.eclipse.mylyn.tasks.tests.connector.MockRepositoryTask;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @author Mik Kersten
- */
-public class TaskActivationActionTest extends TestCase {
-
- public void testUpdateOnExternalActivation() {
- MockRepositoryTask task = new MockRepositoryTask("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/TaskActivityTimingTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivityTimingTest.java
deleted file mode 100644
index 5559c6140..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivityTimingTest.java
+++ /dev/null
@@ -1,1045 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse 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.GregorianCalendar;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.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.LegacyActivityAdaptor;
-import org.eclipse.mylyn.internal.context.core.ScalingFactors;
-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.monitor.core.InteractionEvent;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.ui.TaskListManager;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @author Rob Elves
- */
-public class TaskActivityTimingTest extends TestCase {
-
- TaskListManager manager = null;
-
- TaskActivityManager activityManager = null;
-
- protected void setUp() throws Exception {
- super.setUp();
- manager = TasksUiPlugin.getTaskListManager();
- activityManager = TasksUiPlugin.getTaskActivityManager();
- }
-
- protected void tearDown() throws Exception {
- ContextCorePlugin.getContextManager().getActivityMetaContext().reset();
- TasksUiPlugin.getTaskListManager().resetTaskList();
- TasksUiPlugin.getTaskListManager().saveTaskList();
- super.tearDown();
- }
-
- public void testActivityCaptured() {
- AbstractTask task1 = new LocalTask("task 1", "Task 1");
- manager.getTaskList().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, 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());
-
- TaskActivityManager.getInstance().parseInteractionEvent(event1);
- TaskActivityManager.getInstance().parseInteractionEvent(event2);
-
- long expectedTotalTime = end.getTime().getTime() - start.getTime().getTime();
- assertEquals(2 * expectedTotalTime, activityManager.getElapsedTime(task1));
- assertEquals(expectedTotalTime, TasksUiPlugin.getTaskActivityManager().getElapsedTime(task1, start, end));
- assertEquals(expectedTotalTime, TasksUiPlugin.getTaskActivityManager().getElapsedTime(task1, start2, end2));
- assertEquals(2 * expectedTotalTime, TasksUiPlugin.getTaskActivityManager().getElapsedTime(task1, start, end2));
- }
-
- public void testNegativeActivity() {
-
- AbstractTask task1 = new LocalTask("task 1", "Task 1");
- manager.getTaskList().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());
-
- TaskActivityManager.getInstance().parseInteractionEvent(event1);
- TaskActivityManager.getInstance().parseInteractionEvent(event2);
-
- assertEquals(0, TaskActivityManager.getInstance().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");
- manager.getTaskList().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());
-
- TaskActivityManager.getInstance().parseInteractionEvent(event1);
- TaskActivityManager.getInstance().parseInteractionEvent(event2);
- assertEquals(0, TaskActivityManager.getInstance().getElapsedTime(task1));
- }
-
- public void testActivityNotLoggedTwice() {
-
- InteractionContext metaContext = ContextCorePlugin.getContextManager().getActivityMetaContext();
- metaContext.reset();
- assertEquals(0, metaContext.getInteractionHistory().size());
-
- AbstractTask task1 = new LocalTask("local 1", "Task 1");
- AbstractTask 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.getTaskListManager().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);
- TaskActivityManager.getInstance().parseInteractionEvent(event1);
- ContextCorePlugin.getContextManager().getActivityMetaContext().parseEvent(activityEvent1);
- TaskActivityManager.getInstance().parseInteractionEvent(activityEvent1);
- ContextCorePlugin.getContextManager().getActivityMetaContext().parseEvent(event2);
- TaskActivityManager.getInstance().parseInteractionEvent(event2);
-
- long elapsed = TaskActivityManager.getInstance().getElapsedTime(task1);
- assertEquals(10000, elapsed);
-
- // 2nd activation - no activity
- ContextCorePlugin.getContextManager().getActivityMetaContext().parseEvent(event1);
- TaskActivityManager.getInstance().parseInteractionEvent(event1);
- ContextCorePlugin.getContextManager().getActivityMetaContext().parseEvent(event2);
- TaskActivityManager.getInstance().parseInteractionEvent(event2);
-
- elapsed = TaskActivityManager.getInstance().getElapsedTime(task1);
- assertEquals(10000, elapsed);
- assertTrue(TaskActivityManager.getInstance().isActiveThisWeek(task1));
- }
-
- assertEquals(10000, TaskActivityManager.getInstance().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);
- TaskActivityManager.getInstance().parseInteractionEvent(event1);
- ContextCorePlugin.getContextManager().getActivityMetaContext().parseEvent(activityEvent1);
- TaskActivityManager.getInstance().parseInteractionEvent(activityEvent1);
- ContextCorePlugin.getContextManager().getActivityMetaContext().parseEvent(event2);
- TaskActivityManager.getInstance().parseInteractionEvent(event2);
- }
-
- assertEquals(26000, TaskActivityManager.getInstance().getElapsedTime(task1));
-
- ContextCorePlugin.getContextManager().saveActivityContext();
- ContextCorePlugin.getContextManager().loadActivityMetaContext();
- TasksUiPlugin.getTaskListManager().resetAndRollOver();
-
- assertEquals(26000, TaskActivityManager.getInstance().getElapsedTime(task1));
-
- }
-
- public void testAfterReloading() {
- AbstractTask task1 = new LocalTask("task 1", "Task 1");
- TasksUiPlugin.getTaskListManager().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);
- TaskActivityManager.getInstance().parseInteractionEvent(event1);
- ContextCorePlugin.getContextManager().getActivityMetaContext().parseEvent(activityEvent1);
- TaskActivityManager.getInstance().parseInteractionEvent(activityEvent1);
- ContextCorePlugin.getContextManager().getActivityMetaContext().parseEvent(event2);
- TaskActivityManager.getInstance().parseInteractionEvent(event2);
- assertEquals(20000, TaskActivityManager.getInstance().getElapsedTime(task1));
-
- ContextCorePlugin.getContextManager().saveActivityContext();
- ContextCorePlugin.getContextManager().loadActivityMetaContext();
- TasksUiPlugin.getTaskListManager().resetAndRollOver();
-
- assertEquals(20000, TaskActivityManager.getInstance().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 ScalingFactors());
- 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 ScalingFactors());
- 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.getTaskListManager().getTaskList().addTask(task1);
- InteractionContext metaContext = ContextCorePlugin.getContextManager().getActivityMetaContext();
- metaContext.reset();
- assertEquals(0, metaContext.getInteractionHistory().size());
-
- TasksUiPlugin.getTaskListManager().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);
- metaContext.parseEvent(activityEvent2);
- TasksUiPlugin.getTaskListManager().deactivateAllTasks();
- assertEquals(4, ContextCorePlugin.getContextManager().getActivityMetaContext().getInteractionHistory().size());
- TasksUiPlugin.getTaskListManager().saveTaskList();
- ContextCorePlugin.getContextManager().saveActivityContext();
- ContextCorePlugin.getContextManager().getActivityMetaContext().reset();
- assertEquals(0, ContextCorePlugin.getContextManager().getActivityMetaContext().getInteractionHistory().size());
- ContextCorePlugin.getContextManager().loadActivityMetaContext();
-
- assertEquals(4, ContextCorePlugin.getContextManager().getActivityMetaContext().getInteractionHistory().size());
- assertEquals(0, TaskActivityManager.getInstance().getElapsedTime(task1));
-
- TasksUiPlugin.getTaskListManager().resetAndRollOver();
- assertEquals((endTime1.getTimeInMillis() - startTime1.getTimeInMillis())
- + (endTime2.getTimeInMillis() - startTime2.getTimeInMillis()), TaskActivityManager.getInstance()
- .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 ScalingFactors());
- 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.getTaskListManager().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.getTaskListManager().getTaskList().addTask(task1);
-
- ScheduledTaskContainer activityThisWeek = TasksUiPlugin.getTaskActivityManager().getActivityThisWeek();
- 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 = GregorianCalendar.getInstance();
- Calendar activityEnd = GregorianCalendar.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());
-
- TaskActivityManager.getInstance().parseInteractionEvent(event1);
- TaskActivityManager.getInstance().parseInteractionEvent(activityEvent);
- TaskActivityManager.getInstance().parseInteractionEvent(event2);
-
- long expectedTotalTime = (activityEnd.getTime().getTime() - activityStart.getTime().getTime());
- assertEquals(expectedTotalTime, TaskActivityManager.getInstance().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.getTaskListManager().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);
- TaskActivityManager.getInstance().parseInteractionEvent(activityEvent1);
- metaContext.parseEvent(activityEvent2);
- TaskActivityManager.getInstance().parseInteractionEvent(activityEvent2);
- metaContext.parseEvent(activityEvent3);
- TaskActivityManager.getInstance().parseInteractionEvent(activityEvent3);
-
- assertEquals(1000 * 60 * 10, TaskActivityManager.getInstance().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().saveActivityContext();
- ContextCorePlugin.getContextManager().getActivityMetaContext().reset();
- assertEquals(0, ContextCorePlugin.getContextManager().getActivityMetaContext().getInteractionHistory().size());
- TasksUiPlugin.getTaskListManager().resetAndRollOver();
- 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.getTaskListManager().resetAndRollOver();
-
- 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.getTaskListManager().getTaskList().addTask(task1);
- ScheduledTaskContainer thisWeekActivity = TasksUiPlugin.getTaskActivityManager().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(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();
- TaskActivityManager.getInstance().parseInteractionEvent(legacyAdaptor.parseInteractionEvent(event1));
- TaskActivityManager.getInstance().parseInteractionEvent(legacyAdaptor.parseInteractionEvent(event2));
- TaskActivityManager.getInstance().parseInteractionEvent(legacyAdaptor.parseInteractionEvent(event3));
- // TasksUiPlugin.getTaskListManager().parseInteractionEvent(event4);
- TaskActivityManager.getInstance().parseInteractionEvent(legacyAdaptor.parseInteractionEvent(event5));
- // TaskActivityManager.getInstance().parseInteractionEvent(event6);
- TaskActivityManager.getInstance().parseInteractionEvent(legacyAdaptor.parseInteractionEvent(event7));
- long expectedTotalTime = time6.getTime() - time5.getTime() + time4.getTime() - time3.getTime()
- + time2.getTime() - time1.getTime();
- assertEquals(expectedTotalTime, TaskActivityManager.getInstance().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.getTaskListManager().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.getTaskListManager().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.getTaskListManager().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.getTaskListManager().getTaskList().addTask(task1);
-// TasksUiPlugin.getTaskListManager().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 c9f511f1c..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskDataExportTest.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.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.ContextCorePlugin;
-import org.eclipse.mylyn.context.tests.AbstractContextTest;
-import org.eclipse.mylyn.internal.context.core.InteractionContext;
-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.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.ui.TaskListManager;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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 TaskListManager manager = TasksUiPlugin.getTaskListManager();
-
- private InteractionContext mockContext;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
-
- removeFiles(new File(TasksUiPlugin.getDefault().getDataDirectory()));
- ContextCorePlugin.getDefault().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 = manager.createNewLocalTask("Export Test Task");
- manager.getTaskList().moveToContainer(task1, manager.getTaskList().getDefaultCategory());
- mockContext = ContextCorePlugin.getContextManager().loadContext(task1.getHandleIdentifier());
- InteractionEvent event = new InteractionEvent(InteractionEvent.Kind.EDIT, "structureKind", "handle", "originId");
- mockContext.parseEvent(event);
- ContextCorePlugin.getContextManager().activateContext(mockContext);
-
- // Save the context file and check that it exists
- assertTrue(ContextCorePlugin.getDefault().getContextStore().getContextDirectory().exists());
- ContextCorePlugin.getContextManager().saveContext(mockContext.getHandleIdentifier());
- File taskFile = ContextCorePlugin.getContextManager().getFileForContext(task1.getHandleIdentifier());
- assertTrue(ContextCorePlugin.getContextManager().hasContext(task1.getHandleIdentifier()));
- assertTrue(taskFile.exists());
- }
-
- @Override
- protected void tearDown() throws Exception {
- removeFiles(destinationDir);
- destinationDir.delete();
- assertFalse(destinationDir.exists());
- ContextCorePlugin.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 519710628..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskDataImportTest.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse 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.core.ContextCorePlugin;
-import org.eclipse.mylyn.context.tests.AbstractContextTest;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.TaskDataImportWizard;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.TaskDataImportWizardPage;
-import org.eclipse.mylyn.tasks.ui.TaskListManager;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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 String sourceZipPath = "testdata/taskdataimporttest/mylardata-2007-01-19.zip";
-
- private File sourceZipFile = null;
-
- private 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().getTaskContainers().size());
- ContextCorePlugin.getContextManager().getActivityMetaContext().reset();
- }
-
- @Override
- protected void tearDown() throws Exception {
- ContextCorePlugin.getContextManager().resetActivityHistory();
- 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.getTaskListManager().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.getTaskListManager().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/TaskDataManagerTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskDataManagerTest.java
deleted file mode 100644
index 57b136e62..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskDataManagerTest.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.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.TaskDataManager;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskAttribute;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.tests.connector.MockAttributeFactory;
-import org.eclipse.mylyn.tasks.tests.connector.MockRepositoryConnector;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @author Rob Elves
- */
-public class TaskDataManagerTest extends TestCase {
-
- TaskDataManager offlineTaskDataManager;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- offlineTaskDataManager = TasksUiPlugin.getTaskDataManager();
- 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.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/TaskExportImportTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskExportImportTest.java
deleted file mode 100644
index dd6ce951b..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskExportImportTest.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.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.ContextCorePlugin;
-import org.eclipse.mylyn.context.tests.AbstractContextTest;
-import org.eclipse.mylyn.internal.context.core.InteractionContext;
-import org.eclipse.mylyn.internal.context.core.InteractionContextManager;
-import org.eclipse.mylyn.internal.tasks.core.LocalTask;
-import org.eclipse.mylyn.internal.tasks.ui.ITasksUiConstants;
-import org.eclipse.mylyn.monitor.core.InteractionEvent;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.TaskList;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- *
- * @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()));
- ContextCorePlugin.getDefault().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 = TasksUiPlugin.getTaskListManager().createNewLocalTask("Test local task");
- TaskList taskList = TasksUiPlugin.getTaskListManager().getTaskList();
- taskList.moveToContainer(task, taskList.getDefaultCategory());
- assertTrue(taskList.getAllTasks().size() > 0);
-
- InteractionContext mockContext = ContextCorePlugin.getContextManager().loadContext(task.getHandleIdentifier());
-
- ContextCorePlugin.getContextManager().activateContext(mockContext);
- InteractionEvent event = new InteractionEvent(InteractionEvent.Kind.EDIT, "structureKind", "handle", "originId");
- mockContext.parseEvent(event);
- ContextCorePlugin.getContextManager().deactivateContext(mockContext.getHandleIdentifier());
-
- assertTrue(ContextCorePlugin.getDefault().getContextStore().getContextDirectory().exists());
- ContextCorePlugin.getContextManager().saveContext(mockContext.getHandleIdentifier());
- assertTrue(ContextCorePlugin.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(ITasksUiConstants.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);
-
- ContextCorePlugin.getContextManager().deleteContext(handleIdentifier);
- assertFalse(ContextCorePlugin.getContextManager().hasContext(task.getHandleIdentifier()));
-
- // load data back
- List<AbstractTask> tasks = TasksUiPlugin.getTaskListManager().getTaskListWriter().readTasks(outFile);
- InteractionContext loadedContext = ContextCorePlugin.getContextManager().loadContext(
- 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.insertTask(loadedTask, null, null);
- }
- ContextCorePlugin.getContextManager().importContext(loadedContext);
-
- // check that context was imported and is the same as original one
- InteractionContext savedContext = ContextCorePlugin.getContextManager().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 6a3c8734d..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskHistoryTest.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.tasks.tests;
-
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.context.core.ContextCorePlugin;
-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.actions.TaskNavigateDropDownAction.TaskNavigateAction;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskActivationHistory;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.ui.TaskListManager;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @author Wes Coelho
- * @author Rob Elves
- */
-public class TaskHistoryTest extends TestCase {
-
- protected TaskListManager manager = TasksUiPlugin.getTaskListManager();
-
- protected TaskActivationHistory history;
-
- protected TaskListView taskView = null;
-
- protected AbstractTask task1 = null;
-
- protected AbstractTask task2 = null;
-
- protected AbstractTask task3 = null;
-
- protected AbstractTask task4 = null;
-
- protected AbstractTask task5 = null;
-
- private ActivateTaskHistoryDropDownAction previousTaskAction = new ActivateTaskHistoryDropDownAction(TasksUiPlugin.getTaskListManager()
- .getTaskActivationHistory(), false);
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
-
- taskView = TaskListView.openInActivePerspective();
-
- resetHistory();
-
- task1 = manager.createNewLocalTask("task 1");
- manager.getTaskList().moveToContainer(task1, manager.getTaskList().getDefaultCategory());
-
- task2 = manager.createNewLocalTask("task 2");
- manager.getTaskList().moveToContainer(task2, manager.getTaskList().getDefaultCategory());
-
- task3 = manager.createNewLocalTask("task 3");
- manager.getTaskList().moveToContainer(task3, manager.getTaskList().getDefaultCategory());
-
- task4 = manager.createNewLocalTask("task 4");
- manager.getTaskList().moveToContainer(task4, manager.getTaskList().getDefaultCategory());
-
- task5 = manager.createNewLocalTask("task 5");
- manager.getTaskList().moveToContainer(task5, manager.getTaskList().getDefaultCategory());
-
- history = manager.getTaskActivationHistory();
- }
-
- private void resetHistory() {
- manager.deactivateAllTasks();
- manager.getTaskActivationHistory().clear();
- ContextCorePlugin.getContextManager().resetActivityHistory();
- }
-
- /**
- * 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
- ActivateTaskHistoryDropDownAction prevAction = new ActivateTaskHistoryDropDownAction(history, false);
- TaskNavigateAction navigateAction = prevAction.new TaskNavigateAction(task2);
- navigateAction.run();
- 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
- navigateAction = prevAction.new TaskNavigateAction(task4);
- navigateAction.run();
- 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);
-
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
-}
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 ee7be632d..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskKeyComparatorTest.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;
-
-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));
- }
-
- public void comparisonCheck(String s1, String s2, int n) {
- assertEquals(n, new TaskKeyComparator().compare(s1, s2));
- }
-
-}
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 d0c2cc6df..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskList06DataMigrationTest.java
+++ /dev/null
@@ -1,323 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse 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.context.core.InteractionContextManager;
-import org.eclipse.mylyn.internal.monitor.core.util.ZipFileUtil;
-import org.eclipse.mylyn.internal.tasks.ui.ITasksUiConstants;
-import org.eclipse.mylyn.internal.tasks.ui.WorkspaceAwareContextStore;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.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 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, WorkspaceAwareContextStore.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, WorkspaceAwareContextStore.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);
- } finally {
-
- }
- }
-
- public void doMigration(IProgressMonitor monitor) {
- 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) {
- File oldTasklistFile = new File(dataDirectory, ITasksUiConstants.OLD_TASK_LIST_FILE);
- File newTasklistFile = new File(dataDirectory, ITasksUiConstants.DEFAULT_TASK_LIST_FILE);
- if (!oldTasklistFile.exists())
- return false;
- if (newTasklistFile.exists()) {
- if (!newTasklistFile.delete()) {
- StatusHandler.fail(null, "Could not overwrite tasklist", false);
- return false;
- }
- }
- 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()) {
- StatusHandler.fail(null, "Could not remove old tasklist.", false);
- return false;
- }
- monitor.worked(1);
- } catch (Exception e) {
- StatusHandler.fail(e, "Error occurred while migrating old tasklist: " + e.getMessage(), true);
- return false;
- } finally {
- monitor.done();
- }
- return true;
- }
-
- public boolean migrateRepositoriesData(IProgressMonitor monitor) {
- 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()) {
- StatusHandler.fail(null,
- "Could not overwrite repositories file. Check read/write permission on data directory.", false);
- return false;
- }
- }
- 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()) {
- StatusHandler.fail(null,
- "Could not remove old repositories file. Check read/write permission on data directory.", false);
- return false;
- }
- monitor.worked(1);
- } catch (Exception e) {
- StatusHandler.fail(e, "Error occurred while migrating old repositories data: " + e.getMessage(), true);
- return false;
- } finally {
- monitor.done();
- }
- return true;
- }
-
- public boolean migrateTaskContextData(IProgressMonitor monitor) {
- 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, WorkspaceAwareContextStore.CONTEXTS_DIRECTORY);
- if (!contextsFolder.exists()) {
- if (!contextsFolder.mkdir()) {
- StatusHandler.fail(null,
- "Could not create contexts folder. Check read/write permission on data directory.", false);
- return false;
- }
- }
- 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()) {
- StatusHandler.fail(null,
- "Could not overwrite context file. Check read/write permission on data directory.",
- false);
- return false;
- }
- }
- ZipFileUtil.createZipFile(newContextFile, filesToZip, new SubProgressMonitor(monitor, 1));
- if (!file.delete()) {
- StatusHandler.fail(null,
- "Could not remove old context file. Check read/write permission on data directory.", false);
- return false;
- }
- monitor.worked(1);
- }
- } catch (Exception e) {
- StatusHandler.fail(e, "Error occurred while migrating old repositories data: " + e.getMessage(), true);
- return false;
- } finally {
- monitor.done();
- }
- return true;
- }
-
- public boolean migrateActivityData(IProgressMonitor monitor) {
- 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, WorkspaceAwareContextStore.CONTEXTS_DIRECTORY);
- if (!contextsFolder.exists()) {
- if (!contextsFolder.mkdir()) {
- StatusHandler.fail(null,
- "Could not create contexts folder. Check read/write permission on data directory.", false);
- return false;
- }
- }
-
- File newActivityFile = new File(contextsFolder, InteractionContextManager.CONTEXT_HISTORY_FILE_NAME
- + InteractionContextManager.CONTEXT_FILE_EXTENSION);
-
- if (newActivityFile.exists()) {
- if (!newActivityFile.delete()) {
- StatusHandler.fail(null,
- "Could not overwrite activity file. Check read/write permission on data directory.", false);
- return false;
- }
- }
- 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()) {
- StatusHandler.fail(null,
- "Could not remove old activity file. Check read/write permission on data directory.", false);
- return false;
- }
- monitor.worked(1);
- } catch (Exception e) {
- StatusHandler.fail(e, "Error occurred while migrating old activity data: " + e.getMessage(), true);
- return false;
- } 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 2b125058b..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListBackupManagerTest.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.tasks.tests;
-
-import java.io.File;
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.internal.tasks.core.LocalTask;
-import org.eclipse.mylyn.internal.tasks.ui.TaskListBackupManager;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPreferenceConstants;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @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.getTaskListManager().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.getDefault().getBackupManager();
- TasksUiPlugin.getDefault().getPreferenceStore().setValue(TasksUiPreferenceConstants.BACKUP_SCHEDULE, 1);
- TasksUiPlugin.getDefault().getPreferenceStore().setValue(TasksUiPreferenceConstants.BACKUP_LAST, 0f);
- assertEquals(0, TasksUiPlugin.getDefault().getPreferenceStore().getLong(TasksUiPreferenceConstants.BACKUP_LAST));
- backupManager.start(5);
- Thread.sleep(3000);
- assertEquals(0, TasksUiPlugin.getDefault().getPreferenceStore().getLong(TasksUiPreferenceConstants.BACKUP_LAST));
- }
-
- public void testAutoBackupEnabled() throws InterruptedException, InvocationTargetException, IOException {
- TaskListBackupManager backupManager = TasksUiPlugin.getDefault().getBackupManager();
- String backupFolder = TasksUiPlugin.getDefault().getBackupFolderPath();
- File backupFileFolder = new File(backupFolder);
- deleteBackupFolder(backupFileFolder);
- TasksUiPlugin.getDefault().getPreferenceStore().setValue(TasksUiPreferenceConstants.BACKUP_SCHEDULE, 1);
- TasksUiPlugin.getDefault().getPreferenceStore().setValue(TasksUiPreferenceConstants.BACKUP_LAST, 0f);
- backupManager.backupNow(true);
- assertFalse(TasksUiPlugin.getDefault().getPreferenceStore().getLong(TasksUiPreferenceConstants.BACKUP_LAST) == 0);
- assertTrue(backupFileFolder.exists());
- assertTrue(backupFileFolder.isDirectory());
- assertTrue(backupFileFolder.listFiles().length == 1);
-
- // Test removal of old backups
- TasksUiPlugin.getDefault().getPreferenceStore().setValue(TasksUiPreferenceConstants.BACKUP_MAXFILES, 0);
- backupManager.removeOldBackups(backupFileFolder);
- assertEquals(0, backupFileFolder.listFiles().length);
-
- // TODO: Test that OLDEST backups are deleted first.
-
- }
-
- 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 6d896823a..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListContentProviderTest.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.tasks.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.internal.tasks.core.LocalTask;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPreferenceConstants;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListContentProvider;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.TaskList;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @author Felix Schwarz
- */
-public class TaskListContentProviderTest extends TestCase {
-
- private TaskListContentProvider provider;
-
- private TaskListView view;
-
- private TaskList taskList;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- TaskListView.openInActivePerspective();
- view = TaskListView.getFromActivePerspective();
- provider = (TaskListContentProvider) view.getViewer().getContentProvider();
- TasksUiPlugin.getDefault().getPreferenceStore().setValue(TasksUiPreferenceConstants.GROUP_SUBTASKS, true);
- view.clearFilters(true);
- view.addFilter(view.getCompleteFilter());
- taskList = TasksUiPlugin.getTaskListManager().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.setCompleted(true);
- taskList.addTask(completedChild, parent);
- assertFalse(provider.hasChildren(parent));
-
- AbstractTask incompleteChild = new LocalTask("incomplete child", "incomplete child label");
- incompleteChild.setCompleted(false);
- 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 fbdbd8ec4..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListDnDTest.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 java.util.Set;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListDropAdapter;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.ui.TaskListManager;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @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);
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
- manager.resetTaskList();
- manager.saveTaskList();
- assertNull(manager.getTaskList().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);
- Set<AbstractTask> 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 6d5f09369..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListManagerTest.java
+++ /dev/null
@@ -1,1008 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse 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.ArrayList;
-import java.util.Calendar;
-import java.util.Collection;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.mylyn.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.LocalTask;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryTaskHandleUtil;
-import org.eclipse.mylyn.internal.tasks.core.TaskCategory;
-import org.eclipse.mylyn.internal.tasks.core.UnfiledCategory;
-import org.eclipse.mylyn.internal.tasks.ui.ScheduledTaskListSynchJob;
-import org.eclipse.mylyn.internal.tasks.ui.TaskListSynchronizationScheduler;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPreferenceConstants;
-import org.eclipse.mylyn.internal.tasks.ui.actions.MarkTaskReadAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.MarkTaskUnreadAction;
-import org.eclipse.mylyn.monitor.core.InteractionEvent;
-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.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.TaskList;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.AbstractTask.RepositoryTaskSyncState;
-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.MockRepositoryTask;
-import org.eclipse.mylyn.tasks.ui.TaskListManager;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @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(
- TasksUiPreferenceConstants.REPOSITORY_SYNCH_SCHEDULE_ENABLED, false);
- TasksUiPlugin.getSynchronizationManager().setForceSyncExec(true);
- manager = TasksUiPlugin.getTaskListManager();
- manager.resetTaskList();
- manager.readExistingOrCreateNewList();
- repository = new TaskRepository(MockRepositoryConnector.REPOSITORY_KIND, MockRepositoryConnector.REPOSITORY_URL);
- TasksUiPlugin.getRepositoryManager().addRepository(repository,
- TasksUiPlugin.getDefault().getRepositoriesFilePath());
-
- assertEquals(0, manager.getTaskList().getAllTasks().size());
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
- manager.resetTaskList();
- TasksUiPlugin.getTaskListManager().saveTaskList();
- TasksUiPlugin.getRepositoryManager().removeRepository(repository,
- TasksUiPlugin.getDefault().getRepositoriesFilePath());
- assertEquals(0, manager.getTaskList().getAllTasks().size());
- }
-
- public void testQueryAndCategoryNameClash() {
- TaskCategory category = new TaskCategory("TestClash");
- manager.getTaskList().addCategory(category);
- assertTrue(manager.getTaskList().getCategories().contains(category));
- assertEquals(3, manager.getTaskList().getCategories().size());
-
- MockRepositoryQuery query = new MockRepositoryQuery("TestClash");
- manager.getTaskList().addQuery(query);
- assertTrue(manager.getTaskList().getCategories().contains(category));
- assertEquals(3, manager.getTaskList().getCategories().size());
-
- manager.getTaskList().deleteCategory(category);
- }
-
- public void testUniqueTaskID() {
- LocalTask task1 = manager.createNewLocalTask("label");
- manager.getTaskList().addTask(task1);
- LocalTask task2 = manager.createNewLocalTask("label");
- manager.getTaskList().addTask(task2);
- assertEquals(2, manager.getTaskList().getLastLocalTaskId());
- manager.getTaskList().deleteTask(task2);
- LocalTask task3 = manager.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());
- AbstractTask task4 = manager.createNewLocalTask("label");
- assertTrue(task4.getHandleIdentifier() + " should end with 4", task4.getHandleIdentifier().endsWith("4"));
- }
-
- public void testSingleTaskDeletion() {
- MockRepositoryTask task = new MockRepositoryTask("1");
- manager.getTaskList().moveToContainer(task, manager.getTaskList().getDefaultCategory());
- assertEquals(1, manager.getTaskList().getAllTasks().size());
- manager.getTaskList().deleteTask(task);
- assertEquals(0, manager.getTaskList().getAllTasks().size());
- manager.getTaskList().moveToContainer(task, manager.getTaskList().getDefaultCategory());
- 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());
- }
-
- public void testMigrateTaskContextFiles() throws IOException {
- File fileA = ContextCorePlugin.getContextManager().getFileForContext("http://a-1");
- fileA.createNewFile();
- fileA.deleteOnExit();
- assertTrue(fileA.exists());
- manager.refactorRepositoryUrl("http://a", "http://b");
- File fileB = ContextCorePlugin.getContextManager().getFileForContext("http://b-1");
- assertTrue(fileB.exists());
- assertFalse(fileA.exists());
- }
-
- public void testMigrateQueryUrlHandles() {
- AbstractRepositoryQuery 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);
- manager.refactorRepositoryUrl("http://foo.bar", "http://bar.baz");
- assertTrue(manager.getTaskList().getRepositoryQueries("http://foo.bar").size() == 0);
- assertTrue(manager.getTaskList().getRepositoryQueries("http://bar.baz").size() > 0);
- AbstractRepositoryQuery changedQuery = manager.getTaskList()
- .getRepositoryQueries("http://bar.baz")
- .iterator()
- .next();
- assertEquals("http://bar.baz/b", changedQuery.getUrl());
- }
-
- public void testMigrateQueryHandles() {
- AbstractRepositoryQuery query = new MockRepositoryQuery("mquery");
- query.setRepositoryUrl("http://a");
- manager.getTaskList().addQuery(query);
- manager.refactorRepositoryUrl("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);
-// manager.refactorRepositoryUrl("http://a", "http://b");
-// assertNotNull(manager.getTaskList().getQueryHit("http://b-123"));
-// assertEquals("http://b-123", hit.getHandleIdentifier());
-// }
-
- public void testMigrateTaskHandles() {
- AbstractTask task = new MockRepositoryTask("http://a", "123");
- AbstractTask task2 = new MockRepositoryTask("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.getTaskDataManager().setNewTaskData(taskData);
- assertNotNull(TasksUiPlugin.getTaskDataManager().getNewTaskData(task.getRepositoryUrl(), task.getTaskId()));
-
- RepositoryTaskData taskData2 = new RepositoryTaskData(new MockAttributeFactory(), task2.getConnectorKind(),
- task2.getRepositoryUrl(), task2.getTaskId(), task2.getTaskKind());
- taskData2.setNewComment("TEST");
- TasksUiPlugin.getTaskDataManager().setNewTaskData(taskData2);
- assertNotNull(TasksUiPlugin.getTaskDataManager().getNewTaskData(task2.getRepositoryUrl(), task2.getTaskId()));
- assertEquals("TEST", TasksUiPlugin.getTaskDataManager().getNewTaskData(task2.getRepositoryUrl(),
- task2.getTaskId()).getNewComment());
-
- manager.refactorRepositoryUrl("http://a", "http://b");
- assertNull(manager.getTaskList().getTask("http://a-123"));
- assertNotNull(manager.getTaskList().getTask("http://b-123"));
- assertNotNull(TasksUiPlugin.getTaskDataManager().getNewTaskData("http://b", "123"));
- RepositoryTaskData otherData = TasksUiPlugin.getTaskDataManager().getNewTaskData(task2.getRepositoryUrl(),
- task2.getTaskId());
- assertNotNull(otherData);
- assertEquals("TEST", otherData.getNewComment());
- }
-
- public void testMigrateTaskHandlesWithExplicitSet() {
- AbstractTask task = new MockRepositoryTask("http://a", "123");
- task.setUrl("http://a/task/123");
- manager.getTaskList().addTask(task);
- manager.refactorRepositoryUrl("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());
- }
-
- @SuppressWarnings("deprecation")
- public void testRefactorMetaContextHandles() {
- String firstUrl = "http://repository1.com/bugs";
- String secondUrl = "http://repository2.com/bugs";
- AbstractTask task1 = new MockRepositoryTask(firstUrl, "1");
- AbstractTask task2 = new MockRepositoryTask(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().resetActivityHistory();
- 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, manager.getElapsedTime(task1));
- assertEquals(2 * 60 * 1000 * 5, manager.getElapsedTime(task2));
- manager.refactorRepositoryUrl(firstUrl, secondUrl);
- metaContext = ContextCorePlugin.getContextManager().getActivityMetaContext();
- assertEquals(2, metaContext.getInteractionHistory().size());
- assertEquals(60 * 1000 * 5, manager.getElapsedTime(new MockRepositoryTask(secondUrl, "1")));
- assertEquals(2 * 60 * 1000 * 5, manager.getElapsedTime(new MockRepositoryTask(secondUrl, "2")));
- assertEquals(secondUrl + "-1", metaContext.getInteractionHistory().get(0).getStructureHandle());
- }
-
- @SuppressWarnings("deprecation")
- public void testIsActiveToday() {
- AbstractTask task = new LocalTask("1", "task-1");
- assertFalse(manager.isScheduledForToday(task));
-
- task.setScheduledForDate(new Date());
- assertTrue(manager.isScheduledForToday(task));
-
- task.setReminded(true);
- assertTrue(manager.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();
- manager.snapToNextDay(tomorrow);
- assertEquals(-1, inAnHour.compareTo(tomorrow));
-
- assertTrue(manager.isScheduledForToday(task));
- }
-
- @SuppressWarnings("deprecation")
- public void testScheduledForToday() {
- AbstractTask task = new LocalTask("1", "task-1");
- Calendar cal = Calendar.getInstance();
- cal.add(Calendar.MINUTE, 2);
- task.setScheduledForDate(cal.getTime());
- assertTrue(manager.isScheduledForToday(task));
- manager.setSecheduledIn(cal, 1);
- task.setScheduledForDate(cal.getTime());
- assertFalse(manager.isScheduledForToday(task));
- cal = Calendar.getInstance();
- manager.setScheduledEndOfDay(cal);
- task.setScheduledForDate(cal.getTime());
- assertTrue(manager.isScheduledForToday(task));
- }
-
- @SuppressWarnings("deprecation")
- public void testSchedulePastEndOfMonth() {
- Calendar calendar = Calendar.getInstance();
- calendar.set(Calendar.MONTH, Calendar.SEPTEMBER);
- calendar.set(Calendar.DAY_OF_MONTH, 30);
- manager.setSecheduledIn(calendar, 1);
- assertEquals("Should be October", Calendar.OCTOBER, calendar.get(Calendar.MONTH));
- }
-
- @SuppressWarnings("deprecation")
- public void testIsCompletedToday() {
- AbstractTask task = new LocalTask("1", "task 1");
- task.setCompleted(true);
- task.setCompletionDate(new Date());
- assertTrue(manager.isCompletedToday(task));
-
- MockRepositoryTask mockTask = new MockRepositoryTask("1");
- mockTask.setOwner("unknown");
- manager.getTaskList().addTask(mockTask);
- mockTask.setCompleted(true);
- mockTask.setCompletionDate(new Date());
- assertFalse("completed: " + mockTask.getCompletionDate(), manager.isCompletedToday(mockTask));
-
- mockTask = new MockRepositoryTask("2");
- manager.getTaskList().addTask(mockTask);
- mockTask.setCompleted(true);
- mockTask.setCompletionDate(new Date());
- repository.setAuthenticationCredentials("testUser", "testPassword");
- mockTask.setOwner("testUser");
- assertTrue(manager.isCompletedToday(mockTask));
-
- }
-
- public void testMoveCategories() {
- assertEquals(0, manager.getTaskList().getDefaultCategory().getChildren().size());
- 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().moveToContainer(task1, cat1);
- assertEquals(1, manager.getTaskList().getContainerForHandle("cat1").getChildren().size());
- assertEquals(0, manager.getTaskList().getContainerForHandle("cat2").getChildren().size());
-
- manager.getTaskList().moveToContainer(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().getDefaultCategory().getChildren().size());
- AbstractTask task1 = new LocalTask("t1", "t1");
- manager.getTaskList().moveToContainer(task1, manager.getTaskList().getDefaultCategory());
- assertEquals(1, manager.getTaskList().getDefaultCategory().getChildren().size());
- assertEquals(UnfiledCategory.HANDLE, task1.getParentContainers().iterator().next().getHandleIdentifier());
-
- TaskCategory cat1 = new TaskCategory("c1");
- manager.getTaskList().addCategory(cat1);
-
- manager.getTaskList().moveToContainer(task1, cat1);
- assertEquals(0, manager.getTaskList().getDefaultCategory().getChildren().size());
- assertEquals(cat1, task1.getParentContainers().iterator().next());
-
- manager.getTaskList().moveToContainer(task1, manager.getTaskList().getDefaultCategory());
- assertEquals(1, manager.getTaskList().getDefaultCategory().getChildren().size());
- assertEquals(0, cat1.getChildren().size());
- assertEquals(UnfiledCategory.HANDLE, task1.getParentContainers().iterator().next().getHandleIdentifier());
- }
-
- public void testEmpty() {
- manager.resetTaskList();
- assertTrue(manager.getTaskList().isEmpty());
- manager.getTaskList().internalAddRootTask(new LocalTask("", ""));
- assertFalse(manager.getTaskList().isEmpty());
- }
-
- public void testCategoryPersistance() {
- MockRepositoryTask task = new MockRepositoryTask("1");
- TaskCategory category = new TaskCategory("cat");
- manager.getTaskList().addCategory(category);
- manager.getTaskList().moveToContainer(task, category);
- assertNotNull(manager.getTaskList());
- assertEquals(3, manager.getTaskList().getCategories().size());
-
- manager.saveTaskList();
- manager.resetTaskList();
- manager.readExistingOrCreateNewList();
- assertEquals("" + manager.getTaskList().getCategories(), 3, manager.getTaskList().getCategories().size());
- assertEquals(1, manager.getTaskList().getAllTasks().size());
- }
-
- public void testDeleteCategory() {
- assertNotNull(manager.getTaskList());
- assertEquals(2, manager.getTaskList().getCategories().size());
- TaskCategory category = new TaskCategory("cat");
- manager.getTaskList().addCategory(category);
- assertEquals(3, manager.getTaskList().getCategories().size());
- manager.getTaskList().deleteCategory(category);
- assertEquals(2, manager.getTaskList().getCategories().size());
- }
-
- public void testDeleteCategoryMovesTasksToRoot() {
- AbstractTask task = new MockRepositoryTask("delete");
- TaskCategory category = new TaskCategory("cat");
- manager.getTaskList().addTask(task, category);
- manager.getTaskList().addCategory(category);
- assertEquals(0, manager.getTaskList().getDefaultCategory().getChildren().size());
- manager.getTaskList().deleteCategory(category);
- assertEquals(1, manager.getTaskList().getDefaultCategory().getChildren().size());
- }
-
- public void testRenameCategory() {
-
- assertNotNull(manager.getTaskList());
-
- TaskCategory category = new TaskCategory("cat");
- manager.getTaskList().addCategory(category);
- assertEquals(3, 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(2, manager.getTaskList().getCategories().size());
- }
-
- public void testDeleteCategoryAfterRename() {
- String newDesc = "newDescription";
- assertNotNull(manager.getTaskList());
- assertEquals(2, manager.getTaskList().getCategories().size());
- TaskCategory category = new TaskCategory("cat");
- manager.getTaskList().addCategory(category);
- assertEquals(3, manager.getTaskList().getCategories().size());
- manager.getTaskList().renameContainer(category, newDesc);
- manager.getTaskList().deleteCategory(category);
- assertEquals(2, manager.getTaskList().getCategories().size());
- }
-
- public void testCreateSameCategoryName() {
- assertNotNull(manager.getTaskList());
- assertEquals(2, manager.getTaskList().getCategories().size());
- TaskCategory category = new TaskCategory("cat");
- manager.getTaskList().addCategory(category);
- assertEquals(3, manager.getTaskList().getCategories().size());
- TaskCategory category2 = new TaskCategory("cat");
- manager.getTaskList().addCategory(category2);
- assertEquals(3, manager.getTaskList().getCategories().size());
- AbstractTaskContainer container = manager.getTaskList().getContainerForHandle("cat");
- assertEquals(container, category);
- }
-
- public void testDeleteRootTask() {
- AbstractTask task = new LocalTask("1", "label");
- manager.getTaskList().addTask(task);
- manager.getTaskList().internalAddRootTask(task);
- manager.getTaskList().deleteTask(task);
- assertEquals(0, manager.getTaskList().getAllTasks().size());
- assertEquals(0, manager.getTaskList().getDefaultCategory().getChildren().size());
- assertEquals(0, manager.getTaskList().getArchiveContainer().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(2, manager.getTaskList().getCategories().size());
-
- AbstractTask task = new LocalTask("1", "label");
- TaskCategory category = new TaskCategory("handleAndDescription");
- manager.getTaskList().addTask(task);
- assertEquals(1, manager.getTaskList().getArchiveContainer().getChildren().size());
-
- manager.getTaskList().addCategory(category);
- manager.getTaskList().moveToContainer(task, category);
- assertEquals(3, manager.getTaskList().getCategories().size());
- assertEquals(1, category.getChildren().size());
- assertEquals(0, manager.getTaskList().getArchiveContainer().getChildren().size());
- assertEquals(1, manager.getTaskList().getAllTasks().size());
- assertEquals(0, manager.getTaskList().getDefaultCategory().getChildren().size());
-
- manager.getTaskList().deleteTask(task);
- assertEquals(0, manager.getTaskList().getAllTasks().size());
- assertEquals(0, manager.getTaskList().getDefaultCategory().getChildren().size());
- assertEquals(0, manager.getTaskList().getArchiveContainer().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,
- TasksUiPlugin.getDefault().getRepositoriesFilePath());
- MockRepositoryTask task = new MockRepositoryTask(repositoryUrl, "1");
- TaskList taskList = TasksUiPlugin.getTaskListManager().getTaskList();
- taskList.moveToContainer(task, manager.getTaskList().getDefaultCategory());
- MockRepositoryQuery query = new MockRepositoryQuery("query");
- taskList.addQuery(query);
- taskList.addTask(task, query);
- assertEquals(1, taskList.getAllTasks().size());
- assertEquals(1, taskList.getDefaultCategory().getChildren().size());
- taskList.deleteTask(task);
- assertEquals(0, taskList.getAllTasks().size());
- assertEquals(0, taskList.getDefaultCategory().getChildren().size());
- }
-
- public void testCreate() {
- MockRepositoryTask repositoryTask = new MockRepositoryTask("1");
- 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() {
- MockRepositoryTask repositoryTask = new MockRepositoryTask("1");
- repositoryTask.setTaskKind("kind");
- manager.getTaskList().addTask(repositoryTask, manager.getTaskList().getDefaultCategory());
- assertEquals(0, manager.getTaskList().getArchiveContainer().getChildren().size());
- assertEquals(1, manager.getTaskList().getDefaultCategory().getChildren().size());
- manager.saveTaskList();
-
- manager.resetTaskList();
- manager.readExistingOrCreateNewList();
- assertEquals(1, manager.getTaskList().getDefaultCategory().getChildren().size());
- assertEquals(0, manager.getTaskList().getArchiveContainer().getChildren().size());
- }
-
- public void testArchiveRepositoryTaskExternalization() {
- MockRepositoryTask repositoryTask = new MockRepositoryTask("1");
- repositoryTask.setTaskKind("kind");
- manager.getTaskList().addTask(repositoryTask);
- assertEquals(1, manager.getTaskList().getArchiveContainer().getChildren().size());
- assertEquals(0, manager.getTaskList().getDefaultCategory().getChildren().size());
- manager.saveTaskList();
-
- manager.resetTaskList();
- manager.readExistingOrCreateNewList();
- assertEquals(1, manager.getTaskList().getArchiveContainer().getChildren().size());
- assertEquals(0, manager.getTaskList().getDefaultCategory().getChildren().size());
- }
-
- public void testRepositoryTasksAndCategoriesMultiRead() {
- TaskCategory cat1 = new TaskCategory("Category 1");
- manager.getTaskList().addCategory(cat1);
-
- MockRepositoryTask reportInCat1 = new MockRepositoryTask("123");
- manager.getTaskList().moveToContainer(reportInCat1, cat1);
- assertEquals(cat1, reportInCat1.getParentContainers().iterator().next());
-
- manager.saveTaskList();
- assertNotNull(manager.getTaskList());
- manager.resetTaskList();
- manager.readExistingOrCreateNewList();
-
- // read once
- Set<AbstractTaskCategory> readCats = manager.getTaskList().getTaskContainers();
- assertTrue(manager.getTaskList().getCategories().contains(cat1));
- Iterator<AbstractTaskCategory> iterator = readCats.iterator();
-
- boolean found = false;
- while (iterator.hasNext()) {
- AbstractTaskContainer 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().getTaskContainers();
- assertTrue(manager.getTaskList().getCategories().contains(cat1));
-
- iterator = readCats.iterator();
- found = false;
- while (iterator.hasNext()) {
- AbstractTaskContainer 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().moveToContainer(task1, manager.getTaskList().getDefaultCategory());
- rootTasks.add(task1);
-
- AbstractTask sub2 = new LocalTask("2", "sub 2");
- manager.getTaskList().addTask(sub2, task1);
- assertEquals(1, task1.getChildren().size());
-
- manager.saveTaskList();
- assertNotNull(manager.getTaskList());
- manager.resetTaskList();
- manager.readExistingOrCreateNewList();
-
- assertNotNull(manager.getTaskList());
- assertTrue(rootTasks.containsAll(manager.getTaskList().getDefaultCategory().getChildren()));
-
- Set<AbstractTask> readList = manager.getTaskList().getDefaultCategory().getChildren();
- for (AbstractTask task : readList) {
- if (task.equals(task1)) {
- assertEquals(task1.getSummary(), task.getSummary());
- assertEquals(1, task.getChildren().size());
- }
- }
- }
-
- public void testCreationAndExternalization() {
- Set<AbstractTask> rootTasks = new HashSet<AbstractTask>();
- AbstractTask task1 = manager.createNewLocalTask("task 1");
- manager.getTaskList().moveToContainer(task1, manager.getTaskList().getDefaultCategory());
- rootTasks.add(task1);
-
- AbstractTask sub1 = manager.createNewLocalTask("sub 1");
- manager.getTaskList().addTask(sub1, task1);
-
- manager.getTaskList().moveToContainer(sub1, manager.getTaskList().getArchiveContainer());
-
- AbstractTask task2 = manager.createNewLocalTask("task 2");
- manager.getTaskList().moveToContainer(task2, manager.getTaskList().getDefaultCategory());
- rootTasks.add(task2);
-
- 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);
- AbstractTask task3 = manager.createNewLocalTask("task 3");
- manager.getTaskList().moveToContainer(task3, cat1);
- cat1Contents.add(task3);
- assertEquals(cat1, task3.getParentContainers().iterator().next());
- AbstractTask sub2 = manager.createNewLocalTask("sub 2");
- manager.getTaskList().addTask(sub2, task3);
- manager.getTaskList().moveToContainer(sub2, manager.getTaskList().getArchiveContainer());
-
- AbstractTask task4 = manager.createNewLocalTask("task 4");
- manager.getTaskList().moveToContainer(task4, cat1);
- cat1Contents.add(task4);
-
- MockRepositoryTask reportInCat1 = new MockRepositoryTask("123");
- manager.getTaskList().moveToContainer(reportInCat1, cat1);
- assertEquals(cat1, reportInCat1.getParentContainers().iterator().next());
- cat1Contents.add(reportInCat1);
-
- MockRepositoryTask reportInRoot = new MockRepositoryTask("124");
- manager.getTaskList().moveToContainer(reportInRoot, manager.getTaskList().getDefaultCategory());
- rootTasks.add(reportInRoot);
-
- assertEquals(3, manager.getTaskList().getRootElements().size());
-
- manager.saveTaskList();
- assertNotNull(manager.getTaskList());
- manager.resetTaskList();
- // manager.getTaskList().clear();
- // TaskList list = new TaskList();
- // manager.setTaskList(list);
- manager.readExistingOrCreateNewList();
-
- assertNotNull(manager.getTaskList());
- assertTrue(rootTasks.containsAll(manager.getTaskList().getDefaultCategory().getChildren()));
-
- Set<AbstractTask> readList = manager.getTaskList().getDefaultCategory().getChildren();
- for (AbstractTask task : readList) {
- if (task.equals(task1)) {
- assertEquals(task1.getSummary(), task.getSummary());
- assertEquals(1, task.getChildren().size());
- }
- if (task.equals(reportInRoot)) {
- assertEquals(reportInRoot.getSummary(), task.getSummary());
- }
- }
-
- Set<AbstractTaskCategory> readCats = manager.getTaskList().getTaskContainers();
- assertTrue(manager.getTaskList().getCategories().contains(cat1));
- Iterator<AbstractTaskCategory> iterator = readCats.iterator();
- boolean found = false;
- while (iterator.hasNext()) {
- AbstractTaskContainer readCat1 = iterator.next();
- if (cat1.equals(readCat1)) {
- found = true;
- assertEquals(cat1Contents, readCat1.getChildren());
- }
- }
- if (!found)
- fail(" Category not found afer tasklist read");
- }
-
- public void testExternalizationOfHandlesWithDash() {
- Set<AbstractTask> rootTasks = new HashSet<AbstractTask>();
-
-// String handle = AbstractTask.getHandle("http://url/repo-location",
-// 1);
- AbstractTask task1 = manager.createNewLocalTask("task 1");
- manager.getTaskList().moveToContainer(task1, manager.getTaskList().getDefaultCategory());
- rootTasks.add(task1);
-
- manager.saveTaskList();
- assertNotNull(manager.getTaskList());
- manager.resetTaskList();
- assertTrue(manager.readExistingOrCreateNewList());
-
- assertNotNull(manager.getTaskList());
- assertEquals(rootTasks, manager.getTaskList().getDefaultCategory().getChildren());
- }
-
- public void testScheduledRefreshJob() throws InterruptedException {
- int counter = 3;
- ScheduledTaskListSynchJob.resetCount();
- assertEquals(0, ScheduledTaskListSynchJob.getCount());
- TasksUiPlugin.getDefault().getPreferenceStore().setValue(
- TasksUiPreferenceConstants.REPOSITORY_SYNCH_SCHEDULE_ENABLED, true);
- TasksUiPlugin.getDefault().getPreferenceStore().setValue(
- TasksUiPreferenceConstants.REPOSITORY_SYNCH_SCHEDULE_MILISECONDS, 1000L);
- TaskListSynchronizationScheduler manager = new TaskListSynchronizationScheduler(false);
- manager.startSynchJob();
- Thread.sleep(3000);
- assertTrue(ScheduledTaskListSynchJob.getCount() + " smaller than " + counter,
- ScheduledTaskListSynchJob.getCount() >= counter);
- manager.cancelAll();
- TasksUiPlugin.getDefault().getPreferenceStore().setValue(
- TasksUiPreferenceConstants.REPOSITORY_SYNCH_SCHEDULE_ENABLED, false);
- }
-
- public void testgetQueriesAndHitsForHandle() {
- TaskList taskList = manager.getTaskList();
-
- MockRepositoryTask hit1 = new MockRepositoryTask("1");
- MockRepositoryTask hit2 = new MockRepositoryTask("2");
- MockRepositoryTask hit3 = new MockRepositoryTask("3");
-
- MockRepositoryTask hit1twin = new MockRepositoryTask("1");
- MockRepositoryTask hit2twin = new MockRepositoryTask("2");
- MockRepositoryTask hit3twin = new MockRepositoryTask("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<AbstractRepositoryQuery> queriesReturned = taskList.getQueriesForHandle(RepositoryTaskHandleUtil.getHandle(
- MockRepositoryConnector.REPOSITORY_URL, "1"));
- assertNotNull(queriesReturned);
- assertEquals(2, queriesReturned.size());
- assertTrue(queriesReturned.contains(query1));
- assertTrue(queriesReturned.contains(query2));
-
- Set<String> handles = new HashSet<String>();
- handles.add(RepositoryTaskHandleUtil.getHandle(MockRepositoryConnector.REPOSITORY_URL, "2"));
- Collection<AbstractTask> hitsReturned = taskList.getTasks(handles);
- assertNotNull(hitsReturned);
- assertEquals(1, hitsReturned.size());
- assertTrue(hitsReturned.contains(hit2));
- assertTrue(hitsReturned.contains(hit2twin));
-
- }
-
-// 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() {
- TaskList taskList = manager.getTaskList();
-
- MockRepositoryTask hit1 = new MockRepositoryTask("1");
- MockRepositoryTask hit2 = new MockRepositoryTask("2");
- MockRepositoryTask hit3 = new MockRepositoryTask("3");
-
- MockRepositoryTask hit1twin = new MockRepositoryTask("1");
- MockRepositoryTask hit2twin = new MockRepositoryTask("2");
- MockRepositoryTask hit3twin = new MockRepositoryTask("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());
- query1.clear();
- 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 (AbstractTask hit : query1.getChildren()) {
- if (hit.equals(hit1twin)) {
- assertTrue(hit.isNotified());
- } else {
- assertFalse(hit.isNotified());
- }
- }
- }
-
- public void testgetRepositoryTasks() {
-
- String repositoryUrl = "https://bugs.eclipse.org/bugs";
-
- String bugNumber = "106939";
-
- MockRepositoryTask task1 = new MockRepositoryTask(repositoryUrl, bugNumber);
- manager.getTaskList().addTask(task1);
-
- MockRepositoryTask task2 = new MockRepositoryTask("https://unresolved", bugNumber);
- manager.getTaskList().addTask(task2);
-
- TaskList taskList = manager.getTaskList();
- assertEquals(2, taskList.getAllTasks().size());
- Set<AbstractTask> tasksReturned = taskList.getRepositoryTasks(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(taskList.getActiveTask());
-
- manager.activateTask(task2);
- assertEquals(task2, taskList.getActiveTask());
-
- manager.deactivateAllTasks();
- assertNull(taskList.getActiveTask());
- }
-
- public void testMarkTaskRead() {
- String repositoryUrl = "http://mylyn.eclipse.org/bugs222";
- MockRepositoryTask task1 = new MockRepositoryTask(repositoryUrl, "1");
- MockRepositoryTask task2 = new MockRepositoryTask(repositoryUrl, "2");
- task1.setSynchronizationState(RepositoryTaskSyncState.INCOMING);
- task2.setSynchronizationState(RepositoryTaskSyncState.INCOMING);
- List<AbstractTaskContainer> elements = new ArrayList<AbstractTaskContainer>();
- elements.add(task1);
- elements.add(task2);
- MarkTaskReadAction readAction = new MarkTaskReadAction(elements);
- readAction.run();
- assertEquals(RepositoryTaskSyncState.SYNCHRONIZED, task1.getSynchronizationState());
- assertEquals(RepositoryTaskSyncState.SYNCHRONIZED, task2.getSynchronizationState());
-
- manager.getTaskList().reset();
- MockRepositoryTask hit1 = new MockRepositoryTask("1");
- MockRepositoryTask hit2 = new MockRepositoryTask("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 (AbstractTaskContainer element : query.getChildren()) {
- if (element instanceof MockRepositoryTask) {
- MockRepositoryTask mockTask = (MockRepositoryTask) element;
- assertEquals(RepositoryTaskSyncState.SYNCHRONIZED, mockTask.getSynchronizationState());
- }
- }
-
- }
-
- public void testMarkUnRead() {
- String repositoryUrl = "http://mylyn.eclipse.org/bugs222";
- MockRepositoryTask task1 = new MockRepositoryTask(repositoryUrl, "1");
- MockRepositoryTask task2 = new MockRepositoryTask(repositoryUrl, "2");
- assertEquals(RepositoryTaskSyncState.SYNCHRONIZED, task1.getSynchronizationState());
- assertEquals(RepositoryTaskSyncState.SYNCHRONIZED, task2.getSynchronizationState());
- List<AbstractTaskContainer> elements = new ArrayList<AbstractTaskContainer>();
- elements.add(task1);
- elements.add(task2);
- MarkTaskUnreadAction unreadAction = new MarkTaskUnreadAction(elements);
- unreadAction.run();
- assertEquals(RepositoryTaskSyncState.INCOMING, task1.getSynchronizationState());
- assertEquals(RepositoryTaskSyncState.INCOMING, task2.getSynchronizationState());
-
- manager.getTaskList().reset();
- MockRepositoryTask hit1 = new MockRepositoryTask("1");
- MockRepositoryTask hit2 = new MockRepositoryTask("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 (AbstractTaskContainer element : query.getChildren()) {
- if (element instanceof MockRepositoryTask) {
- MockRepositoryTask mockTask = (MockRepositoryTask) element;
- assertEquals(RepositoryTaskSyncState.SYNCHRONIZED, mockTask.getSynchronizationState());
- } else {
- fail();
- }
- }
-
- unreadAction = new MarkTaskUnreadAction(elements);
- unreadAction.run();
- assertEquals(2, query.getChildren().size());
- for (AbstractTaskContainer element : query.getChildren()) {
- if (element instanceof MockRepositoryTask) {
- MockRepositoryTask mockTask = (MockRepositoryTask) element;
- assertEquals(RepositoryTaskSyncState.INCOMING, mockTask.getSynchronizationState());
- } else {
- fail();
- }
- }
- }
-
- public void testQueryHitsNotDropped() {
- MockRepositoryTask task1 = new MockRepositoryTask("1");
- MockRepositoryTask task2 = new MockRepositoryTask("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<AbstractRepositoryQuery> queries = new HashSet<AbstractRepositoryQuery>();
- queries.add(query);
- TasksUiPlugin.getSynchronizationManager().synchronize(new MockRepositoryConnector(), repository, queries, null,
- Job.INTERACTIVE, 0, 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 4f23614fe..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 org.eclipse.mylyn.internal.tasks.ui.views.AbstractTaskListPresentation;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-
-import junit.framework.TestCase;
-
-/**
- * @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/TaskListTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListTest.java
deleted file mode 100644
index 9e4fbdb3e..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListTest.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.core.TaskCategory;
-import org.eclipse.mylyn.tasks.core.TaskList;
-
-/**
- * @author Mik Kersten
- */
-public class TaskListTest extends TestCase {
-
- public void testGetUserCategories() {
- TaskList taskList = new TaskList();
- taskList.addCategory(new TaskCategory("a"));
- assertEquals(2, taskList.getUserCategories().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 318216905..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListUiTest.java
+++ /dev/null
@@ -1,393 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse 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.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.TaskCategory;
-import org.eclipse.mylyn.internal.tasks.ui.MoveToCategoryMenuContributor;
-import org.eclipse.mylyn.internal.tasks.ui.TaskPriorityFilter;
-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.views.TaskListView;
-import org.eclipse.mylyn.internal.web.tasks.WebTask;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.tasks.core.ITaskListChangeListener;
-import org.eclipse.mylyn.tasks.core.AbstractTask.PriorityLevel;
-import org.eclipse.mylyn.tasks.tests.connector.MockRepositoryQuery;
-import org.eclipse.mylyn.tasks.ui.TaskListManager;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.ui.PartInitException;
-
-/**
- * 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 PartInitException {
- try {
- TaskListView.openInActivePerspective();
- manager = TasksUiPlugin.getTaskListManager();
- cat1 = new TaskCategory("First Category");
-
- cat1task1 = manager.createNewLocalTask("task 1");
- cat1task1.setPriority(PriorityLevel.P1.toString());
- cat1task1.setCompleted(true);
- manager.getTaskList().moveToContainer(cat1task1, cat1);
-
- cat1task1sub1 = manager.createNewLocalTask("sub task 1");
- cat1task1sub1.setPriority(PriorityLevel.P1.toString());
- cat1task1sub1.setCompleted(true);
- manager.getTaskList().addTask(cat1task1sub1, cat1task1);
-
- cat1task2 = manager.createNewLocalTask("task 2");
- cat1task2.setPriority(PriorityLevel.P2.toString());
- cat1task2.addParentContainer(cat1);
- manager.getTaskList().moveToContainer(cat1task2, cat1);
-
- cat1task3 = manager.createNewLocalTask("task 3");
- cat1task3.setPriority(PriorityLevel.P3.toString());
- cat1task3.setCompleted(true);
- cat1task3.addParentContainer(cat1);
- manager.getTaskList().moveToContainer(cat1task3, cat1);
-
- cat1task4 = manager.createNewLocalTask("task 4");
- cat1task4.setPriority(PriorityLevel.P4.toString());
- cat1task4.addParentContainer(cat1);
- manager.getTaskList().moveToContainer(cat1task4, cat1);
-
- cat1task5 = manager.createNewLocalTask("task 5");
- cat1task5.setPriority(PriorityLevel.P5.toString());
- cat1task5.setCompleted(true);
- cat1task5.addParentContainer(cat1);
- manager.getTaskList().moveToContainer(cat1task5, cat1);
-
- manager.getTaskList().addCategory(cat1);
- assertEquals(cat1.getChildren().size(), 5);
-
- cat2 = new TaskCategory("Second Category");
-
- cat2task1 = manager.createNewLocalTask("task 1");
- cat2task1.setPriority(PriorityLevel.P1.toString());
- cat2task1.addParentContainer(cat2);
- manager.getTaskList().moveToContainer(cat2task1, cat2);
-
- cat2task1sub1 = manager.createNewLocalTask("sub task 1");
- cat2task1sub1.setPriority(PriorityLevel.P1.toString());
- manager.getTaskList().addTask(cat2task1sub1, cat2task1);
-
- cat2task2 = manager.createNewLocalTask("task 2");
- cat2task2.setPriority(PriorityLevel.P2.toString());
- cat2task2.setCompleted(true);
- cat2task2.addParentContainer(cat2);
- manager.getTaskList().moveToContainer(cat2task2, cat2);
-
- cat2task3 = manager.createNewLocalTask("task 3");
- cat2task3.setPriority(PriorityLevel.P3.toString());
- cat2task3.addParentContainer(cat2);
- manager.getTaskList().moveToContainer(cat2task3, cat2);
-
- cat2task4 = manager.createNewLocalTask("task 4");
- cat2task4.setPriority(PriorityLevel.P4.toString());
- cat2task4.setCompleted(true);
- cat2task4.addParentContainer(cat2);
- manager.getTaskList().moveToContainer(cat2task4, cat2);
-
- cat2task5 = manager.createNewLocalTask("task 5");
- cat2task5.setPriority(PriorityLevel.P5.toString());
- cat2task5.addParentContainer(cat2);
- manager.getTaskList().moveToContainer(cat2task5, cat2);
-
- manager.getTaskList().addCategory(cat2);
- manager.saveTaskList();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- @Override
- public void tearDown() {
- // clear everything
- }
-
- public void testMarkWebTaskCompleted() {
- TaskListView view = TaskListView.getFromActivePerspective();
- assertNotNull(view);
- WebTask webTask = new WebTask("1", "1", "", "", "web");
- TasksUiPlugin.getTaskListManager().getTaskList().addTask(webTask,
- TasksUiPlugin.getTaskListManager().getTaskList().getDefaultCategory());
- view.getViewer().refresh();
- // Arrays.asList(view.getViewer().getVisibleExpandedElements());
- assertFalse(webTask.isCompleted());
- ArrayList<AbstractTaskContainer> tasks = new ArrayList<AbstractTaskContainer>();
- tasks.add(webTask);
- new MarkTaskCompleteAction(tasks).run();
- assertTrue(webTask.isCompleted());
- }
-
- public void testUiFilter() {
- try {
- 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));
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- /**
- * 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();
-
- // open a task in editor
- // cat1task1.setForceSyncOpen(true);
- TasksUiUtil.openEditor(cat1task1, false, true);
- // cat1task1.openTaskInEditor(false);
- // cat1task2.setForceSyncOpen(true);
- // cat1task2.openTaskInEditor(false);
- TasksUiUtil.openEditor(cat1task2, false, true);
-
- 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<AbstractTaskContainer> selectedElements = new Vector<AbstractTaskContainer>();
- selectedElements.add(cat1task1);
- int numCategoriesMinusArchiveContainer = manager.getTaskList().getCategories().size() - 1;
- int numSeparators = 1;
- // adding a separator and the New Category... action
- int expectedNrOfSubMenuEntries = numCategoriesMinusArchiveContainer + 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<AbstractTaskContainer> selectedElements = new Vector<AbstractTaskContainer>();
- selectedElements.add(cat1task1);
-
- List<AbstractTaskContainer> emptySelection = new Vector<AbstractTaskContainer>();
-
- List<AbstractTaskContainer> categorySelection = new Vector<AbstractTaskContainer>();
- categorySelection.add(cat1);
-
- List<AbstractTaskContainer> querySelection = new Vector<AbstractTaskContainer>();
- 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 (int i = 0; i < items.length; i++) {
- if (items[i].getData() instanceof TaskCategory) {
- TreeItem[] sub = items[i].getItems();
- for (int j = 0; j < sub.length; j++) {
- assertTrue(sub[j].getData() instanceof AbstractTask);
- AbstractTask task = (AbstractTask) sub[j].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 (int i = 0; i < items.length; i++) {
- if (items[i].getData() instanceof TaskCategory) {
- TreeItem[] sub = items[i].getItems();
- for (int j = 0; j < sub.length; j++) {
- assertTrue(sub[j].getData() instanceof AbstractTask);
- AbstractTask task = (AbstractTask) sub[j].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 afd677720..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskPlanningEditorTest.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 junit.framework.TestCase;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.mylyn.internal.tasks.core.LocalTask;
-import org.eclipse.mylyn.internal.tasks.ui.editors.TaskPlanningEditor;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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 {
- 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();
- super.tearDown();
- }
-
- public void testDirtyOnEdit() {
- LocalTask task = new LocalTask("1", MOCK_LABEL);
- task.setSummary(DESCRIPTION);
- TasksUiPlugin.getTaskListManager().getTaskList().addTask(task);
- TasksUiUtil.openEditor(task, false, true);
- 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.getTaskListManager().getTaskList().addTask(task);
- TasksUiUtil.openEditor(task, false, true);
- 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());
- TasksUiPlugin.getTaskListManager().getTaskList().renameTask(task, NEW_DESCRIPTION);
- assertEquals(NEW_DESCRIPTION, task.getSummary());
- 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.getTaskListManager().getTaskList().addTask(task);
- TasksUiUtil.openEditor(task, false, true);
- 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());
- TasksUiPlugin.getTaskListManager().getTaskList().renameTask(task, NEW_DESCRIPTION + "2");
- assertEquals(NEW_DESCRIPTION + "2", task.getSummary());
- 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 ae67024f0..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.getUrl().equals(REPURL1)) {
- assertEquals(TIMEZONE, repository.getTimeZoneId());
- assertEquals(VERSION, repository.getVersion());
- assertEquals(ENCODING, repository.getCharacterEncoding());
- assertEquals(TIMESTAMP, repository.getSynchronizationTimeStamp());
- } else if (repository.getUrl().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/TaskRepositoryManagerTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositoryManagerTest.java
deleted file mode 100644
index d2884aade..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositoryManagerTest.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse 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.internal.tasks.core.RepositoryTaskHandleUtil;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.tasks.tests.connector.MockRepositoryConnector;
-import org.eclipse.mylyn.tasks.tests.connector.MockRepositoryQuery;
-import org.eclipse.mylyn.tasks.tests.connector.MockRepositoryTask;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @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 testQueryDeletion() {
- MockRepositoryTask task = new MockRepositoryTask("1");
- task.setLastReadTimeStamp("now");
- MockRepositoryQuery query = new MockRepositoryQuery("Test");
- TasksUiPlugin.getTaskListManager().getTaskList().addQuery(query);
- TasksUiPlugin.getTaskListManager().getTaskList().addTask(task, query);
-
- assertNotNull(TasksUiPlugin.getTaskListManager().getTaskList().getTask(task.getHandleIdentifier()));
- TasksUiPlugin.getTaskListManager().getTaskList().deleteQuery(query);
- AbstractTask task2 = TasksUiPlugin.getTaskListManager().getTaskList().getTask(task.getHandleIdentifier());
- assertNotNull(task2);
- assertEquals(1, 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, TasksUiPlugin.getDefault().getRepositoriesFilePath());
- TaskRepository repository2 = new TaskRepository(DEFAULT_KIND, DEFAULT_URL);
- manager.addRepository(repository2, TasksUiPlugin.getDefault().getRepositoriesFilePath());
- 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, TasksUiPlugin.getDefault().getRepositoriesFilePath());
- assertEquals(repository, manager.getRepository(DEFAULT_KIND, DEFAULT_URL));
- assertNull(manager.getRepository(DEFAULT_KIND, "foo"));
- assertNull(manager.getRepository("foo", DEFAULT_URL));
- }
-
- public void testConnectorAddition() {
- AbstractRepositoryConnector 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");
- manager.addRepository(repository1, TasksUiPlugin.getDefault().getRepositoriesFilePath());
- manager.addRepository(repository2, TasksUiPlugin.getDefault().getRepositoriesFilePath());
-
- List<TaskRepository> repositoryList = new ArrayList<TaskRepository>();
- repositoryList.add(repository2);
- repositoryList.add(repository1);
- manager.readRepositories(TasksUiPlugin.getDefault().getRepositoriesFilePath());
-
- // NOTE: different conditions for running with and without the JIRA
- // Connector
- if (manager.getRepositoryConnectors().size() > 1) {
- assertTrue(manager.getAllRepositories().contains(repository1));
- assertTrue(manager.getAllRepositories().contains(repository2));
- // assertEquals(repositoryList, manager.getAllRepositories());
- } else {
- // TODO there is something wrong with this
- assertEquals("all: " + manager.getAllRepositories(), 1, manager.getAllRepositories().size());
- }
- }
-
- 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("bugzilla", "http://bugzilla");
- repository1.setVersion(version);
- repository1.setCharacterEncoding(encoding);
- repository1.setTimeZoneId(fakeTimeZone);
- repository1.setSynchronizationTimeStamp(dateString);
- repository1.setAnonymous(true);
- manager.addRepository(repository1, TasksUiPlugin.getDefault().getRepositoriesFilePath());
-
- manager.readRepositories(TasksUiPlugin.getDefault().getRepositoriesFilePath());
- TaskRepository temp = manager.getRepository(repository1.getConnectorKind(), repository1.getUrl());
- assertNotNull(temp);
- assertEquals(version, temp.getVersion());
- assertTrue(temp.isAnonymous());
- 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, TasksUiPlugin.getDefault().getRepositoriesFilePath());
- assertNotNull(manager.getRepository(repository.getConnectorKind(), repository.getUrl()));
-
- TaskRepository repository2 = new TaskRepository(DEFAULT_KIND, ANOTHER_URL);
- manager.addRepository(repository2, TasksUiPlugin.getDefault().getRepositoriesFilePath());
- assertNotNull(manager.getRepository(repository2.getConnectorKind(), repository2.getUrl()));
-
- manager.removeRepository(repository2, TasksUiPlugin.getDefault().getRepositoriesFilePath());
-
- assertNull(manager.getRepository(repository2.getConnectorKind(), repository2.getUrl()));
- }
-
- public void testRepositoryWithUnnownUrlHandler() {
- TaskRepository repository = new TaskRepository("eclipse.technology.mylar",
- "nntp://news.eclipse.org/eclipse.technology.mylar");
-
- repository.setAuthenticationCredentials("testUser", "testPassword");
-
- assertEquals("testUser", repository.getUserName());
- assertEquals("testPassword", repository.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.
- AbstractRepositoryConnector 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().getRepositoriesFilePath());
-
- manager.readRepositories(TasksUiPlugin.getDefault().getRepositoriesFilePath());
-
- TaskRepository temp = manager.getRepository(repository.getConnectorKind(), repository.getUrl());
- assertNotNull(temp);
- assertEquals("euxx", temp.getProperty("owner"));
- }
-
- public void testRepositoryPersistanceSameUrl() throws MalformedURLException {
- TaskRepository repository1 = new TaskRepository("bugzilla", "http://repository");
- TaskRepository repository2 = new TaskRepository("jira", "http://repository");
- manager.addRepository(repository1, TasksUiPlugin.getDefault().getRepositoriesFilePath());
- manager.addRepository(repository2, TasksUiPlugin.getDefault().getRepositoriesFilePath());
- assertEquals(2, manager.getAllRepositories().size());
-
- List<TaskRepository> repositoryList = new ArrayList<TaskRepository>();
- repositoryList.add(repository2);
- repositoryList.add(repository1);
- manager.readRepositories(TasksUiPlugin.getDefault().getRepositoriesFilePath());
-
- 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 8682bc1a1..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 org.eclipse.mylyn.internal.tasks.core.IRepositoryConstants;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskRepositoriesSorter;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-import junit.framework.TestCase;
-
-/**
- * @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 f9f2adb74..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositoryTest.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.tests;
-
-import org.eclipse.mylyn.internal.tasks.core.IRepositoryConstants;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-import junit.framework.TestCase;
-
-/**
- * @author Mik Kersten
- */
-public class TaskRepositoryTest extends TestCase {
-
- public void testLabel() {
- TaskRepository repository = new TaskRepository("kind", "http://foo.bar");
- assertTrue(repository.getRepositoryLabel().equals(repository.getUrl()));
-
- repository.setProperty(IRepositoryConstants.PROPERTY_LABEL, "label");
- assertTrue(repository.getRepositoryLabel().equals("label"));
- }
-
-}
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 f1f4ef7be..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskTest.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.tasks.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.internal.tasks.core.LocalTask;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTask.PriorityLevel;
-
-/**
- * @author Mik Kersten
- */
-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(task.hasValidUrl());
-
- task.setUrl("http://");
- assertFalse(task.hasValidUrl());
-
- task.setUrl("https://");
- assertFalse(task.hasValidUrl());
-
- task.setUrl("");
- assertFalse(task.hasValidUrl());
-
- task.setUrl(null);
- assertFalse(task.hasValidUrl());
- }
-
- public void testPriorityNeverNull() {
- AbstractTask task = new LocalTask("handle", "label");
- assertNotNull(task.getPriority());
-
- PriorityLevel def = PriorityLevel.getDefault();
- assertNotNull(def);
- assertEquals(def, AbstractTask.PriorityLevel.fromDescription("garbage"));
- assertEquals(def, AbstractTask.PriorityLevel.fromString("garbage"));
- }
-}
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 434b6a25d..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskTestUtil.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;
-
-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;
- }
- }
-
- /**
- * 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/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/UrlConnectionUtilTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/UrlConnectionUtilTest.java
deleted file mode 100644
index 6da273941..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/UrlConnectionUtilTest.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.tasks.tests;
-
-import java.net.InetSocketAddress;
-import java.net.Proxy.Type;
-
-import junit.framework.TestCase;
-
-import org.apache.commons.httpclient.NTCredentials;
-import org.apache.commons.httpclient.UsernamePasswordCredentials;
-import org.eclipse.mylyn.web.core.AuthenticatedProxy;
-import org.eclipse.mylyn.web.core.WebClientUtil;
-
-public class UrlConnectionUtilTest extends TestCase {
-
- public void testUrlParsers() {
- String url = "https://example.com:444/folder/file.txt";
- assertEquals(444, WebClientUtil.getPort(url));
- assertEquals("example.com", WebClientUtil.getDomain(url));
- assertEquals("/folder/file.txt", WebClientUtil.getRequestPath(url));
-
- url = "http://example.com/";
- assertEquals(80, WebClientUtil.getPort(url));
- assertEquals("example.com", WebClientUtil.getDomain(url));
- assertEquals("/", WebClientUtil.getRequestPath(url));
-
- url = "http://example.com";
- assertEquals(80, WebClientUtil.getPort(url));
- assertEquals("example.com", WebClientUtil.getDomain(url));
- assertEquals("", WebClientUtil.getRequestPath(url));
-
- url = "https://example.com:321";
- assertEquals(321, WebClientUtil.getPort(url));
- assertEquals("example.com", WebClientUtil.getDomain(url));
- assertEquals("", WebClientUtil.getRequestPath(url));
-
- url = "example.com:321";
- assertEquals(321, WebClientUtil.getPort(url));
- assertEquals("example.com", WebClientUtil.getDomain(url));
- assertEquals("", WebClientUtil.getRequestPath(url));
-
- url = "https://example.com:444/folder/file.txt?search=https://example.com:812/folder/file.txt";
- assertEquals(444, WebClientUtil.getPort(url));
- assertEquals("example.com", WebClientUtil.getDomain(url));
- assertEquals("/folder/file.txt?search=https://example.com:812/folder/file.txt",
- WebClientUtil.getRequestPath(url));
-
- url = "https://example.com/folder/file.txt?search=https://example.com:812/folder/file.txt";
- assertEquals(443, WebClientUtil.getPort(url));
- assertEquals("example.com", WebClientUtil.getDomain(url));
- assertEquals("/folder/file.txt?search=https://example.com:812/folder/file.txt",
- WebClientUtil.getRequestPath(url));
-
- url = "https://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?&pid=11093&resolution=-1&sorter/field=updated&sorter/order=DESC&tempMax=1000";
- assertEquals(443, WebClientUtil.getPort(url));
- assertEquals("jira.codehaus.org", WebClientUtil.getDomain(url));
- assertEquals(
- "/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?&pid=11093&resolution=-1&sorter/field=updated&sorter/order=DESC&tempMax=1000",
- WebClientUtil.getRequestPath(url));
- }
-
- public void testCredentials() {
- AuthenticatedProxy proxy = new AuthenticatedProxy(Type.HTTP, new InetSocketAddress(4567), "user", "password");
- UsernamePasswordCredentials credentials = (UsernamePasswordCredentials) WebClientUtil.getCredentials(proxy,
- new InetSocketAddress(1234));
- assertEquals("user", credentials.getUserName());
- assertEquals("password", credentials.getPassword());
-
- proxy = new AuthenticatedProxy(Type.HTTP, new InetSocketAddress(4567), "domain\\user", "password");
- InetSocketAddress testAddress = new InetSocketAddress("mylyn.eclipse.org", 1234);
- NTCredentials ntCredentials = (NTCredentials) WebClientUtil.getCredentials(proxy, testAddress);
- assertEquals("user", ntCredentials.getUserName());
- assertEquals("password", ntCredentials.getPassword());
- assertEquals("domain", ntCredentials.getDomain());
- assertEquals("mylyn.eclipse.org", ntCredentials.getHost());
- }
-
-}
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 bad4611f3..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.tasks.core.AbstractAttachmentHandler;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.ITaskAttachment;
-import org.eclipse.mylyn.tasks.core.RepositoryAttachment;
-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, AbstractTask task) {
- // ignore
- return true;
- }
-
- @Override
- public boolean canUploadAttachment(TaskRepository repository, AbstractTask 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, AbstractTask 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 32958dd41..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.tasks.core.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 d9bbe6cde..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockRepositoryConnector.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.tasks.tests.connector;
-
-import java.util.Collections;
-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.tasks.core.AbstractAttachmentHandler;
-import org.eclipse.mylyn.tasks.core.AbstractAttributeFactory;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskDataHandler;
-import org.eclipse.mylyn.tasks.core.ITaskCollector;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-/**
- * @author Mik Kersten
- * @author Rob Elves
- */
-public class MockRepositoryConnector extends AbstractRepositoryConnector {
-
- public static final String REPOSITORY_KIND = "mock";
-
- public static final String REPOSITORY_URL = "http://mockrepository.test";
-
- private AbstractAttachmentHandler attachmentHandler;
-
- @Override
- public boolean canCreateNewTask(TaskRepository repository) {
- return true;
- }
-
- @Override
- public boolean canCreateTaskFromKey(TaskRepository repository) {
- return false;
- }
-
- @Override
- public AbstractAttachmentHandler getAttachmentHandler() {
- return attachmentHandler;
- }
-
- @Override
- public String getLabel() {
- return "Mock Repository (for unit tests)";
- }
-
- @Override
- public AbstractTaskDataHandler getTaskDataHandler() {
- // 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 updateAttributes(TaskRepository repository, IProgressMonitor monitor) throws CoreException {
- // ignore
- }
-
- @Override
- public void updateTaskFromRepository(TaskRepository repository, AbstractTask repositoryTask,
- IProgressMonitor monitor) {
- // ignore
- }
-
- @Override
- public boolean markStaleTasks(TaskRepository repository, Set<AbstractTask> tasks, IProgressMonitor monitor) {
- // ignore
- return false;
- }
-
- @Override
- public AbstractTask createTask(String repositoryUrl, String id, String summary) {
- // ignore
- return null;
- }
-
- @Override
- public void updateTaskFromTaskData(TaskRepository repository, AbstractTask repositoryTask,
- RepositoryTaskData taskData) {
- // ignore
-
- }
-
- @Override
- public IStatus performQuery(AbstractRepositoryQuery query, TaskRepository repository, IProgressMonitor monitor,
- ITaskCollector resultCollector) {
- return Status.OK_STATUS;
- }
-
- public void setAttachmentHandler(AbstractAttachmentHandler attachmentHandler) {
- this.attachmentHandler = attachmentHandler;
- }
-}
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 86fba4c54..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockRepositoryConnectorUi.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.tests.connector;
-
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.NewLocalTaskWizard;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.wizards.AbstractRepositorySettingsPage;
-
-/**
- * @author Mik Kersten
- */
-public class MockRepositoryConnectorUi extends AbstractRepositoryConnectorUi {
-
- @Override
- public IWizard getNewTaskWizard(TaskRepository taskRepository) {
- return new NewLocalTaskWizard();
- }
-
- @Override
- public String getConnectorKind() {
- return "mock";
- }
-
- @Override
- public AbstractRepositorySettingsPage getSettingsPage() {
- // ignore
- return null;
- }
-
- @Override
- public boolean hasSearchPage() {
- return false;
- }
-
- @Override
- public IWizard getQueryWizard(TaskRepository repository, AbstractRepositoryQuery query) {
- // 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 61a60b85e..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockRepositoryQuery.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.tasks.tests.connector;
-
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
-
-/**
- * @author Mik Kersten
- */
-public class MockRepositoryQuery extends AbstractRepositoryQuery {
-
- public String MOCK_URL = "http://mock.repository";
-
- public MockRepositoryQuery(String description) {
- super(description);
- super.setUrl(MOCK_URL);
- }
-
- public MockRepositoryQuery(String description, String url) {
- super(description);
- super.setUrl(url);
- }
-
- @Override
- public String getRepositoryKind() {
- return "mock";
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockRepositoryTask.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockRepositoryTask.java
deleted file mode 100644
index 2709982ed..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockRepositoryTask.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.tasks.core.AbstractTask;
-
-/**
- * @author Mik Kersten
- */
-public class MockRepositoryTask extends AbstractTask {
-
- private String ownerId;
-
- public MockRepositoryTask(String taskId) {
- super(MockRepositoryConnector.REPOSITORY_URL, taskId, taskId);
- }
-
- public MockRepositoryTask(String repositoryUrl, String taskId) {
- super(repositoryUrl, taskId, taskId);
- }
-
- public MockRepositoryTask(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/MockStatusHandler.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockStatusHandler.java
deleted file mode 100644
index a27a1276d..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockStatusHandler.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.tests.connector;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.mylyn.internal.monitor.core.util.IStatusHandler;
-
-public class MockStatusHandler implements IStatusHandler {
-
- private IStatus status;
-
- public void displayStatus(String title, IStatus status) {
- this.status = status;
- }
-
- public void fail(IStatus status, boolean informUser) {
- this.status = status;
- }
-
- public void assertNoStatus() {
- TestCase.assertNull("Unexpected error reported through StatusHandler", status);
- }
-
-}
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 471400bbe..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockTaskListFactory.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.connector;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskListFactory;
-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(AbstractTask task) {
- return task instanceof MockRepositoryTask;
- }
-
- @Override
- public boolean canCreate(AbstractRepositoryQuery query) {
- return query instanceof MockRepositoryQuery;
- }
-
- @Override
- public AbstractTask createTask(String repositoryUrl, String taskId, String summary, Element element) {
- MockRepositoryTask task = new MockRepositoryTask(repositoryUrl, taskId, summary);
- return task;
- }
-
- @Override
- public String getTaskElementName() {
- return "Mock" + AbstractTaskListFactory.KEY_TASK;
- }
-
- @Override
- public String getQueryElementName(AbstractRepositoryQuery query) {
- return QUERY_ELEMENT_NAME;
- }
-
- @Override
- public AbstractRepositoryQuery 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/web/NamedPatternTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/web/NamedPatternTest.java
deleted file mode 100644
index 051f1d3eb..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 org.eclipse.mylyn.internal.web.tasks.NamedPattern;
-
-import junit.framework.TestCase;
-
-/**
- * @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/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 45ae01854..000000000
--- a/org.eclipse.mylyn.tasks.ui/.classpath
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
- <accessrules>
- <accessrule kind="accessible" pattern="**/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/.project b/org.eclipse.mylyn.tasks.ui/.project
deleted file mode 100644
index ca92196b2..000000000
--- a/org.eclipse.mylyn.tasks.ui/.project
+++ /dev/null
@@ -1,28 +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>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
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 888de1277..000000000
--- a/org.eclipse.mylyn.tasks.ui/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,316 +0,0 @@
-#Sun Jun 24 11:52:58 EDT 2007
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.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=disabled
-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.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.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
-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=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-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.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.5
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=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_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 \ No newline at end of file
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 1e4caec9f..000000000
--- a/org.eclipse.mylyn.tasks.ui/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,6 +0,0 @@
-#Mon Jul 09 18:11:45 PDT 2007
-eclipse.preferences.version=1
-formatter_profile=_Mylar based on Eclipse [built-in]
-formatter_settings_version=11
-internal.default.compliance=default
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return the ${bare_field_name}\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} the ${bare_field_name} to set\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\r\n * \r\n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author ${user}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*******************************************************************************\r\n * Copyright (c) 2004, 2007 Mylyn project committers and others.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n *******************************************************************************/\r\n\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ignore\r\n${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ignore</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template></templates>
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.mylar.tasklist.prefs b/org.eclipse.mylyn.tasks.ui/.settings/org.eclipse.mylar.tasklist.prefs
deleted file mode 100644
index a6cf96a98..000000000
--- a/org.eclipse.mylyn.tasks.ui/.settings/org.eclipse.mylar.tasklist.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Fri Oct 20 16:54:30 PDT 2006
-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.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 769b229ff..000000000
--- a/org.eclipse.mylyn.tasks.ui/.settings/org.eclipse.pde.prefs
+++ /dev/null
@@ -1,12 +0,0 @@
-#Thu Nov 03 15:45:55 PST 2005
-compilers.p.deprecated=2
-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-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 95b104c69..000000000
--- a/org.eclipse.mylyn.tasks.ui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,47 +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: 2.1.0.v20070924-2200
-Bundle-Activator: org.eclipse.mylyn.tasks.ui.TasksUiPlugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.core.expressions,
- org.eclipse.ui.forms,
- org.eclipse.jface.text,
- org.eclipse.mylyn.context.core,
- org.eclipse.update.core,
- org.eclipse.ui.browser,
- org.eclipse.ui.editors,
- org.eclipse.ui.views,
- org.eclipse.ui.workbench.texteditor,
- org.eclipse.mylyn.monitor.core,
- org.eclipse.mylyn.tasks.core,
- org.eclipse.mylyn.monitor.ui,
- org.eclipse.core.resources,
- org.eclipse.ui.ide,
- org.eclipse.search,
- org.eclipse.mylyn,
- org.eclipse.ui.net,
- org.eclipse.mylyn.web.core,
- org.eclipse.core.net
-Eclipse-AutoStart: true
-Bundle-Vendor: Eclipse.org
-Export-Package: org.eclipse.mylyn.internal.tasks.ui,
- org.eclipse.mylyn.internal.tasks.ui.actions,
- org.eclipse.mylyn.internal.tasks.ui.commands,
- org.eclipse.mylyn.internal.tasks.ui.dialogs,
- org.eclipse.mylyn.internal.tasks.ui.editors,
- org.eclipse.mylyn.internal.tasks.ui.planner,
- org.eclipse.mylyn.internal.tasks.ui.preferences,
- org.eclipse.mylyn.internal.tasks.ui.properties,
- org.eclipse.mylyn.internal.tasks.ui.search,
- org.eclipse.mylyn.internal.tasks.ui.util,
- org.eclipse.mylyn.internal.tasks.ui.views,
- org.eclipse.mylyn.internal.tasks.ui.wizards,
- org.eclipse.mylyn.internal.tasks.ui.workingsets,
- org.eclipse.mylyn.tasks.ui,
- org.eclipse.mylyn.tasks.ui.editors,
- org.eclipse.mylyn.tasks.ui.search,
- 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 c832f729d..000000000
--- a/org.eclipse.mylyn.tasks.ui/build.properties
+++ /dev/null
@@ -1,23 +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 = plugin.xml,\
- icons/,\
- META-INF/,\
- about.html,\
- schema/,\
- doc/,\
- .
-src.includes = icons/,\
- plugin.xml,\
- src/,\
- META-INF/,\
- schema/,\
- about.html,\
- doc/
-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/elcl16/blank.gif b/org.eclipse.mylyn.tasks.ui/icons/elcl16/blank.gif
deleted file mode 100644
index 45b759436..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/elcl16/blank.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/elcl16/clearDot.gif b/org.eclipse.mylyn.tasks.ui/icons/elcl16/clearDot.gif
deleted file mode 100644
index 35d42e808..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/elcl16/clearDot.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/elcl16/collapseall.png b/org.eclipse.mylyn.tasks.ui/icons/elcl16/collapseall.png
deleted file mode 100644
index 611a8c5c1..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/elcl16/collapseall.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/elcl16/delete.gif b/org.eclipse.mylyn.tasks.ui/icons/elcl16/delete.gif
deleted file mode 100644
index b6922ac11..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/elcl16/delete.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/elcl16/expandall.gif b/org.eclipse.mylyn.tasks.ui/icons/elcl16/expandall.gif
deleted file mode 100644
index 0205b2917..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/elcl16/expandall.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/elcl16/filter-archive.gif b/org.eclipse.mylyn.tasks.ui/icons/elcl16/filter-archive.gif
deleted file mode 100644
index 8a1fd4734..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/elcl16/filter-archive.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/elcl16/filter-complete.gif b/org.eclipse.mylyn.tasks.ui/icons/elcl16/filter-complete.gif
deleted file mode 100644
index ef1c1b332..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/elcl16/filter-complete.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/elcl16/filter-priority.gif b/org.eclipse.mylyn.tasks.ui/icons/elcl16/filter-priority.gif
deleted file mode 100644
index 16f565239..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/elcl16/filter-priority.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/elcl16/refresh-small.gif b/org.eclipse.mylyn.tasks.ui/icons/elcl16/refresh-small.gif
deleted file mode 100644
index 284be870c..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/elcl16/refresh-small.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/elcl16/refresh.gif b/org.eclipse.mylyn.tasks.ui/icons/elcl16/refresh.gif
deleted file mode 100644
index 634306d4c..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/elcl16/refresh.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/elcl16/remove.gif b/org.eclipse.mylyn.tasks.ui/icons/elcl16/remove.gif
deleted file mode 100644
index 2cd9c5444..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/elcl16/remove.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/elcl16/reply.gif b/org.eclipse.mylyn.tasks.ui/icons/elcl16/reply.gif
deleted file mode 100644
index f795f1e85..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/elcl16/reply.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/elcl16/task-search.gif b/org.eclipse.mylyn.tasks.ui/icons/elcl16/task-search.gif
deleted file mode 100644
index caa4b8510..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/elcl16/task-search.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/elcl16/warning.gif b/org.eclipse.mylyn.tasks.ui/icons/elcl16/warning.gif
deleted file mode 100644
index 6e4474856..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/elcl16/warning.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/attachment-patch.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/attachment-patch.gif
deleted file mode 100644
index 17482b753..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/attachment-patch.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-fit.png b/org.eclipse.mylyn.tasks.ui/icons/etool16/capture-fit.png
deleted file mode 100644
index adbc678cd..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/capture-fit.png
+++ /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/capture-screen.png b/org.eclipse.mylyn.tasks.ui/icons/etool16/capture-screen.png
deleted file mode 100644
index cb3e252d0..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/capture-screen.png
+++ /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/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/copy.png b/org.eclipse.mylyn.tasks.ui/icons/etool16/copy.png
deleted file mode 100644
index bb5451c36..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/copy.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/find-clear-disabled.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/find-clear-disabled.gif
deleted file mode 100644
index 7df744959..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/find-clear-disabled.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/find-clear.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/find-clear.gif
deleted file mode 100644
index b8c55de04..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/find-clear.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/go-into.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/go-into.gif
deleted file mode 100644
index 98d316dd0..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/go-into.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/go-up.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/go-up.gif
deleted file mode 100644
index 73e336e5a..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/go-up.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/link-editor.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/link-editor.gif
deleted file mode 100644
index 0061df842..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/link-editor.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-browser.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/open-browser.gif
deleted file mode 100644
index b09bc8b1f..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/open-browser.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/overlay-repository.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/overlay-repository.gif
deleted file mode 100644
index 0ce0f9f4b..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/overlay-repository.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/overlay-web.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/overlay-web.gif
deleted file mode 100644
index b168c1c0e..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/overlay-web.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/person-me-narrow.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/person-me-narrow.gif
deleted file mode 100644
index 268540fff..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/person-me-narrow.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/person-me.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/person-me.gif
deleted file mode 100644
index fa074fb83..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/person-me.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/person-narrow.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/person-narrow.gif
deleted file mode 100644
index 9c0c4bf8c..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/person-narrow.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/presentation.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/presentation.gif
deleted file mode 100644
index db8f21f3c..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/presentation.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.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/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/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-items.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/task-items.gif
deleted file mode 100644
index 946c6e694..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/task-items.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-completed.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/task-repository-completed.gif
deleted file mode 100644
index c67f34739..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/task-repository-completed.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-notes.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/task-repository-notes.gif
deleted file mode 100644
index 77b112185..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/task-repository-notes.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-server.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/task-server.gif
deleted file mode 100644
index 71b1baba1..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/task-server.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/toolbar-arrow-down.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/toolbar-arrow-down.gif
deleted file mode 100644
index 32107ac88..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/toolbar-arrow-down.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/toolbar-arrow-right.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/toolbar-arrow-right.gif
deleted file mode 100644
index fc8b2e49c..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/toolbar-arrow-right.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/etool16/view-filter.gif b/org.eclipse.mylyn.tasks.ui/icons/etool16/view-filter.gif
deleted file mode 100644
index a5317bd79..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/etool16/view-filter.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/focus-view.gif b/org.eclipse.mylyn.tasks.ui/icons/eview16/focus-view.gif
deleted file mode 100644
index bf8439c52..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/eview16/focus-view.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/notification-close.gif b/org.eclipse.mylyn.tasks.ui/icons/eview16/notification-close.gif
deleted file mode 100644
index 17b757358..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/eview16/notification-close.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-completed.gif b/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-completed.gif
deleted file mode 100644
index 755f70da7..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-completed.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-conflicting.gif b/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-conflicting.gif
deleted file mode 100644
index d13a35640..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-conflicting.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/overlay-has-context.gif b/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-has-context.gif
deleted file mode 100644
index c53adcf7f..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-has-context.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-has-due.gif b/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-has-due.gif
deleted file mode 100644
index a0bb744fb..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-has-due.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-incoming-multiple.gif b/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-incoming-multiple.gif
deleted file mode 100644
index db812dfce..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-incoming-multiple.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-incoming-new.gif b/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-incoming-new.gif
deleted file mode 100644
index fc5592ced..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-incoming-new.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-incoming.gif b/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-incoming.gif
deleted file mode 100644
index e95e894ca..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-incoming.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-offline.gif b/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-offline.gif
deleted file mode 100644
index 877069064..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-offline.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-outgoing.gif b/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-outgoing.gif
deleted file mode 100644
index 9fe408147..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-outgoing.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-overdue.gif b/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-overdue.gif
deleted file mode 100644
index 15b07bbff..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-overdue.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-repository-context.gif b/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-repository-context.gif
deleted file mode 100644
index 9e878c2dc..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-repository-context.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-repository.gif b/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-repository.gif
deleted file mode 100644
index 1db6015cc..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-repository.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-synch-incoming-new.gif b/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-synch-incoming-new.gif
deleted file mode 100644
index a9dc04ed4..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-synch-incoming-new.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-synch-incoming.gif b/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-synch-incoming.gif
deleted file mode 100644
index ab5483dd1..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-synch-incoming.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-synch-outgoing.gif b/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-synch-outgoing.gif
deleted file mode 100644
index 5f1c76ade..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/eview16/overlay-synch-outgoing.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/priority-1.gif b/org.eclipse.mylyn.tasks.ui/icons/eview16/priority-1.gif
deleted file mode 100644
index f256fa543..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/eview16/priority-1.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/priority-2.gif b/org.eclipse.mylyn.tasks.ui/icons/eview16/priority-2.gif
deleted file mode 100644
index 4e4b55f2c..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/eview16/priority-2.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/priority-3.gif b/org.eclipse.mylyn.tasks.ui/icons/eview16/priority-3.gif
deleted file mode 100644
index bc468f71e..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/eview16/priority-3.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/priority-4.gif b/org.eclipse.mylyn.tasks.ui/icons/eview16/priority-4.gif
deleted file mode 100644
index 2bd543a6b..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/eview16/priority-4.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/priority-5.gif b/org.eclipse.mylyn.tasks.ui/icons/eview16/priority-5.gif
deleted file mode 100644
index 30b6322b1..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/eview16/priority-5.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/progress/1.png b/org.eclipse.mylyn.tasks.ui/icons/eview16/progress/1.png
deleted file mode 100644
index ec9b0756a..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/eview16/progress/1.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/progress/2.png b/org.eclipse.mylyn.tasks.ui/icons/eview16/progress/2.png
deleted file mode 100644
index ffb9c8488..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/eview16/progress/2.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/progress/3.png b/org.eclipse.mylyn.tasks.ui/icons/eview16/progress/3.png
deleted file mode 100644
index d78a2582e..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/eview16/progress/3.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/progress/4.png b/org.eclipse.mylyn.tasks.ui/icons/eview16/progress/4.png
deleted file mode 100644
index 2b0cd62fb..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/eview16/progress/4.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/progress/5.png b/org.eclipse.mylyn.tasks.ui/icons/eview16/progress/5.png
deleted file mode 100644
index f5b8cc10a..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/eview16/progress/5.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/progress/6.png b/org.eclipse.mylyn.tasks.ui/icons/eview16/progress/6.png
deleted file mode 100644
index bca79f437..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/eview16/progress/6.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/progress/7.png b/org.eclipse.mylyn.tasks.ui/icons/eview16/progress/7.png
deleted file mode 100644
index 53125db0f..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/eview16/progress/7.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/progress/8.png b/org.eclipse.mylyn.tasks.ui/icons/eview16/progress/8.png
deleted file mode 100644
index 02bb604dc..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/eview16/progress/8.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/status-conflict.gif b/org.eclipse.mylyn.tasks.ui/icons/eview16/status-conflict.gif
deleted file mode 100644
index 1e364acb5..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/eview16/status-conflict.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/status-normal.gif b/org.eclipse.mylyn.tasks.ui/icons/eview16/status-normal.gif
deleted file mode 100644
index 45b759436..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/eview16/status-normal.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/status-server-context.gif b/org.eclipse.mylyn.tasks.ui/icons/eview16/status-server-context.gif
deleted file mode 100644
index 7323d9601..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/eview16/status-server-context.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/task-activity.gif b/org.eclipse.mylyn.tasks.ui/icons/eview16/task-activity.gif
deleted file mode 100644
index 44ed28d04..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/eview16/task-activity.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/task-bug.gif b/org.eclipse.mylyn.tasks.ui/icons/eview16/task-bug.gif
deleted file mode 100644
index 99e9e98f2..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/eview16/task-bug.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/find.gif b/org.eclipse.mylyn.tasks.ui/icons/find.gif
deleted file mode 100644
index 2b645a88f..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/find.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/browser-small.gif b/org.eclipse.mylyn.tasks.ui/icons/obj16/browser-small.gif
deleted file mode 100644
index d4b0e39c2..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/obj16/browser-small.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/obj16/calendar-small.gif b/org.eclipse.mylyn.tasks.ui/icons/obj16/calendar-small.gif
deleted file mode 100644
index d9629a1a9..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/obj16/calendar-small.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-blank.gif b/org.eclipse.mylyn.tasks.ui/icons/ovr16/overlay-blank.gif
deleted file mode 100644
index 27e2998d8..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/ovr16/overlay-blank.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/ovr16/overlay-complete.gif b/org.eclipse.mylyn.tasks.ui/icons/ovr16/overlay-complete.gif
deleted file mode 100644
index 755f70da7..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/ovr16/overlay-complete.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/ovr16/overlay-warning.gif b/org.eclipse.mylyn.tasks.ui/icons/ovr16/overlay-warning.gif
deleted file mode 100644
index 4a63dd7dd..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/ovr16/overlay-warning.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/ovr16/solid-white.gif b/org.eclipse.mylyn.tasks.ui/icons/ovr16/solid-white.gif
deleted file mode 100644
index 521055c5b..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/ovr16/solid-white.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/wizban/banner-export.gif b/org.eclipse.mylyn.tasks.ui/icons/wizban/banner-export.gif
deleted file mode 100644
index a22549f57..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/wizban/banner-export.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/wizban/banner-import.gif b/org.eclipse.mylyn.tasks.ui/icons/wizban/banner-import.gif
deleted file mode 100644
index 39bc01ad1..000000000
--- a/org.eclipse.mylyn.tasks.ui/icons/wizban/banner-import.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/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 fcf911e36..000000000
--- a/org.eclipse.mylyn.tasks.ui/plugin.xml
+++ /dev/null
@@ -1,994 +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.WorkspaceAwareContextStore">
- </contextStore>
- </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="Task List"/>
- <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">
- </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/eview16/task-list.gif"
- 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/eview16/task-list.gif"
- 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.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.task">
- </newWizardShortcut>
- <newWizardShortcut
- id="org.eclipse.mylyn.tasks.ui.wizards.new.task">
- </newWizardShortcut>
- <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.task">
- </newWizardShortcut>
- <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.task">
- </newWizardShortcut>
- <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.tigris.subversion.subclipse.ui.svnPerspective">
- <view
- id="org.eclipse.mylyn.tasks.ui.views.repositories"
- minimized="false"
- ratio="0.7"
- relationship="bottom"
- relative="org.tigris.subversion.subclipse.ui.repository.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/elcl16/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.tasks.core.AbstractRepositoryQuery"/>
- <objectClass name="org.eclipse.mylyn.tasks.core.AbstractTask"/>
- <objectClass name="org.eclipse.mylyn.tasks.core.AbstractTaskContainer"/>
- </or>
- </enablement>
- </action>
-
- <action
- class="org.eclipse.mylyn.internal.tasks.ui.actions.QueryCloneAction"
- definitionId="org.eclipse.ui.query.clone"
- enablesFor="org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery"
- id="org.eclipse.mylyn.tasks.ui.actions.clone.query"
- label="Clone Query..."
- menubarPath="repository"
- tooltip="Clone Repository Query">
- </action>
-
- <action
- class="org.eclipse.mylyn.internal.tasks.ui.actions.QueryExportAction"
- definitionId="org.eclipse.ui.query.export"
- enablesFor="org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery"
- id="org.eclipse.mylyn.tasks.ui.actions.export.query"
- label="Export Query..."
- menubarPath="repository"
- tooltip="Export Repository Query">
- </action>
-
- <action
- class="org.eclipse.mylyn.internal.tasks.ui.actions.QueryImportAction"
- definitionId="org.eclipse.ui.query.import"
- enablesFor="*"
- icon="icons/etool16/import.gif"
- id="org.eclipse.mylyn.tasks.ui.actions.import.query"
- label="Import Query..."
- menubarPath="repository"
- tooltip="Import Repository Query">
- </action>
-
- <action
- class="org.eclipse.mylyn.internal.tasks.ui.actions.TaskExportAction"
- definitionId="org.eclipse.ui.task.export"
- enablesFor="org.eclipse.mylyn.tasks.core.AbstractTask"
- id="org.eclipse.mylyn.tasks.ui.actions.export.task"
- label="Export Task..."
- menubarPath="repository"
- tooltip="Export Task">
- </action>
-
- <action
- class="org.eclipse.mylyn.internal.tasks.ui.actions.TaskImportAction"
- definitionId="org.eclipse.ui.task.import"
- enablesFor="*"
- icon="icons/etool16/import.gif"
- id="org.eclipse.mylyn.tasks.ui.actions.import.task"
- label="Import Task..."
- menubarPath="repository"
- 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"
- 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>
- <menu
- id="org.eclipse.mylyn.tasks.ui.menu.new"
- label="New"
- path="new">
- <separator
- name="local">
- </separator>
- <separator
- name="repository">
- </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.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>
- <objectState name="hasRepository" value="true"/>
- </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>
- <objectState name="supportQuery" value="true"/>
- </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>
- <objectState name="supportNewTask" value="true"/>
- </enablement>
- </action>
- </viewerContribution>
-
- </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.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.keywords">
- <keyword
- label="mylyn tasks"
- id="org.eclipse.mylyn.tasks.ui.keywords"/>
- </extension>
-
- <extension point="org.eclipse.ui.bindings">
- <key
- sequence="M2+M3+Q K"
- contextId="org.eclipse.ui.contexts.window"
- 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>
- </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.overdue"
- isEditable="true"
- label="Tasks - Overdue"
- value="198,4,38">
- <description>
- Text color for overdue tasks.
- </description>
- </colorDefinition>
- <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.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"
- 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.TaskStatusMenuContributor"
- 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.TaskUrlHyperlinkDetector"
- id="org.eclipse.mylyn.tasks.ui.hyperlink.detector.url"/>
-
- </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"/>
- </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"/>
- <command id="org.eclipse.mylyn.ui.context.capture.pause.command"
- name="Pause Capturing Context Command"
- defaultHandler="org.eclipse.mylyn.internal.tasks.ui.ContextCapturePauseHandler"/>
- </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"
- pulldown="true"
- 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.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.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/elcl16/task-search.gif"
- id="org.eclipse.mylyn.tasks.ui.search.page"
- label="Task Search"
- tabPosition="999"/>
- </extension>
- <extension
- point="org.eclipse.ui.propertyPages">
- <page
- adaptable="true"
- class="org.eclipse.mylyn.internal.tasks.ui.properties.ProjectTaskRepositoryPage"
- id="org.eclipse.mylyn.tasks.ui.properties.pages.project.repository"
- name="Task Repository"
- objectClass="org.eclipse.core.resources.IProject"/>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <category
- id="org.eclipse.mylyn.tasks.ui.commands"
- name="Task Repositories">
- </category>
- <command
- category="org.eclipse.mylyn.tasks.ui.commands"
- 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.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.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>
- </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"
- type="local"
- userManaged="false"/>
-
- <connectorUi
- brandingIcon="icons/etool16/person.gif"
- class="org.eclipse.mylyn.internal.tasks.ui.LocalTaskConnectorUi"
- name="Local Repository Ui"
- overlayIcon="icons/ovr16/overlay-local.gif"/>
-
- <taskListFactory
- class="org.eclipse.mylyn.internal.tasks.core.LocalTaskListFactory"
- id="org.eclipse.mylyn.tasks.ui.local.factory"/>
- </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>
-
-</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 3d205f6af..000000000
--- a/org.eclipse.mylyn.tasks.ui/schema/actions.exsd
+++ /dev/null
@@ -1,129 +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="providers" name="Task UI Providers"/>
- </appInfo>
- <documentation>
- Currently only a work-around for creating a dynamic popupo menu.
- </documentation>
- </annotation>
-
- <element name="extension">
- <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>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
-</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 ca51ab8a8..000000000
--- a/org.eclipse.mylyn.tasks.ui/schema/editors.exsd
+++ /dev/null
@@ -1,135 +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="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="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="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>
-
- <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/presentations.exsd b/org.eclipse.mylyn.tasks.ui/schema/presentations.exsd
deleted file mode 100644
index 665210b32..000000000
--- a/org.eclipse.mylyn.tasks.ui/schema/presentations.exsd
+++ /dev/null
@@ -1,128 +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="presentations" name="presentations"/>
- </appInfo>
- <documentation>
- [Enter description of this extension point.]
- </documentation>
- </annotation>
-
- <element name="extension">
- <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 67b119c01..000000000
--- a/org.eclipse.mylyn.tasks.ui/schema/repositories.exsd
+++ /dev/null
@@ -1,246 +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="repositories" name="Repositories"/>
- </appInfo>
- <documentation>
- [Enter description of this extension point.]
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <documentation>
- (no description available)
- </documentation>
- </annotation>
- <complexType>
- <sequence>
- <element ref="connectorCore"/>
- <element ref="taskListFactory"/>
- <element ref="connectorUi" 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"/>
- </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="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.provisional.tasklist.AbstractRepositoryClient"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="type" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="userManaged" type="boolean">
- <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.AbstractConnectorUi"/>
- </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>
- <attribute name="customNotifications" type="boolean">
- <annotation>
- <documentation>
- Allows a connector to turn off notifications for incoming and query hits for their task types.
- </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/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 68d63cf7d..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/AbstractTaskListFilter.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;
-
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-
-/**
- * Custom filters are used so that the "Find:" filter can 'see through' any filters that may have been applied.
- *
- * @author Mik Kersten
- */
-public abstract class AbstractTaskListFilter {
-
- public abstract boolean select(Object parent, Object element);
-
- public boolean shouldAlwaysShow(Object parent, AbstractTask task, boolean exposeSubTasks) {
- return task.isActive();
- }
-}
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 66a0240bb..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/AddExistingTaskJob.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;
-
-import java.text.MessageFormat;
-import java.util.Calendar;
-
-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.TaskActivityUtil;
-import org.eclipse.mylyn.internal.tasks.core.TaskCategory;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskCategory;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-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 TaskRepository repository;
-
- /**
- * Identifies a existing task on the repository
- */
- private 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 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) {
- final AbstractRepositoryConnector connector = TasksUiPlugin.getRepositoryManager().getRepositoryConnector(
- repository.getConnectorKind());
- try {
- final AbstractTask newTask = connector.createTaskFromExistingId(repository, taskId, monitor);
- if (newTask != null) {
- Calendar newSchedule = Calendar.getInstance();
- TaskActivityUtil.snapEndOfWorkDay(newSchedule);
- TasksUiPlugin.getTaskActivityManager().setScheduledFor(newTask, newSchedule.getTime());
-
- TasksUiUtil.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;
- } else {
- category = TasksUiPlugin.getTaskListManager().getTaskList().getDefaultCategory();
- }
- }
- TasksUiPlugin.getTaskListManager().getTaskList().moveToContainer(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) {
- StatusHandler.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/CategorizedPresentation.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/CategorizedPresentation.java
deleted file mode 100644
index 1a39e5a2c..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 708ce7253..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 (int i = 0; i < fAllowedStrings.length; i++) {
- combo.add(fAllowedStrings[i]);
- }
- 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 (int i = 0; i < fAllowedStrings.length; i++) {
- max = Math.max(max, fAllowedStrings[i].length());
- }
- return max;
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/CompositeContainerImageDescriptor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/CompositeContainerImageDescriptor.java
deleted file mode 100644
index 293647a2b..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/CompositeContainerImageDescriptor.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.jface.resource.CompositeImageDescriptor;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.graphics.ImageData;
-import org.eclipse.swt.graphics.Point;
-
-/**
- * @author Mik Kersten
- */
-public class CompositeContainerImageDescriptor extends CompositeImageDescriptor {
-
- private ImageData base;
-
- private ImageData overlay;
-
- protected Point size;
-
- public CompositeContainerImageDescriptor(ImageDescriptor icon, ImageDescriptor overlay, boolean wide) {
- this.base = getImageData(icon);
- if (overlay != null) {
- this.overlay = getImageData(overlay);
- }
- int width = CompositeTaskImageDescriptor.WIDTH_ICON;
- if (wide) {
- width += CompositeTaskImageDescriptor.OFFSET_DECORATION;
- }
- this.size = new Point(width, base.height);
- }
-
- @Override
- protected void drawCompositeImage(int width, int height) {
- drawImage(base, 0, 0);
- if (overlay != null) {
- drawImage(overlay, base.width + 2, 0);
- }
- }
-
- private ImageData getImageData(ImageDescriptor descriptor) {
- ImageData data = descriptor.getImageData();
- // see bug 51965: getImageData can return null
- if (data == null) {
- data = DEFAULT_IMAGE_DATA;
- }
- return data;
- }
-
- @Override
- protected Point getSize() {
- return new Point(size.x, size.y);
- }
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/CompositeSynchImageDescriptor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/CompositeSynchImageDescriptor.java
deleted file mode 100644
index b389f857c..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/CompositeSynchImageDescriptor.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;
-
-import org.eclipse.jface.resource.CompositeImageDescriptor;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.graphics.ImageData;
-import org.eclipse.swt.graphics.Point;
-
-/**
- * @author Mik Kersten
- */
-public class CompositeSynchImageDescriptor extends CompositeImageDescriptor {
-
- private ImageData base;
-
- private ImageData background;
-
- private boolean fillBackground;
-
- protected Point size;
-
- static int WIDTH;
-
- public CompositeSynchImageDescriptor(ImageDescriptor icon, boolean fillBackground) {
- this.base = getImageData(icon);
- this.background = getImageData(TasksUiImages.OVERLAY_SOLID_WHITE);
- this.size = new Point(background.width, background.height);
- this.fillBackground = fillBackground;
- }
-
- @Override
- protected void drawCompositeImage(int width, int height) {
- if (fillBackground) {
- drawImage(background, 0, 0);
- }
- drawImage(base, 3, 2);
- }
-
- private ImageData getImageData(ImageDescriptor descriptor) {
- ImageData data = descriptor.getImageData();
- // see bug 51965: getImageData can return null
- if (data == null) {
- data = DEFAULT_IMAGE_DATA;
- }
- return data;
- }
-
- @Override
- protected Point getSize() {
- return new Point(size.x, size.y);
- }
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/CompositeTaskImageDescriptor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/CompositeTaskImageDescriptor.java
deleted file mode 100644
index 834069a51..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/CompositeTaskImageDescriptor.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;
-
-import org.eclipse.jface.resource.CompositeImageDescriptor;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.graphics.ImageData;
-import org.eclipse.swt.graphics.Point;
-
-/**
- * @author Mik Kersten
- */
-public class CompositeTaskImageDescriptor extends CompositeImageDescriptor {
-
- private ImageData base;
-
- private ImageData kind;
-
- protected Point size;
-
- public static final int OFFSET_DECORATION = 6;
-
- static final int WIDTH_ICON = 16;
-
- private int offset = 0;
-
- public CompositeTaskImageDescriptor(ImageDescriptor icon, ImageDescriptor overlayKind, boolean wide) {
- this.base = getImageData(icon);
- if (overlayKind != null) {
- this.kind = getImageData(overlayKind);
- }
- int width = WIDTH_ICON;
- if (wide) {
- width += OFFSET_DECORATION;
- offset = OFFSET_DECORATION;
- }
- this.size = new Point(width, base.height);
- }
-
- @Override
- protected void drawCompositeImage(int width, int height) {
- drawImage(base, offset, 1);
- if (kind != null) {
- drawImage(kind, offset + 5, 6);
- }
- }
-
- private ImageData getImageData(ImageDescriptor descriptor) {
- ImageData data = descriptor.getImageData();
- // see bug 51965: getImageData can return null
- if (data == null) {
- data = DEFAULT_IMAGE_DATA;
- }
- return data;
- }
-
- @Override
- protected Point getSize() {
- return new Point(size.x, size.y);
- }
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ContextCapturePauseHandler.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ContextCapturePauseHandler.java
deleted file mode 100644
index df1b072e2..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ContextCapturePauseHandler.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;
-
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.mylyn.context.core.ContextCorePlugin;
-import org.eclipse.mylyn.context.core.IInteractionContext;
-import org.eclipse.mylyn.context.core.IInteractionContextListener;
-import org.eclipse.mylyn.context.core.IInteractionElement;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.commands.ICommandService;
-import org.eclipse.ui.commands.IElementUpdater;
-import org.eclipse.ui.menus.UIElement;
-
-/**
- * @author Eugene Kuleshov
- */
-public class ContextCapturePauseHandler extends AbstractHandler //
- implements IElementUpdater, IInteractionContextListener {
-
- public ContextCapturePauseHandler() {
- ContextCorePlugin.getContextManager().addListener(this);
- }
-
- public void dispose() {
- ContextCorePlugin.getContextManager().removeListener(this);
- super.dispose();
- }
-
- public Object execute(ExecutionEvent e) throws ExecutionException {
- if (ContextCorePlugin.getContextManager().isContextCapturePaused()) {
- resume();
- } else {
- pause();
- }
- return null;
- }
-
- public void resume() {
- ContextCorePlugin.getContextManager().setContextCapturePaused(false);
- if (TaskListView.getFromActivePerspective() != null) {
- TaskListView.getFromActivePerspective().indicatePaused(false);
- }
- refreshCommands();
- }
-
- public void pause() {
- ContextCorePlugin.getContextManager().setContextCapturePaused(true);
- TaskListView.getFromActivePerspective().indicatePaused(true);
-
- refreshCommands();
- }
-
- private void refreshCommands() {
- ICommandService service = (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class);
- if (service != null) {
- service.refreshElements("org.eclipse.mylyn.tasks.ui.command.previousTask", null);
- service.refreshElements("org.eclipse.mylyn.ui.context.capture.pause.command", null);
- }
- }
-
- // IElementUpdater
-
- @SuppressWarnings("unchecked")
- public void updateElement(UIElement element, Map parameters) {
- element.setChecked(ContextCorePlugin.getContextManager().isContextCapturePaused());
- }
-
- // IInteractionContextListener
-
- public void contextActivated(IInteractionContext context) {
- resume();
- }
-
- public void contextDeactivated(IInteractionContext context) {
- resume();
- }
-
- public void contextCleared(IInteractionContext context) {
- // ignore
- }
-
- public void elementDeleted(IInteractionElement element) {
- // ignore
- }
-
- public void interestChanged(List<IInteractionElement> elements) {
- // ignore
- }
-
- public void landmarkAdded(IInteractionElement element) {
- // ignore
- }
-
- public void landmarkRemoved(IInteractionElement element) {
- // ignore
- }
-
- public void relationsChanged(IInteractionElement element) {
- // ignore
- }
-
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ContextUiUtil.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ContextUiUtil.java
deleted file mode 100644
index d875222b7..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ContextUiUtil.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;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.IStatusLineManager;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractAttachmentHandler;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.RepositoryAttachment;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.AbstractTask.RepositoryTaskSyncState;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.ui.IViewSite;
-import org.eclipse.ui.IWorkbenchSite;
-import org.eclipse.ui.PlatformUI;
-
-/**
- *
- *
- * @author Steffen Pingel
- */
-public class ContextUiUtil {
-
- public static boolean downloadContext(final AbstractTask task, final RepositoryAttachment attachment,
- final IRunnableContext context) {
- final AbstractRepositoryConnector connector = TasksUiPlugin.getRepositoryManager().getRepositoryConnector(task);
- final TaskRepository repository = TasksUiPlugin.getRepositoryManager().getRepository(
- attachment.getRepositoryUrl());
- final String directory = TasksUiPlugin.getDefault().getDataDirectory();
- try {
- if (task.isActive()) {
- TasksUiPlugin.getTaskListManager().deactivateTask(task);
- }
-
- final boolean[] result = new boolean[1];
- IRunnableWithProgress runnable = new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- if (connector.getAttachmentHandler() != null) {
- result[0] = connector.getAttachmentHandler().retrieveContext(repository, task, attachment,
- directory, monitor);
- } else {
- result[0] = false;
- }
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- }
- }
- };
- context.run(true, true, runnable);
-
- if (!result[0]) {
- MessageDialog.openInformation(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
- ITasksUiConstants.TITLE_DIALOG, AbstractAttachmentHandler.MESSAGE_ATTACHMENTS_NOT_SUPPORTED
- + connector.getLabel());
- } else {
- TasksUiPlugin.getTaskListManager().getTaskList().notifyTaskChanged(task, false);
- TasksUiPlugin.getTaskListManager().activateTask(task);
- }
- } catch (InvocationTargetException e) {
- if (e.getCause() instanceof CoreException) {
- StatusHandler.displayStatus(ITasksUiConstants.TITLE_DIALOG, ((CoreException) e.getCause()).getStatus());
- } else {
- StatusHandler.fail(e, "Unexpected error while attaching context", true);
- }
- return false;
- } catch (InterruptedException ignored) {
- // canceled
- return false;
- }
- return true;
- }
-
- public static boolean uploadContext(final TaskRepository repository, final AbstractTask task, final String comment,
- final IRunnableContext context) {
- final AbstractRepositoryConnector connector = TasksUiPlugin.getRepositoryManager().getRepositoryConnector(
- repository.getConnectorKind());
- try {
- final boolean[] result = new boolean[1];
- IRunnableWithProgress runnable = new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- if (connector.getAttachmentHandler() != null) {
- result[0] = connector.getAttachmentHandler().attachContext(repository, task, comment,
- monitor);
- } else {
- result[0] = false;
- }
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- }
- }
- };
- context.run(true, true, runnable);
-
- if (!result[0]) {
- MessageDialog.openInformation(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
- ITasksUiConstants.TITLE_DIALOG, AbstractAttachmentHandler.MESSAGE_ATTACHMENTS_NOT_SUPPORTED
- + connector.getLabel());
- } else {
- task.setSynchronizationState(RepositoryTaskSyncState.SYNCHRONIZED);
- IWorkbenchSite site = PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow()
- .getActivePage()
- .getActivePart()
- .getSite();
- if (site instanceof IViewSite) {
- IStatusLineManager statusLineManager = ((IViewSite) site).getActionBars().getStatusLineManager();
- statusLineManager.setMessage(TasksUiImages.getImage(TasksUiImages.TASKLIST),
- "Context attached to task: " + task.getSummary());
- TasksUiPlugin.getSynchronizationManager().synchronize(connector, task, true, null);
- }
- }
- } catch (InvocationTargetException e) {
- if (e.getCause() instanceof CoreException) {
- StatusHandler.displayStatus(ITasksUiConstants.TITLE_DIALOG, ((CoreException) e.getCause()).getStatus());
- } else {
- StatusHandler.fail(e, "Unexpected error while attaching context", true);
- }
- return false;
- } catch (InterruptedException ignored) {
- // canceled
- return false;
- }
- return true;
- }
-
-} \ No newline at end of file
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 9545835f3..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.AbstractTaskContainer;
-
-/**
- * @author Mik Kersten
- */
-public interface IDynamicSubMenuContributor {
-
- public abstract MenuManager getSubMenuManager(List<AbstractTaskContainer> 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 f1d1def5e..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.AbstractTask;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @author Mik Kersten
- */
-public interface ITaskHighlighter {
-
- public Color getHighlightColor(AbstractTask task);
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ITaskListNotification.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ITaskListNotification.java
deleted file mode 100644
index b0b1cffb2..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ITaskListNotification.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;
-
-import java.util.Date;
-
-import org.eclipse.swt.graphics.Image;
-
-/**
- * @author Rob Elves
- */
-public interface ITaskListNotification extends Comparable<ITaskListNotification> {
-
- public void openTask();
-
- public String getDescription();
-
- public String getDetails();
-
- public String getLabel();
-
- public Image getNotificationIcon();
-
- public Image getOverlayIcon();
-
- public Date getDate();
-
- public void setDate(Date date);
-
-}
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 cf4017d6f..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ITaskListNotificationProvider.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 java.util.Set;
-
-/**
- * @author Rob Elves
- */
-public interface ITaskListNotificationProvider {
-
- public Set<ITaskListNotification> getNotifications();
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ITasksUiConstants.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ITasksUiConstants.java
deleted file mode 100644
index 5d0e0f50c..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ITasksUiConstants.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;
-
-/**
- * @author Mik Kersten
- */
-public interface ITasksUiConstants {
-
- public static final String TITLE_DIALOG = "Mylyn Information";
-
- public static final String MESSAGE_RESTORE = "Could not read task list. Consider restoring via File -> Import -> Mylyn Task Data";
-
- public static final String URL_HOMEPAGE = "http://eclipse.org/mylyn";
-
- public static final String FILE_EXTENSION = ".xml.zip";
-
- public static final String OLD_TASK_LIST_FILE = "tasklist.xml";
-
- public static final String DEFAULT_BACKUP_FOLDER_NAME = "backup";
-
- public static final String DEFAULT_TASK_LIST_FILE = "tasklist" + FILE_EXTENSION;
-
- public static final String FILENAME_ENCODING = "UTF-8";
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/LocalTaskConnectorUi.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/LocalTaskConnectorUi.java
deleted file mode 100644
index 08ca23971..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/LocalTaskConnectorUi.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.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.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.wizards.AbstractRepositorySettingsPage;
-
-/**
- * @author Rob Elves
- */
-public class LocalTaskConnectorUi extends AbstractRepositoryConnectorUi {
-
- @Override
- public IWizard getNewTaskWizard(TaskRepository taskRepository) {
- return new NewLocalTaskWizard();
- }
-
- @Override
- public IWizard getQueryWizard(TaskRepository repository, AbstractRepositoryQuery queryToEdit) {
- return null;
- }
-
- @Override
- public String getConnectorKind() {
- return LocalRepositoryConnector.REPOSITORY_KIND;
- }
-
- @Override
- public AbstractRepositorySettingsPage getSettingsPage() {
- 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 4f7334918..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/MoveToCategoryMenuContributor.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;
-
-import java.util.ArrayList;
-import java.util.Collections;
-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.mylyn.internal.tasks.ui.actions.NewCategoryAction;
-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.ui.TasksUiPlugin;
-
-/**
- * @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<AbstractTaskContainer> selectedElements) {
- final MenuManager subMenuManager = new MenuManager(LABEL);
-
- //subMenuManager.setVisible(selectedElements.size() > 0 && !(selectedElements.get(0) instanceof AbstractTaskContainer || selectedElements.get(0) instanceof AbstractRepositoryQuery));
-
- subMenuManager.setVisible(selectedElements.size() > 0 && selectedElements.get(0) instanceof AbstractTask);
-
- List<AbstractTaskCategory> categories = new ArrayList<AbstractTaskCategory>(TasksUiPlugin.getTaskListManager()
- .getTaskList()
- .getCategories());
- Collections.sort(categories);
- for (final AbstractTaskCategory category : categories) {
- if (!category.equals(TasksUiPlugin.getTaskListManager().getTaskList().getArchiveContainer())) {
- Action action = new Action() {
- @Override
- public void run() {
- moveToCategory(selectedElements, category);
- }
- };
- String text = handleAcceleratorKeys(category.getSummary());
- action.setText(text);
- action.setImageDescriptor(TasksUiImages.CATEGORY);
- 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<AbstractTaskContainer> selectedElements, AbstractTaskCategory category) {
- for (AbstractTaskContainer element : selectedElements) {
- if (element instanceof AbstractTask) {
- TasksUiPlugin.getTaskListManager().getTaskList().moveToContainer((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 d4b8a0a5c..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/OfflineCachingStorage.java
+++ /dev/null
@@ -1,320 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.Iterator;
-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.jobs.Job;
-import org.eclipse.mylyn.internal.tasks.core.ITaskDataStorage;
-import org.eclipse.mylyn.internal.tasks.core.TaskDataState;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-
-/**
- * Least Recently Used (LRU) cache
- *
- * TODO: Use meta context to make cache more efficient
- *
- * @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 Map<String, Map<String, TaskDataState>> readCache = new ConcurrentHashMap<String, Map<String, TaskDataState>>();
-
- private Map<String, Map<String, TaskDataState>> writeCache = new ConcurrentHashMap<String, Map<String, TaskDataState>>();
-
- private Queue<TaskDataState> lruQueue = new ConcurrentLinkedQueue<TaskDataState>();
-
- private 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(repositoryUrl, id);
- if (result == null) {
- result = retrieveFromStorage(repositoryUrl, id);
- }
- if (result != null) {
- pushRead(result);
- }
- return result;
- }
-
- private TaskDataState retrieveFromCache(String repositoryUrl, String id) {
- Map<String, TaskDataState> idMap = readCache.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 (Iterator<TaskDataState> it = idMap.values().iterator(); it.hasNext();) {
- TaskDataState state = it.next();
- 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.fail(t, "Error saving offline cache", false);
- }
- }
-
- 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 1d1879e81..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/OfflineFileStorage.java
+++ /dev/null
@@ -1,715 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.mylyn.internal.tasks.core.ITaskDataStorage;
-import org.eclipse.mylyn.internal.tasks.core.TaskDataState;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractAttributeFactory;
-import org.eclipse.mylyn.tasks.core.RepositoryAttachment;
-import org.eclipse.mylyn.tasks.core.RepositoryOperation;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskAttribute;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.TaskComment;
-import org.eclipse.mylyn.web.core.XmlUtil;
-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 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.fail(e, "Error retrieving offline data", false);
- } finally {
- try {
- if (lock != null && lock.isValid()) {
- lock.release();
- }
- if (fileInputStream != null) {
- fileInputStream.close();
- }
- } catch (IOException e) {
- StatusHandler.fail(e, "Error closing offline data input stream", false);
- }
- }
-
- 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.fail(e, "Error saving offline data", false);
- } finally {
- try {
- if (lock != null && lock.isValid()) {
- lock.release();
- }
- if (fileOutputStream != null) {
- fileOutputStream.flush();
- fileOutputStream.close();
- }
- } catch (IOException e) {
- StatusHandler.fail(e, "Error closing offline data output stream", false);
- }
- }
-
- }
-
- 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.getId()));
- parent.putString(ATTRIBUTE_TASK_KIND, getCleanText(newTaskData.getTaskKind()));
- parent.putString(ATTRIBUTE_REPOSITORY_URL, getCleanText(newTaskData.getRepositoryUrl()));
- parent.putString(ATTRIBUTE_REPOSITORY_KIND, getCleanText(newTaskData.getRepositoryKind()));
-
- 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 = XmlUtil.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.fail(e, "Error removing offline data: " + repositoryUrl + "-" + id, false);
- }
-
- }
-
- 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 ac1c588b2..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/OpenRepositoryTaskJob.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.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.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.AbstractTaskDataHandler;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractRepositoryTaskEditorInput;
-import org.eclipse.mylyn.tasks.ui.editors.RepositoryTaskEditorInput;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Mik Kersten
- * @author Steffen Pingel
- */
-public class OpenRepositoryTaskJob extends Job {
-
- private String serverUrl;
-
- private IWorkbenchPage page;
-
- private String repositoryKind;
-
- private String taskId;
-
- private String taskUrl;
-
- public OpenRepositoryTaskJob(String repositoryKind, String serverUrl, String taskId, String taskUrl,
- IWorkbenchPage page) {
- super("Opening repository task " + taskId);
-
- this.repositoryKind = repositoryKind;
- this.taskId = taskId;
- this.serverUrl = serverUrl;
- this.taskUrl = taskUrl;
- this.page = page;
- }
-
- @Override
- public IStatus run(IProgressMonitor monitor) {
- monitor.beginTask("Opening Remote Task", 10);
- TaskRepository repository = TasksUiPlugin.getRepositoryManager().getRepository(repositoryKind, serverUrl);
- if (repository == null) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- MessageDialog.openError(null, "Repository Not Found",
- "Could not find repository configuration for " + serverUrl
- + ". \nPlease set up repository via " + TasksUiPlugin.LABEL_VIEW_REPOSITORIES + ".");
- TasksUiUtil.openUrl(taskUrl, false);
- }
-
- });
- return Status.OK_STATUS;
- }
-
- AbstractRepositoryConnector connector = TasksUiPlugin.getRepositoryManager().getRepositoryConnector(
- repositoryKind);
- try {
-
- AbstractTaskDataHandler offlineHandler = connector.getTaskDataHandler();
- if (offlineHandler != null) {
- // the following code was copied from SynchronizeTaskJob
- RepositoryTaskData downloadedTaskData = null;
- downloadedTaskData = offlineHandler.getTaskData(repository, taskId, monitor);
- if (downloadedTaskData != null) {
- TasksUiPlugin.getTaskDataManager().setNewTaskData(downloadedTaskData);
- }
- openEditor(repository, downloadedTaskData);
- } else {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- TasksUiUtil.openUrl(taskUrl, false);
- }
- });
- }
- } catch (final CoreException e) {
- StatusHandler.displayStatus("Unable to open task", e.getStatus());
- } finally {
- monitor.done();
- }
- return new Status(IStatus.OK, TasksUiPlugin.ID_PLUGIN, IStatus.OK, "", null);
- }
-
- private void openEditor(final TaskRepository repository, final RepositoryTaskData taskData) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- if (taskData == null) {
- TasksUiUtil.openUrl(taskUrl, false);
- } else {
- AbstractRepositoryTaskEditorInput editorInput = new RepositoryTaskEditorInput(repository,
- taskData.getId(), taskUrl);
- TasksUiUtil.openEditor(editorInput, TaskEditor.ID_EDITOR, page);
- }
- }
- });
- }
-
-}
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 83c57de75..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/PersonContentProposal.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;
-
-import org.eclipse.jface.fieldassist.IContentProposal;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * @author Mik Kersten
- */
-public class PersonContentProposal implements IContentProposal, Comparable<PersonContentProposal> {
-
- private final String address;
-
- private boolean isCurrentUser = false;
-
- public PersonContentProposal(String address, boolean isCurrentUser) {
- this.address = address;
- this.isCurrentUser = isCurrentUser;
- }
-
- public String getLabel() {
- return address;
- }
-
- public String getDescription() {
- return null;
- }
-
- public int getCursorPosition() {
- return address.length();
- }
-
- public String getContent() {
- return address;
- }
-
- public Image getImage() {
- if (isCurrentUser) {
- return TasksUiImages.getImage(TasksUiImages.PERSON_ME);
- } else {
- return TasksUiImages.getImage(TasksUiImages.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 272e7106f..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/PersonProposalProvider.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;
-
-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.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.RepositoryAttachment;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.TaskComment;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @author Shawn Minto
- * @author Eugene Kuleshov
- */
-public class PersonProposalProvider implements IContentProposalProvider {
-
- private AbstractTask currentTask;
-
- private RepositoryTaskData currentTaskData;
-
- private String currentUser;
-
- private SortedSet<String> addressSet = null;
-
- public PersonProposalProvider(AbstractTask repositoryTask, RepositoryTaskData taskData) {
- this.currentTask = repositoryTask;
- this.currentTaskData = taskData;
- }
-
- public IContentProposal[] getProposals(String contents, int position) {
- if (contents == null) {
- throw new IllegalArgumentException();
- }
-
- SortedSet<String> addressSet = getAddressSet();
- if (position > 0) {
- // retrieve subset of the tree set using key range
- char[] chars = contents.toLowerCase().toCharArray();
- String contents1 = new String(chars, 0, position);
- chars[position - 1]++;
- String contents2 = new String(chars, 0, position);
- addressSet = addressSet.subSet(contents1, contents2);
- }
-
- IContentProposal[] result = new IContentProposal[addressSet.size()];
- int i = 0;
- for (final String address : addressSet) {
- result[i++] = new PersonContentProposal(address, address.equalsIgnoreCase(currentUser));
- }
- Arrays.sort(result);
- return result;
- }
-
- 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);
- }
- addAddresses(currentTaskData, addressSet);
-
- String repositoryUrl = null;
- String repositoryKind = null;
-
- if (currentTask != null) {
- repositoryUrl = currentTask.getRepositoryUrl();
- repositoryKind = currentTask.getConnectorKind();
- }
-
- if (repositoryUrl == null || repositoryKind == null) {
- if (currentTaskData != null) {
- repositoryUrl = currentTaskData.getRepositoryUrl();
- repositoryKind = currentTaskData.getRepositoryKind();
- }
- }
-
- if (repositoryUrl != null && repositoryKind != null) {
- Set<AbstractTask> tasks = new HashSet<AbstractTask>();
- if (currentTask != null) {
- tasks.add(currentTask);
- }
-
- TaskRepository repository = TasksUiPlugin.getRepositoryManager().getRepository(repositoryKind,
- repositoryUrl);
-
- if (repository != null) {
- currentUser = repository.getUserName();
- if (currentUser != null && !repository.isAnonymous())
- addressSet.add(currentUser);
- }
-
- Collection<AbstractTask> allTasks = TasksUiPlugin.getTaskListManager().getTaskList().getAllTasks();
- for (AbstractTask task : allTasks) {
- if (task != null) {
- AbstractTask repositoryTask = task;
- if (repositoryTask.getRepositoryUrl().equals(repositoryUrl)) {
- tasks.add(repositoryTask);
- }
- }
- }
-
- for (AbstractTask task : tasks) {
- addAddresses(task, addressSet);
- }
- }
-
- return addressSet;
- }
-
- private void addAddresses(AbstractTask 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) {
- if (data != null) {
- // 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 19113ace2..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/PlanningPerspectiveFactory.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;
-
-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 static final String ID_PERSPECTIVE = "org.eclipse.mylyn.tasks.ui.perspectives.planning";
-
- 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/RepositoryAwareStatusHandler.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/RepositoryAwareStatusHandler.java
deleted file mode 100644
index 1b1024ee2..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/RepositoryAwareStatusHandler.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.ui;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.mylyn.internal.monitor.core.util.IStatusHandler;
-import org.eclipse.mylyn.internal.tasks.ui.util.WebBrowserDialog;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.RepositoryStatus;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Mik Kersten
- * @author Rob Elves
- */
-public class RepositoryAwareStatusHandler implements IStatusHandler {
-
- 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 select Report as Bug from popup menu on error in the Error Log (Window -> Show View -> Error Log)";
-
- // TODO: implement option to report bug
- 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();
- }
- ErrorDialog.openError(shell, "Mylyn Error", ERROR_MESSAGE, status);
- }
- });
- } catch (Throwable t) {
- status.getException().printStackTrace();
- }
- }
- }
-
- public void displayStatus(final String title, final IStatus status) {
-
- if (status.getCode() == RepositoryStatus.ERROR_INTERNAL) {
- StatusHandler.log(status);
- fail(status, true);
- return;
- }
-
- if (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();
- }
-
- if (status instanceof RepositoryStatus && ((RepositoryStatus) status).isHtmlMessage()) {
- WebBrowserDialog.openAcceptAgreement(shell, title, status.getMessage(),
- ((RepositoryStatus) status).getHtmlMessage());
- return;
- }
-
- 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;
- }
- }
- });
- } catch (Throwable t) {
- status.getException().printStackTrace();
- }
- }
- }
-
- private MessageDialog createDialog(Shell shell, String title, String message, int type) {
- return new MessageDialog(shell, title, null, message, type, new String[] { IDialogConstants.OK_LABEL }, 0);
- }
-
-}
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/RetrieveTitleFromUrlJob.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/RetrieveTitleFromUrlJob.java
deleted file mode 100644
index aeb1239fb..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/RetrieveTitleFromUrlJob.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.mylyn.monitor.core.StatusHandler;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.browser.Browser;
-import org.eclipse.swt.browser.TitleEvent;
-import org.eclipse.swt.browser.TitleListener;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Waits for the title from the browser
- *
- * @author Wesley Coelho
- * @author Mik Kersten
- */
-public abstract class RetrieveTitleFromUrlJob extends Job implements TitleListener {
-
- public static final String LABEL_TITLE = "Retrieving summary from URL";
-
- private final static long MAX_WAIT_TIME_MILLIS = 1000 * 10; // (10 Seconds)
-
- private final static long SLEEP_INTERVAL_MILLIS = 500;
-
- private String url = null;
-
- private String pageTitle = null;
-
- private boolean retrievalFailed = false;
-
- private long timeWaitedMillis = 0;
-
- boolean ignoreChangeCall = false;
-
- private boolean titleRetrieved = false;
-
- private Shell shell = null;
- private Browser browser = null;
-
- public RetrieveTitleFromUrlJob(String url) {
- super(LABEL_TITLE);
- this.url = url;
- }
-
- protected abstract void setTitle(String pageTitle);
-
- @Override
- public IStatus run(IProgressMonitor monitor) {
-
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- shell = new Shell(Display.getDefault());
- shell.setVisible(false);
- browser = new Browser(shell, SWT.NONE);
- browser.addTitleListener(RetrieveTitleFromUrlJob.this);
- browser.setUrl(url);
- }
- });
-
- while (pageTitle == null && !retrievalFailed && (timeWaitedMillis <= MAX_WAIT_TIME_MILLIS)) {
- try {
- Thread.sleep(SLEEP_INTERVAL_MILLIS);
- } catch (InterruptedException e) {
- StatusHandler.fail(e, "Thread interrupted during sleep", false);
- }
- timeWaitedMillis += SLEEP_INTERVAL_MILLIS;
- }
-
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- if (pageTitle == null) {
- pageTitle = url;
- titleRetrieved = false;
- } else {
- titleRetrieved = true;
- }
- setTitle(pageTitle);
-
- if(shell != null && !shell.isDisposed()){
- shell.dispose();
- }
-
- if(browser != null && !browser.isDisposed()){
- browser.dispose();
- }
- }
- });
- return Status.OK_STATUS;
- }
-
- public void changed(TitleEvent event) {
- if (!ignoreChangeCall) {
- if (event.title.equals(url)) {
- return;
- } else {
- ignoreChangeCall = true;
- if (event.title.equals(url + "/") || event.title.equals("Object not found!")
- || event.title.equals("No page to display") || event.title.equals("Cannot find server")
- || event.title.equals("Invalid Bug ID")) {
- retrievalFailed = true;
- } else {
- pageTitle = event.title;
- }
- }
- }
- }
-
- public boolean isTitleRetrieved() {
- return titleRetrieved;
- }
-
- public String getPageTitle() {
- return pageTitle;
- }
-}
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 51dd44fcc..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ScheduleTaskMenuContributor.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;
-
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.GregorianCalendar;
-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.window.Window;
-import org.eclipse.mylyn.internal.tasks.core.TaskActivityUtil;
-import org.eclipse.mylyn.internal.tasks.ui.planner.DateSelectionDialog;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.tasks.ui.DatePicker;
-import org.eclipse.mylyn.tasks.ui.TaskListManager;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * TODO: this has bloated, refactor
- *
- * @author Rob Elves
- * @author Mik Kersten
- */
-public class ScheduleTaskMenuContributor implements IDynamicSubMenuContributor {
-
- private static final String LABEL_REMINDER = "Schedule";
-
- private static final String LABEL_TODAY = "Today";
-
- private static final String LABEL_NEXT_WEEK = "Next Week";
-
- private static final String LABEL_TWO_WEEKS = "Two Weeks";
-
- private static final String LABEL_FUTURE = "Future";
-
- private static final String LABEL_CALENDAR = "Choose Date...";
-
- private static final String LABEL_NOT_SCHEDULED = "Not Scheduled";
-
- @SuppressWarnings("deprecation")
- public MenuManager getSubMenuManager(final List<AbstractTaskContainer> selectedElements) {
-
- final TaskListManager tasklistManager = TasksUiPlugin.getTaskListManager();
-
- final MenuManager subMenuManager = new MenuManager(LABEL_REMINDER);
-
- subMenuManager.setVisible(selectedElements.size() > 0 && selectedElements.get(0) instanceof AbstractTask);// !(selectedElements.get(0) instanceof AbstractTaskContainer || selectedElements.get(0) instanceof AbstractRepositoryQuery));
-
- AbstractTaskContainer singleSelection = null;
- if (selectedElements.size() == 1) {
- AbstractTaskContainer selectedElement = selectedElements.get(0);
- if (selectedElement instanceof AbstractTask) {
- singleSelection = selectedElement;
- }
- }
- final AbstractTask singleTaskSelection = tasklistManager.getTaskForElement(singleSelection, false);
- final List<AbstractTaskContainer> taskListElementsToSchedule = new ArrayList<AbstractTaskContainer>();
- for (AbstractTaskContainer selectedElement : selectedElements) {
- if (selectedElement instanceof AbstractTask) {
- taskListElementsToSchedule.add(selectedElement);
- }
- // if (selectedElement instanceof ITask) {
- // taskListElementsToSchedule.add((ITask) selectedElement);
- // } else if (selectedElement instanceof AbstractQueryHit) {
- // if (((AbstractQueryHit) selectedElement).getCorrespondingTask()
- // != null) {
- // taskListElementsToSchedule.add(((AbstractQueryHit)
- // selectedElement).getCorrespondingTask());
- // }
- // }
- }
-
- Action action = new Action() {
- @Override
- public void run() {
- Calendar reminderCalendar = GregorianCalendar.getInstance();
- TasksUiPlugin.getTaskListManager().setScheduledEndOfDay(reminderCalendar);
- for (AbstractTaskContainer element : taskListElementsToSchedule) {
- AbstractTask task = tasklistManager.getTaskForElement(element, true);
- TasksUiPlugin.getTaskListManager().setScheduledFor(task, reminderCalendar.getTime());
- }
- }
- };
- action.setText(LABEL_TODAY);
- action.setEnabled(canSchedule(singleSelection, taskListElementsToSchedule));
- subMenuManager.add(action);
-
- if (singleTaskSelection != null && TasksUiPlugin.getTaskListManager().isScheduledForToday(singleTaskSelection)) {
- action.setChecked(true);
- }
-
- subMenuManager.add(new Separator());
-
- final int today = Calendar.getInstance().get(Calendar.DAY_OF_WEEK);
- boolean reachedEndOfWeek = false;
- for (int i = today + 1; i <= 8 && !reachedEndOfWeek; i++) {
- final int day = i;
- action = new Action() {
- @Override
- public void run() {
- Calendar reminderCalendar = GregorianCalendar.getInstance();
- int dueIn = day - today;
- TasksUiPlugin.getTaskListManager().setSecheduledIn(reminderCalendar, dueIn);
- for (AbstractTaskContainer element : taskListElementsToSchedule) {
- AbstractTask task = tasklistManager.getTaskForElement(element, true);
- TasksUiPlugin.getTaskListManager().setScheduledFor(task, reminderCalendar.getTime());
- }
- }
- };
- getDayLabel(i, action);
- if (singleTaskSelection != null && singleTaskSelection.getScheduledForDate() != null) {
- int tasksCheduledOn = singleTaskSelection.getScheduledForDate().getDay();
- if (TasksUiPlugin.getTaskListManager().isScheduledForThisWeek(singleTaskSelection)) {
- if (tasksCheduledOn + 1 == day) {
- action.setChecked(true);
- } else if (tasksCheduledOn == 0 && day == 8) {
- action.setChecked(true);
- }
- }
- }
-
- action.setEnabled(canSchedule(singleSelection, taskListElementsToSchedule));
- subMenuManager.add(action);
- }
-
- subMenuManager.add(new Separator());
-
- action = new Action() {
- @Override
- public void run() {
- for (AbstractTaskContainer element : taskListElementsToSchedule) {
- AbstractTask task = tasklistManager.getTaskForElement(element, true);
- Calendar startNextWeek = Calendar.getInstance();
- TasksUiPlugin.getTaskListManager().setScheduledNextWeek(startNextWeek);
- TasksUiPlugin.getTaskListManager().setScheduledFor(task, startNextWeek.getTime());
- }
- }
- };
- action.setText(LABEL_NEXT_WEEK);
- action.setEnabled(canSchedule(singleSelection, taskListElementsToSchedule));
-
- if (singleTaskSelection != null
- && TasksUiPlugin.getTaskListManager().isScheduledAfterThisWeek(singleTaskSelection)
- && !TasksUiPlugin.getTaskListManager().isScheduledForLater(singleTaskSelection)) {
- action.setChecked(true);
- }
-
- subMenuManager.add(action);
-
- // 2 weeks
- action = new Action() {
- @Override
- public void run() {
- for (AbstractTaskContainer element : taskListElementsToSchedule) {
- AbstractTask task = tasklistManager.getTaskForElement(element, true);
- TasksUiPlugin.getTaskListManager().setScheduledFor(task,
- TasksUiPlugin.getTaskActivityManager().getActivityFuture().getStart().getTime());
- }
- }
- };
- action.setText(LABEL_TWO_WEEKS);
- action.setEnabled(canSchedule(singleSelection, taskListElementsToSchedule));
-
- if (singleTaskSelection != null && singleTaskSelection.getScheduledForDate() != null) {
-
- Calendar time = TaskActivityUtil.getCalendar();
- time.setTime(singleTaskSelection.getScheduledForDate());
-
- Calendar start = TaskActivityUtil.getCalendar();
- start.setTime(TasksUiPlugin.getTaskActivityManager().getActivityFuture().getStart().getTime());
-
- Calendar end = TaskActivityUtil.getCalendar();
- end.setTime(TasksUiPlugin.getTaskActivityManager().getActivityFuture().getStart().getTime());
- TaskActivityUtil.snapEndOfWeek(end);
-
- if (TaskActivityUtil.isBetween(time, start, end)) {
- action.setChecked(true);
- }
- }
-
- subMenuManager.add(action);
-
- if (singleTaskSelection != null && singleTaskSelection.getScheduledForDate() != null) {
-
- Calendar time = TaskActivityUtil.getCalendar();
- time.setTime(singleTaskSelection.getScheduledForDate());
-
- Calendar start = TaskActivityUtil.getCalendar();
- start.setTime(TasksUiPlugin.getTaskActivityManager().getActivityFuture().getStart().getTime());
- start.add(Calendar.WEEK_OF_MONTH, 1);
-
- if (time.compareTo(start) >= 0) {
- // future
- action = new Action() {
- @Override
- public void run() {
- // ignore
- }
- };
- action.setChecked(true);
- action.setText(LABEL_FUTURE);
- subMenuManager.add(action);
- }
- }
-
- subMenuManager.add(new Separator());
-
- action = new Action() {
- @Override
- public void run() {
- Calendar theCalendar = GregorianCalendar.getInstance();
- if (singleTaskSelection != null && singleTaskSelection.getScheduledForDate() != null) {
- theCalendar.setTime(singleTaskSelection.getScheduledForDate());
- }
- DateSelectionDialog reminderDialog = new DateSelectionDialog(PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow()
- .getShell(), theCalendar, DatePicker.TITLE_DIALOG);
- int result = reminderDialog.open();
- if (result == Window.OK) {
- for (AbstractTaskContainer element : taskListElementsToSchedule) {
- AbstractTask task = null;
- if (element instanceof AbstractTask) {
- task = (AbstractTask) element;
- }
- TasksUiPlugin.getTaskListManager().setScheduledFor(task, reminderDialog.getDate());
- }
- }
- }
- };
- action.setText(LABEL_CALENDAR);
- action.setEnabled(canSchedule(singleSelection, taskListElementsToSchedule));
- subMenuManager.add(action);
-
- action = new Action() {
- @Override
- public void run() {
- for (AbstractTaskContainer element : taskListElementsToSchedule) {
- AbstractTask task = tasklistManager.getTaskForElement(element, true);
- TasksUiPlugin.getTaskListManager().setScheduledFor(task, null);
- }
- }
- };
- action.setText(LABEL_NOT_SCHEDULED);
- if (singleTaskSelection != null) {
- if (singleTaskSelection.getScheduledForDate() == null) {
- action.setChecked(true);
- }
- }
- subMenuManager.add(action);
- return subMenuManager;
- }
-
- private void getDayLabel(int i, Action action) {
- switch (i) {
- case Calendar.MONDAY:
- action.setText("Monday");
- break;
- case Calendar.TUESDAY:
- action.setText("Tuesday");
- break;
- case Calendar.WEDNESDAY:
- action.setText("Wednesday");
- break;
- case Calendar.THURSDAY:
- action.setText("Thursday");
- break;
- case Calendar.FRIDAY:
- action.setText("Friday");
- break;
- case Calendar.SATURDAY:
- action.setText("Saturday");
- break;
- case 8:
- action.setText("Sunday");
- break;
- default:
- break;
- }
- }
-
- private boolean canSchedule(AbstractTaskContainer singleSelection, List<AbstractTaskContainer> elements) {
- if (singleSelection instanceof AbstractTask) {
- return ((!((AbstractTask) singleSelection).isCompleted()) || elements.size() > 0);
- } else {
- return elements.size() > 0;
- }
- // return (singleSelection != null && !singleSelection.isCompleted())
- // || elements.size() > 0;
- }
-}
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 c67f94551..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ScheduledPresentation.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;
-
-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/ScheduledTaskListSynchJob.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ScheduledTaskListSynchJob.java
deleted file mode 100644
index 7294e66a7..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ScheduledTaskListSynchJob.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.tasks.ui;
-
-import java.util.Calendar;
-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.OperationCanceledException;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.TaskList;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.RepositorySynchronizationManager;
-import org.eclipse.mylyn.tasks.ui.TaskListManager;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @author Rob Elves
- */
-public class ScheduledTaskListSynchJob extends Job {
-
- private static final int UPDATE_ATTRIBUTES_FREQUENCY = 10;
-
- private static final String LABEL_TASK = "Task Repository Synchronization";
-
- private static final String JOB_NAME = "Synchronizing repository tasks";
-
- private long scheduleDelay = 1000 * 60 * 20;// 20 minutes default
-
- private TaskList taskList = null;
-
- private static long count = 0;
-
- private static Calendar lastRepositoryRefresh;
-
- private TaskListManager taskListManager;
-
- private List<TaskRepository> repositories = null;
-
- public ScheduledTaskListSynchJob(long schedule, TaskListManager taskListManager) {
- super(JOB_NAME);
- this.scheduleDelay = schedule;
- this.taskListManager = taskListManager;
- this.setSystem(true);
- this.setPriority(Job.BUILD);
- }
-
- public ScheduledTaskListSynchJob(TaskListManager taskListManager) {
- super(JOB_NAME);
- this.taskListManager = taskListManager;
- this.setPriority(Job.BUILD);
- this.scheduleDelay = -1;
- }
-
- @Override
- public IStatus run(final IProgressMonitor monitor) {
- try {
- taskList = taskListManager.getTaskList();
- if (repositories == null) {
- repositories = TasksUiPlugin.getRepositoryManager().getAllRepositories();
- }
- monitor.beginTask(LABEL_TASK, repositories.size());
-
- for (final TaskRepository repository : repositories) {
- if (monitor.isCanceled()) {
- scheduleDelay = -1;
- throw new OperationCanceledException();
- }
-
- if (repository.isOffline()) {
- continue;
- }
-
- final AbstractRepositoryConnector connector = TasksUiPlugin.getRepositoryManager()
- .getRepositoryConnector(repository.getConnectorKind());
- if (connector == null) {
- monitor.worked(1);
- continue;
- }
-
- RepositorySynchronizationManager synchronizationManager = TasksUiPlugin.getSynchronizationManager();
- Set<AbstractRepositoryQuery> queries = taskList.getRepositoryQueries(repository.getUrl());
-
- // Occasionally request update of repository configuration attributes
- if ((lastRepositoryRefresh == null || lastRepositoryRefresh.get(Calendar.DAY_OF_MONTH) != Calendar.getInstance()
- .get(Calendar.DAY_OF_MONTH))
- && queries != null && queries.size() > 0) {
- Job updateJob = new Job("Updating attributes for " + repository.getUrl()) {
-
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- try {
- if (connector.isRepositoryConfigurationStale(repository)) {
- connector.updateAttributes(repository, new SubProgressMonitor(monitor, 1));
- // HACK: A configuration update occurred. Save on behalf of connector which
- // currently can't access the repository manager itself
- TasksUiPlugin.getRepositoryManager().saveRepositories(
- TasksUiPlugin.getDefault().getRepositoriesFilePath());
- }
- } catch (Exception e) {
- // ignore, since we might not be connected
- }
- return Status.OK_STATUS;
- }
- };
- //updateJob.setSystem(true);
- updateJob.setPriority(Job.LONG);
- updateJob.schedule();
- lastRepositoryRefresh = null;
- }
-
- synchronizationManager.synchronize(connector, repository, queries, null, Job.DECORATE, 0, false);
-
- monitor.worked(1);
- }
- } finally {
- count = count >= UPDATE_ATTRIBUTES_FREQUENCY ? 0 : count + 1;
- if (lastRepositoryRefresh == null) {
- lastRepositoryRefresh = Calendar.getInstance();
- }
- if (monitor != null) {
- monitor.done();
- }
- }
- return Status.OK_STATUS;
- }
-
- public void setSchedule(long schedule) {
- this.scheduleDelay = schedule;
- }
-
- public void setRepositories(List<TaskRepository> repositories) {
- this.repositories = repositories;
- }
-
- /**
- * for testing purposes
- */
- public static long getCount() {
- return count;
- }
-
- /** for testing */
- public static void resetCount() {
- try {
- if (TasksUiPlugin.getSynchronizationScheduler().getRefreshJob() != null) {
- TasksUiPlugin.getSynchronizationScheduler().getRefreshJob().join();
- }
- TasksUiPlugin.getSynchronizationScheduler().cancelAll();
- TasksUiPlugin.getSynchronizationScheduler().startSynchJob();
- count = 0;
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- public long getScheduleDelay() {
- return scheduleDelay;
- }
-
-}
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 fe1e2939b..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskArchiveFilter.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;
-
-import org.eclipse.mylyn.internal.tasks.core.TaskArchive;
-
-/**
- * @author Mik Kersten
- */
-public class TaskArchiveFilter extends AbstractTaskListFilter {
-
- @Override
- public boolean select(Object parent, Object element) {
- 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 585d1ed32..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskCompletionFilter.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;
-
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @author Mik Kersten
- */
-public class TaskCompletionFilter extends AbstractTaskListFilter {
-
- @Override
- public boolean select(Object parent, Object element) {
- if (element instanceof AbstractTask) {
- boolean exposeSubTasks = TasksUiPlugin.getDefault().groupSubtasks((AbstractTask) element);
- AbstractTask task = (AbstractTask) element;
- if (shouldAlwaysShow(parent, task, exposeSubTasks)) {
- return true;
- }
- return !task.isCompleted();
- }
- return true;
- }
-}
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 81a1da72a..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskHistoryDropDown.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.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.ui.actions.ActivateTaskDialogAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.TaskActivateAction;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskActivationHistory;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskElementLabelProvider;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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;
-
-/**
- * Copied from ActivateTaskHistoryDropDownAction
- *
- * TODO: refactor that one into command contribution
- */
-public class TaskHistoryDropDown extends CompoundContributionItem {
-
- private final static int MAX_ITEMS_TO_DISPLAY = 12;
-
- private boolean scopeToWorkingSet;
-
- private TaskActivationHistory taskHistory;
-
- private TaskElementLabelProvider labelProvider = new TaskElementLabelProvider(false);
-
- public TaskHistoryDropDown() {
- this(null);
- }
-
- public TaskHistoryDropDown(String id) {
- super(id);
- scopeToWorkingSet = false;
- taskHistory = TasksUiPlugin.getTaskListManager().getTaskActivationHistory();
- }
-
- protected IContributionItem[] getContributionItems() {
- List<AbstractTask> tasks = new ArrayList<AbstractTask>(taskHistory.getPreviousTasks());
- Set<IWorkingSet> sets = TaskListView.getActiveWorkingSets();
- if (scopeToWorkingSet && !sets.isEmpty()) {
- Set<AbstractTask> allWorkingSetTasks = new HashSet<AbstractTask>();
- for (IWorkingSet workingSet : sets) {
- IAdaptable[] elements = workingSet.getElements();
- for (IAdaptable adaptable : elements) {
- if (adaptable instanceof AbstractTaskContainer) {
- allWorkingSetTasks.addAll(((AbstractTaskContainer) adaptable).getChildren());
- }
- }
- }
- List<AbstractTask> allScopedTasks = new ArrayList<AbstractTask>(tasks);
- for (AbstractTask 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 TaskNavigateAction(currTask);
- ActionContributionItem item = new ActionContributionItem(taskNavAction);
- if (currTask.isActive()) {
- taskNavAction.setChecked(true);
- }
- items.add(item);
- }
-
- Separator separator = new Separator();
- items.add(separator);
-
- AbstractTask active = TasksUiPlugin.getTaskListManager().getTaskList().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.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()]);
- }
-
- /**
- * Action for navigating to a specified task. This class should be protected but has been made public for testing
- * only
- */
- public class TaskNavigateAction extends Action {
-
- private static final int MAX_LABEL_LENGTH = 40;
-
- private AbstractTask targetTask;
-
- public TaskNavigateAction(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);
-// taskHistory.addTask(targetTask);
- }
- }
-
- public class ActivateDialogAction extends Action {
-
- private 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);
- }
- }
-
- public 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() {
- AbstractTask active = TasksUiPlugin.getTaskListManager().getTaskList().getActiveTask();
- if (active != null) {
- TasksUiPlugin.getTaskListManager().deactivateTask(active);
- }
- }
-
- }
-
-}
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 3c995dcfd..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskHistoryHandler.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;
-
-import java.util.Map;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.mylyn.context.core.ContextCorePlugin;
-import org.eclipse.mylyn.internal.tasks.ui.actions.TaskActivateAction;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskActivationHistory;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.ui.commands.IElementUpdater;
-import org.eclipse.ui.menus.UIElement;
-
-/**
- * @author Eugene Kuleshov
- */
-public class TaskHistoryHandler extends AbstractHandler implements IElementUpdater {
-
- public Object execute(ExecutionEvent event) throws ExecutionException {
- TaskActivationHistory taskHistory = TasksUiPlugin.getTaskListManager().getTaskActivationHistory();
- if (taskHistory.hasPrevious()) {
- AbstractTask previousTask = taskHistory.getPreviousTask();
- new TaskActivateAction().run(previousTask);
- }
- return null;
- }
-
- @SuppressWarnings("unchecked")
- public void updateElement(UIElement element, Map parameters) {
- if (TasksUiPlugin.getTaskListManager().getTaskList().getActiveTask() == null) {
- element.setIcon(TasksUiImages.NAVIGATE_PREVIOUS);
- } else {
- if (ContextCorePlugin.getContextManager().isContextCapturePaused()) {
- element.setIcon(TasksUiImages.NAVIGATE_PREVIOUS_PAUSE);
- } else {
- element.setIcon(TasksUiImages.NAVIGATE_PREVIOUS_ACTIVE);
- }
- }
- }
-
-}
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 b8c3c6ac0..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskLabelDecorator.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;
-
-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.tasks.core.TaskActivityManager;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskElementLabelProvider;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @author Mik Kersten
- */
-public class TaskLabelDecorator implements ILightweightLabelDecorator {
-
- public void decorate(Object element, IDecoration decoration) {
-
- ImageDescriptor priorityOverlay = TaskElementLabelProvider.getPriorityImageDescriptor(element);
- if (priorityOverlay != null) {
- decoration.addOverlay(priorityOverlay, IDecoration.BOTTOM_LEFT);
- }
-
- if (element instanceof AbstractRepositoryQuery) {
- AbstractRepositoryQuery query = (AbstractRepositoryQuery) element;
- String repositoryUrl = query.getRepositoryUrl();
- TaskRepository taskRepository = TasksUiPlugin.getRepositoryManager().getRepository(repositoryUrl);
- if (repositoryUrl != null && taskRepository != null) {
- if (taskRepository.getUrl().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 AbstractTask) {
- AbstractTask task = (AbstractTask) element;
- if (!task.isCompleted() && TaskActivityManager.getInstance().isOverdue(task)) {
- decoration.addOverlay(TasksUiImages.OVERLAY_OVER_DUE, IDecoration.TOP_RIGHT);
- } else if (!task.isCompleted() && task.getDueDate() != null) {
- decoration.addOverlay(TasksUiImages.OVERLAY_HAS_DUE, IDecoration.TOP_RIGHT);
- }
- } else if (element instanceof AbstractTask) {
- AbstractTask task = (AbstractTask) element;
- if (!task.isCompleted() && TaskActivityManager.getInstance().isOverdue(task)) {
- decoration.addOverlay(TasksUiImages.OVERLAY_OVER_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
- }
-
-}
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 9e8339ce2..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListBackupManager.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.internal.tasks.ui;
-
-import java.io.File;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Comparator;
-import java.util.Date;
-import java.util.Timer;
-import java.util.TimerTask;
-
-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.dialogs.MessageDialog;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.mylyn.internal.tasks.ui.util.TaskDataExportJob;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.TaskDataExportWizard;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.progress.IProgressService;
-
-/**
- * @author Rob Elves
- */
-public class TaskListBackupManager implements IPropertyChangeListener {
-
- 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;
-
- public TaskListBackupManager() {
- int days = TasksUiPlugin.getDefault().getPreferenceStore().getInt(TasksUiPreferenceConstants.BACKUP_SCHEDULE);
- if (days > 0) {
- start(MINUTE);
- }
- }
-
- public void start(long delay) {
- timer = new Timer();
- timer.schedule(new CheckBackupRequired(), delay, HOUR);
- }
-
- public void stop() {
- timer.cancel();
- }
-
- public void propertyChange(PropertyChangeEvent event) {
-// if (event.getProperty().equals(TaskListPreferenceConstants.BACKUP_AUTOMATICALLY)) {
-// if ((Boolean) event.getNewValue() == true) {
-// start(MINUTE);
-// } else {
-// stop();
-// }
-// }
- }
-
- public void backupNow(boolean synchronous) {
- String destination = TasksUiPlugin.getDefault().getBackupFolderPath();
-
- File backupFolder = new File(destination);
- if (!backupFolder.exists()) {
- backupFolder.mkdir();
- }
-
- removeOldBackups(backupFolder);
-
- String fileName = TaskDataExportWizard.getZipFileName();
-
- if (!synchronous) {
-
- ExportJob export = new ExportJob(destination, fileName);
- export.schedule();
-
- } else {
-
- final TaskDataExportJob backupJob = new TaskDataExportJob(destination, true, fileName);
-
- IProgressService service = PlatformUI.getWorkbench().getProgressService();
- try {
- service.run(true, false, backupJob);
- TasksUiPlugin.getDefault().getPreferenceStore().setValue(TasksUiPreferenceConstants.BACKUP_LAST,
- new Date().getTime());
- } catch (InterruptedException e) {
- // ignore
- } catch (InvocationTargetException e) {
- MessageDialog.openError(null, TITLE_TASKLIST_BACKUP, BACKUP_FAILURE_MESSAGE);
- }
-
- }
- }
-
- /** public for testing purposes */
- public void removeOldBackups(File folder) {
-
- int maxBackups = TasksUiPlugin.getDefault().getPreferenceStore().getInt(
- TasksUiPreferenceConstants.BACKUP_MAXFILES);
-
- File[] files = folder.listFiles();
- ArrayList<File> backupFiles = new ArrayList<File>();
- for (File file : files) {
- if (file.getName().startsWith(TaskDataExportWizard.ZIP_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()));
- }
-
- });
-
- int toomany = backupFileArray.length - maxBackups;
- if (toomany > 0) {
- for (int x = 0; x < toomany; x++) {
- if (backupFileArray[x] != null) {
- backupFileArray[x].delete();
- }
- }
- }
- }
- }
-
-// public File getMostRecentBackup() {
-// String destination = TasksUiPlugin.getDefault().getBackupFolderPath();
-//
-// File backupFolder = new File(destination);
-// ArrayList<File> backupFiles = new ArrayList<File>();
-// if (backupFolder.exists()) {
-// File[] files = backupFolder.listFiles();
-// for (File file : files) {
-// if (file.getName().startsWith(TaskDataExportWizard.ZIP_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;
-// }
-//
-// });
-// }
-// if (backupFileArray != null && backupFileArray.length > 0) {
-// return backupFileArray[0];
-// }
-//
-// return null;
-// }
-
- class CheckBackupRequired extends TimerTask {
-
- @Override
- public void run() {
- if (!Platform.isRunning() || TasksUiPlugin.getDefault() == null) {
- return;
- } else {
- long lastBackup = TasksUiPlugin.getDefault().getPreferenceStore().getLong(
- TasksUiPreferenceConstants.BACKUP_LAST);
- int days = TasksUiPlugin.getDefault().getPreferenceStore().getInt(
- TasksUiPreferenceConstants.BACKUP_SCHEDULE);
- long waitPeriod = days * DAY;
- final long now = new Date().getTime();
-
- if ((now - lastBackup) > waitPeriod) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- backupNow(false);
- }
- });
- }
- }
- }
- }
-
- static class ExportJob extends Job {
-
- final TaskDataExportJob backupJob;
-
- public ExportJob(String destination, String filename) {
- super(BACKUP_JOB_NAME);
- backupJob = new TaskDataExportJob(destination, true, filename);
- }
-
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- try {
- if (Platform.isRunning()) {
- backupJob.run(monitor);
- TasksUiPlugin.getDefault().getPreferenceStore().setValue(TasksUiPreferenceConstants.BACKUP_LAST,
- new Date().getTime());
- }
- } 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;
- }
-
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListColorsAndFonts.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListColorsAndFonts.java
deleted file mode 100644
index 4e6337fb8..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListColorsAndFonts.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.Field;
-
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * @author Mik Kersten
- */
-public class TaskListColorsAndFonts {
-
- public static final String THEME_COLOR_TASKS_INCOMING_BACKGROUND = "org.eclipse.mylyn.tasks.ui.colors.incoming.background";
-
- public static final String THEME_COLOR_TASK_OVERDUE = "org.eclipse.mylyn.tasks.ui.colors.foreground.overdue";
-
- public static final String THEME_COLOR_TASK_THISWEEK_SCHEDULED = "org.eclipse.mylyn.tasks.ui.colors.foreground.thisweek.scheduled";
-
- public static final String THEME_COLOR_COMPLETED = "org.eclipse.mylyn.tasks.ui.colors.foreground.completed";
-
- public static final String THEME_COLOR_TASK_TODAY_SCHEDULED = "org.eclipse.mylyn.tasks.ui.colors.foreground.today.scheduled";
-
- public static final String THEME_COLOR_TASK_TODAY_COMPLETED = "org.eclipse.mylyn.tasks.ui.colors.foreground.today.completed";
-
- public static final String THEME_COLOR_CATEGORY_GRADIENT_START = "org.eclipse.mylyn.tasks.ui.colors.category.gradient.start";
-
- public static final String THEME_COLOR_CATEGORY_GRADIENT_END = "org.eclipse.mylyn.tasks.ui.colors.category.gradient.end";
-
- public static final String THEME_COLOR_TASKLIST_CATEGORY = THEME_COLOR_CATEGORY_GRADIENT_END;
-
- public static final Color BACKGROUND_ARCHIVE = new Color(Display.getDefault(), 225, 226, 246);
-
- public static final Color COLOR_TASK_ACTIVE = new Color(Display.getDefault(), 36, 22, 50);
-
- public static final Color COLOR_LABEL_CAUTION = new Color(Display.getDefault(), 200, 10, 30);
-
- public static final Color COLOR_HYPERLINK_WIDGET = new Color(Display.getDefault(), 12, 81, 172);
-
- public static final Color COLOR_HYPERLINK_TEXT = new Color(Display.getDefault(), 0, 0, 255);
-
- public static final Color COLOR_SPELLING_ERROR = new Color(Display.getDefault(), 255, 0, 0);
-
- public static final Font BOLD = JFaceResources.getFontRegistry().getBold(JFaceResources.DEFAULT_FONT);
-
- public static final Font ITALIC = JFaceResources.getFontRegistry().getItalic(JFaceResources.DEFAULT_FONT);
-
- public static Font STRIKETHROUGH;
-
- static {
- Font defaultFont = JFaceResources.getFontRegistry().get(JFaceResources.DEFAULT_FONT);
- FontData[] defaultData = defaultFont.getFontData();
- if (defaultData != null && defaultData.length == 1) {
- FontData data = new FontData(defaultData[0].getName(), defaultData[0].getHeight(),
- defaultData[0].getStyle());
-
- // NOTE: Windows XP only, for: data.data.lfStrikeOut = 1;
- try {
- Field dataField = data.getClass().getDeclaredField("data");
- Object dataObject = dataField.get(data);
- Class<?> clazz = dataObject.getClass().getSuperclass();
- Field strikeOutFiled = clazz.getDeclaredField("lfStrikeOut");
- strikeOutFiled.set(dataObject, (byte) 1);
- STRIKETHROUGH = new Font(Display.getCurrent(), data);
- } catch (Throwable t) {
- // Linux or other platform
- STRIKETHROUGH = defaultFont;
- }
- } else {
- STRIKETHROUGH = defaultFont;
- }
- }
-
- /**
- * NOTE: disposal of JFaceResources fonts handled by registry.
- */
- public static void dispose() {
- if (STRIKETHROUGH != null && !STRIKETHROUGH.isDisposed()) {
- STRIKETHROUGH.dispose();
- }
- BACKGROUND_ARCHIVE.dispose();
- COLOR_LABEL_CAUTION.dispose();
- COLOR_TASK_ACTIVE.dispose();
- COLOR_HYPERLINK_WIDGET.dispose();
- COLOR_SPELLING_ERROR.dispose();
- }
-
- public static boolean isTaskListTheme(String property) {
- if (property == null) {
- return false;
- } else {
- return property.equals(TaskListColorsAndFonts.THEME_COLOR_TASKLIST_CATEGORY)
- || property.equals(TaskListColorsAndFonts.THEME_COLOR_TASK_OVERDUE)
- || property.equals(TaskListColorsAndFonts.THEME_COLOR_TASK_TODAY_COMPLETED)
- || property.equals(TaskListColorsAndFonts.THEME_COLOR_TASK_TODAY_SCHEDULED)
- || property.equals(TaskListColorsAndFonts.THEME_COLOR_TASK_TODAY_SCHEDULED)
- || property.equals(TaskListColorsAndFonts.THEME_COLOR_TASK_THISWEEK_SCHEDULED)
- || property.equals(TaskListColorsAndFonts.THEME_COLOR_TASKS_INCOMING_BACKGROUND)
- || property.equals(TaskListColorsAndFonts.THEME_COLOR_CATEGORY_GRADIENT_START)
- || property.equals(TaskListColorsAndFonts.THEME_COLOR_CATEGORY_GRADIENT_END);
- }
- }
-
- public static final String TASK_EDITOR_FONT = "org.eclipse.mylyn.tasks.ui.fonts.task.editor.comment";
-
-}
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 31eac07ce..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListHyperlink.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;
-
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.forms.widgets.Hyperlink;
-
-/**
- * Override Hyperlink to truncate its text at the end, rather than the middle.
- *
- * @author Leo Dos Santos
- */
-public class TaskListHyperlink extends Hyperlink {
-
- public TaskListHyperlink(Composite parent, int style) {
- super(parent, style);
- }
-
- // From PerspectiveBarContributionItem
- @Override
- protected String shortenText(GC gc, String t, int width) {
- if (t == null) {
- return null;
- }
-
- 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/TaskListImageDescriptor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListImageDescriptor.java
deleted file mode 100644
index dac3b2a29..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListImageDescriptor.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;
-
-import org.eclipse.jface.resource.CompositeImageDescriptor;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.graphics.ImageData;
-import org.eclipse.swt.graphics.Point;
-
-/**
- * @author Mik Kersten
- */
-public class TaskListImageDescriptor extends CompositeImageDescriptor {
-
- private ImageData base;
-
- private ImageData overlay;
-
- private boolean top;
-
- private boolean left;
-
- protected Point size;
-
- public TaskListImageDescriptor(ImageDescriptor baseDesc, ImageDescriptor overlayDesc, boolean top, boolean left) {
- this.base = getImageData(baseDesc);
- this.top = top;
- this.left = left;
- if (overlayDesc != null) {
- this.overlay = getImageData(overlayDesc);
- }
- Point size = new Point(base.width, base.height);
- setImageSize(size);
- }
-
- public TaskListImageDescriptor(ImageDescriptor baseDesc, Point size) {
- this.base = getImageData(baseDesc);
- setImageSize(size);
- }
-
- @Override
- protected void drawCompositeImage(int width, int height) {
- drawImage(base, 0, 0);
- int x = 0;
- int y = 0;
- if (!left)
- x = 8;// base.width - overlay.width;
- if (!top)
- y = 8;// base.height - overlay.height;
- if (overlay != null) {
- drawImage(overlay, x, y);
- }
- }
-
- private ImageData getImageData(ImageDescriptor descriptor) {
- ImageData data = descriptor.getImageData();
- // see bug 51965: getImageData can return null
- if (data == null) {
- data = DEFAULT_IMAGE_DATA;
- }
- return data;
- }
-
- public void setImageSize(Point size) {
- this.size = size;
- }
-
- @Override
- protected Point getSize() {
- return new Point(size.x, size.y);
- }
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListImageHyperlink.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListImageHyperlink.java
deleted file mode 100644
index 0d407c963..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListImageHyperlink.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;
-
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.forms.widgets.ImageHyperlink;
-
-/**
- * Override ImageHyperlink to truncate its text at the end, rather than the middle.
- *
- * @author Leo Dos Santos
- */
-public class TaskListImageHyperlink extends ImageHyperlink {
-
- public TaskListImageHyperlink(Composite parent, int style) {
- super(parent, style);
- }
-
- // From PerspectiveBarContributionItem
- @Override
- protected String shortenText(GC gc, String t, int width) {
- if (t == null) {
- return null;
- }
-
- 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/TaskListNotificationIncoming.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationIncoming.java
deleted file mode 100644
index 7b414ee5c..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationIncoming.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.Date;
-
-import org.eclipse.jface.viewers.DecoratingLabelProvider;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskElementLabelProvider;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Rob Elves
- */
-public class TaskListNotificationIncoming implements ITaskListNotification {
-
- private final AbstractTask task;
-
- private String description = null;
-
- private String details = null;
-
- private DecoratingLabelProvider labelProvider = new DecoratingLabelProvider(new TaskElementLabelProvider(true),
- PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator());
-
- private Date date;
-
-
- public TaskListNotificationIncoming(AbstractTask task) {
- this.task = task;
- }
-
- public String getDescription() {
- return description;
- }
-
- public String getLabel() {
- return labelProvider.getText(task);
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public String getDetails() {
- return details;
- }
-
- public void setDetails(String details) {
- this.details = details;
- }
-
- public void openTask() {
-
- PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
- public void run() {
- TasksUiUtil.refreshAndOpenTaskListElement(task);
- }
- });
-
- }
-
- public Image getNotificationIcon() {
- return labelProvider.getImage(task);
- }
-
-//
-// public synchronized void setNotified(boolean notified) {
-// task.setNotified(true);
-// }
-//
-// public synchronized boolean isNotified() {
-// return task.isNotified();
-// }
-
- @Override
- public boolean equals(Object o) {
- if (!(o instanceof TaskListNotificationIncoming)) {
- return false;
- }
- TaskListNotificationIncoming notification = (TaskListNotificationIncoming) o;
- return notification.getTask().equals(task);
- }
-
- private AbstractTask getTask() {
- return task;
- }
-
- @Override
- public int hashCode() {
- return task.hashCode();
- }
-
- public Image getOverlayIcon() {
- return TasksUiImages.getImage(TasksUiImages.OVERLAY_INCOMMING);
- }
-
- public Date getDate() {
- return date;
- }
-
- public void setDate(Date date) {
- this.date = date;
- }
-
- public int compareTo(ITaskListNotification 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/TaskListNotificationManager.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager.java
deleted file mode 100644
index 4ea3e0712..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager.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.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-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.tasks.ui.TasksUiPlugin;
-import org.eclipse.swt.events.ShellEvent;
-import org.eclipse.swt.events.ShellListener;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Rob Elves
- */
-public class TaskListNotificationManager implements IPropertyChangeListener {
-
- private static final String CLOSE_NOTIFICATION_JOB = "Close Notification Job";
-
- private static final String OPEN_NOTIFICATION_JOB = "Open Notification Job";
-
- private static final long CLOSE_POPUP_DELAY = 1000 * 12;
-
- private static final long OPEN_POPUP_DELAY = 1000 * 30;
-
- private static final boolean runSystem = true;
-
- private TaskListNotificationPopup popup;
-
- private Set<ITaskListNotification> notifications = new HashSet<ITaskListNotification>();
-
- private Set<ITaskListNotification> currentlyNotifying = Collections.synchronizedSet(notifications);
-
- private List<ITaskListNotificationProvider> notificationProviders = new ArrayList<ITaskListNotificationProvider>();
-
- private Job openJob = new Job(OPEN_NOTIFICATION_JOB) {
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- try {
-
- if (!PlatformUI.getWorkbench().getDisplay().isDisposed()) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- @SuppressWarnings("unchecked")
- public void run() {
- if ((popup != null && popup.close()) || popup == null) {
- closeJob.cancel();
- collectNotifications();
- //setNotified();
- synchronized (TaskListNotificationManager.class) {
- if (currentlyNotifying.size() > 0) {
- popup = new TaskListNotificationPopup(new Shell(PlatformUI.getWorkbench()
- .getDisplay()));
- List<ITaskListNotification> toDisplay = new ArrayList<ITaskListNotification>(
- currentlyNotifying);
- Collections.sort(toDisplay);
- popup.setContents(toDisplay);
- cleanNotified();
- popup.setBlockOnOpen(false);
- popup.open();
-
-// for (int i = 2; i <= 6; i+= 2) {
-// popup.getShell().setLocation(popup.getShell().getLocation().x, popup.getShell().getLocation().y - i);
-// try {
-// Thread.sleep(70);
-// } catch (InterruptedException e) {
-// // ignore
-// }
-// }
- closeJob.setSystem(runSystem);
- closeJob.schedule(CLOSE_POPUP_DELAY);
- popup.getShell().addShellListener(SHELL_LISTENER);
- }
- }
- }
-
- }
- });
- }
- } finally {
- schedule(OPEN_POPUP_DELAY);
- }
-
- if (monitor.isCanceled())
- return Status.CANCEL_STATUS;
-
- return Status.OK_STATUS;
- }
-
- };
-
- private Job closeJob = new Job(CLOSE_NOTIFICATION_JOB) {
-
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- if (!PlatformUI.getWorkbench().getDisplay().isDisposed()) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- if (popup != null) {
- synchronized (popup) {
- popup.close();
- }
- }
- }
- });
- }
- if (monitor.isCanceled())
- return Status.CANCEL_STATUS;
-
- return Status.OK_STATUS;
- }
-
- };
-
- private ShellListener SHELL_LISTENER = new ShellListener() {
-
- public void shellClosed(ShellEvent arg0) {
- }
-
- public void shellDeactivated(ShellEvent arg0) {
- popup.close();
- // don't want notifications right away
- openJob.cancel();
- openJob.setSystem(runSystem);
- openJob.schedule(OPEN_POPUP_DELAY);
- }
-
- public void shellActivated(ShellEvent arg0) {
- closeJob.cancel();
- }
-
- public void shellDeiconified(ShellEvent arg0) {
- // ingore
- }
-
- public void shellIconified(ShellEvent arg0) {
- // ignore
- }
- };
-
- 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(TasksUiPreferenceConstants.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<ITaskListNotification> getNotifications() {
- synchronized (TaskListNotificationManager.class) {
- return currentlyNotifying;
- }
- }
-
- public void propertyChange(PropertyChangeEvent event) {
- if (event.getProperty().equals(TasksUiPreferenceConstants.NOTIFICATIONS_ENABLED)) {
- Object newValue = event.getNewValue();
- if (!(newValue instanceof Boolean)) {
- // default if no preference value
- startNotification(OPEN_POPUP_DELAY);
- } else if ((Boolean) newValue == true) {
- startNotification(OPEN_POPUP_DELAY);
- } else {
- stopNotification();
- }
- }
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationPopup.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationPopup.java
deleted file mode 100644
index 7630a1101..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationPopup.java
+++ /dev/null
@@ -1,216 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.dialogs.PopupDialog;
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Rectangle;
-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.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;
-import org.eclipse.ui.forms.widgets.Form;
-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;
-
-/**
- * @author Rob Elves
- */
-public class TaskListNotificationPopup extends PopupDialog {
-
- private static final String NOTIFICATIONS_HIDDEN = " more changes...";
-
- private static final int NUM_NOTIFICATIONS_TO_DISPLAY = 3;
-
- private static final String LABEL_NOTIFICATION = "Mylyn Notification";
-
- private Form form;
-
- private Rectangle bounds;
-
- private List<ITaskListNotification> notifications;
-
- private Composite sectionClient;
-
- private FormToolkit toolkit;
-
- public TaskListNotificationPopup(Shell parent) {
- super(parent, PopupDialog.INFOPOPUP_SHELLSTYLE | SWT.ON_TOP, false, false, false, false, null, null);
- toolkit = new FormToolkit(parent.getDisplay());
- }
-
- public void setContents(List<ITaskListNotification> notifications) {
- this.notifications = notifications;
- }
-
- @Override
- protected Control createContents(Composite parent) {
- getShell().setBackground(getShell().getDisplay().getSystemColor(SWT.COLOR_DARK_GRAY));
- return createDialogArea(parent);
- }
-
- @Override
- protected final Control createDialogArea(final Composite parent) {
-
- getShell().setText(LABEL_NOTIFICATION);
-
- form = toolkit.createForm(parent);
- form.getBody().setLayout(new GridLayout());
-
- Section section = toolkit.createSection(form.getBody(), Section.TITLE_BAR);
-
- section.setText(LABEL_NOTIFICATION);
- section.setLayout(new GridLayout());
-
- sectionClient = toolkit.createComposite(section);
- sectionClient.setLayout(new GridLayout(2, false));
- int count = 0;
- for (final ITaskListNotification notification : notifications) {
- if (count < NUM_NOTIFICATIONS_TO_DISPLAY) {
- Label notificationLabelIcon = toolkit.createLabel(sectionClient, "");
- notificationLabelIcon.setImage(notification.getOverlayIcon());
- ImageHyperlink link = toolkit.createImageHyperlink(sectionClient, SWT.BEGINNING | SWT.WRAP);
- link.setText(notification.getLabel());
- link.setImage(notification.getNotificationIcon());
- link.addHyperlinkListener(new HyperlinkAdapter() {
- @Override
- public void linkActivated(HyperlinkEvent e) {
- notification.openTask();
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- if (window != null) {
- Shell windowShell = window.getShell();
- if (windowShell != null) {
- windowShell.setMaximized(true);
- windowShell.open();
- }
- }
- }
- });
-
- String descriptionText = null;
- if (notification.getDescription() != null) {
- descriptionText = notification.getDescription();
- }
- if (descriptionText != null) {
- Label descriptionLabel = toolkit.createLabel(sectionClient, descriptionText);
- GridDataFactory.fillDefaults().span(2, SWT.DEFAULT).applyTo(descriptionLabel);
- }
- } else {
- int numNotificationsRemain = notifications.size() - count;
- Hyperlink remainingHyperlink = toolkit.createHyperlink(sectionClient, numNotificationsRemain
- + NOTIFICATIONS_HIDDEN, SWT.NONE);
- GridDataFactory.fillDefaults().span(2, SWT.DEFAULT).applyTo(remainingHyperlink);
- remainingHyperlink.addHyperlinkListener(new HyperlinkAdapter() {
-
- @Override
- public void linkActivated(HyperlinkEvent e) {
- TaskListView.openInActivePerspective().setFocus();
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- if (window != null) {
- Shell windowShell = window.getShell();
- if (windowShell != null) {
- windowShell.setMaximized(true);
- windowShell.open();
- }
- }
- }
- });
- break;
- }
- count++;
- }
-
- section.setClient(sectionClient);
-
- ImageHyperlink hyperlink = new ImageHyperlink(section, SWT.NONE);
- toolkit.adapt(hyperlink, true, true);
- hyperlink.setBackground(null);
- hyperlink.setImage(TasksUiImages.getImage(TasksUiImages.NOTIFICATION_CLOSE));
- hyperlink.addHyperlinkListener(new HyperlinkAdapter() {
- @Override
- public void linkActivated(HyperlinkEvent e) {
- close();
- }
- });
-
- section.setTextClient(hyperlink);
-
- parent.pack();
- return form;
- }
-
- /**
- * Initialize the shell's bounds.
- */
- @Override
- public void initializeBounds() {
- getShell().setBounds(restoreBounds());
- }
-
- private Rectangle restoreBounds() {
- bounds = getShell().getBounds();
- Rectangle maxBounds = null;
-
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- if (window != null) {
- maxBounds = window.getShell().getMonitor().getClientArea();
- } else {
- // fallback
- Display display = Display.getCurrent();
- if (display == null)
- display = Display.getDefault();
- if (display != null && !display.isDisposed())
- maxBounds = display.getPrimaryMonitor().getClientArea();
- }
-
- if (bounds.width > -1 && bounds.height > -1) {
- if (maxBounds != null) {
- bounds.width = Math.min(bounds.width, maxBounds.width);
- bounds.height = Math.min(bounds.height, maxBounds.height);
- }
- // Enforce an absolute minimal size
- bounds.width = Math.max(bounds.width, 30);
- bounds.height = Math.max(bounds.height, 30);
- }
-
- if (bounds.x > -1 && bounds.y > -1 && maxBounds != null) {
- // bounds.x = Math.max(bounds.x, maxBounds.x);
- // bounds.y = Math.max(bounds.y, maxBounds.y);
-
- if (bounds.width > -1 && bounds.height > -1) {
- bounds.x = maxBounds.x + maxBounds.width - bounds.width;
- bounds.y = maxBounds.y + maxBounds.height - bounds.height;
- }
- }
-
- return bounds;
- }
-
- @Override
- public boolean close() {
- if (toolkit != null) {
- if (toolkit.getColors() != null) {
- toolkit.dispose();
- }
- }
- return super.close();
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationQueryIncoming.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationQueryIncoming.java
deleted file mode 100644
index c13402f50..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationQueryIncoming.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.Date;
-
-import org.eclipse.jface.viewers.DecoratingLabelProvider;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskElementLabelProvider;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Rob Elves
- */
-public class TaskListNotificationQueryIncoming implements ITaskListNotification {
-
- private final AbstractTask hit;
-
- private DecoratingLabelProvider labelProvider = new DecoratingLabelProvider(new TaskElementLabelProvider(true),
- PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator());
-
- private Date date;
-
- public TaskListNotificationQueryIncoming(AbstractTask hit) {
- this.hit = hit;
- }
-
- public String getDescription() {
- return hit.getSummary();
- }
-
- public String getDetails() {
- return null;
- }
-
- public String getLabel() {
- if (labelProvider.getText(hit).length() > 40) {
- String truncated = labelProvider.getText(hit).substring(0, 35);
- return truncated + "...";
- }
- return labelProvider.getText(hit);
- }
-
- public void openTask() {
-
- PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
- public void run() {
- TasksUiUtil.refreshAndOpenTaskListElement(hit);
- }
- });
-
- }
-
- public Image getNotificationIcon() {
- return labelProvider.getImage(hit);
- }
-
- @Override
- public boolean equals(Object o) {
- if (!(o instanceof TaskListNotificationQueryIncoming)) {
- return false;
- }
- TaskListNotificationQueryIncoming notification = (TaskListNotificationQueryIncoming) o;
- return notification.getDescription().equals(hit.getSummary());
- }
-
- @Override
- public int hashCode() {
- return hit.getSummary().hashCode();
- }
-
- public Image getOverlayIcon() {
- return TasksUiImages.getImage(TasksUiImages.OVERLAY_INCOMMING);
- }
-
- public Date getDate() {
- return date;
- }
-
- public void setDate(Date date) {
- this.date = date;
- }
-
- public int compareTo(ITaskListNotification 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/TaskListNotificationReminder.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationReminder.java
deleted file mode 100644
index 4e7afb461..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationReminder.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;
-
-import java.util.Date;
-
-import org.eclipse.jface.viewers.DecoratingLabelProvider;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskElementLabelProvider;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Rob Elves
- */
-public class TaskListNotificationReminder implements ITaskListNotification {
-
- private final AbstractTask task;
-
- private DecoratingLabelProvider labelProvider = new DecoratingLabelProvider(new TaskElementLabelProvider(true),
- PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator());
-
- private Date date;
-
- public TaskListNotificationReminder(AbstractTask task) {
- this.task = task;
- }
-
- public String getDescription() {
- return null;
- }
-
- public String getDetails() {
- return null;
- }
-
- public String getLabel() {
- if (labelProvider.getText(task).length() > 40) {
- String truncated = labelProvider.getText(task).substring(0, 35);
- return truncated + "...";
- }
- return labelProvider.getText(task);
- }
-
- public void openTask() {
-
- PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
- public void run() {
- TasksUiUtil.refreshAndOpenTaskListElement(task);
- }
- });
-
- }
-
- public Image getNotificationIcon() {
- return labelProvider.getImage(task);
- }
-
- public Image getOverlayIcon() {
- return TasksUiImages.getImage(TasksUiImages.CALENDAR);
- }
-
- @Override
- public boolean equals(Object o) {
- if (!(o instanceof TaskListNotificationReminder)) {
- return false;
- }
- TaskListNotificationReminder notification = (TaskListNotificationReminder) o;
- return notification.getTask().equals(task);
- }
-
- private AbstractTask getTask() {
- return task;
- }
-
- @Override
- public int hashCode() {
- return task.hashCode();
- }
-
- public Date getDate() {
- return date;
- }
-
- public void setDate(Date date) {
- this.date = date;
- }
-
- public int compareTo(ITaskListNotification 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/TaskListPatternFilter.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListPatternFilter.java
deleted file mode 100644
index 5edcaf969..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListPatternFilter.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.ui.dialogs.PatternFilter;
-
-/**
- * @author Mik Kersten
- */
-public class TaskListPatternFilter extends PatternFilter {
-
- @Override
- public void setPattern(String patternString) {
- if (patternString == null || patternString.startsWith("*")) {
- super.setPattern(patternString);
- } else {
- super.setPattern("*" + patternString);
- }
- }
-}
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 7d43c76bc..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListSynchronizationScheduler.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;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.IJobChangeEvent;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.core.runtime.jobs.JobChangeAdapter;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Rob Elves
- * @author Mik Kersten
- */
-public class TaskListSynchronizationScheduler implements IPropertyChangeListener {
-
- private static final int DELAY_QUERY_REFRESH_ON_STARTUP = 10000;
-
- private ScheduledTaskListSynchJob refreshJob;
-
- private List<ScheduledTaskListSynchJob> jobs = new ArrayList<ScheduledTaskListSynchJob>();
-
- private List<ScheduledTaskListSynchJob> jobsQueue = Collections.synchronizedList(jobs);
-
- private final MutexRule rule = new MutexRule();
-
- public TaskListSynchronizationScheduler(boolean refreshOnStartup) {
- boolean enabled = TasksUiPlugin.getDefault().getPreferenceStore().getBoolean(
- TasksUiPreferenceConstants.REPOSITORY_SYNCH_SCHEDULE_ENABLED);
- if (refreshOnStartup && enabled) {
- addJobToQueue(new ScheduledTaskListSynchJob(DELAY_QUERY_REFRESH_ON_STARTUP,
- TasksUiPlugin.getTaskListManager()));
- }
- }
-
- public synchronized void startSynchJob() {
- if (jobsQueue.size() == 0) {
- scheduleRegularSynchronizationJob();
- }
- if (jobsQueue.size() > 0) {
- refreshJob = jobsQueue.remove(0);
- if (!TasksUiPlugin.getSynchronizationManager().isForcedSyncExec()) {
- refreshJob.schedule(refreshJob.getScheduleDelay());
- } else {
- PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
- public void run() {
- refreshJob.run(new NullProgressMonitor());
- }
- });
- }
- }
- }
-
- private void scheduleRegularSynchronizationJob() {
- if (TasksUiPlugin.getDefault() == null) {
- return;
- }
- boolean enabled = TasksUiPlugin.getDefault().getPreferenceStore().getBoolean(
- TasksUiPreferenceConstants.REPOSITORY_SYNCH_SCHEDULE_ENABLED);
- if (enabled) {
- long miliseconds = TasksUiPlugin.getDefault().getPreferenceStore().getLong(
- TasksUiPreferenceConstants.REPOSITORY_SYNCH_SCHEDULE_MILISECONDS);
- refreshJob = new ScheduledTaskListSynchJob(miliseconds, TasksUiPlugin.getTaskListManager());
- refreshJob.setRule(rule);
- addJobToQueue(refreshJob);
- }
- }
-
- private void addJobToQueue(final ScheduledTaskListSynchJob jobToAdd) {
- jobToAdd.addJobChangeListener(new JobChangeAdapter() {
-
- @Override
- public void done(IJobChangeEvent event) {
- synchronized (refreshJob) {
- if (refreshJob == jobToAdd && event.getResult() != Status.CANCEL_STATUS) {
- startSynchJob();
- }
- }
- }
- });
- jobsQueue.add(jobToAdd);
- }
-
- /**
- * @param delay
- * sync delay (ms)
- * @param repositories
- * used to scope sync to queries associated with given repositories, can be null (sync all repositories)
- */
- public void synchNow(long delay, List<TaskRepository> repositories) {
- cancelAll();
- ScheduledTaskListSynchJob job = new ScheduledTaskListSynchJob(delay, TasksUiPlugin.getTaskListManager());
- job.setRepositories(repositories);
- addJobToQueue(job);
- startSynchJob();
- }
-
- public void propertyChange(PropertyChangeEvent event) {
- if (event.getProperty().equals(TasksUiPreferenceConstants.REPOSITORY_SYNCH_SCHEDULE_ENABLED)
- || event.getProperty().equals(TasksUiPreferenceConstants.REPOSITORY_SYNCH_SCHEDULE_MILISECONDS)) {
- cancelAll();
- startSynchJob();
- }
- }
-
- /**
- * for testing
- */
- public ScheduledTaskListSynchJob getRefreshJob() {
- return refreshJob;
- }
-
- public void cancelAll() {
- jobsQueue.clear();
- if (refreshJob != null) {
- if (!refreshJob.cancel()) {
-// try {
-// // Potential deadlock if synch job never ends bug#178745
-// // refreshJob.join();
-// } catch (InterruptedException e) {
-// // ignore
-// }
- }
- }
- }
-
- static class MutexRule implements ISchedulingRule {
- public boolean isConflicting(ISchedulingRule rule) {
- return rule == this;
- }
-
- public boolean contains(ISchedulingRule rule) {
- return rule == this;
- }
- }
-}
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 084e6c362..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskPriorityFilter.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;
-
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.tasks.core.AbstractTask.PriorityLevel;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @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 AbstractTaskContainer) {
- boolean exposeSubTasks = TasksUiPlugin.getDefault().groupSubtasks((AbstractTaskContainer) element);
- if (element instanceof AbstractTask) {
- AbstractTask task = (AbstractTask) element;
- if (shouldAlwaysShow(parent, task, exposeSubTasks)) {
- return true;
- }
- }
- 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 90e87bc16..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskRepositoryAdapterFactory.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;
-
-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.TasksUiPlugin;
-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 ("supportQuery".equals(name)) {
- AbstractRepositoryConnectorUi connector = TasksUiPlugin.getConnectorUi(repository.getConnectorKind());
- return null != connector.getQueryWizard(repository, null);
- } else if ("supportNewTask".equals(name)) {
- AbstractRepositoryConnector connector = TasksUiPlugin.getRepositoryManager()
- .getRepositoryConnector(repository.getConnectorKind());
- return connector.canCreateNewTask(repository);
- } else if ("hasRepository".equals(name)) {
- return !repository.getConnectorKind().equals(LocalRepositoryConnector.REPOSITORY_KIND);
- }
- return false;
- }
- };
- }
- return null;
- }
-
-}
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 69b2a7d62..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskSearchPage.java
+++ /dev/null
@@ -1,503 +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.Iterator;
-import java.util.List;
-
-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.wizard.WizardPage;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-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.TaskRepository;
-import org.eclipse.mylyn.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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.mylyn.tasks.ui.search.AbstractRepositoryQueryPage;
-import org.eclipse.search.internal.ui.SearchPlugin;
-import org.eclipse.search.ui.ISearchPage;
-import org.eclipse.search.ui.ISearchPageContainer;
-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.IEditorPart;
-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
- */
-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;
-
- public boolean performAction() {
- saveDialogSettings();
- String key = keyText.getText();
- if (key != null && key.trim().length() > 0) {
- key = key.trim();
- boolean openSuccessful = TasksUiUtil.openRepositoryTask(repository, key);
- if (!openSuccessful) {
- MessageDialog.openInformation(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
- ITasksUiConstants.TITLE_DIALOG, "No task found matching key: " + key);
-// new SearchDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow(), TaskSearchPage.ID).open();
- }
- return openSuccessful;
- } else {
- ISearchPage page = (ISearchPage) queryPages[currentPageIndex].getData(PAGE_KEY);
- return page.performAction();
- }
- }
-
- public void setContainer(ISearchPageContainer container) {
- this.pageContainer = container;
- }
-
- 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());
- }
- });
-// repositoryCombo.setLayoutData(new GridData(GridData));
- 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(TasksUiImages.getImage(TasksUiImages.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);
- pageContainer.setPerformActionEnabled(true);
- } else {
- setControlsEnabled(queryPages[currentPageIndex], true);
- pageContainer.setPerformActionEnabled(false);
- }
- }
-
- // TODO: make reusable or find better API, task editor has similar functionality
- private void setControlsEnabled(Control control, boolean enabled) {
- control.setEnabled(enabled);
- if (control instanceof Composite) {
- for (Control childControl : ((Composite) control).getChildren()) {
- childControl.setEnabled(enabled);
- setControlsEnabled(childControl, enabled);
- }
- }
- }
-
- private Control createPage(TaskRepository repository, ISearchPage 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(pageContainer);
- try {
- searchPage.createControl(pageWrapper);
- } catch (Exception e) {
- pageWrapper.dispose();
- searchPage.dispose();
-
- searchPage = new DeadSearchPage(repository);
- searchPage.setContainer(pageContainer);
- searchPage.createControl(fParentComposite);
- StatusHandler.log(e, "Error occurred while constructing search page for " + repository.getUrl() + " ["
- + repository.getConnectorKind() + "]");
- 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);
- ISearchPage page = (ISearchPage) queryPages[currentPageIndex].getData(PAGE_KEY);
- page.setVisible(false);
- GridData data = (GridData) queryPages[currentPageIndex].getLayoutData();
- data.exclude = true;
- queryPages[currentPageIndex].setLayoutData(data);
- }
-
- if (queryPages[pageIndex] == null) {
- String repositoryUrl = repositoryCombo.getItem(pageIndex);
- repository = TasksUiPlugin.getRepositoryManager().getRepository(repositoryUrl);
- if (repository != null) {
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(repository.getConnectorKind());
- if (connectorUi != null) {
- WizardPage searchPage = connectorUi.getSearchPage(repository, null);
- if (searchPage != null && searchPage instanceof ISearchPage) {
- queryPages[pageIndex] = createPage(repository, (ISearchPage) searchPage);
- }
- }
- }
- }
-
- 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);
- ISearchPage page = (ISearchPage) queryPages[pageIndex].getData(PAGE_KEY);
- page.setVisible(true);
- }
-
- currentPageIndex = pageIndex;
- fParentComposite.getParent().layout(true, true);
- updatePageEnablement();
- }
-
- @Override
- public void setVisible(boolean visible) {
- if (firstView) {
- getControl().setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
-
- List<TaskRepository> repositories = TasksUiPlugin.getRepositoryManager().getAllRepositories();
- List<TaskRepository> searchableRepositories = new ArrayList<TaskRepository>();
- for (TaskRepository repository : repositories) {
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(repository.getConnectorKind());
- if (connectorUi != null && connectorUi.hasSearchPage() && !repository.isOffline()) {
- searchableRepositories.add(repository);
- }
- }
-
- String[] repositoryUrls = new String[searchableRepositories.size()];
- int i = 0;
- int indexToSelect = 0;
- for (Iterator<TaskRepository> iter = searchableRepositories.iterator(); iter.hasNext();) {
- TaskRepository currRepsitory = iter.next();
- 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(), 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 = TasksUiPlugin.getRepositoryManager().getRepository(repositoryCombo.getText());
- 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() {
- // TODO: generalize selection resolution
- IEditorPart editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
- AbstractTask selectedTask = null;
- if (editor instanceof TaskEditor && ((TaskEditor) editor).getEditorInput() instanceof TaskEditorInput) {
- selectedTask = ((TaskEditorInput) ((TaskEditor) editor).getEditorInput()).getTask();
- }
- if (selectedTask == null) {
- TaskListView taskListView = TaskListView.getFromActivePerspective();
- if (taskListView != null) {
- selectedTask = taskListView.getSelectedTask();
- }
- }
-
- if (selectedTask != null) {
- TaskRepository repository = TasksUiPlugin.getRepositoryManager().getRepository(
- selectedTask.getRepositoryUrl());
- if (repository != null) {
- int index = 0;
- for (String repositoryUrl : repositoryCombo.getItems()) {
- if (repositoryUrl.equals(repository.getUrl())) {
- 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());
- }
- }
-// repositoryCombo.setFocus();
- }
- }
-
- 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) {
- ISearchPage page = (ISearchPage) control.getData(PAGE_KEY);
- page.dispose();
- }
- }
- }
- super.dispose();
- }
-
- private class DeadSearchPage extends AbstractRepositoryQueryPage {
-
- private TaskRepository taskRepository;
-
- public DeadSearchPage(TaskRepository rep) {
- super("Search page error");
- this.taskRepository = rep;
- }
-
- @Override
- 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(getRepository());
- // TODO: Re-construct this page with new
- // repository data
- }
-
- });
-
- GridDataFactory.fillDefaults().applyTo(hyperlink);
- setControl(hyperlink);
- }
-
- @Override
- public AbstractRepositoryQuery getQuery() {
- return null;
- }
-
- @Override
- public boolean isPageComplete() {
- return false;
- }
-
- public TaskRepository getRepository() {
- return taskRepository;
- }
-
- @Override
- public void setVisible(boolean visible) {
- super.setVisible(visible);
-
- if (visible) {
- scontainer.setPerformActionEnabled(false);
- }
- }
-
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskStatusMenuContributor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskStatusMenuContributor.java
deleted file mode 100644
index 5d0cfbab2..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskStatusMenuContributor.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;
-
-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.mylyn.internal.tasks.ui.actions.ClearOutgoingAction;
-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.MarkTaskReadAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.MarkTaskUnreadAction;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-
-/**
- * @author Rob Elves
- */
-public class TaskStatusMenuContributor implements IDynamicSubMenuContributor {
-
- private static final String LABEL = "Mark";
-
- public MenuManager getSubMenuManager(final List<AbstractTaskContainer> selectedElements) {
- final MenuManager subMenuManager = new MenuManager(LABEL);
- AbstractTask singleTask = null;
- if (selectedElements.size() == 1) {
- if (selectedElements.get(0) instanceof AbstractTask) {
- singleTask = (AbstractTask) selectedElements.get(0);
- }
- }
-
- Action action = new MarkTaskCompleteAction(selectedElements);
- if (singleTask != null && singleTask.isCompleted()) {
- action.setEnabled(false);
- }
- subMenuManager.add(action);
- action = new MarkTaskIncompleteAction(selectedElements);
- subMenuManager.add(action);
- if (singleTask != null && !singleTask.isCompleted()) {
- action.setEnabled(false);
- }
-
- subMenuManager.add(new Separator());
- action = new MarkTaskReadAction(selectedElements);
- subMenuManager.add(action);
- action = new MarkTaskUnreadAction(selectedElements);
- subMenuManager.add(action);
- action = new ClearOutgoingAction(selectedElements);
- subMenuManager.add(action);
- return subMenuManager;
- }
-
-} \ No newline at end of file
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 86dfae3a5..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskTransfer.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;
-
-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.AbstractTask;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.swt.dnd.ByteArrayTransfer;
-import org.eclipse.swt.dnd.TransferData;
-
-/**
- * @author Mik Kersten
- */
-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 AbstractTask[])) {
- return;
- }
-
- AbstractTask[] tasks = (AbstractTask[]) 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 (int i = 0; i < tasks.length; i++) {
- writeResource(dataOut, tasks[i]);
- }
-
- //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();
- AbstractTask[] results = new AbstractTask[count];
- for (int i = 0; i < count; i++) {
- results[i] = readTask(in);
- }
- return results;
- } catch (IOException e) {
- return null;
- }
- }
-
- private AbstractTask readTask(DataInputStream dataIn) throws IOException {
- String handle = dataIn.readUTF();
- return TasksUiPlugin.getTaskListManager().getTaskList().getTask(handle);
- }
-
- private void writeResource(DataOutputStream dataOut, AbstractTask 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 664fbefff..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskTrimWidget.java
+++ /dev/null
@@ -1,359 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.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.core.ScheduledTaskContainer;
-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.views.TaskListView;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.tasks.core.ITaskActivityListener;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-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.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 AbstractTask activeTask = null;
-
- private MenuManager menuManager = null;
-
- private Menu menu = null;
-
- private TaskListHyperlink activeTaskLabel;
-
- private OpenWithBrowserAction openWithBrowserAction = new OpenWithBrowserAction();
-
- private CopyTaskDetailsAction copyTaskDetailsAction = new CopyTaskDetailsAction(false);
-
- private Point p;
-
- private final ITaskActivityListener TASK_CHANGE_LISTENER = new ITaskActivityListener() {
-
- public void taskActivated(AbstractTask task) {
- activeTask = task;
- indicateActiveTask();
- }
-
- public void taskDeactivated(AbstractTask task) {
- activeTask = null;
- indicateNoActiveTask();
- }
-
- public void activityChanged(ScheduledTaskContainer week) {
- }
-
- public void taskListRead() {
- }
- };
-
- private IPropertyChangeListener SHOW_TRIM_LISTENER = new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- String property = event.getProperty();
- if(property.equals(TasksUiPreferenceConstants.SHOW_TRIM)) {
- setTrimVisible((Boolean) event.getNewValue());
- }
- }
- };
-
- public TaskTrimWidget() {
- TasksUiPlugin.getTaskListManager().addActivityListener(TASK_CHANGE_LISTENER);
- TasksUiPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(SHOW_TRIM_LISTENER);
- hookContextMenu();
- }
-
- private void setTrimVisible(boolean visible) {
- IWorkbenchWindow window = TasksUiPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow();
- IWindowTrim trim = ((WorkbenchWindow) window).getTrimManager().getTrim(
- "org.eclipse.mylyn.tasks.ui.trim.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;
-
- TasksUiPlugin.getTaskListManager().removeActivityListener(TASK_CHANGE_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);
-
- 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 = TasksUiPlugin.getTaskListManager().getTaskList().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();
- }
- TasksUiUtil.refreshAndOpenTaskListElement((TasksUiPlugin.getTaskListManager().getTaskList().getActiveTask()));
- }
- });
-
- activeTaskLabel.addMouseListener(new MouseAdapter() {
- @Override
- public void mouseDown(MouseEvent e) {
- // if (TaskListFilteredTree.super.filterText.getText().length()
- // > 0) {
- // TaskListFilteredTree.super.filterText.setText("");
- // TaskListFilteredTree.this.textChanged();
- // }
- if (TaskListView.getFromActivePerspective().getDrilledIntoCategory() != null) {
- TaskListView.getFromActivePerspective().goUpToRoot();
- }
- TasksUiUtil.refreshAndOpenTaskListElement((TasksUiPlugin.getTaskListManager().getTaskList()
- .getActiveTask()));
- }
- });
-
- 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() {
- TasksUiUtil.refreshAndOpenTaskListElement(activeTask);
- }
- });
-
- manager.add(openWithBrowserAction);
- if (activeTask.hasValidUrl()) {
- 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<AbstractTaskContainer> selectedElements = new ArrayList<AbstractTaskContainer>();
- 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 c6bcef8d2..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskWorkingSetFilter.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.IAdaptable;
-import org.eclipse.mylyn.internal.tasks.core.LocalTask;
-import org.eclipse.mylyn.internal.tasks.core.ScheduledTaskContainer;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.tasks.core.TaskList;
-import org.eclipse.ui.IWorkingSet;
-
-/**
- * AbstractTaskListFilter for task working sets
- *
- * @author Eugene Kuleshov
- */
-public class TaskWorkingSetFilter extends AbstractTaskListFilter {
-
- private final TaskList taskList;
-
- private IWorkingSet currentWorkingSet;
-
- public TaskWorkingSetFilter(TaskList taskList) {
- this.taskList = taskList;
- }
-
- @Override
- public boolean select(Object parent, Object element) {
- if (parent instanceof AbstractTaskContainer && !(parent instanceof AbstractTask)
- && !(parent instanceof ScheduledTaskContainer)) {
- return selectWorkingSet((AbstractTaskContainer) parent);
- }
- if (element instanceof LocalTask) {
- for (AbstractTaskContainer container : ((LocalTask) element).getParentContainers()) {
- return selectWorkingSet(container);
- }
- }
- if (element instanceof AbstractTask) {
- AbstractRepositoryQuery query = taskList.getQueryForHandle(((AbstractTask) element).getHandleIdentifier());
- if (query != null) {
- return selectWorkingSet(query);
- }
- }
- return true;
- }
-
- private boolean selectWorkingSet(AbstractTaskContainer container) {
- if (currentWorkingSet == null) {
- return true;
- }
- boolean seenTaskWorkingSets = false;
- String handleIdentifier = container.getHandleIdentifier();
- for (IAdaptable adaptable : currentWorkingSet.getElements()) {
- if (adaptable instanceof AbstractTaskContainer) {
- seenTaskWorkingSets = true;
- if (handleIdentifier.equals(((AbstractTaskContainer) adaptable).getHandleIdentifier())) {
- return true;
- }
- }
- }
- return !seenTaskWorkingSets;
- }
-
- public void setCurrentWorkingSet(IWorkingSet currentWorkingSet) {
- this.currentWorkingSet = currentWorkingSet;
- }
-}
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 2dec11baf..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksReminderDialog.java
+++ /dev/null
@@ -1,265 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.tasks.core.AbstractTask;
-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 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 (AbstractTask t : tasks) {
- t.setReminded(true);
- }
- okPressed();
- } else if (buttonId == DISMISS_ID) {
- Object sel = ((IStructuredSelection) tableViewer.getSelection()).getFirstElement();
- if (sel != null && sel instanceof AbstractTask) {
- AbstractTask t = (AbstractTask) sel;
- 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 AbstractTask) {
- AbstractTask t = (AbstractTask) sel;
- t.setReminded(false);
- t.setScheduledForDate(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 AbstractTask) {
- 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 int criteria;
-
- public ReminderTaskSorter(int criteria) {
- super();
- this.criteria = criteria;
- }
-
- @Override
- public int compare(Viewer viewer, Object obj1, Object obj2) {
- AbstractTask t1 = (AbstractTask) obj1;
- AbstractTask t2 = (AbstractTask) obj2;
-
- switch (criteria) {
- case DESCRIPTION:
- return compareDescription(t1, t2);
- case PRIORITY:
- return comparePriority(t1, t2);
- case DATE:
- return compareDate(t1, t2);
- default:
- return 0;
- }
- }
-
- private int compareDescription(AbstractTask task1, AbstractTask task2) {
- return task1.getSummary().compareToIgnoreCase(task2.getSummary());
- }
-
- private int comparePriority(AbstractTask task1, AbstractTask 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/TasksUiImages.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksUiImages.java
deleted file mode 100644
index 2d460f104..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksUiImages.java
+++ /dev/null
@@ -1,432 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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 Apr 20, 2004
- */
-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.resource.ImageRegistry;
-import org.eclipse.mylyn.tasks.core.AbstractTask.PriorityLevel;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * NOTE: if you create your own image descriptors you are responsible for disposing them.
- *
- * @author Mik Kersten
- */
-public class TasksUiImages {
-
- private static ImageRegistry imageRegistry;
-
- private static final String T_ELCL = "elcl16";
-
- private static final String T_EVIEW = "eview16";
-
- private static final String T_TOOL = "etool16";
-
- private static final String T_OBJ = "obj16";
-
- private static final String T_WIZBAN = "wizban";
-
- private static final String T_OVR = "ovr16";
-
- private static final URL baseURL = TasksUiPlugin.getDefault().getBundle().getEntry("/icons/");
-
- public static final ImageDescriptor TASK_ACTIVE = create(T_TOOL, "task-active.gif");
-
- public static final ImageDescriptor TASK_ACTIVE_CENTERED = create(T_TOOL, "task-active-centered.gif");
-
- public static final ImageDescriptor TASK_INACTIVE = create(T_TOOL, "task-inactive.gif");
-
- public static final ImageDescriptor TASK_INACTIVE_CONTEXT = create(T_TOOL, "task-context.gif");
-
- public static final ImageDescriptor TASK_COMPLETE = create(T_TOOL, "task-complete.gif");
-
- public static final ImageDescriptor TASK_INCOMPLETE = create(T_TOOL, "task-incomplete.gif");
-
- public static final ImageDescriptor TASK = create(T_TOOL, "task.gif");
-
- public static final ImageDescriptor TASK_COMPLETED = create(T_TOOL, "task-completed.gif");
-
- public static final ImageDescriptor TASK_NOTES = create(T_TOOL, "task-notes.gif");
-
- public static final ImageDescriptor TASK_NEW = create(T_TOOL, "task-new.gif");
-
- public static final ImageDescriptor TASK_REPOSITORY_HISTORY = create(T_TOOL, "task-repository-history.gif");
-
- public static final ImageDescriptor TASK_REPOSITORY_NOTES = create(T_TOOL, "task-repository-notes.gif");
-
- public static final ImageDescriptor TASK_REPOSITORY_COMPLETED = create(T_TOOL, "task-repository-completed.gif");
-
- public static final ImageDescriptor TASK_REMOTE = create(T_TOOL, "task-remote.gif");
-
- public static final ImageDescriptor TASK_WORKING_SET = create(T_TOOL, "open-task.gif");
-
- public static final ImageDescriptor TASKLIST = create("eview16", "task-list.gif");
-
- 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_SUBMIT = create(T_TOOL, "repository-submit.gif");
-
- public static final ImageDescriptor REPOSITORY_SMALL = create(T_OBJ, "repository-small.gif");
-
- public static final ImageDescriptor REPOSITORY_NEW = create("etool16", "repository-new.gif");
-
- public static final ImageDescriptor REPOSITORIES = create("eview16", "repositories.gif");
-
- public static final ImageDescriptor REMOVE = create(T_ELCL, "remove.gif");
-
- public static final ImageDescriptor DELETE = create(T_ELCL, "delete.gif");
-
- public static final ImageDescriptor FILTER_COMPLETE = create(T_ELCL, "filter-complete.gif");
-
- public static final ImageDescriptor FILTER_ARCHIVE = create(T_ELCL, "filter-archive.gif");
-
- public static final ImageDescriptor FILTER_PRIORITY = create(T_ELCL, "filter-priority.gif");
-
- public static final ImageDescriptor COLOR_PALETTE = create(T_ELCL, "color-palette.gif");
-
- public static final ImageDescriptor FILTER = create(T_TOOL, "view-filter.gif");
-
- public static final ImageDescriptor FIND_CLEAR = create(T_TOOL, "find-clear.gif");
-
- public static final ImageDescriptor FIND_CLEAR_DISABLED = create(T_TOOL, "find-clear-disabled.gif");
-
- public static final ImageDescriptor WARNING = create(T_ELCL, "warning.gif");
-
- public static final ImageDescriptor OVERLAY_WEB = create(T_TOOL, "overlay-web.gif");
-
- public static final ImageDescriptor OVERLAY_OFFLINE = create(T_EVIEW, "overlay-offline.gif");
-
- public static final ImageDescriptor BROWSER_SMALL = create(T_OBJ, "browser-small.gif");
-
- public static final ImageDescriptor BROWSER_OPEN_TASK = create(T_TOOL, "open-browser.gif");
-
- public static final ImageDescriptor OVERLAY_SYNCHRONIZING = create(T_EVIEW, "overlay-synchronizing.gif");
-
- public static final ImageDescriptor OVERLAY_HAS_DUE = create(T_EVIEW, "overlay-has-due.gif");
-
- public static final ImageDescriptor OVERLAY_OVER_DUE = create(T_EVIEW, "overlay-overdue.gif");
-
- public static final ImageDescriptor OVERLAY_SOLID_WHITE = create(T_OVR, "solid-white.gif");
-
- public static final ImageDescriptor TASK_WEB_REMOTE = create(T_TOOL, "overlay-web.gif");
-
- public static final ImageDescriptor CATEGORY = create(T_TOOL, "category.gif");
-
- public static final ImageDescriptor CATEGORY_NEW = create(T_TOOL, "category-new.gif");
-
- public static final ImageDescriptor CATEGORY_ARCHIVE = create(T_TOOL, "category-archive.gif");
-
- public static final ImageDescriptor TASK_REPOSITORY = create(T_TOOL, "task-repository.gif");
-
- public static final ImageDescriptor TASK_REPOSITORY_NEW = create(T_TOOL, "task-repository-new.gif");
-
- public static final ImageDescriptor TOOLBAR_ARROW_RIGHT = create(T_TOOL, "toolbar-arrow-right.gif");
-
- public static final ImageDescriptor TOOLBAR_ARROW_DOWN = create(T_TOOL, "toolbar-arrow-down.gif");
-
- public static final ImageDescriptor COMMENT = create(T_TOOL, "comment.gif");
-
- public static final ImageDescriptor LINK_EDITOR = create(T_TOOL, "link-editor.gif");
-
- public static final ImageDescriptor PERSON = create(T_TOOL, "person.gif");
-
- public static final ImageDescriptor PERSON_NARROW = create(T_TOOL, "person-narrow.gif");
-
- public static final ImageDescriptor PERSON_ME = create(T_TOOL, "person-me.gif");
-
- public static final ImageDescriptor PERSON_ME_NARROW = create(T_TOOL, "person-me-narrow.gif");
-
- public static final ImageDescriptor CONTEXT_FOCUS = create(T_EVIEW, "focus-view.gif");
-
- public static final ImageDescriptor CONTEXT_ATTACH = create(T_TOOL, "context-attach.gif");
-
- public static final ImageDescriptor CONTEXT_RETRIEVE = create(T_TOOL, "context-retrieve.gif");
-
- public static final ImageDescriptor CONTEXT_TRANSFER = create(T_TOOL, "context-transfer.gif");
-
- public static final ImageDescriptor CONTEXT_CLEAR = create(T_TOOL, "context-clear.gif");
-
- public static final ImageDescriptor ATTACHMENT_PATCH = create(T_OBJ, "attachment-patch.gif");
-
- public static final ImageDescriptor TASK_RETRIEVE = create(T_TOOL, "task-retrieve.gif");
-
- public static final ImageDescriptor OVERLAY_INCOMMING = create(T_EVIEW, "overlay-incoming.gif");
-
- public static final ImageDescriptor OVERLAY_INCOMMING_NEW = create(T_EVIEW, "overlay-incoming-new.gif");
-
- public static final ImageDescriptor OVERLAY_OUTGOING = create(T_EVIEW, "overlay-outgoing.gif");
-
- public static final ImageDescriptor OVERLAY_SYNCH_INCOMMING = create(T_EVIEW, "overlay-synch-incoming.gif");
-
- public static final ImageDescriptor OVERLAY_SYNCH_INCOMMING_NEW = create(T_EVIEW, "overlay-synch-incoming-new.gif");
-
- public static final ImageDescriptor OVERLAY_SYNCH_OUTGOING = create(T_EVIEW, "overlay-synch-outgoing.gif");
-
- public static final ImageDescriptor OVERLAY_CONFLICT = create(T_EVIEW, "overlay-conflicting.gif");
-
- public static final ImageDescriptor OVERLAY_REPOSITORY = create(T_EVIEW, "overlay-repository.gif");
-
- public static final ImageDescriptor OVERLAY_REPOSITORY_CONTEXT = create(T_EVIEW, "overlay-repository-context.gif");
-
- public static final ImageDescriptor OVERLAY_WARNING = create(T_OVR, "overlay-warning.gif");
-
- public static final ImageDescriptor OVERLAY_BLANK = create(T_OVR, "overlay-blank.gif");
-
- public static final ImageDescriptor STATUS_NORMAL = create(T_EVIEW, "status-normal.gif");
-
- public static final ImageDescriptor STATUS_CONTEXT = create(T_EVIEW, "status-server-context.gif");
-
- public static final ImageDescriptor QUERY = create(T_TOOL, "query.gif");
-
- public static final ImageDescriptor QUERY_NEW = create(T_TOOL, "query-new.gif");
-
- public static final ImageDescriptor REPOSITORY_SYNCHRONIZE = create(T_TOOL, "repository-synchronize.gif");
-
- public static final ImageDescriptor NAVIGATE_PREVIOUS = create(T_TOOL, "navigate-previous.gif");
-
- public static final ImageDescriptor NAVIGATE_PREVIOUS_PAUSE = create(T_TOOL, "navigate-previous-pause.gif");
-
- public static final ImageDescriptor NAVIGATE_PREVIOUS_ACTIVE = create(T_TOOL, "navigate-previous-active.gif");
-
- public static final ImageDescriptor CAPTURE_PAUSE = create(T_TOOL, "capture-pause.gif");
-
- public static final ImageDescriptor NAVIGATE_NEXT = create(T_TOOL, "navigate-next.gif");
-
- public static final ImageDescriptor TASKLIST_MODE = create(T_TOOL, "presentation.gif");
-
- public static final ImageDescriptor COPY = create(T_TOOL, "copy.png");
-
- public static final ImageDescriptor GO_UP = create(T_TOOL, "go-up.gif");
-
- public static final ImageDescriptor GO_INTO = create(T_TOOL, "go-into.gif");
-
- public static final ImageDescriptor REFRESH = create(T_ELCL, "refresh.gif");
-
- public static final ImageDescriptor REFRESH_SMALL = create(T_ELCL, "refresh-small.gif");
-
- public static final ImageDescriptor COLLAPSE_ALL = create(T_ELCL, "collapseall.png");
-
- public static final ImageDescriptor NOTIFICATION_CLOSE = create(T_EVIEW, "notification-close.gif");
-
- public static final ImageDescriptor EXPAND_ALL = create(T_ELCL, "expandall.gif");
-
- public static final ImageDescriptor REPLY = create(T_ELCL, "reply.gif");
-
- public static final ImageDescriptor PRIORITY_1 = create(T_EVIEW, "priority-1.gif");
-
- public static final ImageDescriptor PRIORITY_2 = create(T_EVIEW, "priority-2.gif");
-
- public static final ImageDescriptor PRIORITY_3 = create(T_EVIEW, "priority-3.gif");
-
- public static final ImageDescriptor PRIORITY_4 = create(T_EVIEW, "priority-4.gif");
-
- public static final ImageDescriptor PRIORITY_5 = create(T_EVIEW, "priority-5.gif");
-
- public static final ImageDescriptor CALENDAR = create(T_TOOL, "calendar.gif");
-
- public static final ImageDescriptor CALENDAR_SMALL = create(T_OBJ, "calendar-small.gif");
-
- public static final ImageDescriptor BANNER_REPOSITORY = create(T_WIZBAN, "banner-repository.gif");
-
- public static final ImageDescriptor BANNER_WORKING_SET = create(T_WIZBAN, "workset_wiz.png");
-
- public static final ImageDescriptor BANNER_REPOSITORY_SETTINGS = create(T_WIZBAN, "banner-repository-settings.gif");
-
- public static final ImageDescriptor BANNER_REPOSITORY_CONTEXT = create(T_WIZBAN, "banner-repository-context.gif");
-
- public static final ImageDescriptor BANNER_IMPORT = create(T_WIZBAN, "banner-import.gif");
-
- public static final ImageDescriptor BLANK_TINY = create(T_ELCL, "clearDot.gif");
-
- public static final ImageDescriptor BLANK = create(T_ELCL, "blank.gif");
-
- private static ImageDescriptor create(String prefix, String name) {
- try {
- return ImageDescriptor.createFromURL(makeIconFileURL(prefix, name));
- } catch (MalformedURLException e) {
- return ImageDescriptor.getMissingImageDescriptor();
- }
- }
-
-// private static ImageDescriptor createSize(ImageDescriptor base, Point size) {
-// return new TaskListImageDescriptor(base, size);
-// }
-
- /**
- * 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(true);
- imageRegistry.put("" + imageDescriptor.hashCode(), image);
- }
- return image;
- }
-
- public static Image getImageWithOverlay(ImageDescriptor icon, ImageDescriptor overlay, boolean top, boolean left) {
- if (icon == null) {
- return null;
- }
- String key = "" + icon.hashCode();
- if (overlay != null) {
- key += overlay.hashCode();
- }
- key += new Boolean(top).hashCode();
- key += new Boolean(left).hashCode();
-
- Image image = getImageRegistry().get(key);
-
- if (image == null) {
- TaskListImageDescriptor imageDescriptor = new TaskListImageDescriptor(icon, overlay, top, left);
- image = imageDescriptor.createImage(true);
- getImageRegistry().put(key, image);
- }
- return image;
- }
-
- /**
- * Lazily initializes image map.
- *
- * @param icon
- * cannot be null
- */
- public static Image getCompositeTaskImage(ImageDescriptor icon, ImageDescriptor overlayKind, boolean wide) {
- if (icon == null) {
- return null;
- }
- String key = "" + icon.hashCode();
- if (overlayKind != null) {
- key += overlayKind.hashCode();
- }
- if (wide) {
- key += ".wide";
- }
- Image image = getImageRegistry().get(key);
-
- if (image == null) {
- CompositeTaskImageDescriptor imageDescriptor = new CompositeTaskImageDescriptor(icon, overlayKind, wide);
- image = imageDescriptor.createImage(true);
- getImageRegistry().put(key, image);
- }
- return image;
- }
-
- public static Image getCompositeContainerImage(ImageDescriptor icon, boolean wide) {
- if (icon == null) {
- return null;
- }
- String key = "" + icon.hashCode();
- if (wide) {
- key += ".wide";
- }
- Image image = getImageRegistry().get(key);
- if (image == null) {
- CompositeContainerImageDescriptor imageDescriptor = new CompositeContainerImageDescriptor(icon,
- OVERLAY_BLANK, wide);
- image = imageDescriptor.createImage(true);
- getImageRegistry().put(key, image);
- }
- return image;
- }
-
- public static Image getCompositeSynchImage(ImageDescriptor icon, boolean background) {
- String key = "" + icon.hashCode();
- if (background) {
- key += ".background";
- }
-
- Image image = getImageRegistry().get(key);
- if (image == null) {
- CompositeSynchImageDescriptor imageDescriptor = new CompositeSynchImageDescriptor(icon, background);
- image = imageDescriptor.createImage(true);
- getImageRegistry().put(key, image);
- }
- return image;
- }
-
- private static ImageRegistry getImageRegistry() {
- if (imageRegistry == null) {
- imageRegistry = new ImageRegistry();
- }
-
- return imageRegistry;
- }
-
- 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());
- }
-
- private static Image[] progressImages;
-
- public static Image[] getProgressImages() {
-
- if (progressImages != null)
- return progressImages;
-
- progressImages = new Image[8];
-
- for (int i = 1; i <= 8; i++) {
- ImageDescriptor imageDescriptor = create(T_EVIEW + "/progress", i + ".png");
- progressImages[i - 1] = getImage(imageDescriptor);
- }
-
- return progressImages;
-
- }
-
- public static Image getImageForPriority(PriorityLevel priorityLevel) {
- if (priorityLevel == null) {
- return null;
- } else {
- ImageDescriptor imageDescriptor = getImageDescriptorForPriority(priorityLevel);
- if (imageDescriptor != null) {
- return TasksUiImages.getImage(imageDescriptor);
- }
- }
- return null;
- }
-
- public static ImageDescriptor getImageDescriptorForPriority(PriorityLevel priorityLevel) {
- if (priorityLevel == null) {
- return null;
- }
- switch (priorityLevel) {
- case P1:
- return TasksUiImages.PRIORITY_1;
- case P2:
- return TasksUiImages.PRIORITY_2;
- case P3:
- return TasksUiImages.PRIORITY_3;
- case P4:
- return TasksUiImages.PRIORITY_4;
- case P5:
- return TasksUiImages.PRIORITY_5;
- default:
- return null;
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksUiPreferenceConstants.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksUiPreferenceConstants.java
deleted file mode 100644
index 30703bf27..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksUiPreferenceConstants.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;
-
-/**
- * @author Mik Kersten
- */
-public final class TasksUiPreferenceConstants {
-
- 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";
-
- /**
- * Use GROUP_SUBTASKS instead, this option is no longer set or references.
- */
- @Deprecated
- public static final String FILTER_SUBTASKS = "org.eclipse.mylyn.tasks.ui.filters.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 PLANNING_ENDHOUR = "org.eclipse.mylyn.tasks.ui.planning.end.hour";
-
- public static final String PLANNING_STARTHOUR = "org.eclipse.mylyn.tasks.ui.planning.start.hour";
-
- public static final String EDITOR_TASKS_RICH = "org.eclipse.mylyn.tasks.ui.reporting.open.editor";
-
-// public static final String REPORTING_OPEN_EXTERNAL = "org.eclipse.mylyn.tasks.ui.reporting.open.external";
-//
-// public static final String REPORTING_OPEN_INTERNAL = "org.eclipse.mylyn.tasks.ui.reporting.open.internal";
-
-// public static final String REPORTING_DISABLE_INTERNAL = "org.eclipse.mylyn.tasks.ui.reporting.disable.internal";
-
- 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";
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/WorkspaceAwareContextStore.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/WorkspaceAwareContextStore.java
deleted file mode 100644
index e6b2ce0ce..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/WorkspaceAwareContextStore.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;
-
-import java.io.File;
-
-import org.eclipse.mylyn.context.core.AbstractContextStore;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @author Mik Kersten
- */
-public class WorkspaceAwareContextStore extends AbstractContextStore {
-
- public static final String CONTEXTS_DIRECTORY = "contexts";
-
- private File rootDirectory;
-
- private File contextDirectory;
-
- @Override
- public synchronized void init() {
-
- rootDirectory = new File(TasksUiPlugin.getDefault().getDataDirectory());
- if (!rootDirectory.exists()) {
- rootDirectory.mkdir();
- }
-
- contextDirectory = new File(rootDirectory, CONTEXTS_DIRECTORY);
- if (!contextDirectory.exists()) {
- contextDirectory.mkdir();
- }
- }
-
- @Override
- public File getRootDirectory() {
- return rootDirectory;
- }
-
- @Override
- public File getContextDirectory() {
- return contextDirectory;
- }
-}
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 b4efee317..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AbstractChangeCompletionAction.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 java.util.List;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-
-/**
- * @author Mik Kersten
- */
-public class AbstractChangeCompletionAction extends Action {
-
- protected boolean shouldEnable(List<AbstractTaskContainer> selectedElements) {
- boolean allLocalTasks = true;
- for (AbstractTaskContainer abstractTaskContainer : selectedElements) {
- if (!(abstractTaskContainer instanceof AbstractTask)) {
- 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 (AbstractTask 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 e3ebf3f27..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AbstractTaskAction.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.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @author Rob Elves
- */
-public abstract class AbstractTaskAction extends Action {
-
- protected List<AbstractTaskContainer> selectedElements;
-
- @Override
- public void run() {
- for (AbstractTaskContainer element : selectedElements) {
- if (element instanceof AbstractTask) {
- AbstractTask repositoryTask = (AbstractTask) element;
- performActionOnTask(repositoryTask);
- } else if (element instanceof AbstractRepositoryQuery) {
- AbstractRepositoryQuery repositoryQuery = (AbstractRepositoryQuery) element;
- for (AbstractTask queryHit : repositoryQuery.getChildren()) {
- performActionOnTask(queryHit);
- }
- } else if (element != null) {
- AbstractTaskContainer container = element;
- for (AbstractTask iTask : container.getChildren()) {
- if (iTask != null) {
- AbstractTask repositoryTask = iTask;
- performActionOnTask(repositoryTask);
- }
- }
- }
- }
- }
-
- protected abstract void performActionOnTask(AbstractTask repositoryTask);
-
- protected boolean containsArchiveContainer(List<AbstractTaskContainer> selectedElements) {
- return selectedElements.contains(TasksUiPlugin.getTaskListManager().getTaskList().getArchiveContainer());
- }
-
-}
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 09c629334..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AbstractTaskRepositoryAction.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.viewers.IStructuredSelection;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.ui.actions.BaseSelectionListenerAction;
-
-/**
- * @author Shawn Minto
- */
-public abstract class AbstractTaskRepositoryAction extends BaseSelectionListenerAction {
-
- public AbstractTaskRepositoryAction(String text) {
- super(text);
- }
-
- @Override
- protected boolean updateSelection(IStructuredSelection selection) {
- if (selection != null && !selection.isEmpty()) {
- Object selectedObject = selection.getFirstElement();
- if (selectedObject instanceof TaskRepository) {
- TaskRepository taskRepository = (TaskRepository) selectedObject;
- AbstractRepositoryConnector connector = TasksUiPlugin.getRepositoryManager().getRepositoryConnector(
- taskRepository.getConnectorKind());
- if (connector.isUserManaged()) {
- return true;
- }
- return false;
- }
- }
- return false;
- }
-
-}
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 59ce0ab59..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ActivateTaskDialogAction.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.action.IAction;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.window.Window;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.ui.TaskListManager;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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;
- }
-
- private static final String ACTIVATE_TASK_ACTION_DIALOG_SETTINGS = "activate.task.action.dialog.settings";
-
- @Override
- public void run(IAction action) {
- TaskSelectionDialog dlg = new TaskSelectionDialog(window.getShell());
- dlg.setTitle("Activate Task");
-
- IDialogSettings settings = TasksUiPlugin.getDefault().getDialogSettings();
- IDialogSettings dlgSettings = settings.getSection(ACTIVATE_TASK_ACTION_DIALOG_SETTINGS);
- if (dlgSettings == null) {
- dlgSettings = settings.addNewSection(ACTIVATE_TASK_ACTION_DIALOG_SETTINGS);
- }
- dlg.setDialogBoundsSettings(dlgSettings, Dialog.DIALOG_PERSISTLOCATION | Dialog.DIALOG_PERSISTSIZE);
-
- if (dlg.open() != Window.OK) {
- return;
- }
-
- Object result = dlg.getFirstResult();
- TaskListManager manager = TasksUiPlugin.getTaskListManager();
- if (result instanceof AbstractTask) {
- AbstractTask task = (AbstractTask) result;
- manager.activateTask(task);
-// manager.getTaskActivationHistory().addTask(task);
- }
- if (TaskListView.getFromActivePerspective() != null) {
- TaskListView.getFromActivePerspective().refreshAndFocus(false);
- }
- }
-
-}
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 1310899f4..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ActivateTaskHistoryDropDownAction.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.internal.tasks.ui.actions;
-
-import java.util.ArrayList;
-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.IAction;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.mylyn.internal.tasks.core.ScheduledTaskContainer;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskActivationHistory;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.tasks.core.ITaskActivityListener;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowPulldownDelegate;
-import org.eclipse.ui.IWorkingSet;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Wesley Coelho
- * @author Mik Kersten
- * @author Leo Dos Santos
- */
-public class ActivateTaskHistoryDropDownAction extends TaskNavigateDropDownAction implements
- IWorkbenchWindowPulldownDelegate, ITaskActivityListener {
-
- public static final String ID = "org.eclipse.mylyn.tasklist.actions.navigate.previous";
-
- private boolean scopeToWorkingSet = false;
-
- private static final String LABEL = "Activate Previous Task";
-
- public ActivateTaskHistoryDropDownAction() {
- this(TasksUiPlugin.getTaskListManager().getTaskActivationHistory(), false);
- }
-
- public ActivateTaskHistoryDropDownAction(TaskActivationHistory history, boolean scopeToWorkingSet) {
- super(history);
- setText(LABEL);
- setToolTipText(LABEL);
- setId(ID);
- setEnabled(true);
- setImageDescriptor(TasksUiImages.NAVIGATE_PREVIOUS);
- this.scopeToWorkingSet = scopeToWorkingSet;
- TasksUiPlugin.getTaskListManager().addActivityListener(this);
- }
-
- @Override
- public void dispose() {
- super.dispose();
- TasksUiPlugin.getTaskListManager().addActivityListener(this);
- }
-
- @Override
- protected void addActionsToMenu() {
- List<AbstractTask> tasks = new ArrayList<AbstractTask>(taskHistory.getPreviousTasks());
- Set<IWorkingSet> sets = TaskListView.getActiveWorkingSets();
- if (scopeToWorkingSet && !sets.isEmpty()) {
- Set<AbstractTask> allWorkingSetTasks = new HashSet<AbstractTask>();
- for (IWorkingSet workingSet : sets) {
- IAdaptable[] elements = workingSet.getElements();
- for (IAdaptable adaptable : elements) {
- if (adaptable instanceof AbstractTaskContainer) {
- allWorkingSetTasks.addAll(((AbstractTaskContainer) adaptable).getChildren());
- }
- }
- }
- List<AbstractTask> allScopedTasks = new ArrayList<AbstractTask>(tasks);
- for (AbstractTask 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());
- }
-
- for (int i = tasks.size() - 1; i >= 0; i--) {
- AbstractTask currTask = tasks.get(i);
- Action taskNavAction = new TaskNavigateAction(currTask);
- ActionContributionItem item = new ActionContributionItem(taskNavAction);
- if (currTask.isActive()) {
- taskNavAction.setChecked(true);
- }
- item.fill(dropDownMenu, -1);
- }
-
- Separator separator = new Separator();
- separator.fill(dropDownMenu, -1);
-
- AbstractTask active = TasksUiPlugin.getTaskListManager().getTaskList().getActiveTask();
- if (active != null) {
- Action deactivateAction = new DeactivateTaskAction();
- ActionContributionItem item = new ActionContributionItem(deactivateAction);
- item.fill(dropDownMenu, -1);
- } else {
- Action activateDialogAction = new ActivateDialogAction(new ActivateTaskDialogAction());
- ActionContributionItem item = new ActionContributionItem(activateDialogAction);
- item.fill(dropDownMenu, -1);
- }
- }
-
- @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().refreshAndFocus(false);
- }
- }
-
- setButtonStatus();
- // view.refreshAndFocus(false);
- // TasksUiUtil.refreshAndOpenTaskListElement(previousTask);
- }
- }
-
- public 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() {
- AbstractTask active = TasksUiPlugin.getTaskListManager().getTaskList().getActiveTask();
- if (active != null) {
- TasksUiPlugin.getTaskListManager().deactivateTask(active);
- }
- }
-
- }
-
- public class ActivateDialogAction extends Action {
-
- private 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);
- }
- }
-
- public void taskActivated(AbstractTask task) {
- // TODO: update label
- }
-
- public void taskDeactivated(AbstractTask task) {
- // TODO: update label
- }
-
- public void init(IWorkbenchWindow window) {
- }
-
- public void run(IAction action) {
- run();
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- }
-
- public void activityChanged(ScheduledTaskContainer week) {
- }
-
- public void calendarChanged() {
- }
-
- public void taskListRead() {
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ActivityReportAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ActivityReportAction.java
deleted file mode 100644
index dbc4e72b1..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ActivityReportAction.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.wizard.WizardDialog;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.internal.tasks.ui.planner.TaskActivityWizard;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Rob Elves
- */
-public class ActivityReportAction extends Action {
-
- private static final String LABEL = "Activity Report";
-
- public static final String ID = "org.eclipse.mylyn.tasklist.actions.report.activity";
-
- public ActivityReportAction() {
- super(LABEL);
- setId(ID);
- setText(LABEL);
- setToolTipText(LABEL);
- setImageDescriptor(TasksUiImages.TASKLIST);
- }
-
- @Override
- public void run() {
- TaskActivityWizard wizard = new TaskActivityWizard();
-
- Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- if (shell != null && !shell.isDisposed()) {
-
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.setBlockOnOpen(true);
- dialog.open();
-
- } else {
- // 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 f242355df..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AddRepositoryAction.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;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.mylyn.internal.tasks.ui.ITaskCommandIds;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.handlers.IHandlerService;
-
-/**
- * @author Mik Kersten
- */
-public class AddRepositoryAction extends Action {
-
- public static final String TITLE = "Add Task Repository";
-
- private static final String ID = "org.eclipse.mylyn.tasklist.repositories.add";
-
- public AddRepositoryAction() {
- setImageDescriptor(TasksUiImages.REPOSITORY_NEW);
- setText(TITLE);
- setId(ID);
- setEnabled(TasksUiPlugin.getRepositoryManager().hasUserManagedRepositoryConnectors());
- }
-
- @Override
- public void run() {
- IHandlerService handlerSvc = (IHandlerService) PlatformUI.getWorkbench().getService(IHandlerService.class);
- try {
- handlerSvc.executeCommand(ITaskCommandIds.ADD_TASK_REPOSITORY, null);
- } catch (Exception e) {
- StatusHandler.fail(e, e.getMessage(), true);
- }
- }
-
-}
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 152c3da2e..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AddRepositoryTaskAction.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.dialogs.Dialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.AddExistingTaskWizard;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-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() == Dialog.CANCEL) {
- dialog.close();
- return;
- }
- }
- } catch (Exception e) {
- StatusHandler.fail(e, e.getMessage(), true);
- }
- }
-
- 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/AttachFileAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AttachFileAction.java
deleted file mode 100644
index 6f6bfe69d..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AttachFileAction.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.actions;
-
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.NewAttachmentWizard;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.NewAttachmentWizardDialog;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.BaseSelectionListenerAction;
-
-/**
- * @author Mik Kersten
- */
-public class AttachFileAction extends BaseSelectionListenerAction {
-
- private TaskEditor editor;
-
- public AttachFileAction() {
- super("Attach File...");
- setId("org.eclipse.mylyn.tasks.ui.actions.add.attachment");
- }
-
- @Override
- public void run() {
- if (editor != null) {
- editor.showBusy(true);
- }
- Object selection = super.getStructuredSelection().getFirstElement();
- if (selection instanceof AbstractTask) {
- AbstractTask repositoryTask = (AbstractTask) selection;
- TaskRepository repository = TasksUiPlugin.getRepositoryManager().getRepository(
- repositoryTask.getConnectorKind(), repositoryTask.getRepositoryUrl());
-
- NewAttachmentWizard attachmentWizard = new NewAttachmentWizard(repository, repositoryTask);
- NewAttachmentWizardDialog dialog = new NewAttachmentWizardDialog(PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow()
- .getShell(), attachmentWizard);
- attachmentWizard.setDialog(dialog);
- dialog.create();
- int result = dialog.open();
- if (result != MessageDialog.OK && editor != null) {
- editor.showBusy(false);
- }
- }
- }
-
- public void setEditor(TaskEditor taskEditor) {
- this.editor = taskEditor;
- }
-}
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 785bd96fc..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ClearOutgoingAction.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 java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.tasks.core.AbstractTask.RepositoryTaskSyncState;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * 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 List<AbstractTaskContainer> selectedElements;
-
- public ClearOutgoingAction(List<AbstractTaskContainer> selectedElements) {
- this.selectedElements = selectedElements;
- setText(ACTION_NAME);
- setToolTipText(ACTION_NAME);
- setId(ID);
- if (selectedElements.size() == 1 && (selectedElements.get(0) instanceof AbstractTask)) {
- AbstractTask task = (AbstractTask) selectedElements.get(0);
- setEnabled(task.getSynchronizationState().equals(RepositoryTaskSyncState.OUTGOING));
- } else {
- setEnabled(false);
- }
- }
-
- @Override
- public void run() {
- ArrayList<AbstractTask> toClear = new ArrayList<AbstractTask>();
- for (Object selectedObject : selectedElements) {
- if (selectedObject instanceof AbstractTask
- && ((AbstractTask) selectedObject).getSynchronizationState().equals(
- RepositoryTaskSyncState.OUTGOING)) {
- toClear.add(((AbstractTask) selectedObject));
- }
- }
- if (toClear.size() > 0) {
- boolean confirm = MessageDialog.openConfirm(null, "Confirm discard", "Discard all outgoing changes?\n\n"
- + (toClear.get(0)).getSummary());
- if (confirm) {
- TasksUiPlugin.getSynchronizationManager().discardOutgoing(toClear.get(0));
- }
- }
- }
-}
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 32a95d6e1..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.jface.dialogs.MessageDialog;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.mylyn.internal.tasks.ui.ITasksUiConstants;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.CloneTaskWizard;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractRepositoryTaskEditor;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.BaseSelectionListenerAction;
-
-/**
- * @author Maarten Meijer
- */
-public class CloneTaskAction extends BaseSelectionListenerAction {
-
- private static final String LABEL = "Clone This Task";
-
- private static final String ID = "org.eclipse.mylyn.tasklist.actions.clone";
-
- public CloneTaskAction() {
- super(LABEL);
- setId(ID);
- setImageDescriptor(TasksUiImages.TASK_NEW);
-
- setAccelerator(SWT.MOD1 + 'd');
- }
-
- @Override
- public void run() {
- try {
- for (Object selectedObject : getStructuredSelection().toList()) {
- if (selectedObject instanceof AbstractTask) {
- AbstractTask task = (AbstractTask) selectedObject;
-
- CloneTaskWizard wizard = new CloneTaskWizard(task);
-
- Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- if (shell != null && !shell.isDisposed()) {
-
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.setBlockOnOpen(true);
- if (dialog.open() == WizardDialog.CANCEL) {
- return;
- }
-
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- AbstractRepositoryTaskEditor editor = null;
-
- String summary = "";
- String description = task.getUrl() + "\n" + task.getSummary();
-
- try {
- TaskEditor taskEditor = (TaskEditor) page.getActiveEditor();
- editor = (AbstractRepositoryTaskEditor) taskEditor.getActivePageInstance();
- } catch (ClassCastException e) {
- Clipboard clipboard = new Clipboard(page.getWorkbenchWindow().getShell().getDisplay());
- clipboard.setContents(new Object[] { summary + "\n" + description },
- new Transfer[] { TextTransfer.getInstance() });
-
- MessageDialog.openInformation(
- page.getWorkbenchWindow().getShell(),
- ITasksUiConstants.TITLE_DIALOG,
- "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.");
- return;
- }
-
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(task.getConnectorKind());
- String taskKindLabel;
- if (connectorUi != null) {
- taskKindLabel = connectorUi.getTaskKindLabel(task);
- } else {
- taskKindLabel = "task";
- }
-
- editor.setSummaryText(task.getSummary() + " (cloned)");
- editor.setDescriptionText("Clone of " + taskKindLabel + " " + CopyTaskDetailsAction.getTextForTask(task));
-
- // TODO: add all settable AbstractTask fields here
- } else {
- // ignore
- }
- }
- }
- } catch (NullPointerException npe) {
- StatusHandler.fail(npe, "Could not remove task from category, it may still be refreshing.", true);
- }
- }
-
-} \ 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 bc0e42e3d..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CollapseAllAction.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.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-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 TaskListView taskListView;
-
- public CollapseAllAction(TaskListView taskListView) {
- super(LABEL);
- this.taskListView = taskListView;
- setId(ID);
- setText(LABEL);
- setToolTipText(LABEL);
- setImageDescriptor(TasksUiImages.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/CopyAttachmentToClipboardJob.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CopyAttachmentToClipboardJob.java
deleted file mode 100644
index b64d3f367..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CopyAttachmentToClipboardJob.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.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.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractAttachmentHandler;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.RepositoryAttachment;
-import org.eclipse.mylyn.tasks.core.RepositoryStatus;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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 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 = TasksUiPlugin.getRepositoryManager().getRepository(attachment.getRepositoryKind(),
- attachment.getRepositoryUrl());
- AbstractRepositoryConnector connector = TasksUiPlugin.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) {
- StatusHandler.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 3c5b48a55..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CopyTaskDetailsAction.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.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.internal.tasks.ui.editors.RepositoryTaskSelection;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.swt.SWT;
-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 Clipboard clipboard;
-
- public CopyTaskDetailsAction(boolean setAccelerator) {
- super(LABEL);
- setToolTipText(LABEL);
- setId(ID);
- setImageDescriptor(TasksUiImages.COPY);
- if (setAccelerator) {
- setAccelerator(SWT.MOD1 + 'c');
- }
-
- Display display = PlatformUI.getWorkbench().getDisplay();
- clipboard = new Clipboard(display);
- }
-
- @Override
- public void run() {
- ISelection selection = super.getStructuredSelection();
- Object object = ((IStructuredSelection) selection).getFirstElement();
- String text = getTextForTask(object);
-
- TextTransfer textTransfer = TextTransfer.getInstance();
- if (text != null && !text.equals("")) {
- clipboard.setContents(new Object[] { text }, new Transfer[] { textTransfer });
- }
- }
-
- // TODO: make API?
- public static String getTextForTask(Object object) {
- String text = "";
- if (object instanceof AbstractTask) {
- AbstractTask task = null;
- if (object instanceof AbstractTask) {
- task = (AbstractTask) object;
- }
- if (task != null) {
- text += task.getTaskKey() + ": ";
-
- text += task.getSummary();
- if (task.hasValidUrl()) {
- text += "\n" + task.getUrl();
- }
- }
- } else if (object instanceof AbstractRepositoryQuery) {
- AbstractRepositoryQuery query = (AbstractRepositoryQuery) object;
- text += query.getSummary();
- text += "\n" + query.getUrl();
- } else if (object instanceof AbstractTaskContainer) {
- AbstractTaskContainer element = (AbstractTaskContainer) object;
- text = element.getSummary();
- } else if (object instanceof RepositoryTaskSelection) {
-
- RepositoryTaskSelection selection = (RepositoryTaskSelection) object;
- text += selection.getId() + ": " + selection.getBugSummary();
- AbstractRepositoryConnector connector = TasksUiPlugin.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 ddadf0a32..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.TasksUiPlugin;
-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) {
- TasksUiPlugin.getTaskListManager().deactivateAllTasks();
- }
-
-}
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 912daae3e..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DeleteAction.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.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.ContextCorePlugin;
-import org.eclipse.mylyn.internal.tasks.core.TaskCategory;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.internal.WorkbenchImages;
-
-/**
- * @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));
- }
-
- @Override
- public void run() {
- ISelection selection = TaskListView.getFromActivePerspective().getViewer().getSelection();
-
- List<?> toDelete = ((IStructuredSelection) selection).toList();
-
- String elements = "";
- int i = 0;
- for (Object object : toDelete) {
- i++;
- if (i < 20) {
- if (object instanceof AbstractTaskContainer) {
- elements += " " + ((AbstractTaskContainer) object).getSummary() + "\n";
- }
- } else {
- elements += "...";
- break;
- }
- }
-
- String message;
-
- if (toDelete.size() == 1) {
- Object object = toDelete.get(0);
- if (object instanceof AbstractTask) {
- 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? Contained tasks will still be available in the Archive";
- } else if (object instanceof AbstractRepositoryQuery) {
- message = "Permanently delete the query? Matching tasks will still be available in the Archive";
- } 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 AbstractTask) {
- AbstractTask task = null;
- task = (AbstractTask) selectedObject;
- TasksUiPlugin.getTaskListManager().deactivateTask(task);
- TasksUiPlugin.getTaskListManager().getTaskList().deleteTask(task);
- ContextCorePlugin.getContextManager().deleteContext(task.getHandleIdentifier());
- TasksUiUtil.closeEditorInActivePage(task, false);
- } else if (selectedObject instanceof AbstractRepositoryQuery) {
- // boolean deleteConfirmed =
- // MessageDialog.openQuestion(PlatformUI.getWorkbench()
- // .getActiveWorkbenchWindow().getShell(), "Confirm delete",
- // "Delete the selected query? Task data will not be deleted.");
- // if (deleteConfirmed) {
- TasksUiPlugin.getTaskListManager().getTaskList().deleteQuery((AbstractRepositoryQuery) 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 (AbstractTask task : cat.getChildren()) {
- ContextCorePlugin.getContextManager().deleteContext(task.getHandleIdentifier());
- TasksUiUtil.closeEditorInActivePage(task, false);
- }
- TasksUiPlugin.getTaskListManager().getTaskList().deleteCategory(cat);
- } 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 c2addf283..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DeleteTaskRepositoryAction.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.actions;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.internal.WorkbenchImages;
-
-/**
- * @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);
- }
-
- 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<AbstractRepositoryQuery> queries = TasksUiPlugin.getTaskListManager().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 (AbstractRepositoryQuery query : queries) {
- if (query.getRepositoryUrl().equals(taskRepository.getUrl())) {
- repositoriesInUse.add(taskRepository);
- break;
- }
- }
- }
- if (!repositoriesInUse.contains(taskRepository)) {
- repositoriesToDelete.add(taskRepository);
- }
- }
- }
-
- for (TaskRepository taskRepository : repositoriesToDelete) {
- TasksUiPlugin.getRepositoryManager().removeRepository(taskRepository,
- TasksUiPlugin.getDefault().getRepositoriesFilePath());
- }
-
- 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(e, e.getMessage(), true);
- }
- }
-}
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 085e90b7d..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DownloadAttachmentJob.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.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-
-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.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractAttachmentHandler;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.RepositoryAttachment;
-import org.eclipse.mylyn.tasks.core.RepositoryStatus;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @author Steffen Pingel
- */
-public class DownloadAttachmentJob extends Job {
-
- private final RepositoryAttachment attachment;
-
- private final File targetFile;
-
- public DownloadAttachmentJob(RepositoryAttachment 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
- protected IStatus run(IProgressMonitor monitor) {
- TaskRepository repository = TasksUiPlugin.getRepositoryManager().getRepository(attachment.getRepositoryKind(),
- this.attachment.getRepositoryUrl());
- AbstractRepositoryConnector connector = TasksUiPlugin.getRepositoryManager().getRepositoryConnector(
- this.attachment.getRepositoryKind());
- AbstractAttachmentHandler handler = connector.getAttachmentHandler();
- 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);
- handler.downloadAttachment(repository, attachment, out, monitor);
- } catch (final CoreException e) {
- StatusHandler.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 writing to attachment file.", e);
- } finally {
- if (out != null) {
- try {
- out.close();
- } catch (IOException e) {
- StatusHandler.fail(e, "Could not close attachment file: " + this.targetFile.getAbsolutePath(),
- false);
- }
- }
- }
-
- 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 3abb65de4..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/EditRepositoryPropertiesAction.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.viewers.IStructuredSelection;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-
-/**
- * @author Mik Kersten
- */
-public class EditRepositoryPropertiesAction extends AbstractTaskRepositoryAction {
-
- private static final String ID = "org.eclipse.mylyn.tasklist.repositories.properties";
-
- public EditRepositoryPropertiesAction() {
- super("Properties");
- setId(ID);
- setEnabled(false);
- }
-
- @Override
- protected boolean updateSelection(IStructuredSelection selection) {
- if (selection != null && !selection.isEmpty()) {
- Object selectedObject = selection.getFirstElement();
- if (selectedObject instanceof TaskRepository) {
- TaskRepository taskRepository = (TaskRepository) selectedObject;
- AbstractRepositoryConnector connector = TasksUiPlugin.getRepositoryManager().getRepositoryConnector(
- taskRepository.getConnectorKind());
- if (connector.isUserManaged()) {
- return true;
- }
- return false;
- }
- }
- return false;
- }
-
- @Override
- public void run() {
- IStructuredSelection selection = getStructuredSelection();
- if (selection.getFirstElement() instanceof TaskRepository) {
- TasksUiUtil.openEditRepositoryWizard((TaskRepository) selection.getFirstElement());
- }
- }
-}
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 d207bf2f8..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ExpandAllAction.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.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-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 TaskListView taskListView;
-
- public ExpandAllAction(TaskListView taskListView) {
- super(LABEL);
- this.taskListView = taskListView;
- setId(ID);
- setText(LABEL);
- setToolTipText(LABEL);
- setImageDescriptor(TasksUiImages.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 1390a1ef2..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/FilterArchiveContainerAction.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.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPreferenceConstants;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @author Mik Kersten
- */
-public class FilterArchiveContainerAction extends Action {
-
- public static final String ID = "org.eclipse.mylyn.tasklist.actions.filter.archive";
-
- private static final String LABEL = "Filter Archive Category";
-
- private final TaskListView view;
-
- public FilterArchiveContainerAction(TaskListView view) {
- this.view = view;
- setText(LABEL);
- setToolTipText(LABEL);
- setId(ID);
- setImageDescriptor(TasksUiImages.FILTER_ARCHIVE);
- setChecked(TasksUiPlugin.getDefault().getPreferenceStore().contains(
- TasksUiPreferenceConstants.FILTER_ARCHIVE_MODE));
- }
-
- @Override
- public void run() {
- TasksUiPlugin.getDefault().getPreferenceStore().setValue(TasksUiPreferenceConstants.FILTER_ARCHIVE_MODE,
- isChecked());
- if (isChecked()) {
- view.addFilter(view.getArchiveFilter());
- } else {
- view.removeFilter(view.getArchiveFilter());
- }
- this.view.getViewer().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 8735dbfda..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.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPreferenceConstants;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @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(TasksUiImages.FILTER_COMPLETE);
- setChecked(TasksUiPlugin.getDefault().getPreferenceStore().contains(
- TasksUiPreferenceConstants.FILTER_COMPLETE_MODE));
- }
-
- @Override
- public void run() {
- TasksUiPlugin.getDefault().getPreferenceStore().setValue(TasksUiPreferenceConstants.FILTER_COMPLETE_MODE,
- isChecked());
- if (isChecked()) {
- view.addFilter(view.getCompleteFilter());
- } else {
- view.removeFilter(view.getCompleteFilter());
- }
- this.view.getViewer().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 c95b7fdcb..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.tasks.ui.TasksUiImages;
-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(TasksUiImages.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 434df918b..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.tasks.ui.TasksUiImages;
-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(TasksUiImages.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 4fb25477b..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/GroupSubTasksAction.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.Action;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPreferenceConstants;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @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(
- TasksUiPreferenceConstants.GROUP_SUBTASKS));
- }
-
- @Override
- public void run() {
- TasksUiPlugin.getDefault().getPreferenceStore().setValue(TasksUiPreferenceConstants.GROUP_SUBTASKS,
- isChecked());
- // TODO: refresh not getting rid of subtasks
- 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 ed99999e4..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.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-
-/**
- * @author Willian Mitsuda
- */
-public class LinkWithEditorAction extends Action {
-
- private TaskListView taskListView;
-
- public LinkWithEditorAction(TaskListView taskListView) {
- super("&Link with Editor", IAction.AS_CHECK_BOX);
- setImageDescriptor(TasksUiImages.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 01201d444..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/MarkTaskCompleteAction.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.actions;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.tasks.core.TaskList;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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 List<AbstractTaskContainer> selectedElements;
-
- public MarkTaskCompleteAction(List<AbstractTaskContainer> 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 AbstractTask) {
- 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;
- }
- }
-
- TaskList taskList = TasksUiPlugin.getTaskListManager().getTaskList();
- for (AbstractTask task : toComplete) {
- taskList.markComplete(task, true);
- }
- }
-}
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 701936c11..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/MarkTaskIncompleteAction.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.actions;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.tasks.core.TaskList;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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 List<AbstractTaskContainer> selectedElements;
-
- public MarkTaskIncompleteAction(List<AbstractTaskContainer> 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 AbstractTask) {
- 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;
- }
- }
-
- TaskList taskList = TasksUiPlugin.getTaskListManager().getTaskList();
- for (AbstractTask task : toComplete) {
- taskList.markComplete(task, false);
- }
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/MarkTaskReadAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/MarkTaskReadAction.java
deleted file mode 100644
index 9b36ac3e8..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/MarkTaskReadAction.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 java.util.List;
-
-import org.eclipse.mylyn.internal.tasks.core.LocalTask;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @author Rob Elves
- */
-public class MarkTaskReadAction extends AbstractTaskAction {
-
- private static final String ACTION_NAME = "Read";
-
- public static final String ID = "org.eclipse.mylyn.tasklist.actions.mark.read";
-
- public MarkTaskReadAction(List<AbstractTaskContainer> selectedElements) {
- super.selectedElements = selectedElements;
- setText(ACTION_NAME);
- setToolTipText("Mark " + ACTION_NAME);
- setId(ID);
- if (containsArchiveContainer(selectedElements)) {
- setEnabled(false);
- } else {
- setEnabled(selectedElements.size() > 0);
- if (selectedElements.size() == 1 && (selectedElements.get(0) instanceof AbstractTask)) {
- AbstractTask task = (AbstractTask) selectedElements.get(0);
- setEnabled(!(task instanceof LocalTask));
- } else {
- setEnabled(true);
- }
- }
- }
-
- @Override
- protected void performActionOnTask(AbstractTask repositoryTask) {
- TasksUiPlugin.getSynchronizationManager().setTaskRead(repositoryTask, true);
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/MarkTaskUnreadAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/MarkTaskUnreadAction.java
deleted file mode 100644
index 29d93591e..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/MarkTaskUnreadAction.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 java.util.List;
-
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @author Rob Elves
- */
-public class MarkTaskUnreadAction extends AbstractTaskAction {
-
- private static final String ACTION_NAME = "Unread";
-
- public static final String ID = "org.eclipse.mylyn.tasklist.actions.mark.unread";
-
- public MarkTaskUnreadAction(List<AbstractTaskContainer> selectedElements) {
- this.selectedElements = selectedElements;
- setText(ACTION_NAME);
- setToolTipText(ACTION_NAME);
- setToolTipText("Mark " + ACTION_NAME);
- setId(ID);
- setImageDescriptor(TasksUiImages.OVERLAY_INCOMMING);
- if (containsArchiveContainer(selectedElements)) {
- setEnabled(false);
- } else {
- if (selectedElements.size() == 1 && (selectedElements.get(0) instanceof AbstractTask)) {
- AbstractTask task = (AbstractTask) selectedElements.get(0);
- setEnabled(!task.isLocal());
- } else {
- setEnabled(true);
- }
- }
- }
-
- @Override
- protected void performActionOnTask(AbstractTask repositoryTask) {
- TasksUiPlugin.getSynchronizationManager().setTaskRead(repositoryTask, false);
- }
-
-}
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 feb6f9942..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewCategoryAction.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.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.TaskCategory;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.AbstractTaskCategory;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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<AbstractRepositoryQuery> queries = TasksUiPlugin.getTaskListManager().getTaskList().getQueries();
- Set<AbstractTaskCategory> categories = TasksUiPlugin.getTaskListManager().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 (AbstractRepositoryQuery 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.getTaskListManager().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 9b9fed697..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewQueryAction.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.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.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.mylyn.internal.tasks.ui.LocalTaskConnectorUi;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.NewQueryWizard;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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 = TasksUiPlugin.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 LocalTaskConnectorUi)) {
- 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 LocalTaskConnectorUi) {
- 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() == Dialog.CANCEL) {
- dialog.close();
- return;
- }
- }
- } catch (Exception e) {
- StatusHandler.fail(e, e.getMessage(), true);
- }
- }
-
- 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/NewTaskAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewTaskAction.java
deleted file mode 100644
index 1aaf2a819..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewTaskAction.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.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.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.mylyn.internal.tasks.ui.LocalTaskConnectorUi;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.NewLocalTaskWizard;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.NewTaskWizard;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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 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() {
- IWizard wizard;
- List<TaskRepository> repositories = TasksUiPlugin.getRepositoryManager().getAllRepositories();
- if (localTask) {
- new NewLocalTaskWizard().performFinish();
- return;
- } else if (repositories.size() == 1) {
- // NOTE: this click-saving should be generalized
- TaskRepository taskRepository = repositories.get(0);
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(taskRepository.getConnectorKind());
- wizard = connectorUi.getNewTaskWizard(taskRepository);
- if (connectorUi instanceof LocalTaskConnectorUi) {
- wizard.performFinish();
- return;
- }
- } else if(skipRepositoryPage) {
- TaskRepository taskRepository = TasksUiUtil.getSelectedRepository();
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(taskRepository.getConnectorKind());
- wizard = connectorUi.getNewTaskWizard(taskRepository);
- if (connectorUi instanceof LocalTaskConnectorUi) {
- wizard.performFinish();
- return;
- }
- } else {
- wizard = new NewTaskWizard();
- }
-
- Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- if (shell != null && !shell.isDisposed()) {
-
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.setBlockOnOpen(true);
- dialog.open();
-
- } else {
- // ignore
- }
- }
-
- 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/OpenRepositoryTask.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenRepositoryTask.java
deleted file mode 100644
index 2f52f05a6..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenRepositoryTask.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.ITasksUiConstants;
-import org.eclipse.mylyn.internal.tasks.ui.commands.RemoteTaskSelectionDialog;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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()) {
- TasksUiPlugin.getTaskListManager().getTaskList().moveToContainer(dlg.getSelectedTask(),
- dlg.getSelectedCategory());
- }
- TasksUiUtil.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.openRepositoryTask(dlg.getSelectedTaskRepository(), id);
- if (opened) {
- openSuccessful = true;
- }
- }
- if (!openSuccessful) {
- MessageDialog.openInformation(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
- ITasksUiConstants.TITLE_DIALOG, "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 3767abf72..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTaskAction.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.actions;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.window.Window;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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;
- }
-
- private static final String OPEN_TASK_ACTION_DIALOG_SETTINGS = "open.task.action.dialog.settings";
-
- private static final String SHOW_IN_BROWSER_SETTING = "show.in.browser.setting";
-
- @Override
- public void run(IAction action) {
- TaskSelectionDialog dlg = new TaskSelectionDialog(window.getShell());
- dlg.setTitle("Open Task");
- dlg.setShowOpenInBrowserOption(true);
-
- IDialogSettings settings = TasksUiPlugin.getDefault().getDialogSettings();
- IDialogSettings dlgSettings = settings.getSection(OPEN_TASK_ACTION_DIALOG_SETTINGS);
- if (dlgSettings == null) {
- dlgSettings = settings.addNewSection(OPEN_TASK_ACTION_DIALOG_SETTINGS);
- }
- dlg.setDialogBoundsSettings(dlgSettings, Dialog.DIALOG_PERSISTLOCATION | Dialog.DIALOG_PERSISTSIZE);
- dlg.setOpenInBrowser(dlgSettings.getBoolean(SHOW_IN_BROWSER_SETTING));
-
- int ret = dlg.open();
- dlgSettings.put(SHOW_IN_BROWSER_SETTING, dlg.getOpenInBrowser());
- if (ret != Window.OK) {
- return;
- }
-
- Object result = dlg.getFirstResult();
- if (result instanceof AbstractTask) {
- AbstractTask task = (AbstractTask) result;
- if (dlg.getOpenInBrowser()) {
- if (task.hasValidUrl()) {
- TasksUiUtil.openUrl(task.getUrl(), false);
- }
- } else {
- TasksUiUtil.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 68749fbe8..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTaskListElementAction.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 java.util.Iterator;
-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.StructuredViewer;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-
-/**
- * @author Mik Kersten
- */
-public class OpenTaskListElementAction extends Action {
-
- public static final String ID = "org.eclipse.mylyn.tasklist.actions.open";
-
- private final StructuredViewer viewer;
-
- public OpenTaskListElementAction(StructuredViewer view) {
- this.viewer = view;
- setText("Open");
- setToolTipText("Open Task List Element");
- setId(ID);
- }
-
- @Override
- public void run() {
- ISelection selection = viewer.getSelection();
- List<?> list = ((IStructuredSelection) selection).toList();
- for (Iterator<?> iterator = list.iterator(); iterator.hasNext();) {
- Object element = iterator.next();
-// if (element instanceof ITaskListElement && !(element instanceof AbstractTaskContainer)) {
- if (element instanceof AbstractTask) {
- TasksUiUtil.refreshAndOpenTaskListElement((AbstractTaskContainer) element);
- }
- }
- }
-}
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 1366fd26c..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTaskSearchAction.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.actions;
-
-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.PlatformUI;
-
-/**
- * @author Mik Kersten
- */
-public class OpenTaskSearchAction implements IViewActionDelegate {
-
- public void init(IViewPart view) {
- // ignore
- }
-
- public void run(IAction action) {
- new SearchDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow(), TaskSearchPage.ID).open();
- }
-
- 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 77dc8734d..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenWithBrowserAction.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.actions;
-
-import java.util.Iterator;
-
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-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 AbstractTask) {
- AbstractTask task = (AbstractTask) selectedObject;
- if (task.hasValidUrl()) {
- urlString = task.getUrl();
- }
- } else if (selectedObject instanceof AbstractTaskContainer) {
- AbstractTaskContainer query = (AbstractTaskContainer) selectedObject;
- urlString = query.getUrl();
- }
-
- if (urlString != null) {
- TasksUiUtil.openUrl(urlString, false);
- }
- }
-}
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 2d3bcf07b..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/PresentationDropDownSelectionAction.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.actions;
-
-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.tasks.ui.TasksUiImages;
-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 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(TasksUiImages.TASKLIST_MODE);
- }
-
- 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() {
- // ignore
- }
-
- 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 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 2206e0a1e..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/QueryCloneAction.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.actions;
-
-import java.util.ArrayList;
-import java.util.List;
-
-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.ui.ITasksUiConstants;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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;
- AbstractRepositoryQuery selectedQuery = getSelectedQuery(selection);
- action.setEnabled(true);
- if (selectedQuery != null) {
- action.setEnabled(true);
- } else {
- action.setEnabled(false);
- }
- }
-
- protected AbstractRepositoryQuery 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 AbstractRepositoryQuery) {
- return (AbstractRepositoryQuery) selectedObject;
- }
- }
- }
- return null;
- }
-
- public void run(AbstractRepositoryQuery selectedQuery) {
- if (selectedQuery == null) {
- MessageDialog.openInformation(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
- ITasksUiConstants.TITLE_DIALOG, "No query selected.");
- return;
- }
-
- List<AbstractRepositoryQuery> queries = new ArrayList<AbstractRepositoryQuery>();
- queries.add(selectedQuery);
-
- Document queryDoc = TasksUiPlugin.getTaskListManager().getTaskListWriter().createQueryDocument(queries);
- List<AbstractRepositoryQuery> clonedQueries = TasksUiPlugin.getTaskListManager()
- .getTaskListWriter()
- .readQueryDocument(queryDoc);
-
- if (clonedQueries.size() > 0) {
- for (AbstractRepositoryQuery query : clonedQueries) {
- String handle = TasksUiPlugin.getTaskListManager().resolveIdentifiersConflict(query);
- query.setHandleIdentifier(handle);
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(query.getRepositoryKind());
- connectorUi.openEditQueryDialog(query);
- }
- } else {
- // cannot happen
- StatusHandler.fail(new IllegalStateException(selectedQuery.toString()), "Query cloning did not succeeded.", true);
- return;
- }
- }
-
-}
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 b48aca0d8..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/QueryExportAction.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.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.ui.ITasksUiConstants;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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<AbstractRepositoryQuery> selectedQueries = getSelectedQueries(selection);
- action.setEnabled(true);
- if (selectedQueries.size() > 0) {
- action.setEnabled(true);
- } else {
- action.setEnabled(false);
- }
- }
-
- @SuppressWarnings("unchecked")
- protected List<AbstractRepositoryQuery> getSelectedQueries(ISelection newSelection) {
- List<AbstractRepositoryQuery> selectedQueries = new ArrayList<AbstractRepositoryQuery>();
- if (selection instanceof StructuredSelection) {
- List selectedObjects = ((StructuredSelection) selection).toList();
- for (Object selectedObject : selectedObjects) {
- if (selectedObject instanceof AbstractRepositoryQuery) {
- selectedQueries.add((AbstractRepositoryQuery)selectedObject);
- }
- }
- }
- return selectedQueries;
- }
-
-
-
- public void run(List<AbstractRepositoryQuery> queries) {
- Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- FileDialog dialog = new FileDialog(shell, SWT.PRIMARY_MODAL | SWT.SAVE);
- dialog.setFilterExtensions(new String[] { "*" + ITasksUiConstants.FILE_EXTENSION });
- if (queries.size() == 1) {
- dialog.setFileName(queries.get(0).getHandleIdentifier());
- } else {
- String fomratString = "yyyy-MM-dd";
- SimpleDateFormat format = new SimpleDateFormat(fomratString, Locale.ENGLISH);
- String date = format.format(new Date());
- dialog.setFileName(date + "-exported-queries");
- }
-
- 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 77f36dd8c..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/QueryImportAction.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.actions;
-
-import java.io.File;
-import java.util.List;
-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.ui.ITasksUiConstants;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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
- }
-
- public void run() {
- Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- FileDialog dialog = new FileDialog(shell);
- dialog.setFilterExtensions(new String[] { "*" + ITasksUiConstants.FILE_EXTENSION });
-
- String path = dialog.open();
- if (path != null) {
- File file = new File(path);
- if (file.isFile()) {
- List<AbstractRepositoryQuery> 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.");
- return;
- }
- }
- }
- return;
- }
-
- /**
- * @param queries
- * @param repositories
- * @param shell
- */
- public void importQueries(List<AbstractRepositoryQuery> queries, Set<TaskRepository> repositories, Shell shell) {
- TasksUiPlugin.getRepositoryManager().insertRepositories(repositories,
- TasksUiPlugin.getDefault().getRepositoriesFilePath());
- List<AbstractRepositoryQuery> badQueries = TasksUiPlugin.getTaskListManager().insertQueries(queries);
-
- // notify user about importing
- String message = "The following queries were imported successfully: ";
- for (AbstractRepositoryQuery 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 (AbstractRepositoryQuery bad : badQueries) {
- message += "\n" + bad.getHandleIdentifier();
- }
- }
-
- MessageDialog.openInformation(shell, "Query Import Completed", message);
- }
-
-}
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 a553fa8fb..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RemoveFromCategoryAction.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.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.mylyn.internal.tasks.core.TaskCategory;
-import org.eclipse.mylyn.internal.tasks.ui.ITasksUiConstants;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @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(TasksUiImages.REMOVE);
- }
-
- @Override
- public void run() {
- try {
- ISelection selection = TaskListView.getFromActivePerspective().getViewer().getSelection();
- for (Object selectedObject : ((IStructuredSelection) selection).toList()) {
- if (selectedObject instanceof AbstractTask) { // && !((ITask) selectedObject).isLocal()) {
- AbstractTask task = (AbstractTask) selectedObject;
- if (task.isActive()) {
- MessageDialog.openInformation(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
- ITasksUiConstants.TITLE_DIALOG,
- "Task must be deactivated in order to remove from category.");
- return;
- }
-
- TreeItem item = this.view.getViewer().getTree().getSelection()[0];
- Set<AbstractTaskContainer> parentContainers = task.getParentContainers();
-
- if (item.getParentItem() != null && item.getParent().getData() instanceof TaskCategory) {
- TaskCategory category = (TaskCategory) item.getParentItem().getData();
- TasksUiPlugin.getTaskListManager().getTaskList().removeFromCategory(category, task);
- TasksUiPlugin.getTaskListManager().getTaskList().moveToContainer(task,
- TasksUiPlugin.getTaskListManager().getTaskList().getDefaultCategory());
- } else if (!task.isLocal() && parentContainers.contains(TasksUiPlugin.getTaskListManager().getTaskList().getDefaultCategory())) {
- TasksUiPlugin.getTaskListManager().getTaskList().moveToContainer(task, TasksUiPlugin.getTaskListManager().getTaskList().getArchiveContainer());
- } else if (parentContainers.contains(TasksUiPlugin.getTaskListManager().getTaskList().getDefaultCategory())) {
- MessageDialog.openInformation(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
- LABEL, "Can not remove from the default category, move to another category instead.");
- } else {
- TasksUiPlugin.getTaskListManager().getTaskList().moveToContainer(task,
- TasksUiPlugin.getTaskListManager().getTaskList().getDefaultCategory());
- }
-
- if (item.getParentItem() != null && item.getParentItem().getData() instanceof TaskCategory) {
-
- }
- }
- }
- } catch (NullPointerException npe) {
- StatusHandler.fail(npe, "Could not remove task from category, it may still be refreshing.", true);
- }
- }
-}
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 14c8b9dea..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.LocalTask;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.AbstractTaskCategory;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-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 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 AbstractTaskContainer) {
- AbstractTaskContainer element = (AbstractTaskContainer) 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.isUserDefined();
- } else if (selectedObject instanceof AbstractRepositoryQuery) {
- return true;
- }
- return (selectedObject instanceof LocalTask);
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ReportBugAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ReportBugAction.java
deleted file mode 100644
index 73c066a14..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ReportBugAction.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.actions;
-
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-
-/**
- * @author Mik Kersten
- */
-public class ReportBugAction extends NewTaskAction implements IWorkbenchWindowActionDelegate {
-
- public void dispose() {
- }
-
- public void init(IWorkbenchWindow window) {
- }
-}
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 bb58f27e7..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RestoreTaskListAction.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.actions;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.TaskDataImportWizard;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-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() == Dialog.CANCEL) {
- dialog.close();
- return;
- }
- }
- } catch (Exception e) {
- StatusHandler.fail(e, e.getMessage(), true);
- }
- }
-
- 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 3af2e2fa7..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 861ce2eed..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ShowInTaskListAction.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.viewers.IStructuredSelection;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-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 AbstractTask) {
- TaskListView.openInActivePerspective();
- 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 ad9d14183..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.tasks.ui.TasksUiPlugin;
-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) {
- TasksUiPlugin.getSynchronizationScheduler().synchNow(0, null);
- }
-
- 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 9c9955c40..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.TasksUiPreferenceConstants;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @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(
- TasksUiPreferenceConstants.REPOSITORY_SYNCH_SCHEDULE_ENABLED));
- }
-
- @Override
- public void run() {
- TasksUiPlugin.getDefault().getPreferenceStore().setValue(
- TasksUiPreferenceConstants.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 5ec4835eb..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/SynchronizeEditorAction.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.actions;
-
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.jobs.IJobChangeEvent;
-import org.eclipse.core.runtime.jobs.JobChangeAdapter;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractRepositoryTaskEditor;
-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";
-
- public static final String ID = "org.eclipse.mylyn.tasklist.actions.synchronize.editor";
-
- public SynchronizeEditorAction() {
- super(LABEL);
- setToolTipText(LABEL);
- setId(ID);
- setImageDescriptor(TasksUiImages.REFRESH_SMALL);
- // setAccelerator(SWT.MOD1 + 'r');
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public void run() {
- if (super.getStructuredSelection() != null) {
- for (Iterator iter = super.getStructuredSelection().iterator(); iter.hasNext();) {
- runWithSelection(iter.next());
- }
- }
- }
-
- private void runWithSelection(final Object selectedObject) {
- AbstractTask repositoryTask = null;
- if (selectedObject instanceof TaskEditor) {
- TaskEditor editor = (TaskEditor) selectedObject;
- AbstractTask task = editor.getTaskEditorInput().getTask();
- if (task != null) {
- repositoryTask = task;
- }
- } else if (selectedObject instanceof AbstractRepositoryTaskEditor) {
- AbstractRepositoryTaskEditor editor = (AbstractRepositoryTaskEditor) selectedObject;
- repositoryTask = editor.getRepositoryTask();
- }
-
- if (repositoryTask != null) {
- AbstractRepositoryConnector connector = TasksUiPlugin.getRepositoryManager().getRepositoryConnector(
- repositoryTask.getConnectorKind());
- if (connector != null) {
- TasksUiPlugin.getSynchronizationManager().synchronize(connector, repositoryTask, false,
- 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 b46fbbe0a..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/SynchronizeSelectedAction.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.core.runtime.jobs.Job;
-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.TaskCategory;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.RepositorySynchronizationManager;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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 Map<AbstractRepositoryConnector, List<AbstractRepositoryQuery>> queriesToSyncMap = new LinkedHashMap<AbstractRepositoryConnector, List<AbstractRepositoryQuery>>();
-
- private Map<AbstractRepositoryConnector, List<AbstractTask>> tasksToSyncMap = new LinkedHashMap<AbstractRepositoryConnector, List<AbstractTask>>();
-
- @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 AbstractRepositoryQuery) {
- final AbstractRepositoryQuery repositoryQuery = (AbstractRepositoryQuery) obj;
- AbstractRepositoryConnector client = TasksUiPlugin.getRepositoryManager().getRepositoryConnector(
- repositoryQuery.getRepositoryKind());
- if (client != null) {
- List<AbstractRepositoryQuery> queriesToSync = queriesToSyncMap.get(client);
- if (queriesToSync == null) {
- queriesToSync = new ArrayList<AbstractRepositoryQuery>();
- queriesToSyncMap.put(client, queriesToSync);
- }
- queriesToSync.add(repositoryQuery);
- }
- } else if (obj instanceof TaskCategory) {
- TaskCategory cat = (TaskCategory) obj;
- for (AbstractTask task : cat.getChildren()) {
- AbstractRepositoryConnector client = TasksUiPlugin.getRepositoryManager()
- .getRepositoryConnector(task.getConnectorKind());
- addTaskToSync(client, task);
- }
- } else if (obj instanceof AbstractTask) {
- AbstractTask repositoryTask = (AbstractTask) obj;
- AbstractRepositoryConnector client = TasksUiPlugin.getRepositoryManager().getRepositoryConnector(
- repositoryTask.getConnectorKind());
- addTaskToSync(client, repositoryTask);
- }
- }
-
- RepositorySynchronizationManager syncManager = TasksUiPlugin.getSynchronizationManager();
- if (!queriesToSyncMap.isEmpty()) {
-
- // determine which repositories to synch changed tasks for
- HashMap<TaskRepository, Set<AbstractRepositoryQuery>> repositoriesToSync = new HashMap<TaskRepository, Set<AbstractRepositoryQuery>>();
- for (AbstractRepositoryConnector connector : queriesToSyncMap.keySet()) {
- List<AbstractRepositoryQuery> queriesToSync = queriesToSyncMap.get(connector);
- if (queriesToSync == null || queriesToSync.isEmpty()) {
- continue;
- }
-
- for (AbstractRepositoryQuery query : queriesToSync) {
- TaskRepository repos = TasksUiPlugin.getRepositoryManager().getRepository(
- query.getRepositoryKind(), query.getRepositoryUrl());
- Set<AbstractRepositoryQuery> queries = repositoriesToSync.get(repos);
- if (queries == null) {
- queries = new HashSet<AbstractRepositoryQuery>();
- repositoriesToSync.put(repos, queries);
- }
- queries.add(query);
- }
- }
-
- for (Map.Entry<TaskRepository, Set<AbstractRepositoryQuery>> entry : repositoriesToSync.entrySet()) {
- TaskRepository repository = entry.getKey();
- AbstractRepositoryConnector connector = TasksUiPlugin.getRepositoryManager()
- .getRepositoryConnector(repository.getConnectorKind());
- Set<AbstractRepositoryQuery> queries = entry.getValue();
- syncManager.synchronize(connector, repository, queries, null, Job.LONG, 0L, true);
- }
- }
- if (!tasksToSyncMap.isEmpty()) {
- for (AbstractRepositoryConnector connector : tasksToSyncMap.keySet()) {
- List<AbstractTask> tasksToSync = tasksToSyncMap.get(connector);
- if (tasksToSync != null && tasksToSync.size() > 0) {
- syncManager.synchronize(connector, new HashSet<AbstractTask>(tasksToSync), true, null);
- }
- }
- }
-
- }
-
- queriesToSyncMap.clear();
- tasksToSyncMap.clear();
-
-// TasksUiPlugin.getTaskListManager().getTaskList().notifyContainerUpdated(null);
-
-// if (TaskListView.getFromActivePerspective() != null) {
-// TaskListView.getFromActivePerspective().getViewer().refresh();
-// }
- }
-
- private void addTaskToSync(AbstractRepositoryConnector client, AbstractTask repositoryTask) {
- if (client != null) {
- List<AbstractTask> tasksToSync = tasksToSyncMap.get(client);
- if (tasksToSync == null) {
- tasksToSync = new ArrayList<AbstractTask>();
- 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 d441a8ec1..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.TasksUiImages;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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.TASK_ACTIVE_CENTERED);
- }
-
- public void init(IViewPart view) {
- // ignore
- }
-
- @Override
- public void run() {
- run(TaskListView.getFromActivePerspective().getSelectedTask());
- }
-
- public void run(AbstractTask task) {
- if (task != null && !task.isActive()) {
- TasksUiPlugin.getTaskListManager().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 cca5db10d..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskDeactivateAction.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;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @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.TASK_INACTIVE);
- }
-
- public void run(AbstractTask task) {
- try {
- if (task != null) {
- TasksUiPlugin.getTaskListManager().deactivateTask(task);
- }
- } catch (Exception e) {
- StatusHandler.log(e, " Closing task editor on task deactivation failed");
- }
- }
-
- @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 93745adad..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskExportAction.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.tasks.ui.actions;
-
-import java.io.File;
-import java.io.UnsupportedEncodingException;
-import java.net.URLEncoder;
-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.ui.ITasksUiConstants;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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 AbstractTask) {
- 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[] { "*" + ITasksUiConstants.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) + ITasksUiConstants.FILE_EXTENSION);
- 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(AbstractTask task) {
- String encodedName = null;
- try {
- encodedName = URLEncoder.encode(task.getHandleIdentifier(), ITasksUiConstants.FILENAME_ENCODING);
- } catch (UnsupportedEncodingException e) {
- StatusHandler.fail(e, "Could not determine name for the selected task", false);
- }
-
- return encodedName;
- }
-
-}
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 4366e537b..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskImportAction.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.actions;
-
-import java.io.File;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-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.context.core.ContextCorePlugin;
-import org.eclipse.mylyn.internal.context.core.InteractionContext;
-import org.eclipse.mylyn.internal.tasks.ui.ITasksUiConstants;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.TaskList;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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
- }
-
- public void run() {
- Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- FileDialog dialog = new FileDialog(shell);
- dialog.setFilterExtensions(new String[] { "*" + ITasksUiConstants.FILE_EXTENSION });
-
- String path = dialog.open();
- if (path != null) {
- File file = new File(path);
- if (file.isFile()) {
-
- Map<AbstractTask, InteractionContext> taskContexts = new HashMap<AbstractTask, InteractionContext>();
-
- List<AbstractTask> readTasks = TasksUiPlugin.getTaskListManager().getTaskListWriter().readTasks(file);
- for (AbstractTask task : readTasks) {
- // deactivate all tasks
- task.setActive(false);
- taskContexts.put(task, ContextCorePlugin.getContextManager().loadContext(
- task.getHandleIdentifier(), file));
- }
- Set<TaskRepository> repositories = TasksUiPlugin.getTaskListManager()
- .getTaskListWriter()
- .readRepositories(file);
-
-
- if (taskContexts.size() > 0) {
- importTasks(taskContexts, repositories, 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;
- }
-
- public void refreshTaskListView() {
- if (TaskListView.getFromActivePerspective() != null) {
- TaskListView.getFromActivePerspective().refreshAndFocus(false);
- }
- }
-
- /**
- * @param queries
- * @param repositories
- * @param shell
- * @return true if any task imported
- */
- public void importTasks(Map<AbstractTask, InteractionContext> taskContexts, Set<TaskRepository> repositories,
- Shell shell) {
- TasksUiPlugin.getRepositoryManager().insertRepositories(repositories,
- TasksUiPlugin.getDefault().getRepositoriesFilePath());
-
- for (AbstractTask loadedTask : taskContexts.keySet()) {
- TaskList taskList = TasksUiPlugin.getTaskListManager().getTaskList();
- if (taskList.getTask(loadedTask.getHandleIdentifier()) != null) {
- boolean confirmed = MessageDialog.openConfirm(shell, ITasksUiConstants.TITLE_DIALOG, "Task '"
- + loadedTask.getSummary()
- + "' already exists. Do you want to override it's context with the source?");
- if (confirmed) {
- ContextCorePlugin.getContextManager().importContext(taskContexts.get(loadedTask));
- }
- } else {
- ContextCorePlugin.getContextManager().importContext(taskContexts.get(loadedTask));
- TasksUiPlugin.getTaskListManager().getTaskList().insertTask(loadedTask, null, null);
- }
- }
-
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskListElementPropertiesAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskListElementPropertiesAction.java
deleted file mode 100644
index 2b4189689..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskListElementPropertiesAction.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;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.mylyn.internal.tasks.core.TaskCategory;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-
-/**
- * @author Mik Kersten
- */
-public class TaskListElementPropertiesAction extends Action {
-
- public static final String ID = "org.eclipse.mylyn.tasklist.actions.properties";
-
- private final StructuredViewer viewer;
-
- public TaskListElementPropertiesAction(StructuredViewer view) {
- this.viewer = view;
- setText("Properties");
- setToolTipText("Properties");
- setId(ID);
-// setAccelerator(SWT.MOD1 + LegacyActionTools.findKeyCode("enter"));
- }
-
- @Override
- public void run() {
- ISelection selection = viewer.getSelection();
- Object element = ((IStructuredSelection) selection).getFirstElement();
- if (element instanceof TaskCategory || element instanceof AbstractRepositoryQuery) {
- TasksUiUtil.refreshAndOpenTaskListElement((AbstractTaskContainer) element);
- }
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskNavigateDropDownAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskNavigateDropDownAction.java
deleted file mode 100644
index 90b4d4079..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskNavigateDropDownAction.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.ui.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IMenuCreator;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskActivationHistory;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskElementLabelProvider;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Menu;
-
-/**
- * This abstract class contains some common code used by NextTaskDropDownAction and PreviousTaskDropDownAction
- *
- * @author Wesley Coelho
- * @author Mik Kersten
- */
-public abstract class TaskNavigateDropDownAction extends Action implements IMenuCreator {
-
- protected TaskActivationHistory taskHistory;
-
- protected Menu dropDownMenu = null;
-
- protected TaskElementLabelProvider labelProvider = new TaskElementLabelProvider(false);
-
- /** Maximum number of items to appear in the drop-down menu */
- protected final static int MAX_ITEMS_TO_DISPLAY = 12;
-
- public TaskNavigateDropDownAction(TaskActivationHistory history) {
- super();
- taskHistory = history;
- setMenuCreator(this);
- }
-
- /**
- * Action for navigating to a specified task. This class should be protected but has been made public for testing
- * only
- */
- public class TaskNavigateAction extends Action {
-
- private AbstractTask targetTask;
-
- private static final int MAX_LABEL_LENGTH = 40;
-
- public TaskNavigateAction(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);
- // taskHistory.navigatedToTask(targetTask);
-// taskHistory.addTask(targetTask);
- setButtonStatus();
-// view.refreshAndFocus(false);
-// TasksUiUtil.refreshAndOpenTaskListElement(targetTask);
- }
- }
-
- 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 setButtonStatus() {
- setEnabled(taskHistory.getPreviousTasks() != null && taskHistory.getPreviousTasks().size() > 0);
- // view.getNextTaskAction().setEnabled(taskHistory.hasNext());
- }
-
- protected abstract void addActionsToMenu();
-
-}
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 f56f230ae..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskSelectionDialog.java
+++ /dev/null
@@ -1,300 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.Collections;
-import java.util.HashSet;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.regex.Pattern;
-
-import org.eclipse.jface.text.ITextSelection;
-import org.eclipse.jface.viewers.ArrayContentProvider;
-import org.eclipse.jface.viewers.IOpenListener;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-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.ViewerComparator;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.mylyn.internal.tasks.ui.TaskListColorsAndFonts;
-import org.eclipse.mylyn.internal.tasks.ui.TaskSearchPage;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskElementLabelProvider;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListFilteredTree;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.tasks.core.TaskList;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.search.internal.ui.SearchDialog;
-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.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.Text;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.SelectionStatusDialog;
-import org.eclipse.ui.forms.events.HyperlinkEvent;
-import org.eclipse.ui.forms.events.IHyperlinkListener;
-import org.eclipse.ui.forms.widgets.ImageHyperlink;
-
-/**
- * @author Willian Mitsuda
- * @author Mik Kersten
- * @author Eugene Kuleshov
- */
-public class TaskSelectionDialog extends SelectionStatusDialog {
-
- /**
- * Implements a {@link ViewFilter} based on content typed in the filter field
- */
- private static class TaskFilter extends ViewerFilter {
-
- private Pattern pattern;
-
- public void setFilterText(String filterText) {
- if (filterText.trim().equals("")) {
- pattern = null;
- } else {
- filterText = filterText.replace("\\", "\\\\");
- filterText = filterText.replace(".", "\\.");
- filterText = filterText.replace("*", ".*");
- filterText = filterText.replace("?", ".?");
- pattern = Pattern.compile(filterText, Pattern.CASE_INSENSITIVE);
- }
- }
-
- @Override
- public boolean select(Viewer viewer, Object parentElement, Object element) {
- if (pattern == null) {
- return TasksUiPlugin.getTaskListManager().getTaskActivationHistory().getPreviousTasks().contains(
- element);
- }
- if (element instanceof AbstractTask) {
- AbstractTask repositoryTask = (AbstractTask) element;
- String taskString = repositoryTask.getTaskKey() + ": " + repositoryTask.getSummary();
- return pattern.matcher(taskString).find();
- } else if (element instanceof AbstractTask) {
- String taskString = ((AbstractTask) element).getSummary();
- return pattern.matcher(taskString).find();
- }
- return false;
- }
- }
-
- private TableViewer viewer;
-
- private Button openInBrowserCheck;
-
- private boolean openInBrowser;
-
- public boolean getOpenInBrowser() {
- return openInBrowser;
- }
-
- public void setOpenInBrowser(boolean openInBrowser) {
- this.openInBrowser = openInBrowser;
- }
-
- public TaskSelectionDialog(Shell parent) {
- super(parent);
- setShellStyle(getShellStyle() | SWT.RESIZE);
- }
-
- private boolean showOpenInBrowserOption;
-
- public void setShowOpenInBrowserOption(boolean showOpenInBrowserOption) {
- this.showOpenInBrowserOption = showOpenInBrowserOption;
- }
-
- public boolean getShowOpenInBrowserOption() {
- return showOpenInBrowserOption;
- }
-
- @Override
- protected Control createDialogArea(Composite parent) {
- Composite area = (Composite) super.createDialogArea(parent);
-
- Label message = new Label(area, SWT.NONE);
- message.setText("&Select a task to open (? = any character, * = any String):");
- final Text filterText = new Text(area, SWT.SINGLE | SWT.BORDER);
- filterText.setLayoutData(new GridData(SWT.FILL, SWT.DEFAULT, true, false));
-
- Label matches = new Label(area, SWT.NONE);
- matches.setText("&Matching tasks:");
- viewer = new TableViewer(area, SWT.SINGLE | SWT.BORDER);
- Control control = viewer.getControl();
- GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
- control.setLayoutData(gd);
- gd.widthHint = 400;
- gd.heightHint = 200;
-
- if (showOpenInBrowserOption) {
- openInBrowserCheck = new Button(area, SWT.CHECK);
- openInBrowserCheck.setText("Open with &Browser");
- openInBrowserCheck.setSelection(openInBrowser);
- }
-
- ImageHyperlink openHyperlink = new ImageHyperlink(area, SWT.NONE);
- openHyperlink.setText(TaskListFilteredTree.LABEL_SEARCH);
- openHyperlink.setForeground(TaskListColorsAndFonts.COLOR_HYPERLINK_WIDGET);
- openHyperlink.setUnderlined(true);
- openHyperlink.addHyperlinkListener(new IHyperlinkListener() {
-
- public void linkActivated(HyperlinkEvent e) {
- getShell().close();
- new SearchDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow(), TaskSearchPage.ID).open();
- }
-
- public void linkEntered(HyperlinkEvent e) {
- // ignore
- }
-
- public void linkExited(HyperlinkEvent e) {
- // ignore
- }
-
- });
-
- final TaskElementLabelProvider labelProvider = new TaskElementLabelProvider(true);
- viewer.setLabelProvider(labelProvider);
- viewer.setContentProvider(new ArrayContentProvider());
-
- // Compute all existing tasks or query hits (if corresponding task does
- // not exist yet...)
- Set<AbstractTaskContainer> allTasks = new HashSet<AbstractTaskContainer>();
- TaskList taskList = TasksUiPlugin.getTaskListManager().getTaskList();
- allTasks.addAll(taskList.getAllTasks());
- for (AbstractRepositoryQuery query : taskList.getQueries()) {
- allTasks.addAll(query.getChildren());
- }
-
- // Compute the task navigation history (in recent-to-older order)
- final List<AbstractTask> taskHistory = new ArrayList<AbstractTask>(TasksUiPlugin.getTaskListManager()
- .getTaskActivationHistory()
- .getPreviousTasks());
- Collections.reverse(taskHistory);
-
- // Compute the task set who will be presented on dialog; the trick to
- // make the task history appear first on the list is to add them before
- // all other tasks; being a LinkedHashSet, it will not be duplicated
- // (this is VERY IMPORTANT)
- Set<AbstractTaskContainer> taskSet = new LinkedHashSet<AbstractTaskContainer>(taskHistory);
- taskSet.addAll(allTasks);
- viewer.setInput(taskSet);
-
- final TaskSelectionDialog.TaskFilter filter = new TaskSelectionDialog.TaskFilter();
- viewer.addFilter(filter);
- viewer.setComparator(new ViewerComparator() {
-
- private AbstractTask getCorrespondingTask(Object o) {
- if (o instanceof AbstractTask) {
- return (AbstractTask) o;
- }
- return null;
- }
-
- @Override
- public int compare(Viewer viewer, Object e1, Object e2) {
- AbstractTask t1 = getCorrespondingTask(e1);
- AbstractTask t2 = getCorrespondingTask(e2);
- boolean isInHistory1 = taskHistory.contains(t1);
- boolean isInHistory2 = taskHistory.contains(t2);
-
- // Being on task history takes precedence...
- if (isInHistory1 && !isInHistory2) {
- return -1;
- }
- if (!isInHistory1 && isInHistory2) {
- return 1;
- }
-
- // Both are in task history; who is more recent?
- if (isInHistory1 && isInHistory2) {
- return taskHistory.indexOf(t1) - taskHistory.indexOf(t2);
- }
-
- // Both are not in task history; sort by summary...
- return labelProvider.getText(e1).compareTo(labelProvider.getText(e2));
- }
-
- });
- viewer.addOpenListener(new IOpenListener() {
-
- public void open(OpenEvent event) {
- if (getOkButton().getEnabled()) {
- okPressed();
- }
- }
-
- });
-
- filterText.addKeyListener(new KeyAdapter() {
-
- @Override
- public void keyPressed(KeyEvent e) {
- if (e.keyCode == SWT.ARROW_DOWN) {
- viewer.getControl().setFocus();
- }
- }
-
- });
- filterText.addModifyListener(new ModifyListener() {
-
- public void modifyText(ModifyEvent e) {
- filter.setFilterText(filterText.getText());
- viewer.refresh(false);
- Object first = viewer.getElementAt(0);
- if (first != null) {
- viewer.setSelection(new StructuredSelection(first));
- }
- }
-
- });
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- ISelection selection = window.getSelectionService().getSelection();
- if (selection instanceof ITextSelection) {
- String text = ((ITextSelection) selection).getText();
- int n = text.indexOf('\n');
- if (n > -1) {
- text.substring(0, n);
- }
- filterText.setText(text);
- filterText.setSelection(0, text.length());
- }
-
- return area;
- }
-
- @Override
- protected void computeResult() {
- setResult(((IStructuredSelection) viewer.getSelection()).toList());
- }
-
- @Override
- public boolean close() {
- if (openInBrowserCheck != null) {
- openInBrowser = openInBrowserCheck.getSelection();
- }
- return super.close();
- }
-
-}
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 4566b08e8..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskWorkingSetAction.java
+++ /dev/null
@@ -1,360 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.TasksUiImages;
-import org.eclipse.mylyn.internal.tasks.ui.dialogs.AbstractWorkingSetDialogCOPY;
-import org.eclipse.mylyn.internal.tasks.ui.workingsets.TaskWorkingSetUpdater;
-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 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 170ea269d..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ToggleAllWorkingSetsAction.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 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 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 6e8ccdbeb..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ToggleTaskActivationAction.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.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.mylyn.internal.tasks.core.ScheduledTaskContainer;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.ITaskActivityListener;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @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 AbstractTask task;
-
- private IToolBarManager toolBarManager;
-
- /**
- * @param task cannot be null
- * @param toolBarManager cannot be null
- */
- public ToggleTaskActivationAction(AbstractTask task, IToolBarManager toolBarManager) {
- this.task = task;
- this.toolBarManager = toolBarManager;
- setId(ID);
- setImageDescriptor(TasksUiImages.TASK_ACTIVE_CENTERED);
- update();
- TasksUiPlugin.getTaskListManager().addActivityListener(this);
- }
-
- public void dispose() {
- TasksUiPlugin.getTaskListManager().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()) {
- TasksUiPlugin.getTaskListManager().activateTask(task);
- } else {
- TasksUiPlugin.getTaskListManager().deactivateTask(task);
- }
- update();
-// toolBarManager.add(this);
- }
-
- public void activityChanged(ScheduledTaskContainer week) {
- // ignore
- }
-
- public void taskActivated(AbstractTask task) {
- update();
- toolBarManager.update(true);
- }
-
- public void taskDeactivated(AbstractTask task) {
- update();
- toolBarManager.update(true);
- }
-
- public void taskListRead() {
- // 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 9f8297248..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ToggleWorkingSetAction.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.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 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/AddTaskRepositoryHandler.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/AddTaskRepositoryHandler.java
deleted file mode 100644
index 79cb588bc..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/AddTaskRepositoryHandler.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.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.dialogs.MessageDialogWithToggle;
-import org.eclipse.jface.preference.IPreferenceStore;
-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.internal.tasks.ui.wizards.NewRepositoryWizard;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Handles the "add task repository" command
- *
- * @author Willian Mitsuda
- * @author Balazs Brinkus (bug 174473)
- */
-public class AddTaskRepositoryHandler extends AbstractHandler {
-
- private static final String PREF_ADD_QUERY = "org.eclipse.mylyn.internal.tasks.add.query";
-
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
- String param = event.getParameter("org.eclipse.mylyn.tasks.command.taskRepositoryId");
-
- NewRepositoryWizard repositoryWizard = new NewRepositoryWizard(param);
- Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- if (shell != null && !shell.isDisposed()) {
- WizardDialog repositoryDialog = new WizardDialog(shell, repositoryWizard);
- repositoryDialog.create();
- repositoryDialog.getShell().setText("Add Task Repository");
- repositoryDialog.setBlockOnOpen(true);
- repositoryDialog.open();
-
- if (repositoryDialog.getReturnCode() == Window.OK) {
-
- IPreferenceStore preferenceStore = TasksUiPlugin.getDefault().getPreferenceStore();
-
- if (!preferenceStore.getBoolean(PREF_ADD_QUERY)) {
- MessageDialogWithToggle messageDialog = MessageDialogWithToggle.openYesNoQuestion(
- PlatformUI.getWorkbench().getDisplay().getActiveShell(), "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() == 2) {
- TaskRepository taskRepository = repositoryWizard.getRepository();
-
- 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();
- }
- }
- }
-
- }
-
- return null;
- }
-}
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 df0327a37..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/RemoteTaskSelectionDialog.java
+++ /dev/null
@@ -1,328 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.internal.tasks.core.ITaskRepositoryFilter;
-import org.eclipse.mylyn.internal.tasks.ui.ITaskCommandIds;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskElementLabelProvider;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskRepositoryLabelProvider;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-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.TaskList;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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 AbstractTask)) {
- return false;
- }
- AbstractTask task = (AbstractTask) element;
- String taskId = task.getTaskKey();
- for (String id : selectedIds) {
- if (id.equals(taskId)) {
- return true;
- }
- }
- return false;
- }
-
- });
- tasksViewer.setInput(TasksUiPlugin.getTaskListManager().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 e) {
- IHandlerService hndSvc = (IHandlerService) PlatformUI.getWorkbench().getService(IHandlerService.class);
- try {
- hndSvc.executeCommand(ITaskCommandIds.ADD_TASK_REPOSITORY, null);
- repositoriesViewer.setInput(getTaskRepositories());
- } catch (CommandException ex) {
- StatusHandler.fail(ex, ex.getMessage(), true);
- }
- }
- });
-
- 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.getTaskListManager().getTaskList();
- LinkedList<AbstractTaskContainer> categories = new LinkedList<AbstractTaskContainer>(
- taskList.getUserCategories());
- categories.addFirst(taskList.getDefaultCategory());
- categoryViewer.setInput(categories);
- categoryViewer.setLabelProvider(new LabelProvider() {
-
- @Override
- public String getText(Object element) {
- if (element instanceof AbstractTaskContainer) {
- return ((AbstractTaskContainer) 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/TaskRepositoryParameterValues.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/TaskRepositoryParameterValues.java
deleted file mode 100644
index ffe2b1990..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/TaskRepositoryParameterValues.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.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.TasksUiPlugin;
-
-/**
- * Compute repository connectors type/label map
- *
- * @author Willian Mitsuda
- */
-public class TaskRepositoryParameterValues implements IParameterValues {
-
- public Map<String, String> getParameterValues() {
- Collection<AbstractRepositoryConnector> connectors = TasksUiPlugin.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/dialogs/AbstractWorkingSetDialogCOPY.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/AbstractWorkingSetDialogCOPY.java
deleted file mode 100644
index d630af370..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/dialogs/AbstractWorkingSetDialogCOPY.java
+++ /dev/null
@@ -1,429 +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 boolean canEdit;
-
- protected AbstractWorkingSetDialogCOPY(Shell parentShell, String[] workingSetIds, boolean canEdit) {
- super(parentShell);
- if (workingSetIds != null) {
- this.workingSetIds = new HashSet();
- for (int i = 0; i < workingSetIds.length; i++) {
- this.workingSetIds.add(workingSetIds[i]);
- }
- }
- 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() {
- 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() {
- public void widgetSelected(SelectionEvent e) {
- editSelectedWorkingSet();
- }
- });
-
- removeButton = createButton(
- buttonComposite,
- ID_REMOVE,
- WorkbenchMessages.WorkingSetSelectionDialog_removeButton_label,
- false);
- removeButton.setEnabled(false);
- removeButton.addSelectionListener(new SelectionAdapter() {
- 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() {
- public void widgetSelected(SelectionEvent e) {
- selectAllSets();
- }
- });
-
- deselectAllButton = createButton(
- buttonComposite,
- ID_DESELECTALL,
- WorkbenchMessages.SelectionDialog_deselectLabel,
- false);
- deselectAllButton.addSelectionListener(new SelectionAdapter() {
- 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()
- */
- 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 (int i = 0; i < recentWorkingSets.length; i++) {
- if (workingSet.equals(recentWorkingSets[i])) {
- 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/editors/AttachmentTableLabelProvider.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AttachmentTableLabelProvider.java
deleted file mode 100644
index a89759727..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AttachmentTableLabelProvider.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.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.tasks.ui.TaskListColorsAndFonts;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.core.AbstractAttachmentHandler;
-import org.eclipse.mylyn.tasks.core.RepositoryAttachment;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractRepositoryTaskEditor;
-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 IThemeManager themeManager = PlatformUI.getWorkbench().getThemeManager();
-
- public AttachmentTableLabelProvider(AbstractRepositoryTaskEditor AbstractTaskEditor, ILabelProvider provider,
- ILabelDecorator decorator) {
- this.AbstractTaskEditor = AbstractTaskEditor;
- }
-
- public Image getColumnImage(Object element, int columnIndex) {
- RepositoryAttachment attachment = (RepositoryAttachment) element;
- if (columnIndex == 0) {
- if (AbstractAttachmentHandler.MYLAR_CONTEXT_DESCRIPTION.equals(attachment.getDescription())
- || AbstractAttachmentHandler.MYLAR_CONTEXT_DESCRIPTION_LEGACY.equals(attachment.getDescription())) {
- return TasksUiImages.getImage(TasksUiImages.CONTEXT_TRANSFER);
- } else if (attachment.isPatch()) {
- return TasksUiImages.getImage(TasksUiImages.ATTACHMENT_PATCH);
- } else {
- 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:
- return " " + attachment.getDescription();
- case 1:
- if (attachment.isPatch()) {
- return "patch";
- } else {
- return attachment.getContentType();
- }
- case 2:
- return attachment.getCreator();
- case 3:
- // TODO should retrieve Date object from IOfflineTaskHandler
- return this.AbstractTaskEditor.formatDate(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(TaskListColorsAndFonts.THEME_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);
- }
-
- 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");*/
- }
-
- public Point getToolTipShift(Object object) {
- return new Point(5, 5);
- }
-
- public int getToolTipDisplayDelayTime(Object object) {
- return 200;
- }
-
- public int getToolTipTimeDisplayed(Object object) {
- return 5000;
- }
-
- 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 52ac2a18d..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.tasks.core.RepositoryAttachment;
-
-/**
- * @author Mik Kersten
- */
-public class AttachmentsTableContentProvider implements IStructuredContentProvider {
-
- private 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/CategoryEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/CategoryEditor.java
deleted file mode 100644
index e5820fcce..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/CategoryEditor.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.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() {
- }
-
- @SuppressWarnings("deprecation")
- @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 aa50e74f2..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/CategoryEditorInput.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.editors;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.mylyn.internal.tasks.core.TaskCategory;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IPersistableElement;
-
-/**
- * @author Ken Sueda
- */
-public class CategoryEditorInput implements IEditorInput {
-
- private 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.getTaskListManager().getTaskList().renameContainer(category, description);
-// category.setDescription(summary);
- }
-
- public void setUrl(String url) {
- category.setUrl(url);
- Set<AbstractTaskContainer> updated = new HashSet<AbstractTaskContainer>();
- updated.add(category);
- TasksUiPlugin.getTaskListManager().getTaskList().notifyContainersUpdated(updated);
-// .notifyContainerUpdated(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/EditorBusyIndicator.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/EditorBusyIndicator.java
deleted file mode 100644
index 136c5102e..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/EditorBusyIndicator.java
+++ /dev/null
@@ -1,177 +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 java.util.Timer;
-import java.util.TimerTask;
-
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-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
- */
-public class EditorBusyIndicator {
-
- private boolean showingBusy = false;
-
- private Image[] images;
-
- private TimerTask animateTask;
-
- private IBusyEditor editor;
-
- private Image oldImage;
-
- public EditorBusyIndicator(IBusyEditor editor) {
- this.editor = editor;
- }
-
- /**
- * Stop showing the busy cursor.
- */
- public void stopBusy() {
-
- if (!showingBusy || isDisposed())
- return;
-
- showingBusy = false;
- if (animateTask != null) {
- animateTask.cancel();
- animateTask = null;
- }
-
- updateTitleImage(oldImage);
- }
-
- /**
- * Start the busy indication.
- */
- public void startBusy() {
-
- if (showingBusy || isDisposed())
- return;
-
- showingBusy = true;
-
- oldImage = editor.getTitleImage();
-
- try {
- if (images == null) {
- images = TasksUiImages.getProgressImages();// If we fail to
- // load do not
- // continue
- if (images == null) {
- showingBusy = false;
- return;
- }
- }
-
- if (images.length > 1) {
-
- Timer animateTimer = new Timer();
- if (animateTask == null)
- animateTimer.schedule(getTimerTask(), 0);
- }
- } catch (SWTException ex) {
- WorkbenchPlugin.log(ex);
- }
- }
-
- /**
- * Get the timer task for the receiver.
- *
- * @param background
- * @param display
- * @return TimerTask
- */
- private TimerTask getTimerTask() {
-
- animateTask = new TimerTask() {
-
- @Override
- public void run() {
-
- try {
- int imageDataIndex = 0;
-
- Image image = images[imageDataIndex];
-
- while (showingBusy) {
-
- updateTitleImage(image);
-
- imageDataIndex = (imageDataIndex + 1) % images.length;
- image = images[imageDataIndex];
-
- try {
- Thread.sleep(90);
- } catch (InterruptedException e) {
- }
-
- if (images == null)
- return;
- }
- } catch (SWTException ex) {
- WorkbenchPlugin.log(ex);
- } catch (NullPointerException e) {
- // we will get this if the timer continues to run after the
- // images have been disposed
- } finally {
-
- }
- }
-
- };
-
- return animateTask;
- }
-
- private void updateTitleImage(final Image image) {
- if (PlatformUI.getWorkbench().isClosing()) {
- return;
- } else {
- PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
- public void run() {
- if ((image == null || !image.isDisposed()) && !isDisposed() && showingBusy) {
- editor.setTitleImage(image);
- } else {
- if (oldImage != null && !oldImage.isDisposed()) {
- editor.setTitleImage(oldImage);
- }
- }
-
- }
- });
- }
- }
-
- private boolean isDisposed = false;
-
- public void dispose() {
- if (!isDisposed) {
- if (animateTask != null)
- animateTask.cancel();
- // if (images != null) {
- // for (int i = 0; i < images.length; i++) {
- // images[i].dispose();
- // }
- // }
- // images = null;
- isDisposed = true;
- }
- }
-
- public boolean isDisposed() {
- return isDisposed;
- }
-
-}
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 475a26ec7..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.tasks.core.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/RepositoryAttachmentEditorInput.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryAttachmentEditorInput.java
deleted file mode 100644
index c05d72888..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.tasks.core.AbstractAttachmentHandler;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.RepositoryAttachment;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.ui.IPersistableElement;
-import org.eclipse.ui.IStorageEditorInput;
-
-/**
- * @author Jeff Pound
- */
-public class RepositoryAttachmentEditorInput extends PlatformObject implements IStorageEditorInput {
-
- private RepositoryAttachment attachment;
-
- private RepositoryAttachmentStorage storage;
-
- private 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 {
- AbstractRepositoryConnector connector = TasksUiPlugin.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/RepositoryTaskOutlineComparer.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTaskOutlineComparer.java
deleted file mode 100644
index c4d5319fd..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTaskOutlineComparer.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.editors;
-
-import org.eclipse.jface.viewers.IElementComparer;
-
-/**
- * This class is used to compare two <code>IRepositoryTaskSelection</code> objects.
- *
- * @see IElementComparer
- * @see IRepositoryTaskSelection
- */
-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 ed479bf12..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTaskOutlineNode.java
+++ /dev/null
@@ -1,328 +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.Iterator;
-import java.util.Locale;
-
-import org.eclipse.mylyn.tasks.core.TaskComment;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-
-/**
- * A node for the tree in the <code>RepositoryTaskOutlinePage</code>.
- *
- * @author Mik Kersten (hardening of prototype)
- */
-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;
-
- /** 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 String bugSummary;
-
- private 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 key, Object data, String summary) {
- this.id = id;
- this.server = server;
- 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.getId();
- String bugServer = bug.getRepositoryUrl();
- RepositoryTaskOutlineNode topNode = new RepositoryTaskOutlineNode(bugId, bugServer, bug.getLabel(), bug,
- bug.getSummary());
-
- RepositoryTaskOutlineNode desc = new RepositoryTaskOutlineNode(bugId, bugServer, LABEL_DESCRIPTION,
- bug.getDescription(), bug.getSummary());
- desc.setIsDescription(true);
-
- topNode.addChild(desc);
-
- RepositoryTaskOutlineNode comments = null;
- for (Iterator<TaskComment> iter = bug.getComments().iterator(); iter.hasNext();) {
- TaskComment taskComment = iter.next();
- // first comment is the bug summary
- if (taskComment.getNumber() == 0)
- continue;
- if (comments == null) {
- comments = new RepositoryTaskOutlineNode(bugId, bugServer, LABEL_COMMENTS, taskComment,
- bug.getSummary());
- comments.setIsCommentHeader(true);
- }
- comments.addChild(new RepositoryTaskOutlineNode(bugId, bugServer, taskComment.getCreated(), taskComment,
- bug.getSummary()));
- }
- if (comments != null) {
- topNode.addChild(comments);
- }
-
- if (hasNewComment) {
- topNode.addChild(new RepositoryTaskOutlineNode(bugId, bugServer, LABEL_NEW_COMMENT, null, bug.getSummary()));
- }
-
- RepositoryTaskOutlineNode titleNode = new RepositoryTaskOutlineNode(bugId, bugServer, "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 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 f5d5b372d..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTaskOutlinePage.java
+++ /dev/null
@@ -1,178 +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.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.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.TaskComment;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractRepositoryTaskEditor;
-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>.
- */
-public class RepositoryTaskOutlinePage extends ContentOutlinePage {
-
- private RepositoryTaskOutlineNode topTreeNode;
-
- protected final ISelectionListener selectionListener = new ISelectionListener() {
- public void selectionChanged(IWorkbenchPart part, ISelection selection) {
- if ((part instanceof AbstractRepositoryTaskEditor) && (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;
- }
-
- @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 TasksUiImages.getImage(TasksUiImages.COMMENT);
- }
- if (RepositoryTaskOutlineNode.LABEL_DESCRIPTION.equals(node.getContents())) {
- return TasksUiImages.getImage(TasksUiImages.TASK_NOTES);
- } else if (node.getComment() != null) {
- return TasksUiImages.getImage(TasksUiImages.PERSON);
- } else {
- return TasksUiImages.getImage(TasksUiImages.TASK_REPOSITORY);
- }
- } 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() + ")";
-// }
- return n + ": " + comment.getAuthorName() + " (" + node.getName() + ")";
- }
- return super.getText(element);
- }
- });
- try {
- viewer.setInput(topTreeNode);
- viewer.setComparer(new RepositoryTaskOutlineComparer());
- viewer.expandAll();
- } catch (Exception e) {
- StatusHandler.fail(e, "could not create bugzilla outline", true);
- }
- 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 bf1602fee..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTaskSelection.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.editors;
-
-import org.eclipse.mylyn.tasks.core.TaskComment;
-
-/**
- * A selection of an element in a view.
- */
-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 3bbef3229..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTextViewer.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.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;
-
-/**
- * @author Rob Elves
- */
-public class RepositoryTextViewer extends SourceViewer {
-
- private TaskRepository repository;
-
- public RepositoryTextViewer(IVerticalRuler vertRuler, IOverviewRuler overRuler, TaskRepository repository,
- Composite composite, int style) {
- super(composite, vertRuler, overRuler, true, style);
-
- this.repository = repository;
-
- }
-
- public RepositoryTextViewer(TaskRepository repository, Composite composite, int style) {// FormEditor
- super(composite, null, style);
- 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;
- }
-
-}
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 046dc5a02..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/SpellingDialog.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.editors;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-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 String title;
-
- private Text wordToFix;
-
- private List suggestions;
-
- private 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() == Dialog.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/TaskEditorActionContributor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorActionContributor.java
deleted file mode 100644
index e1e7e84c2..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorActionContributor.java
+++ /dev/null
@@ -1,420 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.mylyn.internal.tasks.ui.AddExistingTaskJob;
-import org.eclipse.mylyn.internal.tasks.ui.IDynamicSubMenuContributor;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.internal.tasks.ui.actions.AttachFileAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.CopyTaskDetailsAction;
-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.views.TaskListView;
-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.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractRepositoryTaskEditor;
-import org.eclipse.mylyn.tasks.ui.editors.NewTaskEditorInput;
-import org.eclipse.mylyn.tasks.ui.editors.RepositoryTaskEditorInput;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;
-import org.eclipse.mylyn.tasks.ui.editors.TaskFormPage;
-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.SubActionBars;
-import org.eclipse.ui.actions.ActionFactory;
-import org.eclipse.ui.internal.ObjectActionContributorManager;
-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
- */
-public class TaskEditorActionContributor extends MultiPageEditorActionBarContributor implements
- ISelectionChangedListener {
-
- private SubActionBars sourceActionBars;
-
- private TaskEditor editor;
-
- private OpenWithBrowserAction openWithBrowserAction = new OpenWithBrowserAction();
-
- private CopyTaskDetailsAction copyTaskDetailsAction = new CopyTaskDetailsAction(false);
-
- private AttachFileAction attachFileAction = new AttachFileAction();
-
- private SynchronizeEditorAction synchronizeEditorAction = new SynchronizeEditorAction();
-
- private ShowInTaskListAction showInTaskListAction = new ShowInTaskListAction();
-
- private GlobalAction cutAction;
-
- private GlobalAction undoAction;
-
- private GlobalAction redoAction;
-
- private GlobalAction copyAction;
-
- private GlobalAction pasteAction;
-
- private 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(new Separator());
- }
-
- public void contextMenuAboutToShow(IMenuManager mng) {
- boolean addClipboard = this.getEditor().getActivePageInstance() != null
- && (this.getEditor().getActivePageInstance() instanceof TaskPlanningEditor || this.getEditor()
- .getActivePageInstance() instanceof AbstractRepositoryTaskEditor);
- contextMenuAboutToShow(mng, addClipboard);
- }
-
- public void contextMenuAboutToShow(IMenuManager manager, boolean addClipboard) {
- if (editor != null)
- updateSelectableActions(editor.getSelection());
- if (addClipboard) {
- addClipboardActions(manager);
- }
-
- if (editor.getTaskEditorInput() == null && !(editor.getEditorInput() instanceof NewTaskEditorInput)) {
- final MenuManager subMenuManager = new MenuManager("Add to " + TaskListView.LABEL_VIEW);
- List<AbstractTaskCategory> categories = new ArrayList<AbstractTaskCategory>(
- TasksUiPlugin.getTaskListManager().getTaskList().getCategories());
-
- Collections.sort(categories);
- for (final AbstractTaskCategory category : categories) {
- if (!category.equals(TasksUiPlugin.getTaskListManager().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(editor.getSelection()));
- manager.add(subMenuManager);
- return;
-
- } else if (editor.getEditorInput() instanceof NewTaskEditorInput) {
- return;
- }
-
- final AbstractTask task = editor.getTaskEditorInput().getTask();
- if (task == null) {
- return;
- } else {
- // TODO: refactor
- IStructuredSelection selection = new StructuredSelection(task);
- openWithBrowserAction.selectionChanged(selection);
- copyTaskDetailsAction.selectionChanged(selection);
- attachFileAction.selectionChanged(selection);
- attachFileAction.setEditor(editor);
- synchronizeEditorAction.selectionChanged(new StructuredSelection(this.getEditor()));
- showInTaskListAction.selectionChanged(selection);
-
- manager.add(openWithBrowserAction);
- manager.add(attachFileAction);
- manager.add(synchronizeEditorAction);
-
- 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());
-
- for (String menuPath : TasksUiPlugin.getDefault().getDynamicMenuMap().keySet()) {
- for (IDynamicSubMenuContributor contributor : TasksUiPlugin.getDefault().getDynamicMenuMap().get(
- menuPath)) {
- if (TaskListView.ID_SEPARATOR_TASKS.equals(menuPath)) {
- List<AbstractTaskContainer> selectedElements = new ArrayList<AbstractTaskContainer>();
- selectedElements.add(task);
- MenuManager subMenuManager = contributor.getSubMenuManager(selectedElements);
- if (subMenuManager != null) {
- manager.add(subMenuManager);
- }
- }
- }
- }
-
- manager.add(new Separator());
- // HACK: there should be a saner way of doing this
- ObjectActionContributorManager.getManager().contributeObjectActions(editor, manager,
- new ISelectionProvider() {
-
- public void addSelectionChangedListener(ISelectionChangedListener listener) {
- // ignore
- }
-
- public ISelection getSelection() {
- return new StructuredSelection(task);
- }
-
- public void removeSelectionChangedListener(ISelectionChangedListener listener) {
- // ignore
-
- }
-
- public void setSelection(ISelection selection) {
- // ignore
-
- }
- });
- }
- 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);
- }
- }
-
- @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 dispose() {
- sourceActionBars.dispose();
- super.dispose();
- }
-
- @Override
- public void init(IActionBars bars) {
- super.init(bars);
- sourceActionBars = new SubActionBars(bars);
- }
-
- @Override
- public void init(IActionBars bars, IWorkbenchPage page) {
- super.init(bars, page);
- registerGlobalHandlers(bars);
-
- }
-
- public TaskEditor getEditor() {
- return editor;
- }
-
- public IStatusLineManager getStatusLineManager() {
- return getActionBars().getStatusLineManager();
- }
-
- @Override
- public void setActiveEditor(IEditorPart targetEditor) {
- if (targetEditor instanceof TaskEditor) {
- editor = (TaskEditor) targetEditor;
- updateSelectableActions(editor.getSelection());
- }
- }
-
- @Override
- public void setActivePage(IEditorPart newEditor) {
- if (getEditor() != null) {
- updateSelectableActions(getEditor().getSelection());
- }
- }
-
- public void selectionChanged(SelectionChangedEvent event) {
- updateSelectableActions(event.getSelection());
- }
-
- private class GlobalAction extends Action {
-
- private String actionId;
-
- public GlobalAction(String actionId) {
- this.actionId = actionId;
- }
-
- @Override
- public void run() {
- if (getEditor().getActivePageInstance() instanceof TaskFormPage) {
- TaskFormPage editor = (TaskFormPage) getEditor().getActivePageInstance();
- editor.doAction(actionId);
- updateSelectableActions(getEditor().getSelection());
- }
- }
-
- public void selectionChanged(ISelection selection) {
- if (getEditor().getActivePageInstance() instanceof TaskFormPage) {
- TaskFormPage editor = (TaskFormPage) getEditor().getActivePageInstance();
- setEnabled(editor.canPerformAction(actionId));
- }
- }
- }
-
- public 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();
- }
-
- public 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);
- }
-
-}
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 39adde791..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorInputFactory.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 org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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.getTaskListManager().getTaskList().getTask(handle);
- if (task != null) {
- return new TaskEditorInput(task, false);
- }
- return null;
- }
-
- public static void saveState(IMemento memento, TaskEditorInput input) {
- if (memento != null && input != null && 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/TaskHyperlinkDetector.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskHyperlinkDetector.java
deleted file mode 100644
index c38af0ff7..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskHyperlinkDetector.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.editors;
-
-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.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Rob Elves
- * @author Steffen Pingel
- * @author Eugene Kuleshov
- */
-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;
- }
-
- TaskRepository repository = getRepository(textViewer);
- if (repository == null) {
- repository = guessRepository(line);
- }
- if (repository == null) {
- return null;
- }
-
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(repository.getConnectorKind());
- if (connectorUi == null) {
- return null;
- }
-
- return connectorUi.findHyperlinks(repository, line, //
- region.getOffset() - lineInfo.getOffset(), lineInfo.getOffset());
- }
-
- private TaskRepository getRepository(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)
- IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- IWorkbenchPart part = activePage.getActivePart();
- if (part != null && 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, true);
- }
- return null;
- }
-
- // TODO: extract similar code to OpenCorrespondingTaskAction#reconsile(ILinkedTaskInfo info)
- private TaskRepository guessRepository(String text) {
- TaskRepositoryManager manager = TasksUiPlugin.getRepositoryManager();
- for (AbstractRepositoryConnector c : manager.getRepositoryConnectors()) {
- for (TaskRepository repository : manager.getRepositories(c.getConnectorKind())) {
- String[] ids = c.getTaskIdsFromComment(repository, text);
- if (ids != null && ids.length > 0 && ids[0].length() > 0) {
- return repository;
- }
- }
- }
- return null;
- }
-
-}
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 46b1d00a6..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskPlanningEditor.java
+++ /dev/null
@@ -1,951 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.text.DateFormat;
-import java.util.Calendar;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.Action;
-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.context.core.ContextCorePlugin;
-import org.eclipse.mylyn.internal.tasks.core.LocalRepositoryConnector;
-import org.eclipse.mylyn.internal.tasks.core.LocalTask;
-import org.eclipse.mylyn.internal.tasks.ui.RetrieveTitleFromUrlJob;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-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.views.TaskListView;
-import org.eclipse.mylyn.monitor.core.DateUtil;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.monitor.ui.MonitorUiPlugin;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.ITaskListChangeListener;
-import org.eclipse.mylyn.tasks.core.TaskContainerDelta;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.AbstractTask.PriorityLevel;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.DatePicker;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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.mylyn.tasks.ui.editors.TaskFormPage;
-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.Button;
-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.editor.FormEditor;
-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 {
-
- public static final String ID = "org.eclipse.mylyn.tasks.ui.editors.planning";
-
- private static final String CLEAR = "Clear";
-
- private static final String LABEL_DUE = "Due:";
-
- private static final String LABEL_SCHEDULE = "Scheduled for:";
-
- private static final String DESCRIPTION_ESTIMATED = "Time that the task has been actively worked on in Eclipse.\n Inactivity timeout is "
- + MonitorUiPlugin.getDefault().getInactivityTimeout() / (60 * 1000) + " minutes.";
-
- 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 DatePicker datePicker;
-
- private AbstractTask task;
-
- private Composite editorComposite;
-
- protected static final String CONTEXT_MENU_ID = "#MylynPlanningEditor";
-
- private Text pathText;
-
- private Text endDate;
-
- private ScrolledForm form;
-
- private Text summary;
-
- private Text issueReportURL;
-
- private CCombo priorityCombo;
-
- private CCombo statusCombo;
-
- private TextViewer noteEditor;
-
- private Spinner estimated;
-
- private ImageHyperlink getDescLink;
-
- private ImageHyperlink openUrlLink;
-
- private TaskEditor parentEditor = null;
-
- private ITaskListChangeListener TASK_LIST_LISTENER = new ITaskListChangeListener() {
-
- public void containersChanged(Set<TaskContainerDelta> containers) {
- for (TaskContainerDelta taskContainerDelta : containers) {
- if (taskContainerDelta.getContainer() instanceof AbstractTask) {
- final AbstractTask updateTask = (AbstractTask) taskContainerDelta.getContainer();
- 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() {
- updateTaskData(updateTask);
- }
- });
- }
- }
- }
- }
- }
-
- };
-
- private FormToolkit toolkit;
-
- private Action activateAction;
-
- public TaskPlanningEditor(FormEditor editor) {
- super(editor, ID, "Planning");
- TasksUiPlugin.getTaskListManager().getTaskList().addChangeListener(TASK_LIST_LISTENER);
- }
-
- /** public for testing */
- public void updateTaskData(final AbstractTask updateTask) {
- if (datePicker != null && !datePicker.isDisposed()) {
- if (updateTask.getScheduledForDate() != null) {
- Calendar cal = Calendar.getInstance();
- cal.setTime(updateTask.getScheduledForDate());
- datePicker.setDate(cal);
- } else {
- datePicker.setDate(null);
- }
- }
-
- if (summary == null)
- return;
- if (!summary.isDisposed()) {
- if (!summary.getText().equals(updateTask.getSummary())) {
- boolean wasDirty = TaskPlanningEditor.this.isDirty;
- summary.setText(updateTask.getSummary());
- TaskPlanningEditor.this.markDirty(wasDirty);
- }
- if (parentEditor != null) {
- parentEditor.changeTitle();
- 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 = summary.getText();
- // task.setDescription(label);
- TasksUiPlugin.getTaskListManager().getTaskList().renameTask(task, 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 (statusCombo.getSelectionIndex() == 0) {
- task.setCompleted(true);
- } else {
- task.setCompleted(false);
- }
- }
-
- String note = noteEditor.getTextWidget().getText();// notes.getText();
- task.setNotes(note);
- task.setEstimatedTimeHours(estimated.getSelection());
- if (datePicker != null && datePicker.getDate() != null) {
- TasksUiPlugin.getTaskActivityManager().setScheduledFor(task, datePicker.getDate().getTime());
- } else {
- TasksUiPlugin.getTaskActivityManager().setScheduledFor(task, null);
- }
- 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 = taskEditorInput.getTask();
-
- form = managedForm.getForm();
- toolkit = managedForm.getToolkit();
-
- if (task != null) {
- addHeaderControls();
- }
-
- 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 (summary != null && LocalRepositoryConnector.DEFAULT_SUMMARY.equals(summary.getText())) {
- summary.setSelection(0, summary.getText().length());
- summary.setFocus();
- } else if (summary != null) {
- summary.setFocus();
- }
- }
-
- private void addHeaderControls() {
-
- if (parentEditor.getTopForm() != null) {
-
- activateAction = new Action() {
- @Override
- public void run() {
- if (!task.isActive()) {
- setChecked(true);
- new TaskActivateAction().run(task);
- } else {
- setChecked(false);
- new TaskDeactivateAction().run(task);
- }
- }
-
- };
-
- activateAction.setImageDescriptor(TasksUiImages.TASK_ACTIVE_CENTERED);
- activateAction.setToolTipText("Toggle Activation");
- activateAction.setChecked(task.isActive());
- parentEditor.getTopForm().getToolBarManager().add(activateAction);
-
- parentEditor.getTopForm().getToolBarManager().update(true);
- }
-
- // if (form.getToolBarManager() != null) {
- // form.getToolBarManager().add(repositoryLabelControl);
- // if (repositoryTask != null) {
- // SynchronizeEditorAction synchronizeEditorAction = new
- // SynchronizeEditorAction();
- // synchronizeEditorAction.selectionChanged(new
- // StructuredSelection(this));
- // form.getToolBarManager().add(synchronizeEditorAction);
- // }
- //
- // // Header drop down menu additions:
- // // form.getForm().getMenuManager().add(new
- // // SynchronizeSelectedAction());
- //
- // form.getToolBarManager().update(true);
- // }
- }
-
- @Override
- public void setFocus() {
- // form.setFocus();
- if (summary != null && !summary.isDisposed()) {
- summary.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, true);
- 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);
-
- summary = toolkit.createText(summaryComposite, task.getSummary(), SWT.LEFT | SWT.FLAT);
- summary.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
- GridDataFactory.fillDefaults().minSize(100, SWT.DEFAULT).grab(true, false).applyTo(summary);
-
- if (!(task instanceof LocalTask)) {
- summary.setEnabled(false);
- } else {
- summary.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- markDirty(true);
- }
- });
- }
- toolkit.paintBordersFor(summaryComposite);
-
- Composite statusComposite = toolkit.createComposite(parent);
- GridLayout compLayout = new GridLayout(7, 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);
- 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);
- 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) {
- if (statusCombo.getSelectionIndex() == 0) {
- task.setCompleted(true);
- } else {
- task.setCompleted(false);
- }
- TaskPlanningEditor.this.markDirty(true);
- }
- });
- }
-
- String creationDateString = "";
- try {
- creationDateString = DateFormat.getDateInstance(DateFormat.LONG).format(task.getCreationDate());
- } catch (RuntimeException e) {
- StatusHandler.fail(e, "Could not format creation date", true);
- }
- 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(TasksUiImages.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(TasksUiImages.getImage(TasksUiImages.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(), false);
- }
-
- 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) {
-
- try {
- RetrieveTitleFromUrlJob job = new RetrieveTitleFromUrlJob(issueReportURL.getText()) {
-
- @Override
- protected void setTitle(final String pageTitle) {
- summary.setText(pageTitle);
- TaskPlanningEditor.this.markDirty(true);
- }
-
- };
- job.schedule();
-
- } catch (RuntimeException e) {
- StatusHandler.fail(e, "could not open task web page", false);
- }
- }
-
- /**
- * 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 =
- // ContextCorePlugin.getDefault().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 | Section.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));
-
- datePicker = new DatePicker(nameValueComp, SWT.FLAT, DatePicker.LABEL_CHOOSE);
-
- Calendar calendar = Calendar.getInstance();
- if (task.getScheduledForDate() != null) {
- calendar.setTime(task.getScheduledForDate());
- datePicker.setDate(calendar);
- }
-
- datePicker.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
- datePicker.addPickerSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent arg0) {
- task.setReminded(false);
- TaskPlanningEditor.this.markDirty(true);
- }
-
- public void widgetDefaultSelected(SelectionEvent arg0) {
- // ignore
- }
- });
-
- datePicker.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
- toolkit.adapt(datePicker, true, true);
- toolkit.paintBordersFor(nameValueComp);
-
- ImageHyperlink clearScheduledDate = toolkit.createImageHyperlink(nameValueComp, SWT.NONE);
- clearScheduledDate.setImage(TasksUiImages.getImage(TasksUiImages.REMOVE));
- clearScheduledDate.setToolTipText(CLEAR);
- clearScheduledDate.addHyperlinkListener(new HyperlinkAdapter() {
-
- @Override
- public void linkActivated(HyperlinkEvent e) {
- datePicker.setDate(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);
-
- calendar = Calendar.getInstance();
-
- 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, true);
- toolkit.paintBordersFor(nameValueComp);
-
- ImageHyperlink clearDueDate = toolkit.createImageHyperlink(nameValueComp, SWT.NONE);
- clearDueDate.setImage(TasksUiImages.getImage(TasksUiImages.REMOVE));
- clearDueDate.setToolTipText(CLEAR);
- clearDueDate.addHyperlinkListener(new HyperlinkAdapter() {
-
- @Override
- public void linkActivated(HyperlinkEvent e) {
- dueDatePicker.setDate(null);
- TaskPlanningEditor.this.markDirty(true);
- }
- });
-
- if (task != null && !(task instanceof LocalTask)) {
- AbstractRepositoryConnectorUi connector = TasksUiPlugin.getConnectorUi(task.getConnectorKind());
- if (connector != null && connector.supportsDueDates(task)) {
- dueDatePicker.setEnabled(false);
- clearDueDate.setEnabled(false);
- }
- }
-
- // 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, true);
- estimated.setSelection(task.getEstimateTimeHours());
- 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(TasksUiImages.getImage(TasksUiImages.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().span(2, 1).align(SWT.LEFT,
- // SWT.DEFAULT).applyTo(nameValueComp);
- label = toolkit.createLabel(nameValueComp, "Active:");
- label.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
- label.setToolTipText(DESCRIPTION_ESTIMATED);
-
- String elapsedTimeString = NO_TIME_ELAPSED;
- try {
- elapsedTimeString = DateUtil.getFormattedDuration(TasksUiPlugin.getTaskActivityManager().getElapsedTime(
- task), true);
- if (elapsedTimeString.equals(""))
- elapsedTimeString = NO_TIME_ELAPSED;
- } catch (RuntimeException e) {
- StatusHandler.fail(e, "Could not format elapsed time", true);
- }
-
- final Text elapsedTimeText = new Text(nameValueComp, SWT.READ_ONLY | SWT.FLAT);
- elapsedTimeText.setText(elapsedTimeString);
- GridData td = new GridData(GridData.FILL_HORIZONTAL);
- td.widthHint = 120;
- elapsedTimeText.setLayoutData(td);
- elapsedTimeText.setEditable(false);
-
- // Refresh Button
- Button timeRefresh = toolkit.createButton(nameValueComp, "Refresh", SWT.PUSH | SWT.CENTER);
- // timeRefresh.setImage(TaskListImages.getImage(TaskListImages.REFRESH));
-
- timeRefresh.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- String elapsedTimeString = NO_TIME_ELAPSED;
- try {
- elapsedTimeString = DateUtil.getFormattedDuration(TasksUiPlugin.getTaskActivityManager()
- .getElapsedTime(task), true);
- if (elapsedTimeString.equals("")) {
- elapsedTimeString = NO_TIME_ELAPSED;
- }
-
- } catch (RuntimeException e1) {
- StatusHandler.fail(e1, "Could not format elapsed time", true);
- }
- elapsedTimeText.setText(elapsedTimeString);
- }
- });
-
- 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());
- container.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- TaskRepository repository = null;
- if (task != null && !(task instanceof LocalTask)) {
- AbstractTask repositoryTask = task;
- repository = TasksUiPlugin.getRepositoryManager().getRepository(repositoryTask.getConnectorKind(),
- repositoryTask.getRepositoryUrl());
- }
-
- noteEditor = addTextEditor(repository, container, task.getNotes(), true, SWT.FLAT | SWT.MULTI | SWT.WRAP
- | SWT.V_SCROLL);
-
- noteEditor.getControl().setLayoutData(new GridData(GridData.FILL_BOTH));
- 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(AbstractTask task) {
-
- if (task == null)
- return "";
- if (task.getCompletionDate() == null)
- return "";
-
- String completionDateString = "";
- try {
- completionDateString = DateFormat.getDateInstance(DateFormat.LONG).format(task.getCompletionDate());
- } catch (RuntimeException e) {
- StatusHandler.fail(e, "Could not format date", true);
- return completionDateString;
- }
- return completionDateString;
- }
-
- // TODO: unused, delete?
- void createResourcesSection(Composite parent) {
- Section section = toolkit.createSection(parent, ExpandableComposite.TITLE_BAR | Section.TWISTIE);
- section.setText("Resources");
- section.setLayout(new GridLayout());
- section.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- 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);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- container.setLayout(layout);
- container.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- toolkit.createLabel(container, "Task context file:");
- File contextFile = ContextCorePlugin.getContextManager().getFileForContext(task.getHandleIdentifier());
- if (contextFile != null) {
- pathText = toolkit.createText(container, contextFile.getAbsolutePath(), SWT.NONE);
- pathText.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
- GridDataFactory.fillDefaults().hint(400, SWT.DEFAULT).applyTo(pathText);
- pathText.setEditable(false);
- pathText.setEnabled(true);
- }
- toolkit.paintBordersFor(container);
- }
-
- public void setParentEditor(TaskEditor parentEditor) {
- this.parentEditor = parentEditor;
- }
-
- @Override
- public void dispose() {
- TasksUiPlugin.getTaskListManager().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.summary.setText(desc);
- }
-
- /** for testing */
- public String getDescription() {
- return this.summary.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/TaskSpellingReconcileStrategy.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskSpellingReconcileStrategy.java
deleted file mode 100644
index ee1c0de3e..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskSpellingReconcileStrategy.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.tasks.ui.editors.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 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 (Iterator iter = removeAnnotations.iterator(); iter.hasNext();)
- fAnnotationModel.removeAnnotation((Annotation) iter.next());
- for (Iterator iter = fAddAnnotations.keySet().iterator(); iter.hasNext();) {
- Annotation annotation = (Annotation) iter.next();
- 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 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 aeb826dae..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskUrlHyperlink.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.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() {
- String url = getURLString();
- TasksUiUtil.openUrl(url, true);
- }
-
-}
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 2677b77e4..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskUrlHyperlinkDetector.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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/planner/CompletedTaskCollector.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/CompletedTaskCollector.java
deleted file mode 100644
index da7b7a35b..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/CompletedTaskCollector.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.planner;
-
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-
-/**
- * @author Ken Sueda
- */
-public class CompletedTaskCollector implements ITaskCollector {
-
- private Map<String, AbstractTask> completedTasks = new HashMap<String, AbstractTask>();
-
- private Date periodStartDate;
-
- private Date periodEndDate;
-
- public CompletedTaskCollector(Date periodStartDate, Date periodEndDate) {
- this.periodStartDate = periodStartDate;
- this.periodEndDate = periodEndDate;
-
- }
-
- public String getLabel() {
- return "Completed Tasks";
- }
-
- public void consumeTask(AbstractTask task) {
- if (task.isCompleted() && task.getCompletionDate() != null
- && task.getCompletionDate().compareTo(periodStartDate) >= 0
- && task.getCompletionDate().compareTo(periodEndDate) <= 0
- && !completedTasks.containsKey(task.getHandleIdentifier())) {
- completedTasks.put(task.getHandleIdentifier(), task);
- }
- }
-
- public Set<AbstractTask> getTasks() {
- Set<AbstractTask> tasks = new HashSet<AbstractTask>();
- tasks.addAll(completedTasks.values());
- return tasks;
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/DateSelectionDialog.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/DateSelectionDialog.java
deleted file mode 100644
index 5a65b7c57..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/DateSelectionDialog.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.ui.planner;
-
-import java.util.Calendar;
-import java.util.Date;
-import java.util.GregorianCalendar;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.mylyn.internal.tasks.ui.views.DatePickerPanel;
-import org.eclipse.mylyn.internal.tasks.ui.views.DatePickerPanel.DateSelection;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-
-/**
- * @author Ken Sueda
- * @author Mik Kersten
- * @author Rob Elves
- */
-public class DateSelectionDialog extends Dialog {
-
- private Date reminderDate = null;
-
- private String title = "Date Selection";
-
- private Calendar initialCalendar = GregorianCalendar.getInstance();
-
- private FormToolkit toolkit;
-
- public DateSelectionDialog(Shell parentShell, String title) {
- this(parentShell, GregorianCalendar.getInstance(), title);
- }
-
- public DateSelectionDialog(Shell parentShell, Calendar initialDate, String title) {
- super(parentShell);
-
- toolkit = new FormToolkit(parentShell.getDisplay());
- ;
- if (title != null) {
- this.title = title;
- }
- if (initialDate != null) {
- this.initialCalendar.setTime(initialDate.getTime());
- }
- reminderDate = initialCalendar.getTime();
- }
-
- @Override
- protected Control createDialogArea(Composite parent) {
- getShell().setText(title);
- DatePickerPanel datePanel = new DatePickerPanel(parent, SWT.NULL, initialCalendar);
- datePanel.addSelectionChangedListener(new ISelectionChangedListener() {
-
- public void selectionChanged(SelectionChangedEvent event) {
- if (!event.getSelection().isEmpty()) {
- DateSelection dateSelection = (DateSelection) event.getSelection();
- reminderDate = dateSelection.getDate().getTime();
- }
- }
- });
- datePanel.setBackground(toolkit.getColors().getBackground());
- return datePanel;
- }
-
- @Override
- public boolean close() {
- toolkit.dispose();
- return super.close();
- }
-
- @Override
- protected void createButtonsForButtonBar(Composite parent) {
- parent.setBackground(toolkit.getColors().getBackground());
- createButton(parent, IDialogConstants.CLIENT_ID + 1, "Clear", false);
- super.createButtonsForButtonBar(parent);
- }
-
- @Override
- protected void buttonPressed(int buttonId) {
- super.buttonPressed(buttonId);
- if (buttonId == IDialogConstants.CLIENT_ID + 1) {
- reminderDate = null;
- okPressed();
- }
- }
-
- public Date getDate() {
- return reminderDate;
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/ITaskCollector.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/ITaskCollector.java
deleted file mode 100644
index b6e6d7905..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/ITaskCollector.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.ui.planner;
-
-import java.util.Set;
-
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-
-/**
- * @author Ken Sueda
- */
-public interface ITaskCollector {
-
- public abstract void consumeTask(AbstractTask task);
-
- public abstract Set<AbstractTask> getTasks();
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/ITaskPlannerContentProvider.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/ITaskPlannerContentProvider.java
deleted file mode 100644
index 265f97c2e..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/ITaskPlannerContentProvider.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.planner;
-
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-
-public interface ITaskPlannerContentProvider {
-
- public void removeTask(AbstractTask task);
-
- public void addTask(AbstractTask task);
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/InProgressTaskCollector.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/InProgressTaskCollector.java
deleted file mode 100644
index 0a7b1ef17..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/InProgressTaskCollector.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.planner;
-
-import java.util.Calendar;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * Collects tasks that are not complete but have been worked on during the specified date range.
- *
- * @author Wesley Coelho (Adapted from CompletedTaskCollector by Key Sueda)
- * @author Mik Kersten
- */
-public class InProgressTaskCollector implements ITaskCollector {
-
- private Map<String, AbstractTask> inProgressTasks = new HashMap<String, AbstractTask>();
-
- private Date periodStartDate;
-
- private Date periodEndDate;
-
- protected static boolean hasActivity(AbstractTask task, Date startDate, Date endDate) {
- Calendar startCal = Calendar.getInstance();
- startCal.setTime(startDate);
-
- Calendar endCal = Calendar.getInstance();
- endCal.setTime(endDate);
-
- return TasksUiPlugin.getTaskActivityManager().getElapsedTime(task, startCal, endCal) > 0;
-// IInteractionContext interactionContext = ContextCorePlugin.getContextManager().loadContext(
-// task.getHandleIdentifier());
-// if (interactionContext != null) {
-// List<InteractionEvent> events = interactionContext.getInteractionHistory();
-// if (events.size() > 0) {
-// InteractionEvent latestEvent = events.get(events.size() - 1);
-// if (latestEvent.getDate().compareTo(startDate) > 0) {
-// return true;
-// }
-// }
-// }
-// return false;
- }
-
- public InProgressTaskCollector(Date periodStartDate, Date periodEndDate) {
- this.periodStartDate = periodStartDate;
- this.periodEndDate = periodEndDate;
- }
-
- public String getLabel() {
- return "Tasks in Progress";
- }
-
- public void consumeTask(AbstractTask task) {
- if (!task.isCompleted() && hasActivity(task, periodStartDate, periodEndDate)
- && !inProgressTasks.containsKey(task.getHandleIdentifier())) {
- inProgressTasks.put(task.getHandleIdentifier(), task);
- }
- }
-
- public Set<AbstractTask> getTasks() {
- Set<AbstractTask> tasks = new HashSet<AbstractTask>();
- tasks.addAll(inProgressTasks.values());
- return tasks;
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/OpenTaskEditorAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/OpenTaskEditorAction.java
deleted file mode 100644
index e1bf1ad39..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/OpenTaskEditorAction.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.planner;
-
-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.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-
-/**
- * @author Mik Kersten
- * @author Ken Sueda
- * @author Rob Elves
- */
-public class OpenTaskEditorAction extends Action {
-
- public static final String ID = "org.eclipse.mylyn.taskplannereditor.actions.open";
-
- private final TreeViewer viewer;
-
- /**
- * @param view
- */
- public OpenTaskEditorAction(TreeViewer view) {
- this.viewer = view;
- setText("Open");
- setToolTipText("Open Element");
- setId(ID);
- }
-
- @Override
- public void run() {
- ISelection selection = viewer.getSelection();
- Object object = ((IStructuredSelection) selection).getFirstElement();
- if (object instanceof AbstractTask) {
- TasksUiUtil.openEditor((AbstractTask) object, false);
- }
-// if (obj instanceof Task) {
-// ((Task) obj).openTaskInEditor(false);
-// }
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/PlannedTasksContentProvider.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/PlannedTasksContentProvider.java
deleted file mode 100644
index 807ae8a48..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/PlannedTasksContentProvider.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.planner;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-
-/**
- * @author Rob Elves
- * @author Ken Sueda
- */
-public class PlannedTasksContentProvider implements ITreeContentProvider, ITaskPlannerContentProvider {
-
- TaskActivityEditorInput editorInput;
-
- public PlannedTasksContentProvider(TaskActivityEditorInput editorInput) {
- this.editorInput = editorInput;
- }
-
- public Object[] getElements(Object inputElement) {
- return editorInput.getCategories().toArray();
- }
-
- public void dispose() {
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
-
- public void addTask(AbstractTask task) {
- editorInput.addPlannedTask(task);
- }
-
- public void removeTask(AbstractTask task) {
- editorInput.removePlannedTask(task);
- }
-
- public Object[] getChildren(Object parentElement) {
- Set<AbstractTask> plannedChildren = new HashSet<AbstractTask>();
- if (parentElement instanceof AbstractTaskContainer) {
- AbstractTaskContainer parent = (AbstractTaskContainer) parentElement;
- plannedChildren.addAll(editorInput.getPlannedTasks());
- plannedChildren.retainAll(parent.getChildren());
- }
- return plannedChildren.toArray();
- }
-
- public Object getParent(Object element) {
- // ignore
- return null;
- }
-
- public boolean hasChildren(Object element) {
- return (getChildren(element).length > 0);
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/ReminderCellEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/ReminderCellEditor.java
deleted file mode 100644
index f435d3293..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/ReminderCellEditor.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.planner;
-
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.GregorianCalendar;
-import java.util.Locale;
-
-import org.eclipse.jface.viewers.DialogCellEditor;
-import org.eclipse.mylyn.tasks.ui.DatePicker;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-/**
- * @author Ken Sueda
- * @author Mik Kersten
- * @author Rob Elves
- */
-public class ReminderCellEditor extends DialogCellEditor {
-
- private Date reminderDate;
-
- private DateSelectionDialog dialog;
-
- private String formatString = "dd-MMM-yyyy";
-
- private SimpleDateFormat format = new SimpleDateFormat(formatString, Locale.ENGLISH);
-
- public ReminderCellEditor(Composite parent) {
- super(parent, SWT.NONE);
- }
-
- @Override
- protected Object openDialogBox(Control cellEditorWindow) {
- Calendar initialCalendar = null;
- String value = (String) super.getValue();
-
- if (value != null) {
- try {
- Date tempDate = format.parse(value);
- if (tempDate != null) {
- initialCalendar = GregorianCalendar.getInstance();
- initialCalendar.setTime(tempDate);
- }
- } catch (ParseException e) {
- // ignore
- }
- }
- Calendar newCalendar = GregorianCalendar.getInstance();
- if (initialCalendar != null) {
- newCalendar.setTime(initialCalendar.getTime());
- }
-
- dialog = new DateSelectionDialog(cellEditorWindow.getShell(), newCalendar, DatePicker.TITLE_DIALOG);
- int dialogResponse = dialog.open();
-
- if (dialogResponse == DateSelectionDialog.CANCEL) {
- if (initialCalendar != null) {
- reminderDate = initialCalendar.getTime();
- } else {
- reminderDate = null;
- }
- } else {
- reminderDate = dialog.getDate();
- }
-
- String result = null;
- if (reminderDate != null) {
- result = format.format(reminderDate);
- }
- return result;
- }
-
- public Date getReminderDate() {
- return reminderDate;
- }
-
- @Override
- protected void doSetFocus() {
- reminderDate = null;
- super.doSetFocus();
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/RemoveTaskAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/RemoveTaskAction.java
deleted file mode 100644
index f19b2ebcf..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/RemoveTaskAction.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.tasks.ui.planner;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-
-/**
- * @author Rob Elves
- */
-public class RemoveTaskAction extends Action {
- public static final String ID = "org.eclipse.mylyn.taskplannereditor.actions.remove";
-
- private final TreeViewer viewer;
-
- public RemoveTaskAction(TreeViewer view) {
- this.viewer = view;
- setText("Remove Selected");
- setId(ID);
- setImageDescriptor(TasksUiImages.REMOVE);
- }
-
- @Override
- public void run() {
- for (Object object : ((IStructuredSelection) viewer.getSelection()).toList()) {
- if (object instanceof AbstractTask) {
- AbstractTask task = (AbstractTask) object;
- ((ITaskPlannerContentProvider) (viewer.getContentProvider())).removeTask(task);
- }
- }
- viewer.refresh();
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskActivityContentProvider.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskActivityContentProvider.java
deleted file mode 100644
index 09dd70a7e..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskActivityContentProvider.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.internal.tasks.ui.planner;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-
-/**
- * @author Rob Elves
- */
-public class TaskActivityContentProvider implements ITreeContentProvider, ITaskPlannerContentProvider {
-
- private TaskActivityEditorInput editorInput;
-
- public TaskActivityContentProvider(TaskActivityEditorInput editorInput) {
- this.editorInput = editorInput;
- }
-
- public Object[] getElements(Object inputElement) {
- return editorInput.getCategories().toArray();
-// List<AbstractTask> allTasks = new ArrayList<AbstractTask>();
-// allTasks.addAll(editorInput.getCompletedTasks());
-// allTasks.addAll(editorInput.getInProgressTasks());
-// return allTasks.toArray();
- }
-
- public void removeTask(AbstractTask task) {
- editorInput.removeCompletedTask(task);
- editorInput.removeInProgressTask(task);
- }
-
- public void addTask(AbstractTask task) {
- // ignore
- }
-
- public Object[] getChildren(Object parentElement) {
- Set<AbstractTask> result = new HashSet<AbstractTask>();
- if (parentElement instanceof AbstractTaskContainer) {
- AbstractTaskContainer parent = (AbstractTaskContainer) parentElement;
- Set<AbstractTask> completedChildren = new HashSet<AbstractTask>();
- completedChildren.addAll(editorInput.getCompletedTasks());
- completedChildren.retainAll(parent.getChildren());
- result.addAll(completedChildren);
-
- Set<AbstractTask> inProgressChildren = new HashSet<AbstractTask>();
- inProgressChildren.addAll(editorInput.getInProgressTasks());
- inProgressChildren.retainAll(parent.getChildren());
- result.addAll(inProgressChildren);
- }
- return result.toArray();
- }
-
- public Object getParent(Object element) {
- // ignore
- return null;
- }
-
- public boolean hasChildren(Object element) {
- return (getChildren(element).length > 0);
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- // ignore
- }
-
- public void dispose() {
- // ignore
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskActivityEditorInput.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskActivityEditorInput.java
deleted file mode 100644
index 2fde42a04..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskActivityEditorInput.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.planner;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.tasks.core.TaskList;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IPersistableElement;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.progress.IProgressService;
-
-/**
- * @author Ken Sueda
- * @author Mik Kersten
- */
-public class TaskActivityEditorInput implements IEditorInput {
-
- private static final String TASK_ACTIVITY_REPORT = "Task Activity Report";
-
- private Set<AbstractTask> completedTasks = new HashSet<AbstractTask>();
-
- private Set<AbstractTask> inProgressTasks = new HashSet<AbstractTask>();
-
- private Set<AbstractTask> plannedTasks = new HashSet<AbstractTask>();
-
- private TaskReportGenerator taskReportGenerator = null;
-
- private Date reportStartDate = null;
-
- private Date reportEndDate = null;
-
- private Set<AbstractTaskContainer> categories;
-
- public TaskActivityEditorInput(Date reportStartDate, Date reportEndDate,
- Set<AbstractTaskContainer> chosenCategories, TaskList tlist) {
- this.reportStartDate = reportStartDate;
- this.reportEndDate = reportEndDate;
- this.categories = chosenCategories;
- taskReportGenerator = new TaskReportGenerator(tlist, chosenCategories);
-
- ITaskCollector completedTaskCollector = new CompletedTaskCollector(reportStartDate, reportEndDate);
- taskReportGenerator.addCollector(completedTaskCollector);
-
- ITaskCollector inProgressTaskCollector = new InProgressTaskCollector(reportStartDate, reportEndDate);
- taskReportGenerator.addCollector(inProgressTaskCollector);
-
- try {
- IProgressService service = PlatformUI.getWorkbench().getProgressService();
- service.run(false, true, taskReportGenerator);
- while (!taskReportGenerator.isFinished())
- Thread.sleep(500);
- } catch (InvocationTargetException e) {
- // operation was canceled
- } catch (InterruptedException e) {
- StatusHandler.log(e, "Could not generate report");
- }
-
- completedTasks = completedTaskCollector.getTasks();
- inProgressTasks = inProgressTaskCollector.getTasks();
-
- plannedTasks.addAll(TasksUiPlugin.getTaskActivityManager().getActivityThisWeek().getChildren());
- plannedTasks.addAll(TasksUiPlugin.getTaskActivityManager().getActivityNextWeek().getChildren());
- plannedTasks.addAll(TasksUiPlugin.getTaskActivityManager().getActivityFuture().getChildren());
-
- //plannedTasks = new HashSet<ITask>();
- }
-
- public boolean exists() {
- return true;
- }
-
- public ImageDescriptor getImageDescriptor() {
- return null;
- }
-
- public String getName() {
- return TASK_ACTIVITY_REPORT;
- }
-
- public IPersistableElement getPersistable() {
- return null;
- }
-
- public String getToolTipText() {
- return "Task Planner";
- }
-
- @SuppressWarnings("unchecked")
- public Object getAdapter(Class adapter) {
- return null;
- }
-
- public Set<AbstractTask> getCompletedTasks() {
- return completedTasks;
- }
-
- public Set<AbstractTask> getInProgressTasks() {
- return inProgressTasks;
- }
-
- public Set<AbstractTask> getPlannedTasks() {
- return plannedTasks;
- }
-
- public long getTotalTimeSpentOnCompletedTasks() {
- long duration = 0;
- for (AbstractTask t : completedTasks) {
- duration += TasksUiPlugin.getTaskActivityManager().getElapsedTime(t);
- }
- return duration;
- }
-
- public long getTotalTimeSpentOnInProgressTasks() {
- long duration = 0;
- for (AbstractTask t : inProgressTasks) {
- duration += TasksUiPlugin.getTaskActivityManager().getElapsedTime(t);
- }
- return duration;
- }
-
- public TaskReportGenerator getReportGenerator() {
- return taskReportGenerator;
- }
-
- public boolean createdDuringReportPeriod(AbstractTask task) {
- Date creationDate = task.getCreationDate();
- if (creationDate != null) {
- return creationDate.compareTo(reportStartDate) > 0;
- } else {
- return false;
- }
- }
-
- public int getTotalTimeEstimated() {
- int duration = 0;
- for (AbstractTask task : inProgressTasks) {
- duration += task.getEstimateTimeHours();
- }
- return duration;
- }
-
- public void removeCompletedTask(AbstractTask task) {
- completedTasks.remove(task);
- }
-
- public void removeInProgressTask(AbstractTask task) {
- inProgressTasks.remove(task);
- }
-
- public void addPlannedTask(AbstractTask task) {
- plannedTasks.add(task);
- }
-
- public void removePlannedTask(AbstractTask task) {
- plannedTasks.remove(task);
- }
-
- public int getPlannedEstimate() {
- int estimated = 0;
- for (AbstractTask task : plannedTasks) {
- estimated += task.getEstimateTimeHours();
- }
- return estimated;
- }
-
- public Date getReportStartDate() {
- return reportStartDate;
- }
-
- public Date getReportEndDate() {
- return reportEndDate;
- }
-
- public Set<AbstractTaskContainer> getCategories() {
- return categories;
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskActivityEditorPart.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskActivityEditorPart.java
deleted file mode 100644
index a1d007c76..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskActivityEditorPart.java
+++ /dev/null
@@ -1,692 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.planner;
-
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.Locale;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-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.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.mylyn.monitor.core.DateUtil;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.SashForm;
-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.FileDialog;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeColumn;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.IWorkbenchActionConstants;
-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.TableWrapLayout;
-import org.eclipse.ui.part.EditorPart;
-
-/**
- *
- * Note: Some methods have been generalized to remove duplicate code but the design still isn't right (long parameter
- * lists, inflexible table creation). Needs refactoring. (Planned tasks section is currently disabled but should also
- * use the new common methods)
- *
- * @author Mik Kersten
- * @author Ken Sueda (original prototype)
- * @author Wesley Coelho (added tasks in progress section, refactored-out similar code)
- * @author Mik Kersten (rewrite)
- */
-public class TaskActivityEditorPart extends EditorPart {
-
- private static final String LABEL_PLANNED_ACTIVITY = "Planned Activity";
-
- private static final String LABEL_DIALOG = "Summary";
-
- private static final String LABEL_PAST_ACTIVITY = "Past Activity";
-
- private TaskActivityEditorInput editorInput = null;
-
- private String[] activityColumnNames = new String[] { " ", " !", "Description", "Elapsed", "Estimated", "Created",
- "Completed" };
-
- private int[] activityColumnWidths = new int[] { 100, 30, 200, 70, 70, 90, 90 };
-
- private int[] activitySortConstants = new int[] { TaskActivitySorter.ICON, TaskActivitySorter.PRIORITY,
- TaskActivitySorter.DESCRIPTION, TaskActivitySorter.DURATION, TaskActivitySorter.ESTIMATED,
- TaskActivitySorter.CREATION_DATE, TaskActivitySorter.COMPLETED_DATE };
-
-// private String[] planColumnNames = new String[] { " ", " !", "Description", "Elapsed", "Estimated", "Reminder" };
-//
-// private int[] planSortConstants = new int[] { TaskPlanSorter.ICON, TaskPlanSorter.PRIORITY,
-// TaskPlanSorter.DESCRIPTION, TaskPlanSorter.DURATION, TaskPlanSorter.ESTIMATED, TaskPlanSorter.REMINDER };
-//
-// private int[] planColumnWidths = new int[] { 100, 30, 200, 90, 90, 100 };
-
- private static final String LABEL_ESTIMATED = "Total estimated time: ";
-
- private static final String NO_TIME_ELAPSED = "&nbsp;";
-
- private static final String BLANK_CELL = "&nbsp;";
-
- private Label totalEstimatedHoursLabel;
-
- private Label numberCompleted;
-
- private Label totalTimeOnCompleted;
-
- private Label numberInProgress;
-
- private Label totalTimeOnIncomplete;
-
- private Label totalEstimatedTime;
-
- private Label totalTime;
-
- private TaskActivityContentProvider activityContentProvider;
-
- private PlannedTasksContentProvider planContentProvider;
-
- @Override
- public void doSave(IProgressMonitor monitor) {
- }
-
- @Override
- public void doSaveAs() {
- }
-
- @SuppressWarnings("deprecation")
- @Override
- public void init(IEditorSite site, IEditorInput input) throws PartInitException {
- setSite(site);
- setInput(input);
- editorInput = (TaskActivityEditorInput) input;
- setPartName(editorInput.getName());
- setTitleToolTip(editorInput.getToolTipText());
- }
-
- @Override
- public boolean isDirty() {
- return false;
- }
-
- @Override
- public boolean isSaveAsAllowed() {
- return false;
- }
-
- @Override
- public void createPartControl(Composite parent) {
- FormToolkit toolkit = new FormToolkit(parent.getDisplay());
- ScrolledForm sform = toolkit.createScrolledForm(parent);
- Composite editorComposite = sform.getBody();
-
- editorComposite.setLayout(new GridLayout());
- GridData gridData = new GridData();
- gridData.horizontalAlignment = GridData.FILL_BOTH;
- gridData.grabExcessHorizontalSpace = true;
- gridData.grabExcessVerticalSpace = true;
- editorComposite.setLayoutData(gridData);
-
- createSummarySection(editorComposite, toolkit, editorInput.getReportStartDate(), editorInput.getReportEndDate());
- String label = LABEL_PAST_ACTIVITY;
-
- List<AbstractTask> allTasks = new ArrayList<AbstractTask>();
- allTasks.addAll(editorInput.getCompletedTasks());
- allTasks.addAll(editorInput.getInProgressTasks());
-
- SashForm sashForm = new SashForm(editorComposite, SWT.VERTICAL);
-
- sashForm.setLayout(new GridLayout());
- sashForm.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- activityContentProvider = new TaskActivityContentProvider(editorInput);
-
- final TreeViewer activityViewer = createTableSection(sashForm, toolkit, label, activityColumnNames,
- activityColumnWidths, activitySortConstants);
- activityViewer.setContentProvider(activityContentProvider);
- activityViewer.setLabelProvider(new TaskPlannerLabelProvider(activityViewer, editorInput.getReportStartDate(),
- editorInput.getReportEndDate()));
- setSorters(activityColumnNames, activitySortConstants, activityViewer.getTree(), activityViewer, false);
- activityViewer.setInput(editorInput);
- activityViewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- updateLabels();
- }
- });
-
- MenuManager activityContextMenuMgr = new MenuManager("#ActivityPlannerPopupMenu");
- activityContextMenuMgr.setRemoveAllWhenShown(true);
- activityContextMenuMgr.addMenuListener(new IMenuListener() {
- public void menuAboutToShow(IMenuManager manager) {
- TaskActivityEditorPart.this.fillContextMenu(activityViewer, manager);
-
- }
- });
- Menu menu = activityContextMenuMgr.createContextMenu(activityViewer.getControl());
- activityViewer.getControl().setMenu(menu);
- getSite().registerContextMenu(activityContextMenuMgr, activityViewer);
-
- planContentProvider = new PlannedTasksContentProvider(editorInput);
- final TreeViewer planViewer = createTableSection(sashForm, toolkit, LABEL_PLANNED_ACTIVITY,
- activityColumnNames, activityColumnWidths, activitySortConstants);
- planViewer.setContentProvider(planContentProvider);
- planViewer.setLabelProvider(new TaskPlannerLabelProvider(planViewer, editorInput.getReportStartDate(),
- editorInput.getReportEndDate()));
- // planViewer.setLabelProvider(new TaskPlanLabelProvider());
- // createPlanCellEditorListener(planViewer.getTable(), planViewer);
- // planViewer.setCellModifier(new PlannedTasksCellModifier(planViewer));
- // initDrop(planViewer, planContentProvider);
- setSorters(activityColumnNames, activitySortConstants, planViewer.getTree(), planViewer, true);
- planViewer.setInput(editorInput);
-
- // planViewer.addSelectionChangedListener(new
- // ISelectionChangedListener() {
- // public void selectionChanged(SelectionChangedEvent event) {
- // updateLabels();
- // }
- // });
-
- // MenuManager planContextMenuMgr = new
- // MenuManager("#PlanPlannerPopupMenu");
- // planContextMenuMgr.setRemoveAllWhenShown(true);
- // planContextMenuMgr.addMenuListener(new IMenuListener() {
- // public void menuAboutToShow(IMenuManager manager) {
- // TaskActivityEditorPart.this.fillContextMenu(planViewer, manager);
- // }
- // });
- // Menu planMenu =
- // planContextMenuMgr.createContextMenu(planViewer.getControl());
- // planViewer.getControl().setMenu(planMenu);
- // getSite().registerContextMenu(planContextMenuMgr, planViewer);
-
- totalEstimatedHoursLabel = toolkit.createLabel(editorComposite, LABEL_ESTIMATED + "0 hours ", SWT.NULL);
- createButtons(editorComposite, toolkit, planViewer, planContentProvider);
- updateLabels();
- }
-
- private void fillContextMenu(TreeViewer viewer, IMenuManager manager) {
- if (!viewer.getSelection().isEmpty()) {
- manager.add(new OpenTaskEditorAction(viewer));
- manager.add(new RemoveTaskAction(viewer));
- manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
- } else {
- manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
- }
- }
-
- @Override
- public void setFocus() {
- }
-
- private void createSummarySection(Composite parent, FormToolkit toolkit, Date startDate, Date endDate) {
- Section summarySection = toolkit.createSection(parent, ExpandableComposite.TITLE_BAR);
- summarySection.setText(LABEL_DIALOG);
- summarySection.setLayout(new GridLayout());
- summarySection.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- Composite summaryContainer = toolkit.createComposite(summarySection);
- summarySection.setClient(summaryContainer);
- TableWrapLayout layout = new TableWrapLayout();
- layout.numColumns = 2;
- summaryContainer.setLayout(layout);
-
- String formatString = "yyyy-MM-dd, h:mm a";
- SimpleDateFormat formater = new SimpleDateFormat(formatString, Locale.ENGLISH);
-
- if (startDate != null) {
- String dateLabel = "Date start: " + formater.format(startDate);
- toolkit.createLabel(summaryContainer, dateLabel, SWT.NULL);
- }
-
- if (endDate != null) {
- String dateLabel = "Date end: " + formater.format(endDate);
- toolkit.createLabel(summaryContainer, dateLabel, SWT.NULL);
- }
-
- String numComplete = "Number completed: " + editorInput.getCompletedTasks().size();
- numberCompleted = toolkit.createLabel(summaryContainer, numComplete, SWT.NULL);
-// numberCompleted.setForeground(toolkit.getColors().getColor(FormColors.TITLE));
-
- String totalCompletedTaskTime = "Total time on completed: "
- + DateUtil.getFormattedDuration(editorInput.getTotalTimeSpentOnCompletedTasks(), false);
- totalTimeOnCompleted = toolkit.createLabel(summaryContainer, totalCompletedTaskTime, SWT.NULL);
-// totalTimeOnCompleted.setForeground(toolkit.getColors().getColor(FormColors.TITLE));
-
- String numInProgress = "Number in progress: " + editorInput.getInProgressTasks().size();
- numberInProgress = toolkit.createLabel(summaryContainer, numInProgress, SWT.NULL);
-// numberInProgress.setForeground(toolkit.getColors().getColor(FormColors.TITLE));
-
- String totalInProgressTaskTime = "Total time on incomplete: "
- + DateUtil.getFormattedDuration(editorInput.getTotalTimeSpentOnInProgressTasks(), false);
- totalTimeOnIncomplete = toolkit.createLabel(summaryContainer, totalInProgressTaskTime, SWT.NULL);
-// totalTimeOnIncomplete.setForeground(toolkit.getColors().getColor(FormColors.TITLE));
-
- String spacer = " ";
- String totalEstimated = "Total estimated time: " + editorInput.getTotalTimeEstimated() + " hours" + spacer;
- totalEstimatedTime = toolkit.createLabel(summaryContainer, totalEstimated, SWT.NULL);
-// totalEstimatedTime.setForeground(toolkit.getColors().getColor(FormColors.TITLE));
-
- String grandTotalTime = "Total time: " + getTotalTime();
- totalTime = toolkit.createLabel(summaryContainer, grandTotalTime, SWT.NULL);
-// totalTime.setForeground(toolkit.getColors().getColor(FormColors.TITLE));
-
- }
-
- private void updateSummarySection() {
- String numComplete = "Number completed: " + editorInput.getCompletedTasks().size();
- numberCompleted.setText(numComplete);
-
- String totalCompletedTaskTime = "Total time on completed: "
- + DateUtil.getFormattedDuration(editorInput.getTotalTimeSpentOnCompletedTasks(), false);
- totalTimeOnCompleted.setText(totalCompletedTaskTime);
-
- String numInProgress = "Number in progress: " + editorInput.getInProgressTasks().size();
- numberInProgress.setText(numInProgress);
-
- String totalInProgressTaskTime = "Total time on incomplete: "
- + DateUtil.getFormattedDuration(editorInput.getTotalTimeSpentOnInProgressTasks(), false);
- totalTimeOnIncomplete.setText(totalInProgressTaskTime);
-
- String spacer = " ";
- String totalEstimated = "Total estimated time: " + editorInput.getTotalTimeEstimated() + " hours" + spacer;
- totalEstimatedTime.setText(totalEstimated);
-
- String grandTotalTime = "Total time: " + getTotalTime();
- totalTime.setText(grandTotalTime);
-
- }
-
- // private void createPlanCellEditorListener(final Table planTable, final
- // TableViewer planTableViewer) {
- // CellEditor[] editors = new CellEditor[planColumnNames.length + 1];
- // final ComboBoxCellEditor estimateEditor = new
- // ComboBoxCellEditor(planTable, TaskListManager.ESTIMATE_TIMES,
- // SWT.READ_ONLY);
- // final ReminderCellEditor reminderEditor = new
- // ReminderCellEditor(planTable);
- // editors[0] = null; // not used
- // editors[1] = null;// not used
- // editors[2] = null;// not used
- // editors[3] = null;// not used
- // editors[4] = estimateEditor;
- // editors[5] = reminderEditor;
- // reminderEditor.addListener(new ICellEditorListener() {
- // public void applyEditorValue() {
- // Object selection = ((IStructuredSelection)
- // planTableViewer.getSelection()).getFirstElement();
- // if (selection instanceof ITask) {
- // ((ITask) selection).setReminderDate(reminderEditor.getReminderDate());
- // planTableViewer.refresh();
- // }
- // }
- //
- // public void cancelEditor() {
- // }
- //
- // public void editorValueChanged(boolean oldValidState, boolean
- // newValidState) {
- // }
- //
- // });
- // estimateEditor.addListener(new ICellEditorListener() {
- // public void applyEditorValue() {
- // Object selection = ((IStructuredSelection)
- // planTableViewer.getSelection()).getFirstElement();
- // if (selection instanceof ITask) {
- // ITask task = (ITask) selection;
- // int estimate = (Integer) estimateEditor.getValue();
- // if (estimate == -1) {
- // estimate = 0;
- // }
- // task.setEstimatedTimeHours(estimate);
- // updateLabels();
- // planTableViewer.refresh();
- // }
- // }
- //
- // public void cancelEditor() {
- // }
- //
- // public void editorValueChanged(boolean oldValidState, boolean
- // newValidState) {
- // }
- //
- // });
- // planTableViewer.setCellEditors(editors);
- // }
-
- private String getTotalTime() {
- return DateUtil.getFormattedDuration(editorInput.getTotalTimeSpentOnCompletedTasks()
- + editorInput.getTotalTimeSpentOnInProgressTasks(), false);
- }
-
- private TreeViewer createTableSection(Composite parent, FormToolkit toolkit, String title, String[] columnNames,
- int[] columnWidths, int[] sortConstants) {
- Section tableSection = toolkit.createSection(parent, ExpandableComposite.TITLE_BAR); // |
- // ExpandableComposite.TWISTIE
- tableSection.setText(title);
- // tableSection.setExpanded(true);
- tableSection.marginHeight = 8;
- tableSection.setLayout(new GridLayout());
- tableSection.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- Composite detailContainer = toolkit.createComposite(tableSection);
- tableSection.setClient(detailContainer);
- detailContainer.setLayout(new GridLayout());
- detailContainer.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- return createTable(detailContainer, toolkit, columnNames, columnWidths, sortConstants);
- }
-
- private TreeViewer createTable(Composite parent, FormToolkit toolkit, String[] columnNames, int[] columnWidths,
- int[] sortConstants) {
- int style = SWT.MULTI | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION | SWT.HIDE_SELECTION;
- Tree tree = toolkit.createTree(parent, style);
-
- tree.setLayout(new GridLayout());
- GridData tableGridData = new GridData(GridData.FILL_BOTH);
- tableGridData.heightHint = 100;
- tree.setLayoutData(tableGridData);
- tree.setLinesVisible(true);
- tree.setHeaderVisible(true);
- tree.setEnabled(true);
-
- for (int i = 0; i < columnNames.length; i++) {
- TreeColumn column = new TreeColumn(tree, SWT.LEFT, i);
- column.setText(columnNames[i]);
- column.setWidth(columnWidths[i]);
- }
-
- TreeViewer treeViewer = new TreeViewer(tree);
- treeViewer.setUseHashlookup(true);
- treeViewer.setColumnProperties(columnNames);
-
- final OpenTaskEditorAction openAction = new OpenTaskEditorAction(treeViewer);
- treeViewer.addDoubleClickListener(new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent event) {
- openAction.run();
- }
- });
-
- return treeViewer;
- }
-
- private void setSorters(String[] columnNames, int[] sortConstants, Tree tree, TreeViewer treeViewer, boolean plan) {
- for (int i = 0; i < columnNames.length; i++) {
- TreeColumn column = tree.getColumn(i);
- addColumnSelectionListener(treeViewer, column, sortConstants[i], plan);
- }
- }
-
- private void addColumnSelectionListener(final TreeViewer tableViewer, TreeColumn column, final int sorterConstant,
- final boolean plan) {
- column.addSelectionListener(new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
-// if (plan) { // TODO: bad modularity
-// tableViewer.setSorter(new TaskPlanSorter(sorterConstant));
-// } else {
-// tableViewer.setSorter(new TaskActivitySorter(sorterConstant));
-// }
- }
- });
- }
-
- private void createButtons(Composite parent, FormToolkit toolkit, final TreeViewer viewer,
- final PlannedTasksContentProvider contentProvider) {
- Composite container = new Composite(parent, SWT.NULL);
- container.setBackground(parent.getBackground());
- GridLayout layout = new GridLayout();
- container.setLayout(layout);
- layout.numColumns = 3;
-
- // Button addIncomplete = toolkit.createButton(container, "Add
- // Incomplete", SWT.PUSH | SWT.CENTER);
- // addIncomplete.addSelectionListener(new SelectionAdapter() {
- // @Override
- // public void widgetSelected(SelectionEvent e) {
- // Set<ITask> incompleteTasks = editorInput.getInProgressTasks();
- // for (ITask task : incompleteTasks) {
- // contentProvider.addTask(task);
- // viewer.refresh();
- // updateLabels();
- // }
- // }
- // });
- //
- // Button addToCategory = toolkit.createButton(container, "Add Planned
- // to Category...", SWT.PUSH | SWT.CENTER);
- // addToCategory.addSelectionListener(new SelectionAdapter() {
- // @Override
- // public void widgetSelected(SelectionEvent e) {
- // addPlannedTasksToCategory(contentProvider);
- // }
- // });
-
- Button exportToHTML = toolkit.createButton(container, "Export to HTML...", SWT.PUSH | SWT.CENTER);
- exportToHTML.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- exportToHtml();
- }
- });
- }
-
- private void updateLabels() {
- totalEstimatedHoursLabel.setText(LABEL_ESTIMATED + editorInput.getPlannedEstimate() + " hours");
- updateSummarySection();
- }
-
- private void exportToHtml() {
- File outputFile;
- try {
- FileDialog dialog = new FileDialog(getSite().getWorkbenchWindow().getShell());
- dialog.setText("Specify a file name");
- dialog.setFilterExtensions(new String[] { "*.html", "*.*" });
- String filename = dialog.open();
-
- if (filename == null || filename.equals(""))
- return;
-
- if (!filename.endsWith(".html"))
- filename += ".html";
- outputFile = new File(filename);
- // outputStream = new FileOutputStream(outputFile, true);
- BufferedWriter writer = new BufferedWriter(new FileWriter(outputFile));
- writer.write("<html><head></head><body>");
-
- exportSummarySection(writer);
-
- exportActivitySection(writer);
-
- exportPlanSection(writer);
-
- writer.write("</body></html>");
- writer.close();
- } catch (FileNotFoundException e) {
- StatusHandler.log(e, "could not resolve file");
- } catch (IOException e) {
- StatusHandler.log(e, "could not write to file");
- }
- }
-
- private void exportPlanSection(BufferedWriter writer) throws IOException {
-
- writer.write("<H2>" + LABEL_PLANNED_ACTIVITY + "</H2>");
-
- writer.write("<table border=\"1\" width=\"100%\" id=\"plannedActivityTable\">");
- writer.write("<tr>");
- writer.write("<td width=\"59\"><b>Type</b></td><td width=\"55\"><b>Priority</b></td><td width=\"495\"><b>Description</b></td>");
- writer.write("<td><b>Elapsed</b></td><td><b>Estimated</b></td><td><b>Reminder</b></td>");
- writer.write("</tr>");
-
- for (Object element : planContentProvider.getElements(null)) {
- if (element instanceof AbstractTask) {
- AbstractTask currentTask = (AbstractTask) element;
-
- String formatString = "dd-MM-yyyy";
- SimpleDateFormat format = new SimpleDateFormat(formatString, Locale.ENGLISH);
-
- String elapsedTimeString = DateUtil.getFormattedDuration(TasksUiPlugin.getTaskActivityManager()
- .getElapsedTime(currentTask), false);
- String estimatedTimeString = currentTask.getEstimateTimeHours() + " hours";
- if (elapsedTimeString.equals(""))
- elapsedTimeString = BLANK_CELL;
-
- Date reminderDate = currentTask.getScheduledForDate();
- String reminderDateString = BLANK_CELL;
- if (reminderDate != null) {
- reminderDateString = format.format(reminderDate);
- }
-
- writer.write("<tr>");
- writer.write("<td width=\"59\">ICON</td><td width=\"55\">" + currentTask.getPriority()
- + "</td><td width=\"495\">");
- if (currentTask.hasValidUrl()) {
- writer.write("<a href='" + currentTask.getUrl() + "'>" + currentTask.getSummary() + "</a>");
- } else {
- writer.write(currentTask.getSummary());
- }
- writer.write("</td><td>" + elapsedTimeString + "</td><td>" + estimatedTimeString + "</td><td>"
- + reminderDateString + "</td>");
- writer.write("</tr>");
-
- }
- }
- writer.write("</table>");
- writer.write("<BR></BR>");
- writer.write("<H3>" + totalEstimatedHoursLabel.getText() + "</H3>");
-
- }
-
- private void exportActivitySection(BufferedWriter writer) throws IOException {
-
- writer.write("<H2>" + LABEL_PAST_ACTIVITY + "</H2>");
-
- writer.write("<table border=\"1\" width=\"100%\" id=\"activityTable\">");
- writer.write("<tr>");
- writer.write("<td width=\"59\"><b>Type</b></td><td width=\"55\"><b>Priority</b></td><td width=\"495\"><b>Description</b></td>");
- writer.write("<td><b>Created</b></td><td><b>Completed</b></td><td><b>Elapsed</b></td><td><b>Estimated</b></td>");
- writer.write("</tr>");
-
- for (Object element : activityContentProvider.getElements(null)) {
- if (element instanceof AbstractTask) {
- AbstractTask currentTask = (AbstractTask) element;
-
- String formatString = "dd-MM-yyyy";
- SimpleDateFormat format = new SimpleDateFormat(formatString, Locale.ENGLISH);
-
- String elapsedTimeString = DateUtil.getFormattedDuration(TasksUiPlugin.getTaskActivityManager()
- .getElapsedTime(currentTask), false);
- String estimatedTimeString = currentTask.getEstimateTimeHours() + " hours";
- if (elapsedTimeString.equals(""))
- elapsedTimeString = NO_TIME_ELAPSED;
-
- Date creationDate = currentTask.getCreationDate();
- String creationDateString = BLANK_CELL;
- if (creationDate != null) {
- creationDateString = format.format(creationDate);
- }
-
- String completionDateString = BLANK_CELL;
- Date completedDate = currentTask.getCompletionDate();
- if (completedDate != null) {
- completionDateString = format.format(completedDate);
- }
-
- writer.write("<tr>");
- writer.write("<td width=\"59\">ICON</td><td width=\"55\">" + currentTask.getPriority()
- + "</td><td width=\"495\">");
-
- if (currentTask.hasValidUrl()) {
- writer.write("<a href='" + currentTask.getUrl() + "'>" + currentTask.getSummary() + "</a>");
- } else {
- writer.write(currentTask.getSummary());
- }
-
- writer.write("</td><td>" + creationDateString + "</td>");
- writer.write("<td>" + completionDateString + "</td><td>" + elapsedTimeString + "</td><td>"
- + estimatedTimeString + "</td>");
- writer.write("</tr>");
- }
- }
- writer.write("</table>");
- }
-
- private void exportSummarySection(BufferedWriter writer) throws IOException {
- Date startDate = editorInput.getReportStartDate();
- Date endDate = editorInput.getReportEndDate();
- writer.write("<H2>" + LABEL_DIALOG + "</H2>");
-
- String formatString = "yyyy-MM-dd, h:mm a";
- SimpleDateFormat format = new SimpleDateFormat(formatString, Locale.ENGLISH);
-
- writer.write("<table border=\"0\" width=\"75%\" id=\"table1\">\n<tr>\n");
- writer.write("<td width=\"138\">Date start:</td> ");
- String dateLabel = "Not Available";
- if (startDate != null) {
- dateLabel = format.format(startDate);
- }
- writer.write("<td>" + dateLabel + "</td>");
-
- writer.write("<td width=\"138\">Date end:</td> ");
- String endLabel = "Not Available";
- if (endDate != null) {
- endLabel = format.format(endDate);
- }
- writer.write("<td>" + endLabel + "</td>");
- //writer.write("<td width=\"169\">&nbsp;</td></tr>");
-
- writer.write("<tr><td width=\"138\">Number Completed:</td><td>" + editorInput.getCompletedTasks().size()
- + "</td>");
-
- writer.write("<td width=\"169\">Total time on completed:</td><td width=\"376\">"
- + DateUtil.getFormattedDuration(editorInput.getTotalTimeSpentOnCompletedTasks(), false) + "</td>");
- writer.write("</tr>");
-
- writer.write("<tr><td width=\"138\">Number in Progress:</td><td>" + editorInput.getInProgressTasks().size()
- + "</td>");
- writer.write("<td width=\"169\">Total time on incompleted:</td><td width=\"376\">"
- + DateUtil.getFormattedDuration(editorInput.getTotalTimeSpentOnInProgressTasks(), false) + "</td>");
- writer.write("</tr>");
-
- writer.write("<tr><td width=\"138\">Outstanding estimated hours:</td><td>"
- + editorInput.getTotalTimeEstimated() + "</td>");
- writer.write("<td width=\"169\">Total time:</td><td width=\"376\">" + getTotalTime() + "</td>");
- writer.write("</tr>");
-
- writer.write("</table>");
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskActivitySorter.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskActivitySorter.java
deleted file mode 100644
index 91d12e284..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskActivitySorter.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.planner;
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @author Ken Sueda
- * @author Mik Kersten
- */
-public class TaskActivitySorter extends ViewerSorter {
-
- public final static int DESCRIPTION = 1;
-
- public final static int PRIORITY = 2;
-
- public final static int CREATION_DATE = 3;
-
- public final static int COMPLETED_DATE = 4;
-
- public final static int DURATION = 5;
-
- public final static int ESTIMATED = 6;
-
- public static final int ICON = 0;
-
- private int criteria;
-
- public TaskActivitySorter(int criteria) {
- super();
- this.criteria = criteria;
- }
-
- @Override
- public int compare(Viewer viewer, Object obj1, Object obj2) {
- AbstractTask t1 = (AbstractTask) obj1;
- AbstractTask t2 = (AbstractTask) obj2;
-
- switch (criteria) {
- case DESCRIPTION:
- return compareDescription(t1, t2);
- case PRIORITY:
- return comparePriority(t1, t2);
- case CREATION_DATE:
- return compareCreationDate(t1, t2);
- case COMPLETED_DATE:
- return compareCompletedDate(t1, t2);
- case DURATION:
- return compareDuration(t1, t2);
- case ESTIMATED:
- return compareEstimated(t1, t2);
- default:
- return 0;
- }
- }
-
- protected int compareDescription(AbstractTask task1, AbstractTask task2) {
- return task1.getSummary().compareToIgnoreCase(task2.getSummary());
- }
-
- protected int comparePriority(AbstractTask task1, AbstractTask task2) {
- return task1.getPriority().compareTo(task2.getPriority());
- }
-
- protected int compareCompletedDate(AbstractTask task1, AbstractTask task2) {
- return task2.getCompletionDate().compareTo(task1.getCompletionDate());
- }
-
- protected int compareEstimated(AbstractTask task1, AbstractTask task2) {
- return task2.getEstimateTimeHours() - task1.getEstimateTimeHours();
- }
-
- protected int compareCreationDate(AbstractTask task1, AbstractTask task2) {
- if (task1.getCreationDate() == null)
- return 1;
- else if (task2.getCreationDate() == null)
- return -1;
- else
- return task2.getCreationDate().compareTo(task1.getCreationDate());
- }
-
- protected int compareDuration(AbstractTask task1, AbstractTask task2) {
- return TasksUiPlugin.getTaskActivityManager().getElapsedTime(task1) < TasksUiPlugin.getTaskActivityManager()
- .getElapsedTime(task2) ? 1 : -1;
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskActivityWizard.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskActivityWizard.java
deleted file mode 100644
index a0e4c3d6a..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskActivityWizard.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.planner;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.mylyn.internal.tasks.ui.editors.TaskPlanningEditor;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.INewWizard;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-
-/**
- * @author Ken Sueda
- * @author Mik Kersten
- */
-public class TaskActivityWizard extends Wizard implements INewWizard {
-
- private static final String TITLE = "New Task Activity Report";
-
- private TaskActivityWizardPage planningGamePage;
-
- public TaskActivityWizard() {
- super();
- init();
- setWindowTitle(TITLE);
- }
-
- @Override
- public boolean performFinish() {
- try {
- IWorkbenchPage page = TasksUiPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage();
- if (page == null)
- return false;
- IEditorInput input = new TaskActivityEditorInput(planningGamePage.getReportStartDate(),
- planningGamePage.getReportEndDate(), planningGamePage.getSelectedContainers(),
- TasksUiPlugin.getTaskListManager().getTaskList());
- page.openEditor(input, TaskPlanningEditor.ID);
- } catch (PartInitException ex) {
- StatusHandler.log(ex, "couldn't open summary editor");
- }
- return true;
- }
-
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- }
-
- private void init() {
- planningGamePage = new TaskActivityWizardPage();
- super.setForcePreviousAndNextButtons(true);
- }
-
- @Override
- public void addPages() {
- addPage(planningGamePage);
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskActivityWizardPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskActivityWizardPage.java
deleted file mode 100644
index 911d30f7d..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskActivityWizardPage.java
+++ /dev/null
@@ -1,365 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.tasks.ui.planner;
-
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.mylyn.internal.tasks.core.TaskActivityUtil;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskElementLabelProvider;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.tasks.ui.DatePicker;
-import org.eclipse.mylyn.tasks.ui.TaskListManager;
-import org.eclipse.mylyn.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.graphics.Font;
-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.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.TableItem;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * @author Mik Kersten
- * @author Ken Sueda (original prototype)
- * @author Rob Elves
- */
-public class TaskActivityWizardPage extends WizardPage {
-
- private static final int DEFAULT_DAYS = 1;
-
- private static final String TITLE = "Mylyn Task Activity Report";
-
- private static final String DESCRIPTION = "Summarizes task activity and assists planning future tasks.";
-
- private long DAY = 24 * 3600 * 1000;
-
- protected String[] columnNames = new String[] { "", "Description" };
-
- private Date reportStartDate = null;
-
- private Date reportEndDate = null;
-
- private Button daysRadioButton = null;
-
- private Button dateRadioButton = null;
-
- private Text numDays;
-
- private int numDaysToReport = 0;
-
- private Table filtersTable;
-
- private TaskElementLabelProvider labelProvider = new TaskElementLabelProvider(false);
-
- public TaskActivityWizardPage() {
- super(TITLE);
- setTitle(TITLE);
- setDescription(DESCRIPTION);
- }
-
- public void createControl(Composite parent) {
- Composite container = new Composite(parent, SWT.FILL);
- GridLayout layout = new GridLayout();
- container.setLayout(layout);
- layout.numColumns = 1;
-
- createReportPeriodGroup(container);
-
- Label spacer = new Label(container, SWT.NONE);
- spacer.setText(" ");
-
- createCategorySelectionGroup(container);
-
- setControl(container);
- numDays.setFocus();
- }
-
- private void createReportPeriodGroup(Composite parent) {
- Group reportPeriodGroup = new Group(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 4;
- reportPeriodGroup.setLayout(layout);
- reportPeriodGroup.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL));
- reportPeriodGroup.setText("Report Period");
- reportPeriodGroup.setFont(parent.getFont());
-
- daysRadioButton = new Button(reportPeriodGroup, SWT.RADIO | SWT.LEFT | SWT.NO_FOCUS);
- daysRadioButton.setText("Number of days prior: ");
- daysRadioButton.setSelection(true);
-
- numDays = new Text(reportPeriodGroup, SWT.BORDER);
- GridData gd = new GridData();
- gd.widthHint = 50;
- numDays.setLayoutData(gd);
- numDays.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- try {
- numDaysToReport = Integer.parseInt(numDays.getText());
- setErrorMessage(null);
- } catch (Exception ex) {
- setErrorMessage("Must be integer");
- numDaysToReport = 0;
- }
- }
- });
-
- numDays.setText("" + DEFAULT_DAYS);
- numDaysToReport = DEFAULT_DAYS;
-
- Label spacer = new Label(reportPeriodGroup, SWT.NONE);
- GridDataFactory.fillDefaults().span(2, SWT.DEFAULT).applyTo(spacer);
-
- dateRadioButton = new Button(reportPeriodGroup, SWT.RADIO | SWT.LEFT | SWT.NO_FOCUS);
- dateRadioButton.setText("Date range Start:");
-
- final DatePicker datePicker = new DatePicker(reportPeriodGroup, SWT.BORDER, "<start date>");
- datePicker.setEnabled(false);
- Calendar startCal = Calendar.getInstance();
- TaskActivityUtil.snapStartOfDay(startCal);
- reportStartDate = startCal.getTime();
- datePicker.setDate(startCal);
- datePicker.addPickerSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent arg0) {
- if (datePicker.getDate() != null) {
- reportStartDate = datePicker.getDate().getTime();
- }
- }
-
- public void widgetDefaultSelected(SelectionEvent arg0) {
- // ignore
- }
- });
-
- new Label(reportPeriodGroup, SWT.NONE).setText("End:");
-
- final DatePicker endDatePicker = new DatePicker(reportPeriodGroup, SWT.BORDER, "<end date>");
- endDatePicker.setEnabled(false);
- Calendar endCal = Calendar.getInstance();
- TaskActivityUtil.snapEndOfWorkDay(endCal);
- reportEndDate = endCal.getTime();
- endDatePicker.setDate(endCal);
- endDatePicker.addPickerSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent arg0) {
- if (datePicker.getDate() != null) {
- reportEndDate = endDatePicker.getDate().getTime();
- }
- }
- });
-
- SelectionListener radioListener = new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- numDays.setEnabled(daysRadioButton.getSelection());
- datePicker.setEnabled(dateRadioButton.getSelection());
- endDatePicker.setEnabled(dateRadioButton.getSelection());
- if (daysRadioButton.getSelection())
- numDays.setFocus();
- if (dateRadioButton.getSelection())
- datePicker.setFocus();
- }
-
- };
-
- daysRadioButton.addSelectionListener(radioListener);
- dateRadioButton.addSelectionListener(radioListener);
-
- }
-
- /**
- * Selection of specific category to report on in the Task Planner
- *
- * @param composite
- * container to add categories combo box to
- */
- private void createCategorySelectionGroup(Composite composite) {
-
- Group categorySelectionGroup = new Group(composite, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- categorySelectionGroup.setLayout(layout);
- categorySelectionGroup.setLayoutData(new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL));
- categorySelectionGroup.setText("Category Selection");
- categorySelectionGroup.setFont(composite.getFont());
-
- createFilterTable(categorySelectionGroup, true);
- TaskListManager manager = TasksUiPlugin.getTaskListManager();
- if (manager == null) {
- filtersTable.setEnabled(false);
- return;
- }
-
- List<AbstractTaskContainer> containers = new ArrayList<AbstractTaskContainer>();
- containers.addAll(manager.getTaskList().getUserCategories());
- containers.addAll(manager.getTaskList().getQueries());
- containers.add(manager.getTaskList().getArchiveContainer());
- Collections.sort(containers, new Comparator<AbstractTaskContainer>() {
-
- public int compare(AbstractTaskContainer c1, AbstractTaskContainer c2) {
- if (c1.equals(TasksUiPlugin.getTaskListManager().getTaskList().getDefaultCategory())) {
- return -1;
- } else if (c2.equals(TasksUiPlugin.getTaskListManager().getTaskList().getDefaultCategory())) {
- return 1;
- } else {
- return c1.getSummary().compareToIgnoreCase(c2.getSummary());
- }
- }
-
- });
-
- // populate table
- for (AbstractTaskContainer container : containers) {
- TableItem item = new TableItem(filtersTable, SWT.NONE);
- item.setImage(labelProvider.getImage(container));
- item.setText(container.getSummary());
- item.setData(container);
- }
-
- for (int i = 0; i < columnNames.length; i++) {
- filtersTable.getColumn(i).pack();
- }
-
- createButtonsGroup(categorySelectionGroup);
-
- // default to all categories selected
- setChecked(true);
- }
-
- /**
- *
- * Creates the buttons for selecting all or none of the categories.
- *
- * @param parent
- * parent composite
- */
- private final void createButtonsGroup(Composite parent) {
-
- Font font = parent.getFont();
- new Label(parent, SWT.NONE); // Blank cell on left
-
- Composite buttonComposite = new Composite(parent, SWT.NONE);
- buttonComposite.setFont(parent.getFont());
-
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
- layout.makeColumnsEqualWidth = true;
- buttonComposite.setLayout(layout);
- buttonComposite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL));
-
- Button selectButton = new Button(buttonComposite, SWT.NONE);
- selectButton.setText("Select All");
-
- selectButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- setChecked(true);
- }
- });
-
- selectButton.setFont(font);
- setButtonLayoutData(selectButton);
-
- Button deselectButton = new Button(buttonComposite, SWT.NONE);
- deselectButton.setText("Deselect All");
-
- deselectButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- setChecked(false);
- }
- });
-
- deselectButton.setFont(font);
- setButtonLayoutData(deselectButton);
-
- }
-
- private void setChecked(boolean checked) {
- for (TableItem item : filtersTable.getItems()) {
- item.setChecked(checked);
- }
- }
-
- private void createFilterTable(Composite composite, boolean enabled) {
-
- Font font = composite.getFont();
- this.filtersTable = new Table(composite, SWT.BORDER | SWT.MULTI | SWT.CHECK | SWT.H_SCROLL | SWT.V_SCROLL);
- this.filtersTable.setEnabled(enabled);
- GridData data = new GridData();
- // Set heightHint with a small value so the list size will be defined by
- // the space available in the dialog instead of resizing the dialog to
- // fit all the items in the list.
- data.heightHint = filtersTable.getItemHeight();
- data.verticalAlignment = GridData.FILL;
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- data.grabExcessVerticalSpace = true;
- this.filtersTable.setLayoutData(data);
- this.filtersTable.setFont(font);
-
- for (int i = 0; i < columnNames.length; i++) {
- TableColumn column = new TableColumn(filtersTable, SWT.NONE);
- column.setText(columnNames[i]);
- }
-
- }
-
- public Set<AbstractTaskContainer> getSelectedContainers() {
- Set<AbstractTaskContainer> result = new HashSet<AbstractTaskContainer>();
- TableItem[] items = filtersTable.getItems();
- for (TableItem item : items) {
- if (item.getChecked() && item.getData() instanceof AbstractTaskContainer) {
- result.add((AbstractTaskContainer) item.getData());
- }
- }
- return result;
- }
-
- public Date getReportStartDate() {
- if (dateRadioButton.getSelection() && reportStartDate != null) {
- return reportStartDate;
- } else {
- long today = new Date().getTime();
- long lastDay = numDaysToReport * DAY;
-
- int offsetToday = Calendar.getInstance().get(Calendar.HOUR) * 60 * 60 * 1000
- + Calendar.getInstance().get(Calendar.MINUTE) * 60 * 1000
- + Calendar.getInstance().get(Calendar.SECOND) * 1000;
- return new Date(today - offsetToday - lastDay);
- }
- }
-
- public Date getReportEndDate() {
- if (dateRadioButton.getSelection() && reportEndDate != null) {
- return reportEndDate;
- } else {
- return new Date();
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskPlanContentProvider.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskPlanContentProvider.java
deleted file mode 100644
index bfc2213a6..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskPlanContentProvider.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.planner;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-
-/**
- * @author Ken Sueda
- */
-public class TaskPlanContentProvider implements IStructuredContentProvider {
-
- private List<AbstractTask> tasks = new ArrayList<AbstractTask>();
-
- public Object[] getElements(Object inputElement) {
- return tasks.toArray();
- }
-
- public void dispose() {
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
-
- public void addTask(AbstractTask t) {
- if (!tasks.contains(t)) {
- tasks.add(t);
- }
- }
-
- public void removeTask(AbstractTask t) {
- tasks.remove(t);
- }
-
- public List<AbstractTask> getTasks() {
- return tasks;
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskPlanSorter.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskPlanSorter.java
deleted file mode 100644
index a73afac18..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskPlanSorter.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.planner;
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-
-/**
- * @author Mik Kersten
- */
-public class TaskPlanSorter extends TaskActivitySorter {
-
- // {".", "Description", "Priority", "Estimated Time", "Reminder Date"};
- public final static int PRIORITY = 1;
-
- public final static int DESCRIPTION = 2;
-
- public final static int DURATION = 3;
-
- public final static int ESTIMATE = 4;
-
- public final static int REMINDER = 5;
-
- public static final int ICON = 0;
-
- private int criteria;
-
- public TaskPlanSorter(int criteria) {
- super(criteria);
- this.criteria = criteria;
- }
-
- @Override
- public int compare(Viewer viewer, Object obj1, Object obj2) {
- AbstractTask t1 = (AbstractTask) obj1;
- AbstractTask t2 = (AbstractTask) obj2;
-
- switch (criteria) {
- case PRIORITY:
- return comparePriority(t1, t2);
- case DESCRIPTION:
- return compareDescription(t1, t2);
- case DURATION:
- return compareDuration(t1, t2);
- case ESTIMATE:
- return compareEstimated(t1, t2);
- case REMINDER:
- return compareReminder(t1, t2);
- default:
- return 0;
- }
- }
-
- private int compareReminder(AbstractTask task1, AbstractTask task2) {
- if (task2.getScheduledForDate() == null)
- return -1;
- if (task1.getScheduledForDate() == null)
- return 1;
- if (task1.getScheduledForDate() == null && task2.getScheduledForDate() == null)
- return 0;
- return task2.getScheduledForDate().compareTo(task1.getScheduledForDate());
- }
-
- // protected int compareEstimated(ITask task1, ITask task2) {
- // if (task1.getEstimateTimeHours() > task2.getEstimateTimeHours()) {
- // return 1;
- // } else {
- // return -1;
- // }
-
- // private int compareDescription(ITask task1, ITask task2) {
- // return
- // task1.getDescription(false).compareTo(task2.getDescription(false));
- // }
- //
- // private int comparePriority(ITask task1, ITask task2) {
- // return task1.getPriority().compareTo(task2.getPriority());
- // }
- //
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskPlannerLabelProvider.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskPlannerLabelProvider.java
deleted file mode 100644
index 1592599ee..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskPlannerLabelProvider.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.ui.planner;
-
-import java.text.DateFormat;
-import java.util.Calendar;
-import java.util.Date;
-
-import org.eclipse.jface.viewers.IColorProvider;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskElementLabelProvider;
-import org.eclipse.mylyn.monitor.core.DateUtil;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * @author Ken Sueda
- * @author Rob Elves
- */
-public class TaskPlannerLabelProvider extends TaskElementLabelProvider implements ITableLabelProvider, IColorProvider {
-
- private Calendar startDate;
-
- private Calendar endDate;
-
- private TreeViewer viewer;
-
- public TaskPlannerLabelProvider(TreeViewer viewer, Date startDate, Date endDate) {
- super(true);
- this.viewer = viewer;
- this.startDate = Calendar.getInstance();
- this.startDate.setTime(startDate);
- this.endDate = Calendar.getInstance();
- this.endDate.setTime(endDate);
- }
-
- private TaskElementLabelProvider taskListLabelProvider = new TaskElementLabelProvider(true);
-
- public Image getColumnImage(Object element, int columnIndex) {
- if (columnIndex == 0) {
- return super.getImage(element);
- } else {
- return null;
- }
- }
-
- public String getColumnText(Object element, int columnIndex) {
- try {
- if (element instanceof AbstractTask) {
- AbstractTask task = (AbstractTask) element;
- switch (columnIndex) {
- case 1:
- return task.getPriority();
- case 2:
- return task.getSummary();
- case 3:
- return DateUtil.getFormattedDurationShort(TasksUiPlugin.getTaskActivityManager().getElapsedTime(
- task, startDate, endDate));
- case 4:
- return task.getEstimateTimeHours() + " hours";
- case 5:
- if (task.getCreationDate() != null) {
- return DateFormat.getDateInstance(DateFormat.MEDIUM).format(task.getCreationDate());
- } else {
- StatusHandler.log("Task has no creation date: " + task.getSummary(), this);
- return "[unknown]";
- }
- case 6:
- if (task.getCompletionDate() != null) {
- return DateFormat.getDateInstance(DateFormat.MEDIUM).format(task.getCompletionDate());
- } else {
- return "";
- }
- }
- } else if (element instanceof AbstractTaskContainer) {
- AbstractTaskContainer container = (AbstractTaskContainer) element;
- switch (columnIndex) {
- case 1:
- return null;
- case 2:
- return container.getSummary();
- case 3: {
- ITreeContentProvider contentProvider = ((ITreeContentProvider) viewer.getContentProvider());
- long duration = 0;
- for (Object o : contentProvider.getChildren(container)) {
- if (o instanceof AbstractTask) {
- duration += TasksUiPlugin.getTaskActivityManager().getElapsedTime((AbstractTask) o,
- startDate, endDate);
- }
- }
- return DateUtil.getFormattedDurationShort(duration);
- }
- case 4: {
- ITreeContentProvider contentProvider = ((ITreeContentProvider) viewer.getContentProvider());
- long estimated = 0;
- for (Object o : contentProvider.getChildren(container)) {
- if (o instanceof AbstractTask) {
- estimated += ((AbstractTask) o).getEstimateTimeHours();
- }
- }
- return estimated + " hours";
- }
- case 5:
- return null;
- case 6:
- return null;
- }
- }
- } catch (RuntimeException e) {
- StatusHandler.fail(e, "Could not produce completed task label", false);
- return "";
- }
- return null;
- }
-
- @Override
- public Color getForeground(Object element) {
- return taskListLabelProvider.getForeground(element);
- }
-
- @Override
- public Color getBackground(Object element) {
- return taskListLabelProvider.getBackground(element);
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskReportGenerator.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskReportGenerator.java
deleted file mode 100644
index 4d14ecec8..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskReportGenerator.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.planner;
-
-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.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-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.AbstractTaskContainer;
-import org.eclipse.mylyn.tasks.core.TaskList;
-
-/**
- * @author Ken Sueda
- * @author Mik Kersten
- * @author Rob Elves (scope report to specific categories and queries)
- */
-public class TaskReportGenerator implements IRunnableWithProgress {
-
- private static final String LABEL_JOB = "Mylyn Task Activity Report";
-
- private boolean finished;
-
- private TaskList tasklist = null;
-
- private List<ITaskCollector> collectors = new ArrayList<ITaskCollector>();
-
- private List<AbstractTask> tasks = new ArrayList<AbstractTask>();
-
- private Set<AbstractTaskContainer> filterCategories;
-
- public TaskReportGenerator(TaskList tlist) {
- this(tlist, null);
- }
-
- public TaskReportGenerator(TaskList tlist, Set<AbstractTaskContainer> filterCategories) {
- tasklist = tlist;
- this.filterCategories = filterCategories != null ? filterCategories : new HashSet<AbstractTaskContainer>();
- }
-
- public void addCollector(ITaskCollector collector) {
- collectors.add(collector);
- }
-
- public void collectTasks() {
- try {
- run(new NullProgressMonitor());
- } catch (InvocationTargetException e) {
- // operation was canceled
- } catch (InterruptedException e) {
- StatusHandler.log(e, "Could not collect tasks");
- }
- }
-
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
-
- Set<AbstractTaskContainer> rootElements;
- if (filterCategories.size() == 0) {
- rootElements = tasklist.getRootElements();
- } else {
- rootElements = filterCategories;
- }
-
- int estimatedItemsToProcess = rootElements.size();
- monitor.beginTask(LABEL_JOB, estimatedItemsToProcess);
-
- for (Object element : rootElements) {
- monitor.worked(1);
- if (element instanceof AbstractTask) {
- AbstractTask task = (AbstractTask) element;
- for (ITaskCollector collector : collectors) {
- collector.consumeTask(task);
- }
- } else if (element instanceof AbstractRepositoryQuery) {
- // process queries
- AbstractRepositoryQuery repositoryQuery = (AbstractRepositoryQuery) element;
- for (AbstractTask task : repositoryQuery.getChildren()) {
- for (ITaskCollector collector : collectors) {
- collector.consumeTask(task);
- }
- }
- } else if (element instanceof AbstractTaskContainer) {
- AbstractTaskContainer cat = (AbstractTaskContainer) element;
- for (AbstractTask task : cat.getChildren())
- for (ITaskCollector collector : collectors) {
- collector.consumeTask(task);
- }
-
- }
- }
- // Put the results all into one list (tasks)
- for (ITaskCollector collector : collectors) {
- tasks.addAll(collector.getTasks());
- }
- finished = true;
- monitor.done();
- }
-
- public List<AbstractTask> getAllCollectedTasks() {
- return tasks;
- }
-
- public boolean isFinished() {
- return finished;
- }
-}
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 d9d102300..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/preferences/TasksUiPreferencePage.java
+++ /dev/null
@@ -1,551 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.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.internal.tasks.ui.ITasksUiConstants;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPreferenceConstants;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-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.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.forms.widgets.Section;
-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 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 FORWARDSLASH = "/";
-
- private static final String BACKSLASH_MULTI = "\\\\";
-
- private Button useRichEditor;
-
- private Button useWebBrowser;
-
- private Text synchScheduleTime = null;
-
- private Button enableBackgroundSynch;
-
- private Text taskDirectoryText = null;
-
- private Button browse = null;
-
- private Button backupNow = null;
-
- private Button notificationEnabledButton = null;
-
- private Text backupScheduleTimeText;
-
- private Text backupFolderText;
-
- private Spinner hourDayStart;
-
- private Spinner hourDayEnd;
-
- private int taskDataDirectoryAction = -1;
-
- private FormToolkit toolkit;
-
- private ExpandableComposite taskDataComposite;
-
- 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);
- createTaskDataControl(container);
-
- updateRefreshGroupEnablements();
- return container;
- }
-
- public void init(IWorkbench workbench) {
- // TODO Auto-generated method stub
- }
-
- @Override
- public boolean performOk() {
- String taskDirectory = taskDirectoryText.getText();
- taskDirectory = taskDirectory.replaceAll(BACKSLASH_MULTI, FORWARDSLASH);
-
- if (!taskDirectory.equals(TasksUiPlugin.getDefault().getDataDirectory())) {
- if (taskDataDirectoryAction == IDialogConstants.OK_ID) {
-// TasksUiPlugin.getDefault().getBackupManager().backupNow(true);
-//// TasksUiPlugin.getTaskListManager().saveTaskList();
-// TasksUiPlugin.getTaskListManager().copyDataDirContentsTo(taskDirectory);
-// TasksUiPlugin.getDefault().setDataDirectory(taskDirectory);
-// } else if (taskDataDirectoryAction == LOAD_EXISTING) {
- TasksUiPlugin.getDefault().getBackupManager().backupNow(true);
- TasksUiPlugin.getDefault().setDataDirectory(taskDirectory);
-
- } else if (taskDataDirectoryAction == IDialogConstants.CANCEL_ID) {
- // shouldn't get here
- }
- }
- getPreferenceStore().setValue(TasksUiPreferenceConstants.NOTIFICATIONS_ENABLED,
- notificationEnabledButton.getSelection());
- getPreferenceStore().setValue(TasksUiPreferenceConstants.BACKUP_SCHEDULE, backupScheduleTimeText.getText());
-
- getPreferenceStore().setValue(TasksUiPreferenceConstants.EDITOR_TASKS_RICH, useRichEditor.getSelection());
-
- getPreferenceStore().setValue(TasksUiPreferenceConstants.REPOSITORY_SYNCH_SCHEDULE_ENABLED,
- enableBackgroundSynch.getSelection());
- long miliseconds = 60000 * Long.parseLong(synchScheduleTime.getText());
- getPreferenceStore().setValue(TasksUiPreferenceConstants.REPOSITORY_SYNCH_SCHEDULE_MILISECONDS,
- "" + miliseconds);
-
- getPreferenceStore().setValue(TasksUiPreferenceConstants.PLANNING_STARTHOUR, hourDayStart.getSelection());
- getPreferenceStore().setValue(TasksUiPreferenceConstants.PLANNING_ENDHOUR, hourDayEnd.getSelection());
- backupNow.setEnabled(true);
- return true;
- }
-
- @Override
- public boolean performCancel() {
- taskDirectoryText.setText(TasksUiPlugin.getDefault().getDefaultDataDirectory());
- notificationEnabledButton.setSelection(getPreferenceStore().getBoolean(
- TasksUiPreferenceConstants.NOTIFICATIONS_ENABLED));
- backupScheduleTimeText.setText(getPreferenceStore().getString(TasksUiPreferenceConstants.BACKUP_SCHEDULE));
- backupFolderText.setText(TasksUiPlugin.getDefault().getBackupFolderPath());
-
- useRichEditor.setSelection(getPreferenceStore().getBoolean(TasksUiPreferenceConstants.EDITOR_TASKS_RICH));
- // synchQueries.setSelection(getPreferenceStore().getBoolean(
- // TaskListPreferenceConstants.REPOSITORY_SYNCH_ON_STARTUP));
- enableBackgroundSynch.setSelection(getPreferenceStore().getBoolean(
- TasksUiPreferenceConstants.REPOSITORY_SYNCH_SCHEDULE_ENABLED));
- synchScheduleTime.setText(getMinutesString());
-
- hourDayStart.setSelection(getPreferenceStore().getInt(TasksUiPreferenceConstants.PLANNING_STARTHOUR));
- hourDayEnd.setSelection(getPreferenceStore().getInt(TasksUiPreferenceConstants.PLANNING_ENDHOUR));
- backupNow.setEnabled(true);
- 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 + ITasksUiConstants.DEFAULT_BACKUP_FOLDER_NAME);
- backupNow.setEnabled(false);
- }
- } else {
- taskDirectoryText.setText(taskDirectory);
- backupFolderText.setText(taskDirectory + FORWARDSLASH + ITasksUiConstants.DEFAULT_BACKUP_FOLDER_NAME);
- backupNow.setEnabled(true);
- }
-
- notificationEnabledButton.setSelection(getPreferenceStore().getDefaultBoolean(
- TasksUiPreferenceConstants.NOTIFICATIONS_ENABLED));
- backupScheduleTimeText.setText(getPreferenceStore().getDefaultString(TasksUiPreferenceConstants.BACKUP_SCHEDULE));
-
- useRichEditor.setSelection(getPreferenceStore().getDefaultBoolean(TasksUiPreferenceConstants.EDITOR_TASKS_RICH));
-
- // synchQueries.setSelection(getPreferenceStore().getDefaultBoolean(
- // TaskListPreferenceConstants.REPOSITORY_SYNCH_ON_STARTUP));
- enableBackgroundSynch.setSelection(getPreferenceStore().getDefaultBoolean(
- TasksUiPreferenceConstants.REPOSITORY_SYNCH_SCHEDULE_ENABLED));
- // userRefreshOnly.setSelection(!enableBackgroundSynch.getSelection());
- long miliseconds = getPreferenceStore().getDefaultLong(
- TasksUiPreferenceConstants.REPOSITORY_SYNCH_SCHEDULE_MILISECONDS);
- long minutes = miliseconds / 60000;
- synchScheduleTime.setText("" + minutes);
-
- hourDayStart.setSelection(getPreferenceStore().getDefaultInt(TasksUiPreferenceConstants.PLANNING_STARTHOUR));
- hourDayEnd.setSelection(getPreferenceStore().getDefaultInt(TasksUiPreferenceConstants.PLANNING_ENDHOUR));
- 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(
- TasksUiPreferenceConstants.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(
- TasksUiPreferenceConstants.NOTIFICATIONS_ENABLED));
-
- // synchQueries = new Button(group, SWT.CHECK);
- // synchQueries.setText("Synchronize on startup");
- // synchQueries.setSelection(getPreferenceStore().getBoolean(
- // TaskListPreferenceConstants.REPOSITORY_SYNCH_ON_STARTUP));
-
- }
-
- 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(TasksUiPreferenceConstants.EDITOR_TASKS_RICH));
- useWebBrowser = new Button(container, SWT.RADIO);
- useWebBrowser.setText("Web Browser");
- useWebBrowser.setSelection(!getPreferenceStore().getBoolean(TasksUiPreferenceConstants.EDITOR_TASKS_RICH));
- }
-
- private void createTaskDataControl(Composite parent) {
-
- taskDataComposite = toolkit.createExpandableComposite(parent, Section.COMPACT | Section.TWISTIE
- | Section.TITLE_BAR);
- taskDataComposite.setFont(parent.getFont());
- taskDataComposite.setBackground(parent.getBackground());
- taskDataComposite.setText("Task Data (Advanced)");
- taskDataComposite.setLayout(new GridLayout(1, false));
- taskDataComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- taskDataComposite.addExpansionListener(new ExpansionAdapter() {
- @Override
- public void expansionStateChanged(ExpansionEvent e) {
- getControl().getShell().pack();
- }
- });
- Group taskDataGroup = new Group(taskDataComposite, SWT.SHADOW_ETCHED_IN);
- taskDataComposite.setClient(taskDataGroup);
-// taskDataGroup.setText("Task Data (Advanced)");
- taskDataGroup.setLayout(new GridLayout(1, false));
- taskDataGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- Label label = new Label(taskDataGroup, SWT.NULL);
- label.setText("Default data directory will move with workspace (Recommended)");
-
- 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 = 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 + ITasksUiConstants.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.getDefault().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 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());
-
- }
-
- private String getMinutesString() {
- long miliseconds = getPreferenceStore().getLong(
- TasksUiPreferenceConstants.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,
- "Change data directory",
- null,
- "Your Task List will be backed up to the previous data directory and can be restored via:\n\n\tFile > Import > Mylyn > Task Data\n\nProceed to overwrite with Task List from:\n\n\t "
- + dir, MessageDialog.WARNING, new String[] { IDialogConstants.OK_LABEL,
- IDialogConstants.CANCEL_LABEL }, IDialogConstants.CANCEL_ID);
- taskDataDirectoryAction = dialogConfirm.open();
-
- for (TaskEditor taskEditor : TasksUiUtil.getActiveRepositoryTaskEditors()) {
- TasksUiUtil.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 f68dd22e5..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/properties/ProjectPropertiesLinkProvider.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.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.preferences.IEclipsePreferences;
-import org.eclipse.core.runtime.preferences.IScopeContext;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.tasks.ui.AbstractTaskRepositoryLinkProvider;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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, TaskRepositoryManager 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.getUrl());
- try {
- projectNode.flush();
- return true;
- } catch (BackingStoreException e) {
- StatusHandler.fail(e, "Failed to save task repository to project association preference", false);
- }
- }
- 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 fffd37c2f..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/properties/ProjectTaskRepositoryPage.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.properties;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-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.Viewer;
-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.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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 TasksUiPlugin.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();
-
- final AddRepositoryAction action = new AddRepositoryAction();
-
- 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) {
- action.run();
- listViewer.setInput(project.getWorkspace());
- updateLinkedRepository();
- }
- });
-
- return composite;
- }
-
- void updateLinkedRepository() {
- TaskRepository repository = TasksUiPlugin.getDefault().getRepositoryForResource(project, true);
- 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.fail(e, "Unable to associate project with task repository", true);
- }
- }
- 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 3065afede..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/AbstractRepositorySearchQuery.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.tasks.ui.search;
-
-import org.eclipse.mylyn.tasks.ui.search.RepositorySearchResult;
-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 531e9405a..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/CreateQueryFromSearchAction.java
+++ /dev/null
@@ -1,83 +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.ui.TasksUiImages;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.ui.search.SearchHitCollector;
-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 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 AbstractTask) {
- ISearchQuery[] queries = NewSearchUI.getQueries();
- AbstractTask task = (AbstractTask) structuredSelection.getFirstElement();
- AbstractRepositoryConnector connector = TasksUiPlugin.getRepositoryManager().getRepositoryConnector(
- task.getConnectorKind());
- if (queries.length != 0 && connector != null) {
- SearchHitCollector searchHitCollector = (SearchHitCollector) queries[0];
- AbstractRepositoryQuery 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.setHandleIdentifier(dialog.getValue());
- TasksUiPlugin.getTaskListManager().getTaskList().addQuery(query);
- TasksUiPlugin.getSynchronizationManager().synchronize(connector, 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 f6174aed8..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.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 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.openRepositoryTask(repositoryHit.getRepositoryUrl(), repositoryHit.getTaskId(),
- repositoryHit.getUrl());
- }
-
- }
- }
-
-}
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 1ef44bdf9..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/RepositorySearchResultView.java
+++ /dev/null
@@ -1,321 +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.IMenuManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.viewers.ILabelDecorator;
-import org.eclipse.jface.viewers.ILabelProvider;
-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.mylyn.internal.tasks.ui.AddExistingTaskJob;
-import org.eclipse.mylyn.internal.tasks.ui.TaskListColorsAndFonts;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskElementLabelProvider;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskTableLabelProvider;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskCategory;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.search.internal.ui.SearchMessages;
-import org.eclipse.search.ui.IContextMenuConstants;
-import org.eclipse.search.ui.text.AbstractTextSearchViewPage;
-import org.eclipse.search.ui.text.Match;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.ui.IPageLayout;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.part.IShowInTargetList;
-import org.eclipse.ui.progress.IProgressService;
-import org.eclipse.ui.themes.IThemeManager;
-
-/**
- * Displays the results of a Repository search.
- *
- * @see org.eclipse.search.ui.text.AbstractTextSearchViewPage
- *
- * @author Rob Elves
- * @author Mik Kersten
- */
-public class RepositorySearchResultView extends AbstractTextSearchViewPage implements IAdaptable {
-
- // The categories to sort bug results by
-
- 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 taskContentProvider;
-
- private int currentSortOrder;
-
- private SearchResultSortAction sortByPriorityAction;
-
- private SearchResultSortAction sortByDescriptionAction;
-
- private OpenSearchResultAction openInEditorAction;
-
- private CreateQueryFromSearchAction addTaskListAction;
-
- private static final String[] SHOW_IN_TARGETS = new String[] { IPageLayout.ID_RES_NAV };
-
- private static final IShowInTargetList SHOW_IN_TARGET_LIST = new IShowInTargetList() {
- public String[] getShowInTargetIds() {
- return SHOW_IN_TARGETS;
- }
- };
-
- /**
- * Constructor
- */
- public RepositorySearchResultView() {
- // Only use the table layout.
- super(FLAG_LAYOUT_FLAT);
-
- 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);
- }
-
- @Override
- protected void elementsChanged(Object[] objects) {
- if (taskContentProvider != null) {
- taskContentProvider.elementsChanged(objects);
- }
- }
-
- @Override
- protected void clear() {
- if (taskContentProvider != null) {
- taskContentProvider.clear();
- }
- }
-
- // Allows the inherited method "getViewer" to be accessed publicly.
- @Override
- public StructuredViewer getViewer() {
- return super.getViewer();
- }
-
- @Override
- protected void configureTreeViewer(TreeViewer viewer) {
- // The tree layout is not used
- }
-
- @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();
- }
-
- /**
- * 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();
-
- TasksUiUtil.openRepositoryTask(repositoryHit.getRepositoryUrl(), repositoryHit.getTaskId(),
- repositoryHit.getUrl());
- }
-
- @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);
- menuManager.appendToGroup(IContextMenuConstants.GROUP_OPEN, openInEditorAction);
- menuManager.appendToGroup(IContextMenuConstants.GROUP_OPEN, addTaskListAction);
-
- // HACK: this should be a contribution
- final MenuManager subMenuManager = new MenuManager("Add to " + TaskListView.LABEL_VIEW + " Category");
- List<AbstractTaskCategory> categories = new ArrayList<AbstractTaskCategory>(TasksUiPlugin.getTaskListManager()
- .getTaskList()
- .getCategories());
-
- Collections.sort(categories);
- for (final AbstractTaskCategory category : categories) {
- if (!category.equals(TasksUiPlugin.getTaskListManager().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 AbstractTask) {
- AbstractTask task = (AbstractTask) selectedObject;
- TaskRepository repository = TasksUiPlugin.getRepositoryManager().getRepository(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);
- }
- });
- }
- }
- }
-
- class SearchViewTableLabelProvider extends TaskTableLabelProvider {
-
- public SearchViewTableLabelProvider(ILabelProvider provider, ILabelDecorator decorator, Color parentBackground) {
- super(provider, decorator, parentBackground);
- }
-
- @Override
- public Image getColumnImage(Object element, int columnIndex) {
- switch (columnIndex) {
- case 0:
- return super.getColumnImage(element, columnIndex);
- }
- return null;
- }
-
- @Override
- public String getColumnText(Object element, int columnIndex) {
- switch (columnIndex) {
- case 0:
- return super.getColumnText(element, columnIndex);
- }
- return null;
- }
-
- @Override
- public Color getBackground(Object element, int columnIndex) {
- // Note: see bug 142889
- return null;
- }
- }
-
-}
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 6c3358da8..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultContentProvider.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.search;
-
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.mylyn.tasks.ui.search.RepositorySearchResult;
-
-/**
- * @author Rob Elves (moved into task.ui)
- * @see org.eclipse.jface.viewers.IContentProvider
- */
-public abstract class SearchResultContentProvider implements IStructuredContentProvider {
-
- /** 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 7821aa32f..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 int bugSortOrder;
-
- /** The view where the Bugzilla search results are displayed. */
- private 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 c1b12ba2c..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultSorterDescription.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.search;
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskKeyComparator;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-
-/**
- * Sorts search results by summary.
- *
- * @author Rob Elves
- */
-public class SearchResultSorterDescription extends ViewerSorter {
-
- private 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(entry1.getTaskId(), entry2.getTaskId());
- // 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 {
- AbstractTask hit = (AbstractTask) 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 f8dcf9687..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.AbstractTask;
-
-/**
- * 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
- AbstractTask entry1 = (AbstractTask) e1;
- Integer id1 = Integer.parseInt(entry1.getTaskId());
-
- // cast the other object and get its bug taskId
- AbstractTask entry2 = (AbstractTask) 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 {
- AbstractTask hit = (AbstractTask) 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 22a784e6b..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.AbstractTask;
-
-/**
- * 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 {
- AbstractTask hit1 = (AbstractTask) e1;
- AbstractTask hit2 = (AbstractTask) 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 {
- AbstractTask hit = (AbstractTask) 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/SearchResultTableContentProvider.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultTableContentProvider.java
deleted file mode 100644
index 960edda5d..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchResultTableContentProvider.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.search;
-
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.mylyn.tasks.ui.search.RepositorySearchResult;
-
-/**
- * This implementation of <code>SearchResultContentProvider</code> is used for the table view of a Bugzilla search
- * result.
- *
- * @author Rob Elves (moved into task.ui)
- */
-public class SearchResultTableContentProvider extends SearchResultContentProvider implements IStructuredContentProvider {
-
- /** The page the Bugzilla search results are displayed in */
- private RepositorySearchResultView bugPage;
-
- /**
- * Constructor
- *
- * @param page
- * The page the Bugzilla search results are displayed in
- */
- public SearchResultTableContentProvider(RepositorySearchResultView page) {
- bugPage = page;
- }
-
- @Override
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- if (newInput instanceof RepositorySearchResult) {
- searchResult = (RepositorySearchResult) newInput;
- }
- }
-
- @Override
- public void elementsChanged(Object[] updatedElements) {
- TableViewer viewer = getViewer();
-// boolean tableLimited = SearchPreferencePage.isTableLimited();
- for (int i = 0; i < updatedElements.length; i++) {
- if (searchResult.getMatchCount(updatedElements[i]) > 0) {
- if (viewer.testFindItem(updatedElements[i]) != null)
- viewer.update(updatedElements[i], null);
- else {
-// if (!tableLimited || viewer.getTable().getItemCount() < SearchPreferencePage.getTableLimit())
- viewer.add(updatedElements[i]);
- }
- } else
- viewer.remove(updatedElements[i]);
- }
- }
-
- /**
- * Returns the viewer the bug results are displayed in.
- */
- private TableViewer getViewer() {
- return (TableViewer) bugPage.getViewer();
- }
-
- @Override
- public void clear() {
- getViewer().refresh();
- }
-
- /**
- * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
- */
- public Object[] getElements(Object inputElement) {
- if (inputElement instanceof RepositorySearchResult) {
- Object[] elements = ((RepositorySearchResult) inputElement).getElements();
-// int tableLimit = SearchPreferencePage.getTableLimit();
-// if (SearchPreferencePage.isTableLimited() && elements.length > tableLimit) {
-// Object[] shownElements = new Object[tableLimit];
-// System.arraycopy(elements, 0, shownElements, 0, tableLimit);
-// return shownElements;
-// }
- return elements;
- }
- return EMPTY_ARR;
- }
-
-}
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 138d89691..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/search/SearchScoreComputerAdapterFactory.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.search;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.mylyn.internal.tasks.ui.TaskSearchPage;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-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 AbstractTaskContainer) {
- 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/util/BackgroundSaveTimer.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/BackgroundSaveTimer.java
deleted file mode 100644
index 93b76f5bc..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/BackgroundSaveTimer.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.util;
-
-import org.eclipse.mylyn.monitor.core.ActivityTimerThread;
-import org.eclipse.mylyn.monitor.core.IActivityTimerListener;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-
-/**
- * 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("Could not schedule save job", this);
- }
- }
-
-// /** 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/DelegatingTaskExternalizer.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/DelegatingTaskExternalizer.java
deleted file mode 100644
index 8ee0e5dd2..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/DelegatingTaskExternalizer.java
+++ /dev/null
@@ -1,666 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.List;
-import java.util.Locale;
-
-import org.eclipse.mylyn.internal.tasks.core.RepositoryTaskHandleUtil;
-import org.eclipse.mylyn.internal.tasks.core.TaskArchive;
-import org.eclipse.mylyn.internal.tasks.core.TaskCategory;
-import org.eclipse.mylyn.internal.tasks.core.TaskExternalizationException;
-import org.eclipse.mylyn.internal.tasks.core.UnfiledCategory;
-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.AbstractTaskListFactory;
-import org.eclipse.mylyn.tasks.core.TaskList;
-import org.eclipse.mylyn.tasks.core.AbstractTask.PriorityLevel;
-import org.eclipse.mylyn.tasks.core.AbstractTask.RepositoryTaskSyncState;
-import org.eclipse.mylyn.web.core.XmlUtil;
-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
- */
-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";
-
- static final String KEY_NAME = "Name";
-
- static final String KEY_LABEL = "Label";
-
- static final String KEY_HANDLE = "Handle";
-
- static final String KEY_REPOSITORY_URL = "RepositoryUrl";
-
- 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_COMPLETE = "Complete";
-
- 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_DATE_CREATION = "CreationDate";
-
- static final String KEY_DATE_REMINDER = "ReminderDate";
-
- static final String KEY_DATE_DUE = "DueDate";
-
- static final String KEY_REMINDED = "Reminded";
-
- /**
- * 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_STALE = "Stale";
-
- static final String KEY_LAST_REFRESH = "LastRefreshTimeStamp";
-
- private List<AbstractTaskListFactory> factories = new ArrayList<AbstractTaskListFactory>();
-
- public void setFactories(List<AbstractTaskListFactory> externalizers) {
- this.factories = externalizers;
- }
-
- public Element createCategoryElement(AbstractTaskContainer category, Document doc, Element parent) {
- if (category instanceof TaskArchive) {
- return parent;
- } else if (category instanceof UnfiledCategory) {
- return parent;
- } else {
- Element node = doc.createElement(getCategoryTagName());
- node.setAttribute(DelegatingTaskExternalizer.KEY_NAME, category.getSummary());
- parent.appendChild(node);
- return node;
- }
- }
-
-// /**
-// * Override to create specific elements
-// */
-// public boolean canCreateElementFor(AbstractTask task) {
-// return false;
-// }
-
- public Element createTaskElement(AbstractTask task, Document doc, Element parent) {
- 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("No externalizer for task: " + task, this);
- return null;
-// taskTagName = getTaskTagName();
- }
- Element node = doc.createElement(taskTagName);
- factory.setAdditionalAttributes(task, node);
-
- node.setAttribute(KEY_LABEL, stripControlCharacters(task.getSummary()));
- node.setAttribute(KEY_HANDLE, task.getHandleIdentifier());
- node.setAttribute(KEY_REPOSITORY_URL, task.getRepositoryUrl());
-
- AbstractTaskContainer container = null;
-
- if (task.getParentContainers().size() > 0) {
- container = task.getParentContainers().iterator().next();
- }
- if (container != null) {
- if (container.getHandleIdentifier().equals(UnfiledCategory.HANDLE)) {
- node.setAttribute(KEY_CATEGORY, VAL_ROOT);
- } else {
- node.setAttribute(KEY_CATEGORY, container.getHandleIdentifier());
- }
- } else {
- // TODO: if/when subtasks are supported this should be handled
- }
-
- node.setAttribute(KEY_PRIORITY, task.getPriority());
- node.setAttribute(KEY_KIND, task.getTaskKind());
-
- if (task.isCompleted()) {
- node.setAttribute(KEY_COMPLETE, VAL_TRUE);
- } else {
- node.setAttribute(KEY_COMPLETE, VAL_FALSE);
- }
- 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.getEstimateTimeHours());
- node.setAttribute(KEY_DATE_END, formatExternDate(task.getCompletionDate()));
- node.setAttribute(KEY_DATE_CREATION, formatExternDate(task.getCreationDate()));
- node.setAttribute(KEY_DATE_DUE, formatExternDate(task.getDueDate()));
- node.setAttribute(KEY_DATE_REMINDER, formatExternDate(task.getScheduledForDate()));
- 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);
- }
-
- AbstractTask abstractTask = task;
- if (abstractTask.getLastReadTimeStamp() != null) {
- node.setAttribute(KEY_LAST_MOD_DATE, abstractTask.getLastReadTimeStamp());
- }
-
- if (abstractTask.isNotified()) {
- node.setAttribute(KEY_NOTIFIED_INCOMING, VAL_TRUE);
- } else {
- node.setAttribute(KEY_NOTIFIED_INCOMING, VAL_FALSE);
- }
-
- if (abstractTask.getSynchronizationState() != null) {
- node.setAttribute(KEY_SYNC_STATE, abstractTask.getSynchronizationState().toString());
- } else {
- node.setAttribute(KEY_SYNC_STATE, RepositoryTaskSyncState.SYNCHRONIZED.toString());
- }
-
- if (abstractTask.getOwner() != null) {
- node.setAttribute(KEY_OWNER, abstractTask.getOwner());
- }
-
- for (AbstractTask t : task.getChildren()) {
- createSubTaskElement(t, doc, node);
- }
-
- parent.appendChild(node);
- return node;
- }
-
- public void readSubTasks(AbstractTask 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);
- }
- }
- }
- }
-
- public void createSubTaskElement(AbstractTask task, Document doc, Element parent) {
- Element node = doc.createElement(KEY_SUBTASK);
- node.setAttribute(KEY_HANDLE, task.getHandleIdentifier());
- parent.appendChild(node);
- }
-
- private String stripControlCharacters(String text) {
- if (text == null)
- return "";
- return XmlUtil.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);
- }
-
-// public boolean canReadCategory(Node node) {
-// return node.getNodeName().equals(getCategoryTagName());
-// }
-
- public void readCategory(Node node, TaskList taskList) throws TaskExternalizationException {
- boolean hasCaughtException = false;
- Element element = (Element) node;
-
- AbstractTaskCategory category;
- if (element.hasAttribute(DelegatingTaskExternalizer.KEY_NAME)) {
- category = new TaskCategory(element.getAttribute(DelegatingTaskExternalizer.KEY_NAME));
- taskList.internalAddCategory((TaskCategory) category);
- } else {
- // LEGACY: registry categories did not have names
- category = taskList.getArchiveContainer();
- }
-
- NodeList list = node.getChildNodes();
- for (int i = 0; i < list.getLength(); i++) {
- Node child = list.item(i);
- try {
- // LEGACY: categories used to contain tasks?
- AbstractTask task = readTask(child, category, null);
- category.internalAddChild(task);
- taskList.insertTask(task, category, null);
- } catch (Throwable t) {
- hasCaughtException = true;
- }
- }
- if (hasCaughtException) {
- throw new TaskExternalizationException("Failed to load all tasks");
- }
- }
-
- public final AbstractTask readTask(Node node, AbstractTaskCategory legacyCategory, AbstractTask parent)
- throws TaskExternalizationException {
- AbstractTask task = null;
- String taskId = null;
- String repositoryUrl = null;
- String summary = "";
-// boolean alreadyRead = false;
-
- Element element = (Element) node;
- if (element.hasAttribute(KEY_HANDLE)) {
- String handle = element.getAttribute(KEY_HANDLE);
- repositoryUrl = RepositoryTaskHandleUtil.getRepositoryUrl(handle);
- taskId = RepositoryTaskHandleUtil.getTaskId(handle);
- } else {
- throw new TaskExternalizationException("Handle not stored for repository task");
- }
- if (element.hasAttribute(KEY_LABEL)) {
- summary = element.getAttribute(KEY_LABEL);
- }
-
- for (AbstractTaskListFactory externalizer : factories) {
- if (node.getNodeName().equals(externalizer.getTaskElementName())) {
- task = externalizer.createTask(repositoryUrl, taskId, summary, element);
- break;
- }
- }
-
-// if (!alreadyRead && this.canReadTask(node)) {
-// task = this.createTask(repositoryUrl, taskId, summary, element, taskList, category, parent);
-// alreadyRead = true;
-// }
- if (task != null) {
- readTaskInfo(task, element, parent, legacyCategory);
- }
-
- return task;
- }
-
-// public boolean canReadTask(Node node) {
-// return node.getNodeName().equals(getTaskTagName());
-// }
-
-// /**
-// * Override for connector-specific implementation
-// */
-// public AbstractTask createTask(String repositoryUrl, String taskId, String summary, Element element,
-// TaskList taskList, AbstractTaskContainer category, AbstractTask parent) throws TaskExternalizationException {
-// String handle;
-// if (element.hasAttribute(KEY_HANDLE)) {
-// handle = element.getAttribute(KEY_HANDLE);
-// } else {
-// throw new TaskExternalizationException("Handle not stored for task");
-// }
-// AbstractTask task = new LocalTask(handle, summary);
-// return task;
-// }
-
- private void readTaskInfo(AbstractTask task, Element element, AbstractTask parent, AbstractTaskCategory legacyCategory) throws TaskExternalizationException {
- if (task == null) {
- return;
- }
-
-// String categoryHandle = null;
-// if (element.hasAttribute(KEY_CATEGORY)) {
-// categoryHandle = element.getAttribute(KEY_CATEGORY);
-// AbstractTaskCategory category = null;
-// if (categoryHandle != null) {
-// category = taskList.getContainerForHandle(categoryHandle);
-// }
-//
-// if (category != null) {
-// taskList.internalAddTask(task, category);
-// } else if (parent == null) {
-// taskList.internalAddRootTask(task);
-// }
-// } else if (legacyCategory != null && !(legacyCategory instanceof TaskArchive)) {
-// task.addParentContainer(legacyCategory);
-// legacyCategory.internalAddChild(task);
-// } else {
-// taskList.internalAddTask(task, taskList.getArchiveContainer());
-// }
- task.setCategoryHandle(element.getAttribute(KEY_CATEGORY));
-
- 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 (element.getAttribute(KEY_ACTIVE).compareTo(VAL_TRUE) == 0) {
- task.setActive(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);
- }
- // NOTE: do not change the order of complete and end date!!
- if (element.getAttribute(KEY_COMPLETE).compareTo(VAL_TRUE) == 0) {
- task.setCompleted(true);
- } else {
- task.setCompleted(false);
- }
- 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_DUE)) {
- task.setDueDate(getDateFromString(element.getAttribute(KEY_DATE_DUE)));
- } else {
- task.setDueDate(null);
- }
- if (element.hasAttribute(KEY_DATE_REMINDER)) {
- task.setScheduledForDate(getDateFromString(element.getAttribute(KEY_DATE_REMINDER)));
- } else {
- task.setScheduledForDate(null);
- }
- 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);
- }
-
- AbstractTask abstractTask = task;
- abstractTask.setSynchronizing(false);
-
- if (element.hasAttribute(DelegatingTaskExternalizer.KEY_REPOSITORY_URL)) {
- abstractTask.setRepositoryUrl(element.getAttribute(DelegatingTaskExternalizer.KEY_REPOSITORY_URL));
- }
-
- if (element.hasAttribute(KEY_LAST_MOD_DATE) && !element.getAttribute(KEY_LAST_MOD_DATE).equals("")) {
- abstractTask.setLastReadTimeStamp(element.getAttribute(KEY_LAST_MOD_DATE));
- }
-
- if (element.hasAttribute(KEY_OWNER)) {
- abstractTask.setOwner(element.getAttribute(KEY_OWNER));
- }
-
- if (VAL_TRUE.equals(element.getAttribute(KEY_NOTIFIED_INCOMING))) {
- abstractTask.setNotified(true);
- } else {
- abstractTask.setNotified(false);
- }
-
- if (element.hasAttribute(KEY_SYNC_STATE)) {
- String syncState = element.getAttribute(KEY_SYNC_STATE);
- if (syncState.compareTo(RepositoryTaskSyncState.SYNCHRONIZED.toString()) == 0) {
- abstractTask.setSynchronizationState(RepositoryTaskSyncState.SYNCHRONIZED);
- } else if (syncState.compareTo(RepositoryTaskSyncState.INCOMING.toString()) == 0) {
- abstractTask.setSynchronizationState(RepositoryTaskSyncState.INCOMING);
- } else if (syncState.compareTo(RepositoryTaskSyncState.OUTGOING.toString()) == 0) {
- abstractTask.setSynchronizationState(RepositoryTaskSyncState.OUTGOING);
- } else if (syncState.compareTo(RepositoryTaskSyncState.CONFLICT.toString()) == 0) {
- abstractTask.setSynchronizationState(RepositoryTaskSyncState.CONFLICT);
- }
- }
-
-// NodeList list = element.getChildNodes();
-// for (int j = 0; j < list.getLength(); j++) {
-// Node child = list.item(j);
-// task.addSubTask(readTask(child, taskList, null, task));
-// }
- }
-
- // /**
- // * @return task ID, or null if not found
- // */
- // protected void readLegacyHandleFormat(ITask task, Element element) throws
- // TaskExternalizationException {
- // if (task instanceof AbstractTask) {
- // AbstractTask abstractTask = (AbstractTask) task;
- //
- // if (element.hasAttribute(KEY_HANDLE)) {
- // String handle = element.getAttribute(KEY_HANDLE);
- // String repositoryUrl = RepositoryTaskHandleUtil.getRepositoryUrl(handle);
- // String taskId = RepositoryTaskHandleUtil.getTaskId(handle);
- // abstractTask.setRepositoryUrl(repositoryUrl);
- // abstractTask.setTaskId(taskId);
- // } else {
- // throw new TaskExternalizationException("Handle not stored for repository
- // task");
- // }
- // }
- // }
-
- // protected void readTaskData(AbstractTask task) {
- // RepositoryTaskData data =
- // taskDataManager.getRepositoryTaskData(task.getHandleIdentifier());
- // // RepositoryTaskData data =
- // //
- // TasksUiPlugin.getTaskDataManager().getTaskData(task.getHandleIdentifier());
- // task.setTaskData(data);
- //
- // if (data != null && data.hasLocalChanges()) {
- // task.setSyncState(RepositoryTaskSyncState.OUTGOING);
- // }
- // }
-
- 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.fail(e, "Could not parse end date", false);
- }
- return date;
- }
-
- private String getCategoryTagName() {
- return KEY_TASK_CATEGORY;
- }
-
-// public String getTaskTagName() {
-// return AbstractTaskListElementFactory.KEY_TASK;
-// }
-
-// public boolean canCreateElementFor(AbstractRepositoryQuery query) {
-// return false;
-// }
-
- public Element createQueryElement(AbstractRepositoryQuery query, Document doc, Element parent) {
- AbstractTaskListFactory factory = null;
- String queryTagName = null;
- for (AbstractTaskListFactory currentFactory : factories) {
- if (currentFactory.canCreate(query)) {
- factory = currentFactory;
- queryTagName = factory.getQueryElementName(query);
- break;
- }
- }
- if (factory == null || queryTagName == null) {
- StatusHandler.log("No externalizer for query: " + query, this);
- return null;
-// queryTagName = getQueryTagNameForElement(query);
- }
-
-// String queryTagName = getQueryTagNameForElement(query);
-
- Element node = doc.createElement(queryTagName);
- factory.setAdditionalAttributes(query, node);
-
- node.setAttribute(DelegatingTaskExternalizer.KEY_NAME, query.getSummary());
- node.setAttribute(AbstractTaskListFactory.KEY_QUERY_STRING, query.getUrl());
- node.setAttribute(DelegatingTaskExternalizer.KEY_REPOSITORY_URL, query.getRepositoryUrl());
- if (query.getLastSynchronizedTimeStamp() != null) {
- node.setAttribute(DelegatingTaskExternalizer.KEY_LAST_REFRESH, query.getLastSynchronizedTimeStamp());
- }
- for (AbstractTask hit : query.getChildren()) {
- try {
- createQueryHitElement(hit, doc, node);
- } catch (Exception e) {
- StatusHandler.log(e, e.getMessage());
- }
- }
- parent.appendChild(node);
- return node;
- }
-
-// public boolean canReadQuery(Node node) {
-// return false;
-// }
-
-// public AbstractRepositoryQuery readQuery(Node node, TaskList tlist) throws TaskExternalizationException {
-// // doesn't know how to read any queries
-// return null;
-// }
-
-// public String getQueryTagNameForElement(AbstractRepositoryQuery query) {
-// return AbstractTaskListElementFactory.KEY_QUERY;
-// }
-
-// private String getQueryHitTagName() {
-// return AbstractTaskListElementFactory.KEY_QUERY_HIT;
-// }
-
- public Element createQueryHitElement(AbstractTask queryHit, Document doc, Element parent) {
- Element node = doc.createElement(KEY_QUERY_HIT);
- node.setAttribute(KEY_HANDLE, queryHit.getHandleIdentifier());
- parent.appendChild(node);
- return node;
- }
-
-// public boolean canReadQueryHit(Node node) {
-// return false;
-// }
-
- public final void readQueryHit(Element element, TaskList taskList, AbstractRepositoryQuery query)
- throws TaskExternalizationException {
-
- if (element.hasAttribute(KEY_HANDLE)) {
- String handle = element.getAttribute(KEY_HANDLE);
- AbstractTask hit = taskList.getTask(handle);
- if (hit != null) {
- taskList.addTask(hit, query);
- }
- } else {
- throw new TaskExternalizationException("Handle not stored for repository task");
- }
- }
-
- public List<AbstractTaskListFactory> getDelegateExternalizers() {
- return factories;
- }
-}
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/TaskDataExportJob.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskDataExportJob.java
deleted file mode 100644
index 2fefa2e36..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskDataExportJob.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.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.jface.operation.IRunnableWithProgress;
-import org.eclipse.mylyn.context.core.ContextCorePlugin;
-import org.eclipse.mylyn.internal.context.core.InteractionContextManager;
-import org.eclipse.mylyn.internal.monitor.core.util.ZipFileUtil;
-import org.eclipse.mylyn.internal.tasks.ui.ITasksUiConstants;
-import org.eclipse.mylyn.internal.tasks.ui.WorkspaceAwareContextStore;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * 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
- */
-public class TaskDataExportJob implements IRunnableWithProgress {
-
- private static final String JOB_LABEL = "Exporting Mylyn Task Data";
-
- private boolean zip;
-
- private boolean exportTaskList;
-
- private boolean exportActivationHistory;
-
- private boolean exportTaskContexts;
-
- private String destinationDirectory;
-
- private String zipFileName;
-
- private File destZipFile = null;
-
- private Collection<AbstractTask> tasks;
-
- /** export all data */
- public TaskDataExportJob(String destinationDirectory, boolean zipIt, String zipFileName) {
- this(destinationDirectory, true, true, true, zipIt, zipFileName, TasksUiPlugin.getTaskListManager()
- .getTaskList()
- .getAllTasks());
- }
-
- /** export specified data */
- public TaskDataExportJob(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(final IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- int jobSize = 1; // 1 for repositories.xml
- if (exportTaskList)
- jobSize++;
- if (exportActivationHistory)
- jobSize++;
- if (exportTaskContexts)
- jobSize += tasks.size();
- monitor.beginTask(JOB_LABEL, jobSize);
-
- // 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>();
-
- // Create folders in zip file before contained files
- String sourceContextsPath = TasksUiPlugin.getDefault().getDataDirectory() + File.separator
- + WorkspaceAwareContextStore.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.fail(new Exception("Export Exception"), "Could not export repositories file.",
- false);
- }
- monitor.worked(1);
- }
- }
-
- }
-
- if (exportTaskList) {
- TasksUiPlugin.getTaskListManager().saveTaskList();
-
- String sourceTaskListPath = TasksUiPlugin.getDefault().getDataDirectory() + File.separator
- + ITasksUiConstants.DEFAULT_TASK_LIST_FILE;
- File sourceTaskListFile = new File(sourceTaskListPath);
- if (sourceTaskListFile.exists()) {
- File destTaskListFile = new File(destinationDirectory + File.separator
- + ITasksUiConstants.DEFAULT_TASK_LIST_FILE);
-
- if (zip) {
- filesToZip.add(sourceTaskListFile);
- } else if (!destTaskListFile.equals(sourceTaskListFile)) {
- if (destTaskListFile.exists()) {
- destTaskListFile.delete();
- }
- if (!copy(sourceTaskListFile, destTaskListFile)) {
- StatusHandler.fail(new Exception("Export Exception"), "Could not export task list file.", false);
- }
- monitor.worked(1);
- }
- }
-
- }
-
- if (exportActivationHistory) {
- try {
- File sourceActivationHistoryFile = new File(contextsDirectory,
- InteractionContextManager.CONTEXT_HISTORY_FILE_NAME
- + InteractionContextManager.CONTEXT_FILE_EXTENSION);
-
- if (sourceActivationHistoryFile.exists()) {
-
- ContextCorePlugin.getContextManager().saveActivityContext();
-
- 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) {
- StatusHandler.fail(e, "Could not export activity history context file", true);
- }
- }
-
- if (exportTaskContexts) {
- // Prevent many repeated error messages
- boolean errorDisplayed = false;
- for (AbstractTask task : tasks) {
-
- if (!ContextCorePlugin.getContextManager().hasContext(task.getHandleIdentifier())) {
- continue; // Tasks without a context have no file to
- // copy
- }
-
- File sourceTaskContextFile = ContextCorePlugin.getContextManager().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) {
- StatusHandler.fail(new Exception("Export Exception: " + sourceTaskContextFile.getPath()
- + " -> " + destTaskFile.getPath()), "Could not export one or more task context files.",
- true);
- 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(e, "Could not create zip file.", true);
- }
- }
- 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/TaskListSaveManager.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskListSaveManager.java
deleted file mode 100644
index 00228fb44..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskListSaveManager.java
+++ /dev/null
@@ -1,316 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Queue;
-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.jobs.Job;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.mylyn.context.core.ContextCorePlugin;
-import org.eclipse.mylyn.internal.context.core.InteractionContextManager;
-import org.eclipse.mylyn.internal.tasks.ui.ITasksUiConstants;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.ITaskListChangeListener;
-import org.eclipse.mylyn.tasks.core.TaskContainerDelta;
-import org.eclipse.mylyn.tasks.ui.TaskListManager;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Mik Kersten
- * @author Eugene Kuleshov
- * @author Rob Elves
- */
-public class TaskListSaveManager implements ITaskListChangeListener, IBackgroundSaveListener {
-
- private final static int DEFAULT_SAVE_INTERVAL = 1 * 60 * 1000;
-
- private BackgroundSaveTimer saveTimer;
-
- private TaskListSaverJob taskListSaverJob;
-
- private boolean initializationWarningDialogShow = false;
-
- public TaskListSaveManager() {
- saveTimer = new BackgroundSaveTimer(this);
- saveTimer.setSaveIntervalMillis(DEFAULT_SAVE_INTERVAL);
- saveTimer.start();
-
- taskListSaverJob = new TaskListSaverJob();
- taskListSaverJob.schedule();
- }
-
- /**
- * Called periodically by the save timer
- */
- public void saveRequested() {
- if (TasksUiPlugin.getDefault() != null && Platform.isRunning()) {// &&
- // TasksUiPlugin.getDefault().isShellActive()
- try {
- taskListSaverJob.runRequested();
- } catch (Exception e) {
- StatusHandler.fail(e, "Could not auto save task list", false);
- }
- }
- }
-
- /**
- * Should only be used by TaskListManager and unit tests
- *
- * @param saveContext
- * @param async
- */
- public void saveTaskList(boolean saveContext, boolean async) {
- if (TasksUiPlugin.getDefault() != null && TasksUiPlugin.getDefault().isInitialized()) {
- TaskListManager taskListManager = TasksUiPlugin.getTaskListManager();
- if (async) {
- if (saveContext) {
- for (AbstractTask task : taskListManager.getTaskList().getActiveTasks()) {
- taskListSaverJob.addTaskContext(task);
- }
- }
- taskListSaverJob.requestSave();
- } else {
- taskListSaverJob.waitSaveCompleted();
- InteractionContextManager contextManager = ContextCorePlugin.getContextManager();
- if (saveContext) {
- for (AbstractTask task : new ArrayList<AbstractTask>(taskListManager.getTaskList().getActiveTasks())) {
- contextManager.saveContext(task.getHandleIdentifier());
- }
- }
- internalSaveTaskList();
- }
- } else if (PlatformUI.getWorkbench() != null && !PlatformUI.getWorkbench().isClosing()) {
- StatusHandler.log("Possible task list initialization failure, not saving list.", this);
- if (!initializationWarningDialogShow) {
- initializationWarningDialogShow = true;
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- if (PlatformUI.getWorkbench() != null && PlatformUI.getWorkbench().getDisplay() != null) {
- MessageDialog.openInformation(
- PlatformUI.getWorkbench().getDisplay().getActiveShell(),
- ITasksUiConstants.TITLE_DIALOG,
- "If task list is blank, Mylyn Task List may have failed to initialize.\n\n"
- + "First, try restarting to see if that corrects the problem.\n\n"
- + "Then, check the Error Log view for messages, and the FAQ for solutions.\n\n"
- + ITasksUiConstants.URL_HOMEPAGE);
- }
- }
- });
- }
- }
- }
-
- private synchronized void internalSaveTaskList() {
- TaskListManager taskListManager = TasksUiPlugin.getTaskListManager();
- taskListManager.getTaskListWriter().writeTaskList(taskListManager.getTaskList(),
- taskListManager.getTaskListFile());
- }
-
- /**
- * Copies all files in the current data directory to the specified folder. Will overwrite.
- */
- public void copyDataDirContentsTo(String targetFolderPath) {
- saveTaskList(true, false);
-
- File mainDataDir = new File(TasksUiPlugin.getDefault().getDataDirectory());
-
- for (File currFile : mainDataDir.listFiles()) {
- if (currFile.isFile()) {
- File destFile = new File(targetFolderPath + File.separator + currFile.getName());
- copy(currFile, destFile);
- } else if (currFile.isDirectory()) {
- File destDir = new File(targetFolderPath + File.separator + currFile.getName());
- if (!destDir.exists()) {
- if (!destDir.mkdir()) {
- StatusHandler.log("Unable to create destination context folder: " + destDir.getAbsolutePath(),
- this);
- continue;
- }
- }
- for (File file : currFile.listFiles()) {
- File destFile = new File(destDir, file.getName());
- if (destFile.exists()) {
- destFile.delete();
- }
- copy(file, destFile);
- }
- }
- }
- }
-
- // public void createTaskListBackupFile() {
- // String path = TasksUiPlugin.getDefault().getDataDirectory() +
- // File.separator
- // + TasksUiPlugin.DEFAULT_TASK_LIST_FILE;
- // File taskListFile = new File(path);
- // String backup = path.substring(0, path.indexOf('.')) +
- // FILE_SUFFIX_BACKUP;
- // copy(taskListFile, new File(backup));
- // }
- //
- // public String getBackupFilePath() {
- // String path = TasksUiPlugin.getDefault().getDataDirectory() +
- // File.separator
- // + TasksUiPlugin.DEFAULT_TASK_LIST_FILE;
- // return path.substring(0, path.indexOf('.')) + FILE_SUFFIX_BACKUP;
- // }
- //
- // public void reverseBackup() {
- // String path = TasksUiPlugin.getDefault().getBackupFolderPath() +
- // File.separator
- // + TasksUiPlugin.DEFAULT_TASK_LIST_FILE;
- // File taskListFile = new File(path);
- // String backup = path.substring(0, path.indexOf('.')) +
- // FILE_SUFFIX_BACKUP;
- // copy(new File(backup), taskListFile);
- // }
-
- 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 taskActivated(AbstractTask task) {
- // ignore
- }
-
- public void tasksActivated(List<AbstractTask> tasks) {
- // ignore
- }
-
- public void taskDeactivated(AbstractTask task) {
- saveTaskList(true, true);
- }
-
- public void localInfoChanged(AbstractTask task) {
- saveTaskList(false, true);
- }
-
- public void repositoryInfoChanged(AbstractTask task) {
- // ignore
- }
-
- public void tasklistRead() {
- // ignore
- }
-
- /** For testing only * */
- public BackgroundSaveTimer getSaveTimer() {
- return saveTimer;
- }
-
- public void containersChanged(Set<TaskContainerDelta> containers) {
- saveTaskList(false, true);
- }
-
- public void synchronizationCompleted() {
- // ignore
- }
-
- private class TaskListSaverJob extends Job {
-
- private final Queue<AbstractTask> taskQueue = new LinkedList<AbstractTask>();
-
- private volatile boolean saveRequested = false;
-
- private volatile boolean saveCompleted = true;
-
- TaskListSaverJob() {
- super("Task List Saver");
- setPriority(Job.LONG);
- setSystem(true);
- }
-
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- while (true) {
- if (saveRequested) {
- saveRequested = false;
- saveCompleted = false;
- InteractionContextManager contextManager = ContextCorePlugin.getContextManager();
- while (!taskQueue.isEmpty()) {
- AbstractTask task = taskQueue.poll();
- if (task != null) {
- contextManager.saveContext(task.getHandleIdentifier());
- }
- }
- internalSaveTaskList();
- }
-
- if (!saveRequested) {
- synchronized (this) {
- saveCompleted = true;
- notifyAll();
- try {
- wait();
- } catch (InterruptedException ex) {
- // ignore
- }
- }
- }
- }
- }
-
- void addTaskContext(AbstractTask task) {
- taskQueue.add(task);
- }
-
- void requestSave() {
- saveRequested = true;
- }
-
- void runRequested() {
- synchronized (this) {
- notifyAll();
- }
- }
-
- void waitSaveCompleted() {
- while (!saveCompleted) {
- synchronized (this) {
- try {
- wait();
- } catch (InterruptedException ex) {
- // ignore
- }
- }
- }
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskListWriter.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskListWriter.java
deleted file mode 100644
index cc9a66bce..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskListWriter.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.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.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.jface.dialogs.MessageDialog;
-import org.eclipse.mylyn.context.core.ContextCorePlugin;
-import org.eclipse.mylyn.internal.context.core.InteractionContext;
-import org.eclipse.mylyn.internal.context.core.InteractionContextExternalizer;
-import org.eclipse.mylyn.internal.tasks.core.TaskDataManager;
-import org.eclipse.mylyn.internal.tasks.core.TaskExternalizationException;
-import org.eclipse.mylyn.internal.tasks.core.TaskRepositoriesExternalizer;
-import org.eclipse.mylyn.internal.tasks.ui.ITasksUiConstants;
-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.AbstractTaskContainer;
-import org.eclipse.mylyn.tasks.core.AbstractTaskListFactory;
-import org.eclipse.mylyn.tasks.core.TaskList;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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
- *
- * TODO: move to core?
- */
-public class TaskListWriter {
-
- 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 TaskRepositoriesExternalizer repositoriesExternalizer;
-
- private InteractionContextExternalizer contextExternalizer;
-
- private List<Node> orphanedTaskNodes = new ArrayList<Node>();
-
- private List<Node> orphanedQueryNodes = new ArrayList<Node>();
-
- private String readVersion = "";
-
- private boolean hasCaughtException = false;
-
- public TaskListWriter() {
- this.delagatingExternalizer = new DelegatingTaskExternalizer();
- this.repositoriesExternalizer = new TaskRepositoriesExternalizer();
- this.contextExternalizer = new InteractionContextExternalizer();
- }
-
- public void setDelegateExternalizers(List<AbstractTaskListFactory> externalizers) {
- this.externalizers = externalizers;
- this.delagatingExternalizer.setFactories(externalizers);
- }
-
- public void writeTaskList(TaskList taskList, File outFile) {
- Document doc = createTaskListDocument();
- if (doc == null) {
- return;
- }
-
- Element root = createTaskListRoot(doc);
-
- // create the categories
- for (AbstractTaskContainer category : taskList.getCategories()) {
- // if (!category.getHandleIdentifier().equals(TaskArchive.HANDLE)) {
- delagatingExternalizer.createCategoryElement(category, doc, root);
- // }
- }
-
- for (AbstractRepositoryQuery query : taskList.getQueries()) {
-// Element element = null;
- try {
-// for (ITaskListElementFactory externalizer : externalizers) {
-// if (externalizer.canCreateElementFor(query))
-// element = externalizer.createQueryElement(query, doc, root);
-// }
-// if (element == null && delagatingExternalizer.canCreateElementFor(query)) {
- delagatingExternalizer.createQueryElement(query, doc, root);
-// }
- } catch (Throwable t) {
- StatusHandler.fail(t, "Did not externalize: " + query.getSummary(), true);
- }
-// if (element == null) {
-// StatusManager.log("Did not externalize: " + query, this);
-// }
- }
-
- for (AbstractTask task : taskList.getAllTasks()) {
- delagatingExternalizer.createTaskElement(task, doc, root);
-// createTaskElement(doc, root, task);
- }
-
- // 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);
- }
- }
-
-// doc.appendChild(root);
- writeDOMtoFile(doc, outFile);
- return;
- }
-
-// private void createTaskElement(Document doc, Element root, AbstractTask task) {
-// try {
-// Element element = null;
-// for (ITaskListElementFactory externalizer : externalizers) {
-// if (externalizer.canCreateElementFor(task)) {
-// element = externalizer.createTaskElement(task, doc, root);
-// break;
-// }
-// }
-// if (element == null) {// &&
- // delagatingExternalizer.canCreateElementFor(task))
- // {
-// delagatingExternalizer.createTaskElement(task, doc, root);
-// } else if (element == null) {
-// StatusManager.log("Did not externalize: " + task, this);
-// }
-// } catch (Exception e) {
-// StatusManager.log(e, e.getMessage());
-// }
-// }
-
- /**
- * Writes an XML file from a DOM.
- *
- * doc - the document to write file - the file to be written to
- */
- private void writeDOMtoFile(Document doc, File file) {
- try {
- ZipOutputStream outputStream = new ZipOutputStream(new FileOutputStream(file));
- writeTaskList(doc, outputStream);
- outputStream.close();
- } catch (Exception fnfe) {
- StatusHandler.log(fnfe, "TaskList could not be found");
- }
- }
-
- /**
- * @param doc
- * @param outputStream
- * @throws IOException
- */
- private void writeTaskList(Document doc, ZipOutputStream outputStream) throws IOException {
- ZipEntry zipEntry = new ZipEntry(ITasksUiConstants.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();
- }
- }
-
- /**
- * TODO: fix this old mess
- */
- public void readTaskList(TaskList taskList, File inFile, TaskDataManager taskDataManager) {
- hasCaughtException = false;
- Map<AbstractTask, NodeList> tasksWithSubtasks = new HashMap<AbstractTask, NodeList>();
- orphanedTaskNodes.clear();
- orphanedQueryNodes.clear();
- try {
- if (!inFile.exists())
- return;
- Document doc = openAsDOM(inFile);
- 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)) {
- StatusHandler.log("version: " + readVersion + " not supported", this);
- } else {
- NodeList list = root.getChildNodes();
-
- // NOTE: order is important, first read the 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);
- }
- }
-
- // then read the 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.insertTask(task, null, null);
- 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.readSubTasks(task, nodes, taskList);
- }
-
- // then queries and hits which get linked to tasks
- 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);
- }
- }
-
- // bug#173710 - task number incorrect resulting in invalid task
- // list
- // Doing count each time
- int largest = taskList.findLargestTaskId();
- taskList.setLastLocalTaskId(largest);
-
- }
- } 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) {
- StatusHandler.log(e, "could not create document");
- 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
- */
- private AbstractRepositoryQuery readQuery(TaskList taskList, Node child) {
- AbstractRepositoryQuery 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.internalAddQuery(query);
- }
-
- NodeList queryChildren = child.getChildNodes();
- for (int ii = 0; ii < queryChildren.getLength(); ii++) {
- Node queryNode = queryChildren.item(ii);
- try {
- delagatingExternalizer.readQueryHit((Element) queryNode, taskList, query);
- } 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) 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(ITasksUiConstants.FILE_EXTENSION)) {
- // is zipped context
- inputStream = new ZipInputStream(new FileInputStream(inputFile));
- // search for TaskList entry
- ZipEntry entry = ((ZipInputStream) inputStream).getNextEntry();
- while (entry != null) {
- if (ITasksUiConstants.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
- 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("Unable to delete old backup tasklist file", this);
- return;
- }
- }
- if (!copy(inFile, save)) {
- inFile.renameTo(new File(name));
- }
- if (child == null) {
- StatusHandler.log(e, ITasksUiConstants.MESSAGE_RESTORE);
- } else {
- e.printStackTrace(); // in case logging plug-in has not yet started
- StatusHandler.log(e, "Tasks may have been lost from " + child.getNodeName());
- }
- }
-
- 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<AbstractRepositoryQuery> queries, File outFile) {
- Set<TaskRepository> repositories = new HashSet<TaskRepository>();
- for (AbstractRepositoryQuery query : queries) {
- TaskRepository repository = TasksUiPlugin.getRepositoryManager().getRepository(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 fnfe) {
- StatusHandler.log(fnfe, "TaskList could not be found");
- }
- }
- return;
- }
-
- /**
- * @return null if it was not possible to create the Query document.
- */
- public Document createQueryDocument(List<AbstractRepositoryQuery> queries) {
- Document doc = createTaskListDocument();
- if (doc == null) {
- return null;
- }
-
- Element root = createTaskListRoot(doc);
-
- for (AbstractRepositoryQuery query : queries) {
- try {
- delagatingExternalizer.createQueryElement(query, doc, root);
- } catch (Throwable t) {
- StatusHandler.fail(t, "Did not externalize: " + query.getSummary(), true);
- return null;
- }
- }
-
-// doc.appendChild(root);
- return doc;
- }
-
- public List<AbstractRepositoryQuery> readQueries(File inFile) {
- List<AbstractRepositoryQuery> queries = new ArrayList<AbstractRepositoryQuery>();
- try {
- if (!inFile.exists())
- return queries;
- Document doc = openAsDOM(inFile);
- if (doc == null) {
- handleException(inFile, null, new TaskExternalizationException("TaskList was not well formed XML"));
- return queries;
- }
- queries = readQueryDocument(doc);
- } catch (Exception e) {
- handleException(inFile, null, e);
- }
-
- return queries;
- }
-
- /**
- * @param Query
- * document to read.
- */
- public List<AbstractRepositoryQuery> readQueryDocument(Document doc) {
- List<AbstractRepositoryQuery> queries = new ArrayList<AbstractRepositoryQuery>();
- 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)) {
- AbstractRepositoryQuery query = readQuery(null, child);
- if (query != null) {
- queries.add(query);
- }
- }
- } catch (Exception e) {
- StatusHandler.log(e, "Tasks may have been lost from " + child.getNodeName());
- }
- }
- } else {
- StatusHandler.log("version: " + readVersion + " not supported", this);
- }
-
- 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) {
- Set<TaskRepository> repositories = new HashSet<TaskRepository>();
- if (!task.isLocal()) {
- repositories.add(TasksUiPlugin.getRepositoryManager().getRepository(task.getRepositoryUrl()));
- }
-
- Document doc = createTaskListDocument();
- if (doc == null) {
- return;
- }
-
- Element root = createTaskListRoot(doc);
-
- delagatingExternalizer.createTaskElement(task, doc, root);
- try {
- ZipOutputStream outputStream = new ZipOutputStream(new FileOutputStream(outFile));
- // write task data
- writeTaskList(doc, outputStream);
-
- // write context data
- InteractionContext context = ContextCorePlugin.getContextManager().loadContext(task.getHandleIdentifier());
- contextExternalizer.writeContext(context, outputStream);
- if (repositories.size() > 0) {
- repositoriesExternalizer.writeRepositories(repositories, outputStream);
- }
-
- outputStream.close();
- } catch (Exception e) {
- StatusHandler.log(e, "Task data was not written");
- }
- }
-
- public List<AbstractTask> readTasks(File inFile) {
- List<AbstractTask> tasks = new ArrayList<AbstractTask>();
- try {
- if (!inFile.exists())
- return tasks;
- Document doc = openAsDOM(inFile);
- 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(e, "Tasks may have been lost from " + child.getNodeName());
- }
- }
- } else {
- StatusHandler.log("version: " + readVersion + " not supported", this);
- }
- } 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/TasksUiExtensionReader.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TasksUiExtensionReader.java
deleted file mode 100644
index 8216b240b..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TasksUiExtensionReader.java
+++ /dev/null
@@ -1,450 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.Platform;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.text.hyperlink.IHyperlinkDetector;
-import org.eclipse.mylyn.internal.tasks.ui.IDynamicSubMenuContributor;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.internal.tasks.ui.views.AbstractTaskListPresentation;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.AbstractTaskListFactory;
-import org.eclipse.mylyn.tasks.core.RepositoryTemplate;
-import org.eclipse.mylyn.tasks.ui.AbstractDuplicateDetector;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.AbstractTaskRepositoryLinkProvider;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorFactory;
-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 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_HYPERLINK_LISTENER = "hyperlinkListener";
-
- 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;
-
- public static void initStartupExtensions(TaskListWriter delegatingExternalizer) {
- List<AbstractTaskListFactory> externalizers = new ArrayList<AbstractTaskListFactory>();
- if (!coreExtensionsRead) {
- IExtensionRegistry registry = Platform.getExtensionRegistry();
-
- // HACK: has to be read first
- IExtensionPoint repositoriesExtensionPoint = registry.getExtensionPoint(EXTENSION_REPOSITORIES);
- IExtension[] repositoryExtensions = repositoriesExtensionPoint.getExtensions();
- for (int i = 0; i < repositoryExtensions.length; i++) {
- IConfigurationElement[] elements = repositoryExtensions[i].getConfigurationElements();
- for (int j = 0; j < elements.length; j++) {
- if (elements[j].getName().equals(ELMNT_REPOSITORY_CONNECTOR)) {
- readRepositoryConnectorCore(elements[j]);
- } else if (elements[j].getName().equals(ELMNT_EXTERNALIZER)) {
- readExternalizer(elements[j], externalizers);
- }
- }
- }
-
- IExtensionPoint extensionPoint = registry.getExtensionPoint(EXTENSION_TASK_CONTRIBUTOR);
- IExtension[] extensions = extensionPoint.getExtensions();
- for (int i = 0; i < extensions.length; i++) {
- IConfigurationElement[] elements = extensions[i].getConfigurationElements();
- for (int j = 0; j < elements.length; j++) {
- if (elements[j].getName().equals(DYNAMIC_POPUP_ELEMENT)) {
- readDynamicPopupContributor(elements[j]);
- }
- }
- }
-
- IExtensionPoint templatesExtensionPoint = registry.getExtensionPoint(EXTENSION_TEMPLATES);
- IExtension[] templateExtensions = templatesExtensionPoint.getExtensions();
- for (int i = 0; i < templateExtensions.length; i++) {
- IConfigurationElement[] elements = templateExtensions[i].getConfigurationElements();
- for (int j = 0; j < elements.length; j++) {
- if (elements[j].getName().equals(EXTENSION_TMPL_REPOSITORY)) {
- readRepositoryTemplate(elements[j]);
- }
- }
- }
-
- IExtensionPoint editorsExtensionPoint = registry.getExtensionPoint(EXTENSION_EDITORS);
- IExtension[] editors = editorsExtensionPoint.getExtensions();
- for (int i = 0; i < editors.length; i++) {
- IConfigurationElement[] elements = editors[i].getConfigurationElements();
- for (int j = 0; j < elements.length; j++) {
- if (elements[j].getName().equals(ELMNT_EDITOR_FACTORY)) {
- readEditorFactory(elements[j]);
- } else if (elements[j].getName().equals(ELMNT_HYPERLINK_DETECTOR)) {
- readHyperlinkDetector(elements[j]);
- }
- }
- }
- delegatingExternalizer.setDelegateExternalizers(externalizers);
-
- IExtensionPoint presentationsExtensionPoint = registry.getExtensionPoint(EXTENSION_PRESENTATIONS);
- IExtension[] presentations = presentationsExtensionPoint.getExtensions();
- for (int i = 0; i < presentations.length; i++) {
- IConfigurationElement[] elements = presentations[i].getConfigurationElements();
- for (int j = 0; j < elements.length; j++) {
- readPresentation(elements[j]);
- }
- }
-
- coreExtensionsRead = true;
- }
- }
-
- public static void initWorkbenchUiExtensions() {
- IExtensionRegistry registry = Platform.getExtensionRegistry();
-
- IExtensionPoint repositoriesExtensionPoint = registry.getExtensionPoint(EXTENSION_REPOSITORIES);
- IExtension[] repositoryExtensions = repositoriesExtensionPoint.getExtensions();
- for (int i = 0; i < repositoryExtensions.length; i++) {
- IConfigurationElement[] elements = repositoryExtensions[i].getConfigurationElements();
- for (int j = 0; j < elements.length; j++) {
- if (elements[j].getName().equals(ELMNT_REPOSITORY_UI)) {
- readRepositoryConnectorUi(elements[j]);
- }
- }
- }
-
- IExtensionPoint linkProvidersExtensionPoint = registry.getExtensionPoint(EXTENSION_REPOSITORY_LINKS_PROVIDERS);
- IExtension[] linkProvidersExtensions = linkProvidersExtensionPoint.getExtensions();
- for (int i = 0; i < linkProvidersExtensions.length; i++) {
- IConfigurationElement[] elements = linkProvidersExtensions[i].getConfigurationElements();
- for (int j = 0; j < elements.length; j++) {
- if (elements[j].getName().equals(ELMNT_REPOSITORY_LINK_PROVIDER)) {
- readLinkProvider(elements[j]);
- }
- }
- }
-
- IExtensionPoint duplicateDetectorsExtensionPoint = registry.getExtensionPoint(EXTENSION_DUPLICATE_DETECTORS);
- IExtension[] dulicateDetectorsExtensions = duplicateDetectorsExtensionPoint.getExtensions();
- for (int i = 0; i < dulicateDetectorsExtensions.length; i++) {
- IConfigurationElement[] elements = dulicateDetectorsExtensions[i].getConfigurationElements();
- for (int j = 0; j < elements.length; j++) {
- if (elements[j].getName().equals(ELMNT_DUPLICATE_DETECTOR)) {
- readDuplicateDetector(elements[j]);
- }
- }
- }
- }
-
- 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(e, "Could not load presentation extension");
- }
- }
-
- 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.setKind(element.getAttribute(ATTR_KIND));
- TasksUiPlugin.getDefault().addDuplicateDetector(duplicateDetector);
- } else {
- StatusHandler.log("Could not load duplicate detector: " + obj.getClass().getCanonicalName(), null);
- }
- } catch (CoreException e) {
- StatusHandler.log(e, "Could not load duplicate detector extension");
- }
- }
-
- 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("Could not load repository link provider: "
- + repositoryLinkProvider.getClass().getCanonicalName(), null);
- }
- } catch (CoreException e) {
- StatusHandler.log(e, "Could not load repository link provider extension");
- }
- }
-
- private static void readHyperlinkDetector(IConfigurationElement element) {
- try {
- Object hyperlinkDetector = element.createExecutableExtension(ATTR_CLASS);
- if (hyperlinkDetector instanceof IHyperlinkDetector) {
- TasksUiPlugin.getDefault().addTaskHyperlinkDetector((IHyperlinkDetector) hyperlinkDetector);
- } else {
- StatusHandler.log("Could not load detector: " + hyperlinkDetector.getClass().getCanonicalName(), null);
- }
- } catch (CoreException e) {
- StatusHandler.log(e, "Could not load tasklist hyperlink detector extension");
- }
- }
-
- 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("Could not load editor: " + editor.getClass().getCanonicalName() + " must implement "
- + AbstractTaskEditorFactory.class.getCanonicalName(), null);
- }
- } catch (CoreException e) {
- StatusHandler.log(e, "Could not load tasklist listener extension");
- }
- }
-
- private static void readRepositoryConnectorCore(IConfigurationElement element) {
- try {
- Object type = element.getAttribute(ELMNT_TYPE);
- Object connectorCore = element.createExecutableExtension(ATTR_CLASS);
- if (connectorCore instanceof AbstractRepositoryConnector && type != null) {
- AbstractRepositoryConnector repositoryConnector = (AbstractRepositoryConnector) connectorCore;
- TasksUiPlugin.getRepositoryManager().addRepositoryConnector(repositoryConnector);
-
- String userManagedString = element.getAttribute(ATTR_USER_MANAGED);
- if (userManagedString != null) {
- boolean userManaged = Boolean.parseBoolean(userManagedString);
- repositoryConnector.setUserManaged(userManaged);
- }
- } else {
- StatusHandler.log("could not not load connector core: " + connectorCore, null);
- }
- } catch (CoreException e) {
- StatusHandler.log(e, "Could not load tasklist listener extension");
- }
- }
-
- 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(),
- TasksUiImages.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("could not not load connector ui: " + connectorUiObject, null);
- }
-
- } catch (CoreException e) {
- StatusHandler.log(e, "Could not load tasklist listener extension");
- }
- }
-
- 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
- && TasksUiPlugin.getRepositoryManager().getRepositoryConnector(repKind) != null) {
- AbstractRepositoryConnector connector = TasksUiPlugin.getRepositoryManager()
- .getRepositoryConnector(repKind);
- RepositoryTemplate template = new RepositoryTemplate(label, serverUrl, encoding, version, newTaskUrl,
- taskPrefix, taskQueryUrl, newAccountUrl, anonymous, addAuto);
- connector.addTemplate(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 {
- StatusHandler.log("Could not load repository template extension " + element.getName(),
- TasksUiExtensionReader.class);
- }
- }
-
- 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("Could not load dynamic popup menu: "
- + dynamicPopupContributor.getClass().getCanonicalName() + " must implement "
- + IDynamicSubMenuContributor.class.getCanonicalName(), null);
- }
- } catch (CoreException e) {
- StatusHandler.log(e, "Could not load dynamic popup extension");
- }
- }
-
- 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("Could not load externalizer: " + externalizerObject.getClass().getCanonicalName()
- + " must implement " + AbstractTaskListFactory.class.getCanonicalName(), null);
- }
- } catch (CoreException e) {
- StatusHandler.log(e, "Could not load task handler extension");
- }
- }
-}
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/AbstractFilteredTree.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/AbstractFilteredTree.java
deleted file mode 100644
index 6e848d36f..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/AbstractFilteredTree.java
+++ /dev/null
@@ -1,224 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.lang.reflect.Field;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.ToolBarManager;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
-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.ui.dialogs.FilteredTree;
-import org.eclipse.ui.dialogs.PatternFilter;
-import org.eclipse.ui.internal.WorkbenchMessages;
-import org.osgi.framework.Bundle;
-
-/**
- * @author Mik Kersten
- */
-public abstract class AbstractFilteredTree extends FilteredTree {
-
- private static final int filterWidth = 69;
-
- public static final String LABEL_FIND = " Find:";
-
- private Job refreshJob;
-
- private AdaptiveRefreshPolicy refreshPolicy;
-
- private Composite progressComposite;
-
- private Composite searchComposite;
-
- private boolean showProgress = false;
-
- private boolean eclipse_3_3_workbench = false;
-
- /**
- * HACK: using reflection to gain access
- */
- public AbstractFilteredTree(Composite parent, int treeStyle, PatternFilter filter) {
- super(parent, treeStyle, filter);
- Field refreshField;
- try {
- refreshField = FilteredTree.class.getDeclaredField("refreshJob");
- refreshField.setAccessible(true);
- refreshJob = (Job) refreshField.get(this);
- refreshPolicy = new AdaptiveRefreshPolicy(refreshJob, super.getFilterControl());
- } catch (Exception e) {
- StatusHandler.fail(e, "Could not get refresh job", false);
- }
- setInitialText("");
-
- Bundle bundle = Platform.getBundle("org.eclipse.ui.workbench");
- if (bundle.getLocation().contains("_3.3.")) {
- eclipse_3_3_workbench = true;
- }
- }
-
- @Override
- protected void createControl(Composite parent, int treeStyle) {
- super.createControl(parent, treeStyle);
-
- // Override superclass layout settings...
- GridLayout layout = (GridLayout) getLayout();
- layout.verticalSpacing = 0;
- layout.horizontalSpacing = 0;
- }
-
- @Override
- protected Control createTreeControl(Composite parent, int style) {
- progressComposite = createProgressComposite(parent);
- progressComposite.setVisible(false);
- ((GridData) progressComposite.getLayoutData()).exclude = true;
-
- searchComposite = createSearchComposite(parent);
- if (searchComposite != null) {
- searchComposite.setVisible(false);
- ((GridData) searchComposite.getLayoutData()).exclude = true;
- }
-
- return super.createTreeControl(parent, style);
- }
-
- @Override
- protected Composite createFilterControls(Composite parent) {
- GridLayout gridLayout = new GridLayout(4, false);
- gridLayout.marginWidth = 0;
- gridLayout.marginHeight = 2;
- gridLayout.verticalSpacing = 0;
- parent.setLayout(gridLayout);
-
- Label label = new Label(parent, SWT.NONE);
- label.setText(LABEL_FIND);
-
- // from super
- createFilterText(parent);
- createClearText(parent);
- if (filterToolBar != null) {
- filterToolBar.update(false);
- // initially there is no text to clear
- filterToolBar.getControl().setVisible(false);
- }
-
- GridData gd = new GridData(SWT.FILL, SWT.CENTER, true, false);
- gd.minimumWidth = filterWidth;
- filterText.setLayoutData(gd);
- filterText.addKeyListener(new KeyAdapter() {
-
- @Override
- public void keyPressed(KeyEvent e) {
- if (e.character == SWT.ESC) {
- setFilterText("");
- }
- }
- });
-
- Composite superComposite = new Composite(parent, SWT.NONE);
- GridLayout superLayout = new GridLayout(4, false);
- GridData superLayoutData = new GridData(SWT.LEFT, SWT.CENTER, true, false);
- superComposite.setLayout(superLayout);
- superComposite.setLayoutData(superLayoutData);
-
- Composite workingSetComposite = createActiveWorkingSetComposite(superComposite);
- workingSetComposite.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
-
- Composite activeTaskComposite = createActiveTaskComposite(superComposite);
- activeTaskComposite.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false));
- parent.layout();
- return parent;
- }
-
- private void createClearText(Composite parent) {
- // only create the button if the text widget doesn't support one
- // natively
- if ((filterText.getStyle() & SWT.CANCEL) == 0) {
- filterToolBar = new ToolBarManager(SWT.FLAT | SWT.HORIZONTAL);
- filterToolBar.createControl(parent);
-
- IAction clearTextAction = new Action("", IAction.AS_PUSH_BUTTON) {//$NON-NLS-1$
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.action.Action#run()
- */
- @Override
- public void run() {
- clearText();
- }
- };
-
- clearTextAction.setToolTipText(WorkbenchMessages.FilteredTree_ClearToolTip);
- clearTextAction.setImageDescriptor(TasksUiImages.FIND_CLEAR);
- clearTextAction.setDisabledImageDescriptor(TasksUiImages.FIND_CLEAR_DISABLED);
- filterToolBar.add(clearTextAction);
- }
- }
-
- protected abstract Composite createProgressComposite(Composite container);
-
- protected abstract Composite createActiveWorkingSetComposite(Composite container);
-
- protected abstract Composite createActiveTaskComposite(Composite container);
-
- protected Composite createSearchComposite(Composite container) {
- return null;
- }
-
- @Override
- protected void textChanged() {
- if (refreshPolicy != null) {
- refreshPolicy.textChanged(filterText.getText());
- }
-
- if (eclipse_3_3_workbench) {
- // bug 165353 work-around for premature return at
- // FilteredTree.java:374
- updateToolbar(true);
- }
- }
-
- protected Job getRefreshJob() {
- return refreshJob;
- }
-
- public AdaptiveRefreshPolicy getRefreshPolicy() {
- return refreshPolicy;
- }
-
- public boolean isShowProgress() {
- return showProgress;
- }
-
- public void setShowProgress(boolean showProgress) {
- this.showProgress = showProgress;
- progressComposite.setVisible(showProgress);
- ((GridData) progressComposite.getLayoutData()).exclude = !showProgress;
- getParent().getParent().layout(true, true);
- }
-
- public void setShowSearch(boolean showSearch) {
- if (searchComposite != null) {
- searchComposite.setVisible(showSearch);
- ((GridData) searchComposite.getLayoutData()).exclude = !showSearch;
- getParent().getParent().layout(true, true);
- }
- }
-}
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 ad8d0d900..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 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/AdaptiveRefreshPolicy.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/AdaptiveRefreshPolicy.java
deleted file mode 100644
index 5e617e47e..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/AdaptiveRefreshPolicy.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.views;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.runtime.jobs.IJobChangeEvent;
-import org.eclipse.core.runtime.jobs.IJobChangeListener;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Mik Kersten
- */
-public class AdaptiveRefreshPolicy {
-
- private int refreshThreshold = 1500;
-
- private Set<IFilteredTreeListener> listeners = new HashSet<IFilteredTreeListener>();
-
- private Text filterText = null;
-
- protected Job refreshJob;
-
- /**
- * @param refreshJob
- * @param filteredTree
- * can be null
- */
- public AdaptiveRefreshPolicy(Job refreshJob, Text filterText) {
- this.refreshJob = refreshJob;
- this.filterText = filterText;
- refreshJob.addJobChangeListener(REFRESH_JOB_LISTENER);
- }
-
- public void dispose() {
- if (refreshJob != null) {
- refreshJob.removeJobChangeListener(REFRESH_JOB_LISTENER);
- }
- }
-
- protected final IJobChangeListener REFRESH_JOB_LISTENER = new IJobChangeListener() {
-
- public void aboutToRun(IJobChangeEvent event) {
- // ignore
- }
-
- public void awake(IJobChangeEvent event) {
- // ignore
- }
-
- public void done(IJobChangeEvent event) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- for (IFilteredTreeListener listener : listeners) {
- listener.filterTextChanged(filterText.getText());
- }
- }
- });
- }
-
- public void running(IJobChangeEvent event) {
- // ignore
- }
-
- public void scheduled(IJobChangeEvent event) {
- // ignore
- }
-
- public void sleeping(IJobChangeEvent event) {
- // ignore
- }
- };
-
- public void textChanged(String text) {
- if (refreshJob == null)
- return;
- refreshJob.cancel();
- int refreshDelay = 0;
- int textLength = text.length();
- if (textLength > 0) {
- refreshDelay = (int) (refreshThreshold / (textLength * 0.6));
- }
- refreshJob.addJobChangeListener(REFRESH_JOB_LISTENER);
- refreshJob.schedule(refreshDelay);
- }
-
- public void addListener(IFilteredTreeListener listener) {
- listeners.add(listener);
- }
-
- public void removeListener(IFilteredTreeListener listener) {
- listeners.remove(listener);
- }
-
- public void setRefreshDelay(int refreshDelay) {
- this.refreshThreshold = refreshDelay;
- }
-
-}
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 efc4e861e..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/CustomTaskListDecorationDrawer.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.Arrays;
-
-import org.eclipse.mylyn.context.core.ContextCorePlugin;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPreferenceConstants;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.tasks.core.AbstractTask.RepositoryTaskSyncState;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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;
-
-/**
- * @author Mik Kersten
- */
-class CustomTaskListDecorationDrawer implements Listener {
-
- private final TaskListView taskListView;
-
- private int activationImageOffset;
-
- private Image taskActive = TasksUiImages.getImage(TasksUiImages.TASK_ACTIVE);
-
- private Image taskInactive = TasksUiImages.getImage(TasksUiImages.TASK_INACTIVE);
-
- private Image taskInactiveContext = TasksUiImages.getImage(TasksUiImages.TASK_INACTIVE_CONTEXT);
-
- // see bug 185004
- private int platformSpecificSquish = 0;
-
- CustomTaskListDecorationDrawer(TaskListView taskListView, int activationImageOffset) {
- this.taskListView = taskListView;
- this.activationImageOffset = activationImageOffset;
- this.taskListView.synchronizationOverlaid = TasksUiPlugin.getDefault().getPluginPreferences().getBoolean(
- TasksUiPreferenceConstants.OVERLAYS_INCOMING_TIGHT);
-
- if (SWT.getPlatform().equals("gtk")) {
- platformSpecificSquish = 8;
- } else if (SWT.getPlatform().equals("carbon")) {
- platformSpecificSquish = 3;
- }
- }
-
- /*
- * 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();
- AbstractTask task = null;
- Image activationImage = null;
- if (data instanceof AbstractTask) {
- task = (AbstractTask) data;
- }
- if (task != null) {
- if (task.isActive()) {
- activationImage = taskActive;
- } else if (ContextCorePlugin.getContextManager().hasContext(task.getHandleIdentifier())) {
- activationImage = taskInactiveContext;
- } else {
- activationImage = taskInactive;
- }
- }
- if (data instanceof AbstractTaskContainer) {
- switch (event.type) {
- case SWT.EraseItem: {
- if (activationImage != null) {
- drawActivationImage(activationImageOffset, event, activationImage);
- }
- if (!this.taskListView.synchronizationOverlaid) {
- if (data instanceof AbstractTaskContainer) {
- drawSyncronizationImage((AbstractTaskContainer) data, event);
- }
- }
-
- // TODO: would be nice not to do this on each item's painting
-// String text = tree.getFilterControl().getText();
-// System.err.println(">>>>>> " + tree.getViewer().getExpandedElements().length);
-// 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);
-// }
-
- break;
- }
- case SWT.PaintItem: {
- if (activationImage != null) {
- drawActivationImage(activationImageOffset, event, activationImage);
- }
- if (data instanceof AbstractTaskContainer) {
- drawSyncronizationImage((AbstractTaskContainer) data, event);
- }
-
- break;
- }
- }
- }
- }
-
- private void drawSyncronizationImage(AbstractTaskContainer 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 && !(element instanceof AbstractTask)) {
- if (!hideDecorationOnContainer(element) && hasIncoming(element)) {
- int additionalSquish = 0;
- if (platformSpecificSquish > 0 && taskListView.synchronizationOverlaid) {
- additionalSquish = platformSpecificSquish + 3;
- } else if (platformSpecificSquish > 0) {
- additionalSquish = platformSpecificSquish / 2;
- }
- if (taskListView.synchronizationOverlaid) {
- image = TasksUiImages.getImage(TasksUiImages.OVERLAY_SYNCH_INCOMMING);
- offsetX = 42 - additionalSquish;
- } else {
- image = TasksUiImages.getImage(TasksUiImages.OVERLAY_INCOMMING);
- offsetX = 24 - additionalSquish;
- }
- }
- } else {
- image = TasksUiImages.getImage(TaskElementLabelProvider.getSynchronizationImageDescriptor(element,
- taskListView.synchronizationOverlaid));
- }
- if (image != null) {
- event.gc.drawImage(image, offsetX, event.y + offsetY);
- }
- }
-
- private boolean hideDecorationOnContainer(AbstractTaskContainer element) {
- return taskListView.isFocusedMode()
- && Arrays.asList(this.taskListView.getViewer().getExpandedElements()).contains(element);
- }
-
- private boolean hasIncoming(AbstractTaskContainer container) {
- for (AbstractTask task : container.getChildren()) {
- if (task != null) {
- AbstractTask containedRepositoryTask = task;
- if (containedRepositoryTask.getSynchronizationState() == RepositoryTaskSyncState.INCOMING) {
- return true;
- } else if (task.getChildren() != null && task.getChildren().size() > 0
- && hasIncoming(task)) {
- return true;
- }
- }
- }
- 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);
- }
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/DatePickerPanel.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/DatePickerPanel.java
deleted file mode 100644
index fe2998196..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/DatePickerPanel.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.views;
-
-import java.text.DateFormat;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.GregorianCalendar;
-import java.util.List;
-
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.jface.viewers.ArrayContentProvider;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.ListViewer;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPreferenceConstants;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.DateTime;
-
-/**
- * @author Bahadir Yagan
- * @author Mik Kersten
- * @author Rob Elves
- */
-public class DatePickerPanel extends Composite implements KeyListener, ISelectionProvider {
-
- private org.eclipse.swt.widgets.List timeList = null;
-
- private ISelection selection = null;
-
- private Calendar date = null;
-
- private DateTime calendar = null;
-
- private List<ISelectionChangedListener> selectionListeners = new ArrayList<ISelectionChangedListener>();
-
- public DatePickerPanel(Composite parent, int style, Calendar initialDate) {
- super(parent, style);
- this.date = initialDate;
- initialize();
- setDate(date);
- //this.setBackground()
- }
-
- private void initialize() {
- if (date == null) {
- date = GregorianCalendar.getInstance();
- date.set(Calendar.HOUR_OF_DAY, TasksUiPlugin.getDefault().getPreferenceStore().getInt(TasksUiPreferenceConstants.PLANNING_ENDHOUR));
- date.set(Calendar.MINUTE, 0);
- date.set(Calendar.SECOND, 0);
- date.set(Calendar.MILLISECOND, 0);
- }
- GridLayout gridLayout = new GridLayout();
- gridLayout.numColumns = 2;
- this.setLayout(gridLayout);
- calendar = new DateTime(this, SWT.CALENDAR);
- calendar.addSelectionListener(new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- date.set(Calendar.YEAR, calendar.getYear());
- date.set(Calendar.MONTH, calendar.getMonth());
- date.set(Calendar.DAY_OF_MONTH, calendar.getDay());
- setSelection(new DateSelection(date));
- notifyListeners(new SelectionChangedEvent(DatePickerPanel.this, getSelection()));
- }
- });
-
- createTimeList(this);
- }
-
- /**
- * This method initializes the month combo
- *
- */
- private void createTimeList(Composite composite) {
-
- DateFormat dateFormat = DateFormat.getTimeInstance(DateFormat.SHORT);
- Calendar tempCalendar = Calendar.getInstance();
- tempCalendar.set(Calendar.MINUTE, 0);
- tempCalendar.set(Calendar.SECOND, 0);
- String[] times = new String[24];
- for (int x = 0; x < 24; x++) {
- tempCalendar.set(Calendar.HOUR_OF_DAY, x);
- String timeString = dateFormat.format(tempCalendar.getTime());
- times[x] = timeString;
- }
-
- ListViewer listViewer = new ListViewer(composite);
-
- listViewer.setContentProvider(new ArrayContentProvider());
- listViewer.setInput(times);
-
- timeList = listViewer.getList();
-
- listViewer.addSelectionChangedListener(new ISelectionChangedListener() {
-
- public void selectionChanged(SelectionChangedEvent event) {
- date.set(Calendar.HOUR_OF_DAY, timeList.getSelectionIndex());
- date.set(Calendar.MINUTE, 0);
- setSelection(new DateSelection(date));
- notifyListeners(new SelectionChangedEvent(DatePickerPanel.this, getSelection()));
- }
- });
-
- GridDataFactory.fillDefaults().hint(SWT.DEFAULT, 150).grab(false, true).applyTo(timeList);
- if (date != null) {
- listViewer.setSelection(new StructuredSelection(times[date.get(Calendar.HOUR_OF_DAY)]), true);
- } else {
- listViewer.setSelection(new StructuredSelection(times[8]), true);
- }
- timeList.addKeyListener(this);
- }
-
- public void setDate(Calendar date) {
- this.date = date;
- calendar.setYear(date.get(Calendar.YEAR));
- calendar.setMonth(date.get(Calendar.MONTH));
- calendar.setDay(date.get(Calendar.DAY_OF_MONTH));
- }
-
- public void keyPressed(KeyEvent e) {
- if (e.keyCode == SWT.ESC) {
- SelectionChangedEvent changeEvent = new SelectionChangedEvent(this, new ISelection() {
- public boolean isEmpty() {
- return true;
- }
- });
- notifyListeners(changeEvent);
- }
- }
-
- public void keyReleased(KeyEvent e) {
- }
-
- private void notifyListeners(SelectionChangedEvent event) {
- for (ISelectionChangedListener listener : selectionListeners) {
- listener.selectionChanged(event);
- }
- }
-
- public void addSelectionChangedListener(ISelectionChangedListener listener) {
- selectionListeners.add(listener);
- }
-
- public ISelection getSelection() {
- return selection;
- }
-
- public void removeSelectionChangedListener(ISelectionChangedListener listener) {
- selectionListeners.remove(listener);
- }
-
- public void setSelection(ISelection selection) {
- this.selection = selection;
- }
-
- public class DateSelection implements ISelection {
- private Calendar date;
-
- public DateSelection(Calendar calendar) {
- date = calendar;
- }
-
- public boolean isEmpty() {
- return date == null;
- }
-
- public Calendar getDate() {
- return date;
- }
-
- }
-
-}
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 b5cc4d890..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.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @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, Action.AS_CHECK_BOX);
- setId(ID);
- setEnabled(false);
- }
-
- @Override
- public void run() {
- repository.setOffline(isChecked());
- TasksUiPlugin.getRepositoryManager().notifyRepositorySettingsChanged(repository);
- TasksUiPlugin.getRepositoryManager().saveRepositories(TasksUiPlugin.getDefault().getRepositoriesFilePath());
- }
-
- 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 = TasksUiPlugin.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/IFilteredTreeListener.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/IFilteredTreeListener.java
deleted file mode 100644
index 507c16e6c..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/IFilteredTreeListener.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.views;
-
-/**
- * @author Mik Kersten
- */
-public interface IFilteredTreeListener {
-
- public void filterTextChanged(String text);
-
-}
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 4890bde72..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.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPreferenceConstants;
-import org.eclipse.mylyn.tasks.core.AbstractTask.PriorityLevel;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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(TasksUiImages.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(TasksUiPreferenceConstants.FILTER_PRIORITY,
- PriorityLevel.P1.toString());
- PriorityDropDownAction.this.taskListView.displayPrioritiesAbove(TaskListView.PRIORITY_LEVELS[0]);
- }
- };
- priority1.setEnabled(true);
- priority1.setText(PriorityLevel.P1.getDescription());
- priority1.setImageDescriptor(TasksUiImages.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(TasksUiPreferenceConstants.FILTER_PRIORITY,
- PriorityLevel.P2.toString());
- PriorityDropDownAction.this.taskListView.displayPrioritiesAbove(TaskListView.PRIORITY_LEVELS[1]);
- }
- };
- priority2.setEnabled(true);
- priority2.setText(PriorityLevel.P2.getDescription());
- priority2.setImageDescriptor(TasksUiImages.PRIORITY_2);
- item = new ActionContributionItem(priority2);
- item.fill(dropDownMenu, -1);
-
- priority3 = new Action("", AS_CHECK_BOX) {
- @Override
- public void run() {
- TasksUiPlugin.getDefault().getPreferenceStore().setValue(TasksUiPreferenceConstants.FILTER_PRIORITY,
- PriorityLevel.P3.toString());
- PriorityDropDownAction.this.taskListView.displayPrioritiesAbove(TaskListView.PRIORITY_LEVELS[2]);
- }
- };
- priority3.setEnabled(true);
- priority3.setText(PriorityLevel.P3.getDescription());
- priority3.setImageDescriptor(TasksUiImages.PRIORITY_3);
- item = new ActionContributionItem(priority3);
- item.fill(dropDownMenu, -1);
-
- priority4 = new Action("", AS_CHECK_BOX) {
- @Override
- public void run() {
- TasksUiPlugin.getDefault().getPreferenceStore().setValue(TasksUiPreferenceConstants.FILTER_PRIORITY,
- PriorityLevel.P4.toString());
- PriorityDropDownAction.this.taskListView.displayPrioritiesAbove(TaskListView.PRIORITY_LEVELS[3]);
- }
- };
- priority4.setEnabled(true);
- priority4.setText(PriorityLevel.P4.getDescription());
- priority4.setImageDescriptor(TasksUiImages.PRIORITY_4);
- item = new ActionContributionItem(priority4);
- item.fill(dropDownMenu, -1);
-
- priority5 = new Action("", AS_CHECK_BOX) {
- @Override
- public void run() {
- TasksUiPlugin.getDefault().getPreferenceStore().setValue(TasksUiPreferenceConstants.FILTER_PRIORITY,
- PriorityLevel.P5.toString());
- PriorityDropDownAction.this.taskListView.displayPrioritiesAbove(TaskListView.PRIORITY_LEVELS[4]);
- }
- };
- priority5.setEnabled(true);
- priority5.setImageDescriptor(TasksUiImages.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/ResetRepositoryConfigurationAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/ResetRepositoryConfigurationAction.java
deleted file mode 100644
index 95fe1b19a..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/ResetRepositoryConfigurationAction.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.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.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.mylyn.internal.tasks.ui.actions.AbstractTaskRepositoryAction;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @author Mik Kersten
- */
-public class ResetRepositoryConfigurationAction extends AbstractTaskRepositoryAction {
-
- private static final String ID = "org.eclipse.mylyn.tasklist.repositories.reset";
-
- public ResetRepositoryConfigurationAction() {
- super("Update Attributes");
- setId(ID);
- setEnabled(false);
- }
-
- @Override
- public void run() {
- try {
- IStructuredSelection selection = getStructuredSelection();
- for (Iterator<?> iter = selection.iterator(); iter.hasNext();) {
- Object selectedObject = iter.next();
- if (selectedObject instanceof TaskRepository) {
- final TaskRepository repository = (TaskRepository) selectedObject;
- final AbstractRepositoryConnector connector = TasksUiPlugin.getRepositoryManager()
- .getRepositoryConnector(repository.getConnectorKind());
- if (connector != null) {
- final String jobName = "Updating attributes for: " + repository.getUrl();
- Job updateJob = new Job(jobName) {
-
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- monitor.beginTask(jobName, IProgressMonitor.UNKNOWN);
- performUpdate(repository, connector, monitor);
-
- monitor.done();
- return Status.OK_STATUS;
- }
- };
- updateJob.schedule();
- }
- }
- }
- } catch (Exception e) {
- StatusHandler.fail(e, e.getMessage(), true);
- }
- }
-
- public void performUpdate(final TaskRepository repository, final AbstractRepositoryConnector connector,
- IProgressMonitor monitor) {
- try {
- connector.updateAttributes(repository, monitor);
- } catch (CoreException ce) {
- StatusHandler.displayStatus("Error updating attributes", ce.getStatus());
- }
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- }
-}
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 8d06aea38..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.tasks.ui.TasksUiImages;
-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.setSortBy(SortByIndex.PRIORITY);
- byPriority.setChecked(true);
- bySummary.setChecked(false);
- byDateCreated.setChecked(false);
- }
- };
- byPriority.setEnabled(true);
- byPriority.setText("Priority");
- byPriority.setImageDescriptor(TasksUiImages.PRIORITY_1);
- new ActionContributionItem(byPriority).fill(dropDownMenu, -1);
-
- bySummary = new Action("", AS_CHECK_BOX) {
- @Override
- public void run() {
- taskListView.setSortBy(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.setSortBy(SortByIndex.DATE_CREATED);
- byPriority.setChecked(false);
- bySummary.setChecked(false);
- byDateCreated.setChecked(true);
- }
- };
- byDateCreated.setEnabled(true);
- byDateCreated.setText("Date Created");
- byDateCreated.setImageDescriptor(TasksUiImages.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.setSortDirection(taskListView.sortDirection * -1);
- setChecked(taskListView.sortDirection < 0);
- }
- };
- reverse.setEnabled(true);
- reverse.setText("Descending");
- reverse.setChecked(taskListView.sortDirection < 0);
- new ActionContributionItem(reverse).fill(dropDownMenu, -1);
-
- switch (taskListView.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 71c86cdf0..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TableDecoratingLabelProvider.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.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.ContextCorePlugin;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-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 AbstractTaskContainer)) {
- return null;
- }
- if (columnIndex == 0) {
- if (element instanceof AbstractTaskContainer && !(element instanceof AbstractTask)) {
- return super.getImage(element);
- } else {
- AbstractTask task = TaskElementLabelProvider.getCorrespondingTask((AbstractTaskContainer) element);
- if (task != null) {
- if (task.isActive()) {
- return TasksUiImages.getImage(TasksUiImages.TASK_ACTIVE);
- } else {
- if (ContextCorePlugin.getContextManager().hasContext(task.getHandleIdentifier())) {
- return TasksUiImages.getImage(TasksUiImages.TASK_INACTIVE_CONTEXT);
- } else {
- return TasksUiImages.getImage(TasksUiImages.TASK_INACTIVE);
- }
- }
- } else {
- return TasksUiImages.getImage(TasksUiImages.TASK_INACTIVE);
- }
- }
- } else if (columnIndex == 1) {
- if (element instanceof AbstractTaskContainer || element instanceof AbstractRepositoryQuery) {
- 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/TaskActivationHistory.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskActivationHistory.java
deleted file mode 100644
index f909ac67b..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskActivationHistory.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.views;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.mylyn.context.core.ContextCorePlugin;
-import org.eclipse.mylyn.monitor.core.InteractionEvent;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @author Ken Sueda (original prototype)
- * @author Wesley Coelho (Added persistent tasks)
- * @author Mik Kersten (hardening)
- * @author Rob Elves
- */
-public class TaskActivationHistory {
-
- private List<AbstractTask> history = new ArrayList<AbstractTask>();
-
- private int currentIndex = -1;
-
- /**
- * The number of tasks from the previous Eclipse session to load into the history at startup. (This is not the
- * maximum size of the history, which is currently unbounded)
- */
- private static final int NUM_SAVED_HISTORY_ITEMS_TO_LOAD = 12;
-
- private boolean persistentHistoryLoaded = false;
-
- /**
- * Load in a number of saved history tasks from previous session. Should be called from constructor but
- * ContextManager doesn't seem to be able to provide activity history at that point
- *
- * @author Wesley Coelho
- */
- public void loadPersistentHistory() {
- int tasksAdded = 0;
- history.clear();
- for (int i = ContextCorePlugin.getContextManager().getActivityMetaContext().getInteractionHistory().size() - 1; i >= 0; i--) {
- AbstractTask prevTask = getHistoryTaskAt(i);
-
- if (prevTask != null && !history.contains(prevTask)) {
- // !isDuplicate(prevTask, i + 1)) {
- history.add(0, prevTask);
- currentIndex++;
- tasksAdded++;
- if (tasksAdded == NUM_SAVED_HISTORY_ITEMS_TO_LOAD) {
- break;
- }
- }
- }
- persistentHistoryLoaded = true;
- }
-
- /**
- * Returns the task corresponding to the interaction event history item at the specified position
- */
- protected AbstractTask getHistoryTaskAt(int pos) {
- InteractionEvent event = ContextCorePlugin.getContextManager()
- .getActivityMetaContext()
- .getInteractionHistory()
- .get(pos);
- return TasksUiPlugin.getTaskListManager().getTaskList().getTask(event.getStructureHandle());
- }
-
- public void addTask(AbstractTask task) {
- try {
- if (!persistentHistoryLoaded) {
- loadPersistentHistory();
- persistentHistoryLoaded = true;
- }
-
- history.remove(task);
- history.add(task);
- currentIndex = history.size() - 1;
- } catch (RuntimeException e) {
- StatusHandler.fail(e, "could not add task to history", false);
- }
- }
-
- public AbstractTask getPreviousTask() {
- try {
- boolean active = false;
- for (AbstractTask task : history) {
- if (task.isActive()) {
- active = true;
- break;
- }
- }
-
- if (hasPrevious()) {
- if ((currentIndex == 0 && !history.get(currentIndex).isActive()) || !active) {
- return history.get(currentIndex);
- } else {
- return history.get(--currentIndex);
- }
- } else {
- return null;
- }
- } catch (RuntimeException e) {
- StatusHandler.fail(e, "could not get previous task from history", false);
- return null;
- }
- }
-
- public List<AbstractTask> getPreviousTasks() {
- return history;
- }
-
- public boolean hasPrevious() {
- try {
- if (!persistentHistoryLoaded) {
- loadPersistentHistory();
- persistentHistoryLoaded = true;
- }
-
- return (currentIndex == 0 && !history.get(currentIndex).isActive()) || currentIndex > 0;
- } catch (RuntimeException e) {
- StatusHandler.fail(e, "could determine previous task", false);
- return false;
- }
- }
-
- public void clear() {
- try {
- history.clear();
- currentIndex = -1;
- } catch (RuntimeException e) {
- StatusHandler.fail(e, "could not clear history", false);
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskActivityLabelProvider.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskActivityLabelProvider.java
deleted file mode 100644
index 53001266e..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskActivityLabelProvider.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.tasks.ui.views;
-
-import java.text.DateFormat;
-
-import org.eclipse.jface.viewers.IColorProvider;
-import org.eclipse.jface.viewers.IFontProvider;
-import org.eclipse.jface.viewers.ILabelDecorator;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.mylyn.internal.tasks.core.ScheduledTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.ScheduledTaskDelegate;
-import org.eclipse.mylyn.internal.tasks.core.TaskActivityManager;
-import org.eclipse.mylyn.internal.tasks.ui.TaskListColorsAndFonts;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.monitor.core.DateUtil;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.tasks.core.AbstractTask.PriorityLevel;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * @author Rob Elves
- */
-public class TaskActivityLabelProvider extends TaskElementLabelProvider implements ITableLabelProvider, IColorProvider,
- IFontProvider {
-
- private static final String UNITS_HOURS = " hours";
-
- private static final String NO_MINUTES = "0 minutes";
-
- private TaskActivityManager activityManager;
-
- private Color categoryBackgroundColor;
-
- private ITreeContentProvider contentProvider;
-
- public TaskActivityLabelProvider(ILabelProvider provider, ILabelDecorator decorator, Color parentBacground,
- ITreeContentProvider contentProvider) {
- super(true);
- this.categoryBackgroundColor = parentBacground;
- this.activityManager = TasksUiPlugin.getTaskActivityManager();
- this.contentProvider = contentProvider;
- }
-
- public Image getColumnImage(Object element, int columnIndex) {
- if (columnIndex == 0) {
- if (element instanceof ScheduledTaskContainer) {
- super.getImage(element);
- } else if (element instanceof ScheduledTaskDelegate) {
- return super.getImage(((ScheduledTaskDelegate) element).getCorrespondingTask());
- } else {
- return super.getImage(element);
- }
- } else if (columnIndex == 1) {
- if (element instanceof ScheduledTaskDelegate) {
- ScheduledTaskDelegate taskElement = (ScheduledTaskDelegate) element;
- return TasksUiImages.getImageForPriority(PriorityLevel.fromString(taskElement.getPriority()));
- }
- }
- return null;
- }
-
- public String getColumnText(Object element, int columnIndex) {
- if (element instanceof ScheduledTaskDelegate) {
- ScheduledTaskDelegate activityDelegate = (ScheduledTaskDelegate) element;
- AbstractTask task = activityDelegate.getCorrespondingTask();
- switch (columnIndex) {
- case 2:
- if (task != null) {
- return task.getSummary();
- }
- case 3:
- return DateUtil.getFormattedDurationShort(activityManager.getElapsedTime(task,
- activityDelegate.getDateRangeContainer().getStart(), activityDelegate.getDateRangeContainer()
- .getEnd()));
- case 4:
- return task.getEstimateTimeHours() + UNITS_HOURS;
- case 5:
- if (task.getScheduledForDate() != null) {
- return DateFormat.getDateInstance(DateFormat.MEDIUM).format(task.getScheduledForDate());
- } else {
- return "";
- }
-// case 6:
-// if (activityDelegate.getStart() > 0
-// && activityDelegate.getDateRangeContainer().getElapsed(activityDelegate) > 0) {
-// return DateFormat.getDateInstance(DateFormat.MEDIUM).format(activityDelegate.getStart());
-// } else {
-// return "";
-// }
- }
- } else if (element instanceof ScheduledTaskContainer) {
- ScheduledTaskContainer taskCategory = (ScheduledTaskContainer) element;
- switch (columnIndex) {
- case 2:
- if (taskCategory.isPresent()) {
- return taskCategory.getSummary() + " - Today";
- }
-
- return taskCategory.getSummary();
- case 3:
- String elapsedTimeString = NO_MINUTES;
- try {
-
- long elapsed = 0;
- for (Object o : contentProvider.getChildren(taskCategory)) {
- if (o instanceof ScheduledTaskDelegate) {
- elapsed += activityManager.getElapsedTime(
- ((ScheduledTaskDelegate) o).getCorrespondingTask(), taskCategory.getStart(),
- taskCategory.getEnd());
- }
- }
-
- elapsedTimeString = DateUtil.getFormattedDurationShort(elapsed);
- if (elapsedTimeString.equals(""))
- elapsedTimeString = NO_MINUTES;
- } catch (RuntimeException e) {
- StatusHandler.fail(e, "Could not format elapsed time", true);
- }
- return elapsedTimeString;
- case 4:
- long estimated = 0;
- for (Object o : contentProvider.getChildren(taskCategory)) {
- if (o instanceof AbstractTask) {
- estimated += ((AbstractTask) o).getEstimateTimeHours();
- }
- }
- return estimated + UNITS_HOURS;
- }
- }
- return null;
- }
-
- @Override
- public Color getBackground(Object element) {
- if (element instanceof AbstractTaskContainer && !(element instanceof AbstractTask)) {
- return categoryBackgroundColor;
- } else {
- return super.getBackground(element);
- }
- }
-
- @Override
- public Font getFont(Object element) {
- if (element instanceof ScheduledTaskContainer) {
- ScheduledTaskContainer container = (ScheduledTaskContainer) element;
- if (container.isPresent()) {
- return TaskListColorsAndFonts.BOLD;
- }
- } else if (element instanceof ScheduledTaskDelegate) {
- ScheduledTaskDelegate durationDelegate = (ScheduledTaskDelegate) element;
- return super.getFont(durationDelegate.getCorrespondingTask());
- }
- return super.getFont(element);
- }
-
- public void setCategoryBackgroundColor(Color categoryBackgroundColor) {
- this.categoryBackgroundColor = categoryBackgroundColor;
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskElementLabelProvider.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskElementLabelProvider.java
deleted file mode 100644
index 415ce55fd..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskElementLabelProvider.java
+++ /dev/null
@@ -1,379 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.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.tasks.core.Person;
-import org.eclipse.mylyn.internal.tasks.core.ScheduledTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.TaskActivityManager;
-import org.eclipse.mylyn.internal.tasks.core.TaskArchive;
-import org.eclipse.mylyn.internal.tasks.core.TaskCategory;
-import org.eclipse.mylyn.internal.tasks.core.TaskGroup;
-import org.eclipse.mylyn.internal.tasks.core.UnfiledCategory;
-import org.eclipse.mylyn.internal.tasks.ui.ITaskHighlighter;
-import org.eclipse.mylyn.internal.tasks.ui.TaskListColorsAndFonts;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.AbstractTask.PriorityLevel;
-import org.eclipse.mylyn.tasks.core.AbstractTask.RepositoryTaskSyncState;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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
- */
-public class TaskElementLabelProvider extends LabelProvider implements IColorProvider, IFontProvider {
-
- private static final String NO_SUMMARY_AVAILABLE = ": <no summary available>";
-
- private 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() {
-// super();
-// }
-
- public TaskElementLabelProvider(boolean wideImages) {
- super();
- this.wideImages = wideImages;
- }
-
- @Override
- public Image getImage(Object element) {
- CompositeImageDescriptor compositeDescriptor = getImageDescriptor(element);
- if (element instanceof AbstractTask) {
- if (compositeDescriptor.overlayKind == null) {
- compositeDescriptor.overlayKind = TasksUiImages.OVERLAY_BLANK;
- }
- return TasksUiImages.getCompositeTaskImage(compositeDescriptor.icon, compositeDescriptor.overlayKind,
- wideImages);
- } else if (element instanceof AbstractTaskContainer) {
- return TasksUiImages.getCompositeTaskImage(compositeDescriptor.icon, TasksUiImages.OVERLAY_BLANK,
- wideImages);
- } else {
- return TasksUiImages.getCompositeTaskImage(compositeDescriptor.icon, null, wideImages);
- }
- }
-
- private CompositeImageDescriptor getImageDescriptor(Object object) {
- CompositeImageDescriptor compositeDescriptor = new CompositeImageDescriptor();
- if (object instanceof TaskArchive || object instanceof UnfiledCategory) {
- compositeDescriptor.icon = TasksUiImages.CATEGORY_ARCHIVE;
- return compositeDescriptor;
- } else if (object instanceof TaskCategory || object instanceof UnfiledCategory) {
- compositeDescriptor.icon = TasksUiImages.CATEGORY;
- } else if (object instanceof TaskGroup) {
- compositeDescriptor.icon = TasksUiImages.TASKLIST_MODE;
- }
-
- if (object instanceof AbstractTaskContainer) {
- AbstractTaskContainer element = (AbstractTaskContainer) object;
-
- AbstractRepositoryConnectorUi connectorUi = null;
- if (element instanceof AbstractTask) {
- AbstractTask repositoryTask = (AbstractTask) element;
- connectorUi = TasksUiPlugin.getConnectorUi(((AbstractTask) element).getConnectorKind());
- if (connectorUi != null) {
- compositeDescriptor.overlayKind = connectorUi.getTaskKindOverlay(repositoryTask);
- }
- } else if (element instanceof AbstractRepositoryQuery) {
- connectorUi = TasksUiPlugin.getConnectorUi(((AbstractRepositoryQuery) element).getRepositoryKind());
- }
-
- if (connectorUi != null) {
- compositeDescriptor.icon = connectorUi.getTaskListElementIcon(element);
- return compositeDescriptor;
- } else {
- if (element instanceof AbstractRepositoryQuery) {
- compositeDescriptor.icon = TasksUiImages.QUERY;
- } else if (element instanceof AbstractTask) {
- compositeDescriptor.icon = TasksUiImages.TASK;
- } else if (element instanceof ScheduledTaskContainer) {
- compositeDescriptor.icon = TasksUiImages.CALENDAR;
- } else if (element instanceof Person) {
- compositeDescriptor.icon = TasksUiImages.PERSON;
- TaskRepository repository = TasksUiPlugin.getRepositoryManager().getRepository(
- ((Person) element).getRepositoryUrl());
-
-// for (TaskRepository repository : TasksUiPlugin.getRepositoryManager().getAllRepositories()) {
- if (repository != null
- && !repository.isAnonymous()
- && (repository.getUserName() != null && repository.getUserName().equalsIgnoreCase(
- element.getHandleIdentifier()))) {
- compositeDescriptor.icon = TasksUiImages.PERSON_ME;
-// break;
- }
-// }
- }
- return compositeDescriptor;
- }
- }
- return compositeDescriptor;
- }
-
- public static ImageDescriptor getSynchronizationImageDescriptor(Object element, boolean synchViewStyle) {
- AbstractTask repositoryTask = null;
- ImageDescriptor imageDescriptor = null;
- if (element instanceof AbstractTask) {
- repositoryTask = (AbstractTask) element;
- }
- if (repositoryTask != null) {
- if (repositoryTask.getSynchronizationState() == RepositoryTaskSyncState.INCOMING
- && repositoryTask.getLastReadTimeStamp() == null) {
- if (synchViewStyle) {
- return TasksUiImages.OVERLAY_SYNCH_INCOMMING_NEW;
- } else {
- return TasksUiImages.OVERLAY_INCOMMING_NEW;
- }
- }
- if (repositoryTask.getSynchronizationState() == RepositoryTaskSyncState.OUTGOING) {
- if (synchViewStyle) {
- imageDescriptor = TasksUiImages.OVERLAY_SYNCH_OUTGOING;
- } else {
- imageDescriptor = TasksUiImages.OVERLAY_OUTGOING;
- }
- } else if (repositoryTask.getSynchronizationState() == RepositoryTaskSyncState.INCOMING) {
- if (synchViewStyle) {
- imageDescriptor = TasksUiImages.OVERLAY_SYNCH_INCOMMING;
- } else {
- imageDescriptor = TasksUiImages.OVERLAY_INCOMMING;
- }
- } else if (repositoryTask.getSynchronizationState() == RepositoryTaskSyncState.CONFLICT) {
- imageDescriptor = TasksUiImages.OVERLAY_CONFLICT;
- }
- if (imageDescriptor == null && repositoryTask.getSynchronizationStatus() != null) {
- return TasksUiImages.OVERLAY_WARNING;
- } else if (imageDescriptor != null) {
- return imageDescriptor;
- }
- } else if (element instanceof AbstractTaskContainer) {
- AbstractTaskContainer container = (AbstractTaskContainer) element;
- if (container instanceof AbstractRepositoryQuery) {
- AbstractRepositoryQuery query = (AbstractRepositoryQuery) container;
- if (query.getSynchronizationStatus() != null) {
- return TasksUiImages.OVERLAY_WARNING;
- }
- }
- }
- // HACK: need a proper blank image
- return TasksUiImages.OVERLAY_BLANK;
- }
-
- public static ImageDescriptor getPriorityImageDescriptor(Object element) {
- AbstractRepositoryConnectorUi connectorUi;
- if (element instanceof AbstractTask) {
- AbstractTask repositoryTask = (AbstractTask) element;
- connectorUi = TasksUiPlugin.getConnectorUi(((AbstractTask) element).getConnectorKind());
- if (connectorUi != null) {
- return connectorUi.getTaskPriorityOverlay(repositoryTask);
- }
- }
- if (element instanceof AbstractTask) {
- AbstractTask task = TaskElementLabelProvider.getCorrespondingTask((AbstractTaskContainer) element);
- if (task != null) {
- return TasksUiImages.getImageDescriptorForPriority(PriorityLevel.fromString(task.getPriority()));
- }
- }
- return null;
- }
-
- @Override
- public String getText(Object object) {
- if (object instanceof AbstractTask) {
- AbstractTask task = (AbstractTask) 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 AbstractTaskContainer) {
- AbstractTaskContainer element = (AbstractTaskContainer) object;
- return element.getSummary();
- } else {
- return super.getText(object);
- }
- }
-
- public Color getForeground(Object object) {
- if (object instanceof AbstractTaskContainer && object instanceof AbstractTask) {
- AbstractTask task = getCorrespondingTask((AbstractTaskContainer) object);
- if (task != null) {
- if (TaskActivityManager.getInstance().isCompletedToday(task)) {
- return themeManager.getCurrentTheme().getColorRegistry().get(
- TaskListColorsAndFonts.THEME_COLOR_TASK_TODAY_COMPLETED);
- } else if (task.isCompleted()) {
- return themeManager.getCurrentTheme().getColorRegistry().get(
- TaskListColorsAndFonts.THEME_COLOR_COMPLETED);
- } else if (task.isActive()) {
- return TaskListColorsAndFonts.COLOR_TASK_ACTIVE;
- } else if (task.isPastReminder()) {
- return themeManager.getCurrentTheme().getColorRegistry().get(
- TaskListColorsAndFonts.THEME_COLOR_TASK_OVERDUE);
- } else if (TaskActivityManager.getInstance().isScheduledForToday(task)) {
- return themeManager.getCurrentTheme().getColorRegistry().get(
- TaskListColorsAndFonts.THEME_COLOR_TASK_TODAY_SCHEDULED);
- } else if (TaskActivityManager.getInstance().isScheduledForThisWeek(task)) {
- return themeManager.getCurrentTheme().getColorRegistry().get(
- TaskListColorsAndFonts.THEME_COLOR_TASK_THISWEEK_SCHEDULED);
- }
- }
- } else if (object instanceof AbstractTaskContainer) {
- for (AbstractTask child : ((AbstractTaskContainer) object).getChildren()) {
- if (child.isActive() || showHasActiveChild(child)) {
- return TaskListColorsAndFonts.COLOR_TASK_ACTIVE;
- } else if ((child.isPastReminder() && !child.isCompleted()) || showHasChildrenPastDue(child)) {
- return themeManager.getCurrentTheme().getColorRegistry().get(
- TaskListColorsAndFonts.THEME_COLOR_TASK_OVERDUE);
- }
- }
- }
- return null;
- }
-
- /**
- * TODO: move
- */
- public static AbstractTask getCorrespondingTask(AbstractTaskContainer element) {
- if (element instanceof AbstractTask) {
- return (AbstractTask) element;
- } else {
- return null;
- }
- }
-
- public Color getBackground(Object element) {
- if (element instanceof AbstractTask) {
- AbstractTask task = (AbstractTask) element;
- ITaskHighlighter highlighter = TasksUiPlugin.getDefault().getHighlighter();
- if (highlighter != null) {
- return highlighter.getHighlightColor(task);
- }
- }
- return null;
- }
-
- public Font getFont(Object element) {
- if (!(element instanceof AbstractTaskContainer)) {
- return null;
- }
- AbstractTask task = getCorrespondingTask((AbstractTaskContainer) element);
- if (task != null) {
- AbstractTask repositoryTask = task;
- if (repositoryTask.isSynchronizing()) {
- return TaskListColorsAndFonts.ITALIC;
- }
- }
- if (element instanceof AbstractTaskContainer) {
- if (element instanceof AbstractRepositoryQuery) {
- if (((AbstractRepositoryQuery) element).isSynchronizing()) {
- return TaskListColorsAndFonts.ITALIC;
- }
- }
-
- for (AbstractTask child : ((AbstractTaskContainer) element).getChildren()) {
- if (child.isActive() || showHasActiveChild(child)) {
- return TaskListColorsAndFonts.BOLD;
- }
- }
- }
- if (task != null) {
- if (task.isActive()) {
- return TaskListColorsAndFonts.BOLD;
- } else if (task.isCompleted()) {
- return TaskListColorsAndFonts.STRIKETHROUGH;
- }
- for (AbstractTask child : ((AbstractTaskContainer) element).getChildren()) {
- if (child.isActive() || showHasActiveChild(child)) {
- return TaskListColorsAndFonts.BOLD;
- }
- }
- }
- return null;
- }
-
- private boolean showHasActiveChild(AbstractTaskContainer container) {
- if (!TasksUiPlugin.getDefault().groupSubtasks(container)) {
- return false;
- }
-
- return showHasActiveChildHelper(container);
- }
-
- private boolean showHasActiveChildHelper(AbstractTaskContainer container) {
- for (AbstractTaskContainer child : container.getChildren()) {
- if (child instanceof AbstractTask && ((AbstractTask) child).isActive()) {
- return true;
- } else {
- if (showHasActiveChildHelper(child)) {
- return true;
- }
- }
- }
- return false;
- }
-
- private boolean showHasChildrenPastDue(AbstractTaskContainer container) {
- if (!TasksUiPlugin.getDefault().groupSubtasks(container)) {
- return false;
- }
-
- return showHasChildrenPastDueHelper(container);
- }
-
- private boolean showHasChildrenPastDueHelper(AbstractTaskContainer container) {
- for (AbstractTaskContainer child : container.getChildren()) {
- if (child instanceof AbstractTask && ((AbstractTask) child).isPastReminder()
- && !((AbstractTask) child).isCompleted()) {
- return true;
- } else {
- if (showHasChildrenPastDueHelper(child)) {
- return true;
- }
- }
- }
- return false;
- }
-}
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 fe90267d1..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskInputDialog.java
+++ /dev/null
@@ -1,288 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.mylyn.internal.tasks.ui.RetrieveTitleFromUrlJob;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.ui.DatePicker;
-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);
- 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 = ContextCorePlugin.getDefault().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 = ContextCorePlugin.getDefault().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 {
- RetrieveTitleFromUrlJob job = new RetrieveTitleFromUrlJob(issueURLTextWidget.getText()) {
-
- @Override
- protected void setTitle(final String pageTitle) {
- taskNameTextWidget.setText(pageTitle);
- }
-
- };
- job.schedule();
-
- } catch (RuntimeException e) {
- StatusHandler.fail(e, "could not open task web page", false);
- }
- }
-
- /**
- * 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 2bbeb7aef..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskKeyComparator.java
+++ /dev/null
@@ -1,65 +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> {
-
- public static final Pattern PATTERN = Pattern.compile("(?:([A-Za-z]*[:_\\-]?)(\\d+))?(.*)");
-
- public int compare(String o1, String o2) {
- String[] a1 = split(o1);
- String[] a2 = split(o2);
-
- String s1 = a1[0];
- String s2 = a2[0];
- if (s1 == null && s2 != null)
- return -1;
- if (s1 != null && s2 == null)
- return 1;
-
- if (s1 != null && s2 != null) {
- int n = s1.compareToIgnoreCase(s2);
- if (n != 0)
- return n;
-
- s1 = a1[1];
- s2 = a2[1];
- if (s1.length() == s2.length() || s1.length() == 0 || s2.length() == 0) {
- n = s1.compareTo(s2);
- } else {
- n = Integer.valueOf(s1).compareTo(Integer.valueOf(s2));
- }
- if (n != 0)
- return n;
- }
-
- return a1[2].compareToIgnoreCase(a2[2]);
- }
-
- 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;
- }
-} \ 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 8574453e1..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListCellModifier.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.views;
-
-import java.util.Arrays;
-
-import org.eclipse.jface.viewers.ICellModifier;
-import org.eclipse.mylyn.internal.tasks.ui.actions.TaskActivateAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.TaskDeactivateAction;
-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.ui.TasksUiPlugin;
-import org.eclipse.swt.widgets.TreeItem;
-
-/**
- * @author Mik Kersten
- */
-class TaskListCellModifier implements ICellModifier {
-
- private final TaskListView taskListView;
-
- TaskListCellModifier(TaskListView taskListView) {
- this.taskListView = taskListView;
- }
-
- 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 AbstractTaskContainer) {
- final AbstractTaskContainer taskListElement = (AbstractTaskContainer) element;
- switch (columnIndex) {
- case 0:
- return taskListElement.getSummary();
- case 1:
- return "";
- case 2:
- return "";
- }
- }
- } catch (Exception e) {
- StatusHandler.log(e, e.getMessage());
- }
- return "";
- }
-
- public void modify(Object element, String property, Object value) {
- int columnIndex = -1;
- try {
- columnIndex = Arrays.asList(this.taskListView.columnNames).indexOf(property);
- if (((TreeItem) element).getData() instanceof AbstractTask) {
- final AbstractTaskContainer taskListElement = (AbstractTaskContainer) ((TreeItem) element).getData();
- AbstractTask task = (AbstractTask) taskListElement;
- switch (columnIndex) {
- case 0:
- if (task != null) {
- TasksUiPlugin.getTaskListManager().getTaskList().renameTask(task, ((String) value).trim());
- }
- break;
- case 1:
- break;
- case 2:
- toggleTaskActivation(taskListElement);
- break;
- }
- } else if (((TreeItem) element).getData() instanceof AbstractTaskCategory
- || ((TreeItem) element).getData() instanceof AbstractRepositoryQuery) {
- AbstractTaskContainer container = (AbstractTaskContainer) ((TreeItem) element).getData();
- switch (columnIndex) {
- case 0:
- TasksUiPlugin.getTaskListManager()
- .getTaskList()
- .renameContainer(container, ((String) value).trim());
- case 1:
- break;
- case 2:
- break;
- }
- }
- } catch (Exception e) {
- StatusHandler.fail(e, e.getMessage(), true);
- }
- this.taskListView.getViewer().refresh();
- }
-
- public void toggleTaskActivation(AbstractTaskContainer taskListElement) {
- AbstractTask task = null;
- if (taskListElement instanceof AbstractTask) {
- task = (AbstractTask) taskListElement;
- }
-
- if (task != null) {
- if (task.isActive()) {
- new TaskDeactivateAction().run(task);
-// this.taskListView.previousTaskAction.setButtonStatus();
- } else {
- new TaskActivateAction().run(task);
-// this.taskListView.addTaskToHistory(task);
-// this.taskListView.previousTaskAction.setButtonStatus();
- }
- }
- }
-} \ 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 52484a595..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListContentProvider.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.views;
-
-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.viewers.Viewer;
-import org.eclipse.mylyn.internal.tasks.core.ScheduledTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.TaskArchive;
-import org.eclipse.mylyn.internal.tasks.ui.AbstractTaskListFilter;
-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.ui.TasksUiPlugin;
-import org.eclipse.ui.IWorkingSet;
-
-/**
- * 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
- */
-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.getTaskListManager().getTaskList().getRootElements()).toArray();
- }
- return getChildren(parent);
- }
-
- /**
- * @return first parent found
- */
- public Object getParent(Object child) {
- // Return first parent found, first search within queries then categories.
- if (child instanceof AbstractTask) {
- Set<AbstractRepositoryQuery> queries = TasksUiPlugin.getTaskListManager()
- .getTaskList()
- .getQueriesForHandle(((AbstractTask) child).getHandleIdentifier());
- if (queries.size() > 0) {
- return queries.toArray()[0];
- }
-
- AbstractTaskContainer container = TasksUiPlugin.getTaskListManager().getTaskList().getContainerForHandle(
- ((AbstractTask) child).getHandleIdentifier());
-
- if (container != null) {
- return container;
- }
-
- }
- // 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) {
- if (parent instanceof AbstractRepositoryQuery) {
- AbstractRepositoryQuery query = (AbstractRepositoryQuery) parent;
- return !query.isEmpty();
- } else if (parent instanceof AbstractTask) {
- return taskHasUnfilteredChildren((AbstractTask) parent);
- } else if (parent instanceof AbstractTaskContainer) {
- AbstractTaskContainer container = (AbstractTaskContainer) parent;
- return !container.getChildren().isEmpty();
- }
- return false;
- }
-
- private boolean taskHasUnfilteredChildren(AbstractTask parent) {
- boolean groupSubtasks = !TasksUiPlugin.getDefault().groupSubtasks(parent);
- if (groupSubtasks)
- return false;
- Set<AbstractTask> children = parent.getChildren();
- if (children != null) {
- for (AbstractTask task : children) {
- if (!filter(parent, task)) {
- return true;
- }
- }
- }
- return false;
- }
-
- protected List<AbstractTaskContainer> applyFilter(Set<AbstractTaskContainer> roots) {
- String filterText = (taskListView.getFilteredTree().getFilterControl()).getText();
- if (containsNoFilterText(filterText)) {
- List<AbstractTaskContainer> filteredRoots = new ArrayList<AbstractTaskContainer>();
- for (AbstractTaskContainer element : roots) {
- // NOTE: tasks can no longer appear as root elements
- if (element instanceof AbstractRepositoryQuery) {
- if (selectQuery((AbstractRepositoryQuery) element)) {
- filteredRoots.add(element);
- }
- } else if (element instanceof AbstractTaskCategory) {
- if (selectContainer(element)) {
- filteredRoots.add(element);
- }
- }
- }
- return filteredRoots;
- } else {
- // only match working sets when filter is on
- Set<IWorkingSet> workingSets = TaskListView.getActiveWorkingSets();
- Set<AbstractTaskContainer> workingSetContainers = new HashSet<AbstractTaskContainer>();
- if (workingSets.isEmpty()) {
- return new ArrayList<AbstractTaskContainer>(roots);
- } else {
- for (IWorkingSet workingSet : workingSets) {
- IAdaptable[] elements = workingSet.getElements();
- for (IAdaptable adaptable : elements) {
- if (adaptable instanceof AbstractTaskContainer && roots.contains(adaptable)) {
- workingSetContainers.add((AbstractTaskContainer) adaptable);
- }
- }
- }
- return new ArrayList<AbstractTaskContainer>(workingSetContainers);
- }
- }
- }
-
- /**
- * See bug 109693
- */
- private boolean containsNoFilterText(String filterText) {
- return filterText == null || filterText.length() == 0;
- }
-
- // TODO: should only know about containers, not queries
- private boolean selectQuery(AbstractRepositoryQuery query) {
- Set<AbstractTask> hits = query.getChildren();
- if (hits.size() == 0) {
- return true;
- }
- for (AbstractTask element : hits) {
- if (!filter(query, element)) {
- return true;
- }
- }
- return false;
- }
-
- private boolean selectContainer(AbstractTaskContainer container) {
- // TODO: move to interest filter
- if (/*taskListView.isFocusedMode() && */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) && !shouldAlwaysShow(container)) {
- return false;
- }
-
- Set<AbstractTask> children = container.getChildren();
- if (children.size() == 0) {
- return true;
- }
- for (AbstractTaskContainer child : children) {
- if (!filter(container, child)) {
- return true;
- }
- }
- return false;
- }
-
- private boolean shouldAlwaysShow(AbstractTaskContainer container) {
- for (AbstractTask task : container.getChildren()) {
- if (shouldAlwaysShow(container, task)) {
- if (container instanceof TaskArchive) {
- if (TasksUiPlugin.getTaskListManager().getTaskList().getContainerForHandle(
- task.getHandleIdentifier()) == null
- && TasksUiPlugin.getTaskListManager().getTaskList().getQueriesForHandle(
- task.getHandleIdentifier()).isEmpty()) {
- return true;
- }
- } else {
- return true;
- }
- }
- }
- return false;
- }
-
- private boolean shouldAlwaysShow(Object parent, AbstractTask task) {
- for (AbstractTaskListFilter filter : this.taskListView.getFilters()) {
- if (filter.shouldAlwaysShow(parent, task, TasksUiPlugin.getDefault().groupSubtasks(task))) {
- return true;
- }
- }
- return false;
- }
-
- // TODO: This can be simplified post bug#124321
- private List<AbstractTaskContainer> getFilteredChildrenFor(Object parent) {
- if (containsNoFilterText((this.taskListView.getFilteredTree().getFilterControl()).getText())) {
- List<AbstractTaskContainer> children = new ArrayList<AbstractTaskContainer>();
- if (parent instanceof AbstractTaskCategory) {
- if (filter(null, parent)) {
- if (((AbstractTaskContainer) parent) instanceof TaskArchive) {
- for (AbstractTask task : ((AbstractTaskContainer) parent).getChildren()) {
- if (shouldAlwaysShow(parent, task)) {
- // TODO: archive logic?
- if (TasksUiPlugin.getTaskListManager().getTaskList().getQueriesForHandle(
- task.getHandleIdentifier()).size() == 0) {
- children.add(task);
- }
- }
- }
- return children;
- }
- }
- children = getFilteredRootChildren((AbstractTaskContainer) parent);
-// Set<AbstractTask> parentsTasks = ((AbstractTaskContainer) parent).getChildren();
-// for (AbstractTaskContainer element : parentsTasks) {
-// if (!filter(parent, element)) {
-// children.add(element);
-// }
-// }
- return children;
- } else if (parent instanceof AbstractRepositoryQuery) {
- return getFilteredRootChildren((AbstractTaskContainer) parent);
-// for (AbstractTaskContainer element : ((AbstractRepositoryQuery) parent).getChildren()) {
-// if (!filter(parent, element)) {
-// children.add(element);
-// }
-// }
-// return children;
- } else if (parent instanceof AbstractTask) {
- Set<AbstractTask> subTasks = ((AbstractTask) parent).getChildren();
- for (AbstractTask t : subTasks) {
- if (!filter(parent, t)) {
- children.add(t);
- }
- }
- return children;
- }
- } else {
- List<AbstractTaskContainer> children = new ArrayList<AbstractTaskContainer>();
- if (parent instanceof AbstractTaskContainer) {
- children.addAll(((AbstractTaskContainer) parent).getChildren());
- return children;
- }
- }
- return Collections.emptyList();
- }
-
- /**
- * @return all children who aren't already revealed as a sub task
- */
- private List<AbstractTaskContainer> getFilteredRootChildren(AbstractTaskContainer parent) {
- List<AbstractTaskContainer> result = new ArrayList<AbstractTaskContainer>();
- if (TasksUiPlugin.getDefault().groupSubtasks(parent)) {
- Set<AbstractTask> parentTasks = parent.getChildren();
- Set<AbstractTaskContainer> parents = new HashSet<AbstractTaskContainer>();
- Set<AbstractTask> children = new HashSet<AbstractTask>();
- // get all children
- for (AbstractTask element : parentTasks) {
- for (AbstractTask abstractTask : element.getChildren()) {
- if (!filter(element, abstractTask)) {
- children.add(abstractTask);
- }
- }
- }
- for (AbstractTask task : parentTasks) {
- if (!filter(parent, task) && !children.contains(task)) {
- parents.add(task);
- }
- }
- result.addAll(parents);
- } else {
- for (AbstractTaskContainer 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/TaskListDragSourceListener.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListDragSourceListener.java
deleted file mode 100644
index b7c402c0f..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListDragSourceListener.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.io.UnsupportedEncodingException;
-import java.net.URLEncoder;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.mylyn.internal.tasks.ui.ITasksUiConstants;
-import org.eclipse.mylyn.internal.tasks.ui.TaskTransfer;
-import org.eclipse.mylyn.internal.tasks.ui.actions.CopyTaskDetailsAction;
-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.AbstractTaskContainer;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.swt.dnd.DragSourceEvent;
-import org.eclipse.swt.dnd.DragSourceListener;
-import org.eclipse.swt.dnd.FileTransfer;
-import org.eclipse.swt.dnd.TextTransfer;
-
-/**
- * @author Mik Kersten
- * @author Jevgeni Holodkov
- */
-class TaskListDragSourceListener implements DragSourceListener {
-
- static final String DELIM = ", ";
-
- private final TaskListView view;
-
- private File[] queryTempFiles;
- private File[] taskTempFiles;
-
-// static final String ID_DATA_TASK_DRAG = "task-drag";
-
- /**
- * @param view
- */
- public TaskListDragSourceListener(TaskListView view) {
- this.view = view;
- }
-
- public void dragStart(DragSourceEvent event) {
- StructuredSelection selection = (StructuredSelection) this.view.getViewer().getSelection();
- if (selection.isEmpty()) {
- event.doit = false;
- } else {
- // prepare temporary directory
- File tempDir = new File(TasksUiPlugin.getDefault().getDataDirectory() + File.separator + "temp");
- if (!tempDir.exists()) {
- tempDir.mkdir();
- }
-
- // prepare query files
- List<AbstractRepositoryQuery> queries = new ArrayList<AbstractRepositoryQuery>();
- List<AbstractTask> tasks = new ArrayList<AbstractTask>();
-
- for (Iterator<?> it = selection.iterator(); it.hasNext();) {
- Object element = it.next();
- if (element instanceof AbstractRepositoryQuery) {
- queries.add((AbstractRepositoryQuery) element);
- } else if (element instanceof AbstractTask) {
- tasks.add((AbstractTask) element);
- }
- }
-
- try {
-
- // queries
- {
- int counter = 0;
- queryTempFiles = new File[queries.size()];
- for (AbstractRepositoryQuery query : queries) {
- List<AbstractRepositoryQuery> queryList = new ArrayList<AbstractRepositoryQuery>();
- queryList.add(query);
-
- String encodedName = "query";
- try {
- encodedName = URLEncoder.encode(query.getHandleIdentifier(),
- ITasksUiConstants.FILENAME_ENCODING);
- } catch (UnsupportedEncodingException e) {
- StatusHandler.fail(e, "Could not determine path for context", false);
- }
-
- queryTempFiles[counter] = File.createTempFile(encodedName, ITasksUiConstants.FILE_EXTENSION,
- tempDir);
- queryTempFiles[counter].deleteOnExit();
- TasksUiPlugin.getTaskListManager().getTaskListWriter().writeQueries(queryList,
- queryTempFiles[counter]);
- counter++;
- }
- }
-
- // tasks
- {
- int counter = 0;
- taskTempFiles = new File[tasks.size()];
- for (AbstractTask task : tasks) {
- String encodedName = "task" + counter;
- try {
- encodedName = URLEncoder.encode(task.getHandleIdentifier(),
- ITasksUiConstants.FILENAME_ENCODING);
- } catch (UnsupportedEncodingException e) {
- StatusHandler.fail(e, "Could not determine path for context", false);
- }
-
- taskTempFiles[counter] = File.createTempFile(encodedName, ITasksUiConstants.FILE_EXTENSION,
- tempDir);
- taskTempFiles[counter].deleteOnExit();
- TasksUiPlugin.getTaskListManager().getTaskListWriter().writeTask(task, taskTempFiles[counter]);
- counter++;
- }
- }
- } catch (IOException e) {
- StatusHandler.fail(e, "Cannot create a temp query file for Drag&Drop", true);
- }
- }
- }
-
- public void dragSetData(DragSourceEvent event) {
- StructuredSelection selection = (StructuredSelection) this.view.getViewer().getSelection();
- AbstractTaskContainer selectedElement = null;
- if (((IStructuredSelection) selection).getFirstElement() instanceof AbstractTaskContainer) {
- selectedElement = (AbstractTaskContainer) ((IStructuredSelection) selection).getFirstElement();
- }
-
- if (TaskTransfer.getInstance().isSupportedType(event.dataType)) {
- List<AbstractTask> tasks = new ArrayList<AbstractTask>();
- for (Iterator<?> iter = selection.iterator(); iter.hasNext();) {
- AbstractTaskContainer element = (AbstractTaskContainer) iter.next();
- if (element instanceof AbstractTask) {
- tasks.add((AbstractTask) element);
- }
- }
- event.data = tasks.toArray();
- } else if (FileTransfer.getInstance().isSupportedType(event.dataType)) {
- // detect context paths
- String[] taskPaths = new String[taskTempFiles.length];
- for (int i = 0; i < taskTempFiles.length; i++) {
- taskPaths[i] = taskTempFiles[i].getAbsolutePath();
- }
-
- // detect query paths
- String[] queryPaths = new String[queryTempFiles.length];
- for (int i = 0; i < queryTempFiles.length; i++) {
- queryPaths[i] = queryTempFiles[i].getAbsolutePath();
- }
-
- // combine paths if needed
- String[] paths = new String[taskTempFiles.length + queryTempFiles.length];
- System.arraycopy(taskPaths, 0, paths, 0, taskTempFiles.length);
- System.arraycopy(queryPaths, 0, paths, taskTempFiles.length, queryTempFiles.length);
-
- if (paths.length > 0) {
- event.data = paths;
- }
- } else if (TextTransfer.getInstance().isSupportedType(event.dataType)) {
- event.data = CopyTaskDetailsAction.getTextForTask(selectedElement);
- }
- }
-
- public void dragFinished(DragSourceEvent event) {
- // don't care if the drag is done
- }
-}
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 1d7683817..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListDropAdapter.java
+++ /dev/null
@@ -1,344 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.util.ArrayList;
-import java.util.Calendar;
-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.NullProgressMonitor;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerDropAdapter;
-import org.eclipse.mylyn.context.core.ContextCorePlugin;
-import org.eclipse.mylyn.internal.context.core.InteractionContext;
-import org.eclipse.mylyn.internal.tasks.core.ScheduledTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.TaskActivityUtil;
-import org.eclipse.mylyn.internal.tasks.core.TaskCategory;
-import org.eclipse.mylyn.internal.tasks.core.UnfiledCategory;
-import org.eclipse.mylyn.internal.tasks.ui.ITasksUiConstants;
-import org.eclipse.mylyn.internal.tasks.ui.RetrieveTitleFromUrlJob;
-import org.eclipse.mylyn.internal.tasks.ui.TaskTransfer;
-import org.eclipse.mylyn.internal.tasks.ui.actions.QueryImportAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.TaskActivateAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.TaskImportAction;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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;
-
-/**
- * @author Mik Kersten
- * @author Rob Elves (added URL based task creation support)
- * @author Jevgeni Holodkov
- */
-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(Object data) {
- Object currentTarget = getCurrentTarget();
- List<AbstractTask> tasksToMove = new ArrayList<AbstractTask>();
- ISelection selection = ((TreeViewer) getViewer()).getSelection();
- if (isUrl(data) && createTaskFromUrl(data)) {
- tasksToMove.add(newTask);
- } else if (TaskTransfer.getInstance().isSupportedType(currentTransfer)) {
- for (Object selectedObject : ((IStructuredSelection) selection).toList()) {
- AbstractTask toMove = null;
- if (selectedObject instanceof AbstractTask) {
- toMove = (AbstractTask) selectedObject;
- }
- if (toMove != null) {
- tasksToMove.add(toMove);
- }
- }
- } 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 AbstractTask) {
- AbstractTask targetTask = (AbstractTask) getCurrentTarget();
- final String[] names = (String[]) data;
- boolean confirmed = MessageDialog.openConfirm(getViewer().getControl().getShell(),
- ITasksUiConstants.TITLE_DIALOG, "Overwrite the context of the target task with the source's?");
- if (confirmed) {
- String path = names[0];
- File file = new File(path);
- if (ContextCorePlugin.getContextManager().isValidContextFile(file)) {
- ContextCorePlugin.getContextManager().transferContextAndActivate(
- targetTask.getHandleIdentifier(), file);
- new TaskActivateAction().run(targetTask);
- }
- }
- } else {
- // otherwise it is queries or tasks
- final String[] names = (String[]) data;
- List<AbstractRepositoryQuery> queries = new ArrayList<AbstractRepositoryQuery>();
- Map<AbstractTask, InteractionContext> taskContexts = new HashMap<AbstractTask, InteractionContext>();
- Set<TaskRepository> repositories = new HashSet<TaskRepository>();
-
- for (int i = 0; i < names.length; i++) {
- String path = names[i];
- File file = new File(path);
- if (file.isFile()) {
- List<AbstractRepositoryQuery> readQueries = TasksUiPlugin.getTaskListManager()
- .getTaskListWriter()
- .readQueries(file);
-
- if (readQueries.size() > 0) {
- queries.addAll(readQueries);
- repositories.addAll(TasksUiPlugin.getTaskListManager()
- .getTaskListWriter()
- .readRepositories(file));
- } else {
- List<AbstractTask> readTasks = TasksUiPlugin.getTaskListManager()
- .getTaskListWriter()
- .readTasks(file);
- for (AbstractTask task : readTasks) {
- taskContexts.put(task, ContextCorePlugin.getContextManager().loadContext(
- task.getHandleIdentifier(), file));
- }
- repositories.addAll(TasksUiPlugin.getTaskListManager()
- .getTaskListWriter()
- .readRepositories(file));
- }
- }
-
- }
-
- if (queries.size() > 0) {
- new QueryImportAction().importQueries(queries, repositories, getViewer().getControl().getShell());
- } else {
- TaskImportAction action = new TaskImportAction();
- action.importTasks(taskContexts, repositories, getViewer().getControl().getShell());
- action.refreshTaskListView();
- }
- }
- }
-
- for (AbstractTask task : tasksToMove) {
- if (currentTarget instanceof UnfiledCategory) {
- TasksUiPlugin.getTaskListManager().getTaskList().moveToContainer(task, (UnfiledCategory) currentTarget);
- } else if (currentTarget instanceof TaskCategory) {
- TasksUiPlugin.getTaskListManager().getTaskList().moveToContainer(task, (TaskCategory) currentTarget);
- } else if (currentTarget instanceof AbstractTask) {
- AbstractTask targetTask = (AbstractTask) currentTarget;
- TaskCategory targetCategory = null;
- // TODO: just look for categories?
- if (targetTask.getParentContainers().size() > 0) {
- AbstractTaskContainer container = targetTask.getParentContainers().iterator().next();
- if (container instanceof TaskCategory) {
- targetCategory = (TaskCategory) container;
- }
- }
- if (targetCategory == null) {
- TasksUiPlugin.getTaskListManager().getTaskList().moveToContainer(task,
- TasksUiPlugin.getTaskListManager().getTaskList().getDefaultCategory());
- } else {
- TasksUiPlugin.getTaskListManager().getTaskList().moveToContainer(task, targetCategory);
- }
- } else if (currentTarget instanceof ScheduledTaskContainer) {
- ScheduledTaskContainer container = (ScheduledTaskContainer) currentTarget;
- Calendar newSchedule = Calendar.getInstance();
- newSchedule.setTimeInMillis(container.getStart().getTimeInMillis());
- TaskActivityUtil.snapEndOfWorkDay(newSchedule);
- TasksUiPlugin.getTaskActivityManager().setScheduledFor(task, newSchedule.getTime());
- } else if (currentTarget == null) {
- TasksUiPlugin.getTaskListManager().getTaskList().moveToContainer(newTask,
- TasksUiPlugin.getTaskListManager().getTaskList().getDefaultCategory());
- }
- }
-
- // Make new task the current selection in the view
- if (newTask != null) {
- StructuredSelection ss = new StructuredSelection(newTask);
- getViewer().setSelection(ss);
- getViewer().refresh();
- }
-
- 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 : TasksUiPlugin.getRepositoryManager().getRepositories(
- connector.getConnectorKind())) {
- if (repository.getUrl().equals(repositoryUrl)) {
- try {
- newTask = connector.createTaskFromExistingId(repository, id, new NullProgressMonitor());
- TasksUiUtil.refreshAndOpenTaskListElement(newTask);
- return true;
- } catch (CoreException e) {
- StatusHandler.fail(e, "could not create task", false);
- 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 = TasksUiPlugin.getTaskListManager().createNewLocalTask(urlTitle);
-
- if (newTask == null) {
- return false;
- }
- newTask.setUrl(url);
-
- // NOTE: setting boolean param as false so that we go directly to
- // the
- // browser tab as with a previously-created task
- TasksUiUtil.openEditor(newTask, false);
- return true;
- }
- }
-
- public boolean createTaskFromString(String title) {
- //newTask = new Task(TasksUiPlugin.getTaskListManager().genUniqueTaskHandle(), title);
- newTask = TasksUiPlugin.getTaskListManager().createNewLocalTask(title);
-
- if (newTask == null) {
- return false;
- } else {
- //newTask.setPriority(Task.PriorityLevel.P3.toString());
- TasksUiUtil.openEditor(newTask, false);
- return true;
- }
- }
-
- @Override
- public boolean validateDrop(Object targetObject, int operation, TransferData transferType) {
- currentTransfer = transferType;
-
- Object selectedObject = ((IStructuredSelection) ((TreeViewer) getViewer()).getSelection()).getFirstElement();
- if (FileTransfer.getInstance().isSupportedType(currentTransfer)) {
- // handle all files
- return true;
- } else if (selectedObject != null && !(selectedObject instanceof AbstractRepositoryQuery)) {
- if (getCurrentTarget() instanceof TaskCategory || getCurrentTarget() instanceof UnfiledCategory
- || getCurrentTarget() instanceof ScheduledTaskContainer) {
- return true;
- } else if (getCurrentTarget() instanceof AbstractTaskContainer
- && (getCurrentLocation() == ViewerDropAdapter.LOCATION_AFTER || getCurrentLocation() == ViewerDropAdapter.LOCATION_BEFORE)) {
- 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 {
- RetrieveTitleFromUrlJob job = new RetrieveTitleFromUrlJob(url) {
- @Override
- protected void setTitle(final String pageTitle) {
- newTask.setSummary(pageTitle);
- TasksUiPlugin.getTaskListManager().getTaskList().notifyTaskChanged(newTask, false);
- }
- };
- job.schedule();
- } catch (RuntimeException e) {
- StatusHandler.fail(e, "could not open task web page", false);
- }
- }
-}
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 3383ea116..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListFilteredTree.java
+++ /dev/null
@@ -1,526 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.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.tasks.core.ScheduledTaskContainer;
-import org.eclipse.mylyn.internal.tasks.ui.IDynamicSubMenuContributor;
-import org.eclipse.mylyn.internal.tasks.ui.TaskListColorsAndFonts;
-import org.eclipse.mylyn.internal.tasks.ui.TaskListHyperlink;
-import org.eclipse.mylyn.internal.tasks.ui.TaskSearchPage;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.internal.tasks.ui.actions.ActivateTaskDialogAction;
-import org.eclipse.mylyn.internal.tasks.ui.actions.ActivateTaskHistoryDropDownAction;
-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.tasks.core.AbstractTask;
-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.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-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.Menu;
-import org.eclipse.ui.IWorkingSet;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.PatternFilter;
-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 CopyTaskDetailsAction copyTaskDetailsAction = new CopyTaskDetailsAction(false);
-
- public TaskListFilteredTree(Composite parent, int treeStyle, PatternFilter filter) {
- super(parent, treeStyle, filter);
- hookContextMenu();
- }
-
- private void hookContextMenu() {
- activeTaskMenuManager = new MenuManager("#PopupMenu");
- activeTaskMenuManager.setRemoveAllWhenShown(true);
- activeTaskMenuManager.addMenuListener(new IMenuListener() {
- public void menuAboutToShow(IMenuManager manager) {
- fillContextMenu(manager, TasksUiPlugin.getTaskListManager().getTaskList().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();
-
- TasksUiPlugin.getTaskListManager().getTaskList().addChangeListener(new ITaskListChangeListener() {
-
- public void containersChanged(Set<TaskContainerDelta> containers) {
- for (TaskContainerDelta taskContainerDelta : containers) {
- if (taskContainerDelta.getContainer() instanceof AbstractTask) {
- updateTaskProgressBar();
- break;
- }
- }
- }
- });
-
- TasksUiPlugin.getTaskListManager().addActivityListener(new ITaskActivityListener() {
-
- public void activityChanged(ScheduledTaskContainer week) {
- updateTaskProgressBar();
- }
-
- public void taskActivated(AbstractTask task) {
- }
-
- public void taskDeactivated(AbstractTask task) {
- }
-
- public void taskListRead() {
- }
- });
- 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(TaskListColorsAndFonts.COLOR_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;
- }
-
- @SuppressWarnings("deprecation")
- private void updateTaskProgressBar() {
- if (taskProgressBar.isDisposed()) {
- return;
- }
-
- Set<AbstractTask> tasksThisWeek = TasksUiPlugin.getTaskListManager().getScheduledForThisWeek();
- totalTasks = tasksThisWeek.size();
- completeTime = 0;
- completeTasks = 0;
- incompleteTime = 0;
- for (AbstractTask task : tasksThisWeek) {
- if (task.isCompleted()) {
- completeTasks++;
- if (task.getEstimateTimeHours() > 0) {
- completeTime += task.getEstimateTimeHours();
- } else {
- completeTime++;
- }
- } else {
- if (task.getEstimateTimeHours() > 0) {
- incompleteTime += task.getEstimateTimeHours();
- } 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 Hours: " + completeTime + " of "
- + (completeTime + incompleteTime) + " estimated" + "\n Tasks: " + completeTasks
- + " of " + totalTasks + " scheduled");
- }
- }
- });
- }
-
- @Override
- protected Composite createActiveWorkingSetComposite(Composite container) {
- final ImageHyperlink workingSetButton = new ImageHyperlink(container, SWT.FLAT);
- workingSetButton.setImage(TasksUiImages.getImage(TasksUiImages.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(TaskListColorsAndFonts.COLOR_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(TasksUiImages.getImage(TasksUiImages.TOOLBAR_ARROW_DOWN));
- }
-
- public void linkExited(org.eclipse.ui.forms.events.HyperlinkEvent e) {
- workingSetButton.setImage(TasksUiImages.getImage(TasksUiImages.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(TasksUiImages.getImage(TasksUiImages.TOOLBAR_ARROW_RIGHT));
- activeTaskButton.setToolTipText("Select Active Task");
-
- activeTaskLink = new TaskListHyperlink(container, SWT.LEFT);
- activeTaskLink.setText(LABEL_ACTIVE_NONE);
- activeTaskLink.setForeground(TaskListColorsAndFonts.COLOR_HYPERLINK_WIDGET);
-
- AbstractTask activeTask = TasksUiPlugin.getTaskListManager().getTaskList().getActiveTask();
- if (activeTask != null) {
- indicateActiveTask(activeTask);
- }
-
- final ActivateTaskHistoryDropDownAction action = new ActivateTaskHistoryDropDownAction(
- TasksUiPlugin.getTaskListManager().getTaskActivationHistory(), true);
-
- activeTaskButton.addHyperlinkListener(new IHyperlinkListener() {
-
- public void linkActivated(org.eclipse.ui.forms.events.HyperlinkEvent e) {
- action.getMenu(activeTaskButton).setVisible(true);
- }
-
- public void linkEntered(org.eclipse.ui.forms.events.HyperlinkEvent e) {
- activeTaskButton.setImage(TasksUiImages.getImage(TasksUiImages.TOOLBAR_ARROW_DOWN));
- }
-
- public void linkExited(org.eclipse.ui.forms.events.HyperlinkEvent e) {
- activeTaskButton.setImage(TasksUiImages.getImage(TasksUiImages.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) {
- AbstractTask activeTask = (TasksUiPlugin.getTaskListManager().getTaskList().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();
- }
- TasksUiUtil.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(AbstractTask task) {
- if (filterComposite.isDisposed()) {
- return;
- }
-
- String text = task.getSummary();
- activeTaskLink.setText(text);
- activeTaskLink.setUnderlined(false);
- activeTaskLink.setToolTipText("Open: " + task.getSummary());
- activeTaskLink.addMouseTrackListener(new MouseTrackListener() {
-
- public void mouseEnter(MouseEvent e) {
- activeTaskLink.setUnderlined(true);
- }
-
- public void mouseExit(MouseEvent e) {
- activeTaskLink.setUnderlined(false);
- }
-
- public void mouseHover(MouseEvent e) {
- }
- });
-
- filterComposite.layout();
- }
-
- public String getActiveTaskLabelText() {
- return activeTaskLink.getText();
- }
-
- public void indicateNoActiveTask() {
- if (filterComposite.isDisposed()) {
- return;
- }
-
- 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 AbstractTask activeTask) {
- if (activeTask != null) {
- IStructuredSelection selection = new StructuredSelection(activeTask);
- copyTaskDetailsAction.selectionChanged(selection);
-
- manager.add(new OpenTaskListElementAction(null) {
- @Override
- public void run() {
- TasksUiUtil.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<AbstractTaskContainer> selectedElements = new ArrayList<AbstractTaskContainer>();
- 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/TaskListTableSorter.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListTableSorter.java
deleted file mode 100644
index e7a556ead..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListTableSorter.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.ScheduledTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.TaskArchive;
-import org.eclipse.mylyn.internal.tasks.core.UnfiledCategory;
-import org.eclipse.mylyn.internal.tasks.ui.ITasksUiConstants;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Mik Kersten
- */
-public class TaskListTableSorter extends ViewerSorter {
-
- public enum SortByIndex {
- PRIORITY, SUMMARY, DATE_CREATED;
- }
-
- private final TaskListView view;
-
- private TaskKeyComparator taskKeyComparator = new TaskKeyComparator();
-
- private SortByIndex sortByIndex;
-
- public TaskListTableSorter(TaskListView view, SortByIndex sortByIndex) {
- super();
- this.view = view;
- this.sortByIndex = sortByIndex;
- }
-
- public void setColumn(String column) {
- if (view.isFocusedMode()) {
- MessageDialog.openInformation(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
- ITasksUiConstants.TITLE_DIALOG,
- "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 -1 * dateRangeTaskContainer2.getStart().compareTo(dateRangeTaskContainer1.getStart());
- } else if (o1 instanceof AbstractTaskContainer && o2 instanceof ScheduledTaskContainer) {
- return -1;
- } else if (o1 instanceof ScheduledTaskContainer && o2 instanceof AbstractTaskContainer) {
- return 1;
- }
-
- if (o1 instanceof UnfiledCategory && o2 instanceof AbstractTaskContainer) {
- return -1;
- } else if (o1 instanceof AbstractTaskContainer && o2 instanceof UnfiledCategory) {
- return 1;
- }
-
- if (o1 instanceof AbstractTaskContainer && o2 instanceof TaskArchive) {
- return -1;
- } else if (o2 instanceof AbstractTaskContainer && o1 instanceof TaskArchive) {
- return 1;
- }
-
- if (!(o1 instanceof AbstractTask) && o2 instanceof AbstractTask) {
- return 1;
- }
-
- if (o1 instanceof AbstractTask && !(o2 instanceof AbstractTaskContainer)) {
- return -1;
- }
-
- // if (o1 instanceof AbstractTaskContainer || o1 instanceof
- // AbstractRepositoryQuery) {
- if (!(o1 instanceof AbstractTask)) {
- if (o2 instanceof AbstractTaskContainer || o2 instanceof AbstractRepositoryQuery) {
-
- return this.view.sortDirection
- * ((AbstractTaskContainer) o1).getSummary().compareToIgnoreCase(
- ((AbstractTaskContainer) o2).getSummary());
- } else {
- return -1;
- }
- } else if (o1 instanceof AbstractTaskContainer) {
- if (!(o2 instanceof AbstractTask)) {
- return -1;
- } else if (o2 instanceof AbstractTaskContainer) {
- AbstractTaskContainer element1 = (AbstractTaskContainer) o1;
- AbstractTaskContainer element2 = (AbstractTaskContainer) o2;
-
- return compareElements(element1, element2);
- }
- } else {
- return 0;
- }
- return 0;
- }
-
- private int compareElements(AbstractTaskContainer element1, AbstractTaskContainer element2) {
- if (SortByIndex.PRIORITY.equals(sortByIndex)) {
- int result = this.view.sortDirection * element1.getPriority().compareTo(element2.getPriority());
- if (result != 0) {
- return result;
- }
- } else if (SortByIndex.DATE_CREATED.equals(sortByIndex)) {
- 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 t1.getCreationDate().compareTo(t2.getCreationDate());
- }
- }
- } else {
- String summary1 = getSortableSummaryFromElement(element1);
- String summary2 = getSortableSummaryFromElement(element2);
- element2.getSummary();
- return this.view.sortDirection * taskKeyComparator.compare(summary1, summary2);
- }
- return 0;
- }
-
- public static String getSortableSummaryFromElement(AbstractTaskContainer element) {
- String summary = element.getSummary();
-
- if (element instanceof AbstractTask) {
- AbstractTask task1 = (AbstractTask) element;
- if (task1.getTaskKey() != null) {
- summary = task1.getTaskKey() + ": " + summary;
- }
- }
- return summary;
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListToolTipHandler.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListToolTipHandler.java
deleted file mode 100644
index 44d75d450..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListToolTipHandler.java
+++ /dev/null
@@ -1,569 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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.Calendar;
-import java.util.Date;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.mylyn.internal.tasks.core.ScheduledTaskContainer;
-import org.eclipse.mylyn.internal.tasks.ui.ITaskListNotification;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.monitor.core.DateUtil;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.tasks.core.RepositoryStatus;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.AbstractTask.RepositoryTaskSyncState;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.MouseAdapter;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.MouseTrackAdapter;
-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.Label;
-import org.eclipse.swt.widgets.Monitor;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.ToolBar;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.Widget;
-import org.eclipse.ui.IWindowListener;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Mik Kersten
- * @author Eric Booth
- * @author Leo Dos Santos - multi-monitor support
- * @author Steffen Pingel
- */
-public class TaskListToolTipHandler {
-
- private Shell tipShell;
-
- private Widget tipWidget;
-
- private AbstractTaskContainer getTaskListElement(Object hoverObject) {
- if (hoverObject instanceof Widget) {
- Object data = ((Widget) hoverObject).getData();
- if (data != null) {
- if (data instanceof AbstractTaskContainer) {
- return (AbstractTaskContainer) data;
- } else if (data instanceof IAdaptable) {
- return (AbstractTaskContainer) ((IAdaptable) data).getAdapter(AbstractTaskContainer.class);
- }
- }
- }
- return null;
- }
-
- private String getTitleText(AbstractTaskContainer element) {
- if (element instanceof ScheduledTaskContainer) {
- StringBuilder sb = new StringBuilder();
- sb.append(element.getSummary());
- Calendar start = ((ScheduledTaskContainer) element).getStart();
- sb.append(" [");
- sb.append(DateFormat.getDateInstance(DateFormat.LONG).format(start.getTime()));
- sb.append("]");
- return sb.toString();
- } else if (element instanceof AbstractRepositoryQuery) {
- AbstractRepositoryQuery query = (AbstractRepositoryQuery) element;
- StringBuilder sb = new StringBuilder();
- sb.append(element.getSummary());
- sb.append(" [");
- sb.append(getRepositoryLabel(query.getRepositoryKind(), query.getRepositoryUrl()));
- sb.append("]");
- return sb.toString();
- } else {
- return element.getSummary();
- }
- }
-
- private String getDetailsText(AbstractTaskContainer element, TaskListView taskListView) {
- if (element instanceof ScheduledTaskContainer) {
- ScheduledTaskContainer container = (ScheduledTaskContainer) element;
- int estimateTotal = 0;
- long elapsedTotal = 0;
- if (taskListView != null) {
- Object[] children = ((TaskListContentProvider)taskListView.getViewer().getContentProvider()).getChildren(element);
- for (Object object : children) {
- if (object instanceof AbstractTask) {
- estimateTotal += ((AbstractTask) object).getEstimateTimeHours();
- elapsedTotal += TasksUiPlugin.getTaskActivityManager().getElapsedTime((AbstractTask) object,
- container.getStart(), container.getEnd());
- }
- }
- }
-
- 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 AbstractTask) {
- AbstractTask task = (AbstractTask) element;
- StringBuilder sb = new StringBuilder();
- sb.append(TasksUiPlugin.getConnectorUi(task.getConnectorKind()).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 = TasksUiPlugin.getRepositoryManager().getRepository(repositoryKind, repositoryUrl);
- if (repository != null) {
- String label = repository.getRepositoryLabel();
- if (label.indexOf("//") != -1) {
- return label.substring((repository.getUrl().indexOf("//") + 2));
- }
- return label + "";
- }
- return "";
- }
-
- private String getActivityText(AbstractTaskContainer 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 AbstractTask) {
- AbstractTask task = (AbstractTask) 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);
- String elapsedTimeString = DateUtil.getFormattedDurationShort(elapsed);
- sb.append("Elapsed: ");
- sb.append(elapsedTimeString);
- sb.append("\n");
-
- return sb.toString();
- }
- return null;
- }
-
- private String getIncommingText(AbstractTaskContainer element) {
- if (element instanceof AbstractTask) {
- AbstractTask task = (AbstractTask) element;
- if (task.getSynchronizationState() == RepositoryTaskSyncState.INCOMING) {
- AbstractRepositoryConnector connector = TasksUiPlugin.getRepositoryManager().getRepositoryConnector(
- task);
- if (connector != null) {
- ITaskListNotification notification = TasksUiPlugin.getDefault().getIncommingNotification(connector,
- task);
- if (notification != null) {
- String res = null;
- if (notification.getDescription() != null) {
- String descriptionText = notification.getDescription();
- if (descriptionText != null && descriptionText.length() > 0) {
- res = descriptionText;
- }
- }
- if (notification.getDetails() != null) {
- String details = notification.getDetails();
- if (details != null && details.length() > 0) {
- res = res == null ? details : res + "\n" + details;
- }
- }
- return res;
- }
- }
- }
- }
- return null;
- }
-
- private String getStatusText(AbstractTaskContainer element) {
- IStatus status = null;
- if (element instanceof AbstractTask) {
- AbstractTask task = (AbstractTask) element;
- status = task.getSynchronizationStatus();
- } else if (element instanceof AbstractRepositoryQuery) {
- AbstractRepositoryQuery query = (AbstractRepositoryQuery) element;
- status = query.getSynchronizationStatus();
- }
-
- 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;
- }
-
- private ProgressData getProgressData(AbstractTaskContainer element, TaskListView taskListView) {
- if (element instanceof AbstractTask) {
- return null;
- }
- Object[] children = new Object[0];
-
- if (element instanceof ScheduledTaskContainer && taskListView != null) {
- children = ((TaskListContentProvider)taskListView.getViewer().getContentProvider()).getChildren(element);
- } else {
- children = element.getChildren().toArray();
- }
-
- int total = children.length;
- int completed = 0;
- for (AbstractTask task : element.getChildren()) {
- if (task.isCompleted()) {
- completed++;
- }
- }
-
- String text = "Total: " + total + " (Complete: " + completed + ", Incomplete: " + (total - completed) + ")";
- return new ProgressData(completed, total, text);
- }
-
- private Image getImage(AbstractTaskContainer element) {
- if (element instanceof AbstractRepositoryQuery) {
- AbstractRepositoryQuery query = (AbstractRepositoryQuery) element;
- AbstractRepositoryConnector connector = TasksUiPlugin.getRepositoryManager().getRepositoryConnector(
- query.getRepositoryKind());
- if (connector != null) {
- return TasksUiPlugin.getDefault().getBrandingIcon(connector.getConnectorKind());
- }
- } else if (element instanceof AbstractTask) {
- AbstractTask repositoryTask = (AbstractTask) element;
- AbstractRepositoryConnector connector = TasksUiPlugin.getRepositoryManager().getRepositoryConnector(
- repositoryTask.getConnectorKind());
- if (connector != null) {
- return TasksUiPlugin.getDefault().getBrandingIcon(connector.getConnectorKind());
- }
- } else if (element instanceof ScheduledTaskContainer) {
- return TasksUiImages.getImage(TasksUiImages.CALENDAR);
- }
- return null;
- }
-
- /**
- * Enables customized hover help for a specified control
- *
- * @control the control on which to enable hoverhelp
- */
- public void activateHoverHelp(final Control control) {
- // hide tooltip if any window is deactivated
- PlatformUI.getWorkbench().addWindowListener(new IWindowListener() {
-
- public void windowActivated(IWorkbenchWindow window) {
- }
-
- public void windowClosed(IWorkbenchWindow window) {
- }
-
- public void windowDeactivated(IWorkbenchWindow window) {
- hideTooltip();
- }
-
- public void windowOpened(IWorkbenchWindow window) {
- }
- });
-
- // hide tooltip if control underneath is activated
- control.addMouseListener(new MouseAdapter() {
-
- @Override
- public void mouseDown(MouseEvent e) {
- hideTooltip();
- }
- });
-
- // trap hover events to pop-up tooltip
- control.addMouseTrackListener(new MouseTrackAdapter() {
-
- @Override
- public void mouseExit(MouseEvent e) {
- // TODO can these conditions be simplified? see bug 131776
- if (tipShell != null && !tipShell.isDisposed() && tipShell.getDisplay() != null
- && !tipShell.getDisplay().isDisposed() && tipShell.isVisible()) {
- tipShell.setVisible(false);
- }
- tipWidget = null;
- }
-
- @Override
- public void mouseHover(MouseEvent event) {
- Point widgetPosition = new Point(event.x, event.y);
- Widget widget = event.widget;
- if (widget instanceof ToolBar) {
- ToolBar w = (ToolBar) widget;
- widget = w.getItem(widgetPosition);
- }
- if (widget instanceof Table) {
- Table w = (Table) widget;
- widget = w.getItem(widgetPosition);
- }
- if (widget instanceof Tree) {
- Tree w = (Tree) widget;
- widget = w.getItem(widgetPosition);
- }
-
- if (widget == null) {
- hideTooltip();
- tipWidget = null;
- return;
- }
-
- if (widget == tipWidget) {
- // already displaying tooltip
- return;
- }
-
- tipWidget = widget;
-
- TaskListView taskListView = TaskListView.getFromActivePerspective();
-
- showTooltip(control.toDisplay(widgetPosition), taskListView);
- }
-
- });
- }
-
- /**
- * Sets the location for a hovering shell
- *
- * @param shell
- * the object that is to hover
- * @param position
- * the position of a widget to hover over
- * @return the top-left location for a hovering box
- */
- private void setHoverLocation(Shell shell, Point position) {
- Rectangle displayBounds = shell.getMonitor().getClientArea();
- Rectangle shellBounds = shell.getBounds();
-
- // We need to find the exact monitor we're mousing over
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=166990
- Monitor[] array = PlatformUI.getWorkbench().getDisplay().getMonitors();
- for (Monitor m : array) {
- Rectangle monitorBounds = m.getBounds();
- if ((position.x >= monitorBounds.x) && (position.x < (monitorBounds.x + monitorBounds.width))
- && (position.y >= monitorBounds.y) && (position.y < (monitorBounds.y + monitorBounds.height))) {
- displayBounds = m.getClientArea();
- }
- }
-
- if ((position.x + shellBounds.width) > (displayBounds.x + displayBounds.width))
- shellBounds.x = displayBounds.x + displayBounds.width - shellBounds.width;
- else
- shellBounds.x = position.x;
-
- if ((position.y + 10 + shellBounds.height) > (displayBounds.y + displayBounds.height))
- shellBounds.y = displayBounds.y + displayBounds.height - shellBounds.height;
- else
- shellBounds.y = position.y + 10;
-
- shell.setBounds(shellBounds);
- }
-
- private void hideTooltip() {
- if (tipShell != null && !tipShell.isDisposed() && tipShell.isVisible()) {
- tipShell.setVisible(false);
- }
- }
-
- private void showTooltip(Point location, TaskListView taskListView) {
- hideTooltip();
-
- AbstractTaskContainer element = getTaskListElement(tipWidget);
- if (element == null) {
- return;
- }
-
- Shell parent = PlatformUI.getWorkbench().getDisplay().getActiveShell();
- if (parent == null) {
- return;
- }
-
- // dispose old tooltip
- if (tipShell != null && !tipShell.isDisposed() && tipShell.getShell() != null) {
- tipShell.close();
- }
-
- tipShell = new Shell(parent.getDisplay(), SWT.TOOL | SWT.NO_FOCUS | SWT.MODELESS | SWT.ON_TOP);
- GridLayout gridLayout = new GridLayout();
- gridLayout.numColumns = 2;
- gridLayout.marginWidth = 5;
- gridLayout.marginHeight = 2;
- tipShell.setLayout(gridLayout);
- tipShell.setBackground(tipShell.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND));
-
- addIconAndLabel(tipShell, getImage(element), getTitleText(element));
-
- String detailsText = getDetailsText(element, taskListView);
- if (detailsText != null) {
- addIconAndLabel(tipShell, null, detailsText);
- }
-
- String synchText = getSynchText(element);
- if (synchText != null) {
- addIconAndLabel(tipShell, TasksUiImages.getImage(TasksUiImages.REPOSITORY_SYNCHRONIZE), synchText);
- }
-
- String activityText = getActivityText(element);
- if (activityText != null) {
- addIconAndLabel(tipShell, TasksUiImages.getImage(TasksUiImages.CALENDAR), activityText);
- }
-
- String incommingText = getIncommingText(element);
- if (incommingText != null) {
- addIconAndLabel(tipShell, TasksUiImages.getImage(TasksUiImages.OVERLAY_INCOMMING), incommingText);
- }
-
- ProgressData progress = getProgressData(element, taskListView);
- if (progress != null) {
- addIconAndLabel(tipShell, null, progress.text);
-
- // label height need to be set to 0 to remove gap below the progress bar
- Label label = new Label(tipShell, SWT.NONE);
- GridData labelGridData = new GridData(SWT.FILL, SWT.TOP, true, false);
- labelGridData.heightHint = 0;
- label.setLayoutData(labelGridData);
-
- Composite progressComposite = new Composite(tipShell, 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(element);
- if (statusText != null) {
- addIconAndLabel(tipShell, TasksUiImages.getImage(TasksUiImages.WARNING), statusText);
- }
-
- tipShell.pack();
- setHoverLocation(tipShell, location);
- tipShell.setVisible(true);
- }
-
- private String getSynchText(AbstractTaskContainer element) {
- if (element instanceof AbstractRepositoryQuery) {
- String syncStamp = ((AbstractRepositoryQuery) 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;
- }
-
- private 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;
- }
-
- }
-
-}
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 ec2f9d2e9..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java
+++ /dev/null
@@ -1,1696 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.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.CloneTaskAction;
-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.GroupSubTasksAction;
-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.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.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.themes.IThemeManager;
-
-/**
- * @author Mik Kersten
- * @author Ken Sueda
- * @author Eugene Kuleshov
- */
-public class TaskListView extends ViewPart implements IPropertyChangeListener {
-
- 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_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 CloneTaskAction cloneThisBugAction;
-
- 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 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 Color(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 ITaskActivityListener() {
-
- 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> containers) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- for (TaskContainerDelta taskContainerDelta : containers) {
- 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.getTaskListManager().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 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 static TaskListView openInActivePerspective() {
- try {
- return (TaskListView) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(ID);
- } catch (Exception e) {
- StatusHandler.fail(e, "Could not show Task List view", false);
- e.printStackTrace();
- return null;
- }
- }
-
- public TaskListView() {
- TasksUiPlugin.getTaskListManager().addActivityListener(TASK_ACTIVITY_LISTENER);
- TasksUiPlugin.getTaskListManager().getTaskList().addChangeListener(TASK_REFERESH_LISTENER);
-
- PlatformUI.getWorkbench().getWorkingSetManager().addPropertyChangeListener(this);
-// addPresentation(categorizedPresentation);
-// addPresentation(scheduledPresentation);
- }
-
- @Override
- public void dispose() {
- super.dispose();
- TasksUiPlugin.getTaskListManager().getTaskList().removeChangeListener(TASK_REFERESH_LISTENER);
- TasksUiPlugin.getTaskListManager().removeActivityListener(TASK_ACTIVITY_LISTENER);
-
- PlatformUI.getWorkbench().getWorkingSetManager().removePropertyChangeListener(this);
-
- final IThemeManager themeManager = getSite().getWorkbenchWindow().getWorkbench().getThemeManager();
- if (themeManager != null) {
- themeManager.removePropertyChangeListener(THEME_CHANGE_LISTENER);
- }
-
- categoryGradientStart.dispose();
- categoryGradientEnd.dispose();
- }
-
- private void updateDescription() {
- List<AbstractTask> activeTasks = TasksUiPlugin.getTaskListManager().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.getTaskListManager().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();
-
- TaskListToolTipHandler taskListToolTipHandler = new TaskListToolTipHandler();
- taskListToolTipHandler.activateHoverHelp(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);
- }
-
- 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 == 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();
- }
- }
- }
-
- 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.getTaskListManager().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) {
- 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(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());
-
- Map<String, List<IDynamicSubMenuContributor>> dynamicMenuMap = TasksUiPlugin.getDefault().getDynamicMenuMap();
-
- 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());
-
- 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());
-
- 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));
-
- 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);
- cloneThisBugAction = new CloneTaskAction();
-
- 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);
- filteredTree.getViewer().addSelectionChangedListener(cloneThisBugAction);
- }
-
- // public void toggleNextAction(boolean enable) {
- // nextTaskAction.setEnabled(enable);
- // }
- // public NextTaskDropDownAction getNextTaskAction() {
- // return nextTaskAction;
- // }
-
-// public void togglePreviousAction(boolean enable) {
-// previousTaskAction.setEnabled(enable);
-// }
-//
-// public ActivateTaskHistoryDropDownAction getPreviousTaskAction() {
-// return previousTaskAction;
-// }
-
- /**
- * 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.getTaskListManager().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 = TaskListView.getFromActivePerspective().getSelectedTask();
- if (selectedTask != null) {
- activateAction.run(selectedTask);
-// addTaskToHistory(selectedTask);
-// previousTaskAction.setButtonStatus();
- }
- }
- if (object instanceof TaskCategory || object instanceof AbstractRepositoryQuery) {
- TasksUiUtil.refreshAndOpenTaskListElement((AbstractTaskContainer) object);
- // if(getViewer().getExpandedState(object)){
- // getViewer().collapseToLevel(object,
- // TreeViewer.ALL_LEVELS);
- // } else {
- // getViewer().expandToLevel(object, TreeViewer.ALL_LEVELS);
- // }
- }
- }
- });
- }
-
- /**
- * 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.getTaskListManager().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 element) {
- if (getViewer().getControl() != null && !getViewer().getControl().isDisposed()) {
- if (element == null) {
- getViewer().refresh(true);
- } else {
- try {
- if (element instanceof AbstractTask) {
- AbstractTask task = (AbstractTask) element;
- getViewer().refresh(task, true);
- } else {
- getViewer().refresh(element, true);
- }
- } catch (SWTException e) {
- StatusHandler.log(e, "Failed to refresh Task List");
- }
- }
- }
- }
-
- 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.getTaskListManager().getTaskList().getQueriesForHandle(
- task.getHandleIdentifier()));
- containers.addAll(task.getParentContainers());
- containers.add(TasksUiPlugin.getTaskListManager()
- .getTaskList()
- .getArchiveContainer());
- containers.add(TasksUiPlugin.getTaskListManager()
- .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/TaskRepositoriesSorter.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoriesSorter.java
deleted file mode 100644
index a842aad23..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.getUrl()).compareTo(t2.getUrl());
- }
- }
- } 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 21e15cac2..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoriesView.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.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.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.ITaskRepositoryListener;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-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.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 Action addRepositoryAction = new AddRepositoryAction();
-
- private BaseSelectionListenerAction deleteRepositoryAction;
-
- private BaseSelectionListenerAction repositoryPropertiesAction;
-
- private BaseSelectionListenerAction resetConfigurationAction;
-
- private DisconnectRepositoryAction offlineAction;
-
- private final ITaskRepositoryListener REPOSITORY_LISTENER = new ITaskRepositoryListener() {
-
- public void repositoriesRead() {
- refresh();
- }
-
- public void repositoryAdded(TaskRepository repository) {
- refresh();
- }
-
- public void repositoryRemoved(TaskRepository repository) {
- refresh();
- }
-
- public void repositorySettingsChanged(TaskRepository repository) {
- refresh();
- }
- };
-
- static class ViewContentProvider implements IStructuredContentProvider {
- public void inputChanged(Viewer v, Object oldInput, Object newInput) {
- }
-
- public void dispose() {
- }
-
- public Object[] getElements(Object parent) {
- return TasksUiPlugin.getRepositoryManager().getAllRepositories().toArray();
- }
- }
-
- public TaskRepositoriesView() {
- TasksUiPlugin.getRepositoryManager().addListener(REPOSITORY_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();
- }
- }
- });
-
- TasksUiPlugin.getRepositoryManager().addListener(new TaskRepositoryListener());
-
- makeActions();
- hookContextMenu();
- contributeToActionBars();
- getSite().setSelectionProvider(getViewer());
- }
-
- private void makeActions() {
- deleteRepositoryAction = new DeleteTaskRepositoryAction();
- viewer.addSelectionChangedListener(deleteRepositoryAction);
-
- repositoryPropertiesAction = new EditRepositoryPropertiesAction();
- viewer.addSelectionChangedListener(repositoryPropertiesAction);
-
- resetConfigurationAction = new ResetRepositoryConfigurationAction();
- 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 implements ITaskRepositoryListener {
-
- public void repositoriesRead() {
- }
-
- public void repositoryAdded(TaskRepository repository) {
- }
-
- public void repositoryRemoved(TaskRepository repository) {
- }
-
- 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 f243837f9..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoryLabelProvider.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.views;
-
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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 TasksUiImages.getImage(TasksUiImages.REPOSITORY);
- }
- } else if (object instanceof TaskRepository) {
- if (((TaskRepository) object).isOffline()) {
- return TasksUiImages.getImage(TasksUiImages.REPOSITORY_OFFLINE);
- } else {
- return TasksUiImages.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 3f909ecb2..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskScheduleContentProvider.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.views;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.mylyn.internal.tasks.core.ScheduledTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.ScheduledTaskDelegate;
-import org.eclipse.mylyn.internal.tasks.core.TaskActivityManager;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * Used by Scheduled task list presentation
- *
- * @author Rob Elves
- */
-public class TaskScheduleContentProvider extends TaskListContentProvider {
-
- private TaskActivityManager taskActivityManager;
-
- public TaskScheduleContentProvider(TaskListView taskListView) {
- super(taskListView);
- this.taskActivityManager = TasksUiPlugin.getTaskActivityManager();
- }
-
- @Override
- public Object[] getElements(Object parent) {
- if (parent.equals(this.taskListView.getViewSite())) {
- //unscheduledCategory.activeTask = null;
- Set<AbstractTaskContainer> ranges = new HashSet<AbstractTaskContainer>();
-
- ranges.addAll(taskActivityManager.getDateRanges());
-// ranges.add(TasksUiPlugin.getTaskListManager().getTaskList().getArchiveContainer());
-
- // AbstractTask activeTask = TasksUiPlugin.getTaskListManager().getTaskList().getActiveTask();
-// boolean containsActiveTask = false;
-// if (activeTask != null) {
-// for (AbstractTaskContainer taskListElement : ranges) {
-// if (taskListElement != null) {
-// if (taskListElement.getChildren().contains(activeTask)) {
-// containsActiveTask = true;
-// }
-// }
-// }
-// if (!containsActiveTask) {
-// unscheduledCategory.activeTask = activeTask;
-// ranges.add(unscheduledCategory);
-// }
-// }
- return applyFilter(ranges).toArray();
- } else {
- return super.getElements(parent);
- }
- }
-
- @Override
- public Object getParent(Object child) {
- if (child instanceof ScheduledTaskDelegate) {
- return ((ScheduledTaskDelegate) child).getDateRangeContainer();
- }
- return null;
- }
-
- @Override
- public boolean hasChildren(Object parent) {
- return getChildren(parent).length > 0;
- }
-
- @Override
- public Object[] getChildren(Object parent) {
- Set<AbstractTask> result = new HashSet<AbstractTask>();
- if (parent instanceof AbstractTask) {
- // flat presentation (no subtasks revealed in Scheduled mode)
- } else if (parent instanceof ScheduledTaskContainer) {
- for (AbstractTask child : ((ScheduledTaskContainer) parent).getChildren()) {
- if (!filter(parent, child)) {
- result.add(child);
- }
- }
-
- } else if (parent instanceof AbstractTaskContainer) {
- for (AbstractTask child : ((AbstractTaskContainer) parent).getChildren()) {
- result.add(child);
- }
- }
- return result.toArray();
- }
-}
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 03b52728a..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskTableLabelProvider.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
- *******************************************************************************/
-/*
- * 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.internal.tasks.core.ScheduledTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.TaskArchive;
-import org.eclipse.mylyn.internal.tasks.ui.TaskListColorsAndFonts;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-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 AbstractTaskContainer) {
- switch (columnIndex) {
- case 0:
- if (obj instanceof ScheduledTaskContainer) {
- if (((ScheduledTaskContainer) obj).isPresent()) {
- 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 AbstractTaskContainer)) {
- 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 AbstractTaskContainer && !(element instanceof AbstractTask)) {
- AbstractTaskContainer category = (AbstractTaskContainer) element;
- if (category instanceof TaskArchive) {
- return TaskListColorsAndFonts.BACKGROUND_ARCHIVE;
- } else {
- return categoryBackgroundColor;
- }
- } else if (element instanceof AbstractRepositoryQuery) {
- 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/WorkweekProgressBar.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/WorkweekProgressBar.java
deleted file mode 100644
index 0fba1ac6c..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/WorkweekProgressBar.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.internal.tasks.ui.views;
-
-import org.eclipse.mylyn.internal.tasks.ui.TaskListColorsAndFonts;
-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 Color completedColor;
-
- private 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(
- TaskListColorsAndFonts.THEME_COLOR_TASK_TODAY_COMPLETED);
- }
-
- public void setMaximum(int max) {
- maxTickCount = max;
- }
-
- public void reset() {
- currentTickCount = 0;
- maxTickCount = 0;
- colorBarWidth = 0;
- redraw();
- }
-
- public void reset(int ticksDone, int maximum) {
-// boolean noChange = fError == hasErrors && fStopped == stopped && currentTickCount == ticksDone
-// && maxTickCount == maximum;
-// fError = hasErrors;
-// fStopped = stopped;
- 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/AbstractRepositoryClientWizard.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/AbstractRepositoryClientWizard.java
deleted file mode 100644
index 4506417bc..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/AbstractRepositoryClientWizard.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.util.Collection;
-
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-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.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.ui.wizards.AbstractRepositorySettingsPage;
-import org.eclipse.ui.INewWizard;
-
-/**
- * @author Mik Kersten
- */
-public abstract class AbstractRepositoryClientWizard extends Wizard implements INewWizard {
-
- /**
- * If not null, indicates that the wizard will initially jump to a specific connector page
- */
- private String repositoryType;
-
- protected TaskRepository repository;
-
- private SelectRepositoryClientPage selectRepositoryClientPage = new SelectRepositoryClientPage(this);
-
- protected AbstractRepositorySettingsPage abstractRepositorySettingsPage;
-
- protected AbstractRepositoryConnector repositoryConnector;
-
- protected AbstractRepositoryClientWizard() {
- this(null);
- }
-
- protected AbstractRepositoryClientWizard(String repositoryType) {
- this.repositoryType = repositoryType;
- setDefaultPageImageDescriptor(TasksUiImages.BANNER_REPOSITORY);
- }
-
- public void setRepositoryConnector(AbstractRepositoryConnector repositoryConnector) {
- this.repositoryConnector = repositoryConnector;
- }
-
- public AbstractRepositoryConnector getRepositoryConnector() {
- return repositoryConnector;
- }
-
- public TaskRepository getRepository() {
- return repository;
- }
-
- @Override
- public void addPages() {
- Collection<AbstractRepositoryConnector> connectors = TasksUiPlugin.getRepositoryManager()
- .getRepositoryConnectors();
- if (repositoryType != null || connectors.size() == 1) {
- AbstractRepositoryConnector connector = null;
- if (repositoryType != null) {
- connector = TasksUiPlugin.getRepositoryManager().getRepositoryConnector(repositoryType);
- } else {
- connector = connectors.toArray(new AbstractRepositoryConnector[1])[0];
- }
- setRepositoryConnector(connector);
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(connector.getConnectorKind());
- AbstractRepositorySettingsPage nextPage = connectorUi.getSettingsPage();
- setRepositorySettingsPage(nextPage);
- nextPage.setWizard(this);
- addPage(nextPage);
- } else {
- addPage(selectRepositoryClientPage);
- }
- }
-
- @Override
- public boolean canFinish() {
- return selectRepositoryClientPage.isPageComplete();
- }
-
- public void setRepositorySettingsPage(AbstractRepositorySettingsPage abstractRepositorySettingsPage) {
- this.abstractRepositorySettingsPage = abstractRepositorySettingsPage;
- }
-}
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 ab459c668..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.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @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/CloneTaskWizard.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/CloneTaskWizard.java
deleted file mode 100644
index 3a39ebe33..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/CloneTaskWizard.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.wizards;
-
-import org.eclipse.mylyn.internal.tasks.core.ITaskRepositoryFilter;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-
-/**
- * @author maarten
- */
-public class CloneTaskWizard extends MultiRepositoryAwareWizard {
- AbstractTask task;
-
- private static final String TITLE = "Clone Task ";
-
- public CloneTaskWizard(AbstractTask task) {
- super(new NewTaskPage(ITaskRepositoryFilter.CAN_CREATE_NEW_TASK), TITLE + task.getTaskKey());
- setNeedsProgressMonitor(true);
- this.task = task;
- }
-
-}
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 f8bdfc3eb..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 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/ContextAttachWizard.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ContextAttachWizard.java
deleted file mode 100644
index 3b4b91f21..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ContextAttachWizard.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.wizards;
-
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.mylyn.internal.tasks.ui.ContextUiUtil;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @author Rob Elves
- * @author Steffen Pingel
- */
-public class ContextAttachWizard extends Wizard {
-
- public static final String WIZARD_TITLE = "Attach context";
-
- private final TaskRepository repository;
-
- private final AbstractTask task;
-
- private ContextAttachWizardPage wizardPage;
-
- public ContextAttachWizard(AbstractTask task) {
- repository = TasksUiPlugin.getRepositoryManager().getRepository(task.getConnectorKind(),
- task.getRepositoryUrl());
- this.task = task;
- setWindowTitle(ContextRetrieveWizard.TITLE);
- setDefaultPageImageDescriptor(TasksUiImages.BANNER_REPOSITORY_CONTEXT);
- }
-
- @Override
- public void addPages() {
- wizardPage = new ContextAttachWizardPage(repository, task);
- addPage(wizardPage);
- super.addPages();
- }
-
- @Override
- public final boolean performFinish() {
- return ContextUiUtil.uploadContext(repository, task, wizardPage.getComment(), getContainer());
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ContextAttachWizardPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ContextAttachWizardPage.java
deleted file mode 100644
index 07c5d4e28..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ContextAttachWizardPage.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.wizards;
-
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.AbstractTask.RepositoryTaskSyncState;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.KeyListener;
-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
- */
-public class ContextAttachWizardPage extends WizardPage {
-
- private static final String DESCRIPTION = "Attaches local context to repository task";
-
- private TaskRepository repository;
-
- private AbstractTask task;
-
- private Text commentText;
-
- private boolean complete = true;
-
- protected ContextAttachWizardPage(TaskRepository repository, AbstractTask task) {
- super(ContextAttachWizard.WIZARD_TITLE);
- this.repository = repository;
- this.task = task;
- setDescription(DESCRIPTION);
- }
-
- public void createControl(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- composite.setLayout(new GridLayout());
-
- Text summary = new Text(composite, SWT.NONE);
- summary.setText("Task: " + task.getSummary());
- summary.setEditable(false);
- Text repositoryText = new Text(composite, SWT.NONE);
- repositoryText.setText("Repository: " + repository.getUrl());
- repositoryText.setEditable(false);
-
- new Label(composite, SWT.NONE).setText("Comment: ");
- commentText = new Text(composite, SWT.V_SCROLL | SWT.MULTI | SWT.BORDER | SWT.WRAP);
- commentText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
-
- commentText.addKeyListener(new KeyListener() {
- public void keyPressed(KeyEvent e) {
- getWizard().getContainer().updateButtons();
- }
-
- public void keyReleased(KeyEvent e) {
- getWizard().getContainer().updateButtons();
- }
- });
-
- setControl(composite);
-
- if (task.getSynchronizationState() != RepositoryTaskSyncState.SYNCHRONIZED) {
- setErrorMessage("Task must be synchronized before attaching context");
- complete = false;
- getWizard().getContainer().updateButtons();
- }
- commentText.setFocus();
- }
-
- public String getComment() {
- return commentText.getText();
- }
-
- @Override
- public boolean isPageComplete() {
- return complete;
-// if (commentText.getText().equals(""))
-// return false;
-// return super.isPageComplete();
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ContextRetrieveWizard.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ContextRetrieveWizard.java
deleted file mode 100644
index 9dc9e1e0e..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ContextRetrieveWizard.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.wizards;
-
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.mylyn.internal.tasks.ui.ContextUiUtil;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.RepositoryAttachment;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @author Rob Elves
- * @author Mik Kersten
- * @author Steffen Pingel
- */
-public class ContextRetrieveWizard extends Wizard {
-
- public static final String TITLE = "Task Repository";
-
- public static final String WIZARD_TITLE = "Retrieve context";
-
- private final TaskRepository repository;
-
- private final AbstractTask task;
-
- private ContextRetrieveWizardPage wizardPage;
-
- public ContextRetrieveWizard(AbstractTask task) {
- repository = TasksUiPlugin.getRepositoryManager().getRepository(task.getConnectorKind(),
- task.getRepositoryUrl());
- this.task = task;
- setWindowTitle(TITLE);
- setDefaultPageImageDescriptor(TasksUiImages.BANNER_REPOSITORY_CONTEXT);
- }
-
- @Override
- public void addPages() {
- wizardPage = new ContextRetrieveWizardPage(repository, task);
- addPage(wizardPage);
- super.addPages();
- }
-
- @Override
- public final boolean performFinish() {
- RepositoryAttachment attachment = wizardPage.getSelectedContext();
- return ContextUiUtil.downloadContext(task, attachment, getContainer());
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ContextRetrieveWizardPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ContextRetrieveWizardPage.java
deleted file mode 100644
index ac285e836..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ContextRetrieveWizardPage.java
+++ /dev/null
@@ -1,197 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.Collections;
-import java.util.Comparator;
-import java.util.Date;
-import java.util.List;
-
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskElementLabelProvider;
-import org.eclipse.mylyn.tasks.core.AbstractAttributeFactory;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.RepositoryAttachment;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskAttribute;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.swt.SWT;
-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.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.TableItem;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * @author Rob Elves
- * @author Mik Kersten
- */
-public class ContextRetrieveWizardPage extends WizardPage {
-
- private static final String DESCRIPTION = "Select a context to retrieve from table below.";
-
- private static final String COLUMN_COMMENT = "Description";
-
- private static final String COLUMN_AUTHOR = "Author";
-
- private static final String COLUMN_DATE = "Date";
-
- private TaskRepository repository;
-
- private AbstractTask task;
-
- private TaskElementLabelProvider labelProvider = new TaskElementLabelProvider(false);
-
- private RepositoryAttachment selectedContextAttachment = null;
-
- protected ContextRetrieveWizardPage(TaskRepository repository, AbstractTask task) {
- super(ContextAttachWizard.WIZARD_TITLE);
- this.repository = repository;
- this.task = task;
- setDescription(DESCRIPTION);
- }
-
- public void createControl(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- composite.setLayout(new GridLayout(1, false));
-
- Text summary = new Text(composite, SWT.NONE);
- summary.setText("Task: " + labelProvider.getText(task));
- summary.setEditable(false);
- // new Label(composite, SWT.NONE).setText("Repository: " +
- // repository.getUrl());
- // new Label(composite, SWT.NONE).setText("Select context below:");
-
- final Table contextTable = new Table(composite, SWT.FULL_SELECTION | SWT.BORDER);
- contextTable.setHeaderVisible(true);
- contextTable.setLinesVisible(true);
-
- contextTable.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent event) {
- if (contextTable.getSelectionIndex() > -1) {
- selectedContextAttachment = (RepositoryAttachment) contextTable.getItem(
- contextTable.getSelectionIndex()).getData();
- getWizard().getContainer().updateButtons();
- }
- }
- });
- contextTable.addMouseListener(new MouseListener() {
-
- public void mouseDoubleClick(MouseEvent e) {
- selectedContextAttachment = (RepositoryAttachment) contextTable.getItem(
- contextTable.getSelectionIndex()).getData();
- getWizard().getContainer().updateButtons();
- getWizard().performFinish();
- // TODO: is there a better way of closing?
- getWizard().getContainer().getShell().close();
- }
-
- public void mouseDown(MouseEvent e) {
- }
-
- public void mouseUp(MouseEvent e) {
- }
-
- });
-
- AbstractRepositoryConnector connector = TasksUiPlugin.getRepositoryManager().getRepositoryConnector(
- repository.getConnectorKind());
-
- List<RepositoryAttachment> contextAttachments = new ArrayList<RepositoryAttachment>();
- if (connector.getAttachmentHandler() != null) {
- contextAttachments = new ArrayList<RepositoryAttachment>(connector.getAttachmentHandler()
- .getContextAttachments(repository, task));
- }
-
- Collections.sort(contextAttachments, new Comparator<RepositoryAttachment>() {
-
- public int compare(RepositoryAttachment attachment1, RepositoryAttachment attachment2) {
- RepositoryTaskData data = TasksUiPlugin.getTaskDataManager().getNewTaskData(task.getRepositoryUrl(),
- task.getTaskId());
-
- AbstractAttributeFactory factory = null;
-
- Date created1 = null;
- Date created2 = null;
- if (data != null) {
- factory = data.getAttributeFactory();
- }
- if (factory != null) {
- created1 = factory.getDateForAttributeType(RepositoryTaskAttribute.ATTACHMENT_DATE,
- attachment1.getDateCreated());
- created2 = factory.getDateForAttributeType(RepositoryTaskAttribute.ATTACHMENT_DATE,
- attachment2.getDateCreated());
- }
-
- if (created1 != null && created2 != null) {
- return (-1) * created1.compareTo(created2);
- } else if (created1 == null && created2 != null) {
- return 1;
- } else if (created1 != null && created2 == null) {
- return -1;
- } else {
- return 0;
- }
- }
-
- });
-
- TableColumn[] columns = new TableColumn[3];
- columns[0] = new TableColumn(contextTable, SWT.LEFT);
- columns[0].setText(COLUMN_DATE);
- columns[1] = new TableColumn(contextTable, SWT.LEFT);
- columns[1].setText(COLUMN_AUTHOR);
- columns[2] = new TableColumn(contextTable, SWT.CENTER);
- columns[2].setText(COLUMN_COMMENT);
-
- for (RepositoryAttachment attachment : contextAttachments) {
- TableItem item = new TableItem(contextTable, SWT.NONE);
- item.setText(0, attachment.getDateCreated());
- item.setText(1, attachment.getCreator());
- item.setText(2, attachment.getDescription());
- item.setData(attachment);
- }
-
- for (int i = 0, n = columns.length; i < n; i++) {
- columns[i].pack();
- }
-
- contextTable.setLayoutData(new GridData(GridData.FILL_BOTH));
- setControl(composite);
- if (contextAttachments.size() > 0) {
- contextTable.setSelection(0);
- selectedContextAttachment = contextAttachments.get(0);
- getWizard().getContainer().updateButtons();
- }
- contextTable.setFocus();
- }
-
- public RepositoryAttachment getSelectedContext() {
- return selectedContextAttachment;
- }
-
- @Override
- public boolean isPageComplete() {
- if (selectedContextAttachment == null) {
- return false;
- }
- return super.isPageComplete();
- }
-
-}
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 7484d3464..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/EditRepositoryWizard.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.ui.wizards;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.ui.wizards.AbstractRepositorySettingsPage;
-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 = "Task Repository Settings";
-
- private AbstractRepositorySettingsPage abstractRepositorySettingsPage;
-
- private TaskRepository repository;
-
- public EditRepositoryWizard(TaskRepository repository) {
- super();
- this.repository = repository;
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(repository.getConnectorKind());
- abstractRepositorySettingsPage = connectorUi.getSettingsPage();
- abstractRepositorySettingsPage.setRepository(repository);
- abstractRepositorySettingsPage.setVersion(repository.getVersion());
- abstractRepositorySettingsPage.setWizard(this);
- 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.getUrl();
- String newUrl = abstractRepositorySettingsPage.getServerUrl();
- TasksUiPlugin.getTaskListManager().refactorRepositoryUrl(oldUrl, newUrl);
-
- repository.flushAuthenticationCredentials();
- repository.setUrl(newUrl);
- repository.setVersion(abstractRepositorySettingsPage.getVersion());
- repository.setCharacterEncoding(abstractRepositorySettingsPage.getCharacterEncoding());
- repository.setAuthenticationCredentials(abstractRepositorySettingsPage.getUserName(),
- abstractRepositorySettingsPage.getPassword());
- repository.setRepositoryLabel(abstractRepositorySettingsPage.getRepositoryLabel());
- repository.setAnonymous(abstractRepositorySettingsPage.isAnonymousAccess());
- repository.setHttpAuthenticationCredentials(abstractRepositorySettingsPage.getHttpAuthUserId(),
- abstractRepositorySettingsPage.getHttpAuthPassword());
-
- repository.setProperty(TaskRepository.PROXY_USEDEFAULT,
- String.valueOf(abstractRepositorySettingsPage.getUseDefaultProxy()));
- repository.setProperty(TaskRepository.PROXY_HOSTNAME, abstractRepositorySettingsPage.getProxyHostname());
- repository.setProperty(TaskRepository.PROXY_PORT, abstractRepositorySettingsPage.getProxyPort());
- repository.setProxyAuthenticationCredentials(abstractRepositorySettingsPage.getProxyUserName(),
- abstractRepositorySettingsPage.getProxyPassword());
-
- abstractRepositorySettingsPage.updateProperties(repository);
- TasksUiPlugin.getRepositoryManager().notifyRepositorySettingsChanged(repository);
- TasksUiPlugin.getRepositoryManager().saveRepositories(TasksUiPlugin.getDefault().getRepositoriesFilePath());
- return true;
- }
- return false;
- }
-
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- }
-
- @Override
- public void addPages() {
- addPage(abstractRepositorySettingsPage);
- }
-
- @Override
- public boolean canFinish() {
- return abstractRepositorySettingsPage.isPageComplete();
- }
-
- /** public for testing */
- public AbstractRepositorySettingsPage getSettingsPage() {
- return abstractRepositorySettingsPage;
- }
-
- 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 2b18f8690..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.internal.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/InputAttachmentSourcePage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/InputAttachmentSourcePage.java
deleted file mode 100644
index 4d60bb689..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/InputAttachmentSourcePage.java
+++ /dev/null
@@ -1,648 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 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> - layout tweaks
- * Jeff Pound <jeff.bagu@gmail.com> - modified for attachment input
- *******************************************************************************/
-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.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.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.events.ShellAdapter;
-import org.eclipse.swt.events.ShellEvent;
-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.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-import org.eclipse.ui.views.navigator.*;
-
-/**
- * A wizard to input the source of the attachment. This is a modified version of
- * org.eclipse.compare.internal.InputPatchPage.
- *
- * @author Jeff Pound
- */
-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;
-
- private ActivationListener activationListener = new ActivationListener();
-
- // 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 NewAttachmentWizard wizard;
-
- private String clipboardContents;
-
- private boolean initUseClipboard = false;
-
- class ActivationListener extends ShellAdapter {
- @Override
- public void shellActivated(ShellEvent e) {
- // allow error messages if the selected input actually has something
- // selected in it
- showError = true;
- switch (getInputMethod()) {
- case FILE:
- showError = (fileNameField.getText() != ""); //$NON-NLS-1$
- break;
-
- case WORKSPACE:
- showError = (!treeViewer.getSelection().isEmpty());
- break;
- }
- updateWidgetEnablements();
- }
- }
-
- public InputAttachmentSourcePage(NewAttachmentWizard wizard) {
- super("InputAttachmentPage");
- this.wizard = wizard;
- setTitle("Select source");
- setDescription("Clipboard contents are for text attachments only.");
- // setMessage("Please select the source for the attachment");
- }
-
- /*
- * 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();
- updateWidgetEnablements();
-
- Shell shell = getShell();
- shell.addShellListener(activationListener);
-
- Dialog.applyDialogFont(composite);
-
- }
-
- @Override
- public IWizardPage getNextPage() {
- if (getInputMethod() == SCREENSHOT) {
- return wizard.getPage("ScreenShotAttachment");
- } else
- return wizard.getNextPage(this);
- }
-
- /*
- * (non-JavaDoc) Method declared in IWizardPage.
- */
- @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));
-
- // 1st row
- GridData 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);
-
- // 2nd row
- gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- gd.horizontalSpan = 3;
- useScreenshotButton = new Button(composite, SWT.RADIO);
- useScreenshotButton.setText("Screenshot");
- useScreenshotButton.setLayoutData(gd);
-
- // 3rd row
- 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(wizard.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);
-
- // 4th 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;
- int state = getInputMethod();
- setEnableAttachmentFile(state == FILE);
- setEnableWorkspaceAttachment(state == WORKSPACE);
- 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$
- int state = getInputMethod();
- setEnableAttachmentFile(state == FILE);
- setEnableWorkspaceAttachment(state == WORKSPACE);
- 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());
- int state = getInputMethod();
- setEnableAttachmentFile(state == FILE);
- setEnableWorkspaceAttachment(state == WORKSPACE);
- 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) {
- wizard.showPage(getNextPage());
- }
- }
- }
- }
- });
-
- useFileButton.setSelection(!initUseClipboard);
- setEnableWorkspaceAttachment(false);
- }
-
- @SuppressWarnings("deprecation")
- 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.setSorter(new ResourceSorter(ResourceSorter.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);
- wizard.getAttachment().setFilePath(getAbsoluteAttachmentPath());
-
- if (showError) {
- setErrorMessage(error);
- }
- }
-
- /**
- * 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;
- }
-
- private String getAttachmentFilePath() {
- if (fileNameField != null) {
- return fileNameField.getText();
- }
- return wizard.getAttachment().getFilePath();
- }
-
- 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 (int i = 0; i < s.length; i++) {
- IResource resource = null;
- Object o = s[i];
- 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 (int k = 0; k < travs.length; k++) {
- IResource[] resources = travs[k].getResources();
- for (int j = 0; j < resources.length; j++) {
- if (type.isInstance(resources[j]) && resources[j].isAccessible())
- tmp.add(resources[j]);
- }
- }
- }
- } 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;
- }
-
-}
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 1f1970e10..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.internal.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 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 b085b24bc..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewAttachmentPage.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.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.tasks.core.LocalAttachment;
-import org.eclipse.mylyn.internal.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
- */
-public class NewAttachmentPage extends WizardPage {
-
- private LocalAttachment attachment;
-
- private Text filePath;
-
- private Text attachmentDesc;
-
- private Text attachmentComment;
-
- private Button isPatchButton;
-
- private Button attachContextButton;
-
- private Combo contentTypeList;
-
- 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("Provide a summary 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));
-
- 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(TasksUiImages.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 ("".equals(attachmentDesc.getText())) {
- thisPage.setErrorMessage("Description required");
- } else {
- if (!"".equals(filePath.getText())) {
- thisPage.setPageComplete(true);
- thisPage.setErrorMessage(null);
- }
- }
- }
- });
-
- filePath.setText(attachment.getFilePath());
-
- /* 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);
- }
- }
- });
- }
-
- @Override
- public boolean isPageComplete() {
- return !"".equals(filePath.getText().trim()) && !"".equals(attachmentDesc.getText().trim());
- }
-
- public void populateAttachment() {
- attachment.setDescription(attachmentDesc.getText());
- attachment.setComment(attachmentComment.getText());
- }
-
- public LocalAttachment getAttachment() {
- return attachment;
- }
-
- @Override
- public boolean canFlipToNextPage() {
- if (filePath.getText().equals(InputAttachmentSourcePage.SCREENSHOT_LABEL))
- return false;
- return isPageComplete();
- }
-
- 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;
- }
- }
- }
-
-}
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 9ac1cd560..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewAttachmentWizard.java
+++ /dev/null
@@ -1,327 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.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.wizard.IWizardPage;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.mylyn.context.core.ContextCorePlugin;
-import org.eclipse.mylyn.internal.tasks.core.LocalAttachment;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryTaskHandleUtil;
-import org.eclipse.mylyn.internal.tasks.ui.ITasksUiConstants;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractAttachmentHandler;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.RepositoryStatus;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.AbstractTask.RepositoryTaskSyncState;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractRepositoryTaskEditorInput;
-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.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.
- *
- * @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 InputAttachmentSourcePage inputPage;
-
- private NewAttachmentPage attachPage;
-
- private NewAttachmentWizardDialog dialog;
-
- private ScreenShotAttachmentPage shotPage;
-
- private boolean hasNewDialogSettings;
-
- private TaskRepository repository;
-
- private AbstractTask task;
-
- public NewAttachmentWizard(TaskRepository repository, AbstractTask task) {
- super();
- this.task = task;
- this.repository = repository;
- setNeedsProgressMonitor(true);
- setWindowTitle("Add Attachment");
- setDefaultPageImageDescriptor(TasksUiImages.BANNER_REPOSITORY);
- attachment = new LocalAttachment();
- attachment.setFilePath("");
- inputPage = new InputAttachmentSourcePage(this);
-
- 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, File attachFile) {
- this(repository, task);
- attachment.setFilePath(attachFile.getAbsolutePath());
- }
-
- public NewAttachmentWizard(TaskRepository repository, AbstractTask task, String attachContents) {
- this(repository, task);
- inputPage.setUseClipboard(true);
- inputPage.setClipboardContents(attachContents);
- attachment.setFilePath(InputAttachmentSourcePage.CLIPBOARD_LABEL);
- }
-
- @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 AbstractRepositoryConnector connector = TasksUiPlugin.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(RepositoryTaskSyncState.OUTGOING);
-
- 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 if (InputAttachmentSourcePage.SCREENSHOT_LABEL.equals(path)) {
- Image image = shotPage.getScreenshotImage();
- if (image == null) {
- throw new InvocationTargetException(new CoreException(new RepositoryStatus(IStatus.ERROR,
- TasksUiPlugin.ID_PLUGIN, RepositoryStatus.ERROR_INTERNAL, "Screenshot is empty",
- null)));
- }
- String path = TasksUiPlugin.getDefault().getDefaultDataDirectory();
- ImageLoader loader = new ImageLoader();
- loader.data = new ImageData[] { image.getImageData() };
- String fileName = path + "/" + SCREENSHOT_FILENAME;
- loader.save(fileName, SWT.IMAGE_JPEG);
- attachment.setFile(new File(fileName));
- attachment.setFilename(SCREENSHOT_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) {
- connector.getAttachmentHandler().attachContext(repository, task, "",
- new SubProgressMonitor(monitor, 1));
- }
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
-
- }
-
- };
-
- try {
- getContainer().run(true, true, op);
-
- TasksUiPlugin.getSynchronizationManager().synchronize(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(),
- ITasksUiConstants.TITLE_DIALOG, event.getResult().getMessage());
-
- }
- forceRefreshInplace(task);
- }
- });
- }
- });
-
- } catch (InvocationTargetException e1) {
- task.setSubmitting(false);
- task.setSynchronizationState(RepositoryTaskSyncState.SYNCHRONIZED);
- if (e1.getCause() != null && e1.getCause() instanceof CoreException) {
- handleSubmitError((CoreException) e1.getCause());
-
- } else {
- StatusHandler.fail(e1, "Attachment failure", true);
- }
- return false;
- } catch (InterruptedException e1) {
- task.setSubmitting(false);
- task.setSynchronizationState(RepositoryTaskSyncState.SYNCHRONIZED);
- }
-
- return true;
- }
-
- /**
- * If task is open, force inplace refresh Must be called from UI thread.
- */
- public static boolean forceRefreshInplace(AbstractTask task) {
- if (task != null) {
- String handleTarget = task.getHandleIdentifier();
- for (TaskEditor editor : TasksUiUtil.getActiveRepositoryTaskEditors()) {
- if (editor.getEditorInput() instanceof AbstractRepositoryTaskEditorInput) {
- AbstractRepositoryTaskEditorInput input = (AbstractRepositoryTaskEditorInput) editor.getEditorInput();
- if (input.getTaskData() != null) {
- String handle = RepositoryTaskHandleUtil.getHandle(input.getTaskData().getRepositoryUrl(),
- input.getTaskData().getId());
- 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) == MessageDialog.OK) {
- // performFinish();
- }
- } else {
- StatusHandler.displayStatus("Attachment failed", exception.getStatus());
- }
- }
-
- protected boolean hasContext() {
- return ContextCorePlugin.getContextManager().hasContext(task.getHandleIdentifier());
- }
-
- @Override
- public boolean canFinish() {
- return attachPage.isPageComplete();
- }
-
- @Override
- public void addPages() {
- super.addPages();
- if ("".equals(attachment.getFilePath())) {
- addPage(inputPage);
- }
- addPage((attachPage = new NewAttachmentPage(attachment)));
- addPage((shotPage = new ScreenShotAttachmentPage(attachment)));
- }
-
- 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 abff505bc..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewAttachmentWizardDialog.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.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.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) {
- super(parent, wizard);
-
- setShellStyle(getShellStyle() | SWT.RESIZE);
- setMinimumPageSize(600, 300);
- setPageSize(600, 300);
- }
-
- @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 aa5a528c1..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewLocalTaskWizard.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.wizards;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.ui.INewWizard;
-import org.eclipse.ui.IWorkbench;
-
-/**
- * @author Rob Elves
- */
-public class NewLocalTaskWizard extends Wizard implements INewWizard {
-
- public NewLocalTaskWizard() {
- setDefaultPageImageDescriptor(TasksUiImages.BANNER_REPOSITORY);
- setNeedsProgressMonitor(true);
- }
-
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- setForcePreviousAndNextButtons(false);
- }
-
- @Override
- public void addPages() {
- // ignore
- }
-
- @Override
- public boolean canFinish() {
- return true;
- }
-
- @Override
- public boolean performFinish() {
- AbstractTask task = TasksUiPlugin.getTaskListManager().createNewLocalTask(null);
- if (task != null) {
- TasksUiUtil.openEditor(task, true);
- 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 80a76e2e4..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.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @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 93b2ab590..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewRepositoryWizard.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.wizards;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.mylyn.internal.tasks.ui.actions.AddRepositoryAction;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.ui.wizards.AbstractRepositorySettingsPage;
-import org.eclipse.ui.IWorkbench;
-
-/**
- * @author Mik Kersten
- */
-public class NewRepositoryWizard extends AbstractRepositoryClientWizard {
-
- public NewRepositoryWizard() {
- this(null);
- }
-
- public NewRepositoryWizard(String repositoryType) {
- super(repositoryType);
- setForcePreviousAndNextButtons(true);
- setNeedsProgressMonitor(true);
- setWindowTitle(AddRepositoryAction.TITLE);
- }
-
- @Override
- public boolean performFinish() {
- if (canFinish()) {
- repository = abstractRepositorySettingsPage.createTaskRepository();
- abstractRepositorySettingsPage.updateProperties(repository);
- TasksUiPlugin.getRepositoryManager().addRepository(repository,
- TasksUiPlugin.getDefault().getRepositoriesFilePath());
- return true;
- }
- return false;
- }
-
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- }
-
- @Override
- public void setRepositorySettingsPage(AbstractRepositorySettingsPage abstractRepositorySettingsPage) {
- this.abstractRepositorySettingsPage = abstractRepositorySettingsPage;
- }
-
- @Override
- public boolean canFinish() {
- return super.canFinish() && abstractRepositorySettingsPage != null
- && abstractRepositorySettingsPage.isPageComplete();
- }
-}
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 ce01b9bce..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewTaskPage.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.wizards;
-
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.mylyn.internal.tasks.core.ITaskRepositoryFilter;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @author Mik Kersten
- * @author Eugene Kuleshov
- */
-public class NewTaskPage extends SelectRepositoryPage {
-
- public NewTaskPage(ITaskRepositoryFilter taskRepositoryFilter) {
- super(taskRepositoryFilter);
- }
-
- @Override
- protected IWizard createWizard(TaskRepository taskRepository) {
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(taskRepository.getConnectorKind());
- return connectorUi.getNewTaskWizard(taskRepository); // TODO remove unused parameter
- }
-
-}
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 e4659cbff..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewTaskWizard.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.wizards;
-
-import org.eclipse.mylyn.internal.tasks.core.ITaskRepositoryFilter;
-
-/**
- * @author Mik Kersten
- * @author Eugene Kuleshov
- * @author Steffen Pingel
- */
-public class NewTaskWizard extends MultiRepositoryAwareWizard {
-
- private static final String TITLE = "New Task";
-
- public NewTaskWizard() {
- super(new NewTaskPage(ITaskRepositoryFilter.CAN_CREATE_NEW_TASK), TITLE);
- setNeedsProgressMonitor(true);
- }
-
-}
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 ced19fade..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewWebTaskPage.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.wizards;
-
-import org.eclipse.jface.wizard.WizardPage;
-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() {
- 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.");
- }
-
- 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 e810e2c6b..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/PreviewAttachmentPage.java
+++ /dev/null
@@ -1,215 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.util.HashMap;
-
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.jface.layout.GridLayoutFactory;
-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 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 (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/ScreenShotAttachmentPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ScreenShotAttachmentPage.java
deleted file mode 100644
index c573de019..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ScreenShotAttachmentPage.java
+++ /dev/null
@@ -1,425 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.layout.GridDataFactory;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.mylyn.internal.tasks.core.LocalAttachment;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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.MouseEvent;
-import org.eclipse.swt.events.MouseListener;
-import org.eclipse.swt.events.MouseMoveListener;
-import org.eclipse.swt.events.PaintEvent;
-import org.eclipse.swt.events.PaintListener;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Cursor;
-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.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.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * A wizard page to create a screenshot from the display.
- *
- * @author Balazs Brinkus (bug 160572)
- */
-public class ScreenShotAttachmentPage extends WizardPage {
-
- private ScreenShotAttachmentPage page;
-
- private LocalAttachment attachment;
-
- private Button captureButton;
-
- private Button fitButton;
-
- private Image screenshotImage;
-
- private Canvas canvas;
-
- private ScrolledComposite scrolledComposite;
-
- private Rectangle cropRegionBounds;
-
- private boolean isCropFit;
-
- private boolean isCropActive;
-
- private Rectangle displayBounds;
-
- private Rectangle scrolledBounds;
-
- protected ScreenShotAttachmentPage(LocalAttachment attachment) {
- super("ScreenShotAttachment");
- setTitle("Create Screenshot");
- setDescription("After capturing the screenshot, drag the mouse to crop.");
- this.attachment = attachment;
- this.page = this;
- }
-
- public void createControl(Composite parent) {
-
- Composite composite = new Composite(parent, SWT.NONE);
- composite.setLayout(new GridLayout());
- setControl(composite);
-
- Composite buttonsComposite = new Composite(composite, SWT.NONE);
- buttonsComposite.setLayout(new GridLayout(2, false));
- captureButton = new Button(buttonsComposite, SWT.PUSH);
- captureButton.setText("Capture");
- captureButton.setImage(TasksUiPlugin.imageDescriptorFromPlugin(TasksUiPlugin.ID_PLUGIN,
- "icons/etool16/capture-screen.png").createImage());
- captureButton.addSelectionListener(new SelectionListener() {
-
- public void widgetSelected(SelectionEvent e) {
- storeScreenshotContent();
- page.setErrorMessage(null);
- fitButton.setEnabled(true);
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- //ignore
- }
-
- });
-
- fitButton = new Button(buttonsComposite, SWT.TOGGLE);
- fitButton.setText("Fit Image");
- fitButton.setImage(TasksUiPlugin.imageDescriptorFromPlugin(TasksUiPlugin.ID_PLUGIN, "icons/etool16/capture-fit.png")
- .createImage());
- fitButton.addSelectionListener(new SelectionListener() {
-
- public void widgetSelected(SelectionEvent e) {
- drawCanvas();
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- // ignore
- }
-
- });
- fitButton.setSelection(true);
- fitButton.setEnabled(false);
- isCropFit = true;
- isCropActive = false;
-
- scrolledComposite = new ScrolledComposite(composite, SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
- scrolledComposite.setLayoutData(GridDataFactory.fillDefaults()
- .align(SWT.FILL, SWT.FILL)
- .grab(true, true)
- .create());
-
- canvas = new Canvas(scrolledComposite, SWT.DOUBLE_BUFFERED | SWT.NONE);
- scrolledComposite.setContent(canvas);
- canvas.addPaintListener(new PaintListener() {
- public void paintControl(PaintEvent e) {
- if (screenshotImage != null) {
- Rectangle imageBounds = screenshotImage.getBounds();
- Rectangle canvasBounds = canvas.getBounds();
-
- if (fitButton.getSelection())
- e.gc.drawImage(screenshotImage, 0, 0, imageBounds.width, imageBounds.height, 0, 0,
- canvasBounds.width, canvasBounds.height);
- else
- e.gc.drawImage(screenshotImage, 0, 0);
-
- if (cropRegionBounds != null)
- drawRegion(e.gc);
-
- } else {
- page.setErrorMessage("Screenshot required");
- fitButton.setEnabled(false);
- }
- }
- });
-
- scrolledComposite.addControlListener(new ControlAdapter() {
- @Override
- public void controlResized(ControlEvent e) {
- drawCanvas();
- }
- });
-
- canvas.addMouseMoveListener(new MouseMoveListener() {
- public void mouseMove(MouseEvent e) {
- if (!isCropActive && screenshotImage != null) {
- drawCanvas();
- cropScreenshotContent();
- }
- }
- });
-
- }
-
- @Override
- public boolean isPageComplete() {
- if (screenshotImage == null)
- return false;
- return true;
- }
-
- @Override
- public IWizardPage getNextPage() {
- NewAttachmentPage page = (NewAttachmentPage) getWizard().getPage("AttachmentDetails");
- attachment.setContentType("image/jpeg");
- page.setFilePath(InputAttachmentSourcePage.SCREENSHOT_LABEL);
- page.setContentType();
- getCropScreenshot();
- return page;
- }
-
- @Override
- public boolean canFlipToNextPage() {
- return isPageComplete();
- }
-
- private void storeScreenshotContent() {
-
- final Display display = Display.getDefault();
- final Shell wizardShell = getWizard().getContainer().getShell();
- wizardShell.setVisible(false);
- isCropFit = fitButton.getSelection();
-
- display.asyncExec(new Runnable() {
- public void run() {
- GC gc = new GC(display);
- Rectangle displayBounds = display.getBounds();
- screenshotImage = new Image(display, displayBounds);
- gc.copyArea(screenshotImage, 0, 0);
- gc.drawRectangle(0, 0, displayBounds.width - 1, displayBounds.height - 1);
- gc.dispose();
- drawCanvas();
- wizardShell.setVisible(true);
- if (screenshotImage != null)
- setPageComplete(true);
- }
- });
- }
-
- private void cropScreenshotContent() {
-
- final Point downPoint = new Point(-1, -1);
-
- final Display display = Display.getDefault();
-
- final Rectangle originalBounds = screenshotImage.getBounds();
-
- final GC cropRegionGC = new GC(canvas);
-
- isCropActive = true;
-
- final MouseMoveListener mouseMoveListener = new MouseMoveListener() {
- public void mouseMove(MouseEvent e) {
- if (downPoint.x != -1 && downPoint.y != -1) {
- int width = e.x - downPoint.x;
- int height = e.y - downPoint.y;
- canvas.redraw();
- cropRegionGC.drawRectangle(downPoint.x, downPoint.y, width, height);
- }
- }
- };
-
- final MouseListener mouseListener = new MouseListener() {
- public void mouseUp(MouseEvent e) {
- if (downPoint.x != -1 && downPoint.y != -1) {
-
- if (downPoint.x > e.x) {
- int x = downPoint.x;
- downPoint.x = e.x;
- e.x = x;
- }
- if (downPoint.y > e.y) {
- int y = downPoint.y;
- downPoint.y = e.y;
- e.y = y;
- }
-
- isCropActive = false;
-
- int width;
- if (e.x > originalBounds.width) {
- width = originalBounds.width - downPoint.x;
- } else if (e.x < 0) {
- width = downPoint.x;
- downPoint.x = 0;
- } else {
- width = e.x - downPoint.x;
- }
-
- int height;
- if (e.y > originalBounds.height) {
- height = originalBounds.height - downPoint.y;
- } else if (e.y < 0) {
- height = downPoint.y;
- downPoint.y = 0;
- } else {
- height = e.y - downPoint.y;
- }
-
- display.getActiveShell().setCursor(new Cursor(null, SWT.CURSOR_ARROW));
-
- if (width == 0 || height == 0)
- cropRegionBounds = null;
- else
- cropRegionBounds = new Rectangle(downPoint.x, downPoint.y, width, height);
-
- canvas.removeMouseMoveListener(mouseMoveListener);
- canvas.removeMouseListener(this);
- downPoint.x = -1;
- downPoint.y = -1;
-
- cropRegionGC.dispose();
-
- drawCanvas();
- }
- }
-
- public void mouseDown(MouseEvent e) {
- if (downPoint.x == -1 && downPoint.y == -1) {
- cropRegionBounds = null;
- isCropFit = fitButton.getSelection();
- display.getActiveShell().setCursor(new Cursor(null, SWT.CURSOR_CROSS));
- downPoint.x = e.x;
- downPoint.y = e.y;
- canvas.addMouseMoveListener(mouseMoveListener);
- }
- }
-
- public void mouseDoubleClick(MouseEvent e) {
- // ignore
- }
- };
-
- canvas.addMouseListener(mouseListener);
-
- }
-
- private void drawCanvas() {
- if (fitButton.getSelection()) {
- Rectangle bounds = scrolledComposite.getBounds();
- bounds.x = 0;
- bounds.y = 0;
- bounds.width -= 5;
- bounds.height -= 5;
- canvas.setBounds(bounds);
- } else {
- canvas.setBounds(screenshotImage.getBounds());
- }
- scrolledComposite.redraw();
- canvas.redraw();
- }
-
- private void drawRegion(GC gc) {
-
- Rectangle displayBounds = Display.getDefault().getBounds();
- Rectangle bounds = scrolledComposite.getBounds();
- bounds.width -= 5;
- bounds.height -= 5;
-
- double ratioX = (double) displayBounds.width / (double) bounds.width;
- double ratioY = (double) displayBounds.height / (double) bounds.height;
-
- Rectangle newCropRegion = new Rectangle(0, 0, 0, 0);
-
- if (isCropFit && !fitButton.getSelection()) {
- newCropRegion.x = (int) (cropRegionBounds.x * ratioX);
- newCropRegion.width = (int) (cropRegionBounds.width * ratioX);
- newCropRegion.y = (int) (cropRegionBounds.y * ratioY);
- newCropRegion.height = (int) (cropRegionBounds.height * ratioY);
- } else if (!isCropFit && fitButton.getSelection()) {
- newCropRegion.x = (int) (cropRegionBounds.x / ratioX);
- newCropRegion.width = (int) (cropRegionBounds.width / ratioX);
- newCropRegion.y = (int) (cropRegionBounds.y / ratioY);
- newCropRegion.height = (int) (cropRegionBounds.height / ratioY);
- } else {
- newCropRegion = cropRegionBounds;
- }
-
- Rectangle topRegionBounds = new Rectangle(0, 0, displayBounds.width, newCropRegion.y);
- int bottomRegionY = newCropRegion.y + newCropRegion.height;
- int bottomRegionHeight = displayBounds.height - bottomRegionY;
- Rectangle bottomRegionBounds = new Rectangle(0, bottomRegionY, displayBounds.width, bottomRegionHeight);
- Rectangle leftRegionBounds = new Rectangle(0, newCropRegion.y, newCropRegion.x, newCropRegion.height);
- int rightRegionX = newCropRegion.x + newCropRegion.width;
- int rightRegionWidth = displayBounds.width - rightRegionX;
- Rectangle rightRegionBounds = new Rectangle(rightRegionX, newCropRegion.y, rightRegionWidth,
- newCropRegion.height);
-
- gc.setLineStyle(SWT.LINE_DASH);
- gc.setAdvanced(true);
- gc.setAlpha(200);
-
- gc.fillRectangle(topRegionBounds);
- gc.fillRectangle(bottomRegionBounds);
- gc.fillRectangle(leftRegionBounds);
- gc.fillRectangle(rightRegionBounds);
-
- gc.drawRectangle(newCropRegion);
- }
-
- private Image getCropScreenshot() {
- displayBounds = null;
- scrolledBounds = null;
-
- if (cropRegionBounds == null)
- return screenshotImage;
-
- Rectangle bounds;
- if (!isCropFit) {
- bounds = cropRegionBounds;
- } else {
- bounds = new Rectangle(0, 0, 0, 0);
- PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
-
- public void run() {
- displayBounds = Display.getDefault().getBounds();
- scrolledBounds = scrolledComposite.getBounds();
- }
- });
-
- if (displayBounds == null) {
- return null;
- } else {
- double ratioX = (double) displayBounds.width / (double) scrolledBounds.width;
- double ratioY = (double) displayBounds.height / (double) scrolledBounds.height;
- bounds.x = (int) (cropRegionBounds.x * ratioX);
- bounds.width = (int) (cropRegionBounds.width * ratioX);
- bounds.y = (int) (cropRegionBounds.y * ratioY);
- bounds.height = (int) (cropRegionBounds.height * ratioY);
- }
- }
-
- Image image = new Image(Display.getDefault(), bounds);
- GC gc = new GC(image);
- gc.drawImage(screenshotImage, bounds.x, bounds.y, bounds.width, bounds.height, 0, 0, bounds.width,
- bounds.height);
- gc.drawRectangle(0, 0, bounds.width - 1, bounds.height - 1);
- gc.dispose();
-
- return image;
- }
-
- public Image getScreenshotImage() {
- return getCropScreenshot();
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/SelectRepositoryClientPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/SelectRepositoryClientPage.java
deleted file mode 100644
index 403a39f95..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/SelectRepositoryClientPage.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.IWizardPage;
-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.AbstractRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.ui.wizards.AbstractRepositorySettingsPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * @author Mik Kersten
- */
-public class SelectRepositoryClientPage 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 AbstractRepositoryClientWizard wizard;
-
- 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 : TasksUiPlugin.getRepositoryManager().getRepositoryConnectors()) {
- if (connector.isUserManaged()) {
- userManagedRepositories.add(connector);
- }
- }
-
- return userManagedRepositories.toArray();
- }
- }
-
- public SelectRepositoryClientPage(AbstractRepositoryClientWizard wizard) {
- super(TITLE);
- setTitle(TITLE);
- setDescription(DESCRIPTION);
- this.wizard = wizard;
- super.setWizard(wizard);
- }
-
- @Override
- public boolean canFlipToNextPage() {
- return wizard.getRepositoryConnector() != 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(TasksUiPlugin.getRepositoryManager().getRepositoryConnectors());
- viewer.addSelectionChangedListener(new ISelectionChangedListener() {
-
- public void selectionChanged(SelectionChangedEvent event) {
- IStructuredSelection selection = (IStructuredSelection) event.getSelection();
- if (selection.getFirstElement() instanceof AbstractRepositoryConnector) {
- wizard.setRepositoryConnector((AbstractRepositoryConnector) selection.getFirstElement());
- SelectRepositoryClientPage.this.setPageComplete(true);
- wizard.getContainer().updateButtons();
- }
- }
-
- });
-
- viewer.addOpenListener(new IOpenListener() {
- public void open(OpenEvent event) {
- getContainer().showPage(getNextPage());
- }
- });
-
- setControl(container);
- }
-
- @Override
- public IWizardPage getNextPage() {
- if (isPageComplete()) {
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(wizard.getRepositoryConnector()
- .getConnectorKind());
-
- AbstractRepositorySettingsPage nextPage = connectorUi.getSettingsPage();
- wizard.setRepositorySettingsPage(nextPage);
- nextPage.setWizard(wizard);
- return nextPage;
- } else {
- return super.getNextPage();
- }
- }
-}
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 188c3bab5..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/SelectRepositoryPage.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.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.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.core.TaskRepositoryManager;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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();
-
- 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) {
- action.run();
- SelectRepositoryPage.this.repositories = getTaskRepositories();
- viewer.setInput(TasksUiPlugin.getRepositoryManager().getRepositoryConnectors());
- }
- });
-
- 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(TasksUiPlugin.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 = TasksUiPlugin.getRepositoryManager().getRepository(
- LocalRepositoryConnector.REPOSITORY_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);
- 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.getUrl().equals(that.repository.getUrl());
- }
-
- @Override
- public int hashCode() {
- return 31 * this.repository.getUrl().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/TaskDataExportWizard.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataExportWizard.java
deleted file mode 100644
index 685dbc2a6..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataExportWizard.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.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.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.context.core.ContextCorePlugin;
-import org.eclipse.mylyn.internal.context.core.InteractionContextManager;
-import org.eclipse.mylyn.internal.tasks.ui.ITasksUiConstants;
-import org.eclipse.mylyn.internal.tasks.ui.util.TaskDataExportJob;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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.getTaskListManager().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 Exception("File Export Exception"),
- "Could not export data because specified location does not exist or is not a folder", true);
- return false;
- }
-
- final File destTaskListFile = new File(destDir + File.separator + ITasksUiConstants.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 (AbstractTask task : taskContextsToExport) {
- File contextFile = ContextCorePlugin.getContextManager().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);
- TaskDataExportJob job = new TaskDataExportJob(exportPage.getDestinationDirectory(),
- exportPage.exportTaskList(), exportPage.exportActivationHistory(), exportPage.exportTaskContexts(),
- exportPage.zip(), destZipFile.getName(), taskContextsToExport);
- IProgressService service = PlatformUI.getWorkbench().getProgressService();
-
- try {
- service.run(true, false, job);
- } catch (InvocationTargetException e) {
- StatusHandler.fail(e, "Could not export files", true);
- } catch (InterruptedException e) {
- StatusHandler.fail(e, "Could not export files", true);
- }
-
- 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 ede8df608..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataExportWizardPage.java
+++ /dev/null
@@ -1,293 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.WizardPage;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.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;
-
-/**
- * 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, TasksUiPlugin.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(e, "Could not create export wizard page", true);
- }
- }
-
- /**
- * 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 56cdc181e..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataImportWizard.java
+++ /dev/null
@@ -1,240 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.IProgressMonitor;
-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.internal.context.core.InteractionContextManager;
-import org.eclipse.mylyn.internal.monitor.core.util.ZipFileUtil;
-import org.eclipse.mylyn.internal.tasks.ui.ITasksUiConstants;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.TaskList;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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() {
-
- TasksUiPlugin.getTaskListManager().deactivateTask(
- TasksUiPlugin.getTaskListManager().getTaskList().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(ITasksUiConstants.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(e, "Could not import files", true);
- }
-
- FileCopyJob job = new FileCopyJob(sourceDirFile, sourceZipFile, sourceTaskListFile, sourceRepositoriesFile,
- sourceActivationHistoryFile, contextFiles, zipFilesToExtract);
-
- IProgressService service = PlatformUI.getWorkbench().getProgressService();
-
- try {
- service.run(true, false, job);
- } catch (InvocationTargetException e) {
- StatusHandler.fail(e, "Could not import files", true);
- } catch (InterruptedException e) {
- StatusHandler.fail(e, "Could not import files", true);
- }
-
- 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 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
-
- monitor.beginTask(JOB_LABEL, zipEntriesToExtract.size() + 2);
-
- try {
- ZipFileUtil.extactEntries(sourceZipFile, zipEntriesToExtract, TasksUiPlugin.getDefault()
- .getDataDirectory());
- //ZipFileUtil.unzipFiles(sourceZipFile, TasksUiPlugin.getDefault().getDataDirectory());
-
- } catch (IOException ioe) {
- StatusHandler.fail(new Exception("Import Exception"), "Problem occured extracting from zip file.", true);
- return;
- }
- readTaskListData();
- monitor.done();
- return;
-
- }
- }
-
- /** Returns all tasks in the task list root or a category in the task list */
- protected List<AbstractTask> getAllTasks() {
- List<AbstractTask> allTasks = new ArrayList<AbstractTask>();
- TaskList taskList = TasksUiPlugin.getTaskListManager().getTaskList();
-
- allTasks.addAll(taskList.getDefaultCategory().getChildren());
-
- for (AbstractTaskContainer category : taskList.getCategories()) {
- allTasks.addAll(category.getChildren());
- }
-
- return allTasks;
- }
-
- private void readTaskListData() {
- PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
- public void run() {
- TasksUiPlugin.getDefault().reloadDataDirectory(true);
- }
- });
- }
-
-}
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 45aacd533..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataImportWizardPage.java
+++ /dev/null
@@ -1,387 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.ArrayList;
-import java.util.Arrays;
-import java.util.Comparator;
-
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.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;
-
-/**
- * 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, TasksUiPlugin.imageDescriptorFromPlugin(
- TasksUiPlugin.ID_PLUGIN, "icons/wizban/banner-import.gif"));
- setPageComplete(false);
- setDescription(DESCRIPTION);
- setImageDescriptor(TasksUiImages.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);
- createImportBackupControl(container);
- addRadioListeners();
- initSettings();
- setControl(container);
- setPageComplete(validate());
- } catch (RuntimeException e) {
- StatusHandler.fail(e, "Could not create import wizard page", true);
- }
- }
-
- 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 createImportBackupControl(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);
-
- String destination = TasksUiPlugin.getDefault().getBackupFolderPath();
-
- File backupFolder = new File(destination);
- ArrayList<File> backupFiles = new ArrayList<File>();
- if (backupFolder.exists()) {
- File[] files = backupFolder.listFiles();
- for (File file : files) {
- if (file.getName().startsWith(TaskDataExportWizard.ZIP_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 (File file : backupFileArray) {
- TableItem item = new TableItem(backupFilesTable, SWT.NONE);
- item.setData(file.getAbsolutePath());
- item.setText(DateFormat.getDateTimeInstance().format(file.lastModified()));
- }
- }
-
- 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 b63987717..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.tasks.core.AbstractTaskContainer;
-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) {
- AbstractTaskContainer container = (AbstractTaskContainer) 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 e01998ed3..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/workingsets/TaskWorkingSetElementAdapter.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.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.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 (int i = 0; i < elements.length; i++) {
- IAdaptable adaptable = elements[i];
- 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 99c2f7ca9..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/workingsets/TaskWorkingSetElementFactory.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.workingsets;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.tasks.core.TaskList;
-import org.eclipse.mylyn.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";
-
- 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.getTaskListManager().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("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 194d70a38..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/workingsets/TaskWorkingSetPage.java
+++ /dev/null
@@ -1,454 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.TaskArchive;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskElementLabelProvider;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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 tree;
-
- private IWorkingSet workingSet;
-
- private boolean firstCheck = false;
-
- class ElementCategory extends PlatformObject implements IWorkbenchAdapter {
-
- private String label;
-
- private 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 TaskElementLabelProvider taskProvider = new TaskElementLabelProvider(false);
-
- private WorkbenchLabelProvider workbenchProvider = new WorkbenchLabelProvider();
-
- public Image getImage(Object element) {
- if (element instanceof AbstractTaskContainer) {
- return taskProvider.getImage(element);
- } else {
- return workbenchProvider.getImage(element);
- }
- }
-
- public String getText(Object element) {
- if (element instanceof AbstractTaskContainer) {
- return taskProvider.getText(element);
- } else {
- return workbenchProvider.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 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);
- }
-
- @SuppressWarnings("unchecked")
- public void finish() {
- Object[] elements = tree.getCheckedElements();
- Set<IAdaptable> validElements = new HashSet<IAdaptable>();
- for (int i = 0; i < elements.length; i++) {
- if (elements[i] instanceof AbstractTaskContainer || elements[i] instanceof IProject) {
- validElements.add((IAdaptable) elements[i]);
- }
- }
-
- 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()]));
- }
- }
-
- 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));
-
- tree = new CheckboxTreeViewer(composite);
- tree.setUseHashlookup(true);
-
- final ITreeContentProvider treeContentProvider = new ITreeContentProvider() {
-
- @SuppressWarnings("unchecked")
- public Object[] getChildren(Object parentElement) {
- if (parentElement instanceof List) {
- List<IAdaptable> taskContainers = new ArrayList<IAdaptable>();
- for (Object container : (List) parentElement) {
- if (container instanceof AbstractTaskContainer) {
- taskContainers.add((AbstractTaskContainer) container);
- }
- }
- List<IAdaptable> projects = new ArrayList<IAdaptable>();
- for (Object container : (List) parentElement) {
- if (container instanceof IProject) {
- projects.add((IProject) container);
- }
- }
-
- return new Object[] { new ElementCategory(LABEL_TASKS, taskContainers),
- new ElementCategory("Resources", projects) };
- } else if (parentElement instanceof ElementCategory) {
- return ((ElementCategory) parentElement).getChildren(parentElement);
- } else {
- return new Object[0];
- }
- }
-
- @SuppressWarnings("unchecked")
- 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) {
- }
- };
-
- tree.setContentProvider(treeContentProvider);
-
- tree.setLabelProvider(new DecoratingLabelProvider(new AggregateLabelProvider(), PlatformUI.getWorkbench()
- .getDecoratorManager()
- .getLabelDecorator()));
-
-// tree.setLabelProvider(new TaskElementLabelProvider());
- tree.setSorter(new CustomSorter());
-
- ArrayList<Object> containers = new ArrayList<Object>();
- for (AbstractTaskContainer element : TasksUiPlugin.getTaskListManager().getTaskList().getRootElements()) {
- if (!(element instanceof TaskArchive)) {
- containers.add(element);
- }
- }
- containers.addAll(Arrays.asList(ResourcesPlugin.getWorkspace().getRoot().getProjects()));
-
- tree.setInput(containers);
- tree.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;
- tree.getControl().setLayoutData(data);
-
- tree.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) {
- tree.setCheckedElements(treeContentProvider.getElements(tree.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) {
- tree.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
- tree.setCheckedElements(new Object[] {});
- for (Object item : items) {
- if (item != null) {
- tree.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) {
- tree.setGrayed(element, false);
- // boolean state = event.getChecked();
- // if (element instanceof AbstractTaskContainer) {
- // setSubtreeChecked((AbstractTaskContainer) element, state, true);
- // }
- // updateParentState(element);
- } else if (element instanceof ElementCategory) {
- for (Object child : ((ElementCategory) element).getChildren(null)) {
- tree.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 (int i = 0; i < workingSets.length; i++) {
- if (newText.equals(workingSets[i].getName())) {
- errorMessage = "A working set with the same name already exists.";
- }
- }
- }
- if (tree.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 ba90b39f7..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/workingsets/TaskWorkingSetUpdater.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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 org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.mylyn.internal.tasks.core.ScheduledTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.TaskCategory;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-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.ui.TasksUiPlugin;
-import org.eclipse.ui.IWorkingSet;
-import org.eclipse.ui.IWorkingSetUpdater;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Eugene Kuleshov
- * @author Mik Kersten
- */
-public class TaskWorkingSetUpdater implements IWorkingSetUpdater, ITaskListChangeListener, ITaskActivityListener {
-
- public static String ID_TASK_WORKING_SET = "org.eclipse.mylyn.tasks.ui.workingSet";
-
- private List<IWorkingSet> workingSets = new ArrayList<IWorkingSet>();
-
- public TaskWorkingSetUpdater() {
- TasksUiPlugin.getTaskListManager().getTaskList().addChangeListener(this);
- TasksUiPlugin.getTaskListManager().addActivityListener(this);
- }
-
- public void dispose() {
- TasksUiPlugin.getTaskListManager().getTaskList().removeChangeListener(this);
- TasksUiPlugin.getTaskListManager().removeActivityListener(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 (AbstractTaskContainer element : TasksUiPlugin.getTaskListManager().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.getContainer() instanceof TaskCategory
- || taskContainerDelta.getContainer() instanceof AbstractRepositoryQuery) {
- 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.getContainer());
- 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.getContainer());
- workingSet.setElements(elements.toArray(new IAdaptable[elements.size()]));
- }
- break;
- case CHANGED:
- // Ignore since containers change during synch with server
- break;
- }
- }
- }
- }
- }
-
- public void activityChanged(ScheduledTaskContainer week) {
- // ignore
- }
-
- // TODO: consider putting back, but evaluate policy and note bug 197257
- public void taskActivated(AbstractTask task) {
-// Set<AbstractTaskContainer> taskContainers = new HashSet<AbstractTaskContainer>(
-// TasksUiPlugin.getTaskListManager().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 void taskDeactivated(AbstractTask task) {
- // ignore
- }
-
- public void taskListRead() {
- // ignore
- }
-
- public static IWorkingSet[] getEnabledSets() {
- return PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getWorkingSets();
- }
-
- /**
- * 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 (int i = 0; i < enabledSets.length; i++) {
- if (enabledSets[i].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;
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/AbstractDuplicateDetector.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/AbstractDuplicateDetector.java
deleted file mode 100644
index 721928d3e..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/AbstractDuplicateDetector.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.mylyn.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.search.SearchHitCollector;
-
-/**
- * Extend to provide task duplicate detection facilities to the task editor (e.g. Java stack trace matching).
- *
- * @author Gail Murphy
- * @since 2.0
- */
-public abstract class AbstractDuplicateDetector {
-
- protected String name;
-
- protected String kind;
-
- public abstract SearchHitCollector getSearchHitCollector(TaskRepository repository, RepositoryTaskData taskData);
-
- public void setName(String name) {
- this.name = name;
- }
-
- public void setKind(String kind) {
- this.kind = kind;
- }
-
- public String getName() {
- return this.name;
- }
-
- public String getKind() {
- return this.kind;
- }
-
-}
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 871934cc6..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/AbstractRepositoryConnectorUi.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.tasks.ui;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.jface.dialogs.Dialog;
-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.WizardDialog;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.mylyn.internal.tasks.ui.OpenRepositoryTaskJob;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.CommonAddExistingTaskWizard;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.tasks.core.AbstractTask.PriorityLevel;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;
-import org.eclipse.mylyn.tasks.ui.wizards.AbstractRepositorySettingsPage;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * 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();
-
- public abstract AbstractRepositorySettingsPage getSettingsPage();
-
- /**
- * @param repository
- * @param queryToEdit
- * can be null
- */
- public abstract IWizard getQueryWizard(TaskRepository repository, AbstractRepositoryQuery queryToEdit);
-
- public abstract IWizard getNewTaskWizard(TaskRepository taskRepository);
-
- /**
- * 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.
- */
- public String getTaskEditorId(AbstractTask repositoryTask) {
- return TaskEditor.ID_EDITOR;
- }
-
- public abstract boolean hasSearchPage();
-
- /**
- * Contributions to the UI legend.
- */
- public List<AbstractTaskContainer> getLegendItems() {
- return Collections.emptyList();
- }
-
- /**
- * @param repositoryTask
- * can be null
- */
- public String getTaskKindLabel(AbstractTask repositoryTask) {
- return LABEL_TASK_DEFAULT;
- }
-
- /**
- * @param taskData
- * can be null
- */
- public String getTaskKindLabel(RepositoryTaskData taskData) {
- 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.
- */
- public ImageDescriptor getTaskListElementIcon(AbstractTaskContainer element) {
- if (element instanceof AbstractRepositoryQuery) {
- return TasksUiImages.QUERY;
- } else if (element instanceof AbstractTask) {
- return TasksUiImages.TASK;
- } else {
- return null;
- }
- }
-
- /**
- * Task kind overlay, recommended to override with connector-specific overlay.
- */
- public ImageDescriptor getTaskKindOverlay(AbstractTask 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).
- */
- public ImageDescriptor getTaskPriorityOverlay(AbstractTask task) {
- return TasksUiImages.getImageDescriptorForPriority(PriorityLevel.fromString(task.getPriority()));
- }
-
- public void openEditQueryDialog(AbstractRepositoryQuery query) {
- try {
- TaskRepository repository = TasksUiPlugin.getRepositoryManager().getRepository(query.getRepositoryKind(),
- query.getRepositoryUrl());
- if (repository == null)
- return;
-
- IWizard wizard = this.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() == Dialog.CANCEL) {
- dialog.close();
- return;
- }
- }
- } catch (Exception e) {
- StatusHandler.fail(e, e.getMessage(), true);
- }
- }
-
- public IWizard getAddExistingTaskWizard(TaskRepository repository) {
- return new CommonAddExistingTaskWizard(repository);
- }
-
- public WizardPage 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;
- }
-
- /**
- * 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
- */
- public boolean openRepositoryTask(String repositoryUrl, String id) {
- TaskRepositoryManager repositoryManager = TasksUiPlugin.getRepositoryManager();
- AbstractRepositoryConnector connector = repositoryManager.getRepositoryConnector(getConnectorKind());
- 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 false;
- }
- IWorkbenchPage page = window.getActivePage();
-
- OpenRepositoryTaskJob job = new OpenRepositoryTaskJob(getConnectorKind(), repositoryUrl, id, taskUrl, page);
- job.schedule();
-
- return true;
- }
-
- public IHyperlink[] findHyperlinks(TaskRepository repository, String text, int lineOffset, int regionOffset) {
- return null;
- }
-
- public void setCustomNotificationHandling(boolean customNotifications) {
- this.customNotificationHandling = customNotifications;
- }
-
- public boolean isCustomNotificationHandling() {
- return customNotificationHandling;
- }
-
- public boolean supportsDueDates(AbstractTask task) {
- return false;
- }
-
- public String getKindLabel(String kindLabel) {
- return null;
- }
-
- /**
- * @since 2.1
- * @return true if connector doesn't support non-grouping (flattening) of subtasks
- */
- public boolean forceSubtaskHierarchy() {
- return false;
- }
-}
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 36f250598..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.TaskRepository;
-import org.eclipse.mylyn.tasks.core.TaskRepositoryManager;
-
-/**
- * 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.
- */
- public abstract TaskRepository getTaskRepository(IResource resource, TaskRepositoryManager 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/DatePicker.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/DatePicker.java
deleted file mode 100644
index d7306514f..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/DatePicker.java
+++ /dev/null
@@ -1,277 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse 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.text.DateFormat;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.GregorianCalendar;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.jface.window.Window;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPreferenceConstants;
-import org.eclipse.mylyn.internal.tasks.ui.planner.DateSelectionDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.FocusAdapter;
-import org.eclipse.swt.events.FocusEvent;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
-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.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Temporary date picker from patch posted to: https://bugs.eclipse.org/bugs/show_bug.cgi?taskId=19945
- *
- * see bug# 19945
- *
- * TODO: remove this class when an SWT date picker is added
- *
- * @author Bahadir Yagan
- * @author Mik Kersten
- * @since 1.0
- */
-public class DatePicker extends Composite {
-
- public final static String TITLE_DIALOG = "Choose Date";
-
- public static final String LABEL_CHOOSE = "<choose date>";
-
- private Text dateText = null;
-
- private Button pickButton = null;
-
- private Calendar date = null;
-
- private List<SelectionListener> pickerListeners = new LinkedList<SelectionListener>();
-
- private SimpleDateFormat simpleDateFormat = (SimpleDateFormat) DateFormat.getDateTimeInstance(DateFormat.MEDIUM,
- DateFormat.SHORT);
-
- private String initialText = "Select Date";
-
- public DatePicker(Composite parent, int style, String initialText) {
- super(parent, style);
- this.initialText = initialText;
- initialize((style & SWT.FLAT) > 0 ? SWT.FLAT : 0);
- }
-
- 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);
-
- dateText = new Text(this, style);
- GridData dateTextGridData = new GridData(SWT.FILL, SWT.FILL, false, false);
- dateTextGridData.widthHint = 135;
- dateTextGridData.verticalIndent = 0;
-
- dateText.setLayoutData(dateTextGridData);
- dateText.setText(initialText);
- dateText.addKeyListener(new KeyAdapter() {
- @Override
- public void keyPressed(KeyEvent e) {
- // key listener used because setting of date picker text causes
- // modify listener to fire which results in perpetual dirty
- // editor
- notifyPickerListeners();
- }
- });
-
- dateText.addFocusListener(new FocusAdapter() {
- Calendar calendar = Calendar.getInstance();
-
- @Override
- public void focusLost(FocusEvent e) {
- Date reminderDate;
- try {
- reminderDate = simpleDateFormat.parse(dateText.getText());
- calendar.setTime(reminderDate);
- date = calendar;
- updateDateText();
- } catch (ParseException e1) {
- updateDateText();
- }
-
- }
- });
-
- 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) {
- Calendar newCalendar = GregorianCalendar.getInstance();
- newCalendar.set(Calendar.HOUR_OF_DAY, TasksUiPlugin.getDefault().getPreferenceStore().getInt(TasksUiPreferenceConstants.PLANNING_ENDHOUR));
- newCalendar.set(Calendar.MINUTE, 0);
- newCalendar.set(Calendar.SECOND, 0);
- newCalendar.set(Calendar.MILLISECOND, 0);
- if (date != null) {
- newCalendar.setTime(date.getTime());
- }
-
- Shell shell = null;
- if (PlatformUI.getWorkbench().getActiveWorkbenchWindow() != null) {
- shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- } else {
- shell = new Shell(PlatformUI.getWorkbench().getDisplay());
- }
- DateSelectionDialog dialog = new DateSelectionDialog(shell, newCalendar, DatePicker.TITLE_DIALOG);
- pickButton.setEnabled(false);
- dateText.setEnabled(false);
-
- int dialogResponse = dialog.open();
- if (dialog.getDate() != null) {
- newCalendar.setTime(dialog.getDate());
- } else {
- newCalendar = null;
- }
- dateSelected(dialogResponse == Window.CANCEL, newCalendar);
-
- // Display display = Display.getCurrent();
- // showDatePicker((display.getCursorLocation().x),
- // (display.getCursorLocation().y));
- }
- });
-
- pack();
- }
-
- public void addPickerSelectionListener(SelectionListener listener) {
- pickerListeners.add(listener);
- }
-
- /**
- * must check for null return value
- */
- public Calendar getDate() {
- return date;
- }
-
- @Override
- public void setBackground(Color backgroundColor) {
- dateText.setBackground(backgroundColor);
- super.setBackground(backgroundColor);
- }
-
- public void setDate(Calendar date) {
- this.date = date;
- updateDateText();
- }
-
- // private void showDatePicker(int x, int y) {
- // pickerShell = new Shell(SWT.APPLICATION_MODAL);//| SWT.ON_TOP
- // pickerShell.setText("Shell");
- // pickerShell.setLayout(new FillLayout());
- // if (date == null) {
- // date = new GregorianCalendar();
- // }
- // // datePickerPanel.setDate(date);
- // datePickerPanel = new DatePickerPanel(pickerShell, SWT.NONE, date);
- // datePickerPanel.addSelectionChangedListener(new
- // ISelectionChangedListener() {
- //
- // public void selectionChanged(SelectionChangedEvent event) {
- // if(!event.getSelection().isEmpty()) {
- // dateSelected(event.getSelection().isEmpty(),
- // ((DateSelection)event.getSelection()).getDate());
- // } else {
- // dateSelected(false, null);
- // }
- // }});
- //
- // pickerShell.setSize(new Point(240, 180));
- // pickerShell.setLocation(new Point(x, y));
- //
- // datePickerPanel.addKeyListener(new KeyListener() {
- // public void keyPressed(KeyEvent e) {
- // if (e.keyCode == SWT.ESC) {
- // dateSelected(true, null);
- // }
- // }
- //
- // public void keyReleased(KeyEvent e) {
- // }
- // });
- //
- // pickerShell.addFocusListener(new FocusListener() {
- //
- // public void focusGained(FocusEvent e) {
- // System.err.println(" shell - Focus Gained!");
- //
- // }
- //
- // public void focusLost(FocusEvent e) {
- // System.err.println("shell - Focus Lost!");
- //
- // }});
- //
- // pickerShell.pack();
- // pickerShell.open();
- // }
-
- /** Called when the user has selected a date */
- protected void dateSelected(boolean canceled, Calendar selectedDate) {
-
- if (!canceled) {
- this.date = selectedDate != null ? selectedDate : null;
- updateDateText();
- notifyPickerListeners();
- }
-
- pickButton.setEnabled(true);
- dateText.setEnabled(true);
- }
-
- private void notifyPickerListeners() {
- for (SelectionListener listener : pickerListeners) {
- listener.widgetSelected(null);
- }
- }
-
- private void updateDateText() {
- if (date != null) {
- Date currentDate = new Date(date.getTimeInMillis());
- dateText.setText(simpleDateFormat.format(currentDate));
- } else {
- dateText.setEnabled(false);
- dateText.setText(LABEL_CHOOSE);
- dateText.setEnabled(true);
- }
- }
-
- @Override
- public void setEnabled(boolean enabled) {
- dateText.setEnabled(enabled);
- pickButton.setEnabled(enabled);
- super.setEnabled(enabled);
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/RepositorySynchronizationManager.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/RepositorySynchronizationManager.java
deleted file mode 100644
index a7953d1e5..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/RepositorySynchronizationManager.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.tasks.ui;
-
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.jobs.IJobChangeListener;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.mylyn.internal.tasks.core.TaskDataManager;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskAttribute;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.TaskList;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.AbstractTask.RepositoryTaskSyncState;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Encapsulates synchronization policy.
- *
- * NOTE: likely to change for 3.0
- *
- * @author Mik Kersten
- * @author Rob Elves
- */
-public final class RepositorySynchronizationManager {
-
- private final MutexRule taskRule = new MutexRule();
-
- private final MutexRule queryRule = new MutexRule();
-
- protected boolean forceSyncExecForTesting = false;
-
- /**
- * 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 final Job synchronize(AbstractRepositoryConnector connector, AbstractTask repositoryTask,
- boolean forceSynch, IJobChangeListener listener) {
- Set<AbstractTask> toSync = new HashSet<AbstractTask>();
- toSync.add(repositoryTask);
- return synchronize(connector, toSync, forceSynch, listener);
- }
-
- /**
- * @param listener
- * can be null
- */
- public final Job synchronize(AbstractRepositoryConnector connector, Set<AbstractTask> repositoryTasks,
- boolean forceSynch, final IJobChangeListener listener) {
-
- final SynchronizeTaskJob synchronizeJob = new SynchronizeTaskJob(connector, repositoryTasks);
- synchronizeJob.setForced(forceSynch);
- synchronizeJob.setPriority(Job.DECORATE);
- synchronizeJob.setRule(taskRule);
- if (listener != null) {
- synchronizeJob.addJobChangeListener(listener);
- }
- for (AbstractTask repositoryTask : repositoryTasks) {
- repositoryTask.setSynchronizing(true);
- }
- if (!forceSyncExecForTesting) {
- synchronizeJob.schedule();
- } else {
- PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
- public void run() {
- synchronizeJob.run(new NullProgressMonitor());
- if (listener != null) {
- listener.done(null);
- }
- }
- });
- }
- return synchronizeJob;
-
- }
-
- /**
- * For synchronizing a single query. Use synchronize(Set, IJobChangeListener) if synchronizing multiple queries at a
- * time.
- */
- public final Job synchronize(AbstractRepositoryConnector connector, final AbstractRepositoryQuery repositoryQuery,
- IJobChangeListener listener, boolean forceSync) {
- TaskRepository repository = TasksUiPlugin.getRepositoryManager().getRepository(
- repositoryQuery.getRepositoryKind(), repositoryQuery.getRepositoryUrl());
- return synchronize(connector, repository, Collections.singleton(repositoryQuery), listener, Job.LONG, 0,
- forceSync);
- }
-
- public final Job synchronize(AbstractRepositoryConnector connector, TaskRepository repository,
- final Set<AbstractRepositoryQuery> repositoryQueries, final IJobChangeListener listener, int priority,
- long delay, boolean userForcedSync) {
- TaskList taskList = TasksUiPlugin.getTaskListManager().getTaskList();
- for (AbstractRepositoryQuery repositoryQuery : repositoryQueries) {
- repositoryQuery.setSynchronizing(true);
- // TasksUiPlugin.getTaskListManager().getTaskList().notifyContainerUpdated(repositoryQuery);
- }
- taskList.notifyContainersUpdated(repositoryQueries);
-
- final SynchronizeQueryJob job = new SynchronizeQueryJob(connector, repository, repositoryQueries, taskList);
- job.setSynchronizeChangedTasks(true);
- job.setForced(userForcedSync);
- if (listener != null) {
- job.addJobChangeListener(listener);
- }
- job.setRule(queryRule);
- job.setPriority(priority);
- if (!forceSyncExecForTesting) {
- job.schedule(delay);
- } else {
- PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
- public void run() {
- job.run(new NullProgressMonitor());
- if (listener != null) {
- listener.done(null);
- }
- }
- });
- }
- return job;
- }
-
- /**
- * Synchronizes only those tasks that have changed since the last time the given repository was synchronized. Calls
- * to this method update TaskRepository.syncTime.
- */
- public final void synchronizeChanged(final AbstractRepositoryConnector connector, final TaskRepository repository) {
- // Method left here for completeness. Currently unused since ScheduledTaskListSynchJob calls SynchronizeQueriesJob
- // which synchronizes all changed if unforced (background).
- Set<AbstractRepositoryQuery> emptySet = Collections.emptySet();
- synchronize(connector, repository, emptySet, null, Job.LONG, 0, false);
- }
-
- /**
- * @param repositoryTask
- * task that changed
- * @param modifiedAttributes
- * attributes that have changed during edit session
- */
- public synchronized void saveOutgoing(AbstractTask repositoryTask, Set<RepositoryTaskAttribute> modifiedAttributes) {
- repositoryTask.setSynchronizationState(RepositoryTaskSyncState.OUTGOING);
- TasksUiPlugin.getTaskDataManager().saveEdits(repositoryTask.getRepositoryUrl(), repositoryTask.getTaskId(),
- Collections.unmodifiableSet(modifiedAttributes));
- TasksUiPlugin.getTaskListManager().getTaskList().notifyTaskChanged(repositoryTask, false);
- }
-
- /**
- * Saves incoming data and updates task sync state appropriately
- *
- * @return true if call results in change of sync state
- */
- public synchronized boolean saveIncoming(final AbstractTask repositoryTask, final RepositoryTaskData newTaskData,
- boolean forceSync) {
- final RepositoryTaskSyncState startState = repositoryTask.getSynchronizationState();
- RepositoryTaskSyncState status = repositoryTask.getSynchronizationState();
-
- if (newTaskData == null) {
- StatusHandler.log("Download of " + repositoryTask.getSummary() + " from "
- + repositoryTask.getRepositoryUrl() + " failed.", this);
- return false;
- }
-
- RepositoryTaskData previousTaskData = TasksUiPlugin.getTaskDataManager().getNewTaskData(
- repositoryTask.getRepositoryUrl(), repositoryTask.getTaskId());
-
- if (repositoryTask.isSubmitting()) {
- status = RepositoryTaskSyncState.SYNCHRONIZED;
- repositoryTask.setSubmitting(false);
- TaskDataManager dataManager = TasksUiPlugin.getTaskDataManager();
- dataManager.discardEdits(repositoryTask.getRepositoryUrl(), repositoryTask.getTaskId());
-
- TasksUiPlugin.getTaskDataManager().setNewTaskData(newTaskData);
- /**
- * If we set both so we don't see our own changes
- *
- * @see RepositorySynchronizationManager.setTaskRead(AbstractTask, boolean)
- */
- // TasksUiPlugin.getTaskDataManager().setOldTaskData(repositoryTask.getHandleIdentifier(),
- // newTaskData);
- } else {
-
- switch (status) {
- case OUTGOING:
- if (checkHasIncoming(repositoryTask, newTaskData)) {
- status = RepositoryTaskSyncState.CONFLICT;
- }
- TasksUiPlugin.getTaskDataManager().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
-
- TasksUiPlugin.getTaskDataManager().setNewTaskData(newTaskData);
- break;
- case SYNCHRONIZED:
- boolean hasIncoming = checkHasIncoming(repositoryTask, newTaskData);
- if (hasIncoming) {
- status = RepositoryTaskSyncState.INCOMING;
- repositoryTask.setNotified(false);
- }
- if (hasIncoming || previousTaskData == null || forceSync) {
- TasksUiPlugin.getTaskDataManager().setNewTaskData(newTaskData);
- }
- break;
- }
- }
- repositoryTask.setSynchronizationState(status);
- return startState != repositoryTask.getSynchronizationState();
- }
-
- public void saveOffline(AbstractTask task, RepositoryTaskData taskData) {
- TasksUiPlugin.getTaskDataManager().setNewTaskData(taskData);
- }
-
- /** public for testing purposes */
- public boolean checkHasIncoming(AbstractTask repositoryTask, RepositoryTaskData newData) {
- String lastModified = repositoryTask.getLastReadTimeStamp();
-
- RepositoryTaskAttribute modifiedDateAttribute = newData.getAttribute(RepositoryTaskAttribute.DATE_MODIFIED);
- if (lastModified != null && modifiedDateAttribute != null && modifiedDateAttribute.getValue() != null) {
- if (lastModified.trim().compareTo(modifiedDateAttribute.getValue().trim()) == 0
- && repositoryTask.getSynchronizationState() != RepositoryTaskSyncState.INCOMING) {
- // 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;
- }
- }
-
- return true;
-
- }
-
- /**
- * @param repositoryTask -
- * repository task to mark as read or unread
- * @param read -
- * true to mark as read, false to mark as unread
- */
- public void setTaskRead(AbstractTask repositoryTask, boolean read) {
- TaskDataManager dataManager = TasksUiPlugin.getTaskDataManager();
- RepositoryTaskData taskData = TasksUiPlugin.getTaskDataManager().getNewTaskData(
- repositoryTask.getRepositoryUrl(), repositoryTask.getTaskId());
-
- if (read && repositoryTask.getSynchronizationState().equals(RepositoryTaskSyncState.INCOMING)) {
- if (taskData != null && taskData.getLastModified() != null) {
- repositoryTask.setLastReadTimeStamp(taskData.getLastModified());
- dataManager.setOldTaskData(taskData);
- }
- repositoryTask.setSynchronizationState(RepositoryTaskSyncState.SYNCHRONIZED);
- TasksUiPlugin.getTaskListManager().getTaskList().notifyTaskChanged(repositoryTask, false);
- } else if (read && repositoryTask.getSynchronizationState().equals(RepositoryTaskSyncState.CONFLICT)) {
- if (taskData != null && taskData.getLastModified() != null) {
- repositoryTask.setLastReadTimeStamp(taskData.getLastModified());
- }
- repositoryTask.setSynchronizationState(RepositoryTaskSyncState.OUTGOING);
- TasksUiPlugin.getTaskListManager().getTaskList().notifyTaskChanged(repositoryTask, false);
- } else if (read && repositoryTask.getSynchronizationState().equals(RepositoryTaskSyncState.SYNCHRONIZED)) {
- if (taskData != null && taskData.getLastModified() != null) {
- repositoryTask.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) {
- dataManager.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 && repositoryTask.getSynchronizationState().equals(RepositoryTaskSyncState.SYNCHRONIZED)) {
- repositoryTask.setSynchronizationState(RepositoryTaskSyncState.INCOMING);
- TasksUiPlugin.getTaskListManager().getTaskList().notifyTaskChanged(repositoryTask, false);
- }
-
- // for repositories that don't support task data or if no task data is available
- //if (read && taskData == null) {
- // repositoryTask.setLastReadTimeStamp(LocalTask.SYNC_DATE_NOW);
- //}
- }
-
- public void discardOutgoing(AbstractTask repositoryTask) {
- TaskDataManager dataManager = TasksUiPlugin.getTaskDataManager();
- dataManager.discardEdits(repositoryTask.getRepositoryUrl(), repositoryTask.getTaskId());
- repositoryTask.setSynchronizationState(RepositoryTaskSyncState.SYNCHRONIZED);
-
- TasksUiPlugin.getTaskListManager().getTaskList().notifyTaskChanged(repositoryTask, true);
- }
-
- /**
- * For testing
- */
- public final void setForceSyncExec(boolean forceSyncExec) {
- this.forceSyncExecForTesting = forceSyncExec;
- }
-
- /**
- * For testing
- */
- public final boolean isForcedSyncExec() {
- return this.forceSyncExecForTesting;
- }
-
- private static class MutexRule implements ISchedulingRule {
- public boolean isConflicting(ISchedulingRule rule) {
- return rule == this;
- }
-
- public boolean contains(ISchedulingRule rule) {
- return rule == this;
- }
- }
-
- /*
- private static class RepositoryMutexRule implements ISchedulingRule {
-
- private TaskRepository repository = null;
-
- public RepositoryMutexRule(TaskRepository repository) {
- this.repository = repository;
- }
-
- public boolean isConflicting(ISchedulingRule rule) {
- if (rule instanceof RepositoryMutexRule) {
- return repository.equals(((RepositoryMutexRule) rule).getRepository());
- } else {
- return false;
- }
- }
-
- public boolean contains(ISchedulingRule rule) {
- return rule == this;
- }
-
- public TaskRepository getRepository() {
- return repository;
- }
- }
- */
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/SynchronizeQueryJob.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/SynchronizeQueryJob.java
deleted file mode 100644
index 4bcbb4e48..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/SynchronizeQueryJob.java
+++ /dev/null
@@ -1,233 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse 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.Date;
-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.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.monitor.core.DateUtil;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.QueryHitCollector;
-import org.eclipse.mylyn.tasks.core.TaskList;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.AbstractTask.RepositoryTaskSyncState;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.progress.IProgressConstants;
-
-/**
- * Not API.
- *
- * @author Mik Kersten
- * @author Rob Elves
- * @author Steffen Pingel
- */
-class SynchronizeQueryJob extends Job {
-
- private final AbstractRepositoryConnector connector;
-
- private final TaskRepository repository;
-
- private final Set<AbstractRepositoryQuery> queries;
-
- private final TaskList taskList;
-
- private boolean synchronizeChangedTasks;
-
- private boolean forced = false;
-
- private HashSet<AbstractTask> tasksToBeSynchronized = new HashSet<AbstractTask>();
-
- public SynchronizeQueryJob(AbstractRepositoryConnector connector, TaskRepository repository,
- Set<AbstractRepositoryQuery> queries, TaskList taskList) {
- super("Synchronizing queries for " + repository.getRepositoryLabel());
-
- this.connector = connector;
- this.repository = repository;
- this.queries = queries;
- this.taskList = taskList;
- }
-
- public void setSynchronizeChangedTasks(boolean synchronizeChangedTasks) {
- this.synchronizeChangedTasks = synchronizeChangedTasks;
- }
-
- /**
- * Returns true, if synchronization was triggered manually and not by an automatic background job.
- */
- public boolean isForced() {
- return forced;
- }
-
- /**
- * Indicates a manual synchronization (User initiated). If set to true, a dialog will be displayed in case of
- * errors. Any tasks with missing data will be retrieved.
- */
- public void setForced(boolean forced) {
- this.forced = forced;
- }
-
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- try {
- monitor.beginTask("Synchronizing " + queries.size() + " queries", 20 + queries.size() * 10 + 40);
-
- Set<AbstractTask> allTasks = Collections.unmodifiableSet(taskList.getRepositoryTasks(repository.getUrl()));
-
- for (AbstractTask task : allTasks) {
- task.setStale(false);
- }
-
- // check if the repository has changed at all and have the connector mark tasks that need synchronization
- try {
- monitor.subTask("Checking for changed tasks");
- boolean hasChangedOrNew = connector.markStaleTasks(repository, allTasks, new SubProgressMonitor(
- monitor, 20));
- if (!hasChangedOrNew && !forced) {
- updateQueryStatus(null);
- return Status.OK_STATUS;
- }
- } catch (CoreException e) {
- // synchronization is unlikely to succeed, inform user and exit
- updateQueryStatus(e.getStatus());
- return Status.OK_STATUS;
- }
-
- // synchronize queries, tasks changed within query are added to set of tasks to be synchronized
- int n = 0;
- for (AbstractRepositoryQuery repositoryQuery : queries) {
- repositoryQuery.setSynchronizationStatus(null);
-
- monitor.setTaskName("Synchronizing " + ++n + "/" + queries.size() + ": " + repositoryQuery.getSummary());
- synchronizeQuery(repositoryQuery, new SubProgressMonitor(monitor, 10));
-
- repositoryQuery.setSynchronizing(false);
- taskList.notifyContainersUpdated(Collections.singleton(repositoryQuery));
- }
-
- // for background synchronizations all changed tasks are synchronized including the ones that are not part of a query
- if (!forced) {
- for (AbstractTask task : allTasks) {
- if (task.isStale()) {
- tasksToBeSynchronized.add(task);
- task.setSynchronizing(true);
- }
- }
- }
-
- // synchronize tasks that were marked by the connector
- if (!tasksToBeSynchronized.isEmpty()) {
- monitor.setTaskName("Synchronizing " + tasksToBeSynchronized.size() + " changed tasks");
- SynchronizeTaskJob job = new SynchronizeTaskJob(connector, tasksToBeSynchronized);
- job.setForced(forced);
- job.run(new SubProgressMonitor(monitor, 40));
-
- if (Platform.isRunning() && !(TasksUiPlugin.getRepositoryManager() == null)) {
- TasksUiPlugin.getRepositoryManager().setSynchronizationTime(repository,
- connector.getSynchronizationTimestamp(repository, tasksToBeSynchronized),
- TasksUiPlugin.getDefault().getRepositoriesFilePath());
- }
- }
-
- taskList.notifyContainersUpdated(null);
-
- return Status.OK_STATUS;
- } finally {
- monitor.done();
- }
- }
-
- private void updateQueryStatus(final IStatus status) {
- for (AbstractRepositoryQuery repositoryQuery : queries) {
- repositoryQuery.setSynchronizationStatus(status);
- repositoryQuery.setSynchronizing(false);
- }
- taskList.notifyContainersUpdated(queries);
-
- if (status != null && isForced()) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- StatusHandler.displayStatus("Query Synchronization Failed", status);
- }
- });
- }
- }
-
- private void synchronizeQuery(AbstractRepositoryQuery repositoryQuery, IProgressMonitor monitor) {
- setProperty(IProgressConstants.ICON_PROPERTY, TasksUiImages.REPOSITORY_SYNCHRONIZE);
-
- QueryHitCollector collector = new QueryHitCollector(new TaskFactory(repository, true, false));
-
- final IStatus resultingStatus = connector.performQuery(repositoryQuery, repository, monitor, collector);
- if (resultingStatus.getSeverity() == IStatus.CANCEL) {
- // do nothing
- } else if (resultingStatus.isOK()) {
- if (collector.getTasks().size() >= QueryHitCollector.MAX_HITS) {
- StatusHandler.log(QueryHitCollector.MAX_HITS_REACHED + "\n" + repositoryQuery.getSummary(), this);
- }
-
- // bug#195485 - tasks dissappear form tasklist
- for (AbstractTask removedTask : repositoryQuery.getChildren()) {
- taskList.removeFromQuery(repositoryQuery, removedTask);
- }
-
- for (AbstractTask hit : collector.getTasks()) {
- AbstractTask task = taskList.getTask(hit.getHandleIdentifier());
- if (task != null) {
- // update the existing task from the query hit
- boolean changed = connector.updateTaskFromQueryHit(repository, task, hit);
- if (changed && !task.isStale()
- && task.getSynchronizationState() == RepositoryTaskSyncState.SYNCHRONIZED) {
- // set incoming marker for web tasks
- task.setSynchronizationState(RepositoryTaskSyncState.INCOMING);
- }
-
- task.setSynchronizationStatus(null);
- task.setSynchronizing(false);
-
- } else {
- // new tasks are marked stale by default
- task = hit;
- task.setStale(true);
- task.setSynchronizationState(RepositoryTaskSyncState.INCOMING);
- }
-
- taskList.addTask(task, repositoryQuery);
- if (synchronizeChangedTasks && task.isStale()) {
- tasksToBeSynchronized.add(task);
- task.setSynchronizing(true);
- }
- }
-
- repositoryQuery.setLastSynchronizedStamp(DateUtil.getFormattedDate(new Date(), "MMM d, H:mm:ss"));
- } else {
- repositoryQuery.setSynchronizationStatus(resultingStatus);
- if (isForced()) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- StatusHandler.displayStatus("Query Synchronization Failed", resultingStatus);
- }
- });
- }
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/SynchronizeTaskJob.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/SynchronizeTaskJob.java
deleted file mode 100644
index c9bc53c07..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/SynchronizeTaskJob.java
+++ /dev/null
@@ -1,296 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse 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.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.Job;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskDataHandler;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.AbstractTask.RepositoryTaskSyncState;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.progress.IProgressConstants;
-
-/**
- * Not API.
- *
- * @author Mik Kersten
- * @author Rob Elves
- * @author Steffen Pingel
- */
-class SynchronizeTaskJob extends Job {
-
- private static final String LABEL_SYNCHRONIZING = "Synchronizing task ";
-
- private static final String LABEL_SYNCHRONIZE_TASK = "Task Synchronization";
-
- private final AbstractRepositoryConnector connector;
-
- private Set<AbstractTask> repositoryTasks;
-
- private boolean forced = false;
-
- private AbstractTaskDataHandler taskDataHandler;
-
- private Map<TaskRepository, Set<AbstractTask>> repToTasks;
-
- public SynchronizeTaskJob(AbstractRepositoryConnector connector, Set<AbstractTask> repositoryTasks) {
- super(LABEL_SYNCHRONIZE_TASK + " (" + repositoryTasks.size() + " tasks)");
- this.connector = connector;
- this.repositoryTasks = repositoryTasks;
- this.taskDataHandler = connector.getTaskDataHandler();
- }
-
- /**
- * Returns true, if synchronization was triggered manually and not by an automatic background job.
- */
- public boolean isForced() {
- return forced;
- }
-
- /**
- * Indicates a manual synchronization. If set to true, a dialog will be displayed in case of errors.
- */
- public void setForced(boolean forced) {
- this.forced = forced;
- }
-
- @Override
- public IStatus run(IProgressMonitor monitor) {
- try {
- repToTasks = new HashMap<TaskRepository, Set<AbstractTask>>();
- monitor.beginTask(LABEL_SYNCHRONIZING, repositoryTasks.size());
- setProperty(IProgressConstants.ICON_PROPERTY, TasksUiImages.REPOSITORY_SYNCHRONIZE);
-
- for (final AbstractTask repositoryTask : repositoryTasks) {
-
- if (monitor.isCanceled()) {
- break;
- }
-
- if (taskDataHandler != null && taskDataHandler.canGetMultiTaskData()) {
- // Multi synch supported...
- TaskRepository repository = TasksUiPlugin.getRepositoryManager().getRepository(
- repositoryTask.getConnectorKind(), repositoryTask.getRepositoryUrl());
-
- if (repository == null) {
- repositoryTask.setSynchronizationStatus(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, 0,
- "Associated repository could not be found. Ensure proper repository configuration of "
- + repositoryTask.getRepositoryUrl() + " in "
- + TasksUiPlugin.LABEL_VIEW_REPOSITORIES + ".", null));
- continue;
- }
-
- Set<AbstractTask> tasks = repToTasks.get(repository);
- if (tasks == null) {
- tasks = new HashSet<AbstractTask>();
- repToTasks.put(repository, tasks);
- }
- repositoryTask.setSynchronizationStatus(null);
- tasks.add(repositoryTask);
- repositoryTask.setSynchronizing(true);
- TasksUiPlugin.getTaskListManager().getTaskList().notifyTaskChanged(repositoryTask, false);
- } else {
- // Single synch supported...
- synchronizeTask(monitor, repositoryTask);
- }
- }
-
- if (monitor.isCanceled()) {
-
- for (final AbstractTask repositoryTask : repositoryTasks) {
- repositoryTask.setSynchronizing(false);
- TasksUiPlugin.getTaskListManager().getTaskList().notifyTaskChanged(repositoryTask, false);
- }
-
- return Status.CANCEL_STATUS;
- }
-
- for (TaskRepository repository : repToTasks.keySet()) {
- Set<AbstractTask> tasksToSynch = repToTasks.get(repository);
- try {
- synchronizeTasks(new SubProgressMonitor(monitor, tasksToSynch.size()), repository, tasksToSynch);
- } catch (OperationCanceledException e) {
- return Status.CANCEL_STATUS;
- } catch (final CoreException e) {
- for (AbstractTask task : tasksToSynch) {
- updateStatus(repository, task, e.getStatus());
- }
- if (forced) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- StatusHandler.displayStatus("Task Synchronization Failed", e.getStatus());
- }
- });
- }
- }
- }
-
- } catch (Exception e) {
- StatusHandler.fail(e, "Synchronization failed", false);
- } finally {
- monitor.done();
- }
-
- return Status.OK_STATUS;
- }
-
- private void synchronizeTask(IProgressMonitor monitor, AbstractTask task) {
- monitor.subTask(task.getSummary());
-
- task.setSynchronizationStatus(null);
-
- final TaskRepository repository = TasksUiPlugin.getRepositoryManager().getRepository(task.getConnectorKind(),
- task.getRepositoryUrl());
- try {
- if (repository == null) {
- throw new CoreException(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, 0,
- "Associated repository could not be found. Ensure proper repository configuration of "
- + task.getRepositoryUrl() + " in " + TasksUiPlugin.LABEL_VIEW_REPOSITORIES + ".", null));
- }
-
- TasksUiPlugin.getTaskListManager().getTaskList().notifyTaskChanged(task, false);
- if (taskDataHandler != null) {
- String taskId = task.getTaskId();
- RepositoryTaskData downloadedTaskData = taskDataHandler.getTaskData(repository, taskId, monitor);
-
- if (downloadedTaskData != null) {
- updateTask(monitor, repository, task, downloadedTaskData);
- } else {
- updateFromRepository(repository, task, monitor);
- }
- } else {
- updateFromRepository(repository, task, monitor);
- }
- } catch (final CoreException e) {
- updateStatus(repository, task, e.getStatus());
- if (forced) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- StatusHandler.displayStatus("Task Synchronization Failed", e.getStatus());
- }
- });
- }
- }
-
- monitor.worked(1);
- }
-
- /**
- * Does not report synchronization failures if repository is offline.
- */
- private void updateStatus(TaskRepository repository, AbstractTask task, IStatus status) {
- if (!forced && repository != null && repository.isOffline()) {
- task.setSynchronizing(false);
- } else {
- task.setSynchronizationStatus(status);
- }
- }
-
- private void synchronizeTasks(IProgressMonitor monitor, TaskRepository repository, Set<AbstractTask> tasks)
- throws CoreException {
- monitor.subTask("Synchronizing tasks from: " + repository.getRepositoryLabel());
- Set<String> taskIds = new HashSet<String>();
- Map<String, AbstractTask> idToTask = new HashMap<String, AbstractTask>();
- for (AbstractTask task : tasks) {
- taskIds.add(task.getTaskId());
- idToTask.put(task.getTaskId(), task);
- }
- Set<RepositoryTaskData> newTaskData = taskDataHandler.getMultiTaskData(repository, taskIds,
- new SubProgressMonitor(monitor, tasks.size()));
- if (newTaskData != null && newTaskData.size() > 0) {
- for (RepositoryTaskData taskData : newTaskData) {
- if (monitor.isCanceled())
- throw new OperationCanceledException("Synchronization cancelled by user");
- if (taskData != null) {
- AbstractTask task = idToTask.remove(taskData.getId());
- if (task != null) {
- try {
- updateTask(new SubProgressMonitor(monitor, 1), repository, task, taskData);
- } catch (final CoreException e) {
- updateStatus(repository, task, e.getStatus());
- if (forced) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- StatusHandler.displayStatus("Task Synchronization Failed", e.getStatus());
- }
- });
- }
- }
- monitor.worked(1);
- }
- }
- }
- }
-
- if (newTaskData != null && newTaskData.size() < tasks.size()) {
- //set error status
- }
- }
-
- private void updateFromRepository(TaskRepository repository, AbstractTask task, IProgressMonitor monitor)
- throws CoreException {
- connector.updateTaskFromRepository(repository, task, new SubProgressMonitor(monitor, 1));
- task.setStale(false);
- task.setSynchronizing(false);
- if (task.getSynchronizationState() == RepositoryTaskSyncState.INCOMING
- || task.getSynchronizationState() == RepositoryTaskSyncState.CONFLICT) {
- TasksUiPlugin.getTaskListManager().getTaskList().notifyTaskChanged(task, true);
- } else {
- TasksUiPlugin.getTaskListManager().getTaskList().notifyTaskChanged(task, false);
- }
- }
-
- private void updateTask(IProgressMonitor monitor, TaskRepository repository, AbstractTask repositoryTask,
- RepositoryTaskData downloadedTaskData) throws CoreException {
-
- if (downloadedTaskData == null)
- return;
-
- // HACK: part of hack below
- Date oldDueDate = repositoryTask.getDueDate();
-
- TaskFactory factory = new TaskFactory(repository, true, forced);
- repositoryTask = factory.createTask(downloadedTaskData, new SubProgressMonitor(monitor, 1));
-
- // 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());
- }
-
- repositoryTask.setSynchronizing(false);
- repositoryTask.setStale(false);
- if (repositoryTask.getSynchronizationState() == RepositoryTaskSyncState.INCOMING
- || repositoryTask.getSynchronizationState() == RepositoryTaskSyncState.CONFLICT) {
- TasksUiPlugin.getTaskListManager().getTaskList().notifyTaskChanged(repositoryTask, true);
- } else {
- TasksUiPlugin.getTaskListManager().getTaskList().notifyTaskChanged(repositoryTask, false);
- }
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskFactory.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskFactory.java
deleted file mode 100644
index 5ff06e3cc..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskFactory.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.tasks.ui;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskDataHandler;
-import org.eclipse.mylyn.tasks.core.ITaskFactory;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.TaskList;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.AbstractTask.RepositoryTaskSyncState;
-
-/**
- * Used for creating tasks from repository task data.
- *
- * NOTE: likely to change for 3.0.
- *
- * @author Rob Elves
- */
-public class TaskFactory implements ITaskFactory {
-
- private final AbstractRepositoryConnector connector;
-
- private final RepositorySynchronizationManager synchManager;
-
- private final TaskRepository repository;
-
- private final TaskList 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 = TasksUiPlugin.getRepositoryManager().getRepositoryConnector(repository.getConnectorKind());
- synchManager = TasksUiPlugin.getSynchronizationManager();
- taskList = TasksUiPlugin.getTaskListManager().getTaskList();
- //dataManager = TasksUiPlugin.getTaskDataManager();
- dataHandler = connector.getTaskDataHandler();
- }
-
- @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 = taskList.getTask(taskData.getRepositoryUrl(), taskData.getId());
- if (repositoryTask == null) {
- repositoryTask = connector.createTaskFromTaskData(repository, taskData, updateTasklist, monitor);
- repositoryTask.setSynchronizationState(RepositoryTaskSyncState.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) {
- repositoryTask.clear();
- for (String subId : dataHandler.getSubTaskIds(taskData)) {
- if (subId == null || subId.trim().equals("")) {
- continue;
- }
- AbstractTask subTask = connector.createTaskFromExistingId(repository, subId, false,
- new SubProgressMonitor(monitor, 1));
- if (subTask != null) {
- taskList.addTask(subTask, repositoryTask);
- }
- }
- }
- }
- }
- return repositoryTask;
- }
-
- // TODO: Move all task construction code here
-
-// /**
-// * Create new repository task, adding result to tasklist
-// */
-// public AbstractTask createTaskFromExistingId(TaskRepository repository, String id,
-// boolean retrieveSubTasks, IProgressMonitor monitor) throws CoreException {
-// ITask task = taskList.getTask(repository.getUrl(), id);
-// AbstractTask repositoryTask = null;
-// if (task instanceof AbstractTask) {
-// repositoryTask = (AbstractTask) task;
-// } else if (task == null && dataHandler != null) {
-// RepositoryTaskData taskData = null;
-// taskData = dataHandler.getTaskData(repository, id, new SubProgressMonitor(monitor, 1));
-// if (taskData != null) {
-// repositoryTask = createTaskFromTaskData(repository, taskData, retrieveSubTasks, new SubProgressMonitor(
-// monitor, 1));
-// if (repositoryTask != null) {
-// 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
-// */
-// 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 && dataHandler != null) {
-// // Use connector task factory
-// repositoryTask = connector.createTask(repository.getUrl(), taskData.getId(), taskData.getId() + ": "
-// + taskData.getDescription());
-// connector.updateTaskFromTaskData(repository, repositoryTask, taskData);
-// dataManager.setNewTaskData(repositoryTask.getHandleIdentifier(), taskData);
-//
-// if (retrieveSubTasks) {
-// monitor.beginTask("Creating task", dataHandler.getSubTaskIds(taskData).size());
-// for (String subId : dataHandler.getSubTaskIds(taskData)) {
-// if (subId == null || subId.trim().equals("")) {
-// continue;
-// }
-// AbstractTask subTask = createTaskFromExistingId(repository, subId, false,
-// new SubProgressMonitor(monitor, 1));
-// if (subTask != null) {
-// repositoryTask.addSubTask(subTask);
-// }
-// }
-// }
-// }
-// } finally {
-// monitor.done();
-// }
-// return repositoryTask;
-// }
-
-}
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 ec8b9f3e2..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.openRepositoryTask(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/TaskListManager.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskListManager.java
deleted file mode 100644
index 10e2820cf..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskListManager.java
+++ /dev/null
@@ -1,849 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse 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.io.File;
-import java.net.URLDecoder;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.GregorianCalendar;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.Timer;
-import java.util.TimerTask;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.mylyn.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.LocalRepositoryConnector;
-import org.eclipse.mylyn.internal.tasks.core.LocalTask;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryTaskHandleUtil;
-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.TaskCategory;
-import org.eclipse.mylyn.internal.tasks.core.TaskDataManager;
-import org.eclipse.mylyn.internal.tasks.ui.ITasksUiConstants;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPreferenceConstants;
-import org.eclipse.mylyn.internal.tasks.ui.WorkspaceAwareContextStore;
-import org.eclipse.mylyn.internal.tasks.ui.util.TaskListSaveManager;
-import org.eclipse.mylyn.internal.tasks.ui.util.TaskListWriter;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskActivationHistory;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.monitor.core.InteractionEvent;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-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.RepositoryTaskAttribute;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.TaskContainerDelta;
-import org.eclipse.mylyn.tasks.core.TaskList;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.AbstractTask.PriorityLevel;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * Provides facilities for using and managing the Task List and task activity information.
- *
- * TODO: pull task activity management out into new TaskActivityManager NOTE: likely to change for 3.0
- *
- * @author Mik Kersten
- * @author Rob Elves (task activity)
- * @author Jevgeni Holodkov (insertQueries)
- * @since 2.0
- */
-public class TaskListManager implements IPropertyChangeListener {
-
- private static final long SECOND = 1000;
-
- private static final long MINUTE = 60 * SECOND;
-
- private static final long ROLLOVER_DELAY = 30 * MINUTE;
-
- // TODO: Remove
- public static final String ARCHIVE_CATEGORY_DESCRIPTION = "Archive";
-
- @Deprecated
- public static final String[] ESTIMATE_TIMES = new String[] { "0 Hours", "1 Hours", "2 Hours", "3 Hours", "4 Hours",
- "5 Hours", "6 Hours", "7 Hours", "8 Hours", "9 Hours", "10 Hours" };
-
- //private ScheduledTaskContainer scheduledThisWeek;
-
- //private List<ScheduledTaskContainer> scheduleWeekDays = new ArrayList<ScheduledTaskContainer>();
-//
-// private ScheduledTaskContainer scheduledNextWeek;
-//
-// private ScheduledTaskContainer scheduledFuture;
-//
-// private ScheduledTaskContainer scheduledPast;
-//
-// private ScheduledTaskContainer scheduledPrevious;
-
- //private ArrayList<ScheduledTaskContainer> scheduleContainers = new ArrayList<ScheduledTaskContainer>();
-
- private List<ITaskActivityListener> activityListeners = new ArrayList<ITaskActivityListener>();
-
- private TaskListWriter taskListWriter;
-
- private File taskListFile;
-
- private TaskListSaveManager taskListSaveManager;
-
- // TODO: guard against overwriting the single instance?
- private TaskList taskList = new TaskList();
-
- private TaskActivationHistory taskActivityHistory = new TaskActivationHistory();
-
- private boolean taskListInitialized = false;
-
- private Timer timer;
-
- /**
- * public for testing
- *
- * @deprecated use TaskActivityManager.getStartTime()
- */
- public Date startTime = new Date();
-
- private final ITaskListChangeListener CHANGE_LISTENER = new ITaskListChangeListener() {
-
- public void containersChanged(Set<TaskContainerDelta> containers) {
- for (TaskContainerDelta taskContainerDelta : containers) {
- if (taskContainerDelta.getContainer() instanceof AbstractTask) {
- switch (taskContainerDelta.getKind()) {
- case REMOVED:
- TaskListManager.this.resetAndRollOver();
- return;
- }
- }
- }
- }
- };
-
- public TaskListManager(TaskListWriter taskListWriter, File file) {
- this.taskListFile = file;
- this.taskListWriter = taskListWriter;
- timer = new Timer();
- timer.schedule(new RolloverCheck(), ROLLOVER_DELAY, ROLLOVER_DELAY);
- taskList.addChangeListener(CHANGE_LISTENER);
- }
-
- public void init() {
- }
-
- public void dispose() {
- }
-
- public TaskList resetTaskList() {
- resetAndRollOver();
- taskList.reset();
- taskListInitialized = true;
- return taskList;
- }
-
- public void refactorRepositoryUrl(String oldUrl, String newUrl) {
- if (oldUrl == null || newUrl == null || oldUrl.equals(newUrl)) {
- return;
- }
- List<AbstractTask> activeTasks = taskList.getActiveTasks();
- for (AbstractTask task : new ArrayList<AbstractTask>(activeTasks)) {
- deactivateTask(task);
- }
- refactorOfflineHandles(oldUrl, newUrl);
- taskList.refactorRepositoryUrl(oldUrl, newUrl);
- refactorMetaContextHandles(oldUrl, newUrl);
-
- File dataDir = new File(TasksUiPlugin.getDefault().getDataDirectory(),
- WorkspaceAwareContextStore.CONTEXTS_DIRECTORY);
- if (dataDir.exists() && dataDir.isDirectory()) {
- 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.getContextManager().getFileForContext(newHandle);
- file.renameTo(newFile);
- }
- }
- } catch (Exception e) {
- StatusHandler.fail(e, "Could not move context file: " + file.getName(), false);
- }
- }
- }
- }
-
- saveTaskList();
- }
-
- private void refactorMetaContextHandles(String oldRepositoryUrl, String newRepositoryUrl) {
- InteractionContext metaContext = ContextCorePlugin.getContextManager().getActivityMetaContext();
- ContextCorePlugin.getContextManager().resetActivityHistory();
- 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);
- }
- ContextCorePlugin.getContextManager().saveActivityContext();
- initActivityHistory();
- }
-
- private void refactorOfflineHandles(String oldRepositoryUrl, String newRepositoryUrl) {
- TaskDataManager taskDataManager = TasksUiPlugin.getTaskDataManager();
- for (AbstractTask task : taskList.getAllTasks()) {
- if (task != null) {
- AbstractTask 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.getTaskDataManager().saveNow();
- }
-
- public boolean readExistingOrCreateNewList() {
- try {
- if (taskListFile.exists()) {
- taskListWriter.readTaskList(taskList, taskListFile, TasksUiPlugin.getTaskDataManager());
- } else {
- resetTaskList();
- }
- taskListInitialized = true;
- resetAndRollOver();
- for (ITaskActivityListener listener : new ArrayList<ITaskActivityListener>(activityListeners)) {
- listener.taskListRead();
- }
- } catch (Throwable t) {
- StatusHandler.fail(t, "Could not read task list, consider restoring via view menu", true);
- return false;
- }
- return true;
- }
-
- /**
- * TODO: Move activation history to activity manager
- *
- * Only to be called upon initial startup by plugin.
- */
- public void initActivityHistory() {
- resetAndRollOver();
- taskActivityHistory.loadPersistentHistory();
- }
-
- /**
- * Will not save an empty task list to avoid losing data on bad startup.
- */
- public synchronized void saveTaskList() {
- try {
- if (taskListInitialized && taskListSaveManager != null) {
- taskListSaveManager.saveTaskList(true, false);
- } else {
- StatusHandler.log("task list save attempted before initialization", this);
- }
- } catch (Exception e) {
- StatusHandler.fail(e, "Could not save task list", true);
- }
- }
-
- public TaskList getTaskList() {
- return taskList;
- }
-
- public void addActivityListener(ITaskActivityListener listener) {
- activityListeners.add(listener);
- }
-
- public void removeActivityListener(ITaskActivityListener listener) {
- activityListeners.remove(listener);
- }
-
- public void activateTask(AbstractTask task) {
- activateTask(task, true);
- }
-
- public void activateTask(AbstractTask task, boolean addToHistory) {
- deactivateAllTasks();
- try {
- taskList.setActive(task, true);
- if (addToHistory) {
- taskActivityHistory.addTask(task);
- }
- for (ITaskActivityListener listener : new ArrayList<ITaskActivityListener>(activityListeners)) {
- try {
- listener.taskActivated(task);
- } catch (Throwable t) {
- StatusHandler.fail(t, "task activity listener failed: " + listener, false);
- }
- }
- } catch (Throwable t) {
- StatusHandler.fail(t, "could not activate task", false);
- }
- }
-
- public void deactivateAllTasks() {
- List<AbstractTask> activeTasks = taskList.getActiveTasks();
- for (AbstractTask task : activeTasks) {
- deactivateTask(task);
- }
- }
-
- public void deactivateTask(AbstractTask task) {
- if (task == null) {
- return;
- }
-
- if (task.isActive()) {
- taskList.setActive(task, false);
- for (ITaskActivityListener listener : new ArrayList<ITaskActivityListener>(activityListeners)) {
- try {
- listener.taskDeactivated(task);
- } catch (Throwable t) {
- StatusHandler.fail(t, "notification failed for: " + listener, false);
- }
- }
- }
- }
-
- public void setTaskListFile(File file) {
- this.taskListFile = file;
- }
-
- public void copyDataDirContentsTo(String newDataDir) {
- taskListSaveManager.copyDataDirContentsTo(newDataDir);
- }
-
- public boolean isTaskListInitialized() {
- return taskListInitialized;
- }
-
- public TaskListWriter getTaskListWriter() {
- return taskListWriter;
- }
-
- public File getTaskListFile() {
- return taskListFile;
- }
-
- public void propertyChange(PropertyChangeEvent event) {
- if (event.getProperty().equals(TasksUiPreferenceConstants.PLANNING_STARTHOUR)
- || event.getProperty().equals(TasksUiPreferenceConstants.PLANNING_ENDHOUR)) {
- // event.getProperty().equals(TaskListPreferenceConstants.PLANNING_STARTDAY)
- // scheduledStartHour =
- // TasksUiPlugin.getDefault().getPreferenceStore().getInt(
- // TaskListPreferenceConstants.PLANNING_STARTHOUR);
- TaskActivityManager.getInstance()
- .setEndHour(
- TasksUiPlugin.getDefault().getPreferenceStore().getInt(
- TasksUiPreferenceConstants.PLANNING_ENDHOUR));
- }
- }
-
- /**
- * public for testing TODO: Move to TaskActivityManager
- */
- public void resetAndRollOver() {
- resetAndRollOver(new Date());
- }
-
- /**
- * public for testing TODO: Move to TaskActivityManager
- */
- public void resetAndRollOver(Date startDate) {
- if (!TaskActivityManager.getInstance().isInitialized()) {
- TaskActivityManager.getInstance().init(TasksUiPlugin.getRepositoryManager(), taskList);
- TaskActivityManager.getInstance()
- .setEndHour(
- TasksUiPlugin.getDefault().getPreferenceStore().getInt(
- TasksUiPreferenceConstants.PLANNING_ENDHOUR));
- }
- startTime = startDate;
- if (isTaskListInitialized()) {
- TaskActivityManager.getInstance().reloadTimingData(startDate);
- }
- for (ITaskActivityListener listener : activityListeners) {
- listener.activityChanged(null);
- }
- }
-
- private class RolloverCheck extends TimerTask {
-
- @Override
- public void run() {
- if (!Platform.isRunning() || ContextCorePlugin.getDefault() == null) {
- return;
- } else {
- Calendar now = GregorianCalendar.getInstance();
- ScheduledTaskContainer thisWeek = TasksUiPlugin.getTaskActivityManager().getActivityThisWeek();
- if (!thisWeek.includes(now)) {
- resetAndRollOver();
- }
- }
- }
- }
-
- public TaskActivationHistory getTaskActivationHistory() {
- return taskActivityHistory;
- }
-
- /**
- * @param element
- * tasklist element to retrieve a task for currently will work for (ITask, AbstractQueryHit)
- * @param force -
- * if a query hit is passed you can either force construction of the task or not (if not and no task,
- * null is returned) TODO: Move into TaskList?
- */
- public AbstractTask getTaskForElement(AbstractTaskContainer element, boolean force) {
- AbstractTask task = null;
- if (element instanceof AbstractTask) {
- task = (AbstractTask) element;
- }
- return task;
- }
-
- protected void setTaskListSaveManager(TaskListSaveManager taskListSaveManager) {
- this.taskListSaveManager = taskListSaveManager;
- this.taskList.addChangeListener(taskListSaveManager);
- }
-
- /**
- * Creates a new local task and schedules for today
- *
- * @param summary
- * if null DEFAULT_SUMMARY (New Task) used.
- */
- public LocalTask createNewLocalTask(String summary) {
- if (summary == null) {
- summary = LocalRepositoryConnector.DEFAULT_SUMMARY;
- }
- LocalTask newTask = new LocalTask("" + taskList.getNextLocalTaskId(), summary);
- newTask.setPriority(PriorityLevel.P3.toString());
-
- 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 AbstractTask) {
- AbstractTask task = (AbstractTask) selectedObject;
-
- AbstractTaskContainer container = null;
- if (task.getChildren().size() > 0 && task.getParentContainers().iterator().hasNext()) {
- container = task.getParentContainers().iterator().next();
- }
- 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.getTaskListManager().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(), ITasksUiConstants.TITLE_DIALOG,
- "The new task has been added to the root of the list, since tasks can not be added to a query.");
- }
- taskList.addTask(newTask, taskList.getDefaultCategory());
- }
- return newTask;
- }
-
- /**
- * 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<AbstractRepositoryQuery> insertQueries(List<AbstractRepositoryQuery> queries) {
- List<AbstractRepositoryQuery> badQueries = new ArrayList<AbstractRepositoryQuery>();
-
- for (AbstractRepositoryQuery query : queries) {
-
- TaskRepository repository = TasksUiPlugin.getRepositoryManager().getRepository(query.getRepositoryKind(),
- query.getRepositoryUrl());
- if (repository == null) {
- badQueries.add(query);
- continue;
- }
-
- String handle = resolveIdentifiersConflict(query);
- query.setHandleIdentifier(handle);
-
- // add query
- TasksUiPlugin.getTaskListManager().getTaskList().addQuery(query);
-
- AbstractRepositoryConnector connector = TasksUiPlugin.getRepositoryManager().getRepositoryConnector(
- repository.getConnectorKind());
- if (connector != null) {
- TasksUiPlugin.getSynchronizationManager().synchronize(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 String resolveIdentifiersConflict(AbstractRepositoryQuery query) {
- String patternStr = "\\[(\\d+)\\]$"; // all string that end with [x], where x is a number
- Pattern pattern = Pattern.compile(patternStr);
-
- // resolve name conflict
- Set<AbstractRepositoryQuery> existingQueries = getTaskList().getQueries();
- Map<String, AbstractRepositoryQuery> queryMap = new HashMap<String, AbstractRepositoryQuery>();
- for (AbstractRepositoryQuery 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;
- }
-
- /** deprecated post 2.0 *********************************************** */
-
- /**
- * @deprecated use TaskActivityManager.getScheduledTasks
- */
- public Set<AbstractTask> getScheduledForThisWeek() {
- Calendar startWeek = TaskActivityUtil.getStartOfCurrentWeek();
- Calendar endWeek = TaskActivityUtil.getEndOfCurrentWeek();
- return TaskActivityManager.getInstance().getScheduledTasks(startWeek, endWeek);
- }
-
- /**
- * @deprecated use TaskActivityUtil.isScheduledAfterThisWeek
- */
- public boolean isScheduledAfterThisWeek(AbstractTask task) {
- return TaskActivityManager.getInstance().isScheduledAfterThisWeek(task);
- }
-
- /**
- * @deprecated use TaskActivityUtil.isScheduledForFuture
- */
- public boolean isScheduledForLater(AbstractTask task) {
- return TaskActivityManager.getInstance().isScheduledForFuture(task);
- }
-
- /**
- * @deprecated use TaskActivityUtil.isScheduledForThisWeek
- */
- public boolean isScheduledForThisWeek(AbstractTask task) {
- return TaskActivityManager.getInstance().isScheduledForThisWeek(task);
- }
-
- /**
- * @deprecated use TaskActivityManager.isScheduledForToday
- */
- public boolean isScheduledForToday(AbstractTask task) {
- return TaskActivityManager.getInstance().isScheduledForToday(task);
- }
-
- /**
- * @deprecated use TaskRepositoryManager.isOwnedBuyUser
- */
- public boolean isOwnedByUser(AbstractTask task) {
- return TasksUiPlugin.getRepositoryManager().isOwnedByUser(task);
- }
-
- /**
- * @deprecated use ActivityManager
- */
- public void setScheduledFor(AbstractTask task, Date reminderDate) {
- TaskActivityManager.getInstance().setScheduledFor(task, reminderDate);
- }
-
- /**
- * @deprecated use TaskActivityManager.setDueDate
- */
- public void setDueDate(AbstractTask task, Date dueDate) {
- TaskActivityManager.getInstance().setDueDate(task, dueDate);
- }
-
- /**
- * @deprecated use TaskActivityManager
- * @return true if task due date != null and has past
- */
- public boolean isOverdue(AbstractTask task) {
- return TaskActivityManager.getInstance().isOverdue(task);
- }
-
- /**
- * @deprecated use TaskActivityManager.isActiveThisWeek
- */
- public boolean isActiveThisWeek(AbstractTask task) {
- return TaskActivityManager.getInstance().isActiveThisWeek(task);
- }
-
- /**
- * @deprecated use TaskActivityManager.isCompletedToday
- * @return if a repository task, will only return true if the user is a
- */
- public boolean isCompletedToday(AbstractTask task) {
- return TaskActivityManager.getInstance().isCompletedToday(task);
- }
-
- @Deprecated
- public void parseFutureReminders() {
- // no longer required
- }
-
- /**
- * @deprecated use same method on TaskActivityManager
- */
- public long getElapsedTime(AbstractTask task) {
- return TasksUiPlugin.getTaskActivityManager().getElapsedTime(task);
- }
-
- /**
- * @deprecated use TaskActivityUtil.snapStartOfDay
- */
- public void snapToStartOfDay(Calendar cal) {
- TaskActivityUtil.snapStartOfDay(cal);
- }
-
- /**
- * @deprecated use TaskActivityUtil.snapStartOfHour
- */
- public void snapToStartOfHour(Calendar cal) {
- TaskActivityUtil.snapStartOfHour(cal);
- }
-
- /**
- * @deprecated use TaskActivityUtil.snapEndOfHour
- */
- public void snapToEndOfHour(Calendar cal) {
- TaskActivityUtil.snapEndOfHour(cal);
- }
-
- /**
- * @deprecated use TaskActivityUtil.snapEndOfDay
- */
- public void snapToEndOfDay(Calendar cal) {
- TaskActivityUtil.snapEndOfDay(cal);
- }
-
- /**
- * @deprecated use TaskActivityUtil.snapNextDay
- */
- public void snapToNextDay(Calendar cal) {
- TaskActivityUtil.snapNextDay(cal);
- }
-
- /**
- * @deprecated use TaskActivityUtil.snapStartOfWorkWeek
- */
- public void snapToStartOfWeek(Calendar cal) {
- TaskActivityUtil.snapStartOfWorkWeek(cal);
- }
-
- /**
- * @deprecated use TaskActivityUtil.snapEndOfWeek
- */
- public void snapToEndOfWeek(Calendar cal) {
- TaskActivityUtil.snapEndOfWeek(cal);
- }
-
- /**
- * @deprecated use TaskActivityUtil.snapForwardNumDays
- */
- public Calendar setSecheduledIn(Calendar calendar, int days) {
- return TaskActivityUtil.snapForwardNumDays(calendar, days);
- }
-
- /**
- * @deprecated use TaskActivityUtil.snapEndOfWorkDay
- */
- public Calendar setScheduledEndOfDay(Calendar calendar) {
- return TaskActivityUtil.snapEndOfWorkDay(calendar);
- }
-
- /**
- * @deprecated use TaskActivityUtil.snapNextWorkWeek
- */
- public void setScheduledNextWeek(Calendar calendar) {
- TaskActivityUtil.snapNextWorkWeek(calendar);
- }
-
- /**
- * @deprecated use TaskActivityManager.getDateRanges()
- */
- public List<ScheduledTaskContainer> getDateRanges() {
- return TasksUiPlugin.getTaskActivityManager().getDateRanges();
- }
-
- /**
- * @deprecated use TaskActivityManager.getActivityWeekDays()
- */
- public List<ScheduledTaskContainer> getActivityWeekDays() {
- return TasksUiPlugin.getTaskActivityManager().getActivityWeekDays();
- }
-
- /**
- * @deprecated use TaskActivityManager.isWeekDay()
- */
- public boolean isWeekDay(ScheduledTaskContainer dateRangeTaskContainer) {
- return TasksUiPlugin.getTaskActivityManager().isWeekDay(dateRangeTaskContainer);
- }
-
- /**
- * public for testing
- *
- * @deprecated
- */
- public ScheduledTaskContainer getActivityThisWeek() {
- return TasksUiPlugin.getTaskActivityManager().getActivityThisWeek();
- }
-
- /**
- * public for testing
- *
- * @deprecated
- */
- public ScheduledTaskContainer getActivityPast() {
- return TasksUiPlugin.getTaskActivityManager().getActivityPast();
- }
-
- /**
- * public for testing
- *
- * @deprecated
- */
- public ScheduledTaskContainer getActivityFuture() {
- return TasksUiPlugin.getTaskActivityManager().getActivityFuture();
- }
-
- /**
- * public for testing
- *
- * @deprecated
- */
- public ScheduledTaskContainer getActivityNextWeek() {
- return TasksUiPlugin.getTaskActivityManager().getActivityNextWeek();
- }
-
- /**
- * public for testing
- *
- * @deprecated
- */
- public ScheduledTaskContainer getActivityPrevious() {
- return TasksUiPlugin.getTaskActivityManager().getActivityPrevious();
- }
-
- /**
- * Use TaskActivityManager.getStartHour()
- *
- * @deprecated
- */
- public int getStartHour() {
- return TasksUiPlugin.getDefault().getPreferenceStore().getInt(TasksUiPreferenceConstants.PLANNING_ENDHOUR);
- }
-
- /**
- * Use TaskActivityManager.scheduleNewTask()
- *
- * @deprecated
- */
- public static void scheduleNewTask(AbstractTask newTask) {
- newTask.setCreationDate(new Date());
-
- 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) {
- TasksUiPlugin.getTaskListManager().setSecheduledIn(newTaskSchedule, 1);
- } else {
- TasksUiPlugin.getTaskListManager().setScheduledEndOfDay(newTaskSchedule);
- }
- TasksUiPlugin.getTaskListManager().setScheduledFor(newTask, newTaskSchedule.getTime());
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiPlugin.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiPlugin.java
deleted file mode 100644
index 1f932f64c..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiPlugin.java
+++ /dev/null
@@ -1,1077 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse 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.io.File;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Comparator;
-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.TreeSet;
-
-import org.eclipse.core.internal.net.ProxyManager;
-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.CoreException;
-import org.eclipse.core.runtime.Preferences.IPropertyChangeListener;
-import org.eclipse.core.runtime.Preferences.PropertyChangeEvent;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.text.hyperlink.IHyperlinkDetector;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.mylyn.context.core.ContextCorePlugin;
-import org.eclipse.mylyn.internal.context.core.ContextPreferenceContstants;
-import org.eclipse.mylyn.internal.tasks.core.LocalRepositoryConnector;
-import org.eclipse.mylyn.internal.tasks.core.ScheduledTaskContainer;
-import org.eclipse.mylyn.internal.tasks.core.TaskActivityManager;
-import org.eclipse.mylyn.internal.tasks.core.TaskDataManager;
-import org.eclipse.mylyn.internal.tasks.ui.IDynamicSubMenuContributor;
-import org.eclipse.mylyn.internal.tasks.ui.ITaskHighlighter;
-import org.eclipse.mylyn.internal.tasks.ui.ITaskListNotification;
-import org.eclipse.mylyn.internal.tasks.ui.ITaskListNotificationProvider;
-import org.eclipse.mylyn.internal.tasks.ui.ITasksUiConstants;
-import org.eclipse.mylyn.internal.tasks.ui.OfflineCachingStorage;
-import org.eclipse.mylyn.internal.tasks.ui.OfflineFileStorage;
-import org.eclipse.mylyn.internal.tasks.ui.RepositoryAwareStatusHandler;
-import org.eclipse.mylyn.internal.tasks.ui.TaskListBackupManager;
-import org.eclipse.mylyn.internal.tasks.ui.TaskListColorsAndFonts;
-import org.eclipse.mylyn.internal.tasks.ui.TaskListNotificationIncoming;
-import org.eclipse.mylyn.internal.tasks.ui.TaskListNotificationManager;
-import org.eclipse.mylyn.internal.tasks.ui.TaskListNotificationQueryIncoming;
-import org.eclipse.mylyn.internal.tasks.ui.TaskListNotificationReminder;
-import org.eclipse.mylyn.internal.tasks.ui.TaskListSynchronizationScheduler;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPreferenceConstants;
-import org.eclipse.mylyn.internal.tasks.ui.util.TaskListSaveManager;
-import org.eclipse.mylyn.internal.tasks.ui.util.TaskListWriter;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiExtensionReader;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskRepositoriesView;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.EditRepositoryWizard;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.tasks.core.AbstractTaskDataHandler;
-import org.eclipse.mylyn.tasks.core.ITaskActivityListener;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskAttribute;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.RepositoryTemplate;
-import org.eclipse.mylyn.tasks.core.TaskComment;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.tasks.core.AbstractTask.PriorityLevel;
-import org.eclipse.mylyn.tasks.core.AbstractTask.RepositoryTaskSyncState;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorFactory;
-import org.eclipse.mylyn.web.core.WebClientUtil;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IStartup;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * Main entry point for the Tasks UI.
- *
- * @author Mik Kersten
- * @since 2.0
- */
-public class TasksUiPlugin extends AbstractUIPlugin implements IStartup {
-
- public static final String LABEL_VIEW_REPOSITORIES = "Task Repositories view";
-
- 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 TaskListManager taskListManager;
-
- private static TaskActivityManager taskActivityManager;
-
- private static TaskRepositoryManager taskRepositoryManager;
-
- private static TaskListSynchronizationScheduler synchronizationScheduler;
-
- private static RepositorySynchronizationManager synchronizationManager;
-
- private static Map<String, AbstractRepositoryConnectorUi> repositoryConnectorUiMap = new HashMap<String, AbstractRepositoryConnectorUi>();
-
- private TaskListSaveManager taskListSaveManager;
-
- private TaskListNotificationManager taskListNotificationManager;
-
- private TaskListBackupManager taskListBackupManager;
-
- private TaskDataManager taskDataManager;
-
- private Set<AbstractTaskEditorFactory> taskEditorFactories = new HashSet<AbstractTaskEditorFactory>();
-
- private Set<IHyperlinkDetector> hyperlinkDetectors = new HashSet<IHyperlinkDetector>();
-
- private TreeSet<AbstractTaskRepositoryLinkProvider> repositoryLinkProviders = new TreeSet<AbstractTaskRepositoryLinkProvider>(
- new OrderComparator());
-
- private TaskListWriter taskListWriter;
-
- private ITaskHighlighter highlighter;
-
- private boolean initialized = false;
-
- private Map<String, Image> brandingIcons = new HashMap<String, Image>();
-
- private Map<String, ImageDescriptor> overlayIcons = new HashMap<String, ImageDescriptor>();
-
- private Set<AbstractDuplicateDetector> duplicateDetectors = new HashSet<AbstractDuplicateDetector>();
-
- private ISaveParticipant saveParticipant;
-
- 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 ITaskActivityListener CONTEXT_TASK_ACTIVITY_LISTENER = new ITaskActivityListener() {
-
- public void taskActivated(final AbstractTask task) {
- ContextCorePlugin.getContextManager().activateContext(task.getHandleIdentifier());
- }
-
- public void taskDeactivated(final AbstractTask task) {
- ContextCorePlugin.getContextManager().deactivateContext(task.getHandleIdentifier());
- }
-
- public void activityChanged(ScheduledTaskContainer week) {
- // ignore
- }
-
- public void taskListRead() {
- // ignore
- }
- };
-
- private static ITaskListNotificationProvider REMINDER_NOTIFICATION_PROVIDER = new ITaskListNotificationProvider() {
-
- public Set<ITaskListNotification> getNotifications() {
- Date currentDate = new Date();
- Collection<AbstractTask> allTasks = TasksUiPlugin.getTaskListManager().getTaskList().getAllTasks();
- Set<ITaskListNotification> reminders = new HashSet<ITaskListNotification>();
- for (AbstractTask task : allTasks) {
- if (!task.isCompleted() && task.getScheduledForDate() != null && !task.isReminded()
- && task.getScheduledForDate().compareTo(currentDate) < 0) {
- reminders.add(new TaskListNotificationReminder(task));
- task.setReminded(true);
- }
- }
- return reminders;
- }
- };
-
- private static ITaskListNotificationProvider INCOMING_NOTIFICATION_PROVIDER = new ITaskListNotificationProvider() {
-
- public Set<ITaskListNotification> getNotifications() {
- Set<ITaskListNotification> notifications = new HashSet<ITaskListNotification>();
- // Incoming Changes
- for (TaskRepository repository : getRepositoryManager().getAllRepositories()) {
- AbstractRepositoryConnector connector = getRepositoryManager().getRepositoryConnector(
- repository.getConnectorKind());
- AbstractRepositoryConnectorUi connectorUi = getConnectorUi(repository.getConnectorKind());
- if (connectorUi != null && !connectorUi.isCustomNotificationHandling()) {
- for (AbstractTask repositoryTask : TasksUiPlugin.getTaskListManager()
- .getTaskList()
- .getRepositoryTasks(repository.getUrl())) {
- if ((repositoryTask.getLastReadTimeStamp() == null || repositoryTask.getSynchronizationState() == RepositoryTaskSyncState.INCOMING)
- && repositoryTask.isNotified() == false) {
- TaskListNotificationIncoming notification = INSTANCE.getIncommingNotification(connector,
- repositoryTask);
- notifications.add(notification);
- repositoryTask.setNotified(true);
- }
- }
- }
- }
- // New query hits
- for (AbstractRepositoryQuery query : TasksUiPlugin.getTaskListManager().getTaskList().getQueries()) {
- AbstractRepositoryConnectorUi connectorUi = getConnectorUi(query.getRepositoryKind());
- if (!connectorUi.isCustomNotificationHandling()) {
- for (AbstractTask hit : query.getChildren()) {
- if (hit.isNotified() == false) {
- notifications.add(new TaskListNotificationQueryIncoming(hit));
- 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(true);
- }
- }
- }
-
- };
-
- 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(true);
- }
- }
- }
-
- };
-
- public TasksUiPlugin() {
- super();
- INSTANCE = this;
- }
-
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- // NOTE: startup order is very sensitive
- try {
- StatusHandler.addStatusHandler(new RepositoryAwareStatusHandler());
- WebClientUtil.initCommonsLoggingSettings();
- initializeDefaultPreferences(getPreferenceStore());
- taskListWriter = new TaskListWriter();
-
- File dataDir = new File(getDataDirectory());
- dataDir.mkdirs();
- String path = getDataDirectory() + File.separator + ITasksUiConstants.DEFAULT_TASK_LIST_FILE;
-
- File taskListFile = new File(path);
- taskListManager = new TaskListManager(taskListWriter, taskListFile);
- taskActivityManager = TaskActivityManager.getInstance();
- taskRepositoryManager = new TaskRepositoryManager(taskListManager.getTaskList());
-
- IProxyService proxyService = ProxyManager.getProxyManager();
- IProxyChangeListener proxyChangeListener = new TasksUiProxyChangeListener(taskRepositoryManager);
- proxyService.addProxyChangeListener(proxyChangeListener);
-
- synchronizationManager = new RepositorySynchronizationManager();
-
- // NOTE: initializing extensions in start(..) has caused race
- // conditions previously
- TasksUiExtensionReader.initStartupExtensions(taskListWriter);
-
- taskRepositoryManager.readRepositories(getRepositoriesFilePath());
-
- // instantiates taskDataManager
- startOfflineStorageManager();
-
- loadTemplateRepositories();
-
- // NOTE: task list must be read before Task List view can be
- // initialized
- taskListManager.init();
- taskListManager.addActivityListener(CONTEXT_TASK_ACTIVITY_LISTENER);
- taskListManager.readExistingOrCreateNewList();
- initialized = true;
-
- // if the taskListManager didn't initialize do it here
- if (!taskActivityManager.isInitialized()) {
- taskActivityManager.init(taskRepositoryManager, taskListManager.getTaskList());
- taskActivityManager.setEndHour(getPreferenceStore().getInt(TasksUiPreferenceConstants.PLANNING_ENDHOUR));
- }
-
- 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) {
- taskListManager.saveTaskList();
- taskDataManager.stop();
- }
- }
- };
- ResourcesPlugin.getWorkspace().addSaveParticipant(this, saveParticipant);
-
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- // NOTE: failure in one part of the initialization should
- // not prevent others
- try {
- // Needs to run after workbench is loaded because it
- // relies on images.
- TasksUiExtensionReader.initWorkbenchUiExtensions();
-
- // Needs to happen asynchronously to avoid bug 159706
- if (taskListManager.getTaskList().getActiveTask() != null) {
- taskListManager.activateTask(taskListManager.getTaskList().getActiveTask());
- }
- taskListManager.initActivityHistory();
- } catch (Throwable t) {
- StatusHandler.fail(t, "Could not initialize task activity", false);
- }
-
- try {
- taskListNotificationManager = new TaskListNotificationManager();
- taskListNotificationManager.addNotificationProvider(REMINDER_NOTIFICATION_PROVIDER);
- taskListNotificationManager.addNotificationProvider(INCOMING_NOTIFICATION_PROVIDER);
- taskListNotificationManager.startNotification(NOTIFICATION_DELAY);
- getPreferenceStore().addPropertyChangeListener(taskListNotificationManager);
- } catch (Throwable t) {
- StatusHandler.fail(t, "Could not initialize notifications", false);
- }
-
- try {
- taskListBackupManager = new TaskListBackupManager();
- getPreferenceStore().addPropertyChangeListener(taskListBackupManager);
-
- synchronizationScheduler = new TaskListSynchronizationScheduler(true);
- synchronizationScheduler.startSynchJob();
- } catch (Throwable t) {
- StatusHandler.fail(t, "Could not initialize task list backup and synchronization", false);
- }
-
- try {
- taskListSaveManager = new TaskListSaveManager();
- taskListManager.setTaskListSaveManager(taskListSaveManager);
-
- ContextCorePlugin.getDefault().getPluginPreferences().addPropertyChangeListener(
- PREFERENCE_LISTENER);
-
- getPreferenceStore().addPropertyChangeListener(PROPERTY_LISTENER);
- getPreferenceStore().addPropertyChangeListener(synchronizationScheduler);
- getPreferenceStore().addPropertyChangeListener(taskListManager);
-
- // TODO: get rid of this, hack to make decorators show
- // up on startup
- TaskRepositoriesView repositoriesView = TaskRepositoriesView.getFromActivePerspective();
- if (repositoriesView != null) {
- repositoriesView.getViewer().refresh();
- }
- checkForCredentials();
- } catch (Throwable t) {
- StatusHandler.fail(t, "Could not finish Tasks UI initialization", false);
- }
- }
- });
- } catch (Exception e) {
- e.printStackTrace();
- StatusHandler.fail(e, "Mylyn Task List initialization failed", false);
- }
- }
-
- private void loadTemplateRepositories() {
-
- // Add standard local task repository
- if (taskRepositoryManager.getRepository(LocalRepositoryConnector.REPOSITORY_URL) == null) {
- TaskRepository localRepository = new TaskRepository(LocalRepositoryConnector.REPOSITORY_KIND,
- LocalRepositoryConnector.REPOSITORY_URL, LocalRepositoryConnector.REPOSITORY_VERSION);
- localRepository.setRepositoryLabel(LocalRepositoryConnector.REPOSITORY_LABEL);
- localRepository.setAnonymous(true);
- taskRepositoryManager.addRepository(localRepository, getRepositoriesFilePath());
- }
-
- // Add the automatically created templates
- for (AbstractRepositoryConnector connector : taskRepositoryManager.getRepositoryConnectors()) {
- connector.setTaskDataManager(taskDataManager);
-
- for (RepositoryTemplate template : connector.getTemplates()) {
- if (template.addAutomatically) {
- try {
- TaskRepository taskRepository = taskRepositoryManager.getRepository(
- connector.getConnectorKind(), template.repositoryUrl);
- if (taskRepository == null) {
- taskRepository = new TaskRepository(connector.getConnectorKind(), template.repositoryUrl,
- template.version);
- taskRepository.setRepositoryLabel(template.label);
- taskRepository.setAnonymous(true);
- taskRepositoryManager.addRepository(taskRepository, getRepositoriesFilePath());
- }
- } catch (Throwable t) {
- StatusHandler.fail(t, "Could not load repository template", false);
- }
- }
- }
- }
- }
-
- private void checkForCredentials() {
- for (TaskRepository repository : taskRepositoryManager.getAllRepositories()) {
- AbstractRepositoryConnector connector = getRepositoryManager().getRepositoryConnector(
- repository.getConnectorKind());
- boolean userManaged = true;
- if (connector != null) {
- userManaged = connector.isUserManaged();
- }
- if (!repository.isAnonymous()
- && !userManaged
- && (repository.getUserName() == null || repository.getPassword() == null
- || "".equals(repository.getUserName()) || "".equals(repository.getPassword()))) {
- 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.setTitle("Repository Credentials Missing");
- dialog.setErrorMessage("Authentication credentials missing.");
- dialog.setBlockOnOpen(true);
- if (dialog.open() == Dialog.CANCEL) {
- dialog.close();
- return;
- }
- }
- } catch (Exception e) {
- StatusHandler.fail(e, e.getMessage(), true);
- }
- }
- }
- }
-
- public void earlyStartup() {
- // ignore
- }
-
- @Override
- public void stop(BundleContext context) throws Exception {
- try {
-
- if (ResourcesPlugin.getWorkspace() != null) {
- ResourcesPlugin.getWorkspace().removeSaveParticipant(this);
- }
-
- if (PlatformUI.isWorkbenchRunning()) {
- getPreferenceStore().removePropertyChangeListener(taskListNotificationManager);
- getPreferenceStore().removePropertyChangeListener(taskListBackupManager);
- getPreferenceStore().removePropertyChangeListener(taskListManager);
- getPreferenceStore().removePropertyChangeListener(synchronizationScheduler);
- getPreferenceStore().removePropertyChangeListener(PROPERTY_LISTENER);
- taskListManager.getTaskList().removeChangeListener(taskListSaveManager);
- taskListManager.dispose();
- TaskListColorsAndFonts.dispose();
- if (ContextCorePlugin.getDefault() != null) {
- ContextCorePlugin.getDefault().getPluginPreferences().removePropertyChangeListener(
- PREFERENCE_LISTENER);
- }
- INSTANCE = null;
- }
- } catch (Exception e) {
- StatusHandler.log(e, "Mylyn Task List stop terminated abnormally");
- } finally {
- super.stop(context);
- }
- }
-
- public String getDefaultDataDirectory() {
- return ResourcesPlugin.getWorkspace().getRoot().getLocation().toString() + '/' + DIRECTORY_METADATA + '/'
- + NAME_DATA_DIR;
- }
-
- /**
- * Only attempt once per startup.
- */
- private boolean attemptMigration = true;
-
- public synchronized String getDataDirectory() {
- if (attemptMigration) {
- migrateFromLegacyDirectory();
- attemptMigration = false;
- }
-// return ContextCorePlugin.getDefault().getContextStore().getRootDirectory().getAbsolutePath();
- return getPreferenceStore().getString(ContextPreferenceContstants.PREF_DATA_DIR);
- }
-
- private void migrateFromLegacyDirectory() {
- // Migrate .mylar data folder to .metadata/.mylyn
- String oldDefaultDataPath = ResourcesPlugin.getWorkspace().getRoot().getLocation().toString() + '/' + ".mylar";
- File oldDefaultDataDir = new File(oldDefaultDataPath);
- if (oldDefaultDataDir.exists()) { // && !newDefaultDataDir.exists()) {
- File metadata = new File(ResourcesPlugin.getWorkspace().getRoot().getLocation().toString() + '/'
- + DIRECTORY_METADATA);
- if (!metadata.exists()) {
- if (!metadata.mkdirs()) {
- StatusHandler.log("Unable to create metadata folder: " + metadata.getAbsolutePath(), this);
- }
- }
- File newDefaultDataDir = new File(getPreferenceStore().getString(ContextPreferenceContstants.PREF_DATA_DIR));
- if (metadata.exists()) {
- if (!oldDefaultDataDir.renameTo(newDefaultDataDir)) {
- StatusHandler.log("Could not migrate legacy data from " + oldDefaultDataDir.getAbsolutePath()
- + " to " + TasksUiPlugin.getDefault().getDefaultDataDirectory(), this);
- } else {
- StatusHandler.log("Migrated legacy task data from " + oldDefaultDataDir.getAbsolutePath() + " to "
- + TasksUiPlugin.getDefault().getDefaultDataDirectory(), this);
- }
- }
- }
- }
-
- public void setDataDirectory(String newPath) {
- getTaskListManager().saveTaskList();
- ContextCorePlugin.getContextManager().saveActivityContext();
- getPreferenceStore().setValue(ContextPreferenceContstants.PREF_DATA_DIR, newPath);
- ContextCorePlugin.getDefault().getContextStore().contextStoreMoved();
- }
-
- /**
- * Only support task data versions post 0.7
- *
- * @param withProgress
- */
- public void reloadDataDirectory(boolean withProgress) {
- getTaskListManager().resetTaskList();
- getTaskListManager().getTaskActivationHistory().clear();
- getRepositoryManager().readRepositories(getRepositoriesFilePath());
- loadTemplateRepositories();
- ContextCorePlugin.getContextManager().loadActivityMetaContext();
- getTaskListManager().setTaskListFile(
- new File(getDataDirectory() + File.separator + ITasksUiConstants.DEFAULT_TASK_LIST_FILE));
- getTaskListManager().readExistingOrCreateNewList();
- getTaskListManager().initActivityHistory();
- checkForCredentials();
- }
-
- @Override
- protected void initializeDefaultPreferences(IPreferenceStore store) {
- store.setDefault(ContextPreferenceContstants.PREF_DATA_DIR, getDefaultDataDirectory());
- store.setDefault(TasksUiPreferenceConstants.GROUP_SUBTASKS, true);
- store.setDefault(TasksUiPreferenceConstants.NOTIFICATIONS_ENABLED, true);
- store.setDefault(TasksUiPreferenceConstants.FILTER_PRIORITY, PriorityLevel.P5.toString());
- store.setDefault(TasksUiPreferenceConstants.EDITOR_TASKS_RICH, true);
- store.setDefault(TasksUiPreferenceConstants.ACTIVATE_WHEN_OPENED, false);
- store.setDefault(TasksUiPreferenceConstants.SHOW_TRIM, false);
-
- store.setDefault(TasksUiPreferenceConstants.REPOSITORY_SYNCH_SCHEDULE_ENABLED, true);
- store.setDefault(TasksUiPreferenceConstants.REPOSITORY_SYNCH_SCHEDULE_MILISECONDS, "" + (20 * 60 * 1000));
-
- store.setDefault(TasksUiPreferenceConstants.BACKUP_SCHEDULE, 1);
- store.setDefault(TasksUiPreferenceConstants.BACKUP_MAXFILES, 20);
- store.setDefault(TasksUiPreferenceConstants.BACKUP_LAST, 0f);
-
- store.setDefault(TasksUiPreferenceConstants.FILTER_ARCHIVE_MODE, true);
- store.setDefault(TasksUiPreferenceConstants.ACTIVATE_MULTIPLE, false);
- store.setValue(TasksUiPreferenceConstants.ACTIVATE_MULTIPLE, false);
-
- store.setDefault(TasksUiPreferenceConstants.PLANNING_STARTHOUR, 9);
- store.setDefault(TasksUiPreferenceConstants.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(AbstractTaskContainer container){
- boolean groupSubtasks = TasksUiPlugin.getDefault().getPreferenceStore().getBoolean(
- TasksUiPreferenceConstants.GROUP_SUBTASKS);
-
- if(container instanceof AbstractTask){
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(((AbstractTask)container).getConnectorKind());
- if (connectorUi != null) {
- if (connectorUi.forceSubtaskHierarchy()) {
- groupSubtasks = true;
- }
- }
- }
-
- if(container instanceof AbstractRepositoryQuery){
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(((AbstractRepositoryQuery)container).getRepositoryKind());
- if (connectorUi != null) {
- if (connectorUi.forceSubtaskHierarchy()) {
- groupSubtasks = true;
- }
- }
- }
-
- return groupSubtasks;
- }
-
- private Map<String, List<IDynamicSubMenuContributor>> menuContributors = new HashMap<String, List<IDynamicSubMenuContributor>>();
-
- public Map<String, List<IDynamicSubMenuContributor>> getDynamicMenuMap() {
- return menuContributors;
- }
-
- 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 + ITasksUiConstants.DEFAULT_BACKUP_FOLDER_NAME;
- }
-
- public ITaskHighlighter getHighlighter() {
- return highlighter;
- }
-
- public void setHighlighter(ITaskHighlighter highlighter) {
- this.highlighter = highlighter;
- }
-
- public Set<AbstractTaskEditorFactory> getTaskEditorFactories() {
- return taskEditorFactories;
- }
-
- public void addContextEditor(AbstractTaskEditorFactory contextEditor) {
- if (contextEditor != null)
- this.taskEditorFactories.add(contextEditor);
- }
-
- public static TaskRepositoryManager getRepositoryManager() {
- return taskRepositoryManager;
- }
-
- 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 boolean isInitialized() {
- return initialized;
- }
-
- public IHyperlinkDetector[] getTaskHyperlinkDetectors() {
- return hyperlinkDetectors.toArray(new IHyperlinkDetector[1]);
- }
-
- public void addTaskHyperlinkDetector(IHyperlinkDetector listener) {
- if (listener != null)
- this.hyperlinkDetectors.add(listener);
- }
-
- public void addRepositoryLinkProvider(AbstractTaskRepositoryLinkProvider repositoryLinkProvider) {
- if (repositoryLinkProvider != null)
- this.repositoryLinkProviders.add(repositoryLinkProvider);
- }
-
- public TaskListBackupManager getBackupManager() {
- return taskListBackupManager;
- }
-
- private void startOfflineStorageManager() {
- //IPath offlineReportsPath = Platform.getStateLocation(TasksUiPlugin.getDefault().getBundle());
- File root = new File(this.getDataDirectory() + '/' + FOLDER_OFFLINE);
- OfflineFileStorage storage = new OfflineFileStorage(root);
- OfflineCachingStorage cachedStorage = new OfflineCachingStorage(storage);
- taskDataManager = new TaskDataManager(taskRepositoryManager, cachedStorage);
- taskDataManager.start();
- }
-
- public static TaskDataManager getTaskDataManager() {
- if (INSTANCE == null || INSTANCE.taskDataManager == null) {
- StatusHandler.fail(null, "Offline reports file not created, try restarting.", true);
- return null;
- } else {
- return INSTANCE.taskDataManager;
- }
- }
-
- public void addRepositoryConnectorUi(AbstractRepositoryConnectorUi repositoryConnectorUi) {
- if (!repositoryConnectorUiMap.values().contains(repositoryConnectorUi)) {
- repositoryConnectorUiMap.put(repositoryConnectorUi.getConnectorKind(), repositoryConnectorUi);
- }
- }
-
- public static AbstractRepositoryConnectorUi getConnectorUi(String kind) {
- return repositoryConnectorUiMap.get(kind);
- }
-
- public static TaskListSynchronizationScheduler getSynchronizationScheduler() {
- return synchronizationScheduler;
- }
-
- public static RepositorySynchronizationManager getSynchronizationManager() {
- return synchronizationManager;
- }
-
- public void addDuplicateDetector(AbstractDuplicateDetector duplicateDetector) {
- if (duplicateDetector != null) {
- duplicateDetectors.add(duplicateDetector);
- }
- }
-
- public Set<AbstractDuplicateDetector> getDuplicateSearchCollectorsList() {
- return duplicateDetectors;
- }
-
- public String getRepositoriesFilePath() {
- return getDataDirectory() + File.separator + TaskRepositoryManager.DEFAULT_REPOSITORIES_FILE;
- }
-
- 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)
- */
- public TaskRepository getRepositoryForResource(IResource resource, boolean silent) {
- if (resource == null) {
- return null;
- }
-
- for (AbstractTaskRepositoryLinkProvider linkProvider : repositoryLinkProviders) {
- TaskRepository repository = linkProvider.getTaskRepository(resource, getRepositoryManager());
- if (repository != null) {
- return repository;
- }
- }
-
- if (!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 null;
- }
-
- /**
- * Public for testing.
- */
- public static TaskListSaveManager getTaskListSaveManager() {
- return INSTANCE.taskListSaveManager;
- }
-
- public String getNextNewRepositoryTaskId() {
- return getTaskDataManager().getNewRepositoryTaskId();
- }
-
- /**
- * TODO: move, uses internal class.
- */
- public TaskListNotificationIncoming getIncommingNotification(AbstractRepositoryConnector connector,
- AbstractTask task) {
-
- TaskListNotificationIncoming notification = new TaskListNotificationIncoming(task);
- RepositoryTaskData newTaskData = getTaskDataManager().getNewTaskData(task.getRepositoryUrl(), task.getTaskId());
- RepositoryTaskData oldTaskData = getTaskDataManager().getOldTaskData(task.getRepositoryUrl(), task.getTaskId());
-
- try {
- if (task.getSynchronizationState().equals(RepositoryTaskSyncState.INCOMING)
- && task.getLastReadTimeStamp() == null) {
- notification.setDescription("New unread task");
- } else if (newTaskData != null && oldTaskData != null) {
- notification.setDescription(getChangedDescription(newTaskData, oldTaskData));
- notification.setDetails(getChangedAttributes(newTaskData, oldTaskData));
-
- if (connector != null) {
- AbstractTaskDataHandler offlineHandler = connector.getTaskDataHandler();
- 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.fail(t, "Could not format notification for: " + task, false);
- }
- return notification;
- }
-
- 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 += cleanValue(lastComment.getText());
- }
- }
- }
-
- return descriptionText;
- }
-
- private static String getChangedAttributes(RepositoryTaskData newTaskData, RepositoryTaskData oldTaskData) {
- List<Change> changes = new ArrayList<Change>();
- for (RepositoryTaskAttribute newAttribute : newTaskData.getAttributes()) {
- // HACK delta_ts is not a standard attribute
- if ("delta_ts,longdesclength,".contains(newAttribute.getId())) {
- continue;
- }
- List<String> newValues = newAttribute.getValues();
- if (newValues != null) {
- RepositoryTaskAttribute oldAttribute = oldTaskData.getAttribute(newAttribute.getId());
- if (oldAttribute == null) {
- changes.add(getDiff(newAttribute.getName(), null, newValues));
- }
- if (oldAttribute != null) {
- List<String> oldValues = oldAttribute.getValues();
- if (!oldValues.equals(newValues)) {
- changes.add(getDiff(newAttribute.getName(), oldValues, newValues));
- }
- }
- }
- }
-
- for (RepositoryTaskAttribute oldAttribute : oldTaskData.getAttributes()) {
- if (oldAttribute.isHidden()) { // may not be a good idea
- continue;
- }
- RepositoryTaskAttribute attribute = newTaskData.getAttribute(oldAttribute.getId());
- List<String> values = oldAttribute.getValues();
- if (attribute == null && values != null && !values.isEmpty()) {
- changes.add(getDiff(oldAttribute.getName(), 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 += " -> " + added;
- sep = "\n";
-
-// if (!change.removed.isEmpty()) {
-// details += "- " + change.field + " " + change.removed;
-// sep = "\n";
-// }
-// if (!change.added.isEmpty()) {
-// details += sep;
-// details += "+ " + change.field + " " + change.added;
-// sep = "\n";
-// }
-
- n++;
- if (n > 5) {
- details += "\nOpen to view more changes";
- break;
- }
- }
- if (!details.equals("")) {
- return "Attributes Changed:\n" + details;
- }
- return details;
- }
-
- private static String cleanValues(List<String> values) {
- StringBuilder sb = new StringBuilder();
- sb.append("[");
- boolean first = true;
- for (String value : values) {
- if (!first)
- sb.append(", ");
- sb.append(cleanValue(value));
- }
- sb.append("]");
- return sb.toString();
- }
-
- private static String cleanValue(String value) {
- String commentText = value.replaceAll("\\s", " ").trim();
- if (commentText.length() > 60) {
- commentText = commentText.substring(0, 55) + "...";
- }
- return commentText;
- }
-
- private static Change getDiff(String field, List<String> oldValues, List<String> newValues) {
- Change change = new Change(field, newValues);
- if (oldValues != null) {
- for (String value : oldValues) {
- if (change.added.contains(value)) {
- change.added.remove(value);
- } else {
- change.removed.add(value);
- }
- }
- }
- return change;
- }
-
- private static class Change {
-
- final String field;
-
- final List<String> added;
-
- final List<String> removed = new ArrayList<String>();
-
- public Change(String field, List<String> newValues) {
- this.field = field;
- this.added = new ArrayList<String>(newValues);
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiProxyChangeListener.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiProxyChangeListener.java
deleted file mode 100644
index 03301dd3c..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiProxyChangeListener.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.ui;
-
-import java.util.List;
-
-import org.eclipse.core.net.proxy.IProxyChangeEvent;
-import org.eclipse.core.net.proxy.IProxyChangeListener;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.TaskRepositoryManager;
-
-/**
- * @author Nathan Hapke
- */
-public class TasksUiProxyChangeListener implements IProxyChangeListener {
- private TaskRepositoryManager taskRepositoryManager;
-
- public TasksUiProxyChangeListener(TaskRepositoryManager taskRepositoryManager) {
- this.taskRepositoryManager = taskRepositoryManager;
- }
-
- public void proxyInfoChanged(IProxyChangeEvent event) {
- List<TaskRepository> repos = taskRepositoryManager.getAllRepositories();
- for (TaskRepository repo : repos) {
- if (repo.isDefaultProxyEnabled()) {
- taskRepositoryManager.notifyRepositorySettingsChanged(repo);
- }
- }
- }
-}
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 709c359c0..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiUtil.java
+++ /dev/null
@@ -1,558 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse 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.ArrayList;
-import java.util.Calendar;
-import java.util.List;
-
-import org.eclipse.core.resources.IResource;
-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.jobs.IJobChangeEvent;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.core.runtime.jobs.JobChangeAdapter;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.preference.IPreferenceNode;
-import org.eclipse.jface.preference.IPreferencePage;
-import org.eclipse.jface.preference.PreferenceDialog;
-import org.eclipse.jface.preference.PreferenceManager;
-import org.eclipse.jface.preference.PreferenceNode;
-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.WizardDialog;
-import org.eclipse.mylyn.internal.tasks.core.LocalTask;
-import org.eclipse.mylyn.internal.tasks.core.ScheduledTaskDelegate;
-import org.eclipse.mylyn.internal.tasks.core.TaskCategory;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPreferenceConstants;
-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.TaskRepositoriesView;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.EditRepositoryWizard;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.AbstractTask.RepositoryTaskSyncState;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditorInput;
-import org.eclipse.swt.custom.BusyIndicator;
-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.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;
-
-/**
- * @author Mik Kersten
- */
-public class TasksUiUtil {
-
- public static final String PREFS_PAGE_ID_COLORS_AND_FONTS = "org.eclipse.ui.preferencePages.ColorsAndFonts";
-
- public static final int FLAG_NO_RICH_EDITOR = 1 << 17;
-
- /**
- * Resolves a rich editor for the task if available. Must be called from UI thread.
- */
- public static void openUrl(String url, boolean useRichEditorIfAvailable) {
- try {
- if (useRichEditorIfAvailable) {
- AbstractTask task = TasksUiPlugin.getTaskListManager().getTaskList().getRepositoryTask(url);
- if (task != null && !(task instanceof LocalTask)) {
- refreshAndOpenTaskListElement(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 = TasksUiPlugin.getRepositoryManager().getRepository(repositoryUrl);
- opened = openRepositoryTask(repository, id);
- }
- if (!opened) {
- openUrl(url, 0);
- }
-
- }
- } else {
- openUrl(url, FLAG_NO_RICH_EDITOR);
- }
- } catch (PartInitException e) {
- MessageDialog.openError(Display.getDefault().getActiveShell(), "Browser init error",
- "Browser could not be initiated");
- } catch (MalformedURLException e) {
- MessageDialog.openError(Display.getDefault().getActiveShell(), "URL not found", "URL Could not be opened");
- }
- }
-
- private static void openUrl(String url, int customFlags) throws PartInitException, MalformedURLException {
- if (WebBrowserPreference.getBrowserChoice() == WebBrowserPreference.EXTERNAL) {
- try {
- IWorkbenchBrowserSupport support = PlatformUI.getWorkbench().getBrowserSupport();
- support.getExternalBrowser().openURL(new URL(url));
- } catch (Exception e) {
- StatusHandler.fail(e, "could not open task url", true);
- }
- } else {
- IWebBrowser browser = null;
- int flags = 0;
- if (WorkbenchBrowserSupport.getInstance().isInternalWebBrowserAvailable()) {
- flags = WorkbenchBrowserSupport.AS_EDITOR | WorkbenchBrowserSupport.LOCATION_BAR
- | WorkbenchBrowserSupport.NAVIGATION_BAR | customFlags;
- } else {
- flags = WorkbenchBrowserSupport.AS_EXTERNAL | WorkbenchBrowserSupport.LOCATION_BAR
- | WorkbenchBrowserSupport.NAVIGATION_BAR | customFlags;
- }
-
- String generatedId = "org.eclipse.mylyn.web.browser-" + Calendar.getInstance().getTimeInMillis();
- browser = WorkbenchBrowserSupport.getInstance().createBrowser(flags, generatedId, null, null);
- browser.openURL(new URL(url));
- }
- }
-
- public static boolean openRepositoryTask(TaskRepository repository, String taskId) {
- if (repository == null || taskId == null) {
- return false;
- }
- boolean opened = false;
- AbstractTask task = TasksUiPlugin.getTaskListManager().getTaskList().getTask(repository.getUrl(), taskId);
- if (task == null) {
- task = TasksUiPlugin.getTaskListManager().getTaskList().getTaskByKey(repository.getUrl(), taskId);
- }
- if (task != null) {
- TasksUiUtil.refreshAndOpenTaskListElement(task);
- opened = true;
- } else {
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(repository.getConnectorKind());
- if (connectorUi != null) {
- try {
- opened = connectorUi.openRepositoryTask(repository.getUrl(), taskId);
- } catch (Exception e) {
- StatusHandler.log(e, "Internal error while opening repository task");
- }
- }
- }
- return opened;
- }
-
- /**
- * Either pass in a repository and taskId, or fullUrl, or all of them
- */
- public static boolean openRepositoryTask(String repositoryUrl, String taskId, String fullUrl) {
- boolean opened = false;
- AbstractTask task = null;
-
- if (repositoryUrl != null && taskId != null) {
- task = TasksUiPlugin.getTaskListManager().getTaskList().getTask(repositoryUrl, taskId);
- }
- if (task == null && fullUrl != null) {
- task = TasksUiPlugin.getTaskListManager().getTaskList().getRepositoryTask(fullUrl);
- }
- if (task == null && repositoryUrl != null && taskId != null) {
- task = TasksUiPlugin.getTaskListManager().getTaskList().getTaskByKey(repositoryUrl, taskId);
- }
-
- if (task != null) {
- TasksUiUtil.refreshAndOpenTaskListElement(task);
- opened = true;
- } else {
- AbstractRepositoryConnector connector = TasksUiPlugin.getRepositoryManager()
- .getConnectorForRepositoryTaskUrl(fullUrl);
- if (connector != null) {
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(connector.getConnectorKind());
- if (repositoryUrl != null && taskId != null) {
- opened = connectorUi.openRepositoryTask(repositoryUrl, taskId);
- } else {
- repositoryUrl = connector.getRepositoryUrlFromTaskUrl(fullUrl);
- taskId = connector.getTaskIdFromTaskUrl(fullUrl);
- if (repositoryUrl != null && taskId != null) {
- opened = connectorUi.openRepositoryTask(repositoryUrl, taskId);
- }
- }
- }
- }
- if (!opened) {
- TasksUiUtil.openUrl(fullUrl, false);
- opened = true;
- }
- return opened;
- }
-
- public static void refreshAndOpenTaskListElement(AbstractTaskContainer element) {
- if (element instanceof AbstractTask || element instanceof ScheduledTaskDelegate) {
- final AbstractTask task;
- if (element instanceof ScheduledTaskDelegate) {
- task = ((ScheduledTaskDelegate) element).getCorrespondingTask();
- } else {
- task = (AbstractTask) element;
- }
-
- if (task instanceof LocalTask) {
- TasksUiUtil.openEditor(task, false);
- } else if (task != null) {
-
- final AbstractTask repositoryTask = task;
- String repositoryKind = repositoryTask.getConnectorKind();
- final AbstractRepositoryConnector connector = TasksUiPlugin.getRepositoryManager()
- .getRepositoryConnector(repositoryKind);
-
- TaskRepository repository = TasksUiPlugin.getRepositoryManager().getRepository(repositoryKind,
- repositoryTask.getRepositoryUrl());
-
- if (repository == null) {
- StatusHandler.fail(null, "No repository found for task. Please create repository in "
- + TasksUiPlugin.LABEL_VIEW_REPOSITORIES + ".", true);
- return;
- }
-
- if (connector != null) {
-
- RepositoryTaskData taskData = TasksUiPlugin.getTaskDataManager().getNewTaskData(
- task.getRepositoryUrl(), task.getTaskId());
-
- if (taskData != null) {
- TasksUiUtil.openEditor(task, true, false);
- } else {
- Job refreshJob = TasksUiPlugin.getSynchronizationManager().synchronize(connector,
- repositoryTask, true, new JobChangeAdapter() {
- @Override
- public void done(IJobChangeEvent event) {
- TasksUiUtil.openEditor(task, false);
- }
- });
- if (refreshJob == null) {
- TasksUiUtil.openEditor(task, false);
- }
- }
- }
- } else {
- TasksUiUtil.openEditor(task, false);
- }
- } else if (element instanceof TaskCategory) {
- TasksUiUtil.openEditor((TaskCategory) element);
- } else if (element instanceof AbstractRepositoryQuery) {
- AbstractRepositoryQuery query = (AbstractRepositoryQuery) element;
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(query.getRepositoryKind());
- connectorUi.openEditQueryDialog(query);
- }
- }
-
- public static void openEditor(final AbstractTask task, boolean newTask) {
- openEditor(task, true, newTask);
- }
-
- private static String getTaskEditorId(final AbstractTask task) {
- String taskEditorId = TaskEditor.ID_EDITOR;
- if (task != null) {
- AbstractTask repositoryTask = task;
- AbstractRepositoryConnectorUi repositoryUi = TasksUiPlugin.getConnectorUi(repositoryTask.getConnectorKind());
- String customTaskEditorId = repositoryUi.getTaskEditorId(repositoryTask);
- if (customTaskEditorId != null) {
- taskEditorId = customTaskEditorId;
- }
- }
- return taskEditorId;
- }
-
- /**
- * @param task
- * @param pageId
- * the taskId of the page to activate after opening
- */
- public static void openEditor(AbstractTask task, String pageId) {
- final IEditorInput editorInput = new TaskEditorInput(task, false);
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- IEditorPart part = openEditor(editorInput, getTaskEditorId(task), window.getActivePage());
- if (part instanceof TaskEditor) {
- ((TaskEditor) part).setActivePage(pageId);
- }
- }
-
- /**
- * Set asyncExec false for testing purposes.
- */
- public static void openEditor(final AbstractTask task, boolean asyncExec, final boolean newTask) {
-
- final boolean openWithBrowser = !TasksUiPlugin.getDefault().getPreferenceStore().getBoolean(
- TasksUiPreferenceConstants.EDITOR_TASKS_RICH);
-
- final String taskEditorId = getTaskEditorId(task);
-
- final IEditorInput editorInput = new TaskEditorInput(task, newTask);
-
- if (asyncExec) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- private boolean wasOpen = false;
-
- public void run() {
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- if (window != null) {
- if (openWithBrowser) {
- openUrl(task.getUrl(), false);
- } else {
- IWorkbenchPage page = window.getActivePage();
- wasOpen = refreshIfOpen(task, editorInput);
-
- if (!wasOpen) {
- IEditorPart part = openEditor(editorInput, taskEditorId, page);
- if (newTask && part instanceof TaskEditor) {
- TaskEditor taskEditor = (TaskEditor) part;
- taskEditor.setFocusOfActivePage();
- }
- }
- }
-
- Job updateTaskData = new Job("Update Task State") {
-
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- if (task != null) {
- AbstractTask repositoryTask = task;
- if (!wasOpen) {
- TasksUiPlugin.getSynchronizationManager().setTaskRead(repositoryTask, true);
- }
- // Synchronization must happen after marked
- // read.
- AbstractRepositoryConnector connector = TasksUiPlugin.getRepositoryManager()
- .getRepositoryConnector(repositoryTask.getConnectorKind());
- if (connector != null) {
- TasksUiPlugin.getSynchronizationManager().synchronize(connector,
- repositoryTask, false, null);
- }
-
- }
- return Status.OK_STATUS;
- }
- };
-
- updateTaskData.setSystem(true);
- updateTaskData.schedule();
-
- }
- }
- });
- } else {
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- if (window != null) {
- if (openWithBrowser) {
- openUrl(task.getUrl(), false);
- } else {
- IWorkbenchPage page = window.getActivePage();
- openEditor(editorInput, taskEditorId, page);
- }
- if (task != null) {
- TasksUiPlugin.getSynchronizationManager().setTaskRead(task, true);
- }
- } else {
- StatusHandler.log("Unable to open editor for " + task.getSummary(), TasksUiUtil.class);
- }
- }
- }
-
- /**
- * If task is already open and has incoming, must force refresh in place
- */
- private static boolean refreshIfOpen(AbstractTask task, IEditorInput editorInput) {
- if (task != null) {
- if (task.getSynchronizationState() == RepositoryTaskSyncState.INCOMING
- || task.getSynchronizationState() == RepositoryTaskSyncState.CONFLICT) {
- for (TaskEditor editor : getActiveRepositoryTaskEditors()) {
- if (editor.getEditorInput().equals(editorInput)) {
- editor.refreshEditorContents();
- editor.getEditorSite().getPage().activate(editor);
- return true;
- }
- }
- }
- }
- return false;
- }
-
- public static IEditorPart openEditor(IEditorInput input, String editorId, IWorkbenchPage page) {
- try {
- return page.openEditor(input, editorId);
- } catch (PartInitException e) {
- StatusHandler.fail(e, "Open for editor failed: " + input + ", taskId: " + editorId, true);
- }
- return null;
- }
-
- 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();
- openEditor(input, CategoryEditor.ID_EDITOR, page);
- }
- }
- });
- }
-
- 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() == Dialog.CANCEL) {
- dialog.close();
- return Dialog.CANCEL;
- }
-
- }
-
- if (TaskRepositoriesView.getFromActivePerspective() != null) {
- TaskRepositoriesView.getFromActivePerspective().getViewer().refresh();
- }
- } catch (Exception e) {
- StatusHandler.fail(e, e.getMessage(), true);
- }
- return Dialog.OK;
- }
-
- 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 (int i = 0; i < editorReferences.length; i++) {
- IEditorPart editor = editorReferences[i].getEditor(false);
- if (editor instanceof TaskEditor) {
- TaskEditor taskEditor = (TaskEditor) editor;
- if (taskEditor.getEditorInput() instanceof TaskEditorInput) {
- TaskEditorInput input = (TaskEditorInput) taskEditor.getEditorInput();
- if (input.getTask() != null) {
- repositoryTaskEditors.add((TaskEditor) editor);
- }
- }
- }
- }
- }
- return repositoryTaskEditors;
- }
-
- 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 AbstractRepositoryQuery) {
- AbstractRepositoryQuery query = (AbstractRepositoryQuery) element;
- return TasksUiPlugin.getRepositoryManager().getRepository(query.getRepositoryKind(),
- query.getRepositoryUrl());
- } else if (element instanceof AbstractTask) {
- AbstractTask task = (AbstractTask) element;
- return TasksUiPlugin.getRepositoryManager().getRepository(task.getConnectorKind(), task.getRepositoryUrl());
- } else if (element instanceof IResource) {
- IResource resource = (IResource) element;
- return TasksUiPlugin.getDefault().getRepositoryForResource(resource, true);
- } else if (element instanceof IAdaptable) {
- IAdaptable adaptable = (IAdaptable) element;
- IResource resource = (IResource) adaptable.getAdapter(IResource.class);
- if (resource != null) {
- return TasksUiPlugin.getDefault().getRepositoryForResource(resource, true);
- } else {
- AbstractTask task = (AbstractTask) adaptable.getAdapter(AbstractTask.class);
- if (task != null) {
- AbstractTask rtask = task;
- return TasksUiPlugin.getRepositoryManager().getRepository(rtask.getConnectorKind(),
- rtask.getRepositoryUrl());
- }
- }
- }
-
- // TODO mapping between LogEntry.pliginId and repositories
- // TODO handle other selection types
- return null;
- }
-
- /**
- * Use PreferencesUtil.createPreferenceDialogOn(..) instead.
- */
- @Deprecated
- public static void showPreferencePage(String id, IPreferencePage page) {
- final IPreferenceNode targetNode = new PreferenceNode(id, page);
-
- PreferenceManager manager = new PreferenceManager();
- manager.addToRoot(targetNode);
- final PreferenceDialog dialog = new PreferenceDialog(PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow()
- .getShell(), manager);
- final boolean[] result = new boolean[] { false };
- BusyIndicator.showWhile(Display.getDefault(), new Runnable() {
- public void run() {
- dialog.create();
- dialog.setMessage(targetNode.getLabelText());
- result[0] = (dialog.open() == Window.OK);
- }
- });
- }
-
- public static void closeEditorInActivePage(AbstractTask task, boolean save) {
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- if (window == null) {
- return;
- }
- IWorkbenchPage page = window.getActivePage();
- if (page == null) {
- return;
- }
- IEditorInput input = new TaskEditorInput(task, false);
- IEditorPart editor = page.findEditor(input);
- if (editor != null) {
- page.closeEditor(editor, save);
- }
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/WebHyperlink.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/WebHyperlink.java
deleted file mode 100644
index 312fc945e..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/WebHyperlink.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.ui;
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.hyperlink.IHyperlink;
-
-/**
- * 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.openUrl(url, true);
- }
-
- public String getURLString() {
- return url;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractNewRepositoryTaskEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractNewRepositoryTaskEditor.java
deleted file mode 100644
index d1660b663..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractNewRepositoryTaskEditor.java
+++ /dev/null
@@ -1,562 +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 java.util.Calendar;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-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.tasks.core.TaskActivityUtil;
-import org.eclipse.mylyn.internal.tasks.core.TaskCategory;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPreferenceConstants;
-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.views.TaskListView;
-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.TaskList;
-import org.eclipse.mylyn.tasks.ui.DatePicker;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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
- */
-public abstract class AbstractNewRepositoryTaskEditor extends AbstractRepositoryTaskEditor {
-
- 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 DatePicker 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 descriptionTextData = new GridData(GridData.FILL_BOTH);
- descriptionTextViewer.getControl().setLayoutData(descriptionTextData);
- 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);
-
- // Reminder
- getManagedForm().getToolkit().createLabel(sectionClient, "Scheduled for:");
- // label.setForeground(toolkit.getColors().getColor(FormColors.TITLE));
- scheduledForDate = new DatePicker(sectionClient, SWT.FLAT, DatePicker.LABEL_CHOOSE);
- 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(TasksUiImages.getImage(TasksUiImages.REMOVE));
- clearReminder.setToolTipText("Clear");
- clearReminder.addHyperlinkListener(new HyperlinkAdapter() {
- @Override
- public void linkActivated(HyperlinkEvent e) {
- scheduledForDate.setDate(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(TasksUiImages.getImage(TasksUiImages.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.getId(), taskData.getRepositoryUrl(),
- taskData.getRepositoryKind(), "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.setLayoutData(GridDataFactory.swtDefaults().hint(150, SWT.DEFAULT).create());
- getManagedForm().getToolkit().adapt(categoryChooser, true, true);
- categoryChooser.setFont(TEXT_FONT);
- TaskList taskList = TasksUiPlugin.getTaskListManager().getTaskList();
- List<AbstractTaskCategory> categories = taskList.getUserCategories();
- Collections.sort(categories, new Comparator<AbstractTaskContainer>() {
-
- public int compare(AbstractTaskContainer c1, AbstractTaskContainer c2) {
- if (c1.equals(TasksUiPlugin.getTaskListManager().getTaskList().getDefaultCategory())) {
- return -1;
- } else if (c2.equals(TasksUiPlugin.getTaskListManager().getTaskList().getDefaultCategory())) {
- return 1;
- } else {
- return c1.getSummary().compareToIgnoreCase(c2.getSummary());
- }
- }
-
- });
-
- for (AbstractTaskContainer 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) {
- if (index == 0) {
- return TasksUiPlugin.getTaskListManager().getTaskList().getDefaultCategory();
- }
- return ((List<AbstractTaskCategory>) categoryChooser.getData()).get(index - 1);
- }
- 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(TasksUiImages.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.getUrl());
- }
-
- 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() {
- Calendar selectedDate = scheduledForDate.getDate();
- if (selectedDate != null) {
- // NewLocalTaskAction.scheduleNewTask(newTask);
- TasksUiPlugin.getTaskActivityManager().setScheduledFor(newTask, selectedDate.getTime());
- }
-
- newTask.setEstimatedTimeHours(estimatedTime.getSelection());
-
- Object selectedObject = null;
- if (TaskListView.getFromActivePerspective() != null)
- selectedObject = ((IStructuredSelection) TaskListView.getFromActivePerspective()
- .getViewer()
- .getSelection()).getFirstElement();
-
- if (selectedObject instanceof TaskCategory) {
- TasksUiPlugin.getTaskListManager().getTaskList().moveToContainer(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;
- }
-
- 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;
- }
-
- @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();
- }
-}
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 493fe0dbc..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRenderingEngine.java
+++ /dev/null
@@ -1,27 +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
- */
-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/AbstractRepositoryTaskEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditor.java
deleted file mode 100644
index f544b1e3f..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditor.java
+++ /dev/null
@@ -1,3526 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse 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.io.File;
-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.Iterator;
-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.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.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.internal.tasks.core.CommentQuoter;
-import org.eclipse.mylyn.internal.tasks.ui.PersonProposalLabelProvider;
-import org.eclipse.mylyn.internal.tasks.ui.PersonProposalProvider;
-import org.eclipse.mylyn.internal.tasks.ui.TaskListColorsAndFonts;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.internal.tasks.ui.actions.AttachFileAction;
-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.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.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.TaskUrlHyperlink;
-import org.eclipse.mylyn.internal.tasks.ui.views.ResetRepositoryConfigurationAction;
-import org.eclipse.mylyn.monitor.core.DateUtil;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskCategory;
-import org.eclipse.mylyn.tasks.core.AbstractTaskDataHandler;
-import org.eclipse.mylyn.tasks.core.ITaskListChangeListener;
-import org.eclipse.mylyn.tasks.core.RepositoryAttachment;
-import org.eclipse.mylyn.tasks.core.RepositoryOperation;
-import org.eclipse.mylyn.tasks.core.RepositoryStatus;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskAttribute;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.TaskComment;
-import org.eclipse.mylyn.tasks.core.TaskContainerDelta;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.AbstractTask.RepositoryTaskSyncState;
-import org.eclipse.mylyn.tasks.ui.AbstractDuplicateDetector;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.mylyn.tasks.ui.search.SearchHitCollector;
-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.CCombo;
-import org.eclipse.swt.custom.StackLayout;
-import org.eclipse.swt.custom.StyledText;
-import org.eclipse.swt.custom.VerifyKeyListener;
-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.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.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.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.Listener;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IEditorDescriptor;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.ISelectionListener;
-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.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.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.
- *
- * NOTE: likely to change for 3.0
- *
- * @author Mik Kersten
- * @author Rob Elves
- * @author Jeff Pound (Attachment work)
- * @author Steffen Pingel
- * @author Xiaoyang Guan (Wiki HTML preview)
- * @since 2.0
- */
-public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
-
- 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";
-
-// private static final String LABEL_NO_DETECTOR = "No duplicate detector available.";
-
- 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_TO_CLIPBOARD = "Copy to Clipboard";
-
- 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 StyledText summaryText;
-
- protected Button submitButton;
-
- private Table attachmentsTable;
-
- private TableViewer attachmentsTableViewer;
-
- private String[] attachmentsColumns = { "Description", "Type", "Creator", "Created" };
-
- private int[] attachmentsColumnWidths = { 200, 100, 100, 200 };
-
- private Composite editorComposite;
-
- protected TextViewer summaryTextViewer;
-
- 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;
-
- /**
- * @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 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() {
- return new RepositoryTaskSelection(taskData.getId(), taskData.getRepositoryUrl(),
- taskData.getRepositoryKind(), "", true, taskData.getSummary());
- }
-
- public void removeSelectionChangedListener(ISelectionChangedListener listener) {
- selectionChangedListeners.remove(listener);
- }
-
- public void setSelection(ISelection selection) {
- // No implementation.
- }
- };
-
- private final ITaskListChangeListener TASKLIST_CHANGE_LISTENER = new ITaskListChangeListener() {
-
- public void containersChanged(Set<TaskContainerDelta> containers) {
- AbstractTask taskToRefresh = null;
- for (TaskContainerDelta taskContainerDelta : containers) {
- if (repositoryTask != null && repositoryTask.equals(taskContainerDelta.getContainer())) {
- if (taskContainerDelta.getKind().equals(TaskContainerDelta.Kind.CONTENT)) {
- taskToRefresh = (AbstractTask) taskContainerDelta.getContainer();
- break;
- }
- }
- }
- if (taskToRefresh != null) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- if (repositoryTask.getSynchronizationState() == RepositoryTaskSyncState.INCOMING
- || repositoryTask.getSynchronizationState() == RepositoryTaskSyncState.CONFLICT) {
- // MessageDialog.openInformation(AbstractTaskEditor.this.getSite().getShell(),
- // "Changed - " + repositoryTask.getSummary(),
- // "Editor will Test with new incoming
- // changes.");
- parentEditor.setMessage("Task has incoming changes, synchronize to view",
- IMessageProvider.WARNING);
-
- setSubmitEnabled(false);
- // updateContents();
- // TasksUiPlugin.getSynchronizationManager().setTaskRead(repositoryTask,
- // true);
- // TasksUiPlugin.getTaskDataManager().clearIncoming(
- // repositoryTask.getHandleIdentifier());
- } else {
- refreshEditor();
- }
- }
- });
- }
- }
- };
-
- private 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 openBrowserAction;
-
- /**
- * 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();
- TasksUiPlugin.getTaskListManager().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();
- connector = TasksUiPlugin.getRepositoryManager().getRepositoryConnector(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 void createFormContent(final IManagedForm managedForm) {
- IThemeManager themeManager = getSite().getWorkbenchWindow().getWorkbench().getThemeManager();
- colorIncoming = themeManager.getCurrentTheme().getColorRegistry().get(
- TaskListColorsAndFonts.THEME_COLOR_TASKS_INCOMING_BACKGROUND);
-
- super.createFormContent(managedForm);
- form = managedForm.getForm();
- toolkit = managedForm.getToolkit();
- registerDropListener(form);
-
- // ImageDescriptor overlay =
- // TasksUiPlugin.getDefault().getOverlayIcon(repository.getKind());
- // ImageDescriptor imageDescriptor =
- // TaskListImages.createWithOverlay(TaskListImages.REPOSITORY, overlay,
- // false,
- // false);
- // form.setImage(TaskListImages.getImage(imageDescriptor));
-
- // toolkit.decorateFormHeading(form.getForm());
-
- editorComposite = form.getBody();
- GridLayout editorLayout = new GridLayout();
- editorComposite.setLayout(editorLayout);
- editorComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- if (taskData == null) {
-
- parentEditor.setMessage(
- "Task data not available. Press synchronize button (right) to retrieve latest data.",
- IMessageProvider.WARNING);
-
- } else {
-
- createSections();
-
- }
-
- // setFormHeaderLabel();
- addHeaderControls();
-
- if (summaryText != null) {
- summaryText.setFocus();
- }
- }
-
- private void addHeaderControls() {
- ControlContribution repositoryLabelControl = new ControlContribution("Title") { //$NON-NLS-1$
- 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.getUrl().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;
- }
- };
-
- if (parentEditor.getTopForm() != null) {
- IToolBarManager toolBarManager = parentEditor.getTopForm().getToolBarManager();
-
- // TODO: Remove? Added to debug bug#197355
- toolBarManager.removeAll();
- toolBarManager.update(true);
-
- toolBarManager.add(repositoryLabelControl);
- fillToolBar(parentEditor.getTopForm().getToolBarManager());
-
- if (repositoryTask != null && taskData != null && !taskData.isNew()) {
- activateAction = new ToggleTaskActivationAction(repositoryTask, toolBarManager);
- toolBarManager.add(new Separator("activation"));
- toolBarManager.add(activateAction);
- }
-
- toolBarManager.update(true);
- }
- }
-
- /**
- * Override for customizing the toolbar.
- *
- * @since 2.1 (NOTE: likely to change for 3.0)
- */
- protected void fillToolBar(IToolBarManager toolBarManager) {
- if (taskData != null && !taskData.isNew()) {
- if (repositoryTask != null) {
- synchronizeEditorAction = new SynchronizeEditorAction();
- synchronizeEditorAction.selectionChanged(new StructuredSelection(this));
- toolBarManager.add(synchronizeEditorAction);
- }
-
- if (getHistoryUrl() != null) {
- historyAction = new Action() {
- @Override
- public void run() {
- TasksUiUtil.openUrl(getHistoryUrl(), false);
- }
- };
-
- 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 && repositoryTask.hasValidUrl()) {
- taskUrl = repositoryTask.getUrl();
- }
-
- final String taskUrlToOpen = taskUrl;
-
- if (taskUrlToOpen != null) {
- openBrowserAction = new Action() {
- @Override
- public void run() {
- TasksUiUtil.openUrl(taskUrlToOpen, false);
- }
- };
-
- openBrowserAction.setImageDescriptor(TasksUiImages.BROWSER_OPEN_TASK);
- openBrowserAction.setToolTipText("Open with Web Browser");
- toolBarManager.add(openBrowserAction);
- }
- }
- }
- }
-
- private void createSections() {
-
- createSummaryLayout(editorComposite);
-
- attributesSection = createSection(editorComposite, getSectionLabel(SECTION_NAME.ATTRIBTUES_SECTION));
- attributesSection.setExpanded(expandedStateAttributes || hasAttributeChanges);
-
- Composite toolbarComposite = toolkit.createComposite(attributesSection);
- toolbarComposite.setBackground(null);
- RowLayout rowLayout = new RowLayout();
- rowLayout.marginTop = 0;
- rowLayout.marginBottom = 0;
- toolbarComposite.setLayout(rowLayout);
- ResetRepositoryConfigurationAction repositoryConfigRefresh = new ResetRepositoryConfigurationAction() {
- @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) {
- TasksUiPlugin.getSynchronizationManager().synchronize(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);
- 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);
-
- 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);
- form.reflow(true);
- getSite().getPage().addSelectionListener(selectionListener);
- getSite().setSelectionProvider(selectionProvider);
- }
-
- private void removeSections() {
- menu = editorComposite.getMenu();
- setMenu(editorComposite, null);
- for (Control control : editorComposite.getChildren()) {
- control.dispose();
- }
- }
-
- /**
- * @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.getTaskDataHandler();
- if (taskDataManager != null) {
- Date created = taskData.getAttributeFactory().getDateForAttributeType(
- RepositoryTaskAttribute.DATE_CREATION, taskData.getCreated());
- openedDateString = created != null ? DateUtil.getFormattedDate(created, HEADER_DATE_FORMAT) : "";
-
- Date modified = taskData.getAttributeFactory().getDateForAttributeType(
- RepositoryTaskAttribute.DATE_MODIFIED, taskData.getLastModified());
- modifiedDateString = modified != null ? DateUtil.getFormattedDate(modified, HEADER_DATE_FORMAT) : "";
- }
-
- 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();
- }
-
- /**
- * 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);
-// }
- }
-
- protected SearchHitCollector getDuplicateSearchCollector(String name) {
- return null;
- }
-
- protected Set<AbstractDuplicateDetector> getDuplicateSearchCollectorsList() {
- return null;
- }
-
- public boolean searchForDuplicates() {
- String duplicateDetectorName = duplicateDetectorChooser.getItem(duplicateDetectorChooser.getSelectionIndex());
-
- SearchHitCollector collector = getDuplicateSearchCollector(duplicateDetectorName);
- if (collector != null) {
- 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);
- }
-
- summaryTextViewer = addTextEditor(repository, summaryComposite, attribute.getValue(), true, SWT.FLAT
- | SWT.SINGLE);
- summaryTextViewer.setEditable(true);
- summaryText = summaryTextViewer.getTextWidget();
- summaryText.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);
-
- final RepositoryTaskAttribute summaryAttribute = attribute;
-
- summaryTextViewer.addTextListener(new ITextListener() {
- public void textChanged(TextEvent event) {
- String newValue = summaryTextViewer.getTextWidget().getText();
- if (!newValue.equals(summaryAttribute.getValue())) {
- summaryAttribute.setValue(newValue);
- attributeChanged(summaryAttribute);
- }
- }
- });
-
- }
- 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));
- section.setText(section.getText() + " (" + taskData.getAttachments().size() + ")");
- section.setExpanded(false);
- 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.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]);
- }
-
- attachmentsTableViewer = new TableViewer(attachmentsTable);
- attachmentsTableViewer.setUseHashlookup(true);
- attachmentsTableViewer.setColumnProperties(attachmentsColumns);
- ColumnViewerToolTipSupport.enableFor(attachmentsTableViewer, ToolTip.NO_RECREATE);
-
- final AbstractTaskDataHandler offlineHandler = connector.getTaskDataHandler();
- if (offlineHandler != null) {
- attachmentsTableViewer.setSorter(new ViewerSorter() {
- 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(), false);
- }
- }
- });
-
- attachmentsTableViewer.setInput(taskData);
-
- final Action openWithBrowserAction = new Action(LABEL_BROWSER) {
- public void run() {
- RepositoryAttachment attachment = (RepositoryAttachment) (((StructuredSelection) attachmentsTableViewer.getSelection()).getFirstElement());
- if (attachment != null) {
- TasksUiUtil.openUrl(attachment.getUrl(), false);
- }
- }
- };
-
- final Action openWithDefaultAction = new Action(LABEL_DEFAULT_EDITOR) {
- 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(), false);
- 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.fail(e, "Unable to open editor for: " + attachment.getDescription(), false);
- }
- }
- };
-
- final Action openWithTextEditorAction = new Action(LABEL_TEXT_EDITOR) {
- 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.fail(e, "Unable to open editor for: " + attachment.getDescription(), false);
- }
- }
- };
-
- final Action saveAction = new Action(LABEL_SAVE) {
- public void run() {
- RepositoryAttachment attachment = (RepositoryAttachment) (((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 copyToClipAction = new Action(LABEL_COPY_TO_CLIPBOARD) {
- 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();
-
- ISelection selection = attachmentsTableViewer.getSelection();
- if (selection.isEmpty()) {
- return;
- }
-
- RepositoryAttachment att = (RepositoryAttachment) ((StructuredSelection) selection).getFirstElement();
-
- // reinitialize 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);
-
- 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));
-
- /* Launch a NewAttachemntWizard */
- Button addAttachmentButton = toolkit.createButton(attachmentControlsComposite, "Attach File...", SWT.PUSH);
-
- AbstractTask task = TasksUiPlugin.getTaskListManager().getTaskList().getTask(repository.getUrl(),
- taskData.getId());
- if (task == null) {
- addAttachmentButton.setEnabled(false);
- }
-
- addAttachmentButton.addSelectionListener(new SelectionListener() {
- public void widgetDefaultSelected(SelectionEvent e) {
- // ignore
- }
-
- public void widgetSelected(SelectionEvent e) {
- AbstractTask task = TasksUiPlugin.getTaskListManager().getTaskList().getTask(repository.getUrl(),
- taskData.getId());
- if (!(task != null)) {
- // Should not happen
- return;
- }
- if (AbstractRepositoryTaskEditor.this.isDirty
- || task.getSynchronizationState().equals(RepositoryTaskSyncState.OUTGOING)) {
- MessageDialog.openInformation(attachmentsComposite.getShell(),
- "Task not synchronized or dirty editor",
- "Commit edits or synchronize task before adding attachments.");
- return;
- } else {
- AttachFileAction attachFileAction = new AttachFileAction();
- attachFileAction.selectionChanged(new StructuredSelection(task));
- attachFileAction.setEditor(parentEditor);
- attachFileAction.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) {
- AbstractTask task = TasksUiPlugin.getTaskListManager().getTaskList().getTask(repository.getUrl(),
- taskData.getId());
- if (task == null) {
- // Should not happen
- return;
- }
- if (AbstractRepositoryTaskEditor.this.isDirty
- || task.getSynchronizationState().equals(RepositoryTaskSyncState.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(addAttachmentButton);
- 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, 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);
- GridData sectionCompositeData = new GridData(GridData.FILL_HORIZONTAL);
- sectionComposite.setLayoutData(sectionCompositeData);
-
- 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);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- 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);
- }
- 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);
-// duplicatesSection.setBackground(new Color(form.getDisplay(), 123, 22, 45));
- addDuplicateDetection(sectionComposite);
- toolkit.paintBordersFor(sectionComposite);
- }
-
- 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(TasksUiImages.getImage(TasksUiImages.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() {
- 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<AbstractDuplicateDetector> allCollectors = new ArrayList<AbstractDuplicateDetector>();
- if (getDuplicateSearchCollectorsList() != null) {
- allCollectors.addAll(getDuplicateSearchCollectorsList());
- }
- 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<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(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);
- GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL).grab(true, true).applyTo(peopleComposite);
-
- addAssignedTo(peopleComposite);
-
- RepositoryTaskAttribute reporterAttribute = taskData.getAttribute(RepositoryTaskAttribute.USER_REPORTER);
- 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().hint(150, SWT.DEFAULT).applyTo(textField);
- }
- 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 (Iterator<String> it = ccs.iterator(); it.hasNext();) {
- String cc = it.next();
- 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.getId(), taskData.getRepositoryUrl(),
- taskData.getRepositoryKind(), getSectionLabel(SECTION_NAME.DESCRIPTION_SECTION), true,
- taskData.getSummary()))));
- }
- }
-
- protected boolean supportsCommentDelete() {
- return false;
- }
-
- protected void deleteComment(TaskComment comment) {
-
- }
-
- protected void createCommentLayout(Composite composite) {
- commentsSection = createSection(composite, getSectionLabel(SECTION_NAME.COMMENTS_SECTION));
- commentsSection.setText(commentsSection.getText() + " (" + taskData.getComments().size() + ")");
- if (taskData.getComments().size() > 0) {
- commentsSection.setEnabled(true);
-
- 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);
-
- ImageHyperlink collapseAllHyperlink = new ImageHyperlink(commentsSectionClient, SWT.NONE);
- collapseAllHyperlink.setToolTipText("Collapse All Comments");
- toolkit.adapt(collapseAllHyperlink, true, true);
- collapseAllHyperlink.setBackground(null);
- collapseAllHyperlink.setImage(TasksUiImages.getImage(TasksUiImages.COLLAPSE_ALL));
- collapseAllHyperlink.addHyperlinkListener(new HyperlinkAdapter() {
- 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(TasksUiImages.getImage(TasksUiImages.EXPAND_ALL));
- expandAllHyperlink.addHyperlinkListener(new HyperlinkAdapter() {
- public void linkActivated(HyperlinkEvent e) {
- revealAllComments();
- }
- });
- commentsSection.setTextClient(commentsSectionClient);
- } else {
- commentsSection.setEnabled(false);
- }
-
- // Additional (read-only) Comments Area
- Composite 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 (Iterator<TaskComment> it = taskData.getComments().iterator(); it.hasNext();) {
- final TaskComment taskComment = it.next();
-
- final ExpandableComposite expandableComposite = toolkit.createExpandableComposite(addCommentsComposite,
- ExpandableComposite.TREE_NODE | ExpandableComposite.LEFT_TEXT_CLIENT_ALIGNMENT);
-
- if ((repositoryTask != null && repositoryTask.getLastReadTimeStamp() == null)
- || editorInput.getOldTaskData() == null) {
- // hit or lost task data, expose all comments
- expandableComposite.setExpanded(true);
- foundNew = true;
- } else if (isNewComment(taskComment)) {
- expandableComposite.setBackground(colorIncoming);
- expandableComposite.setExpanded(true);
- foundNew = true;
- }
-
- expandableComposite.setTitleBarForeground(toolkit.getColors().getColor(IFormColors.TITLE));
-
-// expandableComposite.setText(taskComment.getNumber() + ": " + taskComment.getAuthorName() + ", "
-// + formatDate(taskComment.getCreated()));
-
- expandableComposite.addExpansionListener(new ExpansionAdapter() {
- public void expansionStateChanged(ExpansionEvent e) {
- resetLayout();
- }
- });
-
- final Composite toolbarComp = toolkit.createComposite(expandableComposite);
- RowLayout 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().equalsIgnoreCase(repository.getUserName())) {
- formHyperlink.setImage(TasksUiImages.getImage(TasksUiImages.PERSON_ME_NARROW));
- } else {
- formHyperlink.setImage(TasksUiImages.getImage(TasksUiImages.PERSON_NARROW));
- }
-
- formHyperlink.setText(taskComment.getNumber() + ": " + taskComment.getAuthorName() + ", "
- + formatDate(taskComment.getCreated()));
- 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(TasksUiImages.getImage(TasksUiImages.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());
-
- expandableComposite.addExpansionListener(new ExpansionAdapter() {
-
- @Override
- public void expansionStateChanged(ExpansionEvent e) {
- toolbarButtonComp.setVisible(expandableComposite.isExpanded());
- }
- });
-
- toolbarButtonComp.setVisible(expandableComposite.isExpanded());
-
- formHyperlink.addHyperlinkListener(new HyperlinkAdapter() {
-
- @Override
- public void linkActivated(HyperlinkEvent e) {
- expandableComposite.setExpanded(!expandableComposite.isExpanded());
- toolbarButtonComp.setVisible(expandableComposite.isExpanded());
- resetLayout();
- }
-
- @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);
-
- // 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));
-
- 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);
-
- TextViewer viewer = addTextViewer(repository, ecComposite, taskComment.getText().trim(), SWT.MULTI
- | SWT.WRAP);
- // viewer.getControl().setBackground(new
- // Color(expandableComposite.getDisplay(), 123, 34, 155));
- StyledText styledText = viewer.getTextWidget();
- GridDataFactory.fillDefaults().hint(DESCRIPTION_WIDTH, SWT.DEFAULT).applyTo(styledText);
- // GridDataFactory.fillDefaults().hint(DESCRIPTION_WIDTH,
- // SWT.DEFAULT).applyTo(viewer.getControl());
-
- // code for outline
- commentStyleText.add(styledText);
- controlBySelectableObject.put(taskComment, styledText);
-
- // if (supportsCommentDelete()) {
- // Button deleteButton = toolkit.createButton(ecComposite, null,
- // SWT.PUSH);
- // deleteButton.setImage(TasksUiImages.getImage(TasksUiImages.COMMENT_DELETE));
- // deleteButton.setToolTipText("Remove comment above.");
- // deleteButton.addListener(SWT.Selection, new Listener() {
- // public void handleEvent(Event e) {
- // if (taskComment != null) {
- // deleteComment(taskComment);
- // submitToRepository();
- // }
- // }
- // });
- // }
- }
- if (foundNew) {
- commentsSection.setExpanded(true);
- } else if (taskData.getComments() == null || taskData.getComments().size() == 0) {
- commentsSection.setExpanded(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) {
- commentsSection.setExpanded(true);
- } else {
- commentsSection.setExpanded(newTaskComments.size() != oldTaskComments.size());
- }
- }
- }
-
- 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 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) {
- Section section = toolkit.createSection(composite, ExpandableComposite.TITLE_BAR | Section.TWISTIE);
- section.setText(title);
- section.setExpanded(true);
- section.setLayout(new GridLayout());
- 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(TasksUiImages.getImage(TasksUiImages.REPOSITORY_SUBMIT));
- submitButton.setLayoutData(submitButtonData);
- submitButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- submitToRepository();
- }
- });
-
- setSubmitEnabled(true);
-
- toolkit.createLabel(buttonComposite, " ");
-
- AbstractTask task = TasksUiPlugin.getTaskListManager().getTaskList().getTask(repository.getUrl(),
- taskData.getId());
- 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.getUrl());
- }
- }
- }
-
- /**
- * 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) {
- TasksUiPlugin.getSynchronizationManager().saveOutgoing(repositoryTask, changedAttributes);
- }
- if (repositoryTask != null) {
- TasksUiPlugin.getTaskListManager().getTaskList().notifyTaskChanged(repositoryTask, 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 (summaryText != null && !summaryText.isDisposed()) {
- if (firstFocus) {
- summaryText.setFocus();
- firstFocus = false;
- }
- } else {
- form.setFocus();
- }
- }
-
- /**
- * 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) {
- //updateTask();
- saveTaskOffline(monitor);
- updateEditorTitle();
- }
-
- // // TODO: Remove once offline persistence is improved
- // private void runSaveJob() {
- // Job saveJob = new Job("Save") {
- //
- // @Override
- // protected IStatus run(IProgressMonitor monitor) {
- // saveTaskOffline(monitor);
- // return Status.OK_STATUS;
- // }
- //
- // };
- // saveJob.setSystem(true);
- // saveJob.schedule();
- // markDirty(false);
- // }
-
- @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() {
- TasksUiPlugin.getTaskListManager().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 (int i = 0; i < listeners.length; i++) {
- final ISelectionChangedListener l = (ISelectionChangedListener) listeners[i];
- SafeRunnable.run(new SafeRunnable() {
- public void run() {
- l.selectionChanged(event);
- }
- });
- }
- }
-
- /*----------------------------------------------------------*
- * CODE TO SCROLL TO A COMMENT OR OTHER PIECE OF TEXT
- *----------------------------------------------------------*/
-
- private HashMap<Object, Control> controlBySelectableObject = new HashMap<Object, Control>();
-
- private List<StyledText> commentStyleText = new ArrayList<StyledText>();
-
- private StyledText addCommentsTextBox = null;
-
- protected TextViewer descriptionTextViewer = null;
-
- private void revealAllComments() {
- if (commentsSection != null) {
- commentsSection.setExpanded(true);
- }
- for (StyledText text : commentStyleText) {
- if (text.isDisposed())
- continue;
- Composite comp = text.getParent();
- while (comp != null && !comp.isDisposed()) {
- if (comp instanceof ExpandableComposite && !comp.isDisposed()) {
- ExpandableComposite ex = (ExpandableComposite) comp;
- ex.setExpanded(true);
-
- // 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();
- }
- }
- resetLayout();
- }
-
- private void hideAllComments() {
- for (StyledText text : commentStyleText) {
- if (text.isDisposed())
- continue;
- Composite comp = text.getParent();
- while (comp != null && !comp.isDisposed()) {
- if (comp instanceof ExpandableComposite && !comp.isDisposed()) {
- ExpandableComposite ex = (ExpandableComposite) comp;
- ex.setExpanded(false);
-
- // 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);
-// }
-
- 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) {
- // expand all parents of control
- Composite comp = control.getParent();
- while (comp != null) {
- if (comp instanceof ExpandableComposite) {
- ExpandableComposite ex = (ExpandableComposite) comp;
- ex.setExpanded(true);
- }
- comp = comp.getParent();
- }
- focusOn(control, highlight);
- } else if (o instanceof RepositoryTaskData) {
- focusOn(null, highlight);
- } else {
- return false;
- }
- return true;
- }
-
- 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) {
- 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 AbstractRepositoryConnector 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.getId(), taskData.getRepositoryUrl(),
- taskData.getRepositoryKind(), getSectionLabel(SECTION_NAME.NEWCOMMENT_SECTION), false,
- taskData.getSummary()))));
- }
- }
-
- public Control getControl() {
- return form;
- }
-
- public void setSummaryText(String text) {
- if (summaryText != null) {
- this.summaryText.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 (Iterator<RepositoryOperation> it = taskData.getOperations().iterator(); it.hasNext();) {
- RepositoryOperation o = it.next();
- 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, AbstractTask task) {
- attachContextButton = toolkit.createButton(buttonComposite, "Attach Context", SWT.CHECK);
- attachContextButton.setImage(TasksUiImages.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(TasksUiImages.getImage(TasksUiImages.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 (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.getTaskDataHandler().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 = TasksUiPlugin.getTaskListManager().getTaskList().getTask(repository.getUrl(),
- taskData.getId());
- }
-
- // Synchronization accounting...
- if (modifiedTask != null) {
- // Attach context if required
- if (attachContext && connector.getAttachmentHandler() != null) {
- connector.getAttachmentHandler().attachContext(repository, modifiedTask, "",
- new SubProgressMonitor(monitor, 1));
- }
-
- modifiedTask.setSubmitting(true);
- final AbstractTask finalModifiedTask = modifiedTask;
- TasksUiPlugin.getSynchronizationManager().synchronize(connector, modifiedTask, true,
- new JobChangeAdapter() {
-
- @Override
- public void done(IJobChangeEvent event) {
-
- if (isNew) {
- close();
- TasksUiPlugin.getSynchronizationManager().setTaskRead(finalModifiedTask,
- true);
- TasksUiUtil.openEditor(finalModifiedTask, false);
- } else {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- refreshEditor();
- }
- });
- }
- }
- });
- TasksUiPlugin.getSynchronizationScheduler().synchNow(0, Collections.singletonList(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.openRepositoryTask(repository.getUrl(), taskData.getId(),
- connector.getTaskUrl(taskData.getRepositoryUrl(), taskData.getId()));
- }
- });
- }
-
- return Status.OK_STATUS;
- } catch (CoreException e) {
- if (modifiedTask != null) {
- modifiedTask.setSubmitting(false);
- }
- return handleSubmitError(e);
- } catch (Exception e) {
- if (modifiedTask != null) {
- modifiedTask.setSubmitting(false);
- }
- StatusHandler.fail(e, e.getMessage(), true);
- 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) {
- this.doSave(new NullProgressMonitor());
- }
- setGlobalBusy(true);
- changedAttributes.clear();
- commentStyleText.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) {
- TasksUiPlugin.getSynchronizationManager().setTaskRead(repositoryTask, true);
- }
-
- this.setInputWithNotify(this.getEditorInput());
- this.init(this.getEditorSite(), this.getEditorInput());
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
-
- if (taskData == null) {
- parentEditor.setMessage(
- "Task data not available. Press synchronize button (right) to retrieve latest data.",
- IMessageProvider.WARNING);
- } else {
-
- updateEditorTitle();
- menu = editorComposite.getMenu();
- removeSections();
- editorComposite.setMenu(menu);
- createSections();
- // 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.getSynchronizationManager().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.getSynchronizationManager().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) {
- StatusHandler.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 {
- StatusHandler.displayStatus("Submit failed", exception.getStatus());
- }
- setGlobalBusy(false);
- }
- }
-
- });
- return Status.OK_STATUS;
- }
-
- protected AbstractTask updateSubmittedTask(String postResult, IProgressMonitor monitor) throws CoreException {
- final AbstractTask newTask = connector.createTaskFromExistingId(repository, postResult, monitor);
-
- if (newTask != null) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- if (getCategory() != null) {
- TasksUiPlugin.getTaskListManager().getTaskList().moveToContainer(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 (int i = 0; i < radios.length; i++) {
- if (radios[i].getSelection())
- selected = radios[i];
- }
- // 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 (int i = 0; i < radios.length; i++) {
- if (radios[i].getSelection())
- selected = radios[i];
- }
- // 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) {
- RepositoryTaskAttribute assignedAttribute = taskData.getAttribute(RepositoryTaskAttribute.USER_ASSIGNED);
- if (assignedAttribute != null) {
- Label label = createLabel(peopleComposite, assignedAttribute);
- GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(label);
- Text textField = createTextField(peopleComposite, assignedAttribute, SWT.FLAT | SWT.READ_ONLY);
- GridDataFactory.fillDefaults().hint(150, SWT.DEFAULT).applyTo(textField);
- }
- }
-
- /**
- * force a re-layout of entire form
- */
- protected void resetLayout() {
- form.layout(true, true);
- form.reflow(false);
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditorInput.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditorInput.java
deleted file mode 100644
index 03f2112a0..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditorInput.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse 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.Set;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskAttribute;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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
- */
-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) {
- this.editableTaskData = editableTaskData;
- }
-
- protected void setOldTaskData(RepositoryTaskData oldTaskData) {
- this.oldTaskData = oldTaskData;
- }
-
- public void refreshInput() {
- this.editableTaskData = TasksUiPlugin.getTaskDataManager().getEditableCopy(repository.getUrl(), taskId);
- this.oldTaskData = TasksUiPlugin.getTaskDataManager().getOldTaskData(repository.getUrl(), taskId);
- this.oldEdits = TasksUiPlugin.getTaskDataManager().getEdits(repository.getUrl(), taskId);
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorFactory.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorFactory.java
deleted file mode 100644
index c9c7543b8..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorFactory.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.editors;
-
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-
-/**
- * Extend to add tabs to task editors.
- *
- * @author Mik Kersten
- * @since 2.0
- */
-public abstract class AbstractTaskEditorFactory {
-
- public abstract IEditorPart createEditor(TaskEditor parentEditor, IEditorInput editorInput);
-
- public abstract IEditorInput createEditorInput(AbstractTask task);
-
- public abstract String getTitle();
-
- public abstract boolean canCreateEditorFor(AbstractTask 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/tasks/ui/editors/NewTaskEditorInput.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/NewTaskEditorInput.java
deleted file mode 100644
index 01aa5c822..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/NewTaskEditorInput.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.ui.editors;
-
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-/**
- * Provides input to editors with unsubmitted tasks (i.e., those that do not yet exist on the repository).
- *
- * @author Rob Elves
- * @since 2.0
- */
-public class NewTaskEditorInput extends RepositoryTaskEditorInput {
-
- public NewTaskEditorInput(TaskRepository repository, RepositoryTaskData taskData) {
- super(repository, taskData.getId(), "");
- super.setOldTaskData(taskData);
- super.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;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/RepositoryTaskEditorDropListener.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/RepositoryTaskEditorDropListener.java
deleted file mode 100644
index 1534eb6ff..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/RepositoryTaskEditorDropListener.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.tasks.ui.editors;
-
-import java.io.File;
-
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.NewAttachmentWizard;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.NewAttachmentWizardDialog;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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.widgets.Control;
-
-/**
- * Not API.
- *
- * @author Mik Kersten
- */
-class RepositoryTaskEditorDropListener implements DropTargetListener {
-
- private final AbstractRepositoryTaskEditor AbstractTaskEditor;
-
- private final FileTransfer fileTransfer;
-
- private final TextTransfer textTransfer;
-
- private final Control control;
-
- public RepositoryTaskEditorDropListener(AbstractRepositoryTaskEditor AbstractTaskEditor, FileTransfer fileTransfer,
- TextTransfer textTransfer, Control control) {
- this.AbstractTaskEditor = AbstractTaskEditor;
- 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 (int i = 0; i < event.dataTypes.length; i++) {
- if (fileTransfer.isSupportedType(event.dataTypes[i])) {
- event.currentDataType = event.dataTypes[i];
- // 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 = TasksUiPlugin.getTaskListManager().getTaskList().getTask(
- this.AbstractTaskEditor.repository.getUrl(), this.AbstractTaskEditor.taskData.getId());
- if (!(task != null)) {
- // Should not happen
- return;
- }
-
- AbstractTaskEditor.setGlobalBusy(true);
- NewAttachmentWizard naw = new NewAttachmentWizard(this.AbstractTaskEditor.repository, task, text);
- openDialog(naw);
- }
- if (fileTransfer.isSupportedType(event.currentDataType)) {
- String[] files = (String[]) event.data;
- if (files.length > 0) {
- AbstractTask task = TasksUiPlugin.getTaskListManager().getTaskList().getTask(
- this.AbstractTaskEditor.repository.getUrl(), this.AbstractTaskEditor.taskData.getId());
- if (task == null) {
- // Should not happen
- return;
- }
-
- NewAttachmentWizard naw = new NewAttachmentWizard(this.AbstractTaskEditor.repository, task, new File(
- files[0]));
- openDialog(naw);
-
- }
- }
- }
-
- private void openDialog(NewAttachmentWizard naw) {
- AbstractTaskEditor.setGlobalBusy(true);
- NewAttachmentWizardDialog dialog = new NewAttachmentWizardDialog(control.getShell(), naw);
- naw.setDialog(dialog);
- dialog.create();
- int result = dialog.open();
- if (result != MessageDialog.OK) {
- AbstractTaskEditor.setGlobalBusy(false);
- }
- }
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/RepositoryTaskEditorInput.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/RepositoryTaskEditorInput.java
deleted file mode 100644
index 11d4c820e..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/RepositoryTaskEditorInput.java
+++ /dev/null
@@ -1,104 +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.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * Input to editors for existing tasks (i.e., those that exist present in the repository).
- *
- * @author Mik Kersten
- * @author Rob Elves
- * @since 2.0
- */
-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 = TasksUiPlugin.getTaskListManager().getTaskList().getTask(repository.getUrl(), 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/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 182d071a2..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditor.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.tasks.ui.editors;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.mylyn.internal.tasks.core.LocalTask;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.internal.tasks.ui.editors.EditorBusyIndicator;
-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.editors.TaskPlanningEditor;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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.widgets.Form;
-import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
-
-/**
- * @author Mik Kersten
- * @author Eric Booth (initial prototype)
- * @author Rob Elves
- */
-public class TaskEditor extends SharedHeaderFormEditor implements IBusyEditor {
-
- public static final String ID_EDITOR = "org.eclipse.mylyn.tasks.ui.editors.task";
-
- protected AbstractTask task;
-
- private TaskPlanningEditor taskPlanningEditor;
-
- private TaskEditorInput taskEditorInput;
-
- private List<IEditorPart> editors = new ArrayList<IEditorPart>();
-
- private Menu contextMenu;
-
- private IEditorPart contentOutlineProvider = null;
-
- public final Object FAMILY_SUBMIT = new Object();
-
- private EditorBusyIndicator editorBusyIndicator;
-
- public TaskEditor() {
- super();
- taskPlanningEditor = new TaskPlanningEditor(this);
- taskPlanningEditor.setParentEditor(this);
- }
-
- protected void contextMenuAboutToShow(IMenuManager manager) {
- TaskEditorActionContributor contributor = getContributor();
- // IFormPage page = getActivePageInstance();
- if (contributor != null)
- contributor.contextMenuAboutToShow(manager);
- }
-
- public TaskEditorActionContributor getContributor() {
- return (TaskEditorActionContributor) getEditorSite().getActionBarContributor();
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public Object getAdapter(Class adapter) {
- return getAdapterDelgate(adapter);
- }
-
- public Object getAdapterDelgate(Class<?> adapter) {
- // TODO: consider adding: IContentOutlinePage.class.equals(adapter) &&
- if (contentOutlineProvider != null) {
- return contentOutlineProvider.getAdapter(adapter);
- } else {
- return super.getAdapter(adapter);
- }
- }
-
- @Override
- public IEditorPart getActiveEditor() {
- return super.getActiveEditor();
- }
-
- @Override
- public void doSave(IProgressMonitor monitor) {
- for (IFormPage page : getPages()) {
- if (page.isDirty()) {
- page.doSave(monitor);
- }
- }
-
- editorDirtyStateChanged();
- }
-
- @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()]);
- }
-
- /**
- * Refresh editor with new contents (if any)
- */
- public void refreshEditorContents() {
- for (IFormPage page : getPages()) {
- if (page instanceof AbstractRepositoryTaskEditor) {
- AbstractRepositoryTaskEditor editor = (AbstractRepositoryTaskEditor) page;
- editor.refreshEditor();
- }
- }
- // if (webBrowser != null) {
- // PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- //
- // public void run() {
- // refresh to original url?
- // webBrowser.refresh();
- // }
- // });
- // }
- }
-
- /**
- * Saves the multi-page editor's document as another file. Also updates the text for page 0's tab, and updates this
- * multi-page editor's input to correspond to the nested editor's.
- *
- * @see org.eclipse.ui.ISaveablePart#doSaveAs()
- */
- @Override
- public void doSaveAs() {
- IEditorPart editor = getEditor(0);
- if (editor != null) {
- editor.doSaveAs();
- setPageText(0, editor.getTitle());
- setInput(editor.getEditorInput());
- }
- }
-
- @Override
- public void init(IEditorSite site, IEditorInput input) throws PartInitException {
- super.init(site, input);
- setSite(site);
- }
-
- @Override
- public boolean isSaveAsAllowed() {
- return false;
- }
-
- @Override
- public boolean isDirty() {
- for (IFormPage page : getPages()) {
- if (page.isDirty()) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Updates the tab title
- */
- public void changeTitle() {
- this.setPartName(taskEditorInput.getLabel());
- }
-
- public void markDirty() {
- firePropertyChange(PROP_DIRTY);
- return;
- }
-
- public void setFocusOfActivePage() {
- if (this.getActivePage() > -1) {
- IFormPage page = this.getPages()[this.getActivePage()];
- if (page != null) {
- page.setFocus();
- }
- }
- }
-
- @Override
- protected void pageChange(int newPageIndex) {
- super.pageChange(newPageIndex);
- }
-
- @Override
- public void dispose() {
- if (editorBusyIndicator != null) {
- editorBusyIndicator.dispose();
- }
-
- for (IEditorPart part : editors) {
- part.dispose();
- }
- if (taskPlanningEditor != null) {
- taskPlanningEditor.dispose();
- }
-
- super.dispose();
- }
-
- public TaskEditorInput getTaskEditorInput() {
- return taskEditorInput;
- }
-
- @Override
- protected void addPages() {
-
- editorBusyIndicator = new EditorBusyIndicator(this);
-
- try {
- MenuManager manager = new MenuManager();
- IMenuListener listener = new IMenuListener() {
- public void menuAboutToShow(IMenuManager manager) {
- contextMenuAboutToShow(manager);
- }
- };
- manager.setRemoveAllWhenShown(true);
- manager.addMenuListener(listener);
- contextMenu = manager.createContextMenu(getContainer());
- getContainer().setMenu(contextMenu);
- int index = -1;
- if (getEditorInput() instanceof TaskEditorInput) {
- addPage(taskPlanningEditor);
- index++;
- taskEditorInput = (TaskEditorInput) getEditorInput();
- task = taskEditorInput.getTask();
- setPartName(taskEditorInput.getLabel());
- setPageImage(0, TasksUiImages.getImage(TasksUiImages.CALENDAR_SMALL));
- }
-
- int selectedIndex = index;
-
- 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 : TasksUiPlugin.getDefault().getTaskEditorFactories()) {
- if (factory.canCreateEditorFor(task) || factory.canCreateEditorFor(getEditorInput())) {
- try {
- IEditorPart editor = factory.createEditor(this, getEditorInput());
- IEditorInput input = task != null ? factory.createEditorInput(task) : getEditorInput();
- if (editor != null && input != null) {
- FormPage taskEditor = (FormPage) editor;
- editor.init(getEditorSite(), input);
- index = addPage(taskEditor);
- if (input.getImageDescriptor() != null) {
- setPageImage(index, TasksUiImages.getImage(input.getImageDescriptor()));
- }
- if (editor instanceof AbstractRepositoryTaskEditor) {
- ((AbstractRepositoryTaskEditor) editor).setParentEditor(this);
-
- if (getEditorInput() instanceof RepositoryTaskEditorInput) {
- RepositoryTaskEditorInput existingInput = (RepositoryTaskEditorInput) getEditorInput();
- setPartName(existingInput.getName());
- } else if (getEditorInput() instanceof NewTaskEditorInput) {
- String label = ((NewTaskEditorInput) getEditorInput()).getName();
- setPartName(label);
- }
- setPageText(index, factory.getTitle());
- selectedIndex = index;
- }
- }
-
- // HACK: overwrites if multiple present
- if (factory.providesOutline()) {
- contentOutlineProvider = editor;
- }
- } catch (Exception e) {
- StatusHandler.fail(e, "Could not create editor via factory: " + factory, true);
- }
- }
- }
-// String urlToOpen = getUrl();
-// if (urlToOpen != null && !urlToOpen.equals("")) {
-// browserPageIndex = createBrowserPage(urlToOpen);
-// setPageImage(browserPageIndex, TasksUiImages.getImage(TasksUiImages.BROWSER_SMALL));
-// if (selectedIndex == 0 && taskEditorInput != null && !taskEditorInput.isNewTask()) {
-// selectedIndex = browserPageIndex;
-// }
-// }
-
- if (selectedIndex != -1) {
- setActivePage(selectedIndex);
- }
-
- if (task != null) {
- setTitleImage(TasksUiImages.getImage(TasksUiImages.TASK_REPOSITORY));
- } else if (getEditorInput() instanceof AbstractRepositoryTaskEditorInput) {
- this.setTitleImage(TasksUiImages.getImage(TasksUiImages.TASK_REMOTE));
- } else { //if (getUrl() != null) {
- setTitleImage(TasksUiImages.getImage(TasksUiImages.TASK_REPOSITORY));
-// setTitleImage(TasksUiImages.getImage(TasksUiImages.TASK_WEB));
- }
-
- } catch (PartInitException e) {
- StatusHandler.fail(e, "failed to create task editor pages", false);
- }
- }
-
- @Override
- public void setFocus() {
- if (getActivePageInstance() instanceof AbstractNewRepositoryTaskEditor) {
- getActivePageInstance().setFocus();
- } else {
- super.setFocus();
- }
- }
-
- /**
- * Update the title of the editor
- */
- public void updateTitle(String name) {
- // setContentDescription(name);
- setPartName(name);
- setTitleToolTip(name);
- updateFormTitle();
- }
-
- @Override
- public void showBusy(boolean busy) {
- // if (!this.getHeaderForm().getForm().isDisposed()) {
- // this.getHeaderForm().getForm().setBusy(busy);
- // }
-
- if (busy) {
- editorBusyIndicator.startBusy();
- } else {
- editorBusyIndicator.stopBusy();
- }
-
- for (IFormPage page : getPages()) {
- if (page instanceof AbstractRepositoryTaskEditor) {
- AbstractRepositoryTaskEditor editor = (AbstractRepositoryTaskEditor) page;
- editor.showBusy(busy);
- }
- }
- }
-
- public ISelection getSelection() {
- if (getSite() != null && getSite().getSelectionProvider() != null) {
- return getSite().getSelectionProvider().getSelection();
- } else {
- return StructuredSelection.EMPTY;
- }
- }
-
- @Override
- protected void createHeaderContents(IManagedForm headerForm) {
- getToolkit().decorateFormHeading(headerForm.getForm().getForm());
- headerForm.getForm().setImage(TasksUiImages.getImage(TasksUiImages.TASK));
- updateFormTitle();
- }
-
- protected void updateFormTitle() {
- IEditorInput input = getEditorInput();
- if (input instanceof TaskEditorInput) {
- AbstractTask task = ((TaskEditorInput) input).getTask();
- if (task instanceof LocalTask) {
- getHeaderForm().getForm().setText("Task: " + task.getSummary());
- } else {
- setFormHeaderImage(task.getConnectorKind());
- setFormHeaderLabel(task);
- return;
- }
- } else if (input instanceof RepositoryTaskEditorInput) {
- AbstractTask task = ((RepositoryTaskEditorInput) input).getRepositoryTask();
- RepositoryTaskData data = ((RepositoryTaskEditorInput) input).getTaskData();
- if (task != null && data != null && !data.isNew()) {
- setFormHeaderImage(task.getConnectorKind());
- setFormHeaderLabel(task);
- return;
- } else {
- if (data != null) {
- setFormHeaderImage(data.getRepositoryKind());
- setFormHeaderLabel(data);
- }
- }
- }
- }
-
- private void setFormHeaderImage(String repositoryKind) {
- ImageDescriptor overlay = TasksUiPlugin.getDefault().getOverlayIcon(repositoryKind);
- Image image = TasksUiImages.getImageWithOverlay(TasksUiImages.REPOSITORY, overlay, false, false);
- if (getHeaderForm() != null) {
- getHeaderForm().getForm().setImage(image);
- }
- }
-
- public Form getTopForm() {
- return this.getHeaderForm().getForm().getForm();
- }
-
- public void setMessage(String message, int type) {
- if (this.getHeaderForm() != null && this.getHeaderForm().getForm() != null) {
- if (!this.getHeaderForm().getForm().isDisposed()) {
- this.getHeaderForm().getForm().setMessage(message, type);
- }
- }
- }
-
- protected IWorkbenchSiteProgressService getProgressService() {
- Object siteService = getEditorSite().getAdapter(IWorkbenchSiteProgressService.class);
- if (siteService != null)
- return (IWorkbenchSiteProgressService) siteService;
- return null;
- }
-
- private void setFormHeaderLabel(RepositoryTaskData taskData) {
-
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(taskData.getRepositoryKind());
-
- String kindLabel = taskData.getTaskKind();
-
- if (connectorUi != null) {
- kindLabel = connectorUi.getTaskKindLabel(taskData);
- }
-
- String idLabel = taskData.getTaskKey();
-
- if (taskData.isNew()) {
- if (connectorUi != null) {
- kindLabel = "New " + connectorUi.getTaskKindLabel(taskData);
- } else {
- kindLabel = "New " + taskData.getTaskKind();
- }
- idLabel = "";
- }
-
- if (idLabel != null) {
- if (getHeaderForm().getForm() != null) {
- getHeaderForm().getForm().setText(kindLabel + " " + idLabel);
- }
- } else if (getHeaderForm().getForm() != null) {
- getHeaderForm().getForm().setText(kindLabel);
- }
- }
-
- private void setFormHeaderLabel(AbstractTask repositoryTask) {
-
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(repositoryTask.getConnectorKind());
- String kindLabel = "";
- if (connectorUi != null) {
- kindLabel = connectorUi.getTaskKindLabel(repositoryTask);
- }
-
- String idLabel = repositoryTask.getTaskKey();
-
- if (idLabel != null) {
- if (getHeaderForm().getForm() != null) {
- getHeaderForm().getForm().setText(kindLabel + " " + idLabel);
- }
- } else if (getHeaderForm() != null && getHeaderForm().getForm() != null) {
- getHeaderForm().getForm().setText(kindLabel);
- }
- }
-
- @Override
- public void setTitleImage(Image titleImage) {
- super.setTitleImage(titleImage);
- }
-
-}
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 f83e21e15..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditorInput.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
- *******************************************************************************/
-/*
- * Created on 19-Jan-2005
- */
-package org.eclipse.mylyn.tasks.ui.editors;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorInputFactory;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.IPersistableElement;
-
-/**
- * Input for task editors that can have nested pages.
- *
- * NOTE: likely to change for 3.0
- *
- * @author Eric Booth
- * @author Rob Elves
- * @author Mik Kersten
- * @since 1.0
- */
-public class TaskEditorInput implements IEditorInput, IPersistableElement {
-
- private static final int MAX_LABEL_LENGTH = 60;
-
- private AbstractTask task;
-
- private String summary;
-
- private boolean newTask = false;
-
- public TaskEditorInput(AbstractTask task, boolean newTask) {
- this.newTask = newTask;
- this.task = task;
- summary = truncateDescription(task.getSummary());
- }
-
- private String truncateDescription(String description) {
- if (description == null || description.length() <= MAX_LABEL_LENGTH) {
- return description;
- } else {
- return description.substring(0, MAX_LABEL_LENGTH) + "...";
- }
- }
-
- public boolean exists() {
- return true;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IEditorInput#getImageDescriptor()
- */
- public ImageDescriptor getImageDescriptor() {
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IEditorInput#getName()
- */
- public String getName() {
- return this.getLabel();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IEditorInput#getPersistable()
- */
- public IPersistableElement getPersistable() {
- return this;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IEditorInput#getToolTipText()
- */
- public String getToolTipText() {
- return summary;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- @SuppressWarnings("unchecked")
- public Object getAdapter(Class adapter) {
- if (adapter == IEditorInput.class) {
- return this;
- }
- return null;
- }
-
- /**
- * @return Returns the task.
- */
- public AbstractTask getTask() {
- return task;
- }
-
- /**
- * @return Returns the label.
- */
- public String getLabel() {
- if (task != null) {
- AbstractTask repositoryTask = task;
- String idLabel = repositoryTask.getTaskKey();
-
- summary = "";
- if (idLabel != null) {
- summary += idLabel + ": ";
- }
- summary += truncateDescription(task.getSummary());
- } else if (task != null) {
- summary = truncateDescription(task.getSummary());
- }
- return summary;
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + (newTask ? 1231 : 1237);
- 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;
- final TaskEditorInput other = (TaskEditorInput) obj;
- if (newTask != other.newTask)
- return false;
- if (task == null) {
- if (other.task != null)
- return false;
- } else if (!task.equals(other.task))
- return false;
- return true;
- }
-
- public boolean isNewTask() {
- return newTask;
- }
-
- public String getFactoryId() {
- return TaskEditorInputFactory.ID_FACTORY;
- }
-
- public void saveState(IMemento memento) {
- TaskEditorInputFactory.saveState(memento, this);
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskFormPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskFormPage.java
deleted file mode 100644
index 6ae96373e..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskFormPage.java
+++ /dev/null
@@ -1,668 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse 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.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.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.tasks.ui.TaskListColorsAndFonts;
-import org.eclipse.mylyn.internal.tasks.ui.editors.RepositoryTextViewer;
-import org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorActionContributor;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-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
- */
-public class TaskFormPage extends FormPage {
-
- protected boolean isDirty;
-
- protected TaskEditorActionContributor actionContributor;
-
- protected List<TextViewer> textViewers = new ArrayList<TextViewer>();
-
- private void addTextViewer(TextViewer viewer) {
- textViewers.add(viewer);
- }
-
- public TaskFormPage(FormEditor editor, String id, String title) {
- super(editor, id, title);
- }
-
- 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 = ((TaskEditor) getEditor()).getContributor();
- }
-
- 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)
- TaskTextViewerConfiguration repositoryViewerConfig = new TaskTextViewerConfiguration(false);
- commentViewer.configure(repositoryViewerConfig);
-
- IThemeManager themeManager = getSite().getWorkbenchWindow().getWorkbench().getThemeManager();
-
- commentViewer.getTextWidget().setFont(
- themeManager.getCurrentTheme().getFontRegistry().get(TaskListColorsAndFonts.TASK_EDITOR_FONT));
-
- 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);
- commentViewer.getTextWidget().setMenu(getManagedForm().getForm().getMenu());
- 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 = ((TaskEditor) getEditor()).getContributor();
- }
-
- 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(TaskListColorsAndFonts.TASK_EDITOR_FONT));
-
- commentViewer.addSelectionChangedListener(actionContributor);
-
- commentViewer.getTextWidget().addFocusListener(new FocusListener() {
- private IHandlerActivation handlerActivation;
-
- public void focusGained(FocusEvent e) {
- actionContributor.updateSelectableActions(commentViewer.getSelection());
-
- handlerActivation = handlerService.activateHandler(
- ITextEditorActionDefinitionIds.QUICK_ASSIST, createQuickFixActionHandler(commentViewer),
- new ActiveShellExpression(commentViewer.getTextWidget().getShell()));
- }
-
- public void focusLost(FocusEvent e) {
- StyledText st = (StyledText) e.widget;
- st.setSelectionRange(st.getCaretOffset(), 0);
- actionContributor.forceActionsEnabled();
-
- if(handlerActivation!=null) {
- handlerService.deactivateHandler(handlerActivation);
- }
- }
- });
-
- commentViewer.addTextListener(new ITextListener() {
- public void textChanged(TextEvent event) {
- actionContributor.updateSelectableActions(commentViewer.getSelection());
- }
- });
-
- commentViewer.setEditable(false);
- commentViewer.getTextWidget().setMenu(getManagedForm().getForm().getMenu());
- 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 TaskTextViewerConfiguration(spellCheck);
- commentViewer.configure(viewerConfig);
-
- commentViewer.setDocument(document, annotationModel);
-
- // !DND! hover manager that shows text when we hover
- // AnnotationBarHoverManager fAnnotationHoverManager = new AnnotationBarHoverManager(fCompositeRuler,
- // commentViewer, new AnnotationHover(fAnnotationModel), new AnnotationConfiguration());
- // fAnnotationHoverManager.install(annotationRuler.getControl());
-
- // !DND! 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() {
- public void run() {
- if (viewer.canDoOperation(ISourceViewer.QUICK_ASSIST)) {
- viewer.doOperation(ISourceViewer.QUICK_ASSIST);
- }
- }
- };
- quickFixAction.setActionDefinitionId(ITextEditorActionDefinitionIds.QUICK_ASSIST);
- 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 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 TaskListColorsAndFonts.COLOR_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 Color(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);
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskTextViewerConfiguration.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskTextViewerConfiguration.java
deleted file mode 100644
index 237fdba53..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskTextViewerConfiguration.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.tasks.ui.editors;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.TextAttribute;
-import org.eclipse.jface.text.hyperlink.DefaultHyperlinkPresenter;
-import org.eclipse.jface.text.hyperlink.IHyperlink;
-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.tasks.ui.TaskListColorsAndFonts;
-import org.eclipse.mylyn.internal.tasks.ui.editors.RepositoryTextViewer;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.TaskList;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TaskHyperlink;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.editors.text.EditorsUI;
-import org.eclipse.ui.editors.text.TextSourceViewerConfiguration;
-
-/**
- * @author Rob Elves
- * @since 2.1
- */
-public class TaskTextViewerConfiguration extends TextSourceViewerConfiguration {
-
- private RepositoryTextScanner scanner = null;
-
- private boolean spellcheck = false;
-
- public TaskTextViewerConfiguration(boolean spellchecking) {
- super(EditorsUI.getPreferenceStore());
- this.spellcheck = spellchecking;
- }
-
- @Override
- public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
- 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;
- }
-
- private RepositoryTextScanner getDefaultScanner() {
- if (scanner == null) {
- scanner = new RepositoryTextScanner();
- }
- return scanner;
- }
-
-// @Override
-// public IHyperlinkDetector[] getHyperlinkDetectors(ISourceViewer sourceViewer) {
-// List<IHyperlinkDetector> detectors = new ArrayList<IHyperlinkDetector>();
-// detectors.addAll(Arrays.asList(TasksUiPlugin.getDefault().getTaskHyperlinkDetectors()));
-// return detectors.toArray(new IHyperlinkDetector[detectors.size()]);
-// }
-
- @Override
- @SuppressWarnings("unchecked")
- protected Map getHyperlinkDetectorTargets(final ISourceViewer sourceViewer) {
- IAdaptable context = new IAdaptable() {
- public Object getAdapter(Class adapter) {
- if (adapter == TaskRepository.class) {
- if (sourceViewer instanceof RepositoryTextViewer) {
- return ((RepositoryTextViewer) sourceViewer).getRepository();
- }
- }
- return null;
- }
- };
-
- Map targets = new HashMap();
- targets.put("org.eclipse.ui.DefaultTextEditor", context);
- targets.put("org.eclipse.mylyn.tasks.ui.TaskEditor", context);
- return targets;
- }
-
- @Override
- public IHyperlinkPresenter getHyperlinkPresenter(final ISourceViewer sourceViewer) {
- return new DefaultHyperlinkPresenter(new RGB(0, 0, 200)) {
- @Override
- public void showHyperlinks(IHyperlink[] hyperlinks) {
- super.showHyperlinks(hyperlinks);
-
- if (hyperlinks != null && hyperlinks.length > 0 && hyperlinks[0] instanceof TaskHyperlink) {
- TaskHyperlink hyperlink = (TaskHyperlink) hyperlinks[0];
-
- TaskList taskList = TasksUiPlugin.getTaskListManager().getTaskList();
- String repositoryUrl = hyperlink.getRepository().getUrl();
-
- AbstractTask task = taskList.getTask(repositoryUrl, hyperlink.getTaskId());
- if (task == null) {
- task = taskList.getTaskByKey(repositoryUrl, hyperlink.getTaskId());
- }
-
- if (task != null) {
- Control cursorControl = sourceViewer.getTextWidget().getDisplay().getCursorControl();
- if (task.getTaskKey() == null) {
- cursorControl.setToolTipText(task.getSummary());
- } else {
- cursorControl.setToolTipText(task.getTaskKey() + ": " + task.getSummary());
- }
- }
- }
- }
-
- @Override
- public void hideHyperlinks() {
- Control cursorControl = sourceViewer.getTextWidget().getDisplay().getCursorControl();
- if (cursorControl != null) {
- cursorControl.setToolTipText(null);
- }
-
- super.hideHyperlinks();
- }
-
- public void uninstall() {
- // ignore
- super.uninstall();
- }
- };
- }
-
- @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 static class RepositoryTextScanner extends RuleBasedScanner {
-
- public RepositoryTextScanner() {
- IToken bugToken = new Token(new TextAttribute(TaskListColorsAndFonts.COLOR_HYPERLINK_TEXT));
- IRule[] rules = new IRule[15];
- 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[2] = (new MultiLineRule("bug#", " ", bugToken));
-// rules[3] = (new MultiLineRule("bug #", " ", bugToken));
-// rules[4] = (new SingleLineRule("bug #", "\n", 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));
- setRules(rules);
- }
-
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/search/AbstractRepositoryQueryPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/search/AbstractRepositoryQueryPage.java
deleted file mode 100644
index a73b32b31..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/search/AbstractRepositoryQueryPage.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse 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.search;
-
-import java.util.Set;
-
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.mylyn.internal.tasks.ui.ITasksUiConstants;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.AbstractTaskCategory;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.tasks.ui.TaskFactory;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.ui.wizards.AbstractEditQueryWizard;
-import org.eclipse.search.ui.ISearchPage;
-import org.eclipse.search.ui.ISearchPageContainer;
-import org.eclipse.search.ui.NewSearchUI;
-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.Display;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * Extend to provide repository-specific query page to the Workbench search dialog.
- *
- * @author Rob Elves
- * @since 2.0
- */
-public abstract class AbstractRepositoryQueryPage extends WizardPage implements ISearchPage {
-
- private static final String TITLE_QUERY_TITLE = "&Query Title:";
-
- private static final String TITLE = "Enter query parameters";
-
- private static final String DESCRIPTION = "If attributes are blank or stale press the Update button.";
-
- private String titleString;
-
- protected Text title;
-
- protected ISearchPageContainer scontainer = null;
-
- protected TaskRepository repository;
-
- public AbstractRepositoryQueryPage(String wizardTitle) {
- this(wizardTitle, null);
- setTitle(TITLE);
- setDescription(DESCRIPTION);
- setImageDescriptor(TasksUiImages.BANNER_REPOSITORY);
- setPageComplete(false);
- }
-
- public AbstractRepositoryQueryPage(String wizardTitle, String queryTitle) {
- super(wizardTitle);
- titleString = queryTitle == null ? "" : queryTitle;
- }
-
- public void createControl(Composite parent) {
- if (scontainer == null) {
- createTitleGroup(parent);
- title.setFocus();
- }
- }
-
- private void createTitleGroup(Composite parent) {
- Composite group = new Composite(parent, SWT.NONE);
-
- GridLayout layout = new GridLayout(2, false);
- group.setLayout(layout);
-
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 1;
- group.setLayoutData(gd);
-
- Label label = new Label(group, SWT.NONE);
- label.setText(TITLE_QUERY_TITLE);
-
- title = new Text(group, SWT.BORDER);
- title.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
- title.setText(titleString);
-
- title.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- setPageComplete(isPageComplete());
- }
- });
- }
-
- @Override
- public boolean isPageComplete() {
- Set<AbstractRepositoryQuery> queries = TasksUiPlugin.getTaskListManager().getTaskList().getQueries();
- Set<AbstractTaskCategory> categories = TasksUiPlugin.getTaskListManager().getTaskList().getCategories();
-
- if (title == null || title.getText().equals("")) {
- setErrorMessage("Please specify a title for the query.");
- return false;
- } else {
- if (getWizard() instanceof AbstractEditQueryWizard) {
- String oldSummary = ((AbstractEditQueryWizard) getWizard()).getQuerySummary();
- if (oldSummary != null && title.getText().equals(oldSummary)) {
- setErrorMessage(null);
- return true;
- }
- }
- for (AbstractTaskCategory category : categories) {
- if (title.getText().equals(category.getSummary())) {
- setErrorMessage("A category with this name already exists, please choose another name.");
- return false;
- }
- }
- for (AbstractRepositoryQuery query : queries) {
- if (title.getText().equals(query.getSummary())) {
- setErrorMessage("A query with this name already exists, please choose another name.");
- return false;
- }
- }
- }
- setErrorMessage(null);
- return true;
- }
-
- public String getQueryTitle() {
- return title != null ? title.getText() : "";
- }
-
- public abstract AbstractRepositoryQuery getQuery();
-
- public void saveState() {
- // empty
- }
-
- public void setContainer(ISearchPageContainer container) {
- scontainer = container;
- }
-
- public boolean inSearchContainer() {
- return scontainer != null;
- }
-
- public boolean performAction() {
- if (repository == null) {
- MessageDialog.openInformation(Display.getCurrent().getActiveShell(), ITasksUiConstants.TITLE_DIALOG,
- TaskRepositoryManager.MESSAGE_NO_REPOSITORY);
- return false;
- }
-
- NewSearchUI.activateSearchResultView();
-
- AbstractRepositoryConnector connector = TasksUiPlugin.getRepositoryManager().getRepositoryConnector(
- repository.getConnectorKind());
- if (connector != null) {
- SearchHitCollector collector = new SearchHitCollector(TasksUiPlugin.getTaskListManager().getTaskList(),
- repository, getQuery(), new TaskFactory(repository, false, false));
- NewSearchUI.runQueryInBackground(collector);
- }
- return true;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/search/RepositorySearchResult.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/search/RepositorySearchResult.java
deleted file mode 100644
index e9a5cdbe0..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/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.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 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/tasks/ui/search/SearchHitCollector.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/search/SearchHitCollector.java
deleted file mode 100644
index a7468ed3c..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/search/SearchHitCollector.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.tasks.ui.search;
-
-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.NullProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.ITaskCollector;
-import org.eclipse.mylyn.tasks.core.ITaskFactory;
-import org.eclipse.mylyn.tasks.core.QueryHitCollector;
-import org.eclipse.mylyn.tasks.core.RepositoryStatus;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.TaskList;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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 implements ISearchQuery, ITaskCollector {
-
- 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 Set<AbstractTask> taskResults = new HashSet<AbstractTask>();
-
-// /** The string to display to the user when we have 1 match */
-// private static final String MATCH = "1 match";
-//
-// /** The string to display to the user when we have multiple or no matches */
-// private static final String MATCHES = "{0} matches";
-
- private final TaskList taskList;
-
- private final ITaskFactory taskFactory;
-
- private TaskRepository repository;
-
- private AbstractRepositoryQuery repositoryQuery;
-
- private RepositorySearchResult searchResult;
-
- public SearchHitCollector(TaskList tasklist, TaskRepository repository, AbstractRepositoryQuery repositoryQuery,
- ITaskFactory taskFactory) {
- this.taskList = tasklist;
- this.repository = repository;
- this.repositoryQuery = repositoryQuery;
- this.searchResult = new RepositorySearchResult(this);
- this.taskFactory = taskFactory;
- }
-
- public void aboutToStart() {
- taskResults.clear();
-
- searchResult.removeAll();
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- NewSearchUI.activateSearchResultView();
- }
- });
- }
-
- public void accept(AbstractTask task) {
- if (task == null) {
- throw new IllegalArgumentException();
- }
-
- AbstractTask hitTask = taskList.getTask(task.getHandleIdentifier());
- if (hitTask == null) {
- hitTask = task;
- }
-
- taskResults.add(hitTask);
- this.searchResult.addMatch(new Match(hitTask, 0, 0));
- }
-
- public void accept(RepositoryTaskData taskData) throws CoreException {
- if (taskData == null) {
- throw new IllegalArgumentException();
- }
-
- AbstractTask task = taskFactory.createTask(taskData, new SubProgressMonitor(new NullProgressMonitor(), 1));
- if (task != null) {
- 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() >= QueryHitCollector.MAX_HITS) {
- StatusHandler.displayStatus("Maximum hits reached", RepositoryStatus.createStatus(repository.getUrl(),
- IStatus.WARNING, TasksUiPlugin.ID_PLUGIN, LABEL_MAX_HITS_REACHED));
- }
- return searchResult;
- }
-
- public IStatus run(IProgressMonitor monitor) throws OperationCanceledException {
- if (monitor == null) {
- monitor = new NullProgressMonitor();
- }
-
- //monitor.beginTask(QUERYING_REPOSITORY, IProgressMonitor.UNKNOWN);
- aboutToStart();
-
- if (monitor.isCanceled()) {
- throw new OperationCanceledException("Search cancelled");
- }
- AbstractRepositoryConnector connector = TasksUiPlugin.getRepositoryManager().getRepositoryConnector(
- repositoryQuery.getRepositoryKind());
- if (connector != null) {
- IStatus status = connector.performQuery(repositoryQuery, repository, monitor, this);
- if (!status.isOK()) {
- StatusHandler.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;
- }
-
-// protected String getFormattedMatchesString(int count) {
-// if (count == 1) {
-// return MATCH;
-// }
-// Object[] messageFormatArgs = { new Integer(count) };
-// return MessageFormat.format(MATCHES, messageFormatArgs);
-// }
-
- public Set<AbstractTask> getTasks() {
- return taskResults;
- }
-
- public AbstractRepositoryQuery getRepositoryQuery() {
- return repositoryQuery;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractEditQueryWizard.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractEditQueryWizard.java
deleted file mode 100644
index 879dc6c37..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractEditQueryWizard.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.wizards;
-
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.ui.search.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 1.0
- */
-public abstract class AbstractEditQueryWizard extends Wizard {
-
- private static final String TITLE = "Edit Repository Query";
-
- protected final TaskRepository repository;
-
- protected AbstractRepositoryQuery query;
-
- protected AbstractRepositoryQueryPage page;
-
- public AbstractEditQueryWizard(TaskRepository repository, AbstractRepositoryQuery query) {
- this.repository = repository;
- this.query = query;
- setNeedsProgressMonitor(true);
- setWindowTitle(TITLE);
- setDefaultPageImageDescriptor(TasksUiImages.BANNER_REPOSITORY);
- }
-
- @Override
- public boolean performFinish() {
- if (query != null) {
- TasksUiPlugin.getTaskListManager().getTaskList().deleteQuery(query);
- }
- AbstractRepositoryQuery queryToRun = page != null ? page.getQuery() : this.query;
- if (queryToRun != null) {
- TasksUiPlugin.getTaskListManager().getTaskList().addQuery(queryToRun);
-
- AbstractRepositoryConnector connector = TasksUiPlugin.getRepositoryManager().getRepositoryConnector(
- repository.getConnectorKind());
- if (connector != null) {
- TasksUiPlugin.getSynchronizationManager().synchronize(connector, 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/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 87c3583f5..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositorySettingsPage.java
+++ /dev/null
@@ -1,1317 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse 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.Status;
-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.internal.tasks.core.IRepositoryConstants;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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;
-import org.eclipse.ui.forms.widgets.Section;
-
-/**
- * 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
- */
-public abstract class AbstractRepositorySettingsPage extends WizardPage {
-
- 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 FormToolkit toolkit = new FormToolkit(Display.getCurrent());
-
- private Hyperlink createAccountHyperlink;
-
- private Hyperlink manageAccountHyperlink;
-
- public AbstractRepositorySettingsPage(String title, String description, AbstractRepositoryConnectorUi repositoryUi) {
- super(title);
- super.setTitle(title);
- super.setDescription(description);
- AbstractRepositoryConnector connector = TasksUiPlugin.getRepositoryManager().getRepositoryConnector(
- repositoryUi.getConnectorKind());
- this.connector = connector;
-
- setNeedsAnonymousLogin(false);
- setNeedsEncoding(true);
- setNeedsTimeZone(true);
- setNeedsProxy(true);
- setNeedsValidation(true);
- setNeedsAdvanced(true);
- }
-
- @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.getUrl();
- 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();
- }
- }
- };
-
- 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.getUrl());
- repositoryUserNameEditor.setStringValue(repository.getUserName());
- repositoryPasswordEditor.setStringValue(repository.getPassword());
- } catch (Throwable t) {
- StatusHandler.fail(t, "could not set field value for: " + repository, false);
- }
- }
-
- if (needsAnonymousLogin()) {
- if (repository != null) {
- setAnonymous(repository.isAnonymous());
- } else {
- setAnonymous(true);
- }
- }
-
- // 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, Section.COMPACT | Section.TWISTIE
- | Section.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.fail(t, "could not set field value for: " + repository, false);
- }
- }
- }
- }
-
- if (needsHttpAuth()) {
- httpAuthExpComposite = toolkit.createExpandableComposite(compositeContainer, Section.COMPACT
- | Section.TWISTIE | Section.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('*');
-
- httpAuthUserNameEditor.setEnabled(httpAuthButton.getSelection(), httpAuthComp);
- httpAuthPasswordEditor.setEnabled(httpAuthButton.getSelection(), httpAuthComp);
-
- setHttpAuth(oldHttpAuthPassword != null && oldHttpAuthUserId != null && !oldHttpAuthPassword.equals("")
- && !oldHttpAuthUserId.equals(""));
-
- httpAuthExpComposite.setExpanded(httpAuthButton.getSelection());
- }
-
- if (needsProxy()) {
- addProxySection();
- }
-
- 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, false);
- }
- }
- }
- });
-
- 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 && getServerUrl() != null && getServerUrl().length() > 0) {
- repository = createTaskRepository();
- }
- if (repository != null) {
- String accountManagementUrl = TasksUiPlugin.getConnectorUi(connector.getConnectorKind())
- .getAccountManagementUrl(repository);
- if (accountManagementUrl != null) {
- TasksUiUtil.openUrl(accountManagementUrl, false);
- }
- }
- }
- });
-
- // 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, Section.COMPACT | Section.TWISTIE
- | Section.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);
-
- setProxyAuth(oldProxyUsername != null && oldProxyPassword != null && !oldProxyUsername.equals("")
- && !oldProxyPassword.equals(""));
-
- setUseDefaultProxy(repository != null ? repository.isDefaultProxyEnabled() : true);
- proxyExpComposite.setExpanded(!systemProxyButton.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);
- 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);
- }
-
- 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);
- }
-
- protected abstract void createAdditionalControls(Composite parent);
-
- protected abstract boolean isValidUrl(String name);
-
- void updateHyperlinks() {
- if (getServerUrl() != null && getServerUrl().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();
- }
-
- public String getServerUrl() {
- 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(e, "problem refreshing password field");
- }
- }
-
- @Override
- public Text getTextControl() {
- return super.getTextControl();
- }
-
- }
-
- @Override
- public boolean isPageComplete() {
- String errorMessage = null;
- String url = getServerUrl();
- 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 = TasksUiPlugin.getRepositoryManager().getAllRepositories();
- repositoryUrls = new HashSet<String>(repositories.size());
- for (TaskRepository repository : repositories) {
- repositoryUrls.add(repository.getUrl());
- }
- }
-
- if (repositoryUrls.contains(urlString)) {
- return "Repository already exists.";
- }
- }
- return null;
- }
-
- public void setRepository(TaskRepository repository) {
- this.repository = repository;
- }
-
- 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 String getTimeZoneId() {
- // return (timeZonesCombo != null) ?
- // timeZonesCombo.getItem(timeZonesCombo.getSelectionIndex()) : null;
- // }
-
- public TaskRepository createTaskRepository() {
- // TaskRepository repository = new
- // TaskRepository(connector.getRepositoryType(), getServerUrl(),
- // getVersion(),
- // getCharacterEncoding(), getTimeZoneId());
-
- TaskRepository repository = new TaskRepository(connector.getConnectorKind(), getServerUrl(), getVersion(),
- getCharacterEncoding(), "");
- repository.setRepositoryLabel(getRepositoryLabel());
- repository.setAuthenticationCredentials(getUserName(), getPassword());
- if (needsAnonymousLogin()) {
- repository.setAnonymous(anonymousButton.getSelection());
- }
- // repository.setProperty(TaskRepository.AUTH_HTTP_USERNAME,
- // getHttpAuthUserId());
- // repository.setProperty(TaskRepository.AUTH_HTTP_PASSWORD,
- // getHttpAuthPassword());
- if (getHttpAuthUserId().length() > 0 && getHttpAuthPassword().length() > 0) {
- repository.setHttpAuthenticationCredentials(getHttpAuthUserId(), getHttpAuthPassword());
- }
-
- repository.setProperty(TaskRepository.PROXY_USEDEFAULT, String.valueOf(getUseDefaultProxy()));
- repository.setProperty(TaskRepository.PROXY_HOSTNAME, getProxyHostname());
- repository.setProperty(TaskRepository.PROXY_PORT, getProxyPort());
-
- if (getProxyUserName().length() > 0 && getProxyPassword().length() > 0) {
- repository.setProxyAuthenticationCredentials(getProxyUserName(), getProxyPassword());
- }
- // repository.setProperty(TaskRepository.PROXY_USERNAME,
- // getProxyUsername());
-
- // repository.setProperty(TaskRepository.PROXY_PASSWORD,
- // getProxyPassword());
-
- // repository.setProperty(TaskRepository.PROXY_USERNAME,
- // getHttpAuthUserId());
- // repository.setProperty(TaskRepository.PROXY_PASSWORD,
- // getHttpAuthPassword());
- return repository;
- }
-
- 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;
- }
-
- public void updateProperties(TaskRepository repository) {
- // none
- }
-
- /** 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);
- }
-
- protected void validateSettings() {
- final Validator validator = getValidator(createTaskRepository());
- if (validator == null) {
- return;
- }
-
- try {
- getWizard().getContainer().run(true, false, 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 (Exception e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
- });
- } catch (InvocationTargetException e) {
- StatusHandler.fail(e.getCause(), "Internal error validating repository", true);
- 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, WizardPage.INFORMATION);
- break;
- case IStatus.INFO:
- setMessage(message, WizardPage.INFORMATION);
- break;
- case IStatus.WARNING:
- setMessage(message, WizardPage.WARNING);
- break;
- default:
- setMessage(message, WizardPage.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/NewTaskWizard.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/NewTaskWizard.java
deleted file mode 100644
index ce6175555..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/NewTaskWizard.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse 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.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractAttributeFactory;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskDataHandler;
-import org.eclipse.mylyn.tasks.core.RepositoryStatus;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.mylyn.tasks.ui.editors.NewTaskEditorInput;
-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 TaskRepository taskRepository;
-
- public NewTaskWizard(TaskRepository taskRepository) {
- this.taskRepository = taskRepository;
- }
-
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- }
-
- @Override
- public void addPages() {
- }
-
- @Override
- public boolean canFinish() {
- return true;
- }
-
- @Override
- public boolean performFinish() {
- AbstractRepositoryConnector connector = TasksUiPlugin.getRepositoryManager().getRepositoryConnector(
- taskRepository.getConnectorKind());
-
- final AbstractTaskDataHandler taskDataHandler = connector.getTaskDataHandler();
- if (taskDataHandler == null) {
- StatusHandler.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.getUrl(),
- taskRepository.getConnectorKind(), AbstractTask.DEFAULT_TASK_KIND);
-
- final RepositoryTaskData taskData = new RepositoryTaskData(attributeFactory, taskRepository.getConnectorKind(),
- taskRepository.getUrl(), 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) {
- StatusHandler.displayStatus("Error creating new task", ((CoreException) e.getCause()).getStatus());
- } else {
- StatusHandler.fail(e.getCause(), "Error creating new task", true);
- }
- return false;
- } catch (InterruptedException e) {
- return false;
- }
-
- 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 db50bba58..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/NewWebTaskWizard.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.ui.wizards;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.NewWebTaskPage;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-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;
-
- public NewWebTaskWizard(TaskRepository taskRepository, String newTaskUrl) {
- this.taskRepository = taskRepository;
- this.newTaskUrl = newTaskUrl;
-
- setWindowTitle("New Task");
- setDefaultPageImageDescriptor(TasksUiImages.BANNER_REPOSITORY);
- }
-
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- }
-
- @Override
- public void addPages() {
- addPage(new NewWebTaskPage());
- }
-
- @Override
- public boolean canFinish() {
- return true;
- }
-
- @Override
- public boolean performFinish() {
- TasksUiUtil.openUrl(newTaskUrl, false);
- return true;
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.core/.classpath b/org.eclipse.mylyn.trac.core/.classpath
deleted file mode 100644
index eb9cbfe8f..000000000
--- a/org.eclipse.mylyn.trac.core/.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="discouraged" pattern="**/mylyn/**/internal/**"/>
- </accessrules>
- </classpathentry>
- <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 b83a495f8..000000000
--- a/org.eclipse.mylyn.trac.core/.project
+++ /dev/null
@@ -1,28 +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>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</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 888de1277..000000000
--- a/org.eclipse.mylyn.trac.core/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,316 +0,0 @@
-#Sun Jun 24 11:52:58 EDT 2007
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.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=disabled
-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.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.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
-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=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-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.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.5
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=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_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 \ No newline at end of file
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 1e4caec9f..000000000
--- a/org.eclipse.mylyn.trac.core/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,6 +0,0 @@
-#Mon Jul 09 18:11:45 PDT 2007
-eclipse.preferences.version=1
-formatter_profile=_Mylar based on Eclipse [built-in]
-formatter_settings_version=11
-internal.default.compliance=default
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return the ${bare_field_name}\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} the ${bare_field_name} to set\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\r\n * \r\n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author ${user}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*******************************************************************************\r\n * Copyright (c) 2004, 2007 Mylyn project committers and others.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n *******************************************************************************/\r\n\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ignore\r\n${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ignore</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template></templates>
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.mylar.tasklist.prefs b/org.eclipse.mylyn.trac.core/.settings/org.eclipse.mylar.tasklist.prefs
deleted file mode 100644
index a6cf96a98..000000000
--- a/org.eclipse.mylyn.trac.core/.settings/org.eclipse.mylar.tasklist.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Fri Oct 20 16:54:30 PDT 2006
-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.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 769b229ff..000000000
--- a/org.eclipse.mylyn.trac.core/.settings/org.eclipse.pde.prefs
+++ /dev/null
@@ -1,12 +0,0 @@
-#Thu Nov 03 15:45:55 PST 2005
-compilers.p.deprecated=2
-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-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 da7f953c5..000000000
--- a/org.eclipse.mylyn.trac.core/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,19 +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: 2.1.0.v20070924-2200
-Bundle-Vendor: Eclipse.org
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.mylyn.context.core,
- org.eclipse.mylyn.tasks.core,
- org.eclipse.search,
- org.eclipse.mylyn.monitor.core,
- org.eclipse.mylyn,
- org.eclipse.mylyn.web.core
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.mylyn.internal.trac.core,
- org.eclipse.mylyn.internal.trac.core.model,
- org.eclipse.mylyn.internal.trac.core.util
-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 afeab002d..000000000
--- a/org.eclipse.mylyn.trac.core/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
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html
-src.includes = src/,\
- META-INF/,\
- about.html,\
- build.properties
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 cae0147f7..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/AbstractTracClient.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.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.HttpClient;
-import org.apache.commons.httpclient.NameValuePair;
-import org.apache.commons.httpclient.methods.PostMethod;
-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.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;
-import org.eclipse.mylyn.web.core.WebClientUtil;
-
-/**
- * @author Steffen Pingel
- */
-public abstract class AbstractTracClient implements ITracClient {
-
- private static final String LOGIN_COOKIE_NAME = "trac_auth";
-
- protected String username;
-
- protected String password;
-
- protected URL repositoryUrl;
-
- protected Version version;
-
- protected TracClientData data;
-
- protected Proxy proxy;
-
- public AbstractTracClient(URL repositoryUrl, Version version, String username, String password, Proxy proxy) {
- this.repositoryUrl = repositoryUrl;
- this.version = version;
- this.username = username;
- this.password = password;
- this.proxy = proxy;
-
- this.data = new TracClientData();
- }
-
- public Version getVersion() {
- return version;
- }
-
- protected boolean hasAuthenticationCredentials() {
- return username != null && username.length() > 0;
- }
-
- protected void authenticateAccountManager(HttpClient httpClient) throws IOException, TracLoginException {
- PostMethod post = new PostMethod(WebClientUtil.getRequestPath(repositoryUrl + LOGIN_URL));
- post.setFollowRedirects(false);
- NameValuePair[] data = { new NameValuePair("referer", ""), new NameValuePair("user", username),
- new NameValuePair("password", password) };
- post.setRequestBody(data);
- try {
- int code = httpClient.executeMethod(post);
- // code should be a redirect in case of success
- if (code == HttpURLConnection.HTTP_OK) {
- throw new TracLoginException();
- }
- } finally {
- post.releaseConnection();
- }
- }
-
- /**
- * 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;
- }
-
- public void setProxy(Proxy proxy) {
- this.proxy = proxy;
- }
-
- public Proxy getProxy() {
- return proxy;
- }
-
-}
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 d7cedd215..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/ITracClient.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.trac.core;
-
-import java.io.InputStream;
-import java.net.Proxy;
-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
- * @return the ticket
- * @throws TracException
- * thrown in case of a connection error
- */
- TracTicket getTicket(int id) 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
- * @throws TracException
- * thrown in case of a connection error
- */
- void search(TracSearch query, List<TracTicket> result) throws TracException;
-
- /**
- * Validates the repository connection.
- *
- * @throws TracException
- * thrown in case of a connection error
- */
- void validate() 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) throws TracException;
-
- void putAttachmentData(int ticketId, String name, String description, InputStream source) throws TracException;
-
- void deleteAttachment(int ticketId, String filename) throws TracException;
-
- /**
- * @return the id of the created ticket
- */
- int createTicket(TracTicket ticket) throws TracException;
-
- void updateTicket(TracTicket ticket, String comment) throws TracException;
-
- /**
- * Sets a reference to the cached repository attributes.
- *
- * @param data
- * cached repository attributes
- */
- void setData(TracClientData data);
-
- Set<Integer> getChangedTickets(Date since) throws TracException;
-
- void setProxy(Proxy proxy);
-
- Date getTicketLastChanged(Integer id) 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 d31ba6987..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/ITracWikiClient.java
+++ /dev/null
@@ -1,226 +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.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
- * @return The HTML-formatted string of the wiki text
- * @throws TracException
- * thrown in case of a connection error
- */
- public String wikiToHtml(String sourceText) throws TracException;
-
- /**
- * Validates the Trac XML-RPC WikiRPC API version of the repository
- *
- * @throws TracException
- */
- public void validateWikiRpcApi() throws TracException;
-
- /**
- * Gets the list of the names of all pages from the repository
- *
- * @return The array of the names of all Wiki pages
- * @throws TracException
- */
- public String[] getAllWikiPageNames() throws TracException;
-
- /**
- * Gets the latest version of a Wiki page from the repository
- *
- * @param pageName
- * the name of the Wiki page
- * @return the Wiki page at the latest version
- * @throws TracException
- */
- public TracWikiPage getWikiPage(String pageName) 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
- * @return the Wiki page at the specified version
- * @throws TracException
- */
- public TracWikiPage getWikiPage(String pageName, int version) throws TracException;
-
- /**
- * Gets the information about the latest version of a Wiki page from the repository
- *
- * @param pageName
- * the name of the Wiki page
- * @return The information about the page at the latest version
- * @throws TracException
- */
- public TracWikiPageInfo getWikiPageInfo(String pageName) 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
- * @return The information about the page at the specified version
- * @throws TracException
- */
- public TracWikiPageInfo getWikiPageInfo(String pageName, int version) throws TracException;
-
- /**
- * Gets the information about all versions of a Wiki page from the repository
- *
- * @param pageName
- * the name of the Wiki page
- * @return array of TracWikiPageInfo that contains the information about all versions of the page
- * @throws TracException
- */
- public TracWikiPageInfo[] getWikiPageInfoAllVersions(String pageName) 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
- * @return the raw Wiki text of the page, latest version
- * @throws TracException
- */
- public String getWikiPageContent(String pageName) 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
- * @return the raw Wiki text of the page, specified version
- * @throws TracException
- */
- public String getWikiPageContent(String pageName, int version) 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
- * @return the rendered HTML of the page, latest version
- * @throws TracException
- */
- public String getWikiPageHtml(String pageName) 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
- * @return the rendered HTML of the page, specified version
- * @throws TracException
- */
- public String getWikiPageHtml(String pageName, int version) 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
- * @return array of TracWikiPageInfo that contains the information about the modified pages
- * @throws TracException
- */
- public TracWikiPageInfo[] getRecentWikiChanges(Date since) 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>
- * @return <code>true</code> if successful
- * @throws TracException
- */
- public boolean putWikipage(String pageName, String content, Map<String, Object> attributes) 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
- * @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) 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
- * @return An InputStream of the content of the attachment
- * @throws TracException
- */
- public InputStream getWikiPageAttachmentData(String pageName, String fileName) 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
- * @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) 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 fd407061f..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.trac.core.model.TracTicket;
-import org.eclipse.mylyn.tasks.core.AbstractAttachmentHandler;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.ITaskAttachment;
-import org.eclipse.mylyn.tasks.core.RepositoryAttachment;
-import org.eclipse.mylyn.tasks.core.RepositoryStatus;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskAttribute;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-/**
- * @author Steffen Pingel
- */
-public class TracAttachmentHandler extends AbstractAttachmentHandler {
-
- private 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.getUrl(), IStatus.ERROR, TracCorePlugin.PLUGIN_ID,
- RepositoryStatus.ERROR_REPOSITORY, "Attachment download from " + repository.getUrl()
- + " failed, missing attachment filename."));
- }
-
- try {
- ITracClient client = connector.getClientManager().getRepository(repository);
- int id = Integer.parseInt(attachment.getTaskId());
- return client.getAttachmentData(id, filename);
- } catch (Exception e) {
- throw new CoreException(TracCorePlugin.toStatus(e, repository));
- }
- }
-
- @Override
- public void uploadAttachment(TaskRepository repository, AbstractTask task, ITaskAttachment attachment,
- String comment, IProgressMonitor monitor) throws CoreException {
- if (!TracRepositoryConnector.hasAttachmentSupport(repository, task)) {
- throw new CoreException(new RepositoryStatus(repository.getUrl(), 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().getRepository(repository);
- int id = Integer.parseInt(task.getTaskId());
- client.putAttachmentData(id, attachment.getFilename(), attachment.getDescription(),
- attachment.createInputStream());
- if (comment != null && comment.length() > 0) {
- TracTicket ticket = new TracTicket(id);
- client.updateTicket(ticket, comment);
- }
- } catch (Exception e) {
- throw new CoreException(TracCorePlugin.toStatus(e, repository));
- }
- } finally {
- monitor.done();
- }
- }
-
- @Override
- public boolean canDownloadAttachment(TaskRepository repository, AbstractTask task) {
- if (repository == null) {
- return false;
- }
- return TracRepositoryConnector.hasAttachmentSupport(repository, task);
- }
-
- @Override
- public boolean canUploadAttachment(TaskRepository repository, AbstractTask 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 b763946f5..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracAttributeFactory.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.trac.core;
-
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Map;
-
-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.AbstractAttributeFactory;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskAttribute;
-
-/**
- * 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, false), 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 4a822902b..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.TracTicketField;
-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.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 09634eae9..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracClientFactory.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.trac.core;
-
-import java.net.MalformedURLException;
-import java.net.Proxy;
-import java.net.URL;
-
-import org.eclipse.mylyn.internal.trac.core.ITracClient.Version;
-
-/**
- * @author Steffen Pingel
- */
-public class TracClientFactory {
-
- public static ITracClient createClient(String location, Version version, String username, String password,
- Proxy proxy) throws MalformedURLException {
- URL url = new URL(location);
-
- if (version == Version.TRAC_0_9) {
- return new TracWebClient(url, version, username, password, proxy);
- } else if (version == Version.XML_RPC) {
- return new TracXmlRpcClient(url, version, username, password, proxy);
- }
-
- 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(String location, String username, String password, Proxy proxy)
- throws MalformedURLException, TracException {
- URL url = new URL(location);
- try {
- ITracClient repository = new TracXmlRpcClient(url, Version.XML_RPC, username, password, proxy);
- repository.validate();
- return Version.XML_RPC;
- } catch (TracException e) {
- try {
- ITracClient repository = new TracWebClient(url, Version.TRAC_0_9, username, password, proxy);
- repository.validate();
- 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 baeeb9322..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracClientManager.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.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.net.MalformedURLException;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.mylyn.internal.trac.core.ITracClient.Version;
-import org.eclipse.mylyn.tasks.core.ITaskRepositoryListener;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-/**
- * Caches {@link ITracClient} objects.
- *
- * @author Steffen Pingel
- */
-public class TracClientManager implements ITaskRepositoryListener {
-
- private Map<String, ITracClient> clientByUrl = new HashMap<String, ITracClient>();
-
- private Map<String, TracClientData> clientDataByUrl = new HashMap<String, TracClientData>();
-
- private File cacheFile;
-
- public TracClientManager(File cacheFile) {
- this.cacheFile = cacheFile;
-
- readCache();
- }
-
- public synchronized ITracClient getRepository(TaskRepository taskRepository) throws MalformedURLException {
- ITracClient repository = clientByUrl.get(taskRepository.getUrl());
- if (repository == null) {
- repository = TracClientFactory.createClient(taskRepository.getUrl(),
- Version.fromVersion(taskRepository.getVersion()), taskRepository.getUserName(),
- taskRepository.getPassword(), taskRepository.getProxy());
- clientByUrl.put(taskRepository.getUrl(), repository);
-
- TracClientData data = clientDataByUrl.get(taskRepository.getUrl());
- if (data == null) {
- data = new TracClientData();
- clientDataByUrl.put(taskRepository.getUrl(), 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.getUrl());
- clientDataByUrl.remove(repository.getUrl());
- }
-
- public synchronized void repositoryRemoved(TaskRepository repository) {
- clientByUrl.remove(repository.getUrl());
- clientDataByUrl.remove(repository.getUrl());
- }
-
- public synchronized void repositorySettingsChanged(TaskRepository repository) {
- clientByUrl.remove(repository.getUrl());
- // if url is changed a stale data object will be left in
- // clientDataByUrl, bug #149939
- }
-
- @SuppressWarnings("unchecked")
- 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) {
- TracCorePlugin.log(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) {
- TracCorePlugin.log(e);
- } finally {
- if (out != null) {
- try {
- out.close();
- } catch (IOException e) {
- // 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 db3315cab..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracCorePlugin.java
+++ /dev/null
@@ -1,126 +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.core.runtime.Status;
-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(TracCorePlugin.getDefault().getBundle());
- IPath cacheFile = stateLocation.append("repositoryConfigurations");
- return cacheFile;
- }
-
- public static IStatus toStatus(Throwable e, TaskRepository repository) {
- if (e instanceof TracLoginException) {
- return RepositoryStatus.createLoginError(repository.getUrl(), PLUGIN_ID);
- } else if (e instanceof TracPermissionDeniedException) {
- return TracStatus.createPermissionDeniedError(repository.getUrl(), PLUGIN_ID);
- } else if (e instanceof TracException) {
- String message = e.getMessage();
- if (message == null) {
- message = "I/O error has occured";
- }
- return new RepositoryStatus(repository.getUrl(), Status.ERROR, PLUGIN_ID, RepositoryStatus.ERROR_IO,
- message, e);
- } else if (e instanceof ClassCastException) {
- return new RepositoryStatus(Status.ERROR, PLUGIN_ID, RepositoryStatus.ERROR_IO,
- "Unexpected server response: " + e.getMessage(), e);
- } else if (e instanceof MalformedURLException) {
- return new RepositoryStatus(Status.ERROR, PLUGIN_ID, RepositoryStatus.ERROR_IO,
- "Repository URL is invalid", e);
- } else {
- return new RepositoryStatus(Status.ERROR, PLUGIN_ID, RepositoryStatus.ERROR_INTERNAL, "Unexpected error", e);
- }
- }
-
- /**
- * Convenience method for logging statuses to the plug-in log
- *
- * @param status
- * the status to log
- */
- public static void log(IStatus status) {
- getDefault().getLog().log(status);
- }
-
- /**
- * Convenience method for logging exceptions to the plug-in log
- *
- * @param e
- * the exception to log
- */
- public static void log(Throwable e) {
- String message = e.getMessage();
- if (e.getMessage() == null) {
- message = e.getClass().toString();
- }
- log(new Status(Status.ERROR, TracCorePlugin.PLUGIN_ID, 0, message, 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/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 50b97c60f..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracRepositoryConnector.java
+++ /dev/null
@@ -1,420 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public 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.net.MalformedURLException;
-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.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-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.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.AbstractAttachmentHandler;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskDataHandler;
-import org.eclipse.mylyn.tasks.core.ITaskCollector;
-import org.eclipse.mylyn.tasks.core.RepositoryOperation;
-import org.eclipse.mylyn.tasks.core.RepositoryStatus;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskAttribute;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-/**
- * @author Steffen Pingel
- */
-public class TracRepositoryConnector extends AbstractRepositoryConnector {
-
- private final static String CLIENT_LABEL = "Trac (supports 0.9 or 0.10 through Web and XML-RPC)";
-
- private TracClientManager clientManager;
-
- private TracTaskDataHandler taskDataHandler = new TracTaskDataHandler(this);
-
- private TracAttachmentHandler attachmentHandler = new TracAttachmentHandler(this);
-
- public TracRepositoryConnector() {
- TracCorePlugin.getDefault().setConnector(this);
- }
-
- @Override
- public boolean canCreateNewTask(TaskRepository repository) {
- return true;
- }
-
- @Override
- public boolean canCreateTaskFromKey(TaskRepository repository) {
- return true;
- }
-
- private TracWikiHandler wikiHandler = new TracWikiHandler(this);
-
- public boolean hasWiki(TaskRepository repository) {
- // check the access mode to validate Wiki support
- try {
- ITracClient client = getClientManager().getRepository(repository);
- if (client instanceof ITracWikiClient) {
- return true;
- }
- } catch (MalformedURLException e) {
- }
- 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 getTaskDataHandler() {
- return taskDataHandler;
- }
-
- @Override
- public void updateTaskFromRepository(TaskRepository repository, AbstractTask repositoryTask,
- IProgressMonitor monitor) throws CoreException {
- if (repositoryTask instanceof TracTask) {
- try {
- ITracClient connection = getClientManager().getRepository(repository);
- TracTicket ticket = connection.getTicket(getTicketId(repositoryTask.getTaskId()));
- updateTaskFromTicket((TracTask) repositoryTask, ticket, false);
- } catch (Exception e) {
- throw new CoreException(TracCorePlugin.toStatus(e, repository));
- }
- }
- }
-
- @Override
- public IStatus performQuery(AbstractRepositoryQuery query, TaskRepository repository, IProgressMonitor monitor,
- ITaskCollector resultCollector) {
-
- final List<TracTicket> tickets = new ArrayList<TracTicket>();
-
- ITracClient tracClient;
- try {
- tracClient = getClientManager().getRepository(repository);
- if (query instanceof TracRepositoryQuery) {
- tracClient.search(((TracRepositoryQuery) query).getTracSearch(), tickets);
- }
-
- for (TracTicket ticket : tickets) {
- AbstractTask task = createTask(repository.getUrl(), ticket.getId() + "", "");
- updateTaskFromTicket((TracTask) task, ticket, false);
- resultCollector.accept(task);
- }
- } catch (Throwable e) {
- return TracCorePlugin.toStatus(e, repository);
- }
-
- return Status.OK_STATUS;
- }
-
- @Override
- public boolean markStaleTasks(TaskRepository repository, Set<AbstractTask> tasks, IProgressMonitor monitor)
- throws CoreException {
- try {
- monitor.beginTask("Getting changed tasks", IProgressMonitor.UNKNOWN);
-
- if (!TracRepositoryConnector.hasChangedSince(repository)) {
- // always run the queries for web mode
- return true;
- }
-
- if (repository.getSynchronizationTimeStamp() == null
- || repository.getSynchronizationTimeStamp().length() == 0) {
- for (AbstractTask task : tasks) {
- task.setStale(true);
- }
- return true;
- }
-
- Date since = new Date(0);
- try {
- since = TracUtils.parseDate(Integer.parseInt(repository.getSynchronizationTimeStamp()));
- } catch (NumberFormatException e) {
- }
-
- try {
- ITracClient client = getClientManager().getRepository(repository);
- Set<Integer> ids = client.getChangedTickets(since);
- if (ids.isEmpty()) {
- // repository is unchanged
- return false;
- }
-
- 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);
- if (since.equals(lastChanged)) {
- // repository didn't actually change
- return false;
- }
- }
-
- for (AbstractTask task : tasks) {
- Integer id = getTicketId(task.getTaskId());
- if (ids.contains(id)) {
- task.setStale(true);
- }
- }
-
- return true;
- } catch (Exception e) {
- throw new CoreException(TracCorePlugin.toStatus(e, repository));
- }
- } finally {
- monitor.done();
- }
- }
-
- @Override
- public AbstractTask createTaskFromExistingId(TaskRepository repository, String taskId, IProgressMonitor monitor)
- throws CoreException {
- AbstractTask task = super.createTaskFromExistingId(repository, taskId, monitor);
- if (task == null) {
- // repository does not support XML-RPC, fall back to web access
- try {
- int taskIdInt = getTicketId(taskId);
- ITracClient connection = getClientManager().getRepository(repository);
- TracTicket ticket = connection.getTicket(taskIdInt);
-
- task = createTask(repository.getUrl(), taskId, "");
- updateTaskFromTicket((TracTask) task, ticket, false);
- taskList.addTask(task);
- } catch (Exception e) {
- throw new CoreException(TracCorePlugin.toStatus(e, repository));
- }
- }
-
- return task;
- }
-
- @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 void updateTaskFromTaskData(TaskRepository repository, AbstractTask repositoryTask,
- RepositoryTaskData taskData) {
- if (taskData != null) {
- repositoryTask.setSummary(taskData.getSummary());
- repositoryTask.setOwner(taskData.getAttributeValue(RepositoryTaskAttribute.USER_ASSIGNED));
- repositoryTask.setCompleted(TracTask.isCompleted(taskData.getStatus()));
- repositoryTask.setUrl(repository.getUrl() + ITracClient.TICKET_URL + taskData.getId());
- repositoryTask.setPriority(TracTask.getMylynPriority(taskData.getAttributeValue(Attribute.PRIORITY.getTracKey())));
- Kind kind = TracTask.Kind.fromType(taskData.getAttributeValue(Attribute.TYPE.getTracKey()));
- repositoryTask.setTaskKind((kind != null) ? kind.toString() : null);
- // TODO: Completion Date
- }
- }
-
- 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) {
- File cacheFile = null;
- if (TracCorePlugin.getDefault().getRepostioryAttributeCachePath() != null) {
- cacheFile = TracCorePlugin.getDefault().getRepostioryAttributeCachePath().toFile();
- }
- clientManager = new TracClientManager(cacheFile);
- }
- return clientManager;
- }
-
- /**
- * Updates fields of <code>task</code> from <code>ticket</code>.
- */
- public void updateTaskFromTicket(TracTask task, TracTicket ticket, boolean notify) {
- if (ticket.getValue(Key.SUMMARY) != null) {
- task.setSummary(ticket.getValue(Key.SUMMARY));
- }
- task.setCompleted(TracTask.isCompleted(ticket.getValue(Key.STATUS)));
- task.setPriority(TracTask.getMylynPriority(ticket.getValue(Key.PRIORITY)));
- if (ticket.getValue(Key.TYPE) != null) {
- Kind kind = TracTask.Kind.fromType(ticket.getValue(Key.TYPE));
- task.setTaskKind((kind != null) ? kind.toString() : ticket.getValue(Key.TYPE));
- }
- if (ticket.getCreated() != null) {
- task.setCreationDate(ticket.getCreated());
- }
-
- if (notify) {
- taskList.notifyTaskChanged(task, false);
- }
- }
-
- 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, AbstractTask task) {
- return hasRichEditor(repository);
- }
-
- public static boolean hasAttachmentSupport(TaskRepository repository, AbstractTask task) {
- return Version.XML_RPC.name().equals(repository.getVersion());
- }
-
- public void stop() {
- if (clientManager != null) {
- clientManager.writeCache();
- }
- }
-
- @Override
- public void updateAttributes(TaskRepository repository, IProgressMonitor monitor) throws CoreException {
- try {
- ITracClient client = getClientManager().getRepository(repository);
- client.updateAttributes(monitor, true);
- } catch (Exception e) {
- throw new CoreException(RepositoryStatus.createStatus(repository.getUrl(), IStatus.WARNING,
- TracCorePlugin.PLUGIN_ID, "Could not update attributes"));
- }
- }
-
- public static String getDisplayUsername(TaskRepository repository) {
- if (!repository.hasCredentials()) {
- 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.getId()));
-
- 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", "assigned");
- ticket.putValue("owner", getDisplayUsername(repository));
- } else if ("resolve".equals(action)) {
- ticket.putValue("status", "closed");
- ticket.putValue("resolution", operation.getOptionSelection());
- } else if ("reopen".equals(action)) {
- ticket.putValue("status", "reopened");
- ticket.putValue("resolution", "");
- } else if ("reassign".equals(operation.getKnobName())) {
- ticket.putValue("status", "new");
- ticket.putValue("owner", operation.getInputValue());
- }
- }
- }
-
- return ticket;
- }
-
-} \ 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 ad087698a..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.trac.core.model.TracSearch;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
-
-/**
- * @author Steffen Pingel
- */
-public class TracRepositoryQuery extends AbstractRepositoryQuery {
-
- public TracRepositoryQuery(String repositoryUrl, String queryUrl, String description) {
- super(description);
-
- assert queryUrl.startsWith(repositoryUrl + ITracClient.QUERY_URL);
-
- setRepositoryUrl(repositoryUrl);
- setUrl(queryUrl);
- }
-
- @Override
- public String getRepositoryKind() {
- 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 2be1ea387..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracTask.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.trac.core;
-
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-
-/**
- * @author Steffen Pingel
- */
-public class TracTask extends AbstractTask {
-
- public enum PriorityLevel {
- BLOCKER, CRITICAL, MAJOR, MINOR, TRIVIAL;
-
- @Override
- public String toString() {
- switch (this) {
- case BLOCKER:
- return "P1";
- case CRITICAL:
- return "P2";
- case MAJOR:
- return "P3";
- case MINOR:
- return "P4";
- case TRIVIAL:
- return "P5";
- default:
- return "P5";
- }
- }
-
- public static PriorityLevel 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 enum Kind {
- DEFECT, ENHANCEMENT, TASK;
-
- @Override
- public String toString() {
- switch (this) {
- case DEFECT:
- return "Defect";
- case ENHANCEMENT:
- return "Enhancement";
- case TASK:
- return "Task";
- default:
- return "";
- }
- }
-
- 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;
- }
-
- 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 enum Status {
- NEW, ASSIGNED, REOPENED, CLOSED;
-
- @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 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 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;
- }
-
- // TODO use priority attributes from repository instead of hard coded enum
- public static String getMylynPriority(String tracPriority) {
- if (tracPriority != null) {
- PriorityLevel priority = PriorityLevel.fromPriority(tracPriority);
- if (priority != null) {
- return priority.toString();
- }
- }
- return AbstractTask.PriorityLevel.P3.toString();
- }
-
- public static boolean isCompleted(String tracStatus) {
- TracTask.Status status = TracTask.Status.fromStatus(tracStatus);
- return status == TracTask.Status.CLOSED;
- }
-
- @Override
- public boolean isLocal() {
- // TODO Auto-generated method stub
- return false;
- }
-
-}
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 f74ad0002..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracTaskDataHandler.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.trac.core;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Date;
-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.NullProgressMonitor;
-import org.eclipse.mylyn.internal.trac.core.TracAttributeFactory.Attribute;
-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.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.AbstractAttributeFactory;
-import org.eclipse.mylyn.tasks.core.AbstractTaskDataHandler;
-import org.eclipse.mylyn.tasks.core.RepositoryAttachment;
-import org.eclipse.mylyn.tasks.core.RepositoryOperation;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskAttribute;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.TaskComment;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-/**
- * @author Steffen Pingel
- */
-public class TracTaskDataHandler extends AbstractTaskDataHandler {
-
- private static final String CC_DELIMETER = ", ";
-
- private AbstractAttributeFactory attributeFactory = new TracAttributeFactory();
-
- private TracRepositoryConnector connector;
-
- public TracTaskDataHandler(TracRepositoryConnector connector) {
- this.connector = connector;
- }
-
- @Override
- public RepositoryTaskData getTaskData(TaskRepository repository, String taskId, IProgressMonitor monitor)
- throws CoreException {
- return downloadTaskData(repository, TracRepositoryConnector.getTicketId(taskId));
- }
-
- public RepositoryTaskData downloadTaskData(TaskRepository repository, int id) throws CoreException {
- if (!TracRepositoryConnector.hasRichEditor(repository)) {
- // offline mode is only supported for XML-RPC
- return null;
- }
-
- try {
- RepositoryTaskData data = new RepositoryTaskData(attributeFactory, TracCorePlugin.REPOSITORY_KIND,
- repository.getUrl(), id + "");
- ITracClient client = connector.getClientManager().getRepository(repository);
- client.updateAttributes(new NullProgressMonitor(), false);
- TracTicket ticket = client.getTicket(id);
- createDefaultAttributes(attributeFactory, data, client, true);
- updateTaskData(repository, attributeFactory, data, ticket);
- return data;
- } catch (Exception e) {
- 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.getRepositoryKind(), 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.getUrl());
- taskAttachment.setTaskId("" + ticket.getId());
- taskAttachment.setAttributeValue(Attribute.DESCRIPTION.getTracKey(), attachments[i].getDescription());
- taskAttachment.setAttributeValue(RepositoryTaskAttribute.ATTACHMENT_FILENAME,
- attachments[i].getFilename());
- 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.getUrl()
- + 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());
- createAttribute(factory, data, Attribute.OWNER);
- 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 (int i = 0; i < values.length; i++) {
- attr.addOption(values[i], values[i]);
- }
-
- 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 (int i = 0; i < values.length; i++) {
- if (field.getDefaultValue().equals(values[i].toString())) {
- attr.setValue(values[i]);
- 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 (int i = 0; i < values.length; i++) {
- attr.addOption(values[i].toString(), values[i].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().getRepository(repository);
- if (taskData.isNew()) {
- int id = server.createTicket(ticket);
- return id + "";
- } else {
- server.updateTicket(ticket, taskData.getNewComment());
- return null;
- }
- } catch (Exception e) {
- throw new CoreException(TracCorePlugin.toStatus(e, repository));
- }
- }
-
- @Override
- public boolean initializeTaskData(TaskRepository repository, RepositoryTaskData data, IProgressMonitor monitor)
- throws CoreException {
- try {
- ITracClient client = connector.getClientManager().getRepository(repository);
- client.updateAttributes(new NullProgressMonitor(), false);
- createDefaultAttributes(attributeFactory, data, client, false);
- return true;
- } catch (Exception e) {
- throw new CoreException(TracCorePlugin.toStatus(e, repository));
- }
- }
-
- @Override
- public Set<String> getSubTaskIds(RepositoryTaskData taskData) {
- // TODO Auto-generated method stub
- return Collections.emptySet();
- }
-
-}
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 c15f3707c..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracWebClient.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.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.net.Proxy;
-import java.net.URL;
-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.security.auth.login.LoginException;
-
-import org.apache.commons.httpclient.Credentials;
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;
-import org.apache.commons.httpclient.UsernamePasswordCredentials;
-import org.apache.commons.httpclient.auth.AuthScope;
-import org.apache.commons.httpclient.cookie.CookiePolicy;
-import org.apache.commons.httpclient.methods.GetMethod;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-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;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.web.core.HtmlStreamTokenizer;
-import org.eclipse.mylyn.web.core.HtmlTag;
-import org.eclipse.mylyn.web.core.WebClientUtil;
-import org.eclipse.mylyn.web.core.HtmlStreamTokenizer.Token;
-
-/**
- * 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 final HttpClient httpClient;
-
- private boolean authenticated;
-
- public TracWebClient(URL url, Version version, String username, String password, Proxy proxy) {
- super(url, version, username, password, proxy);
-
- httpClient = new HttpClient();
- httpClient.setHttpConnectionManager(new MultiThreadedHttpConnectionManager());
- httpClient.getParams().setCookiePolicy(CookiePolicy.RFC_2109);
- }
-
- private synchronized GetMethod connect(String serverURL) throws TracException {
- try {
- return connectInternal(serverURL);
- } catch (TracException e) {
- throw e;
- } catch (Exception e) {
- throw new TracException(e);
- }
- }
-
- private GetMethod connectInternal(String serverURL) throws TracLoginException, IOException, TracHttpException {
- WebClientUtil.setupHttpClient(httpClient, proxy, serverURL, null, null);
-
- for (int attempt = 0; attempt < 2; attempt++) {
- // force authentication
- if (!authenticated && hasAuthenticationCredentials()) {
- authenticate();
- }
-
- GetMethod method = new GetMethod(WebClientUtil.getRequestPath(serverURL));
- int code;
- try {
- code = httpClient.executeMethod(method);
- } 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();
- } else {
- throw new TracHttpException(code);
- }
- }
-
- throw new TracLoginException();
- }
-
- private void authenticate() throws TracLoginException, IOException {
- if (!hasAuthenticationCredentials()) {
- throw new TracLoginException();
- }
-
- // try standard basic/digest authentication first
- Credentials credentials = new UsernamePasswordCredentials(username, password);
- httpClient.getState().setCredentials(
- new AuthScope(AuthScope.ANY_HOST, AuthScope.ANY_PORT, AuthScope.ANY_REALM), credentials);
-
- GetMethod method = new GetMethod(WebClientUtil.getRequestPath(repositoryUrl + LOGIN_URL));
- method.setFollowRedirects(false);
- int code;
- try {
- httpClient.getParams().setAuthenticationPreemptive(true);
- code = httpClient.executeMethod(method);
- if (code == HttpURLConnection.HTTP_UNAUTHORIZED || code == HttpURLConnection.HTTP_FORBIDDEN) {
- throw new TracLoginException();
- }
- } 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);
- }
-
- validateAuthenticationState(httpClient);
-
- // success since no exception was thrown
- authenticated = true;
- }
-
- /**
- * Fetches the web site of a single ticket and returns the Trac ticket.
- *
- * @param id
- * Trac id of ticket
- * @throws LoginException
- */
- public TracTicket getTicket(int id) throws TracException {
- GetMethod method = connect(repositoryUrl + ITracClient.TICKET_URL + id);
- try {
- TracTicket ticket = new TracTicket(id);
-
- BufferedReader reader = new BufferedReader(new InputStreamReader(method.getResponseBodyAsStream(),
- 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() == HtmlTag.Type.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() == HtmlTag.Type.H2 && "summary".equals(tag.getAttribute("class"))) {
- ticket.putBuiltinValue(Key.SUMMARY, getText(tokenizer));
- } else if (tag.getTagType() == HtmlTag.Type.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() == HtmlTag.Type.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
- }
- }
-
- 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) throws TracException {
- GetMethod method = connect(repositoryUrl + ITracClient.QUERY_URL + query.toUrl());
- try {
- BufferedReader reader = new BufferedReader(new InputStreamReader(method.getResponseBodyAsStream(),
- 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(e, "Error parsing response: " + line);
- }
- }
- }
-
- if (ticket.isValid()) {
- for (String key : constantValues.keySet()) {
- ticket.putValue(key, parseTicketValue(constantValues.get(key)));
- }
-
- tickets.add(ticket);
- }
- }
- } 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() throws TracException {
- GetMethod method = connect(repositoryUrl + "/");
- try {
- BufferedReader reader = new BufferedReader(new InputStreamReader(method.getResponseBodyAsStream(),
- 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() == HtmlTag.Type.DIV) {
- String id = tag.getAttribute("id");
- inFooter = !tag.isEndTag() && "footer".equals(id);
- } else if (tag.getTagType() == HtmlTag.Type.STRONG && inFooter) {
- version = getText(tokenizer);
- } else if (tag.getTagType() == HtmlTag.Type.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");
- }
- } 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);
- try {
- BufferedReader reader = new BufferedReader(new InputStreamReader(method.getResponseBodyAsStream(),
- 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() == HtmlTag.Type.SCRIPT) {
- String text = getText(tokenizer).trim();
- if (text.startsWith("var properties=")) {
- parseAttributes(text);
- }
- }
- }
- }
-
- addResolutionAndStatus();
- } 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);
- try {
- BufferedReader reader = new BufferedReader(new InputStreamReader(method.getResponseBodyAsStream(),
- 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() == HtmlTag.Type.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();
- } 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() == HtmlTag.Type.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 {
- StringBuffer sb = new StringBuffer();
- 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 HtmlStreamTokenizer.unescape(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() == HtmlTag.Type.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) throws TracException {
- GetMethod method = connect(repositoryUrl + ITracClient.ATTACHMENT_URL + id + "/" + filename + "?format=raw");
- 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) throws TracException {
- throw new TracException("Unsupported operation");
- }
-
- public void deleteAttachment(int ticketId, String filename) throws TracException {
- throw new TracException("Unsupported operation");
- }
-
- public int createTicket(TracTicket ticket) throws TracException {
- throw new TracException("Unsupported operation");
- }
-
- public void updateTicket(TracTicket ticket, String comment) throws TracException {
- throw new TracException("Unsupported operation");
- }
-
- public Set<Integer> getChangedTickets(Date since) throws TracException {
- return null;
- }
-
- private interface AttributeFactory {
-
- void addAttribute(String value);
-
- }
-
- public Date getTicketLastChanged(Integer id) {
- 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 ca5110774..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracWikiHandler.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.trac.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.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 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();
- 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);
- return page;
- } catch (TracException e) {
- throw new CoreException(TracCorePlugin.toStatus(e, repository));
- } finally {
- monitor.done();
- }
- }
-
- 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);
- 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();
- }
- }
-
- 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);
- return versions;
- } catch (TracException e) {
- throw new CoreException(TracCorePlugin.toStatus(e, repository));
- } finally {
- monitor.done();
- }
- }
-
- private ITracWikiClient getTracWikiClient(TaskRepository repository) throws TracException {
- try {
- ITracClient client = connector.getClientManager().getRepository(repository);
- if (client instanceof ITracWikiClient) {
- return (ITracWikiClient) client;
- } else {
- throw new TracException("The access mode of " + repository.toString()
- + " does not support Wiki page editting.");
- }
- } catch (MalformedURLException e) {
- throw new TracException(e);
- }
- }
-
- @Override
- public String getWikiUrl(TaskRepository repository) {
- return repository.getUrl() + 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 93b8c49b6..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracXmlRpcClient.java
+++ /dev/null
@@ -1,867 +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.HttpURLConnection;
-import java.net.Proxy;
-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.HttpClient;
-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.NullProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-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.TracHttpClientTransportFactory.TracHttpException;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.web.core.WebClientUtil;
-
-/**
- * Represents a Trac repository that is accessed through the Trac XmlRpcPlugin.
- *
- * @author Steffen Pingel
- * @author Xiaoyang Guan
- */
-public class TracXmlRpcClient extends AbstractTracClient implements ITracWikiClient {
-
- 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;
-
- public TracXmlRpcClient(URL url, Version version, String username, String password, Proxy proxy) {
- super(url, version, username, password, proxy);
- }
-
- public synchronized XmlRpcClient getClient() throws TracException {
- if (xmlrpc != null) {
- return xmlrpc;
- }
-
- XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
- config.setEncoding(ITracClient.CHARSET);
- config.setBasicUserName(username);
- config.setBasicPassword(password);
- config.setServerURL(getXmlRpcUrl());
- config.setTimeZone(TimeZone.getTimeZone(ITracClient.TIME_ZONE));
- config.setContentLengthOptional(false);
- config.setConnectionTimeout(WebClientUtil.CONNNECT_TIMEOUT);
- config.setReplyTimeout(WebClientUtil.SOCKET_TIMEOUT);
-
- xmlrpc = new XmlRpcClient();
- xmlrpc.setConfig(config);
-
- factory = new TracHttpClientTransportFactory(xmlrpc);
- factory.setProxy(proxy);
- xmlrpc.setTransportFactory(factory);
-
- return xmlrpc;
- }
-
- private URL getXmlRpcUrl() throws TracException {
- try {
- String location = repositoryUrl.toString();
- if (hasAuthenticationCredentials()) {
- location += LOGIN_URL;
- }
- location += XMLRPC_URL;
-
- return new URL(location);
- } catch (Exception e) {
- throw new TracException(e);
- }
- }
-
- private Object call(String method, Object... parameters) throws TracException {
- try {
- // first attempt
- return callInternal(method, parameters);
- } 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;
- }
-
- // try form-based authentication via AccountManagerPlugin as a
- // fall-back
- HttpClient httpClient = new HttpClient();
- httpClient.getParams().setCookiePolicy(CookiePolicy.RFC_2109);
- WebClientUtil.setupHttpClient(httpClient, proxy, repositoryUrl.toString(), null, null);
- try {
- authenticateAccountManager(httpClient);
- } catch (TracLoginException loginException) {
- // caused by wrong username 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 callInternal(method, parameters);
- }
-
- private Object callInternal(String method, Object... parameters) throws TracException {
- getClient();
-
- try {
- return xmlrpc.execute(method, parameters);
- } catch (TracHttpException e) {
- if (e.code == HttpURLConnection.HTTP_UNAUTHORIZED) {
- throw new TracLoginException();
- } else if (e.code == HttpURLConnection.HTTP_FORBIDDEN) {
- throw new TracPermissionDeniedException();
- } 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);
- }
- }
-
- private Object[] multicall(Map<String, Object>... calls) throws TracException {
- Object[] result = (Object[]) call("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() throws TracException {
- try {
- Object[] result = (Object[]) call("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)) {
- 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() throws TracException {
- if (epochAPIVersion == -1 || majorAPIVersion == -1 || minorAPIVersion == -1) {
- validate();
- }
- }
-
- private boolean isAPIVersionOrHigher(int epoch, int major, int minor) throws TracException {
- updateAPIVersion();
- return (epochAPIVersion > epoch || (epochAPIVersion == epoch && majorAPIVersion > major || (majorAPIVersion == major && minorAPIVersion >= minor)));
- }
-
- public TracTicket getTicket(int id) throws TracException {
- Object[] result = (Object[]) call("ticket.get", id);
- TracTicket ticket = parseTicket(result);
-
- result = (Object[]) call("ticket.changeLog", id, 0);
- for (Object item : result) {
- ticket.addComment(parseChangeLogEntry((Object[]) item));
- }
-
- result = (Object[]) call("ticket.listAttachments", id);
- for (Object item : result) {
- ticket.addAttachment(parseAttachment((Object[]) item));
- }
-
- String[] actions = getActions(id);
- 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) 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(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) throws TracException {
- // an empty query string is not valid, therefore prepend order
- Object[] result = (Object[]) call("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(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");
- 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");
- 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");
- 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");
- 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");
- 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);
- attributes = getTicketAttributes("ticket.status", trac011);
- 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");
- 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");
- data.versions = new ArrayList<TracVersion>(result.length);
- for (Object item : result) {
- data.versions.add(parseVersion((Map<?, ?>) getMultiCallResult(item)));
- }
- advance(monitor, 1);
-
- result = (Object[]) call("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.setOrder((Integer) result.get("width"));
- }
- if (result.get("height") != null) {
- field.setOrder((Integer) result.get("height"));
- }
- return field;
- }
-
- @SuppressWarnings("unchecked")
- private Object[] getAttributes(String attributeType) throws TracException {
- Object[] ids = (Object[]) call(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(calls);
- assert result.length == ids.length;
-
- return result;
- }
-
- private List<TicketAttributeResult> getTicketAttributes(String attributeType) throws TracException {
- return getTicketAttributes(attributeType, false);
- }
-
- @SuppressWarnings("unchecked")
- private List<TicketAttributeResult> getTicketAttributes(String attributeType, boolean assignValues)
- throws TracException {
- // get list of attribute ids first
- Object[] ids = (Object[]) call(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(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(e, "Invalid response from Trac repository for attribute type: '" + attributeType
- + "'");
- } catch (NumberFormatException e) {
- StatusHandler.log(e, "Invalid response from Trac repository for attribute type: '" + attributeType
- + "'");
- }
- }
-
- return attributes;
- }
-
- public InputStream getAttachmentData(int ticketId, String filename) throws TracException {
- byte[] data = (byte[]) call("ticket.getAttachment", ticketId, filename);
- return new ByteArrayInputStream(data);
- }
-
- public void putAttachmentData(int ticketId, String filename, String description, InputStream in)
- throws TracException {
- byte[] data;
- try {
- data = readData(in, new NullProgressMonitor());
- } catch (IOException e) {
- throw new TracException(e);
- }
- call("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.fail(e, "Error closing attachment stream", false);
- }
- }
- }
-
- public void deleteAttachment(int ticketId, String filename) throws TracException {
- call("ticket.deleteAttachment", ticketId, filename);
- }
-
- private class TicketAttributeResult {
-
- String name;
-
- int value;
-
- }
-
- public int createTicket(TracTicket ticket) 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)) {
- return (Integer) call("ticket.create", summary, description, attributes, true);
- } else {
- return (Integer) call("ticket.create", summary, description, attributes);
- }
- }
-
- public void updateTicket(TracTicket ticket, String comment) throws TracException {
- updateAPIVersion();
-
- Map<String, String> attributes = ticket.getValues();
- if (isAPIVersionOrHigher(0, 0, 2)) {
- call("ticket.update", ticket.getId(), comment, attributes, true);
- } else {
- call("ticket.update", ticket.getId(), comment, attributes);
- }
- }
-
- public Set<Integer> getChangedTickets(Date since) throws TracException {
- Object[] ids;
- ids = (Object[]) call("ticket.getRecentChanges", since);
- Set<Integer> result = new HashSet<Integer>();
- for (Object id : ids) {
- result.add((Integer) id);
- }
- return result;
- }
-
- public String[] getActions(int id) throws TracException {
- Object[] actions = (Object[]) call("ticket.getAvailableActions", id);
- String[] result = new String[actions.length];
- for (int i = 0; i < result.length; i++) {
- result[i] = (String) actions[i];
- }
- return result;
- }
-
- @Override
- public void setProxy(Proxy proxy) {
- super.setProxy(proxy);
-
- synchronized (this) {
- if (factory != null) {
- factory.setProxy(proxy);
- }
- }
- }
-
- public Date getTicketLastChanged(Integer id) throws TracException {
- Object[] result = (Object[]) call("ticket.get", id);
- return parseDate(result[2]);
- }
-
- public void validateWikiRpcApi() throws TracException {
- if (((Integer) call("wiki.getRPCVersionSupported")) < 2)
- validate();
- }
-
- public String wikiToHtml(String sourceText) throws TracException {
- return (String) call("wiki.wikiToHtml", sourceText);
- }
-
- public String[] getAllWikiPageNames() throws TracException {
- Object[] result = (Object[]) call("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) throws TracException {
- return getWikiPageInfo(pageName, LATEST_VERSION);
- }
-
- public TracWikiPageInfo getWikiPageInfo(String pageName, int version) 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("wiki.getPageInfo", pageName) //
- : call("wiki.getPageInfoVersion", pageName, version);
- return parseWikiPageInfo(result);
- }
-
- @SuppressWarnings("unchecked")
- public TracWikiPageInfo[] getWikiPageInfoAllVersions(String pageName) throws TracException {
- TracWikiPageInfo latestVersion = getWikiPageInfo(pageName);
- 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(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) throws TracException {
- return getWikiPageContent(pageName, LATEST_VERSION);
- }
-
- public String getWikiPageContent(String pageName, int version) 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("wiki.getPage", pageName);
- } else {
- return (String) call("wiki.getPageVersion", pageName, version);
- }
- }
-
- public String getWikiPageHtml(String pageName) throws TracException {
- return getWikiPageHtml(pageName, LATEST_VERSION);
- }
-
- public String getWikiPageHtml(String pageName, int version) 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("wiki.getPageHTML", pageName);
- } else {
- return (String) call("wiki.getPageHTMLVersion", pageName, version);
- }
- }
-
- public TracWikiPageInfo[] getRecentWikiChanges(Date since) throws TracException {
- if (since == null) {
- throw new IllegalArgumentException("Date parameter cannot be null");
- }
-
- Object[] result = (Object[]) call("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) throws TracException {
- return getWikiPage(pageName, LATEST_VERSION);
- }
-
- public TracWikiPage getWikiPage(String pageName, int version) throws TracException {
- TracWikiPage page = new TracWikiPage();
- page.setPageInfo(getWikiPageInfo(pageName, version));
- page.setContent(getWikiPageContent(pageName, version));
- page.setPageHTML(getWikiPageHtml(pageName, version));
- return page;
- }
-
- public boolean putWikipage(String pageName, String content, Map<String, Object> attributes) throws TracException {
- Boolean result = (Boolean) call("wiki.putPage", pageName, content, attributes);
- return result.booleanValue();
- }
-
- public String[] listWikiPageAttachments(String pageName) throws TracException {
- Object[] result = (Object[]) call("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) throws TracException {
- String attachmentName = pageName + "/" + fileName;
- byte[] data = (byte[]) call("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) throws TracException {
- byte[] data;
- try {
- data = readData(in, new NullProgressMonitor());
- } catch (IOException e) {
- throw new TracException(e);
- }
- return (String) call("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 faa1b7494..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracSearch.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.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.mylyn.internal.trac.core.ITracClient;
-import org.eclipse.mylyn.internal.trac.core.model.TracSearchFilter.CompareOperator;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-
-/**
- * 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 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(e, "Unexpected exception while decoding URL");
- }
- }
- }
- 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(e, "Unexpected exception while decoding URL");
- }
- }
- }
- }
-
-}
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 b48dd25a0..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 String fieldName;
-
- private CompareOperator operator;
-
- private 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 b7d92e13a..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 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 nummeric 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 a51161643..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 String name;
-
- private 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 729e2996d..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracWikiPageInfo.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;
-
-/**
- * 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;
- }
-
- 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 00ad73145..000000000
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/util/TracHttpClientTransportFactory.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.internal.trac.core.util;
-
-import java.io.InputStream;
-import java.lang.reflect.Field;
-import java.net.HttpURLConnection;
-import java.net.Proxy;
-
-import org.apache.commons.httpclient.Cookie;
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.HttpVersion;
-import org.apache.commons.httpclient.methods.PostMethod;
-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.XmlRpcCommonsTransport;
-import org.apache.xmlrpc.client.XmlRpcHttpClientConfig;
-import org.apache.xmlrpc.client.XmlRpcTransport;
-import org.apache.xmlrpc.client.XmlRpcTransportFactory;
-import org.eclipse.mylyn.web.core.WebClientUtil;
-
-/**
- * A custom transport factory used to establish XML-RPC connections. Uses the Mylyn proxy settings.
- *
- * @author Steffen Pingel
- */
-public class TracHttpClientTransportFactory implements XmlRpcTransportFactory {
-
- public static class TracHttpException extends XmlRpcException {
-
- private static final long serialVersionUID = 9032521978140685830L;
-
- public TracHttpException(int responseCode) {
- super(responseCode, "HTTP Error " + responseCode);
- }
-
- }
-
- /**
- * A transport that uses the Apache HttpClient library.
- */
- public static class TracHttpClientTransport extends XmlRpcCommonsTransport {
-
- private Proxy proxy;
-
- private Cookie[] cookies;
-
- public TracHttpClientTransport(XmlRpcClient client, Proxy proxy, Cookie[] cookies) {
- super(client);
-
- this.proxy = proxy;
- this.cookies = cookies;
-
- XmlRpcHttpClientConfig config = (XmlRpcHttpClientConfig) client.getConfig();
- // this needs to be set to avoid exceptions
- getHttpClient().getParams().setAuthenticationPreemptive(config.getBasicUserName() != null);
- }
-
- @Override
- protected String getUserAgent() {
- return WebClientUtil.USER_AGENT;
- }
-
- public HttpClient getHttpClient() {
- return (HttpClient) getValue("client");
- }
-
- public PostMethod getMethod() {
- return (PostMethod) getValue("method");
- }
-
- public void setMethod(PostMethod method) {
- setValue("method", method);
- }
-
- private Object getValue(String name) {
- try {
- Field field = XmlRpcCommonsTransport.class.getDeclaredField(name);
- field.setAccessible(true);
- return field.get(this);
- } catch (Throwable t) {
- throw new RuntimeException("Internal error accessing field: " + name, t);
- }
- }
-
- private void setValue(String name, Object value) {
- try {
- Field field = XmlRpcCommonsTransport.class.getDeclaredField(name);
- field.setAccessible(true);
- field.set(this, value);
- } catch (Throwable t) {
- throw new RuntimeException("Internal error accessing field: " + name, t);
- }
- }
-
- @Override
- protected InputStream getInputStream() throws XmlRpcException {
- int responseCode = getMethod().getStatusCode();
- if (responseCode != HttpURLConnection.HTTP_OK) {
- throw new TracHttpException(responseCode);
- }
-
- return super.getInputStream();
- }
-
- @Override
- protected void initHttpHeaders(XmlRpcRequest request) throws XmlRpcClientException {
- // super call needed to initialize private fields of XmlRpcCommonsTransport
- super.initHttpHeaders(request);
-
- // The super method sets a private field that contains the
- // HttpClient Method object which is initialized using the wrong url.
- // Since the URL can not be modified once the Method object has been
- // constructed a new object is constructed here, initialized and
- // assigned to the private field
-
- XmlRpcHttpClientConfig config = (XmlRpcHttpClientConfig) request.getConfig();
-
- String url = config.getServerURL().toString();
- WebClientUtil.setupHttpClient(getHttpClient(), proxy, url, null, null);
- if (cookies != null) {
- getHttpClient().getState().addCookies(cookies);
- }
-
- PostMethod method = new PostMethod(WebClientUtil.getRequestPath(url));
- setMethod(method);
-
- setRequestHeader("Content-Type", "text/xml");
- setRequestHeader("User-Agent", getUserAgent());
- setCredentials(config);
- setCompressionHeaders(config);
-
- if (config.getConnectionTimeout() != 0)
- getHttpClient().getHttpConnectionManager().getParams().setConnectionTimeout(
- config.getConnectionTimeout());
-
- if (config.getReplyTimeout() != 0)
- getHttpClient().getHttpConnectionManager().getParams().setSoTimeout(config.getConnectionTimeout());
-
- method.getParams().setVersion(HttpVersion.HTTP_1_1);
- }
-
- }
-
- private XmlRpcClient client;
-
- private Proxy proxy;
-
- private Cookie[] cookies;
-
- public TracHttpClientTransportFactory(XmlRpcClient client) {
- this.client = client;
- }
-
- public XmlRpcTransport getTransport() {
- return new TracHttpClientTransport(client, proxy, cookies);
- }
-
- public Proxy getProxy() {
- return proxy;
- }
-
- public void setProxy(Proxy proxy) {
- this.proxy = proxy;
- }
-
- public Cookie[] getCookies() {
- return cookies;
- }
-
- public void setCookies(Cookie[] cookies) {
- this.cookies = cookies;
- }
-
-}
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.tests/.classpath b/org.eclipse.mylyn.trac.tests/.classpath
deleted file mode 100644
index 304e86186..000000000
--- a/org.eclipse.mylyn.trac.tests/.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.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 4241ae65f..000000000
--- a/org.eclipse.mylyn.trac.tests/.project
+++ /dev/null
@@ -1,28 +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>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</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 888de1277..000000000
--- a/org.eclipse.mylyn.trac.tests/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,316 +0,0 @@
-#Sun Jun 24 11:52:58 EDT 2007
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.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=disabled
-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.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.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
-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=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-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.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.5
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=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_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 \ No newline at end of file
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 1e4caec9f..000000000
--- a/org.eclipse.mylyn.trac.tests/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,6 +0,0 @@
-#Mon Jul 09 18:11:45 PDT 2007
-eclipse.preferences.version=1
-formatter_profile=_Mylar based on Eclipse [built-in]
-formatter_settings_version=11
-internal.default.compliance=default
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return the ${bare_field_name}\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} the ${bare_field_name} to set\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\r\n * \r\n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author ${user}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*******************************************************************************\r\n * Copyright (c) 2004, 2007 Mylyn project committers and others.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n *******************************************************************************/\r\n\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ignore\r\n${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ignore</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template></templates>
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.mylar.tasklist.prefs b/org.eclipse.mylyn.trac.tests/.settings/org.eclipse.mylar.tasklist.prefs
deleted file mode 100644
index a6cf96a98..000000000
--- a/org.eclipse.mylyn.trac.tests/.settings/org.eclipse.mylar.tasklist.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Fri Oct 20 16:54:30 PDT 2006
-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.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 769b229ff..000000000
--- a/org.eclipse.mylyn.trac.tests/.settings/org.eclipse.pde.prefs
+++ /dev/null
@@ -1,12 +0,0 @@
-#Thu Nov 03 15:45:55 PST 2005
-compilers.p.deprecated=2
-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-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 0de31bcb6..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
-Bundle-Version: 0.0.0
-Require-Bundle: org.junit,
- org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.mylyn.context.core,
- org.eclipse.mylyn.tasks.ui,
- org.eclipse.mylyn.tasks.core,
- org.eclipse.mylyn.context.tests,
- org.eclipse.mylyn.trac.ui,
- org.eclipse.mylyn.trac.core,
- org.eclipse.search,
- org.eclipse.mylyn,
- org.eclipse.ui.workbench.texteditor,
- org.eclipse.jface.text,
- org.eclipse.mylyn.web.core
-Export-Package: org.eclipse.mylyn.trac.tests
-Bundle-Activator: org.eclipse.mylyn.trac.tests.TracTestPlugin
-Eclipse-LazyStart: true
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
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 81b51c58c..000000000
--- a/org.eclipse.mylyn.trac.tests/build.properties
+++ /dev/null
@@ -1,11 +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/,\
- .
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 5b2a26ae4..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtilTest.java
+++ /dev/null
@@ -1,204 +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;
-import org.eclipse.mylyn.tasks.ui.WebHyperlink;
-
-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.findHyperlinks(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.findHyperlinks(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.findHyperlinks(repository, "#11, #234", 6, 0);
- assertNotNull(links);
- assertEquals(1, links.length);
- assertEquals("234", ((TaskHyperlink) links[0]).getTaskId());
-
- links = TracHyperlinkUtil.findHyperlinks(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.findHyperlinks(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.findHyperlinks(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.findHyperlinks(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.findHyperlinks(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.findHyperlinks(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.findHyperlinks(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.findHyperlinks(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.findHyperlinks(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.findHyperlinks(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.findHyperlinks(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.findHyperlinks(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.findHyperlinks(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.findHyperlinks(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.findHyperlinks(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.findHyperlinks(repository, "[wiki:page]", 1, 0);
- assertNotNull(links);
- assertEquals(1, links.length);
- assertEquals("http://localhost/wiki/page", ((WebHyperlink) links[0]).getURLString());
-
- links = TracHyperlinkUtil.findHyperlinks(repository, "wiki:page", 0, 0);
- assertNotNull(links);
- assertEquals(1, links.length);
- assertEquals("http://localhost/wiki/page", ((WebHyperlink) links[0]).getURLString());
-
- links = TracHyperlinkUtil.findHyperlinks(repository, "Page", 0, 0);
- assertNull(links);
-
- links = TracHyperlinkUtil.findHyperlinks(repository, "ab Page dc", 0, 0);
- assertNull(links);
-
- links = TracHyperlinkUtil.findHyperlinks(repository, "paGe", 0, 0);
- assertNull(links);
-
- links = TracHyperlinkUtil.findHyperlinks(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.findHyperlinks(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.findHyperlinks(repository, "attachment:ticket:123:foo.bar", 1, 0);
- assertNotNull(links);
- assertEquals("123", ((TaskHyperlink) links[0]).getTaskId());
- }
-
- public void testFindHyperlinksFiles() {
- IHyperlink[] links = TracHyperlinkUtil.findHyperlinks(repository, "source:trunk/foo", 1, 0);
- assertNotNull(links);
- assertEquals(1, links.length);
- assertEquals("http://localhost/browser/trunk/foo", ((WebHyperlink) links[0]).getURLString());
-
- links = TracHyperlinkUtil.findHyperlinks(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.findHyperlinks(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.findHyperlinks(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 feefc54d9..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AbstractTracClientRepositoryTest.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.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();
-
- // invalid url
- connect("http://non.existant/repository");
- try {
- repository.validate();
- fail("Expected TracException");
- } catch (TracException e) {
- }
-
- // invalid password
- connect(url, credentials.username, "wrongpassword");
- try {
- repository.validate();
- fail("Expected TracLoginException");
- } catch (TracLoginException e) {
- }
-
- // invalid username
- connect(url, "wrongusername", credentials.password);
- try {
- repository.validate();
- 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();
- fail("Expected IOException");
- } catch (TracException e) {
- }
-
- connect(TracTestConstants.TEST_TRAC_010_URL, "", "", null);
- repository.setProxy(new Proxy(Type.HTTP, new InetSocketAddress("invalidhostname", 8080)));
- try {
- repository.validate();
- fail("Expected IOException");
- } catch (TracException e) {
- }
-
- connect(TracTestConstants.TEST_TRAC_010_URL);
- repository.validate();
- repository.setProxy(new Proxy(Type.HTTP, new InetSocketAddress("invalidhostname", 8080)));
- try {
- repository.validate();
- 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 538620b60..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());
- assertTicketEquals(tickets.get(0), ticket);
-
- ticket = repository.getTicket(tickets.get(1).getId());
- 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);
- 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);
- 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);
- assertEquals(tickets.size(), result.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);
- 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);
- 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);
- 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);
- 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 e0bb661b1..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AbstractTracClientTest.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.trac.tests;
-
-import java.net.Proxy;
-
-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.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 PrivilegeLevel level;
-
- 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, Proxy proxy, Version version)
- throws Exception {
- this.repositoryUrl = url;
- this.username = username;
- this.password = password;
- this.repository = TracClientFactory.createClient(url, version, username, password, proxy);
-
- 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 87afe2126..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracTests.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.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() {
-// UrlConnectionUtil.initCommonsLoggingSettings();
-
- TestSuite suite = new TestSuite("Test for org.eclipse.mylyn.trac.tests");
- // $JUnit-BEGIN$
- // suite.addTestSuite(TracXmlRpcTest.class);
- 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 373808843..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.tasks.core.ITaskAttachment;
-
-public class MockAttachment implements ITaskAttachment {
-
- private 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 a447523c3..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/RepositorySearchQueryTest.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.trac.tests;
-
-import junit.framework.TestCase;
-
-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.context.tests.support.TestUtil.PrivilegeLevel;
-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.AbstractTask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.tasks.ui.TaskFactory;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.ui.search.SearchHitCollector;
-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);
- TasksUiPlugin.getSynchronizationManager().setForceSyncExec(true);
- }
-
- protected void init(String url, Version version) {
- Credentials credentials = TestUtil.readCredentials(PrivilegeLevel.USER);
-
- repository = new TaskRepository(TracCorePlugin.REPOSITORY_KIND, url);
- repository.setAuthenticationCredentials(credentials.username, credentials.password);
- repository.setTimeZoneId(ITracClient.TIME_ZONE);
- repository.setCharacterEncoding(ITracClient.CHARSET);
- repository.setVersion(version.name());
-
- manager.addRepository(repository, TasksUiPlugin.getDefault().getRepositoriesFilePath());
- }
-
- public void testSearch() {
- init(TracTestConstants.TEST_TRAC_096_URL, Version.TRAC_0_9);
-
- TracSearch search = new TracSearch();
- String queryUrl = repository.getUrl() + ITracClient.QUERY_URL + search.toUrl();
- TracRepositoryQuery query = new TracRepositoryQuery(repository.getUrl(), queryUrl, "description");
- SearchHitCollector collector = new SearchHitCollector(TasksUiPlugin.getTaskListManager().getTaskList(),
- repository, query, new TaskFactory(repository, false, false));
-
- collector.run(new NullProgressMonitor());
- for (AbstractTask 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 ab58df78c..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracAttachmentHandlerTest.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.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.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.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.AbstractAttachmentHandler;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.FileAttachment;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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.setAuthenticationCredentials(credentials.username, credentials.password);
- repository.setTimeZoneId(ITracClient.TIME_ZONE);
- repository.setCharacterEncoding(ITracClient.CHARSET);
- repository.setVersion(version.name());
-
- manager.addRepository(repository, TasksUiPlugin.getDefault().getRepositoriesFilePath());
-
- AbstractRepositoryConnector abstractConnector = manager.getRepositoryConnector(kind);
- connector = (TracRepositoryConnector) abstractConnector;
- TasksUiPlugin.getSynchronizationManager().setForceSyncExec(true);
-
- 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) connector.createTaskFromExistingId(repository, data.attachmentTicketId + "",
- new NullProgressMonitor());
- TasksUiPlugin.getSynchronizationManager().synchronize(connector, task, true, null);
- RepositoryTaskData taskData = TasksUiPlugin.getTaskDataManager().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) connector.createTaskFromExistingId(repository, data.attachmentTicketId + "",
- new NullProgressMonitor());
- TasksUiPlugin.getSynchronizationManager().synchronize(connector, task, true, null);
- RepositoryTaskData taskData = TasksUiPlugin.getTaskDataManager().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) connector.createTaskFromExistingId(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().getRepository(repository);
- InputStream in = client.getAttachmentData(data.attachmentTicketId, file.getName());
- 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) connector.createTaskFromExistingId(repository, data.attachmentTicketId + "",
- new NullProgressMonitor());
- assertTrue(attachmentHandler.canUploadAttachment(repository, task));
- }
-
- public void testCanUploadAttachmentWeb() throws CoreException {
- init(TracTestConstants.TEST_TRAC_010_URL, Version.TRAC_0_9);
- TracTask task = (TracTask) connector.createTaskFromExistingId(repository, data.attachmentTicketId + "",
- new NullProgressMonitor());
- assertFalse(attachmentHandler.canUploadAttachment(repository, task));
- }
-
- public void testCanDownloadAttachmentXmlRpc() throws Exception {
- init(TracTestConstants.TEST_TRAC_010_URL, Version.XML_RPC);
- TracTask task = (TracTask) connector.createTaskFromExistingId(repository, data.attachmentTicketId + "",
- new NullProgressMonitor());
- assertTrue(attachmentHandler.canDownloadAttachment(repository, task));
- }
-
- public void testCanDownloadAttachmentWeb() throws Exception {
- init(TracTestConstants.TEST_TRAC_010_URL, Version.TRAC_0_9);
- TracTask task = (TracTask) connector.createTaskFromExistingId(repository, data.attachmentTicketId + "",
- new NullProgressMonitor());
- 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 30e982b78..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientFactoryTest.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.trac.tests;
-
-import java.net.Proxy;
-
-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.context.tests.support.TestUtil.PrivilegeLevel;
-import org.eclipse.mylyn.internal.trac.core.ITracClient;
-import org.eclipse.mylyn.internal.trac.core.TracWebClient;
-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.TracXmlRpcClient;
-import org.eclipse.mylyn.internal.trac.core.ITracClient.Version;
-
-/**
- * @author Steffen Pingel
- */
-public class TracClientFactoryTest extends TestCase {
-
- public void testCreateClient() throws Exception {
- ITracClient client = TracClientFactory.createClient(TracTestConstants.TEST_TRAC_010_URL, Version.TRAC_0_9,
- "user", "password", Proxy.NO_PROXY);
- assertTrue(client instanceof TracWebClient);
- client = TracClientFactory.createClient(TracTestConstants.TEST_TRAC_010_SSL_URL, Version.TRAC_0_9, "user",
- "password", Proxy.NO_PROXY);
- assertTrue(client instanceof TracWebClient);
-
- client = TracClientFactory.createClient(TracTestConstants.TEST_TRAC_010_URL, Version.XML_RPC, "user",
- "password", Proxy.NO_PROXY);
- assertTrue(client instanceof TracXmlRpcClient);
- client = TracClientFactory.createClient(TracTestConstants.TEST_TRAC_010_SSL_URL, Version.XML_RPC, "user",
- "password", Proxy.NO_PROXY);
- assertTrue(client instanceof TracXmlRpcClient);
- }
-
- public void testCreateClientNull() throws Exception {
- try {
- TracClientFactory.createClient(TracTestConstants.TEST_TRAC_010_URL, null, "user", "password",
- Proxy.NO_PROXY);
- 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);
- Version version = TracClientFactory.probeClient(url, credentials.username, credentials.password, Proxy.NO_PROXY);
- if (xmlrpcInstalled) {
- assertEquals(Version.XML_RPC, version);
- } else {
- assertEquals(Version.TRAC_0_9, version);
- }
-
- version = TracClientFactory.probeClient(url, "", "", Proxy.NO_PROXY);
- assertEquals(Version.TRAC_0_9, version);
-
- try {
- version = TracClientFactory.probeClient(url, "invaliduser", "password", Proxy.NO_PROXY);
- fail("Expected TracLoginException, got " + version);
- } catch (TracLoginException e) {
- }
-
- try {
- version = TracClientFactory.probeClient(url + "/nonexistant", "", "", Proxy.NO_PROXY);
- 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 ec29a3ca2..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientManagerTest.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.trac.tests;
-
-import java.io.File;
-import java.util.Arrays;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-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;
-
-/**
- * @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);
- ITracClient client = manager.getRepository(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);
- ITracClient client = manager.getRepository(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());
-
- File file = File.createTempFile("mylyn", null);
- file.deleteOnExit();
-
- TracClientManager manager = new TracClientManager(file);
- ITracClient client = manager.getRepository(taskRepository);
- assertNull(client.getMilestones());
-
- client.updateAttributes(new NullProgressMonitor(), false);
- assertTrue(client.getMilestones().length > 0);
- TracMilestone[] milestones = client.getMilestones();
-
- manager.writeCache();
- manager = new TracClientManager(file);
- 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 b772fae50..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracClientProxyTest.java
+++ /dev/null
@@ -1,75 +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.Proxy;
-
-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.web.core.WebClientUtil;
-
-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 = WebClientUtil.getProxy("localhost", proxyPort + "", "", "");
- ITracClient client = connect(url, proxy);
- try {
- client.validate();
- } 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 95de316ec..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryConnectorTest.java
+++ /dev/null
@@ -1,345 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse 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.context.core.ContextCorePlugin;
-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.ui.wizards.EditRepositoryWizard;
-import org.eclipse.mylyn.internal.trac.core.ITracClient;
-import org.eclipse.mylyn.internal.trac.core.InvalidTicketException;
-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.TracTicket;
-import org.eclipse.mylyn.internal.trac.core.model.TracVersion;
-import org.eclipse.mylyn.internal.trac.core.model.TracTicket.Key;
-import org.eclipse.mylyn.internal.trac.ui.wizard.TracRepositorySettingsPage;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.QueryHitCollector;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.tasks.ui.TaskFactory;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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();
-
- 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.setAuthenticationCredentials(credentials.username, credentials.password);
- repository.setTimeZoneId(ITracClient.TIME_ZONE);
- repository.setCharacterEncoding(ITracClient.CHARSET);
- repository.setVersion(version.name());
-
- manager.addRepository(repository, TasksUiPlugin.getDefault().getRepositoriesFilePath());
-
- AbstractRepositoryConnector abstractConnector = manager.getRepositoryConnector(kind);
- assertEquals(abstractConnector.getConnectorKind(), kind);
-
- connector = (TracRepositoryConnector) abstractConnector;
- TasksUiPlugin.getSynchronizationManager().setForceSyncExec(true);
- }
-
- 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 = connector.createTaskFromExistingId(repository, id, new NullProgressMonitor());
- assertNotNull(task);
- assertEquals(TracTask.class, task.getClass());
- assertTrue(task.getSummary().contains("summary1"));
- assertEquals(repository.getUrl() + ITracClient.TICKET_URL + id, task.getUrl());
-
- try {
- task = connector.createTaskFromExistingId(repository, "does not exist", new NullProgressMonitor());
- 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().getRepository(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);
- dialog.create();
-
- ((TracRepositorySettingsPage) wizard.getSettingsPage()).setTracVersion(Version.XML_RPC);
- assertTrue(wizard.performFinish());
-
- client = connector.getClientManager().getRepository(repository);
- assertEquals(Version.XML_RPC, client.getVersion());
- }
-
- 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);
- }
-
- @SuppressWarnings("deprecation")
- 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<AbstractTask> result = new ArrayList<AbstractTask>();
- QueryHitCollector hitCollector = new QueryHitCollector(new TaskFactory(repository)) {
- @Override
- public void accept(RepositoryTaskData data) {
- fail("Unexpected call to accept()");
- }
-
- @Override
- public void accept(AbstractTask hit) {
- result.add(hit);
- }
- };
- IStatus queryStatus = connector.performQuery(query, repository, new NullProgressMonitor(), hitCollector);
-
- 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 testUpdateTaskDetails() throws InvalidTicketException {
- 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");
-
- 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());
-
- connector.updateTaskFromTicket(task, ticket, false);
- 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");
-
- connector.updateTaskFromTicket(task, ticket, false);
- 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());
- }
-
- 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.updateAttributes(repository, new NullProgressMonitor());
-
- ITracClient server = connector.getClientManager().getRepository(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) connector.createTaskFromExistingId(repository, data.attachmentTicketId + "",
- new NullProgressMonitor());
- TasksUiPlugin.getSynchronizationManager().synchronize(connector, task, true, null);
-
- //int size = task.getTaskData().getAttachments().size();
-
- File sourceContextFile = ContextCorePlugin.getContextManager().getFileForContext(task.getHandleIdentifier());
- sourceContextFile.createNewFile();
- sourceContextFile.deleteOnExit();
-
- assertTrue(connector.getAttachmentHandler().attachContext(repository, task, "", new NullProgressMonitor()));
-
- TasksUiPlugin.getSynchronizationManager().synchronize(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) connector.createTaskFromExistingId(repository, data.attachmentTicketId + "",
- new NullProgressMonitor());
-
- File sourceContextFile = ContextCorePlugin.getContextManager().getFileForContext(task.getHandleIdentifier());
- sourceContextFile.createNewFile();
- sourceContextFile.deleteOnExit();
-
- try {
- connector.getAttachmentHandler().attachContext(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 161909bf0..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryQueryTest.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.trac.tests;
-
-import java.util.Arrays;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-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;
-import org.eclipse.mylyn.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @author Steffen Pingel
- */
-public class TracRepositoryQueryTest extends TestCase {
-
- public void testChangeRepositoryUrl() {
- TaskRepositoryManager manager = TasksUiPlugin.getRepositoryManager();
- manager.clearRepositories(TasksUiPlugin.getDefault().getRepositoriesFilePath());
-
- TaskRepository repository = new TaskRepository(TracCorePlugin.REPOSITORY_KIND,
- TracTestConstants.TEST_TRAC_096_URL);
- manager.addRepository(repository, TasksUiPlugin.getDefault().getRepositoriesFilePath());
-
- TracSearch search = new TracSearch();
- String queryUrl = repository.getUrl() + ITracClient.QUERY_URL + search.toUrl();
- TracRepositoryQuery query = new TracRepositoryQuery(repository.getUrl(), queryUrl, "description");
- TasksUiPlugin.getTaskListManager().getTaskList().addQuery(query);
-
- TracTask task = new TracTask(TracTestConstants.TEST_TRAC_096_URL, "" + 123, "desc");
- TasksUiPlugin.getTaskListManager().getTaskList().addTask(task);
-
- String oldUrl = repository.getUrl();
- String newUrl = TracTestConstants.TEST_TRAC_010_URL;
- TasksUiPlugin.getTaskListManager().refactorRepositoryUrl(oldUrl, newUrl);
- repository.setUrl(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 67be82fd7..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositorySettingsPageTest.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.trac.tests;
-
-import java.net.Proxy;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-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.mylyn.tasks.ui.TasksUiPlugin;
-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(connector);
-
- 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.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 e1a6d8d6b..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTaskDataHandlerTest.java
+++ /dev/null
@@ -1,269 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse 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.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.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.internal.trac.core.model.TracTicket;
-import org.eclipse.mylyn.internal.trac.core.model.TracTicket.Key;
-import org.eclipse.mylyn.tasks.core.AbstractAttachmentHandler;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskDataHandler;
-import org.eclipse.mylyn.tasks.core.ITaskAttachment;
-import org.eclipse.mylyn.tasks.core.RepositoryStatus;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskAttribute;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.trac.tests.support.TestFixture;
-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 AbstractTaskDataHandler taskDataHandler;
-
- 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);
- TasksUiPlugin.getSynchronizationManager().setForceSyncExec(true);
-
- taskDataHandler = connector.getTaskDataHandler();
- }
-
- protected void init(String url, Version version) {
- Credentials credentials = TestUtil.readCredentials(PrivilegeLevel.USER);
-
- repository = new TaskRepository(TracCorePlugin.REPOSITORY_KIND, url);
- repository.setAuthenticationCredentials(credentials.username, credentials.password);
- repository.setTimeZoneId(ITracClient.TIME_ZONE);
- repository.setCharacterEncoding(ITracClient.CHARSET);
- repository.setVersion(version.name());
-
- manager.addRepository(repository, TasksUiPlugin.getDefault().getRepositoriesFilePath());
- }
-
- public void testGetChangedSinceLastSyncWeb096() throws Exception {
- init(TracTestConstants.TEST_TRAC_096_URL, Version.TRAC_0_9);
- TracTask task = (TracTask) connector.createTaskFromExistingId(repository, data.offlineHandlerTicketId + "",
- new NullProgressMonitor());
-
- Set<AbstractTask> tasks = new HashSet<AbstractTask>();
- tasks.add(task);
-
- assertEquals(null, repository.getSynchronizationTimeStamp());
- boolean changed = connector.markStaleTasks(repository, tasks, new NullProgressMonitor());
- assertEquals(true, changed);
- assertEquals(null, repository.getSynchronizationTimeStamp());
- assertFalse(task.isStale());
-
- int time = (int) (System.currentTimeMillis() / 1000) + 1;
- repository.setSynchronizationTimeStamp(time + "");
- changed = connector.markStaleTasks(repository, tasks, new NullProgressMonitor());
- assertEquals(true, changed);
- 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 {
- TracTask task = (TracTask) connector.createTaskFromExistingId(repository, data.offlineHandlerTicketId + "",
- new NullProgressMonitor());
- TasksUiPlugin.getSynchronizationManager().synchronize(connector, task, true, null);
- RepositoryTaskData taskData = TasksUiPlugin.getTaskDataManager().getNewTaskData(task.getRepositoryUrl(),
- task.getTaskId());
-
- int lastModified = Integer.parseInt(taskData.getLastModified());
-
- Set<AbstractTask> tasks = new HashSet<AbstractTask>();
- tasks.add(task);
-
- repository.setSynchronizationTimeStamp(null);
- boolean changed = connector.markStaleTasks(repository, tasks, new NullProgressMonitor());
- assertTrue(changed);
- assertTrue(task.isStale());
-
- // always returns the ticket because time comparison mode is >=
- task.setStale(false);
- repository.setSynchronizationTimeStamp(lastModified + "");
- changed = connector.markStaleTasks(repository, tasks, new NullProgressMonitor());
- // TODO this was fixed so it returns false now but only if the
- // query returns a single task
- assertFalse(changed);
- assertFalse(task.isStale());
-
- task.setStale(false);
- repository.setSynchronizationTimeStamp((lastModified + 1) + "");
- changed = connector.markStaleTasks(repository, tasks, new NullProgressMonitor());
- assertFalse(changed);
- assertFalse(task.isStale());
-
- // change ticket making sure it gets a new change time
- Thread.sleep(1000);
- ITracClient client = connector.getClientManager().getRepository(repository);
- TracTicket ticket = client.getTicket(data.offlineHandlerTicketId);
- if (ticket.getValue(Key.DESCRIPTION).equals(lastModified + "")) {
- ticket.putBuiltinValue(Key.DESCRIPTION, lastModified + "x");
- } else {
- ticket.putBuiltinValue(Key.DESCRIPTION, lastModified + "");
- }
- client.updateTicket(ticket, "comment");
-
- task.setStale(false);
- repository.setSynchronizationTimeStamp((lastModified + 1) + "");
- changed = connector.markStaleTasks(repository, tasks, new NullProgressMonitor());
- assertTrue(changed);
- 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) connector.createTaskFromExistingId(repository, data.offlineHandlerTicketId + "",
- new NullProgressMonitor());
- Set<AbstractTask> tasks = new HashSet<AbstractTask>();
- tasks.add(task);
-
- task.setStale(false);
- repository.setSynchronizationTimeStamp(null);
- boolean changed = connector.markStaleTasks(repository, tasks, new NullProgressMonitor());
- assertTrue(changed);
- assertTrue(task.isStale());
-
- task.setStale(false);
- repository.setSynchronizationTimeStamp("");
- changed = connector.markStaleTasks(repository, tasks, new NullProgressMonitor());
- assertTrue(changed);
- assertTrue(task.isStale());
-
- task.setStale(false);
- repository.setSynchronizationTimeStamp("0");
- changed = connector.markStaleTasks(repository, tasks, new NullProgressMonitor());
- assertTrue(changed);
- assertTrue(task.isStale());
-
- task.setStale(false);
- repository.setSynchronizationTimeStamp("abc");
- changed = connector.markStaleTasks(repository, tasks, new NullProgressMonitor());
- assertTrue(changed);
- assertTrue(task.isStale());
- }
-
- public void testNonNumericTaskId() {
- try {
- connector.getTaskDataHandler().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.getUrl(), 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) connector.createTaskFromExistingId(repository, data.offlineHandlerTicketId + "",
- new NullProgressMonitor());
- TasksUiPlugin.getSynchronizationManager().synchronize(connector, task, true, null);
- RepositoryTaskData taskData = TasksUiPlugin.getTaskDataManager().getNewTaskData(task.getRepositoryUrl(),
- task.getTaskId());
-
- taskData.setNewComment("new comment");
- repository.setAuthenticationCredentials("foo", "bar");
- try {
- taskDataHandler.postTaskData(repository, taskData, new NullProgressMonitor());
- } catch (CoreException expected) {
- assertEquals(RepositoryStatus.ERROR_REPOSITORY_LOGIN, expected.getStatus().getCode());
- }
- assertEquals("new comment", taskData.getNewComment());
- }
-
-}
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 8e18f2337..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTaskTest.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.trac.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.internal.trac.core.TracTask;
-
-/**
- * @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 testGetMylynPriority() {
- assertEquals("P1", TracTask.getMylynPriority("blocker"));
- assertEquals("P2", TracTask.getMylynPriority("critical"));
- assertEquals("P3", TracTask.getMylynPriority("major"));
- assertEquals("P3", TracTask.getMylynPriority(null));
- assertEquals("P3", TracTask.getMylynPriority(""));
- assertEquals("P3", TracTask.getMylynPriority("foo bar"));
- assertEquals("P4", TracTask.getMylynPriority("minor"));
- assertEquals("P5", TracTask.getMylynPriority("trivial"));
- }
-}
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 2be668746..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTestConstants.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.trac.tests;
-
-/**
- * @author Steffen Pingel
- */
-public class TracTestConstants {
-
- public static final String TEST_TRAC_096_URL = "http://mylyn.eclipse.org/trac096";
-
- public static final String TEST_TRAC_010_URL = "http://mylyn.eclipse.org/trac010";
-
- public static final String TEST_TRAC_010_SSL_URL = "https://mylyn.eclipse.org/trac010";
-
- public static final String TEST_TRAC_010_DIGEST_AUTH_URL = "http://mylyn.eclipse.org/trac010digest";
-
- public static final String TEST_TRAC_010_FORM_AUTH_URL = "http://mylyn.eclipse.org/trac010formauth";
-
- public static final String TEST_TRAC_011_URL = "http://mylyn.eclipse.org/trac011";
-
- public static final String TEST_TRAC_INVALID_URL = "http://mylyn.eclipse.org/doesnotexist";
-
-}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTestPlugin.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTestPlugin.java
deleted file mode 100644
index 5df32028e..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracTestPlugin.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.trac.tests;
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- *
- * @author Steffen Pingel
- */
-public class TracTestPlugin extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.mylyn.trac.tests";
-
- // The shared instance
- private static TracTestPlugin plugin;
-
- public TracTestPlugin() {
- plugin = this;
- }
-
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- @Override
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static TracTestPlugin getDefault() {
- return plugin;
- }
-
-}
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 c4e9a8889..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);
- 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 d887d0c8d..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();
- fail("Expected TracException");
- } catch (TracException e) {
- }
- }
-
- public void testValidateAnonymousLogin() throws Exception {
- connect(TracTestConstants.TEST_TRAC_010_URL, "", "");
- repository.validate();
-
- connect(TracTestConstants.TEST_TRAC_096_URL, "", "");
- repository.validate();
- }
-
- 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 855634e5a..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);
- 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 0f4ecd89c..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();
- fail("Expected TracLoginException");
- } catch (TracPermissionDeniedException e) {
- }
- }
-
- public void testMulticallExceptions() throws Exception {
- connect010();
- try {
- ((TracXmlRpcClient) repository).getTickets(new int[] { 1, Integer.MAX_VALUE });
- 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("");
- assertEquals("", html);
-
- html = ((TracXmlRpcClient) repository).wikiToHtml("A simple line of text.");
- 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);
- assertEquals(expectedHtml, html);
- }
-
- public void testValidateWikiAPI010() throws Exception {
- connect010();
- ((TracXmlRpcClient) repository).validateWikiRpcApi();
- }
-
- public void testValidateWikiAPI011() throws Exception {
- connect011();
- ((TracXmlRpcClient) repository).validateWikiRpcApi();
- }
-
- public void testGetAllWikiPageNames010() throws Exception {
- connect010();
- getAllWikiPageNames();
- }
-
- public void testGetAllWikiPageNames011() throws Exception {
- connect011();
- getAllWikiPageNames();
- }
-
- private void getAllWikiPageNames() throws Exception {
- String[] names = ((TracXmlRpcClient) repository).getAllWikiPageNames();
- 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");
- 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);
- 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);
- fail("Expected TracRemoteException");
- } catch (TracRemoteException e) {
- }
-
- // get info -- non-existing page name
- try {
- ((TracXmlRpcClient) repository).getWikiPageInfo("NoSuchPage");
- fail("Expected TracRemoteException");
- } catch (TracRemoteException e) {
- }
-
- // get info -- null parameter
- try {
- ((TracXmlRpcClient) repository).getWikiPageInfo(null);
- fail("Expected RuntimeException");
- } catch (IllegalArgumentException e) {
- }
-
- // get content -- non-existing version
- try {
- ((TracXmlRpcClient) repository).getWikiPageContent("Test", 10);
- fail("Expected TracRemoteException");
- } catch (TracRemoteException e) {
- }
-
- // get content -- non-existing page name
- try {
- ((TracXmlRpcClient) repository).getWikiPageContent("NoSuchPage");
- fail("Expected TracRemoteException");
- } catch (TracRemoteException e) {
- }
-
- // get content -- null parameter
- try {
- ((TracXmlRpcClient) repository).getWikiPageContent(null);
- fail("Expected RuntimeException");
- } catch (IllegalArgumentException e) {
- }
-
- // get HTML -- non-existing version
- try {
- ((TracXmlRpcClient) repository).getWikiPageHtml("Test", 10);
- fail("Expected TracRemoteException");
- } catch (TracRemoteException e) {
- }
-
- // get HTML -- non-existing page name
- try {
- ((TracXmlRpcClient) repository).getWikiPageHtml("NoSuchPage");
- fail("Expected TracRemoteException");
- } catch (TracRemoteException e) {
- }
-
- // get HTML -- null parameter
- try {
- ((TracXmlRpcClient) repository).getWikiPageHtml(null);
- fail("Expected RuntimeException");
- } catch (IllegalArgumentException e) {
- }
-
- // get a page -- non-existing version
- try {
- ((TracXmlRpcClient) repository).getWikiPage("Test", 10);
- fail("Expected TracRemoteException");
- } catch (TracRemoteException e) {
- }
-
- // get a page -- non-existing page name
- try {
- ((TracXmlRpcClient) repository).getWikiPage("NoSuchPage");
- fail("Expected TracRemoteException");
- } catch (TracRemoteException e) {
- }
-
- // get a page -- null parameter
- try {
- ((TracXmlRpcClient) repository).getWikiPage(null);
- fail("Expected RuntimeException");
- } catch (IllegalArgumentException e) {
- }
-
- // get all versions of a page -- non-existing page name
- try {
- ((TracXmlRpcClient) repository).getWikiPageInfoAllVersions("NoSuchPage");
- fail("Expected TracRemoteException");
- } catch (TracRemoteException e) {
- }
-
- // get all versions of a page -- null parameter
- try {
- ((TracXmlRpcClient) repository).getWikiPageInfoAllVersions(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);
- 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));
- 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 c97a246e8..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracXmlRpcTest.java
+++ /dev/null
@@ -1,504 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse 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.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);
- 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/TestCleanupUtil.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TestCleanupUtil.java
deleted file mode 100644
index 8b7a33f69..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TestCleanupUtil.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 TestCleanupUtil extends AbstractTracClientTest {
-
- private TestData data;
-
- public TestCleanupUtil() {
- 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);
- TracAttachment[] attachments = ticket.getAttachments();
- // skips the first attachment
- for (int i = 1; i < attachments.length; i++) {
- repository.deleteAttachment(data.attachmentTicketId, attachments[i].getFilename());
- }
- }
-
-}
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/XmlRpcServer.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/XmlRpcServer.java
deleted file mode 100644
index cdfcc0cdf..000000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/XmlRpcServer.java
+++ /dev/null
@@ -1,367 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse 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.net.URL;
-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.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 String[] attributes;
-
- private String id;
-
- private 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;
- }
-
- @SuppressWarnings("unchecked")
- 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];
- }
-
- @SuppressWarnings("unchecked")
- 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 String id;
-
- private 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);
- }
-
- @SuppressWarnings("unchecked")
- 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 XmlRpcClient client;
-
- private TestData data;
-
- private String password;
-
- private TracXmlRpcClient repository;
-
- private String url;
-
- private 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 URL(url), Version.XML_RPC, username, password, null);
- 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 7a0cd6201..000000000
--- a/org.eclipse.mylyn.trac.ui/.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.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="**/TasksUiImages"/>
- <accessrule kind="accessible" pattern="**/TaskListSynchronizationScheduler"/>
- <accessrule kind="accessible" pattern="**/TaskListPreferenceConstants"/>
- <accessrule kind="discouraged" pattern="**/mylyn/internal/context/**"/>
- <accessrule kind="discouraged" pattern="**/mylyn/internal/tasks/**"/>
- </accessrules>
- </classpathentry>
- <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 fce887b43..000000000
--- a/org.eclipse.mylyn.trac.ui/.project
+++ /dev/null
@@ -1,28 +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>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</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 888de1277..000000000
--- a/org.eclipse.mylyn.trac.ui/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,316 +0,0 @@
-#Sun Jun 24 11:52:58 EDT 2007
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.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=disabled
-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.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.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
-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=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-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.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.5
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=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_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 \ No newline at end of file
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 1e4caec9f..000000000
--- a/org.eclipse.mylyn.trac.ui/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,6 +0,0 @@
-#Mon Jul 09 18:11:45 PDT 2007
-eclipse.preferences.version=1
-formatter_profile=_Mylar based on Eclipse [built-in]
-formatter_settings_version=11
-internal.default.compliance=default
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return the ${bare_field_name}\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} the ${bare_field_name} to set\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\r\n * \r\n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author ${user}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*******************************************************************************\r\n * Copyright (c) 2004, 2007 Mylyn project committers and others.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n *******************************************************************************/\r\n\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ignore\r\n${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ignore</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template></templates>
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.mylar.tasklist.prefs b/org.eclipse.mylyn.trac.ui/.settings/org.eclipse.mylar.tasklist.prefs
deleted file mode 100644
index a6cf96a98..000000000
--- a/org.eclipse.mylyn.trac.ui/.settings/org.eclipse.mylar.tasklist.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Fri Oct 20 16:54:30 PDT 2006
-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.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 769b229ff..000000000
--- a/org.eclipse.mylyn.trac.ui/.settings/org.eclipse.pde.prefs
+++ /dev/null
@@ -1,12 +0,0 @@
-#Thu Nov 03 15:45:55 PST 2005
-compilers.p.deprecated=2
-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-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 8aa018e6e..000000000
--- a/org.eclipse.mylyn.trac.ui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,25 +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: 2.1.0.v20070924-2200
-Bundle-Activator: org.eclipse.mylyn.internal.trac.ui.TracUiPlugin
-Bundle-Vendor: Eclipse.org
-Require-Bundle: org.eclipse.ui,
- org.eclipse.ui.forms,
- org.eclipse.core.runtime,
- org.eclipse.mylyn.context.core,
- org.eclipse.mylyn.tasks.ui,
- org.eclipse.mylyn.tasks.core,
- org.eclipse.search,
- org.eclipse.mylyn.trac.core,
- org.eclipse.mylyn.monitor.core,
- org.eclipse.ui.editors,
- org.eclipse.jface.text,
- org.eclipse.core.resources,
- org.eclipse.ui.workbench.texteditor
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.mylyn.internal.trac.ui,
- org.eclipse.mylyn.internal.trac.ui.editor,
- org.eclipse.mylyn.internal.trac.ui.wizard
-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 729e99215..000000000
--- a/org.eclipse.mylyn.trac.ui/build.properties
+++ /dev/null
@@ -1,19 +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 = icons/,\
- src/,\
- plugin.xml,\
- META-INF/,\
- 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 cebac63d4..000000000
--- a/org.eclipse.mylyn.trac.ui/plugin.xml
+++ /dev/null
@@ -1,38 +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"
- type="trac"/>
- <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>
-
-</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 d62909462..000000000
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracConnectorUi.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.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.jface.wizard.WizardPage;
-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.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.wizards.AbstractRepositorySettingsPage;
-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.findHyperlinks(repository, text, lineOffset, regionOffset);
- }
-
- @Override
- public String getTaskKindLabel(AbstractTask repositoryTask) {
- return "Ticket";
- }
-
- @Override
- public String getTaskKindLabel(RepositoryTaskData taskData) {
- return "Ticket";
- }
-
- @Override
- public AbstractRepositorySettingsPage getSettingsPage() {
- return new TracRepositorySettingsPage(this);
- }
-
- @Override
- public WizardPage getSearchPage(TaskRepository repository, IStructuredSelection selection) {
- return new TracCustomQueryPage(repository);
- }
-
- @Override
- public boolean hasSearchPage() {
- return true;
- }
-
- @Override
- public IWizard getNewTaskWizard(TaskRepository repository) {
- if (TracRepositoryConnector.hasRichEditor(repository)) {
- return new NewTaskWizard(repository);
- } else {
- return new NewWebTaskWizard(repository, repository.getUrl() + ITracClient.NEW_TICKET_URL);
- }
- }
-
- @Override
- public IWizard getQueryWizard(TaskRepository repository, AbstractRepositoryQuery 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(AbstractTask 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<AbstractTaskContainer> getLegendItems() {
- List<AbstractTaskContainer> legendItems = new ArrayList<AbstractTaskContainer>();
-
- 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/TracHyperlinkUtil.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtil.java
deleted file mode 100644
index 162f9d096..000000000
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtil.java
+++ /dev/null
@@ -1,281 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public 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.jface.text.IRegion;
-import org.eclipse.jface.text.Region;
-import org.eclipse.jface.text.hyperlink.IHyperlink;
-import org.eclipse.mylyn.internal.trac.core.ITracClient;
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TaskHyperlink;
-import org.eclipse.mylyn.tasks.ui.WebHyperlink;
-
-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+))?)?");
-
- /**
- * <ul>
- * <li>Tickets: #1 or ticket:1
- * <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[] findHyperlinks(TaskRepository repository, String text, int lineOffset, int regionOffset) {
- List<IHyperlink> links = new ArrayList<IHyperlink>();
-
- Matcher 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 = 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 = reportPattern1.matcher(text);
- while (m.find()) {
- if (isInRegion(lineOffset, m)) {
- String id = m.group(1);
- links.add(new WebHyperlink(determineRegion(regionOffset, m), repository.getUrl()
- + 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.getUrl()
- + 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.getUrl() + 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.getUrl() + 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.getUrl() + 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.getUrl() + 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.getUrl() + 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.getUrl() + 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.getUrl() + 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.fail(e, "Unexpected exception", false);
- 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.getUrl() + 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.getUrl() + 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.getUrl()
- + 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.getUrl() + 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 01b8ec087..000000000
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracImages.java
+++ /dev/null
@@ -1,49 +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();
-
- StringBuffer buffer = new StringBuffer(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 7228ce457..000000000
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracTaskListFactory.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.trac.ui;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.mylyn.internal.trac.core.TracRepositoryQuery;
-import org.eclipse.mylyn.internal.trac.core.TracTask;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.AbstractTaskListFactory;
-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;
-
- @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(AbstractTask task) {
- return task instanceof TracTask;
- }
-
- @Override
- public boolean canCreate(AbstractRepositoryQuery category) {
- return category instanceof TracRepositoryQuery;
- }
-
- @Override
- public String getQueryElementName(AbstractRepositoryQuery query) {
- return query instanceof TracRepositoryQuery ? KEY_TRAC_QUERY : "";
- }
-
- @Override
- public AbstractTask createTask(String repositoryUrl, String taskId, String summary, Element element) {
- return new TracTask(repositoryUrl, taskId, summary);
- }
-
- @Override
- public AbstractRepositoryQuery 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 975038837..000000000
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracUiPlugin.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.trac.ui;
-
-import org.eclipse.mylyn.internal.trac.core.TracCorePlugin;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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);
-
- TasksUiPlugin.getRepositoryManager().addListener(TracCorePlugin.getDefault().getConnector().getClientManager());
- }
-
- @Override
- public void stop(BundleContext context) throws Exception {
- TasksUiPlugin.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/editor/BrowserFormPage.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/BrowserFormPage.java
deleted file mode 100644
index 86ea74b7c..000000000
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/BrowserFormPage.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.trac.ui.editor;
-
-import org.eclipse.mylyn.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.ui.editors.TaskEditorInput;
-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.forms.IManagedForm;
-import org.eclipse.ui.forms.editor.FormEditor;
-import org.eclipse.ui.forms.editor.FormPage;
-import org.eclipse.ui.forms.widgets.ScrolledForm;
-
-/**
- * @author Mik Kersten
- */
-// TODO need to generalize: copied from org.eclipse.mylyn.internal.web.tasks.BrowserFormPage
-public class BrowserFormPage extends FormPage {
-
- public static final String ID_EDITOR = "org.eclipse.mylyn.trac.ui.editor";
-
- private Browser browser;
-
- public BrowserFormPage(FormEditor editor, String title) {
- super(editor, ID_EDITOR, title);
- }
-
- @Override
- protected void createFormContent(IManagedForm managedForm) {
- super.createFormContent(managedForm);
- try {
- AbstractTask task = ((TaskEditorInput) getEditorInput()).getTask();
- ScrolledForm form = managedForm.getForm();
- form.getBody().setLayout(new FillLayout());
- browser = new Browser(form.getBody(), SWT.NONE);
- managedForm.getForm().setContent(browser);
- browser.setUrl(task.getUrl());
- } catch (SWTError e) {
- StatusHandler.fail(e, "Could not create Browser page: " + e.getMessage(), true);
- } catch (RuntimeException e) {
- StatusHandler.fail(e, "could not create issue report page", false);
- }
- }
-
- @Override
- public void dispose() {
- if (browser != null && !browser.isDisposed()) {
- browser.dispose();
- }
- super.dispose();
- }
-}
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 1a22a40f8..000000000
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/NewTracTaskEditor.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.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.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.RepositoryTaskAttribute;
-import org.eclipse.mylyn.tasks.ui.TaskFactory;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractNewRepositoryTaskEditor;
-import org.eclipse.mylyn.tasks.ui.search.SearchHitCollector;
-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 SearchHitCollector getDuplicateSearchCollector(String name) {
- TracSearchFilter filter = new TracSearchFilter("description");
- filter.setOperator(CompareOperator.CONTAINS);
-
- String searchString = AbstractNewRepositoryTaskEditor.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.getUrl());
- sb.append(ITracClient.QUERY_URL);
- sb.append(search.toUrl());
-
- TracRepositoryQuery query = new TracRepositoryQuery(repository.getUrl(), sb.toString(), "<Duplicate Search>");
-
- SearchHitCollector collector = new SearchHitCollector(TasksUiPlugin.getTaskListManager().getTaskList(),
- repository, query, new TaskFactory(repository, false, false));
- return collector;
- }
-
- @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);
- 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().hint(150, SWT.DEFAULT).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/TracRenderingEngine.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracRenderingEngine.java
deleted file mode 100644
index 914ded788..000000000
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracRenderingEngine.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.trac.ui.editor;
-
-import java.net.MalformedURLException;
-
-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()
- .getRepository(repository);
- if (client instanceof TracXmlRpcClient) {
- TracXmlRpcClient tracXmlRpcClient = (TracXmlRpcClient) client;
- String htmlText = tracXmlRpcClient.wikiToHtml(text);
- 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.getUrl()) + htmlBody + htmlFooter;
- return html;
- } else {
- throw new CoreException(TracCorePlugin.toStatus(new TracException(
- "Preview is available only in XML-RPC access mode"), repository));
- }
- } catch (MalformedURLException e) {
- throw new CoreException(TracCorePlugin.toStatus(e, 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 6d2a23cbb..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.trac.core.TracAttributeFactory;
-import org.eclipse.mylyn.tasks.core.RepositoryOperation;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskAttribute;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractRenderingEngine;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractRepositoryTaskEditor;
-import org.eclipse.ui.forms.editor.FormEditor;
-
-/**
- * @author Steffen Pingel
- * @author Xiaoyang Guan (Wiki HTML preview)
- */
-public class TracTaskEditor extends AbstractRepositoryTaskEditor {
-
- private 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 cf451193a..000000000
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracTaskEditorFactory.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.trac.ui.editor;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-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.AbstractTask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorFactory;
-import org.eclipse.mylyn.tasks.ui.editors.RepositoryTaskEditorInput;
-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(AbstractTask 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 = TasksUiPlugin.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(AbstractTask task) {
- TracTask tracTask = (TracTask) task;
- TaskRepository repository = TasksUiPlugin.getRepositoryManager().getRepository(TracCorePlugin.REPOSITORY_KIND,
- tracTask.getRepositoryUrl());
- if (TracRepositoryConnector.hasRichEditor(repository)) {
- return new RepositoryTaskEditorInput(repository, tracTask.getTaskId(), tracTask.getUrl());
- } else {
- return new TaskEditorInput(task, false) {
- @Override
- public ImageDescriptor getImageDescriptor() {
- return TasksUiImages.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 fe0b89b0a..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.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.wizards.AbstractEditQueryWizard;
-
-/**
- * @author Steffen Pingel
- */
-public class EditTracQueryWizard extends AbstractEditQueryWizard {
-
-// private TracCustomQueryPage queryPage;
-
- public EditTracQueryWizard(TaskRepository repository, AbstractRepositoryQuery 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.getTaskListManager().getTaskList().deleteQuery(query);
-// TasksUiPlugin.getTaskListManager().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 46e7bd8c4..000000000
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/NewTracQueryWizard.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.trac.ui.wizard;
-
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-
-/**
- * @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() {
- AbstractRepositoryQuery query = queryPage.getQuery();
- if (query != null) {
- TasksUiPlugin.getTaskListManager().getTaskList().addQuery(query);
- AbstractRepositoryConnector connector = TasksUiPlugin.getRepositoryManager().getRepositoryConnector(
- repository.getConnectorKind());
- if (connector != null) {
- TasksUiPlugin.getSynchronizationManager().synchronize(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 bd6c6544e..000000000
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/NewTracTaskPage.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public 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.net.MalformedURLException;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.wizard.WizardPage;
-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.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractAttributeFactory;
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-import org.eclipse.mylyn.tasks.core.RepositoryTaskData;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-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 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) TasksUiPlugin.getRepositoryManager()
- .getRepositoryConnector(TracCorePlugin.REPOSITORY_KIND);
- final ITracClient client;
- try {
- client = connector.getClientManager().getRepository(taskRepository);
- } catch (MalformedURLException e) {
- StatusHandler.displayStatus("Error updating attributes", TracCorePlugin.toStatus(e, taskRepository));
- return;
- }
-
- 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) {
- StatusHandler.displayStatus("Error updating attributes", TracCorePlugin.toStatus(e.getCause(), taskRepository));
- return;
- } catch (InterruptedException e) {
- return;
- }
- }
-
- TracTaskDataHandler offlineHandler = (TracTaskDataHandler) connector.getTaskDataHandler();
- AbstractAttributeFactory attributeFactory = offlineHandler.getAttributeFactory(taskRepository.getUrl(),
- taskRepository.getConnectorKind(), AbstractTask.DEFAULT_TASK_KIND);
- this.taskData = new RepositoryTaskData(attributeFactory, TracCorePlugin.REPOSITORY_KIND,
- taskRepository.getUrl(), 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/NewTracTaskWizard.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/NewTracTaskWizard.java
deleted file mode 100644
index ad7bd3a8e..000000000
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/NewTracTaskWizard.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.trac.ui.wizard;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.mylyn.tasks.ui.editors.NewTaskEditorInput;
-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;
-
-/**
- * Wizard for creating new Trac tickets through a rich editor..
- *
- * @author Steffen Pingel
- */
-public class NewTracTaskWizard extends Wizard implements INewWizard {
-
- private TaskRepository taskRepository;
-
- private NewTracTaskPage newTaskPage;
-
- public NewTracTaskWizard(TaskRepository taskRepository) {
- this.taskRepository = taskRepository;
-
- newTaskPage = new NewTracTaskPage(taskRepository);
-
- setWindowTitle("New Task");
- setDefaultPageImageDescriptor(TasksUiImages.BANNER_REPOSITORY);
-
- setNeedsProgressMonitor(true);
- }
-
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- }
-
- @Override
- public void addPages() {
- addPage(newTaskPage);
- }
-
- @Override
- public boolean canFinish() {
- return true;
- }
-
- @Override
- public boolean performFinish() {
- NewTaskEditorInput editorInput = new NewTaskEditorInput(taskRepository, newTaskPage.getRepositoryTaskData());
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- TasksUiUtil.openEditor(editorInput, TaskEditor.ID_EDITOR, page);
- return true;
- }
-
-}
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 a04e7075a..000000000
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracCustomQueryPage.java
+++ /dev/null
@@ -1,780 +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.net.MalformedURLException;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-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.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.TaskRepositoryManager;
-import org.eclipse.mylyn.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.tasks.ui.search.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 static final String[] DEFAULT_STATUS_SELECTION = new String[] { "new", "assigned", "reopened", };
-
- private 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 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, AbstractRepositoryQuery query) {
- super(TITLE);
-
- this.repository = repository;
- this.query = (TracRepositoryQuery) query;
-
- setTitle(TITLE);
- setDescription(DESCRIPTION);
- }
-
- public TracCustomQueryPage(TaskRepository repository) {
- this(repository, null);
- }
-
- @Override
- 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("Ignoring invalid search filter: " + filter, this);
- }
- }
- }
-
- 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 (repository != 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 (scontainer != null) {
- scontainer.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();
- }
- // initialize with default values
- if (!restored) {
- statusField.selectItems(DEFAULT_STATUS_SELECTION);
- }
- }
-
- private boolean hasAttributes() {
- TracRepositoryConnector connector = (TracRepositoryConnector) TasksUiPlugin.getRepositoryManager()
- .getRepositoryConnector(TracCorePlugin.REPOSITORY_KIND);
- try {
- ITracClient client = connector.getClientManager().getRepository(repository);
- return client.hasAttributes();
- } catch (MalformedURLException e) {
- return false;
- }
- }
-
- private void updateAttributesFromRepository(final boolean force) {
- TracRepositoryConnector connector = (TracRepositoryConnector) TasksUiPlugin.getRepositoryManager()
- .getRepositoryConnector(TracCorePlugin.REPOSITORY_KIND);
- final ITracClient client;
- try {
- client = connector.getClientManager().getRepository(repository);
- } catch (MalformedURLException e) {
- StatusHandler.displayStatus("Error updating attributes", TracCorePlugin.toStatus(e, repository));
- return;
- }
-
- 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 (scontainer != null) {
- scontainer.getRunnableContext().run(true, true, runnable);
- } else {
- IProgressService service = PlatformUI.getWorkbench().getProgressService();
- service.run(true, true, runnable);
- }
- } catch (InvocationTargetException e) {
- StatusHandler.displayStatus("Error updating attributes", TracCorePlugin.toStatus(e.getCause(), repository));
- 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());
- }
-
- public TaskRepository getRepository() {
- return repository;
- }
-
- public void setRepository(TaskRepository repository) {
- this.repository = repository;
- }
-
- @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(repository.getUrl(), getQueryUrl(repository.getUrl()), getTitleText());
- }
-
- private String getTitleText() {
- return (titleText != null) ? titleText.getText() : "<search>";
- }
-
- // public boolean performAction() {
- //
- // Proxy proxySettings = TasksUiPlugin.getDefault().getProxySettings();
- // SearchHitCollector collector = new
- // SearchHitCollector(TasksUiPlugin.getTaskListManager().getTaskList(),
- // repository, getQuery(), proxySettings);
- // NewSearchUI.runQueryInBackground(collector);
- //
- // return true;
- // }
-
- @Override
- public boolean performAction() {
- if (inSearchContainer()) {
- saveState();
- }
-
- return super.performAction();
- }
-
- @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 = "." + repository.getUrl();
-
- 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 = "." + repository.getUrl();
- 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 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 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 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);
- }
-
- }
-
- }
-
-}
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 96d998c66..000000000
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracQueryWizardPage.java
+++ /dev/null
@@ -1,443 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project committers and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public 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.jface.wizard.WizardPage;
-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.monitor.core.StatusHandler;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery;
-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 TaskRepository repository;
-
- private TracRepositoryQuery query;
-
- private Text titleText;
-
- private Composite scrollComposite;
-
- /* Maintain order of criterions in order to be able to restore this later. */
- private Set<SearchField> visibleSearchFields = new LinkedHashSet<SearchField>();
-
- private List<SearchField> searchFields;
-
- public TracQueryWizardPage(TaskRepository repository, AbstractRepositoryQuery 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("Ignoring invalid search filter: " + filter, this);
- }
- }
- }
-
- 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.getUrl(), getQueryUrl(repository.getUrl()), 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 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 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 15854b978..000000000
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracRepositorySettingsPage.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.trac.ui.wizard;
-
-import java.net.MalformedURLException;
-import java.net.Proxy;
-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.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.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.ui.AbstractRepositoryConnectorUi;
-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.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(AbstractRepositoryConnectorUi repositoryUi) {
- super(TITLE, DESCRIPTION, repositoryUi);
-
- setNeedsAnonymousLogin(true);
- setNeedsEncoding(false);
- setNeedsTimeZone(false);
- }
-
- @Override
- protected void createAdditionalControls(final Composite parent) {
-
- for (RepositoryTemplate template : connector.getTemplates()) {
- serverUrlCombo.add(template.label);
- }
- serverUrlCombo.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- String text = serverUrlCombo.getText();
- RepositoryTemplate template = connector.getTemplate(text);
- if (template != null) {
- 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();
- return;
- }
- }
- });
-
- 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 {
-
- final String repositoryUrl;
-
- final Version version;
-
- final String username;
-
- final String password;
-
- final Proxy proxy;
-
- private Version result;
-
- public TracValidator(TaskRepository repository, Version version) {
- this.repositoryUrl = repository.getUrl();
- this.username = repository.getUserName();
- this.password = repository.getPassword();
- this.proxy = repository.getProxy();
- this.version = version;
- }
-
- @Override
- public void run(IProgressMonitor monitor) throws CoreException {
- try {
- validate();
- } 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() throws MalformedURLException, TracException {
- if (version != null) {
- ITracClient client = TracClientFactory.createClient(repositoryUrl, version, username, password, proxy);
- client.validate();
- } else {
- // probe version: XML-RPC access first, then web
- // access
- try {
- ITracClient client = TracClientFactory.createClient(repositoryUrl, Version.XML_RPC, username,
- password, proxy);
- client.validate();
- result = Version.XML_RPC;
- } catch (TracException e) {
- try {
- ITracClient client = TracClientFactory.createClient(repositoryUrl, Version.TRAC_0_9, username,
- password, proxy);
- client.validate();
- 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());
- }
-
-}

Back to the top