Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2010-06-01 22:02:52 +0000
committerspingel2010-06-01 22:02:52 +0000
commitebf0ba320c04a231a7182fb39fa69ea6aa50712d (patch)
treef3f424c36de4cc2b658df3a363da917db68fb0de /org.eclipse.mylyn.trac.ui/src
parentd74d400094f1fdf54456f0ff5b305b5bd8f5cd4f (diff)
downloadorg.eclipse.mylyn.tasks-ebf0ba320c04a231a7182fb39fa69ea6aa50712d.tar.gz
org.eclipse.mylyn.tasks-ebf0ba320c04a231a7182fb39fa69ea6aa50712d.tar.xz
org.eclipse.mylyn.tasks-ebf0ba320c04a231a7182fb39fa69ea6aa50712d.zip
RESOLVED - 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.trac.ui/src')
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracRepositoryMigrator.java38
1 files changed, 38 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracRepositoryMigrator.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracRepositoryMigrator.java
new file mode 100644
index 000000000..2a6854070
--- /dev/null
+++ b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracRepositoryMigrator.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Steffen Pingel and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Steffen Pingel - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.mylyn.internal.trac.ui;
+
+import org.eclipse.mylyn.internal.tasks.core.IRepositoryConstants;
+import org.eclipse.mylyn.internal.trac.core.TracCorePlugin;
+import org.eclipse.mylyn.tasks.core.AbstractRepositoryMigrator;
+import org.eclipse.mylyn.tasks.core.TaskRepository;
+
+/**
+ * @author Steffen Pingel
+ */
+public class TracRepositoryMigrator extends AbstractRepositoryMigrator {
+
+ @Override
+ public String getConnectorKind() {
+ return TracCorePlugin.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