// if the build was aborted in the middle. Cancel all the configuration builds.
Queue q = Jenkins.getInstance().getQueue();
synchronized(q) {// avoid micro-locking in q.cancel.
final int n = getNumber();
for (MatrixConfiguration c : p.getActiveConfigurations()) {
if(q.cancel(c))
logger.println(Messages.MatrixBuild_Cancelled(ModelHyperlinkNote.encodeTo(c)));
MatrixRun b = c.getBuildByNumber(n);
if(b!=null && b.isBuilding()) {// executor can spend some time in post production state, so only cancel in-progress builds.
Executor exe = b.getExecutor();
if(exe!=null) {