//Print debug info
log.debug("Analysis complete: " + acceptance); //$NON-NLS-1$
//Print warning or worse messages to log
Collection<Message> warnings = CollectionUtils.select(ProbeMakerPropertyUtils.getAllMessages(p),new SeverityFilter(Message.WARNING));
if (!warnings.isEmpty()) {
designlog.printList(warnings);
for (Iterator<Message> i = warnings.iterator();i.hasNext();) {
log.debug(i.next().getMessage());
}
}
//Accept or reject the candidate
switch (acceptance) {
case CandidateAcceptor.ABORT:
//Abort the process, return null
designlog.printError("Aborted - exiting"); //$NON-NLS-1$
canceled = true;
badProbe(p);
return false;
case CandidateAcceptor.SKIP:
//Skip this probe and continue with next, select if any in list
designlog.printLine("Probe skipped by acceptor"); //$NON-NLS-1$
done = true;
badProbe(p);
break;
case CandidateAcceptor.REJECT:
//Remake this probe (dont do anything)
designlog.printLine("Rejected"); //$NON-NLS-1$
break;
case CandidateAcceptor.TEMPORARY:
//Add a copy of this probe to temporary list, and continue
designlog.printLine("Temporarily accepted"); //$NON-NLS-1$
tempCandidates.addSequence(p.getCopy());
if (true) {
throw new UnsupportedOperationException(
"Acceptor should not return temporary for stage 1"); //$NON-NLS-1$
}
break;
case CandidateAcceptor.ACCEPT:
/***************************
STEP 3 - Stage 2 testing
***************************/
//The candidate was accepted, so perform stage 2 analysis
//Calculate the structure of the candidate and analyze it
designlog.printLine("Candidate accepted, performing stage 2 analysis"); //$NON-NLS-1$
setStatus("Performing stage 2 analysis"); //$NON-NLS-1$
byte accept2 = analyzer.analyzeCandidateStage2(p,this,probes);
//Print warning or worse messages to log
Collection<Message> warns = CollectionUtils.select(ProbeMakerPropertyUtils.getAllMessages(p),new SeverityFilter(Message.WARNING));
if (!warns.isEmpty()) {
designlog.printList(warns);
}
//Accept or reject the candidate