in server-side/src/jetbrains/buildServer/commandline/GetBuildTypeMappingAction.java [37:56]
public void process(@NotNull final HttpServletRequest request,
@NotNull final HttpServletResponse response,
@Nullable final Element ajaxResponse) {
final SBuildType buildTypeById = myProjectManager.findBuildTypeByExternalId(btId(request));
if (buildTypeById != null) {
final MappingGenerator generator = new MappingGenerator(myVcsManager, buildTypeById);
generator.generateVcsMapping();
if (generator.getMappings().size() > 0 && ajaxResponse != null) {
final Element mapping = new Element("mapping");
ajaxResponse.addContent((Content) mapping);
for (VcsMappingElement mappingElement : generator.getMappings()) {
final Element mapElement = new Element("map");
mapElement.setAttribute("from", mappingElement.getFrom());
mapElement.setAttribute("to", mappingElement.getTo());
mapElement.setAttribute("comment", mappingElement.getComment());
mapping.addContent((Content) mapElement);
}
}
}
}