in command.line/java/com/jetbrains/teamcity/command/ListCommand.java [30:52]
public void execute(final Server server, final Args args, final IProgressMonitor monitor) throws EAuthorizationException, ECommunicationException, ERemoteError, InvalidAttributesException {
if (args.hasArgument(PROJECT_SWITCH, PROJECT_SWITCH_LONG)
&&args.getArgument(PROJECT_SWITCH, PROJECT_SWITCH_LONG) == null
&&!args.hasArgument(CONFIGURATION_SWITCH, CONFIGURATION_SWITCH_LONG)) {
myResultDescription = printProjects(server);
} else if (args.getArgument(PROJECT_SWITCH, PROJECT_SWITCH_LONG) != null
|| args.hasArgument(CONFIGURATION_SWITCH, CONFIGURATION_SWITCH_LONG)) {
myResultDescription = printConfigurations(server, args);
} else {
final StringBuffer resultBuffer = new StringBuffer();
resultBuffer.append(Messages.getString("List.projects.section.header")); //$NON-NLS-1$
resultBuffer.append(printProjects(server));
resultBuffer.append(Messages.getString("List.configurations.section.header")); //$NON-NLS-1$
resultBuffer.append(printConfigurations(server, null));
myResultDescription = resultBuffer.toString();
}
}