Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Pingel2013-04-21 20:11:31 -0400
committerGerrit Code Review @ Eclipse.org2013-04-21 22:42:03 -0400
commit14187a12a8a4ba0b18ff3eb8fd726c3fedf1c4a6 (patch)
tree5b599bd4b8077b59b04c3029305daa3a4b025e95 /org.eclipse.mylyn.tasks.ui/src
parent81db1b68923db48643bf25c4cc75b9581938f429 (diff)
downloadorg.eclipse.mylyn.tasks-14187a12a8a4ba0b18ff3eb8fd726c3fedf1c4a6.tar.gz
org.eclipse.mylyn.tasks-14187a12a8a4ba0b18ff3eb8fd726c3fedf1c4a6.tar.xz
org.eclipse.mylyn.tasks-14187a12a8a4ba0b18ff3eb8fd726c3fedf1c4a6.zip
387710: [api] task category property should be API
Change-Id: I460afb96bb37f84dddfd3b8d48fc58f47891f382 Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=387710
Diffstat (limited to 'org.eclipse.mylyn.tasks.ui/src')
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/LocalRepositoryMigrator.java5
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoriesNavigatorContentProvider.java5
2 files changed, 4 insertions, 6 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/LocalRepositoryMigrator.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/LocalRepositoryMigrator.java
index 85af859e7..03ba0af7f 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/LocalRepositoryMigrator.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/LocalRepositoryMigrator.java
@@ -11,7 +11,6 @@
package org.eclipse.mylyn.internal.tasks.ui;
-import org.eclipse.mylyn.internal.tasks.core.IRepositoryConstants;
import org.eclipse.mylyn.internal.tasks.core.LocalRepositoryConnector;
import org.eclipse.mylyn.tasks.core.AbstractRepositoryMigrator;
import org.eclipse.mylyn.tasks.core.TaskRepository;
@@ -29,8 +28,8 @@ public class LocalRepositoryMigrator extends AbstractRepositoryMigrator {
@Override
public boolean migrateRepository(TaskRepository repository) {
- if (repository.getProperty(IRepositoryConstants.PROPERTY_CATEGORY) == null) {
- repository.setProperty(IRepositoryConstants.PROPERTY_CATEGORY, IRepositoryConstants.CATEGORY_TASKS);
+ if (repository.getCategory() == null) {
+ repository.setCategory(TaskRepository.CATEGORY_TASKS);
return true;
}
return false;
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoriesNavigatorContentProvider.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoriesNavigatorContentProvider.java
index 42756a6b3..d9f2e1912 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoriesNavigatorContentProvider.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoriesNavigatorContentProvider.java
@@ -19,7 +19,6 @@ import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.mylyn.commons.repositories.core.RepositoryCategory;
import org.eclipse.mylyn.internal.tasks.core.IRepositoryChangeListener;
-import org.eclipse.mylyn.internal.tasks.core.IRepositoryConstants;
import org.eclipse.mylyn.internal.tasks.core.TaskRepositoryAdapter;
import org.eclipse.mylyn.internal.tasks.core.TaskRepositoryChangeEvent;
import org.eclipse.mylyn.internal.tasks.core.TaskRepositoryDelta;
@@ -101,7 +100,7 @@ public class TaskRepositoriesNavigatorContentProvider implements ITreeContentPro
} else if (RepositoryCategory.ID_CATEGORY_OTHER.equals(category.getId())) {
Set<Object> items = new HashSet<Object>();
for (TaskRepository repository : repositories) {
- if (repository.getProperty(IRepositoryConstants.PROPERTY_CATEGORY) == null) {
+ if (repository.getCategory() == null) {
items.add(repository);
}
}
@@ -109,7 +108,7 @@ public class TaskRepositoriesNavigatorContentProvider implements ITreeContentPro
} else {
Set<Object> items = new HashSet<Object>();
for (TaskRepository repository : repositories) {
- if (category.getId().equals(repository.getProperty(IRepositoryConstants.PROPERTY_CATEGORY))) {
+ if (category.getId().equals(repository.getCategory())) {
items.add(repository);
}
}

Back to the top