public void info(int projectId)
{
try
{
Project project = Project.getProjectById(projectId);
String formatString = "%1$-12s %2$-32s%n";
console.printf("Id: " + project.getId() + "%n");
console.printf("Name: " + project.getName() + "%n");
console.printf("Date: " + project.getDate() + "%n");
console.printf("Left path: " + project.getLeftPath() + "%n");
console.printf("Right path: " + project.getRightPath() + "%n");
formatString = "%1$-4s %2$-16s%n";
// excludes
console.printf("%n-- Exclude rules:%n");
console.printf(formatString, "Id", "Pattern");
ArrayList<Exclude> excludes = project.getExcludes();
for(int i = 0; i < excludes.size(); i++)
{
console.printf(formatString, excludes.get(i).getId(), excludes.get(i).getPattern());
}
// releases
console.printf("%n-- Latest releases:%n");
console.printf(formatString, "Id", "Date");
ArrayList<Release> releases = project.getReleases(8);
for(int i = 0; i < releases.size(); i++)
{
console.printf(formatString, releases.get(i).getId(), releases.get(i).getDate());
}