Iterator<Entry<String, Project>> it = PdpScanner.projects.entrySet()
.iterator();
while (it.hasNext()) {
final Project p = it.next().getValue();
// Add project to projects table
Hyperlink projectLink = new Hyperlink(p.getName() + " ("
+ p.getOwner() + ")", "Project~" + p.getName());
projectTable.setWidget(row, 0, projectLink);
// Compute the number of days elapsed between the project
// creation date and now
DateTimeFormat dateFormatter = new DateTimeFormat(
"yyyy-MM-dd HH:mm:ss") {
};
Date d1 = dateFormatter.parse(p.getCreationDate());
Date d2 = new Date();
String days = String.valueOf((d2.getTime() - d1.getTime())
/ MILLIS_PER_DAY);
projectTable.setText(row, 1, days);
if (p.getNloc(p.getVersionCount()) == -1)
projectTable.setText(row, 2, "--");
else
projectTable.setText(row, 2,
String.valueOf(p.getNloc(p.getVersionCount())));
dateFormatter = new DateTimeFormat("dd/MM/yyyy, à HH:mm") {
};
projectTable.setText(row, 3, dateFormatter.format(d1));