Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrelves2010-05-25 20:07:15 +0000
committerrelves2010-05-25 20:07:15 +0000
commit105f9b524f9d34b780db0d0fbbc2517f53743651 (patch)
tree679270c961d7579079f7628125ad7a2d7e4c28fb /org.eclipse.mylyn.bugzilla.ui
parent881b6c37cfae275e990e06dd3616b7e3a20e3012 (diff)
downloadorg.eclipse.mylyn.tasks-105f9b524f9d34b780db0d0fbbc2517f53743651.tar.gz
org.eclipse.mylyn.tasks-105f9b524f9d34b780db0d0fbbc2517f53743651.tar.xz
org.eclipse.mylyn.tasks-105f9b524f9d34b780db0d0fbbc2517f53743651.zip
NEW - bug 302907: [api] support categorization in Task Repositories view
https://bugs.eclipse.org/bugs/show_bug.cgi?id=302907
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.ui')
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/plugin.xml3
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositoryMigrator.java39
2 files changed, 42 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.bugzilla.ui/plugin.xml b/org.eclipse.mylyn.bugzilla.ui/plugin.xml
index bd24e1b05..6b4f00a39 100644
--- a/org.eclipse.mylyn.bugzilla.ui/plugin.xml
+++ b/org.eclipse.mylyn.bugzilla.ui/plugin.xml
@@ -30,6 +30,9 @@
<taskListMigrator
class="org.eclipse.mylyn.internal.bugzilla.ui.tasklist.BugzillaTaskListMigrator"/>
+ <repositoryMigrator
+ class="org.eclipse.mylyn.internal.bugzilla.ui.tasklist.BugzillaRepositoryMigrator">
+ </repositoryMigrator>
</extension>
<extension
point="org.eclipse.mylyn.bugzilla.core.languages">
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositoryMigrator.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositoryMigrator.java
new file mode 100644
index 000000000..2ca9bcf5f
--- /dev/null
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositoryMigrator.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2008 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.mylyn.internal.bugzilla.ui.tasklist;
+
+import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin;
+import org.eclipse.mylyn.internal.tasks.core.IRepositoryConstants;
+import org.eclipse.mylyn.tasks.core.AbstractRepositoryMigrator;
+import org.eclipse.mylyn.tasks.core.TaskRepository;
+
+/**
+ * @author Robert Elves
+ * @since 3.4
+ */
+public class BugzillaRepositoryMigrator extends AbstractRepositoryMigrator {
+
+ @Override
+ public String getConnectorKind() {
+ return BugzillaCorePlugin.CONNECTOR_KIND;
+ }
+
+ @Override
+ public boolean migrateRepository(TaskRepository repository) {
+ if (repository.getProperty(IRepositoryConstants.PROPERTY_CATEGORY) == null) {
+ repository.setProperty(IRepositoryConstants.PROPERTY_CATEGORY, IRepositoryConstants.CATEGORY_BUGS);
+ return true;
+ }
+ return false;
+ }
+
+}

Back to the top