Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2004-04-08 16:44:12 -0400
committerMichael Valenta2004-04-08 16:44:12 -0400
commit94a2fa04c53c4560184ff743c985d66061e9f03e (patch)
tree052812d16bd232eb951191a1308ca5ee40c275df
parentc6247d42451089c354d62700e07a731b2bbf1c42 (diff)
downloadeclipse.platform.team-branch_20040329_DateTag.tar.gz
eclipse.platform.team-branch_20040329_DateTag.tar.xz
eclipse.platform.team-branch_20040329_DateTag.zip
More changes to date tagsbranch_20040329_DateTag
-rw-r--r--bundles/org.eclipse.team.cvs.ui/plugin.xml2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSLightweightDecorator.java7
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/TagElement.java11
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSTagElement.java6
4 files changed, 21 insertions, 5 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/plugin.xml b/bundles/org.eclipse.team.cvs.ui/plugin.xml
index 8a9a891cf..5d2233560 100644
--- a/bundles/org.eclipse.team.cvs.ui/plugin.xml
+++ b/bundles/org.eclipse.team.cvs.ui/plugin.xml
@@ -540,6 +540,7 @@
</action>
<action
label="%NewDateTagAction.label"
+ icon="icons/full/obj16/date.gif"
tooltip="%NewDateTagAction.tooltip"
menubarPath="group.add/group1"
class="org.eclipse.team.internal.ccvs.ui.repo.NewDateTagAction"
@@ -552,6 +553,7 @@
id="org.eclipse.team.ccvs.ui.DateCategoryContributions">
<action
label="%NewDateTagAction.label"
+ icon="icons/full/obj16/date.gif"
tooltip="%NewDateTagAction.tooltip"
menubarPath="group.add/group1"
class="org.eclipse.team.internal.ccvs.ui.repo.NewDateTagAction"
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSLightweightDecorator.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSLightweightDecorator.java
index 4c19ea90f..4ffaed1b8 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSLightweightDecorator.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSLightweightDecorator.java
@@ -12,6 +12,7 @@ package org.eclipse.team.internal.ccvs.ui;
import java.util.ArrayList;
+import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
@@ -264,12 +265,14 @@ public class CVSLightweightDecorator extends LabelProvider implements ILightweig
if (isDirty) {
bindings.put(CVSDecoratorConfiguration.DIRTY_FLAG, store.getString(ICVSUIConstants.PREF_DIRTY_FLAG));
}
-
CVSTag tag = getTagToShow(resource);
if (tag != null) {
String name = tag.getName();
if(tag.getType() == CVSTag.DATE){
- name = CVSDateFormatter.decoratorTimeStamp(tag.asDate());
+ Date date = tag.asDate();
+ if(date != null){
+ name = CVSDateFormatter.decoratorTimeStamp(date);
+ }
}
bindings.put(CVSDecoratorConfiguration.RESOURCE_TAG, name);
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/TagElement.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/TagElement.java
index e8457b94e..8d27dfb7f 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/TagElement.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/TagElement.java
@@ -11,6 +11,8 @@
package org.eclipse.team.internal.ccvs.ui.merge;
+import java.util.Date;
+
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.team.internal.ccvs.core.CVSTag;
@@ -41,8 +43,13 @@ public class TagElement implements IWorkbenchAdapter, IAdaptable {
}
}
public String getLabel(Object o) {
- if(tag.getType() != CVSTag.DATE)return tag.getName();
- return CVSDateFormatter.repoViewTimeStamp(tag.asDate());
+ if(tag.getType() == CVSTag.DATE){
+ Date date = tag.asDate();
+ if (date != null){
+ return CVSDateFormatter.repoViewTimeStamp(date);
+ }
+ }
+ return tag.getName();
}
public Object getParent(Object o) {
return null;
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSTagElement.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSTagElement.java
index 3d7438cfa..3be72679f 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSTagElement.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSTagElement.java
@@ -11,6 +11,7 @@
package org.eclipse.team.internal.ccvs.ui.model;
import java.lang.reflect.InvocationTargetException;
+import java.util.Date;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.jobs.ISchedulingRule;
@@ -81,7 +82,10 @@ public class CVSTagElement extends CVSModelElement implements IDeferredWorkbench
return null;
CVSTag aTag = ((CVSTagElement) o).tag;
if(aTag.getType() == CVSTag.DATE){
- return CVSDateFormatter.repoViewTimeStamp(aTag.asDate());
+ Date date = tag.asDate();
+ if (date != null){
+ return CVSDateFormatter.repoViewTimeStamp(date);
+ }
}
return aTag.getName();
}

Back to the top