Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2007-01-17 15:35:53 -0500
committermkersten2007-01-17 15:35:53 -0500
commit864014cd9d87ae76a3473db836b57ea1e06cd91f (patch)
tree4b5f6e2defc4362b32ab8222a2a4985661a4d0cd /org.eclipse.mylyn.tasks.core
parentd8a3df4bd3731024b2812e0217ed95755cc8f65f (diff)
downloadorg.eclipse.mylyn.tasks-864014cd9d87ae76a3473db836b57ea1e06cd91f.tar.gz
org.eclipse.mylyn.tasks-864014cd9d87ae76a3473db836b57ea1e06cd91f.tar.xz
org.eclipse.mylyn.tasks-864014cd9d87ae76a3473db836b57ea1e06cd91f.zip
NEW - bug 169582: Order of repositories is different between repository view and the New task/queru/etc wizards
https://bugs.eclipse.org/bugs/show_bug.cgi?id=169582
Diffstat (limited to 'org.eclipse.mylyn.tasks.core')
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskDataManager.java8
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/IRepositoryConstants.java2
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepository.java10
3 files changed, 17 insertions, 3 deletions
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
index 36ee646b5..b15d9d306 100644
--- 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
@@ -226,8 +226,12 @@ public class TaskDataManager {
readOldOfflineFile();
} finally {
if (in != null) {
- in.close();
- }
+ try {
+ in.close();
+ } catch(IOException e) {
+ MylarStatusHandler.fail(e, "Could not close stream", false);
+ }
+ }
}
}
}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/IRepositoryConstants.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/IRepositoryConstants.java
index ba6228360..11a6caf61 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/IRepositoryConstants.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/IRepositoryConstants.java
@@ -31,6 +31,8 @@ public interface IRepositoryConstants {
public static final String PROPERTY_DELIM = ":";
+ public static final String KIND_UNKNOWN = "<unknown>";
+
// public static final String PROPERTY_MIGRATION060 = "migration060";
}
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
index a7345b4d6..94599b91d 100644
--- 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
@@ -302,8 +302,16 @@ public class TaskRepository {
return getUrl();
}
+ /**
+ * @return "<unknown>" if kind is unknown
+ */
public String getKind() {
- return properties.get(IRepositoryConstants.PROPERTY_KIND);
+ String kind = properties.get(IRepositoryConstants.PROPERTY_KIND);
+ if (kind != null) {
+ return kind;
+ } else {
+ return IRepositoryConstants.KIND_UNKNOWN;
+ }
}
public String getVersion() {

Back to the top