1 11 package org.eclipse.team.internal.ccvs.core.mapping; 12 13 import com.ibm.icu.text.DateFormat; 14 import java.util.Date ; 15 16 import org.eclipse.team.internal.ccvs.core.ILogEntry; 17 import org.eclipse.team.internal.ccvs.core.client.listeners.LogEntry; 18 import org.eclipse.team.internal.core.subscribers.DiffChangeSet; 19 20 public class CVSCheckedInChangeSet extends DiffChangeSet { 21 22 private final ILogEntry entry; 23 24 public CVSCheckedInChangeSet(ILogEntry entry) { 25 this.entry = entry; 26 Date date = entry.getDate(); 27 String comment = LogEntry.flattenText(entry.getComment()); 28 if (date == null) { 29 setName("["+entry.getAuthor()+ "] " + comment); } else { 31 String dateString = DateFormat.getDateTimeInstance().format(date); 32 setName("["+entry.getAuthor()+ "] (" + dateString +") " + comment); } 34 } 35 36 public String getAuthor() { 37 return entry.getAuthor(); 38 } 39 40 public Date getDate() { 41 return entry.getDate(); 42 } 43 44 public String getComment() { 45 return entry.getComment(); 46 } 47 } | Popular Tags |