Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2008-06-13 10:27:07 +0000
committerspingel2008-06-13 10:27:07 +0000
commitb4996338b46ec9be20eddec644f74ccbc47bd42c (patch)
tree8a1b4007d8cd67d598802ec410a7b32215b22884 /org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model
parent6e6c278e32df5acf18d6c4636f8e0b86fe15a9ee (diff)
downloadorg.eclipse.mylyn.tasks-b4996338b46ec9be20eddec644f74ccbc47bd42c.tar.gz
org.eclipse.mylyn.tasks-b4996338b46ec9be20eddec644f74ccbc47bd42c.tar.xz
org.eclipse.mylyn.tasks-b4996338b46ec9be20eddec644f74ccbc47bd42c.zip
NEW - bug 235011: port Trac to Mylyn 3.0 APIs
https://bugs.eclipse.org/bugs/show_bug.cgi?id=235011
Diffstat (limited to 'org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model')
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracComponent.java2
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracMilestone.java2
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracRepositoryAttribute.java (renamed from org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracAttribute.java)10
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracVersion.java2
4 files changed, 10 insertions, 6 deletions
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracComponent.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracComponent.java
index 55aa33015..327cadb13 100644
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracComponent.java
+++ b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracComponent.java
@@ -11,7 +11,7 @@ package org.eclipse.mylyn.internal.trac.core.model;
/**
* @author Steffen Pingel
*/
-public class TracComponent extends TracAttribute {
+public class TracComponent extends TracRepositoryAttribute {
private static final long serialVersionUID = -6181067219323677076L;
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracMilestone.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracMilestone.java
index 0b1ba7065..978989f94 100644
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracMilestone.java
+++ b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracMilestone.java
@@ -14,7 +14,7 @@ import java.util.Date;
/**
* @author Steffen Pingel
*/
-public class TracMilestone extends TracAttribute implements Serializable {
+public class TracMilestone extends TracRepositoryAttribute implements Serializable {
private static final long serialVersionUID = 6648558552508886484L;
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracAttribute.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracRepositoryAttribute.java
index ed74bf8a7..a820d935d 100644
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracAttribute.java
+++ b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracRepositoryAttribute.java
@@ -10,16 +10,19 @@ package org.eclipse.mylyn.internal.trac.core.model;
import java.io.Serializable;
+import org.eclipse.core.runtime.Assert;
+
/**
* @author Steffen Pingel
*/
-public class TracAttribute implements Serializable {
+public class TracRepositoryAttribute implements Serializable {
private static final long serialVersionUID = -4535033208999685315L;
private String name;
- public TracAttribute(String name) {
+ public TracRepositoryAttribute(String name) {
+ Assert.isNotNull(name);
this.name = name;
}
@@ -33,7 +36,8 @@ public class TracAttribute implements Serializable {
@Override
public String toString() {
- return name;
+ // FIXME serialization can restore null values here
+ return (name != null) ? name : "";
}
}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracVersion.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracVersion.java
index 0b4665fa1..5f5d5c2e3 100644
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracVersion.java
+++ b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracVersion.java
@@ -13,7 +13,7 @@ import java.util.Date;
/**
* @author Steffen Pingel
*/
-public class TracVersion extends TracAttribute {
+public class TracVersion extends TracRepositoryAttribute {
private static final long serialVersionUID = 9018237956062697410L;

Back to the top