class PunctuationCheck implements ReviewParticipant {

    @Override
    public Review review(PropertyFileDescriptor descriptor, Property master, Property slave) {
        if(master==null||slave==null||slave.getValue()==null||slave.getValue().isEmpty())
            return null;

        short[] templateOccurrences = new short[hotchars.length];
        String value = master.getValue();
        String translation = slave.getValue();
        countHotChars(value,templateOccurrences);
        subtractHotChars(translation,templateOccurrences);
        for(int i = 0;i<hotchars.length;i++)
        {
            int occ = templateOccurrences[i];
            if(occ!=0)
            {
                Review review = PropertiesFactory.eINSTANCE.createReview();
                review.setCreated(System.currentTimeMillis());
                String message;
                if(occ<0)
                    message = "Translation contains more ''{0}'' characters than the template.";
                else
                    message = "Translation contains less ''{0}'' characters than the template.";
                message = MessageFormat.format(message, hotchars[i]);
                review.setMessage(message);
				review.setReviewType(getReviewType());
                review.setSeverity(Severity.WARNING);
                review.setUser("Jabylon");
                return review;
            }
        }
        return null;


    }

}