Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Pingel2012-10-06 02:56:23 +0000
committerSteffen Pingel2013-09-26 19:45:58 +0000
commitb25ac21444f9250945fa89c2a9bb20cb8c8d67b6 (patch)
tree83ddfbc36c084485080e714b5f22838aa25edbbd /org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn
parentd4245c3b3223e8fbae7927a5acc0cc8401690448 (diff)
downloadorg.eclipse.mylyn.tasks-b25ac21444f9250945fa89c2a9bb20cb8c8d67b6.tar.gz
org.eclipse.mylyn.tasks-b25ac21444f9250945fa89c2a9bb20cb8c8d67b6.tar.xz
org.eclipse.mylyn.tasks-b25ac21444f9250945fa89c2a9bb20cb8c8d67b6.zip
386117: [api] declare repository connector extensions in tasks.core
Change-Id: I9eafa88b5731e9aaf1d46bd0f91e1b3c51f4f129 Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=386117
Diffstat (limited to 'org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn')
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracRepositoryMigrator.java37
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracTaskListMigrator.java71
2 files changed, 0 insertions, 108 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
deleted file mode 100644
index 091f58319..000000000
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracRepositoryMigrator.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * 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.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.getCategory() == null) {
- repository.setCategory(TaskRepository.CATEGORY_BUGS);
- return true;
- }
- return false;
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracTaskListMigrator.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracTaskListMigrator.java
deleted file mode 100644
index d7a82b3c8..000000000
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracTaskListMigrator.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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 java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.mylyn.internal.trac.core.TracCorePlugin;
-import org.eclipse.mylyn.internal.trac.core.TracRepositoryConnector;
-import org.eclipse.mylyn.internal.trac.core.util.TracUtil;
-import org.eclipse.mylyn.tasks.core.AbstractTaskListMigrator;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.w3c.dom.Element;
-
-/**
- * @author Steffen Pingel
- */
-public class TracTaskListMigrator extends AbstractTaskListMigrator {
-
- private static final String KEY_TRAC = "Trac"; //$NON-NLS-1$
-
- private static final String KEY_TRAC_TASK = KEY_TRAC + KEY_TASK;
-
- private static final String KEY_TRAC_QUERY = KEY_TRAC + KEY_QUERY;
-
- private static final String KEY_SUPPORTS_SUBTASKS = "SupportsSubtasks"; //$NON-NLS-1$
-
- @Override
- public String getConnectorKind() {
- return TracCorePlugin.CONNECTOR_KIND;
- }
-
- @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 void migrateQuery(IRepositoryQuery query, Element element) {
- // nothing to do
- }
-
- @Override
- public void migrateTask(ITask task, Element element) {
- String lastModDate = element.getAttribute(KEY_LAST_MOD_DATE);
- task.setModificationDate(TracUtil.parseDate(lastModDate));
- task.setAttribute(TracRepositoryConnector.TASK_KEY_UPDATE_DATE, lastModDate);
- if (element.hasAttribute(KEY_SUPPORTS_SUBTASKS)) {
- task.setAttribute(TracRepositoryConnector.TASK_KEY_SUPPORTS_SUBTASKS,
- Boolean.valueOf(element.getAttribute(KEY_SUPPORTS_SUBTASKS)).toString());
- }
- }
-
-}

Back to the top