class JavaPropertyScanner extends AbstractPropertyScanner implements PropertyScanner {

    @Override
    public Map<Locale, File> findTranslations(File template, ScanConfiguration config) {
        Map<Locale, File> results = new HashMap<Locale, File>();
        Pattern filePattern = buildPatternFrom(template.getName());
        File folder = template.getParentFile();
        File[] files = folder.listFiles();
        if(files==null)
        	return results;
        for (File file : files) {
            if(file.equals(template))
                continue;
            Matcher matcher = filePattern.matcher(file.getName());
            if(matcher.matches())
            {
                String localeString = matcher.group(1).substring(1);
                Locale locale = (Locale) PropertiesFactory.eINSTANCE.createFromString(PropertiesPackage.Literals.LOCALE, localeString);
                results.put(locale, file);
            }
        }
        return results;
    }

}