JavaPropertyScanner extends AbstractPropertyScanner implements PropertyScanner { @Override public Locale getLocale(File propertyFile) { Matcher matcher = LOCALE_PATTERN.matcher(propertyFile.getName()); if (matcher.matches()) { String actualLocale = matcher.group(2); if(actualLocale==null || actualLocale.isEmpty()) return null; actualLocale = actualLocale.substring(1); return (Locale) PropertiesFactory.eINSTANCE.createFromString(PropertiesPackage.Literals.LOCALE, actualLocale); } return null; }  @Override File findTemplate(File propertyFile, ScanConfiguration config); @Override Locale getLocale(File propertyFile); @Override Map<Locale, File> findTranslations(File template, ScanConfiguration config); @Override File computeTranslationPath(File template, Locale templateLocale, Locale translationLocale); @Override boolean isBilingual(); @Override PropertyConverter createConverter(URI resource); @Override String[] getDefaultIncludes(); @Override String[] getDefaultExcludes(); @Override String getEncoding(); @Property(name=PropertyScanner.TYPE, value="PROPERTIES_ENCODED")
	 static final String TYPE; }
@Test public void testGetLocale() { assertEquals(new Locale("de","DE"),getFixture().getLocale(new File("test_de_DE.properties"))); assertEquals(new Locale("de","DE"),getFixture().getLocale(new File("tes_en_USt_de_DE.properties"))); }